To load the kernel onto real hardware, you need to do the following:
- Ensure that you have an SD card that can boot a full operating system like Raspbian
- Rip out the code from the elf file to form a raw binary file. You can do this by adding
OBJCOPY = ./gcc-arm-none-eabi-X-XXXX-XX-update/bin/arm-none-eabi-objcopyto the top of the makefile, and adding
$(OBJCOPY) $(IMG_NAME).elf -O binary $(IMG_NAME).imgto the build target.
- Mount your SD card onto the computer you develop on
- There should be a file called
kernel.imgif you have a Model 1, and
kernel7.imgfor a Model 2 or 3. Rename this to something else.
- Copy the kernel raw binary to the SD card and name it
kernel.imgon the model 1, and
kernel7.imgon the model 2 and 3.
- Safely eject the SD card and boot the Raspberry Pi