-
Notifications
You must be signed in to change notification settings - Fork 11
Running Linux and Buildroot from USB
Normally, the system boots from SD card. However during development, it might be desirable to load a minimum system over USB to run in the RAM. Here are the steps of doing so.
First, follow the steps in the building uboot/ linux page to build the linux kernel.
Clone the upstream buildroot to a local folder. Use menu config to configure the system to use armv7 target, and make sure to pack the output filesystem to an cpio initrd image for uboot.
Powering up the board. You should be able to see U-Boot counting down during boot. Press any key to stop U-Boot from auto-booting.
Use command fastboot 0
to enter USB boot mode.
Use the following uuu script to load the system over USB:
uuu_version 1.2.135
FB: ucmd setenv fastboot_buffer 0x80800000
FB: download -f ../linux-imx/arch/arm/boot/zImage
FB: ucmd setenv fastboot_buffer 0x83000000
FB: download -f ../linux-imx/arch/arm/boot/dts/imx6ull-nekoink.dtb
FB: ucmd setenv fastboot_buffer 0x86800000
FB: download -f ../buildroot-2021.02.2/output/images/rootfs.cpio.uboot
FB: ucmd setenv bootargs epdc video=mxcepdcfb:GDEW101C01,bpp=8
FB: ucmd bootz 0x80800000 0x86800000 0x83000000
FB: done
If your board doesn't have U-Boot in the flash, it's also possible to use the recovery mode to load and run U-Boot in RAM over USB.
Follow the steps in building uboot/ linux page to build the u-boot.
Press and hold the recovery button, connect the USB cable. The PC should detect the board.
Use the following uuu script to load the system over USB:
uuu_version 1.2.135
SDP: boot -f u-boot-with-spl.imx
SDPV: write -f u-boot-with-spl.imx -addr 0x877eefc0
SDPV: jump -ivt -addr 0x877fffc0
FB: ucmd setenv fastboot_buffer 0x80800000
FB: download -f ../linux-imx/arch/arm/boot/zImage
FB: ucmd setenv fastboot_buffer 0x83000000
FB: download -f ../linux-imx/arch/arm/boot/dts/imx6ull-nekoink.dtb
FB: ucmd setenv fastboot_buffer 0x86800000
FB: download -f ../buildroot-2021.02.2/output/images/rootfs.cpio.uboot
FB: ucmd setenv bootargs epdc video=mxcepdcfb:GDEW101C01,bpp=8
FB: ucmd bootz 0x80800000 0x86800000 0x83000000
FB: done