Lichee Pi Zero

Build UBoot


步驟如下:

$ cd
$ git clone -b v3s-spi-experimental https://github.com/Lichee-Pi/u-boot.git
$ cd u-boot
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- LicheePi_Zero_defconfig
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- 

燒錄UBoot(SPI)

$ sudo sunxi-fel -p spiflash-write 0 u-boot-sunxi-with-spl.bin

燒錄UBoot(MicroSD)

$ sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/sdx bs=1024 seek=8

Load Kernel and rootfs from SPI flash (include/configs/sun8i.h)

#define CONFIG_BOOTCOMMAND   "sf probe 0; "                           \
                             "sf read 0x41800000 0x100000 0x10000; "  \
                             "sf read 0x41000000 0x110000 0x400000; " \
                             "bootz 0x41000000 - 0x41800000"

#define CONFIG_BOOTARGS      "console=ttyS1,115200 earlyprintk panic=5 rootwait " \
                             "mtdparts=spi32766.0:1M(uboot)ro,64k(dtb)ro,4M(kernel)ro,-(rootfs) root=31:03 rw rootfstype=jffs2"

Load Kernel and rootfs from SDCard

#define CONFIG_BOOTCOMMAND  "setenv bootm_boot_mode sec; " \
                            "load mmc 0:1 0x41000000 zImage; "  \
                            "load mmc 0:1 0x41800000 sun8i-v3s-licheepi-zero.dtb; " \
                            "bootz 0x41000000 - 0x41800000;"

#define CONFIG_BOOTARGS     "console=ttyS1,115200 earlyprintk panic=5 rootwait root=/dev/mmcblk0p2 earlyprintk rw rootfstype=ext4"


返回上一頁