Boot Linux - FrankBau/meta-marsboard-bsp GitHub Wiki
Boot Linux
Prerequisites:
- Build a Linux image on a microSD card
- A newer U-Boot boot loader in the on-board SPI flash: Update U-Boot in SPI Flash
- for login: Connect MarS Board to the Linux host
Manually boot Linux from a microSD card
- insert the microSD card into the MarS Board.
- set boot mode switch SW1 to "SPI-NOR boot" position: Jumper 1: OFF, 2: OFF
- power-on or reset the MarS Board
The U-Boot boot loader will be loaded from on-board SPI flash and started. (Alternatively, you may use USB-OTG Boot to execute U-Boot from the host).
When U-Boot starts, quickly press any key in the Linux host console. This will prevent U-Boot from automatic booting and start the U-Boot shell. Enter:
mmc rescan
mmc dev 0
mmcinfo
fatload mmc 0:1 0x10800000 uImage
fatload mmc 0:1 0x12000000 imx6q-marsboard.dtb
setenv bootargs console=ttymxc1,115200 consoleblank=0 rootwait root=/dev/mmcblk0p2 video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24 fbmem=32M
bootm 0x10800000 - 0x12000000
Now, the kernel will start:
Starting kernel ...
Booting Linux on physical CPU 0x0
Linux version 3.10.17-1.0.1_ga+yocto+g50c5697 (frank@FrankBuntuSSD) (gcc versio4 CPU: ARMv7
Processor [412fc09a] revision 10 (ARMv7), cr=10c53c7d
…
marsboard login:
Enter user name “root” with no password, and a linux bash prompt will show up:
root@marsboard:~#
In order to finally shut down the board gracefully, and prevent file system damages, enter: halt and power-off/reset the board when halt has finished (“Power down.” appears).
Automatically boot Linux from a microSD card
Proceed as above. But when in the U-boot shell, make permanent (on-board SPI flash) changes to the U-Boot environment:
setenv bootcmd "mmc rescan; fatload mmc 0:1 0x10800000 /uImage; fatload mmc 0:1 0x12000000 /imx6q-marsboard.dtb; bootm 0x10800000 - 0x12000000"
setenv bootargs "console=ttymxc1,115200 init=/sbin/init rw root=/dev/mmcblk1p2 rootwait video=mxcfb0:dev=hdmi,1920x1080M@in 60,if=RGB24 fbmem=32M"
saveenv
reset