Linux内核版本:4.1.8 board:带A20 CPU的cubietruck。 编译平台:os x 10.5.5
我这样做:
首先我使用sunxi_defconfig作为默认配置,但未发现'byte_swap.h'错误。然后我使用由cubieboard提供的sun7i_defconfig,然后make -j4 ARCH=arm CROSS_COMPILE=arm-none-eabi- zImage
,make -j4 ARCH=arm CROSS_COMPILE=arm-none-eabi- dtbs
。
然后我将Uboot和spl刻录到SDCard并进入分区:一个用于引导,另一个用于根文件系统。我把zImage,script.bin和dtb文件放在启动分区上。
然后我创建boot.cmd,如下所示:
fatload mmc 0 0x46000000 zImage
fatload mmc 0 0x49000000 sun7i-a20-cubietruck.dtb
setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait panic=10 ${extra}
bootz 0x46000000 - 0x49000000
然后mkimage -C none -A arm -T script -d boot.cmd boot.scr
。
所以启动分区上有三个文件:
boot.scr
script.bin
sun7i-A20-cubietruck.dtb
的zImage
Uboot工作正常。(至少我认为),这是输出
U-Boot SPL 2014.04 (Sep 29 2015 - 21:36:09)
Board: Cubietruck
DRAM: 2048 MiB
CPU: 960000000Hz, AXI/AHB/APB: 3/2/2
spl: not an uImage at 1600
U-Boot 2014.04 (Sep 29 2015 - 21:36:09) Allwinner Technology
CPU: Allwinner A20 (SUN7I)
Board: Cubietruck
I2C: ready
DRAM: 2 GiB
MMC: SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment
In: serial
Out: serial
Err: serial
Net: dwmac.1c50000
Hit any key to stop autoboot: 0
reading uEnv.txt
** Unable to read file uEnv.txt **
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
reading boot.scr
281 bytes read in 16 ms (16.6 KiB/s)
Jumping to boot.scr
## Executing script at 44000000
reading zImage
3446280 bytes read in 192 ms (17.1 MiB/s)
reading sun7i-a20-cubietruck.dtb
26288 bytes read in 30 ms (855.5 KiB/s)
Kernel image @ 0x46000000 [ 0x000000 - 0x349608 ]
## Flattened Device Tree blob at 49000000
Booting using the fdt blob at 0x49000000
Loading Device Tree to 4fff6000, end 4ffff6af ... OK
Starting kernel ...
任何人都可以提供帮助吗?