2

I have a Model B, not 100% sure which revision, but it does say 2011.12 on it.

I'm working on writing a custom OS (primarily for learning purposes, I know that making my own OS is a huge, difficult task! This is not my first OS, but it is my first OS for the rpi). I'm having a bit of trouble installing my own custom kernel, though. What I'm doing at the moment is this:

I have an SD card that has NOOBS. Now, I don't want to go through the NOOBS OS install route (I want to do this from scratch, after all). I take my custom kernel and replace the "recovery.img" file with my custom kernel. This boots just fine and my OS starts working.

However, the obvious trouble here is that I'm relying on NOOBS' startup code. I've read that I can just take the two files, "bootcode.bin" and "start.elf", and copy my own kernel as "kernel.img" on the sd card, then it SHOULD boot without all of the extra NOOBS overhead. However, I've tried this with several versions of bootcode.bin and start.elf and nothing has happened. I haven't been able to find a "minimal" install (that has just these three files), but I'd like one. Does such a thing exist?

1

Through experimentation I've found my answer:

the NOOBS SD card contains two critical files: bootcode.bin and recovery.elf. These two files must be placed in the root directory of the SD card, along with your kernel image (in my case I called it kernel.img and it worked. I suspect it just looks for *.img files). So I already had my minimal files all along!

1

I have the new Pi Zero-W and with Raspbian Lite, these are the files in /boot that will boot up and run the system.

pi@RPi0:/boot $ ll
total 11598 
-rwxr-xr-x 1 root root   15644 May 30 07:09 bcm2708-rpi-0-w.dtb
-rwxr-xr-x 1 root root   50268 May 30 07:09 bootcode.bin
-rwxr-xr-x 1 root root     175 Jun 14 14:39 cmdline.txt
-rwxr-xr-x 1 root root 4376232 May 30 07:09 kernel.img
-rwxr-xr-x 1 root root 4576784 May 30 07:09 kernel7.img
-rwxr-xr-x 1 root root 2851012 May 30 07:09 start.elf

With the 'B Model' you will need one of the following files:

-rwxr-xr-x 1 root root   15440 May 30 07:09 bcm2708-rpi-b-plus.dtb
-rwxr-xr-x 1 root root   15181 May 30 07:09 bcm2708-rpi-b.dtb
-rwxr-xr-x 1 root root   16507 May 30 07:09 bcm2709-rpi-2-b.dtb

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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