1

I have a project in mind and for that I require the kernel to boot up and bring me to a console window so that I can start working. [later I'll automate the process].

How do I accomplish it?

Well, I have downloaded the latest stable kernel source from kernel.org and I have tried editing the init/main.c file. But I have no idea what in the world was going on in that file [noob ^n].

Hence, I post this question for an answer.

Surya Teja Karra
  • 541
  • 1
  • 6
  • 19

2 Answers2

3

I require the kernel to boot up and bring me to a console window so that I can start working.

The kernel doesn't do much by itself. In fact, it's unlikely you want to alter "main" in the kernel.

If you want to "run" the kernel, you'll also need a root filesystem and some user-space programs. If you want a minimal userland, you can use "busybox". Even better, buildroot will help you create a minimal userland + kernel.

You can even combine your root filesystem plus the kernel into a single binary. At runtime, it will uncompress userland into a ramdisk and run entirely from RAM. See initramfs. This is super-helpful for embedded systems. A minimal kernel+root filesystem can be around 1MB.

BraveNewCurrency
  • 12,654
  • 2
  • 42
  • 50
0

Go through below link

http://balau82.wordpress.com/2010/03/27/busybox-for-arm-on-qemu/

Just black screen after running Qemu

Community
  • 1
  • 1
vinay hunachyal
  • 3,781
  • 2
  • 20
  • 31
  • thank you... I browsed through this site suiting my requirements and have learned the best way [for me] to compile the kernel.. http://balau82.wordpress.com/2012/03/31/compile-linux-kernel-3-2-for-arm-and-emulate-with-qemu/ Although I wanted it for x86, but its fine because, I did compile a kernel from source. This experience is a stepping stone :D – Surya Teja Karra Nov 10 '14 at 10:13
  • Any idea how to include kernel modules? the modules.dep because I need ath9k for the internet to work and whenever I run modprobe ath9k it says "Modprobe: cannot parse modules.dep" and also I DONT HAVE the /lib/modules/kernel_version/modules.dep present. – Surya Teja Karra Nov 10 '14 at 12:31