| 358 | |
| 359 | === Booting to a kernel/rootfs on the microSD === |
| 360 | |
| 361 | This assumes the bootloader will remain on the eMMC, but then we switch to the microSD for the kernel/rootfs. |
| 362 | |
| 363 | Run 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 | {{{ |
| 367 | setenv 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 | {{{ |
| 374 | setenv 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 | {{{ |
| 379 | saveenv |
| 380 | }}} |
| 381 | |
| 382 | #now boot to microSD |
| 383 | {{{ |
| 384 | run boot_sd |
| 385 | }}} |
| 386 | |
| 387 | If 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 | {{{ |
| 389 | GW6304-B> print bootcmd |
| 390 | bootcmd=run boot_mmc |
| 391 | }}} |
| 392 | |
| 393 | #if you want to modify this to boot from your new script: |
| 394 | {{{ |
| 395 | setenv bootcmd 'run boot_sd' |
| 396 | saveenv |
| 397 | reset |
| 398 | }}} |
| 399 | |
| 400 | |
| 401 | |
| 402 | |