Firefly Open Source Community

   Login   |   Register   |
New_Topic
Print Previous Topic Next Topic

[Linux] Incorrect system mount

54

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
54

【Linux】 Incorrect system mount

Posted at 7/5/2022 03:31:35      View:1365 | Replies:2        Print      Only Author   [Copy Link] 1#
I try to get builds with linux kernel 5.10 and 5.18 (mainline) for my board with RK3399.
But I see that OS after boot this builds has incorrect memory size, root partition is only 1.2 GB and all other 28 GB doesn't mount to any point.
Here is df and fdisk command for current 5.10 kernel build:

  1. firefly@firefly:~$ df -h
  2. Filesystem      Size  Used Avail Use% Mounted on
  3. /dev/root       1.2G  917M  218M  81% /
  4. devtmpfs        1.9G  8.0K  1.9G   1% /dev
  5. tmpfs           1.9G     0  1.9G   0% /dev/shm
  6. tmpfs           383M  1.3M  382M   1% /run
  7. tmpfs           5.0M  4.0K  5.0M   1% /run/lock
  8. tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
  9. tmpfs           383M     0  383M   0% /run/user/0
  10. tmpfs           383M     0  383M   0% /run/user/1000

  11. firefly@firefly:~$ sudo fdisk -l
  12. Disk /dev/ram0: 4 MiB, 4194304 bytes, 8192 sectors
  13. Units: sectors of 1 * 512 = 512 bytes
  14. Sector size (logical/physical): 512 bytes / 4096 bytes
  15. I/O size (minimum/optimal): 4096 bytes / 4096 bytes
  16. Disk /dev/mtdblock0: 16 MiB, 16777216 bytes, 32768 sectors
  17. Units: sectors of 1 * 512 = 512 bytes
  18. Sector size (logical/physical): 512 bytes / 512 bytes
  19. I/O size (minimum/optimal): 512 bytes / 512 bytes
  20. Disk /dev/mmcblk0: 29.12 GiB, 31268536320 bytes, 61071360 sectors
  21. Units: sectors of 1 * 512 = 512 bytes
  22. Sector size (logical/physical): 512 bytes / 512 bytes
  23. I/O size (minimum/optimal): 512 bytes / 512 bytes
  24. Disklabel type: gpt
  25. Disk identifier: 534C0000-0000-4F2F-8000-5F7A00007777
  26. Device           Start      End  Sectors  Size Type
  27. /dev/mmcblk0p1   16384    24575     8192    4M unknown
  28. /dev/mmcblk0p2   24576    32767     8192    4M unknown
  29. /dev/mmcblk0p3   32768    40959     8192    4M unknown
  30. /dev/mmcblk0p4   40960   172031   131072   64M unknown
  31. /dev/mmcblk0p5  172032   237567    65536   32M unknown
  32. /dev/mmcblk0p6  237568   303103    65536   32M unknown
  33. /dev/mmcblk0p7  303104   368639    65536   32M unknown
  34. /dev/mmcblk0p8  368640  3030015  2661376  1.3G unknown
  35. /dev/mmcblk0p9 3030016 61071326 58041311 27.7G unknown
Copy the code


In builds with original firefly kernel 4.19 I have correct memory mounts:

  1. firefly@firefly:~$ df -h
  2. Filesystem      Size  Used Avail Use% Mounted on
  3. udev            1.9G  8.0K  1.9G   1% /dev
  4. tmpfs           384M  1.5M  383M   1% /run
  5. /dev/mmcblk2p7  1.2G  884M  203M  82% /root-ro
  6. /dev/mmcblk2p8   28G   61M   28G   1% /userdata
  7. overlayroot      28G   61M   28G   1% /
  8. tmpfs           1.9G     0  1.9G   0% /dev/shm
  9. tmpfs           5.0M  4.0K  5.0M   1% /run/lock
  10. tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
  11. tmpfs           384M     0  384M   0% /run/user/0
  12. tmpfs           384M     0  384M   0% /run/user/1000
Copy the code


What should I check and change that to get correct auto mounts?
Reply

Use props Report

54

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
54
Posted at 7/5/2022 03:35:33        Only Author  2#
I experiment with parameter.txt values. In logs above parameter for 5.10 (and 5.18) was:
  1. CMDLINE: mtdparts=rk29xxnand:0x00002000@0x00004000(uboot),0x00002000@0x00006000(trust),0x00002000@0x00008000(misc),0x00020000@0x0000a000(boot),0x00010000@0x0002a000(recovery),0x00010000@0x0003a000(oem),0x00010000@0x0004a000(backup),0x289c00@0x0005a000(rootfs),-@0x2e3c00(userdata:grow)
Copy the code


For 4.19:
  1. CMDLINE: mtdparts=rk29xxnand:0x00002000@0x00004000(uboot),0x00002000@0x00006000(trust),0x00002000@0x00008000(misc),0x00020000@0x0000a000(boot),0x00010000@0x0002a000(recovery),0x00010000@0x0003a000(backup),0x289c00@0x0005a000(rootfs),-@0x2e3c00(userdata:grow)
Copy the code


If anything, in 5.10 builds i get incorrect mounts with 4.19 parameter.txt settings.
Reply

Use props Report

54

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
54
Posted at 7/7/2022 20:03:57        Only Author  3#
I get worked build with stable 5.18 kernel of Linux. I just forgot copy compiled ramdisk.img from Firefly kernel 4.19 build.
Reply

Use props Report

You need to log in before you can reply Login | Register

This forum Credits Rules

Quick Reply Back to top Back to list