10

To overwrite itself, your operating system must run fully in RAM and neither read nor write from SD card after booting. piCore/TinyCore is probably one of the few Linux OS which can do that.


6

As pointed out elsewhere, dd-ing over a running OS is never a good idea. An alternative (and the usual way you'd develop embedded systems) is to have your OS image served from a network drive and the target board perform a network boot. This speeds up the initial development and you only need to write out the SD cards as you get closer to completion and need ...


3

Use with caution This works for me because I am using a read-only root filesystem with a custom Buildroot OS. This script hasn't been tested on Raspbian yet, but will probably work. #!/bin/bash set -e echo "Copying image to RPi..." sshpass -p PASSWORD scp /PATH/TO/SDCARD.img USER@RPI:/tmp/sdcard.img echo "Flashing image to /dev/mmvblk0 on RPi..." sshpass -...


2

Use an SD card large enough to hold multiple partitions The SD card should hold a boot partition (0) and three OS partitions (1-3). The boot loader on the boot partition would examine the partition labels to determine what to load. Suppose the labels are: 0: BOOT 1: OS-0004! 2: OS-0002 3: OS-0003 The loader knows to load the OS from partition ...


2

I figured out what my issue was. For some reason, the version of build root I pulled down didn't contain the proper files for the Pi 3 B+. These are the steps that I followed: git clone https://github.com/buildroot/buildroot.git cd buildroot make raspberrypi3_defconfig make dd bs=4M status=progress if=./output/images/sdcard.img of=/dev/sdb I then put the ...


2

raspberrypi3_64_defconfig isn't even listed in the readme, I assume because it's experimental. Try make raspberrypi3_defconfig That's the one listed so it should be expected to work.


2

The apt command is the Debian solution to download packages from a repository, including their dependencies. If you want to use apt, you have to create a system that is based on these packages. If you create a system with Buildroot, you can't use apt, even if you compile an apt program for that system. Whatever you want to install later with apt would most ...


1

All your requirements are already available in my Nard SDK distro. It runs from RAM and there are ready made scripts for remote image upgrades. http://www.nard.se/


1

Here a rough approach: Replace /sbin/init with upgrade tool. Tell init to re-exec itself. Kill all other remaining processes (for example with kill -9 -1) Use pivot_root and chroot to replace the root filesystem. If necessary exec the next stage to drop references the old root. Recursively unmount the old root. Write the new image. Reboot.


1

In retrospect, this was a dumb question - trying to run an embedded Raspberry Pi OS on QEMU is not supported. Those who run Raspbian on QEMU use a custom kernel specifically designed for QEMU. The reason I was doing this is because the serial and HDMI adapters I ordered for my Pi are still in the mail (any month now). There's a silver lining - I just ...


Only top voted, non community-wiki answers of a minimum length are eligible