Changes between Version 28 and Version 29 of newport

12/21/2017 02:50:25 PM (5 weeks ago)
Ryan Erbstoesser

add info for booting to microsd for kernel/rootfs


  • newport

    v28 v29  
    354354The bootloader also has a notion of boot device, either the built in eMMC or an external microSD.
    355 This is controlled through the UBoot variable 'dev'.
     355This is controlled through the UBoot variable 'dev'. The dev variable is purely for the bootloader, and does not signify what device to boot the kernel/rootfs from.
    357357Note if booting with the onboard eMMC as the primary boot device, “0/mmcblk0” is the U-Boot/Linux device node for eMMC and “1/mmcblk1” is the U-Boot/Linux device node for microSD. When booting from the alternate device (microSD) this is swapped.
     359=== Booting to a kernel/rootfs on the microSD ===
     361This assumes the bootloader will remain on the eMMC, but then we switch to the microSD for the kernel/rootfs.
     363Run the following commands in the uboot bootloader command prompt on the Newport SBC serial console:
     365#This tells the board to always get the bootloader from emmc, which is ok.
     367setenv dev 0
     370#now we are going to create a NEW script called boot_sd for booting from the microSD:
     371#note the ext4load command grabs from 1:2, which means dev 1, which will be the microSD as long as you set
     372#dev to 0 above (meaning dev 0 will be emmc, which will hold the bootloader, and then 1 would be the microSD)
     374setenv boot_sd  "ext4load mmc 1:2 ${kernel_addr} boot/${kernel} && setenv root '/dev/mmcblk0p2 rw rootwait' && run setargs && booti ${kernel_addr} - ${fdtcontroladdr}"
     377#now save everything
     382#now boot to microSD
     384run boot_sd
     387If you want to then start doing this automatically everytime, you would look at the variable called boot_cmd. It currently uses the built in script we have to boot from mmc (which means emmc)
     389GW6304-B> print bootcmd
     390bootcmd=run boot_mmc
     393#if you want to modify this to boot from your new script:
     395setenv bootcmd 'run boot_sd'