3

I have been working on kernel compilation of Raspberry Pi on Ubuntu using a cross compiler. I have compiled the kernel, and I got the image file generated (https://www.raspberrypi.org/documentation/linux/kernel/building.md). The website I mentioned only tells how to install our compiled kernel on pre-installed NOOBS or Raspbian sdcard.

I have done Raspbian installation on an SD card and have seen partions where boot partions (FAT32) contains elf, kernel image, config.txt, etc. and the other partition (ext4) contains some folders.

I tried partitioning my new SD card in to FAT32 (bootable) and ext4 and copied the start.elf kernel image, bootcode, dtb, etc. into the boot folder and followed the make of modules and modules_install step for my second partion, but after installing the folder alignment doesn't look like the preinstalled Raspbian ext4 folder.

I know there is some file system doing that. How do I build an OS and file system on a new SD card?

Peter Mortensen
  • 2,004
  • 2
  • 15
  • 18
Bobby
  • 31
  • 2

1 Answers1

1

I don't know why you would want to make your own OS.

There is far more to making an OS than constructing a kernel.

Assuming you want your own kernel, why not follow the procedure you referenced on top of a standard install.

If you really want to, the following describes how to structure the partitions (and the 8K offset of the 1st sector is critical).

http://raspberrypi.stackexchange.com/questions/29947/reverse-the-expand-root-fs/29952#29952
Milliways
  • 59,890
  • 31
  • 101
  • 209