u-boot not working with multiple partitions on SD Card

285 views
Skip to first unread message

Ashutosh Naik

unread,
Jun 5, 2020, 11:29:33 PM6/5/20
to BeagleBoard
Hi,

I created 2 exact partitions with the same kernel, and rootfs, which I built as per eee wiki for beaglebone black. I am currently unable to move to the second partition.

Here is my partition layout:
root@arm:/home/ubuntu# fdisk -l
Disk /dev/mmcblk0: 7.22 GiB, 7744782336 bytes, 15126528 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xfb2889fe

Device         Boot   Start      End Sectors  Size Id Type
/dev/mmcblk0p1         8192  7462912 7454721  3.6G 83 Linux
/dev/mmcblk0p2      7462913 15126527 7663615  3.7G 83 Linux


Disk /dev/mmcblk1: 3.58 GiB, 3825205248 bytes, 7471104 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x9c2c8b97

Device         Boot Start     End Sectors  Size Id Type
/dev/mmcblk1p1 *     8192 7471103 7462912  3.6G 83 Linux


In the above,  /dev/mmcblk0p1 and  /dev/mmcblk0p2 are the ones that are created by me.

However, when I tried to move to the 2nd partition in u-boot command-line I could not : It failed with an ERROR. 

  => mmc dev 0 0
switch to partitions #0, OK
mmc0 is current device
=> mmc dev 0 1
switch to partitions #1, ERROR
=> mmc list
OMAP SD/MMC: 0 (SD)
OMAP SD/MMC: 1 (eMMC)
=> mmc part 

  Partition Map for MMC device 0  --   Partition Type: DOS
Part    Start Sector    Num Sectors     UUID            Type
  1     8192            7454721         fb2889fe-01     83
  2     7462913         7663615         fb2889fe-02     83
=> mmc dev 0 1
switch to partitions #1, ERROR
=>  

 It's important to note that I can view both partitions with ext2ls ; its just that u-boot is unable to recognise the second one. 

=> ext2ls mmc 0:1 /

<DIR>       4096 .

<DIR>       4096 ..

<DIR>      16384 lost+found

<DIR>       4096 opt

       906035200 armhf-rootfs-ubuntu-focal.tar

<DIR>       4096 var

<DIR>       4096 bin

<DIR>       4096 boot

<DIR>       4096 dev

<DIR>       4096 tmp

<DIR>       4096 root

<DIR>       4096 mnt

<DIR>       4096 proc

<DIR>       4096 lib

<DIR>       4096 srv

<DIR>       4096 sbin

<DIR>       4096 usr

<DIR>       4096 sys

<DIR>       4096 home

<DIR>       4096 etc

<DIR>       4096 media

<DIR>       4096 run

=> ext2ls mmc 0:2 /

<DIR>       4096 .

<DIR>       4096 ..

<DIR>      16384 lost+found

<DIR>       4096 opt

<DIR>       4096 var

<DIR>       4096 bin

<DIR>       4096 boot

<DIR>       4096 dev

<DIR>       4096 tmp

<DIR>       4096 root

<DIR>       4096 mnt

<DIR>       4096 proc

<DIR>       4096 lib

<DIR>       4096 srv

<DIR>       4096 sbin

<DIR>       4096 usr

<DIR>       4096 sys

<DIR>       4096 home

<DIR>       4096 etc

<DIR>       4096 media

<DIR>       4096 run


U-Boot 2019.04-00002-g07d5700e21 (Mar 06 2020 - 11:24:55 -0600), Build: jenkins-github_Bootloader-Builder-137

arm-linux-gnueabihf-gcc (Linaro GCC 6.5-2018.12) 6.5.0
GNU ld (Linaro_Binutils-2018.12) 2.27.0.20161229


Let me know what I am missing

Regards
Ashutosh
Reply all
Reply to author
Forward
0 new messages