[U-Boot] MTD partitions not set on default environment
Arek Marud
a.marud at post.pl
Tue Feb 14 10:40:23 UTC 2017
Hi,
I'm trying to build a u-boot binary containing default configuration.
I created my configuration include file:
```
#define MTDIDS_DEFAULT "nand0=nand_flash"
#define MTDPARTS_DEFAULT "mtdparts=nand_flash:256k(bootstrap)ro,512k(uboot)ro,256k(env1),256k(env2),-(sys)"
#define CONFIG_BOOTARGS "ubi.mtd=4 root=ubi0:root1 rootfstype=ubifs console=ttyS0,115200 earlyprintk mtdparts=atmel_nand:256k(bootstrap)ro,512k(uboot)ro,256k(env1),256k(env2),-(sys)"
#define CONFIG_BOOTCOMMAND "ubi part sys;ubi read 0x22000000 kernel1;bootm 0x22000000#conf at 1"
```
```
=> mtdparts
mtdparts variable not set, see 'help mtdparts'
no partitions defined
defaults:
mtdids : nand0=nand_flash
mtdparts: mtdparts=nand_flash:256k(bootstrap)ro,512k(uboot)ro,256k(env1),256k(env2),-(sys)
=> env print
arch=arm
baudrate=115200
board=sama5d3_xplained
board_name=sama5d3_xplained
bootargs=ubi.mtd=4 root=ubi0:root1 rootfstype=ubifs console=ttyS0,115200 earlyprintk mtdparts=atmel_nand:256k(bootstrap)ro,512k(uboot)ro,256k(env1),256k(env2),-(sys)
bootcmd=ubi part sys;ubi read 0x22000000 kernel1;bootm 0x22000000#conf at 1
bootdelay=3
cpu=armv7
mtdids=nand0=nand_flash
soc=at91
vendor=atmel
Environment size: 406/131067 bytes
=> mtdparts default
=> mtdparts
device nand0 <nand_flash>, # parts = 5
#: name size offset mask_flags
0: bootstrap 0x00040000 0x00000000 1
1: uboot 0x00080000 0x00040000 1
2: env1 0x00040000 0x000c0000 0
3: env2 0x00040000 0x00100000 0
4: sys 0x0fec0000 0x00140000 0
active partition: nand0,0 - (bootstrap) 0x00040000 @ 0x00000000
defaults:
mtdids : nand0=nand_flash
mtdparts: mtdparts=nand_flash:256k(bootstrap)ro,512k(uboot)ro,256k(env1),256k(env2),-(sys)
=> env print
arch=arm
baudrate=115200
board=sama5d3_xplained
board_name=sama5d3_xplained
bootargs=ubi.mtd=4 root=ubi0:root1 rootfstype=ubifs console=ttyS0,115200 earlyprintk mtdparts=atmel_nand:256k(bootstrap)ro,512k(uboot)ro,256k(env1),256k(env2),-(sys)
bootcmd=ubi part sys;ubi read 0x22000000 kernel1;bootm 0x22000000#conf at 1
bootdelay=3
cpu=armv7
mtddevname=bootstrap
mtddevnum=0
mtdids=nand0=nand_flash
mtdparts=mtdparts=nand_flash:256k(bootstrap)ro,512k(uboot)ro,256k(env1),256k(env2),-(sys)
partition=nand0,0
soc=at91
vendor=atmel
Environment size: 555/131067 bytes
```
As you see, MTD partitions are visible as defaults. But not active.
I could modify my bootcommand, and add "mtdparts default;", but maybe I
am missing something.
So, my question is:
How can I activate MTD partitions on default environment.
Thank you,
Arek Marud
PS. I'm using Atmel's u-boot forked repository.
More information about the U-Boot
mailing list