Search code examples
embedded-linuxsetup-deploymentnvidia-jetsonprebuild

Moving custom library build to other machine of similar architecture


I am currently setting up a microcontroller with several libraries which need to be built from source. Using pre-built binaries is not an option due to the system architecture. Building dependencies takes a lot of time and I want to avoid having to do it again for every similar device I need to setup in the future.

Thus, my question is, how can I migrate custom built binaries to another machine of similar architecture?

Any solution that would mirror the whole system to another drive works, too.

Note: For my current use case I am running Ubuntu 18.04 off a MicroSD plugged into a Jetson Nano


Solution

  • Any solution that would mirror the whole system to another drive works, too.

    Proposed Solution :

    1. Create a backup of the MicroSD card which has all required binaries installed
    2. Use the backup to mirror the stuff into different MicroSD cards.

    Backing Up Your SD card

    1. Connect the SDcard to your laptop
    2. Use dd command to take a backup of your MicroSD card
    sudo dd if=/dev/sdxx of=backup.img status=progress
    

    Restoring your backup to a New SD Card

    1. Connect the New SDcard to your laptop
    2. Use dd command to restore the backup to New MicroSD card
    sudo dd if=backup.img of=/dev/sdxx status=progress
    

    Note: Your SD card may also show up as /dev/mmcxx or /dev/sdxx depending on how you connect it to your laptop.

    Warning: While running dd command, Please make sure that /dev/sdxx is your SD card and not your Hard Disk. Running this command will tell you the device name of your SD card.

    sudo fdisk -l
    

    Please refer to this link for more.