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?