Changes between Version 28 and Version 29 of newport


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

add info for booting to microsd for kernel/rootfs

Legend:

Unmodified
Added
Removed
Modified
  • newport

    v28 v29  
    353353
    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.
    356356
    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.
     358
     359=== Booting to a kernel/rootfs on the microSD ===
     360
     361This assumes the bootloader will remain on the eMMC, but then we switch to the microSD for the kernel/rootfs.
     362
     363Run the following commands in the uboot bootloader command prompt on the Newport SBC serial console:
     364
     365#This tells the board to always get the bootloader from emmc, which is ok.
     366{{{
     367setenv dev 0
     368}}}
     369
     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)
     373{{{
     374setenv boot_sd  "ext4load mmc 1:2 ${kernel_addr} boot/${kernel} && setenv root '/dev/mmcblk0p2 rw rootwait' && run setargs && booti ${kernel_addr} - ${fdtcontroladdr}"
     375}}}
     376
     377#now save everything
     378{{{
     379saveenv
     380}}}
     381
     382#now boot to microSD
     383{{{
     384run boot_sd
     385}}}
     386
     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)
     388{{{
     389GW6304-B> print bootcmd
     390bootcmd=run boot_mmc
     391}}}
     392
     393#if you want to modify this to boot from your new script:
     394{{{
     395setenv bootcmd 'run boot_sd'
     396saveenv
     397reset
     398}}}
     399
     400
     401
     402
    358403
    359404[=#bootloader]