OpenWrt Forum Archive

Topic: Compiling from fresh kernel source

The content of this topic has been archived on 17 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi there, I came up with the idea of porting linux to a home router for a project at my university, and then i found out about the open- and dd-wrt projects (personally i'm a fan of open-wrt).

while i could get all your source code and compile it, it doesn't give me a whole lot to write about when i'm done. What I want to know is any tips or pitfalls i might encounter when compiling a kernel for a router eg. Linksys WRT54GL completely from scratch. As in source downloaded from kernel.org and then using buildroot to create the cross compilers.

Also what's the best method for flashing this kernel and any attached filesystem to the device itself?

What are the details of the BIOS or BSP for this particular board?

Anyone's thoughts are appreciated
Thanks

Will

Wrong forum....

well could anyone point me to the right forum?

If you look at the OpenWrt sources you'll find fairly new kernels in the 2.6 branch, so I don't really know what you are trying to achieve (since it's already been done by others and all you'd do is more or less replicate their efforts).

Because I want to do it? I don't see why everyone's solution to this so far has just been "use the openwrt kernel" thats exactly what i'm trying not to do.

It's not just the kernel. You need the whole ecosystem. I hope you realise that smile. You could take a look at Cross Linux From Scratch, I believe they have a MIPS branch.

i'm not sure i know what you mean by ecosystem, but as far as the filesystem and driver modules etc go, i'm up for doing it totally from scratch. i just wanted some pointers from anyone who might have had a go before. (by pointers i don't mean char*)

if i compile kamikaze from source and then flash it to my router using the included script, that isn't exactly a lot of work you know?

You're right. But building a kernel will get you only halfway, and to build a kernel you'll need a suitable environment. x86 kernels are built in x86 environments, MIPS kernels are built in MIPS environments - be they chroots or emulators or real MIPS systems;

By the sound of it you have some reading up to do.

The discussion might have continued from here.