以前能编译过的ltib,这几天编译时,试了好几遍总是遇到同样的错误无法编译过:
coolyu@coolyu-desktop:~/ltib-mpc8315erdb-20080630$: ltib -c
...
+ [ mpc8315erdb_default mpc8315erdb_1588 mpc8315erdb_otg mpc8315erdb_ulpi = %dtc_name ]
+ basename mpc8315erdb_default.dtb
+ dtc -f -b 0 -I dts -O dtb -R 8 -S 0x3000 -o /home/coolyu/ltib-mpc8315erdb-20080630/tmp/kernel//opt/freescale/rootfs/ppc/boot/mpc8315erdb_default.dtb arch/powerpc/boot/dts/mpc8315erdb_default.dts
DTC: Use of "-S" is deprecated; it will be removed soon, use "-p" instead
DTC: dts->dtb on file "arch/powerpc/boot/dts/mpc8315erdb_default.dts"
Error: arch/powerpc/boot/dts/mpc8315erdb_default.dts 12:0 - 1:0 syntax error
FATAL ERROR: Unable to parse input tree
error: Bad exit status from /home/coolyu/ltib-mpc8315erdb-20080630/tmp/rpm-tmp.733 (%install)
RPM build errors:
Bad exit status from /home/coolyu/ltib-mpc8315erdb-20080630/tmp/rpm-tmp.733 (%install)
Build time for kernel-2.6.24.3-mpc8315erdb: 363 seconds
Failed building kernel-2.6.24.3-mpc8315erdb
f_buildrpms() returned an error, exiting
traceback:
main:501
Started: Sat May 28 21:53:09 2011
Ended: Sat May 28 21:59:36 2011
Elapsed: 387 seconds
These packages failed to build:
kernel-2.6.24.3-mpc8315erdb
Build Failed
Exiting on error or interrupt
coolyu@coolyu-desktop:~/ltib-mpc8315erdb-20080630$ cd ..
Freescale提供的解决办法:
http://forums.freescale.com/t5/8-Bit-Microcontrollers/building-with-ltib-c-and-get-syntax-error-in-dts-file/td-p/59936
Re: building with ltib -c and get syntax error in dts file
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
2011-02-25 01:04 PM
Ok, managed to sort this.
Apparently the .dts files for the mpc8313erdb are in dts-v0 format. The vrsion of the DTC (Device Tree Compiler) I have installed does not support this format any longer.
To fix it I downloaded the source and built it, which includes a utility called convert-dtsv0
(下载该目录下的所有源码,编译出可执行程序convert-dtsv0,放到host-linux系统的/usr/local/bin目录下。进入mpc8313erdb.dts所在目录,执行命令:convert-dtsv0 mpc8313erdb.dts,可以看到新生成了mpc8313erdb.dtsv1,再将mpc8313erdb.dtsv1改成文件名mpc8313erdb.dts,替换掉原来的mpc8313erdb.dts文件)
>git clone http://git.jdl.com/software/dtc.git
>cd dtc
>make
This should build the convert-dtsv0 utiltity
Copy it to your /usr/local/bin directory (or wherever you think is suitable in your PATH)
>cd /ltib-mpc8313erdb-20081222/config/platform/mpc8313erdb/dts/
(or wherever you have the BSP installed)
>convert-dtsv0 mpc8313erdb.dts
>convert-dtsv0 mpc8313erdb-revc-tsec1-marvell.dts
>convert-dtsv0 mpc8313erdb-usb-internal-client.dts
This will produce three files of the same names, but with the extension .dtsv1
You will need to delete or rename the original files to something else (I renamed them with an extra .orig extension), then rename the .dtsv1 files to .dts
The build should now work. (hopefully)