Device Tree(四)linux-4.19.10 板級移植
1、修改Makefile
ARCH ?= arm
CROSS_COMPILE ?= arm-linux-gnueabihf-
如果發現:/tmp/cc8nFJm8.s:549: Error: garbage following instruction -- `dsb nshst', 則到linaro.org下載新版本的編譯器,我使用版本為7.7.3
2、修改arch\arm\boot\Makefile
$(obj)/uImage: $(obj)/zImage FORCE
@$(check_for_multiple_loadaddr)
$(call if_changed,uimage)
#cp -f arch/arm/boot/uImage ../bin/uImage.bin
cp -f arch/arm/boot/uImage /mnt/hgfs/Bin/uImage.bin;\
cp -f arch/arm/boot/dts/s5pv210-smdkv210.dtb /mnt/hgfs/Bin/s5pv210-smdkv210.dtb
@$(kecho) ' Image [email protected] is ready'
3、編譯
make s5pv210_defconfig; make menuconfig; make; make dtbs; make LOADADDR=0x20008000 uImage
(s5pv210_defconfig在arch/arm/configs下, LOADADDR為uImage自解壓後搬運核心到此處)
4、下載kernel與dtb至開發板
tftp 40000000 uImage; tftp 50000000 s5pv210-smdkv210.dtb; fdt addr 5000000; bootm 40000000 - 50000000
只打印瞭如下所示就不列印了:
Starting kernel ...
(除錯發現不列印linux-4.19.10 “Uncompressing Linux... done, booting the kernel.”)
可以使用early_print列印進行除錯,原因是dts檔案中沒有設定xxti的時鐘頻率,導致計時器卡死,
新增xxti頻率配置在xusbti平級:
&xusbxti {
clock-frequency = <24000000>;
};
/* add by Louis */
&xxti {
clock-frequency = <24000000>;
};
可以看到列印資訊
Starting kernel ... Booting Linux on physical CPU 0x0 |