Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Cloning SD card to eMMC and then changing boot device

Featured Replies

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 by Meestor_X

  • 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.

 

 

 

  • 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?

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.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.