February 15, 20251 yr So, looking to create a CLI version of armbian-install. Only has to work with the rockpi-s and from the SD card to the eMMC. Looking at this script: If it works to clone the SD to eMMC (with some changes?) then I need to tell armbian to boot from the eMMC when the SD card isn't inserted, same way that armbian-install does. Do I simply change the UUID line in /boot/armbianEnv.txt to the UUID of the eMMC, or do I need to edit /etc/fstab or ?? Edited February 15, 20251 yr by Meestor_X
February 16, 20251 yr Author Edited both /boot/armbianEnv.txt and /etc/fstab but it still doesn't boot. Blue light never even comes on.
February 21, 20251 yr Author Can anyone point me in the right direction on what needs to be done to make a partition boot?
March 25, 20251 yr Author Wish I could find an ELI5 document for how to create a bootable copy of an Armbian image using the command line.
March 26, 20251 yr the bootloader needs to be installed on emmc separately. armbian-install usually takes care of that. How to debug boot issues: https://debug.armbian.de
March 26, 20251 yr Author Thank you for your reply. Do you know what the command is for installing the bootloader? I want to automate the process and armbian-install doesn't seem to have a way to be run via command line. Reading and following the operation of armbian-install is next to impossible.
March 26, 20251 yr Author Would these be the correct commands? dd if=/usr/lib/linux-u-boot-current-rockpi-s/idbloader.bin of=/dev/mmcblk0 seek=64 conv=notrunc status=none dd if=/usr/lib/linux-u-boot-current-rockpi-s/uboot.img of=/dev/mmcblk0 seek=16384 conv=notrunc status=none dd if=/usr/lib/linux-u-boot-current-rockpi-s/trust.bin of=/dev/mmcblk0 seek=24576 conv=notrunc status=none Are the "seek" numbers always the same or do they need to be calculated?
March 27, 20251 yr You can take a look at the postinstall script from the u-boot package. It should be called sth like "/var/lib/dpkg/info/linux-u-boot-current-rockpi-s.postinst" and should be quite small, so easier to understand. You can extract the required commands from there. Assuming it is similar to my u-boot installer, this could result in a script like this: #!/bin/bash source /usr/lib/u-boot/platform_install.sh write_uboot_platform "$DIR" /dev/mmcblk0 sync That way you don't have to handle the hardcoded sector offsets yourself (not sure, if these offsets would ever change - but if they do, then that will probably be reflected in the platform_install script).
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.