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.


8

to take advantages on the performance This begs the question that the people who put "an existing OS" together were not concerned about performance, or that you understand it better than them (in which case you would not be asking this kind of question -- I'm not trying to belittle you, just stating the obvious). If people approached their cars the way ...


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


4

A little late but might help someone in the future. I had the same problem, couldn't get it to load the driver but turned out you had to set /dev management under "System configuration" to "Dynamic using devtmpfs + mdev" in order to get it to detect the device and load the module. I have put together a small Raspberry Pi 3 buildroot config which enables ...


3

You could consider using the Raspbian NetInstaller to install a minimal system and build your system up from there.


3

I had similar issues with Buildroot 2017.5: The kernel ran fine without u-boot, but when booted via u-boot it was hanging after "Starting kernel...". It turned out that the predefined address for the device tree ${fdt_addr_r} was causing the problem (looks like there was some overlap with the kernel). Loading the device tree to 0x2000000 worked for me: mmc ...


3

You can build linux from scratch on the pi (http://www.intestinate.com/pilfs/guide.html). With a custom kernel, you can boot into systemd in < 1s.


2

Preface: I'm using buildroot-2017.02.3 for a Raspberry PI 2 and enabled openssh from make menuconfig. Without further changes, the ssh login doesn't work, because the generated default /etc/ssh/sshd_config does not permit root login. Option A: Add a User You can add users via buildroot. The following manual entries might help: https://buildroot.org/...


2

If all you did was make raspberrypi_defconfig && make, then you still have a lot of work to do in order to get a useful running system. The default configuration of BuildRoot is for everything to be turned off except for BusyBox. The ssh server isn't responding because you didn't tell BuildRoot that you wanted to compile it! Start off by running ...


2

I recently wrote a post on how to compile a kernel for the Pi using ELLCC. http://ellcc.org/blog/?p=26435 Although that blog post explains building for the Raspberry Pi B+ specifically, I've subsequently build a kernel for the Raspberry Pi 2 using the same technique. I'm putting together a 0.1.24 release of ELLCC that will make the process even easier.


2

Have you actually installed the cross-compilation tools? If so, you have to add the directory in which they were installed to your PATH. For example: sudo find / -xdev -name arm-bcm2708hardfp-linux-gn­ueabi-gcc -print will traverse your entire filesystem and tell you where the cross compiler lives. Let's say it printed /usr/local/fufutos/bin/arm-...


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


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

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


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


1

You can install the missing header file (libudev.h) with the following command: sudo apt-get install libudev-dev In general, when compiling you need the source files which are often, as in this case, available in the matching -dev package.


1

The Raspberry Pi foundation doesn't use buildroot. It uses a set of bash scripts and qemu-user. qemu-system started seriously considering Raspberry Pi support in 2016. Guides written before this date do not emulate the Raspberry Pi, but a superficially similiar "Versatile PB" board. It works ... i guess. You have three options. Modify the foundation ...


1

Pygame is not a framework where button, frame and windows are already defined. It is a more low level access to the framebuffer. To use pygame with the framebuffer you should write something into it. Basically, your program only declares the screen (which is initially black) and... do nothing else. You should use blit to write/place texts and images to the ...


1

OK. I can confirm that using the Buildroot System Configuration | /dev management | Dynamic using devtmpfs + mdev together with having dtparam=i2c_arm=on in /boot/config.txt does the trick. After loading i2c_dev module the /dev/i2c-1 is created.


1

In my case, the FDT file provided in the firmware package was incorrect and caused the kernel to hang. When booting, the firmware passes an internal version of the FDT to u-boot, and this one worked. So, instead of loading the FDT from a file, I had to pass the version provided by the firmware. The address of the provided FDT is in the variable ...


1

2 flashes mean the SD card cannot be read. Have you verified that your command really flashed the correct device? Have you verified that your SD card is okay? Have you verified if the image is properly flashed on the SD card? Maybe your image simply does not work.


1

Check netstat output on the RPI to check whether SSH server is open and listening. You can run following command and see whether dropbear is activily listening for connection netstat -ta | grep ssh | grep -v grep You might have enabled iptables(firewall) check whether you are not blocking the SSH port traffic (default port 22). List iptables rules to ...


1

I have two main options: Beware that since the Pi 2 is newer, most discussions of cross-compiling revolve around the A/B/+ (aka. "Pi 1") models. The difference is that the 2's BCM2836 processor is ARMv7 based, whereas the BCM2835 used on older models is ARMv6 based. Since ARMv7 is backward compatible with ARMv6, you can use binaries intended for the A/B/+ ...


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