Booting steps and partitioning steps in LX2160A for EMMC

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Booting steps and partitioning steps in LX2160A for EMMC

2,285件の閲覧回数
harisankar2001
Contributor I

I have tried to build a Flexbuilder image and booting is successfully completed. When I am implementing uboot environment in the kernel it is not updating. I have partitioned the emmc into 7.
Partition1 - Nil(EXT4)
Partition2 - Bootpartiton 1 (EXT4)
Partition3 - Bootpartiton 2(EXT4)
Partition4 - Filesystem 1(EXT4)
Partition5 - Filesystem 2 (EXT4)
Partition6 - Nil (EXT4)
Partition7 - Userpartiton (EXT4)

I have tried uboot environment with changes in the fw_config file. While updating the selected_slot changes it is applying in uboot but while doing the same process in kernel it is taking the default environment.

root@localhost:~# fw_setenv selected_slot 1
Warning: Bad CRC, using default environment
 

Can you please provide the steps for building the images, flashing steps, and partitioning steps?

0 件の賞賛
返信
3 返答(返信)

2,251件の閲覧回数
khushbur
NXP TechSupport
NXP TechSupport

Hi @harisankar2001 

 

Please execute the following operations under u-boot.

=> env default -a
## Resetting to default environment
=> saveenv
Saving Environment to MMC... Writing to MMC(0)... OK

=> reset

Please share your boot logs for more debugging.

 

Thanks

Khushbu

 

 

0 件の賞賛
返信

2,236件の閲覧回数
harisankar2001
Contributor I

Hi @khushbur, Thanks for the reply

Let me explain my issues in detail. My requirement is to implement a multi-boot option with a flag in the u-boot environment on LA1224RDB using SDK 2.2. I have added a new environmental variable named selected_slot=1 in the file include/configs/lx2160a_common.h in the u-boot source code. i am able to change this variable from u-boot, but I need to change this variable from linux user space. So I enabled the file in tools/env/fw_env.config to save the u-boot environment variables, as below.

 

#cat /etc/fw_env.config

 

# Configuration file for fw_(printenv/setenv) utility.

# Up to two entries are valid, in this case the redundant

# environment sector is assumed present.

# Notice, that the "Number of sectors" is not required on NOR and SPI-dataflash.

# Futhermore, if the Flash sector size is omitted, this value is assumed to

# be the same as the Environment size, which is valid for NOR and SPI-dataflash

# Device offset must be prefixed with 0x to be parsed as a hexadecimal value.

 

# NOR example

# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors

#/dev/mtd1              0x0000          0x4000          0x4000

#/dev/mtd2              0x0000          0x4000          0x4000

 

# MTD SPI-dataflash example

# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors

#/dev/mtd5              0x4200          0x4200

#/dev/mtd6              0x4200          0x4200

 

# NAND example

#/dev/mtd0              0x4000          0x4000          0x20000                 2

 

# On a block device a negative offset is treated as a backwards offset from the

# end of the device/partition, rather than a forwards offset from the start.

 

# Block device example

/dev/mmcblk1            0x500000        0x2000

/dev/mmcblk1            0x500000        0x2000

 

# VFAT example

#/uboot.env     0x0000          0x4000

 

# UBI volume

#/dev/ubi0_0            0x0             0x1f000         0x1f000

#/dev/ubi0_1            0x0             0x1f000         0x1f000

 

# UBI volume by name

#/dev/ubi0:env          0x0             0x1f000         0x1f000

#/dev/ubi0:env-redund   0x0             0x1f000         0x1f000

 

Issues:

  1. When I try to see environment variables, with fw_printenv it always shows default values even if I changed the value like selected_slot=2 in u-boot.
  2. When I try to change this value with fw_setenv as selected_slot=3 it always throws Bad CRC ….., it is not getting reflected in u-boot.

 

Changes in kernel and u-boot:

 

In include/configs/lx2160a_common.h,

#define CONFIG_SYS_MMC_ENV_DEV          0 —-> 1

 

In configs/la1224rdb_tfa_defconfig

CONFIG_ENV_IS_NOWHERE=y —----> n

CONFIG_ENV_IS_IN_MMC=y

0 件の賞賛
返信

2,208件の閲覧回数
khushbur
NXP TechSupport
NXP TechSupport

Hi @harisankar2001 

 

Can you please try to replace /dev/mmcblk1  to mmcblk1boot0.

Please make sure that Device offset  and  Env. size are defined as per your uboot configuration.

 

Thanks

Khushbu

0 件の賞賛
返信