Boot from NAND without accessing DIP switches

I successfully installed my R3 following instructions to install to NOR then NAND then eMMC. All good.

I’m wondering from the U-Boot console if I could ask it to boot from NAND without changing the switches?
I know I have a working NAND install as I used it as part of the install process. I can see various defined options to run different boot cmds from running printenv in the U-Boot console but don’t see one to boot from NAND. So I thought I could add such a config. But need some advice on what the parameters would be? Perhaps it’s only a small change from one of the existing commands I see from printenv.

But if using the switches is the only way then that is a quick answer.

Thanks.

You won’t be able to flip between NAND and NOR without the switch because they share the same physical bus (SPI0). Same with the eMMC and SD (the same physical MMC controller).

You can however have a setup where you load the bootloader from say the NAND (or NOR) and then launch your system from the NAND itself or from a different medium like the eMMC (or SD).

The idea is that you need the two storage mediums to be independent (e.g. not share any buses)

Thanks. I was aware of the shared interface architecture but my question is within those limitations. The switches are set to boot from eMMC. Does that mean I cannot manually override that from the console? I don’t wish to boot from SD instead, as per the shared bus setup, but from NAND.

If that is possible then … What I would like to do is from the U-Boot console boot from NAND. What boot command could I use to do that?

From the output of ‘printenv’ I see a number of local command definitions for different boot setups. I would like one that boots from NAND.

Additionally if I run ‘bootmenu’ I see the default options to boot in different ways. I’d like to add or change one of those to have a convenient boot from NAND option. All of those are accessible irrespective of the switch positions.

But in both cases I need to know what the boot specification would look like.

Thank you.

@LRvKochel here is a list of possible combination of u-boot -> system combinations you can have, with just the board (USB and nvme are also options but not listed below)

NOR -> NOR 
    -> eMMC
    -> SD
        
NAND -> NAND 
     -> eMMC
     -> SD

eMMC -> eMMC 
     -> NAND
     -> NOR

SD   -> SD 
     -> NAND
     -> NOR

I haven’t tested your case i.e. eMMC/SD to NAND/NOR, but they should be theoretically possible. Functionally they are equivalent to their mirrored versions (e.g. NAND/NOR to SD/eMMC). You only need to do a switch flip when the bus is shared (e.g. if you want to switch NAND->EMMC to NAND->SD).

A minimalistic way to boot a system from u-boot needs the follwing actions:

  1. load the kernel image to the expected destination address, in RAM (e.g. 0x46000000). The source address can be on any data device u-boot has access to.
  2. setup the correct bootargs. these get passed to the kernel image. root= tells the kernel which data device to use as rootfs.
  3. run the bootm u-boot command to trigger the boot sequence

You can test these quite easiy from the uboot commandline without saving the environment. If the board does not boot simply powercycle and try with different parameters until you are happy.

Good luck!