6

This git repository contains pre-compiled binaries of the current Raspberry Pi kernel and modules, userspace libraries, and bootloader/GPU firmware, as you can read it in the README file: https://github.com/raspberrypi/firmware. What do I need to sucessfully boot my Raspberry Pi 2 until the init system is loaded? I think I need only the files on the boot partition, because /sbin/init is a symlink to e.g. systemd. Is this enough or do I need some files except from these ones (see https://github.com/raspberrypi/firmware/tree/master/boot)? Would it be enough to just have bootcode.bin, start.elf, config.txt, cmdline.txt and a kernel and/or initramfs image?

1 Answer 1

5

What do I need to sucessfully boot my Raspberry Pi 2 until the init system is loaded? I think I need only the files on the boot partition, because /sbin/init is a symlink to e.g. systemd.

/sbin/init and systemd are not on the boot partition. They could be. I notice there's no cmdline.txt in that github repo; normally the root= parameter in that indicates the root partition, and that's where the kernel looks for /sbin/init (or whatever is specified as the init= parameter). I'm not sure, but I believe there is no default built into the kernel so without this, it will simply load, then stop since there is no root filesystem to work with.

There also is no init included with the github stuff. There is no initramfs either, because the precompiled kernels do not use one. This is unusual compared to linux systems intended to run on a variety of hardware.

In order for the kernel to be useful you do need at least one userland process. Conventionally, that's init. You need to supply that.

Would it be enough to just have bootcode.bin, start.elf, config.txt, cmdline.txt and a kernel and/or initramfs image?

If you compiled your own kernel and initramfs, yes. Otherwise, you will have to supply something to play the role of first process, aka. init, put it in the appropriate place on the root filesystem, and put corresponding values for root and init in cmdline.txt.

2
  • Thanks. So what do the *.dat files, the other .elf files, the .dtb files and the files in overlays mean?
    – fhmgufs
    Commented Dec 20, 2015 at 16:55
  • 1
    GPU firmware, bootloader, and the .dtd stuff is for device tree. The ones in the overlay directory aren't used unless you indicate them in config.txt.
    – goldilocks
    Commented Dec 20, 2015 at 17:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.