M3X1C0

Orangepi 5b emmc

Jan 6th, 2026 (edited)
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.07 KB | Software | 0 0
  1. Here is a working method to install 25.04 to emmc no errors memory out of bounds etc. works, updates and upgrades, working on a patch....
  2.  
  3. install 22.04 on emmc using the manual/RKdevtool is easiest
  4. install 25.04 on sd using the manual/RKdevtool is easiest
  5.  
  6. in order for your sd card to see the emmc at this point you need to load into the os on the sd card
  7. then nano armbianEnv.txt and add the b after the 5 in 5b.dtb at the end
  8.  
  9. fdtfile=rockchip/rk3588s-orangepi-5.dtb
  10. fdtfile=rockchip/rk3588s-orangepi-5b.dtb
  11.  
  12. ssh into sd card from pc for convienence or work directly from the sd card
  13.  
  14. mount the emmc p1 and p2 to the sd card
  15. sudo mkdir -p /mnt/emmc_boot
  16. sudo mkdir -p /mnt/emmc_root
  17. sudo mount /dev/mmcblk1p1 /mnt/emmc_boot
  18. sudo mount /dev/mmcblk1p2 /mnt/emmc_root
  19.  
  20. remove all files on the emmc for both p1 and p2
  21. sudo rm -rf /mnt/emmc_boot/*
  22. sudo rm -rf /mnt/emmc_boot/.* 2>/dev/null
  23. sudo rm -rf /mnt/emmc_root/*
  24. sudo rm -rf /mnt/emmc_root/.* 2>/dev/null
  25.  
  26. verify
  27. ls -al /mnt/emmc_boot
  28. ls -al /mnt/emmc_root
  29.  
  30. double check the partition filetypes
  31. lsblk -f
  32. # Expected example:
  33. # mmcblk0
  34. # │
  35. # ├─mmcblk0p1 vfat FAT32 opi_boot 3B7A-605E 892.3M 13% /boot
  36. # └─mmcblk0p2 ext4 1.0 opi_root 0e14f213-b9c9-436d-bab6-ce57355b7ef4 222.2G 1% /var/log.hdd
  37.  
  38. should be already configured properly
  39.  
  40. copy all the boot files from the sd card to p1 on the emmc
  41. sudo rsync -avh --progress /boot/ /mnt/emmc_boot/
  42. verify
  43. ls -l /mnt/emmc_boot
  44.  
  45. after you copy the boot files over, make a couple new directories and move the dtb file into the right directory
  46.  
  47. mkdir /mnt/emmc_boot/dtb
  48. mkdir /mnt/emmc_boot/dtb/rockchip
  49.  
  50. then rename dtb-6.1.115-vendor-rk35xx to dtb it will have a rockchip dir, and the file needed for the 5b
  51. rk3588s-orangepi-5b.dtb
  52.  
  53. copy the Linux file system files to the p2 root
  54. sudo rsync -aAXv --exclude={"/mnt/emmc_root","/proc","/sys","/dev","/tmp","/run","/media","/lost+found"} / /mnt/emmc_root/
  55. verify
  56. ls -l /mnt/emmc_root
  57. sudo sync # optional
  58.  
  59. find the new UUID for p2
  60. sudo blkid /dev/mmcblk0p2
  61.  
  62. edit your armbianEnv.txt to load the root file system
  63. sudo nano /mnt/emmc_boot/armbianEnv.txt
  64. # Change/add line:
  65. # rootdev=UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
  66.  
  67. edit /etc/fstab on the emmc root
  68. sudo nano /mnt/emmc_root/etc/fstab
  69. # Keep:
  70. # tmpfs /tmp tmpfs defaults,nosuid 0 0
  71. # Delete the rest and add:
  72. # <file system> <mount point> <type> <options> <dump> <pass>
  73. # UUID=0e14f213-b9c9-436d-bab6-ce57355b7ef4 / ext4 defaults,noatime 0 1
  74. # UUID=3B7A-605E /boot vfat defaults 0 2
  75. verify
  76. cat /mnt/emmc_root/etc/fstab
  77.  
  78. create additional directories to complete uInitrd creation
  79. sudo mkdir -p /mnt/emmc_root/{dev,proc,sys,boot,tmp,run,media}
  80.  
  81. mount these directories
  82. mount --bind /dev /mnt/emmc_root/dev
  83. mount --bind /proc /mnt/emmc_root/proc
  84. mount --bind /sys /mnt/emmc_root/sys
  85. mount --bind /run /mnt/emmc_root/run
  86. verify
  87. mount | grep emmc_root
  88.  
  89. mount the emmc_boot to emmc_root/boot
  90. mount --bind /mnt/emmc_boot /mnt/emmc_root/boot
  91. verify
  92. ls /mnt/emmc_root/boot
  93.  
  94. chroot into emmc_root
  95. chroot /mnt/emmc_root /bin/bash
  96. verify
  97. ls /boot
  98. uname -r
  99. cat /etc/os-release
  100.  
  101. if it fails, create missing boot dir
  102. mkdir -p /mnt/emmc_root/boot
  103. mount --bind /mnt/emmc_boot /mnt/emmc_root/boot
  104. chroot again and verify
  105.  
  106. create new initramfs
  107. update-initramfs -c -k 6.1.115-vendor-rk35xx
  108. verify
  109. ls -lh /boot/initrd.img-6.1.115-vendor-rk35xx
  110. ls -lh /boot/uInitrd /boot/initrd.img-6.1.115-vendor-rk35xx
  111.  
  112. exit chroot
  113. exit
  114.  
  115. verify everything on sd card filesystem
  116. ls -lh /mnt/emmc_boot/uInitrd /mnt/emmc_boot/initrd.img-6.1.115-vendor-rk35xx
  117.  
  118. create an image copy named Image
  119. mount | grep emmc_boot
  120. sudo mount -o remount,rw /mnt/emmc_boot
  121. sudo cp vmlinuz-6.1.115-vendor-rk35xx Image
  122. verify
  123. ls -lh Image uInitrd
  124.  
  125. edit boot.cmd
  126. # Change:
  127. # setenv rootdev "/dev/mmcblk0p1"
  128. # To:
  129. # setenv rootdev "/dev/mmcblk0p2"
  130.  
  131. compile boot.cmd to boot.scr
  132. mkimage -C none -A arm -T script -d /mnt/emmc_boot/boot.cmd /mnt/emmc_boot/boot.scr
  133.  
Advertisement
Add Comment
Please, Sign In to add comment