After resizing of mmc partition openwrt does not start with u-boot

I resized partitionning of mmc card which countains openwrt and openwrt does not start using u-boot

Before on mmc i had 2 partition (1 with image and .dtb and 1 one with openwrt filesystem) and everything was fine while starting openwrt

Now i have only one partition which takes all mmc flash size (16G)

I've below error while starting :

Marvell>> run bootcmd
** File not found boot.scr **
## Executing script at 04d00000
switch to partitions #0, OK
mmc0 is current device
** File not found armada-3720-espressobin-v7.dtb **
** File not found Image **
## Flattened Device Tree from Legacy Image at 04d00000
   Image Name:
   Image Type:   ARM Linux Script (uncompressed)
   Data Size:    361 Bytes = 361 Bytes
   Load Address: 00000000
   Entry Point:  00000000
   Contents:
      Image 0: 353 Bytes = 353 Bytes
   Verifying Checksum ... OK
ERROR: uImage is not a fdt - must RESET the board to recover.
Could not find a valid device tree
Marvell>>

How to solve this error ?

This is my env :

Marvell>> printenv
baudrate=115200
bootargs=root=PARTUUID=15623465-02 rw rootwait console=ttyMV0,115200 earlycon=ar3700_uart,0xd0012000
bootcmd=load mmc 0:1 0x4d00000 boot.scr; source 0x4d00000
bootdelay=2
bootmmc=mmc dev 0; ext4load mmc 0:1 $kernel_addr $image_name;ext4load mmc 0:1 $fdt_addr $fdt_name;setenv bootargs $console root=/dev/mmcblk0p1 rw rootwait; booti $kernel_addr - $fdt_addr
console=console=ttyMV0,115200 earlycon=ar3700_uart,0xd0012000
eth1addr=00:51:82:11:22:01
eth2addr=00:51:82:11:22:02
eth3addr=00:51:82:11:22:03
ethact=neta@30000
ethaddr=F0:AD:4E:09:6A:59
ethprime=eth0
fdt_addr=0x4d00000
fdt_high=0xffffffffffffffff
fdt_name=boot/armada-3720-espressobin-v7.dtb
fdtcontroladdr=7f7161b8
fileaddr=4d00000
filesize=1a9
gatewayip=10.4.50.254
get_images=tftpboot $kernel_addr $image_name; tftpboot $fdt_addr $fdt_name; run get_ramfs
get_ramfs=if test "${ramfs_name}" != "-"; then setenv ramfs_addr 0x8000000; tftpboot $ramfs_addr $ramfs_name; else setenv ramfs_addr -;fi
hostname=marvell
image_name=boot/Image
initrd_addr=0xa00000
initrd_size=0x2000000
ipaddr=0.0.0.0
kernel_addr=0x5000000
loadaddr=0x5000000
mmcdev=0
netdev=eth0
netmask=255.255.255.0
ramfs_addr=0x8000000
ramfs_name=-
root=root=/dev/nfs rw
rootpath=/srv/nfs/
serverip=0.0.0.0
set_bootargs=setenv bootargs $console
stderr=serial@12000
stdin=serial@12000
stdout=serial@12000

Environment size: 1425/65532 bytes

Also i can see ext4fs from u-boot :

Marvell>> ext4ls mmc 0:1
<DIR>       4096 .
<DIR>       4096 ..
<DIR>      16384 lost+found
<DIR>       4096 boot
<DIR>       4096 bin
<DIR>       4096 dev
<DIR>       4096 etc
<DIR>       4096 lib
<SYM>          3 lib64
<DIR>       4096 mnt
<DIR>       4096 overlay
<DIR>       4096 proc
<DIR>       4096 rom
<DIR>       4096 root
<DIR>       4096 sbin
<DIR>       4096 sys
<DIR>       4096 tmp
<DIR>       4096 usr
<SYM>          3 var
<DIR>       4096 www
Marvell>>

So what's wrong in my config ? :upside_down_face:

  1. resizing and combining into a single partition are two very different things. any reason why you have to do this?

  2. what is failing is inside boot.scr which i can't see from here....

so in fact i followed a procedure for my espressobin which countains openwrt,

http://wiki.espressobin.net/tiki-index.php?page=Boot+from+removable+storage+-+OpenWrt#OpenWrt_18.06

Look at chapter : ## Creating bootable MicroSD card/USB device

they explain a procedure with a single partition that's why i did like this

About fail inside boot.scr what could be wrong ?

Just discovered that my problem is because of squashfs file system that can be extended as a ext4 file system

sudo blkid (for the non resized partition ok partition)

/dev/mmcblk0p1: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4" PARTUUID="15623465-01"
/dev/mmcblk0p2: TYPE="squashfs" PARTUUID="15623465-02"
/dev/mmcblk0: PTUUID="15623465" PTTYPE="dos"

sudo blkid (for the resized partition)
/dev/mmcblk0p1: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4" PARTUUID="918d00d4-01"
/dev/mmcblk0p2: LABEL="disk" UUID="98fe913a-1eee-460d-8a0a-ca697fc8c511" TYPE="ext4" PARTUUID="918d00d4-02"
/dev/mmcblk0: PTUUID="918d00d4" PTTYPE="dos"

But i still don't know how to extend the squashfs partition ? Is it the right partition to extend ? the other partition is the one for booting ...

@keys13790, welcome to the community!

Are you saying that you enlarged a squashfs partition?

I don't suggest that.

In fact I wanted to enlarge the full file system because I will install some more packages and need a larger home directory. Do you see alternative to avoid the enlarging of squashfs ?

surprised your not working with ext4 or a bigger drive.

Yes i can let the squashfs partition and create another ext4 filesystem with remaining free space on mmc, but i encounter trouble with UUID by doing this :grimacing:

In fact once creating the ext4 file gparted tool changed naming of UUID for partition squashfs, then also now with this change openwrt does not start

Please find u-boot printenv & trace of fail boot

and the error message "Waiting for root device PARTUUID=15623465-02..."

But i found no way to change UUID after (naming of 15623465-01 is not allowed for ext4 fs) , also after modification of boot args with new uid now way.

any idea's on how to solve this problem of boot ? :grinning:

Marvell>> printenv
baudrate=115200
bootargs=root=PARTUUID=15623465-02 rw rootwait console=ttyMV0,115200 earlycon=ar3700_uart,0xd0012000
bootcmd=load mmc 0:1 0x4d00000 boot.scr; source 0x4d00000
bootdelay=2
bootmmc=mmc dev 0; ext4load mmc 0:1 $kernel_addr $image_name;ext4load mmc 0:1 $fdt_addr $fdt_name;setenv bootargs $console root=/dev/mmcblk0p1 rw rootwait; booti $kernel_addr - $fdt_addr
console=console=ttyMV0,115200 earlycon=ar3700_uart,0xd0012000
eth1addr=00:51:82:11:22:01
eth2addr=00:51:82:11:22:02
eth3addr=00:51:82:11:22:03
ethact=neta@30000
ethaddr=F0:AD:4E:09:6A:59
ethprime=eth0
fdt_addr=0x4d00000
fdt_high=0xffffffffffffffff
fdt_name=boot/armada-3720-espressobin-v7.dtb
fdtcontroladdr=7f7161b8
fileaddr=4d00000
filesize=1a9
gatewayip=10.4.50.254
get_images=tftpboot $kernel_addr $image_name; tftpboot $fdt_addr $fdt_name; run get_ramfs
get_ramfs=if test "${ramfs_name}" != "-"; then setenv ramfs_addr 0x8000000; tftpboot $ramfs_addr $ramfs_name; else setenv ramfs_addr -;fi
hostname=marvell
image_name=boot/Image
initrd_addr=0xa00000
initrd_size=0x2000000
ipaddr=0.0.0.0
kernel_addr=0x5000000
loadaddr=0x5000000
mmcdev=0
netdev=eth0
netmask=255.255.255.0
ramfs_addr=0x8000000
ramfs_name=-
root=root=/dev/nfs rw
rootpath=/srv/nfs/
serverip=0.0.0.0
set_bootargs=setenv bootargs $console
stderr=serial@12000
stdin=serial@12000
stdout=serial@12000

Environment size: 1425/65532 bytes
Marvell>> reset
resetting ...
TIM-1.0
WTMI-armada-17.10.5-bb8f823
WTMI: system early-init
SVC REV: 5, CPU VDD voltage: 1.155V

Fill memory before self refresh...done

Fill memory before self refresh...done

Now in Self-refresh Mode
Exited self-refresh ...


Self refresh Pass.
DDR self test mode test done!!

Self refresh Pass.
DDR self test mode test done!!
Vref read training
===================
Final vdac_value 0x0000001F

Vref write training
===================
Final vref_value 0x00000023

DLL TUNING
==============
   DLL 0xc0001050[21:16]: [5,31,1b]
   DLL 0xc0001050[29:24]: [4,2f,19]
   DLL 0xc0001054[21:16]: [c,2d,1c]
   DLL 0xc0001054[29:24]: [d,2c,1c]
   DLL 0xc0001074[21:16]: [0,3f,1f]
   DLL 0xc0001074NOTICE:  Booting Trusted Firmware
NOTICE:  BL1: v1.3(release):armada-17.10.3:39a62a1
NOTICE:  BL1: Built : 15:40:47, Jun  1 2NOTICE:  BL2: v1.3(release):armada-17.10.3:39a62a1
NOTICE:  BL2: Built : 15:40:48, Jun  1 201NOTICE:  BL31: v1.3(release):armada-17.10.3:39a62a1
NOTICE:  BL31:

U-Boot 2017.03-armada-17.10.2-g14aeedc (Jun 01 2018 - 15:39:10 +0800)

Model: Marvell Armada 3720 Community Board ESPRESSOBin
       CPU    @ 1000 [MHz]
       L2     @ 800 [MHz]
       TClock @ 200 [MHz]
       DDR    @ 800 [MHz]
DRAM:  2 GiB
U-Boot DT blob at : 000000007f7161b8
Comphy-0: USB3          5 Gbps
Comphy-1: PEX0          2.5 Gbps
Comphy-2: SATA0         6 Gbps
SATA link 0 timeout.
AHCI 0001.0300 32 slots 1 ports 6 Gbps 0x1 impl SATA mode
flags: ncq led only pmp fbss pio slum part sxs
PCIE-0: Link down
MMC:   sdhci@d0000: 0, sdhci@d8000: 1
SF: Detected mx25u3235f with page size 256 Bytes, erase size 64 KiB, total 4 MiB
Net:   eth0: neta@30000 [PRIME]
Hit any key to stop autoboot:  0
425 bytes read in 14 ms (29.3 KiB/s)
## Executing script at 04d00000
switch to partitions #0, OK
mmc0 is current device
8892 bytes read in 10 ms (868.2 KiB/s)
9068552 bytes read in 389 ms (22.2 MiB/s)
## Flattened Device Tree blob at 04d00000
   Booting using the fdt blob at 0x4d00000
   Using Device Tree in place at 0000000004d00000, end 0000000004d052bb

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 4.19.56 (builder@buildhost) (gcc version 7.4.0 (OpenWrt GCC 7.4.0 r10401-63e3c3d2a2)) #0 SMP Fri Jul 5 17:08:46 2019
[    0.000000] Machine model: Globalscale Marvell ESPRESSOBin Board V7
[    0.000000] earlycon: ar3700_uart0 at MMIO 0x00000000d0012000 (options '')
[    0.000000] bootconsole [ar3700_uart0] enabled
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.0 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] psci: SMC Calling Convention v1.0
[    0.000000] random: get_random_bytes called from start_kernel+0x80/0x45c with crng_init=0
[    0.000000] percpu: Embedded 17 pages/cpu s30616 r8192 d30824 u69632
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: detected: Kernel page table isolation (KPTI)
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 515584
[    0.000000] Kernel command line: root=PARTUUID=15623465-02 rw rootwait console=ttyMV0,115200 earlycon=ar3700_uart,0xd0012000
[    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
[    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.000000] Memory: 2049760K/2095104K available (6398K kernel code, 408K rwdata, 1688K rodata, 320K init, 277K bss, 45344K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu:     CONFIG_RCU_FANOUT set to non-default value of 32.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GICv3: GIC: Using split EOI/Deactivate mode
[    0.000000] GICv3: Distributor has no Range Selector support
[    0.000000] GICv3: no VLPI support, no direct LPI support
[    0.000000] GICv3: CPU0: found redistributor 0 region 0:0x00000000d1d40000
[    0.000000] arch_timer: cp15 timer(s) running at 12.50MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x2e2049cda, max_idle_ns: 440795202628 ns
[    0.000004] sched_clock: 56 bits at 12MHz, resolution 80ns, wraps every 4398046511080ns
[    0.008354] Calibrating delay loop (skipped), value calculated using timer frequency.. 25.00 BogoMIPS (lpj=125000)
[    0.018946] pid_max: default: 32768 minimum: 301
[    0.023794] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.030633] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.039044] ASID allocator initialised with 32768 entries
[    0.044625] rcu: Hierarchical SRCU implementation.
[    0.049922] smp: Bringing up secondary CPUs ...
[    0.054875] Detected VIPT I-cache on CPU1
[    0.054906] GICv3: CPU1: found redistributor 1 region 0:0x00000000d1d60000
[    0.054938] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[    0.055026] smp: Brought up 1 node, 2 CPUs
[    0.077084] SMP: Total of 2 processors activated.
[    0.081918] CPU features: detected: GIC system register CPU interface
[    0.088552] CPU features: detected: 32-bit EL0 Support
[    0.095979] CPU features: emulated: Privileged Access Never (PAN) using TTBR0_EL1 switching
[    0.104510] CPU: All CPU(s) started at EL2
[    0.108719] alternatives: patching kernel code
[    0.115374] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.125463] futex hash table entries: 512 (order: 3, 32768 bytes)
[    0.131833] pinctrl core: initialized pinctrl subsystem
[    0.137913] NET: Registered protocol family 16
[    0.143289] cpuidle: using governor ladder
[    0.147599] vdso: 2 pages (1 code @ (____ptrval____), 1 data @ (____ptrval____))
[    0.155325] DMA: preallocated 256 KiB pool for atomic allocations
[    0.172001] cryptd: max_cpu_qlen set to 1000
[    0.177150] SCSI subsystem initialized
[    0.181348] usbcore: registered new interface driver usbfs
[    0.187043] usbcore: registered new interface driver hub
[    0.192483] usbcore: registered new device driver usb
[    0.198873] clocksource: Switched to clocksource arch_sys_counter
[    0.205807] NET: Registered protocol family 2
[    0.210764] tcp_listen_portaddr_hash hash table entries: 1024 (order: 2, 16384 bytes)
[    0.218781] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[    0.226470] TCP bind hash table entries: 16384 (order: 6, 262144 bytes)
[    0.233462] TCP: Hash tables configured (established 16384 bind 16384)
[    0.240281] UDP hash table entries: 1024 (order: 3, 32768 bytes)
[    0.246429] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes)
[    0.253237] NET: Registered protocol family 1
[    0.258586] Crashlog allocated RAM at address 0x3f00000
[    0.264689] workingset: timestamp_bits=46 max_order=19 bucket_order=0
[    0.275011] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.281033] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.293635] io scheduler noop registered
[    0.297595] io scheduler deadline registered (default)
[    0.305684] advk-pcie d0070000.pcie: host bridge /soc/pcie@d0070000 ranges:
[    0.312877] advk-pcie d0070000.pcie:   MEM 0xe8000000..0xe8ffffff -> 0xe8000000
[    0.320339] advk-pcie d0070000.pcie:    IO 0xe9000000..0xe900ffff -> 0xe9000000
[    1.318861] advk-pcie d0070000.pcie: link never came up
[    1.324319] advk-pcie d0070000.pcie: PCI host bridge to bus 0000:00
[    1.330714] pci_bus 0000:00: root bus resource [bus 00-ff]
[    1.336338] pci_bus 0000:00: root bus resource [mem 0xe8000000-0xe8ffffff]
[    1.343425] pci_bus 0000:00: root bus resource [io  0x0000-0xffff] (bus address [0xe9000000-0xe900ffff])
[    2.784831] advk-pcie d0070000.pcie: Posted PIO Response Status: CA, 0xe00 @ 0x0
[    2.794359] mv_xor d0060900.xor: Marvell shared XOR driver
[    2.859401] mv_xor d0060900.xor: Marvell XOR (Descriptor Mode): ( xor cpy intr )
[    2.929403] mv_xor d0060900.xor: Marvell XOR (Descriptor Mode): ( xor cpy intr )
[    2.937237] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    2.945071] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    2.954240] loop: module loaded
[    2.957928] ahci-mvebu d00e0000.sata: AHCI 0001.0300 32 slots 1 ports 6 Gbps 0x1 impl platform mode
[    2.967209] ahci-mvebu d00e0000.sata: flags: ncq sntf led only pmp fbs pio slum part sxs
[    2.976323] scsi host0: ahci-mvebu
[    2.980004] ata1: SATA max UDMA/133 mmio [mem 0xd00e0000-0xd00e1fff] port 0x100 irq 21
[    2.989576] m25p80 spi0.0: mx25u3235f (4096 Kbytes)
[    2.995636] libphy: Fixed MDIO Bus: probed
[    3.000336] libphy: orion_mdio_bus: probed
[    3.005067] mv88e6085 d0032004.mdio-mii:01: switch 0x3410 detected: Marvell 88E6341, revision 0
[    3.025905] libphy: mdio: probed
[    3.043298] mvneta d0030000.ethernet eth0: Using device tree mac address f0:ad:4e:09:6a:59
[    3.052042] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    3.058688] ehci-pci: EHCI PCI platform driver
[    3.063324] ehci-platform: EHCI generic platform driver
[    3.068718] ehci-orion: EHCI orion driver
[    3.072924] orion-ehci d005e000.usb: EHCI Host Controller
[    3.078418] orion-ehci d005e000.usb: new USB bus registered, assigned bus number 1
[    3.086313] orion-ehci d005e000.usb: irq 13, io mem 0xd005e000
[    3.118870] orion-ehci d005e000.usb: USB 2.0 started, EHCI 1.00
[    3.125293] hub 1-0:1.0: USB hub found
[    3.129189] hub 1-0:1.0: 1 port detected
[    3.133853] xhci-hcd d0058000.usb: xHCI Host Controller
[    3.139212] xhci-hcd d0058000.usb: new USB bus registered, assigned bus number 2
[    3.146892] xhci-hcd d0058000.usb: hcc params 0x0a000998 hci version 0x100 quirks 0x0000000000010010
[    3.156283] xhci-hcd d0058000.usb: irq 12, io mem 0xd0058000
[    3.162598] hub 2-0:1.0: USB hub found
[    3.166396] hub 2-0:1.0: 1 port detected
[    3.170636] xhci-hcd d0058000.usb: xHCI Host Controller
[    3.175942] xhci-hcd d0058000.usb: new USB bus registered, assigned bus number 3
[    3.183580] xhci-hcd d0058000.usb: Host supports USB 3.0 SuperSpeed
[    3.190073] usb usb3: We don't know the algorithms for LPM for this host, disabling LPM.
[    3.198659] hub 3-0:1.0: USB hub found
[    3.202476] hub 3-0:1.0: 1 port detected
[    3.206865] usbcore: registered new interface driver usb-storage
[    3.213197] i2c /dev entries driver
[    3.217237] sdhci: Secure Digital Host Controller Interface driver
[    3.223548] sdhci: Copyright(c) Pierre Ossman
[    3.228095] sdhci-pltfm: SDHCI platform and OF driver helper
[    3.234146] xenon-sdhci d00d0000.sdhci: Got CD GPIO
[    3.240142] NET: Registered protocol family 10
[    3.245508] Segment Routing with IPv6
[    3.249304] NET: Registered protocol family 17
[    3.253838] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    3.267425] 8021q: 802.1Q VLAN Support v1.8
[    3.274266] d0012000.serial: ttyMV0 at MMIO 0xd0012000 (irq = 0, base_baud = 1562500) is a mvebu-uart
[    3.283742] console [ttyMV0] enabled
[    3.283742] console [ttyMV0] enabled
[    3.291046] bootconsole [ar3700_uart0] disabled
[    3.291046] bootconsole [ar3700_uart0] disabled
[    3.301221] mv88e6085 d0032004.mdio-mii:01: switch 0x3410 detected: Marvell 88E6341, revision 0
[    3.319272] libphy: mdio: probed
[    3.320112] ata1: SATA link down (SStatus 0 SControl 300)
[    4.050820] mv88e6085 d0032004.mdio-mii:01 lan1 (uninitialized): PHY [!soc!internal-regs@d0000000!mdio@32004!switch0@1!mdio:11] driver [Marvell 88E6390]
[    4.160824] mv88e6085 d0032004.mdio-mii:01 lan0 (uninitialized): PHY [!soc!internal-regs@d0000000!mdio@32004!switch0@1!mdio:12] driver [Marvell 88E6390]
[    4.270821] mv88e6085 d0032004.mdio-mii:01 wan (uninitialized): PHY [!soc!internal-regs@d0000000!mdio@32004!switch0@1!mdio:13] driver [Marvell 88E6390]
[    4.284852] DSA: tree 0 setup
[    4.285523] xenon-sdhci d00d0000.sdhci: Got CD GPIO
[    4.290255] xenon-sdhci d00d0000.sdhci: Linked as a consumer to regulator.1
[    4.328415] mmc0: SDHCI controller on d00d0000.sdhci [d00d0000.sdhci] using ADMA
[    4.333644] hctosys: unable to open rtc de[    4.340916] Waiting for root device PARTUUID=15623465-02...
[    4.417313] xenon-sdhci d00d0000.sdhci: Timing issue might occur in DDR mode
[    4.421898] mmc0: new ultra high speed DDR50 SDHC card at address aaaa
[    4.430953] mmcblk0: mmc0:aaaa SL08G 7.40 GiB
[    4.434807]  mmcblk0: p1 p2


is a derived from the disk identifier which can be assigned via fdisk et. al.

UUID is different to partUUID.... your uboot is not using UUID....

either make sure they your disk matches the uboot ( PARTUUID! ) value or make sure uboot matches your diskidentifier-partnum ( PARTUUID )

Thanks, i did and found no way, because the format of UUID : 15623465-02 is not standard for ext4 and refused once requested change with gparted, and tried to align bootarg of u-boot :

bootargs=root=PARTUUID= rw rootwait console=ttyMV0,115200 earlycon=ar3700_uart,0xd0012000

and u-boot is still searching for UUID : 15623465-02 even after the change inside bootargs

i guess UUID is hardcoded somewhere inside squashfs partition ?
or i'm wrong, the UUID must be changed somewhere else than inside bootargs inside ENV of u-boot ?

#!/bin/sh
#ONABLANKMMC CHANGE sdX to your actual DEVICE 
#THELINEBELOWFROMTHEGUIDEYOULINKED
#(echo n; echo p; echo 1; echo ''; echo ''; echo w) | sudo fdisk /dev/sdX
PTUUID="15623465"
DEVICE="/dev/sdz"
(echo p; echo x; echo i; echo 0x${PTUUID}; echo r; echo w) | sudo fdisk $DEVICE

I need to create this script right ?

i'm showing you where in the process that the PARTUUID is carved...

and how it can be carved otherwise.....

only create and run the script if you think you know what it is doing..... otherwise..... you are best running those commands manually ( within fdisk )

this way you learn what is really happening and when.....

Trace using fdisk, so this confirm i can't change with fdisk or gparted PARTUUID while it's a squasfs partition. Did you tried on your side using squashfs partition ?

sudo fdisk /dev/mmcblk0p2

Welcome to fdisk (util-linux 2.27.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk /dev/mmcblk0p2: 128,3 MiB, 134479872 bytes, 262656 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: 0x9112ed72

Command (m for help): x

Expert command (m for help): i

Enter the new disk identifier: 15623465-02
Incorrect value.

0x15623465

start with 0x the 02 is automatic.... the partition number...

you dont run fdisk on partitions ( 99.99% of the time ) .... you run it on disks

fdisk /dev/mmcblk0

good to see you are making progress.

1 Like

it does not changed PARTUUID but PTUUID
Also the 2nd part of your script does not work ?

We are close i think
:slightly_smiling_face:

blkid

/dev/mmcblk0p1: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4" PARTUUID="31cbcbbc-01"
/dev/mmcblk0p2: PTUUID="15623465" PTTYPE="dos" PARTUUID="31cbcbbc-02"
/dev/mmcblk0p3: UUID="b868a8f8-090e-4afc-b2d3-3e00444f4b61" TYPE="ext4" PARTUUID="31cbcbbc-03"

The PARTUUID is in the GPT partition table so it’s needed a partitioning program that can handle GPT. For example I found gdisk has this option hidden in its expert menu.

So in fact at the end i was not able to use mmc because not able to rename PARTUUID, i inserted an usb key then created a new file file system on it, so now i've more free space but not using mmc. I suspect somethink which is linked to squashfs for the mmc problem.

As mentioned the issue is your uboot is failing whilst trying to find boot.scr on partition 1 of the first (0) mmc device..... as defined in the bootcmd.

Your bootenv does not execute your mmcbootcmd>bootmmc... it expects boot.scr
on mmc 0:1

( NOTE: You don't need the mangled console on the end cause its already passed as the variable $console )

You could manually try the right command without boot.scr by
entering

setenv bootcmd bootmmc
run bootcmd

Otherwise...

####################### boot.cmd
echo "run bootmmc" > boot.cmd
####################### convert boot.cmd into boot.scr
mkimage -C none -A arm -T script -d boot.cmd boot.scr
###################### copy to partition 1 on mmc
cp boot.scr /mnt/mmcmountedpartion1/

to make a boot.scr which runs the right bootcmd ( bootmmc )

if you look closely at the bootmmc command ( which i assume you have? ) you'll see that the bootargs that contain the PARTUUID rootfs partiion cmdline are not used....

In any event using a larger disk and not messing with openwrt default layouts is a much preferred option!

1 Like

OK so to summarize :

  1. I've to active bootmmc
  2. Remove console at the end of bootmmc command
  3. Modify bootmmc (see my proposal below)

Because my partionning is :

/dev/mmcblk0p1: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4" PARTUUID="31cbcbbc-01"

=> boot.scr is located in / of this partition

/dev/mmcblk0p2: PTUUID="15623465" PTTYPE="dos" PARTUUID="31cbcbbc-02"

=> this is the squash fs partition with filesystem & overlay

/dev/mmcblk0p3: UUID="b868a8f8-090e-4afc-b2d3-3e00444f4b61" TYPE="ext4" PARTUUID="31cbcbbc-03"

=> This is a new partition i created

Do you confirm config bootmmc should be ran like this :

bootmmc=mmc dev 0; ext4load mmc 0:1 $kernel_addr $image_name;ext4load mmc 0:2 $fdt_addr $fdt_name;setenv bootargs $console root=/dev/mmcblk0p1 rw rootwait; booti $kernel_addr - $fdt_addr

In fact i've doubt for ext4load mmc 0:1 & ext4load mmc 0:2 below ...also /dev/mmcblk0p2 is a squasfs partition and so i wonder if ext4load will work ? and for for console what do you i have to set : =/dev/mmcblk0p2 ?

and :

bootcmd bootmmc

it's unclear to me what modification to do about what you sayed : to make a boot.scr which runs the right bootcmd ( bootmmc ). You ask me to modify boot.scr ? why to modify it ?