Select New Boot Partition via U-boot on SD Card

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Select New Boot Partition via U-boot on SD Card

1,186 Views
tuncayyldrm
Contributor I

 

Hello,

We are developing projects with iMX8QM-MEK Eval Board with v5.4.70 kernel.

We continue our project using SD card. With the OTA features we will add, we added 2 more partitions to our SD card and got its new structure as follows.

tuncayyldrm_0-1665151391119.png

Figure -1. SD Card Partitions

 

Here we can see the partitions as shown in Figure-2 with the command given in the u-boot and we want to select boot-2 as the jumpable address depending on the situation.

tuncayyldrm_1-1665151391171.png

Figure-2. Partition Map

 

I want to jump to boot-2 here. How can I mount a new partition and how do I configure u-boot  to jump a particular partition?

 

Regards,

0 Kudos
4 Replies

1,177 Views
seb_haezebrouck
NXP Employee
NXP Employee

Hi,

Check the mmcdev, mmcpart and loadbootscript/fdt/image/... u-boot environment variables.

In your case, setting mmcpart variable to 3 is probably what you need, so that the dtb and kernel image are taken from the boot-2 partition. You will also need to change the kernel rootfs location (mmcroot u-boot env variable) or you would still use the old linux rootfs in root-1 partition.

Best regards

0 Kudos

1,171 Views
tuncayyldrm
Contributor I

What should I do to set the mmcpart variable to 3? Also after doing this, can I configure u-boot to run directly  my root-2 software?

(Note: I tried to select partition 3 using by running $mmc dev 3 command, but I couldn't.)

0 Kudos

1,168 Views
seb_haezebrouck
NXP Employee
NXP Employee

setenv mmcpart 3

then modify your kernel command line to use /dev/mmcblk0p4 as rootfs. Probably by modifying the mmcroot variable.

0 Kudos

1,148 Views
tuncayyldrm
Contributor I

Hello,

This is how I set the variable you said. I also did different experiments.

mmcdev=1

mmcpart=3

When I use the $fatls mmc 1 command, I observe the dtbs in the wrong boot file. Could this be because my configuration is wrong?

0 Kudos