This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/DRA80XMEVM: Issue in switch root partitions

Part Number: DRA80XMEVM


Tool/software: Linux

Hi,

We are trying to realize a use case wherein, we want to dynamically switch between 2 root partitions (through boot loader). For eg: our SDCard has 3 partitions /dev/mmcblk0p1 (boot partition), /dev/mmcblk0p2 (linux 1), /dev/mmcblk0p3 (linux 2). By changing the boot args, we want to boot up either linux 1 from mmcblk0p2 or linux 2 from mmcblk0p3. We tried using the "uEnv.txt" file, by changing the bootargs, root etc, but appears these values are not being picked up by the bootloader.

So, in summary we are trying to configure during runtime a switch to a different linux version, so that on next boot the other version comes up. Please help/suggest how to achieve this.

Thanks.

 

  • Hi Mallikarjun,

    Please modify the u-boot environment bootenvfile to set the correct uEnv.txt file to be used. 

    You can place to files in the boot partition, say uEnv1.txt and uEnv2.txt in the boot partition and in u-boot, you can update the variable to pick up which environment text file to pick. The referenced here is DEFAULT_MMC_TI_ARGS defined in work/vsdk_builder/linux/u-boot/include/configs/ti_armv7_common.h

    Regards

    Shravan

  • Thanks Shravan,

    But this does not solve our issue. We are trying to automate here,so that during linux runtime, we want to make the modifications necessary to switch to the other partition on the next power cycle. The solution you are proposing, will need us to break into bootloader prompt each power cycle and update the boot variable,

    Also, could you please help us with the actual boot args to set, to be able to switch partitions. For eg:- On the DRA74x, we found the below syntax in the uEnv.txt file of the boot partition.

  • Hi Mallikarjun,

    You don't need to halt at u-boot. You merely need to call the setenv function to update the environment variable (the same function is called when you halt and update the environment in u-boot).

    A reference on how to do this can be found in cmd/setexpr.c file in u-boot.

    Regards

    Shravan