The problem seems to be the ‘fdtget’ utility. This utility does not exist on my version of RHEL. I put some debug prints in the python script to help me debug the problem:
skales/dtbTool -s 2048 -o arch/arm/boot/dt.img -p scripts/dtc/ build-arm64/arch/arm64/boot/dts/qcom/
indir (build-arm64/arch/arm64/boot/dts/qcom/)
flist (['build-arm64/arch/arm64/boot/dts/qcom/msm8916-mtp.dtb', 'build-arm64/arch/arm64/boot/dts/qcom/apq8016-sbc.dtb'])
f (build-arm64/arch/arm64/boot/dts/qcom/msm8916-mtp.dtb) options.dtc (scripts/dtc/) pagesize (2048)
os.path.join (['scripts/dtc/fdtget', 'build-arm64/arch/arm64/boot/dts/qcom/msm8916-mtp.dtb', '/', 'qcom,msm-id'])
Traceback (most recent call last):
File "skales/dtbTool", line 210, in <module>
records += generate_records(f, options.dtc, pagesize)
File "skales/dtbTool", line 111, in generate_records
msm_id = subprocess.check_output([os.path.join(dtc, "fdtget"), f, "/", "qcom,msm-id"], stderr=subprocess.PIPE)
File "/tools/oss/packages/x86_64-rhel6/python/default/lib/python2.7/subprocess.py", line 568, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/tools/oss/packages/x86_64-rhel6/python/default/lib/python2.7/subprocess.py", line 711, in __init__
errread, errwrite)
File "/tools/oss/packages/x86_64-rhel6/python/default/lib/python2.7/subprocess.py", line 1308, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
I noticed that there is a source for fdtget.c in scripts/dtc. When I tried to build it manually, the <libfdt.h> is not found on my RHEL:
Makefile:13: HOSTCFLAGS_DTC -I -I/libfdt
cc fdtget.c -o fdtget
fdtget.c:33:20: error: libfdt.h: No such file or directory
fdtget.c: In function 'show_data':
fdtget.c:70: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
fdtget.c:70: error: 'p' undeclared (first use in this function)
fdtget.c:70: error: (Each undeclared identifier is reported only once
fdtget.c:70: error: for each function it appears in.)
fdtget.c:70: error: expected ')' before 'uint8_t'
fdtget.c:70: warning: cast from pointer to integer of different size
fdtget.c:108: error: expected ')' before 'uint32_t'
Is there a RHEL version of fdtget that I could use?