Tool/software:
2 Questions:
1) using bdinfo from u-boot I can see the RAM space is 2 GB, the
=> bdinfo
boot_params = 0x0000000000000000
DRAM bank = 0x0000000000000000
-> start = 0x0000000080000000
-> size = 0x0000000080000000 2GB
flashstart = 0x0000000000000000
flashsize = 0x0000000000000000
flashoffset = 0x0000000000000000
baudrate = 115200 bps
relocaddr = 0x00000000ff616000
reloc off = 0x000000007ee16000
Build = 64-bit
current eth = ethernet@8000000port@1
ethaddr = 1c:63:49:22:50:97
IP addr = <NULL>
fdt_blob = 0x00000000fd5e7860
new_fdt = 0x00000000fd5e7860
fdt_size = 0x000000000000f520
Video = dss@30200000 inactive
multi_dtb_fit= 0x0000000000000000
lmb_dump_all:
memory.cnt = 0x1
memory[0] [0x80000000-0xffffffff], 0x80000000 bytes flags: 0 RSVD
reserved.cnt = 0x4
reserved[0] [0x9ca00000-0x9cafffff], 0x00100000 bytes flags: 0
reserved[1] [0x9cb00000-0x9e6fffff], 0x01c00000 bytes flags: 4
reserved[2] [0x9e780000-0x9fffffff], 0x01880000 bytes flags: 4
reserved[3] [0xfc5dc000-0xffffffff], 0x03a24000 bytes flags: 0
devicetree = separate
arch_number = 0x0000000000000000
TLB addr = 0x00000000ffff0000
irq_sp = 0x00000000fd5e6ff0
sp start = 0x00000000fd5e6ff0
Early malloc usage: 3c28 / 8000
=>
RAM LOAD ADDRESS
=> echo $loadaddr
0x82000000
=>
If we imply RAM available for image load starts at 0x8200 0000 and goes to 0x9ca0 0000 (begin of reserved space).
QUESTION 1) - This gives 448 MB for a tftp landing pad starting at ${loadaddr}. However I'm only able to get 174 MB images successfully onto the device.
(Perhaps there is a problem with the math util in u-boot... where I calculate the erase size for the file system partitions?)
blkcnt seems to overrun at greater than x5 700 blocks (512 bytes each) but this seems like an odd number. If I increase the size this incorrectly gets a block count of xB ???
This will truncate the flash space for the RFS needed (massively)
cmd_17=setexpr blkcnt ${filesize} + 0xfff && setexpr blkcnt ${blkcnt} / 200
cmd_18=echo "Block Count: -------"
cmd_19=echo " $blkcnt"
# u-boot will actually erase from 0x0 to x400 aligned blocks on this device.
# clean up needed space in both partitions
cmd_20=mmc erase 0x00000022 ${blkcnt}
cmd_21=mmc erase 0x003f8022 ${blkcnt}
QUESTION 2) - Sticking with something working for now - I have 174 MB image loaded. How do I increase it to the full space available so the file system can grow as it is used?
=> echo $loadaddr
0x82000000
=>
0x82000000
=> mmc part
Partition Map for MMC device 0 -- Partition Type: EFI
Part Start LBA End LBA Name
Attributes
Type GUID
Partition GUID
1 0x00000022 0x003f8021 "primary" ~ 2GB of flash space for primary partition
attrs: 0x0000000000000000
type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
guid: e7dbd504-c47a-493d-a1d4-aa34686b4b5b
2 0x003f8022 0x007f0021 "secondary" ~ 2GB of flash space for secondary partition (backup file system image)
attrs: 0x0000000000000000
type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
guid: 93e4c649-cb27-4c27-ab7f-eb65a9ec348c
=> ls mmc 0:1 /
<DIR> 4096 .
<DIR> 4096 ..
<DIR> 16384 lost+found
<DIR> 4096 bin
<DIR> 4096 boot
<DIR> 4096 dev
<DIR> 4096 etc
<DIR> 4096 home
<DIR> 4096 lib
<SYM> 19 linuxrc
<DIR> 4096 media
<DIR> 4096 mnt
<DIR> 4096 proc
<DIR> 4096 run
<DIR> 4096 sbin
<DIR> 4096 srv
<DIR> 4096 sys
<DIR> 4096 tmp
<DIR> 4096 usr
<DIR> 4096 var
=> ls mmc 0:2 /
<DIR> 4096 .
<DIR> 4096 ..
<DIR> 16384 lost+found
<DIR> 4096 bin
<DIR> 4096 boot
<DIR> 4096 dev
<DIR> 4096 etc
<DIR> 4096 home
<DIR> 4096 lib
<SYM> 19 linuxrc
<DIR> 4096 media
<DIR> 4096 mnt
<DIR> 4096 proc
<DIR> 4096 run
<DIR> 4096 sbin
<DIR> 4096 srv
<DIR> 4096 sys
<DIR> 4096 tmp
<DIR> 4096 usr
<DIR> 4096 var
=>
However in the booted system..
bootcmd=mmc dev 0 1;mmc read ${loadaddr} 0x3400 0x800; env import -t ${loadaddr} 0x800; run user_commands;
=>run bootcmd
Environment size: 11415/126972 bytes
=> run bootcmd
switch to partitions #1, OK
mmc0(part 1) is current device
MMC read: dev # 0, block # 13312, count 2048 ... 2048 blocks read: OK
Executing uEnv.txt.emmc command list
switch to partitions #0, OK
mmc0(part 0) is current device
Partition Map for MMC device 0 -- Partition Type: EFI
Part Start LBA End LBA Name
Attributes
Type GUID
Partition GUID
1 0x00000022 0x003f8021 "primary"
attrs: 0x0000000000000000
type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
guid: e7dbd504-c47a-493d-a1d4-aa34686b4b5b
2 0x003f8022 0x007f0021 "secondary"
attrs: 0x0000000000000000
type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
guid: 93e4c649-cb27-4c27-ab7f-eb65a9ec348c
<DIR> 4096 .
<DIR> 4096 ..
<DIR> 4096 EFI
<SYM> 37 Image
15442432 Image-6.1.80-rt26-ti-rt-g3c08dbfd7bfd
<DIR> 4096 dtb
<SYM> 40 fitImage
6599338 fitImage-6.1.80-rt26-ti-rt-g3c08dbfd7bfd
<DIR> 4096 .
<DIR> 4096 ..
<DIR> 4096 EFI
<SYM> 37 Image
15442432 Image-6.1.80-rt26-ti-rt-g3c08dbfd7bfd
<DIR> 4096 dtb
<SYM> 40 fitImage
6599338 fitImage-6.1.80-rt26-ti-rt-g3c08dbfd7bfd
Prepping to launch emmc image
bootargs=console=ttyS2,115200n8 root=PARTUUID=e7dbd504-c47a-493d-a1d4-aa34686b4b5b rw rootfstype=ext4 rootwait
## Error: "main_cpsw0_qsgmii_phyinit" not defined
15442432 bytes read in 101 ms (145.8 MiB/s)
59970 bytes read in 17 ms (3.4 MiB/s)
Working FDT set to 88000000
## Flattened Device Tree blob at 88000000
Booting using the fdt blob at 0x88000000
Working FDT set to 88000000
Loading Device Tree to 000000008feee000, end 000000008fffffff ... OK
Working FDT set to 8feee000
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
<SNIP>
_____ _____ _ _
| _ |___ ___ ___ ___ | _ |___ ___ |_|___ ___| |_
| | _| .'| . | . | | __| _| . | | | -_| _| _|
|__|__|_| |__,|_ |___| |__| |_| |___|_| |___|___|_|
|___| |___|
Arago Project mni-irfu-evm -
Arago 2023.10 mni-irfu-evm -
mni-irfu-evm login: [ 9.443767] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 9.444571] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[ 11.235753] platform 2b300050.target-module: deferred probe pending
mni-irfu-evm login:
mni-irfu-evm login: root
[ 162.107736] audit: type=1006 audit(1651172419.619:2): pid=239 uid=0 old-auid=4294967295 auid=0 tty=(none) old-ses=4294967295 ses=1 res=1
[ 162.107808] audit: type=1300 audit(1651172419.619:2): arch=c00000b7 syscall=64 success=yes exit=1 a0=8 a1=ffffc6be4d38 a2=1 a3=0 items=0 ppid=1 pid
=239 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=1 comm="(systemd)" exe="/lib/systemd/systemd" key=(null)
[ 162.107847] audit: type=1327 audit(1651172419.619:2): proctitle="(systemd)"
root@mni-irfu-evm:~#
root@mni-irfu-evm:~# df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 138.5M 135.2M 0 100% /
devtmpfs 901.9M 0 901.9M 0% /dev
tmpfs 966.8M 0 966.8M 0% /dev/shm
tmpfs 386.7M 8.7M 378.0M 2% /run
tmpfs 4.0M 0 4.0M 0% /sys/fs/cgroup
tmpfs 966.8M 0 966.8M 0% /tmp
tmpfs 16.0M 0 16.0M 0% /media/ram
tmpfs 50.0M 8.0K 50.0M 0% /var/volatile
tmpfs 193.4M 0 193.4M 0% /run/user/0
root@mni-irfu-evm:~#
Above you can see the RFS image copied shows it as 'full' at 135.5M available, yet the GPT table from u-boot shows it as being sized for 2 GB.
I'm not quite sure how to 'resize' this with the GPT partion size as the goal? Any poiters appreciated.
NOTE: fdisk was not available, but I'm now working on installing the gptfdisk layers etc..
root@mni-irfu-evm:~# ls -l /dev/mmc*
brw-rw---- 1 root disk 179, 0 Apr 28 18:57 /dev/mmcblk0
brw-rw---- 1 root disk 179, 32 Apr 28 18:57 /dev/mmcblk0boot0
brw-rw---- 1 root disk 179, 64 Apr 28 18:57 /dev/mmcblk0boot1
brw-rw---- 1 root disk 179, 1 Apr 28 18:57 /dev/mmcblk0p1 <-- My Primary partion
brw-rw---- 1 root disk 179, 2 Apr 28 18:57 /dev/mmcblk0p2 " Secondary "
crw------- 1 root root 240, 0 Apr 28 18:57 /dev/mmcblk0rpmb
root@mni-irfu-evm:~#