OpenWrt Forum Archive

Topic: Openwrt not building using initramfs...

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

I tried to build a openwrt failsafe kernel with kernel embedded rootfs for the fonera. I installed a colinux (debian) system and downloaded kamikaze trunk and all needed packages. The compile fails with error: /usr/initramfs_data.gpio.gz error 255....

edit: compiling without initramfs support works flawless....

Anyone had any luck building openwrrt using initramfs ?

I also could not get OpenWRT to build using initramfs.  I played around with trying to put in a few new kernal options, but this didn't work.  If anyone has some insight here, I'd appreciate it.

I was ultimately trying to PXE boot my device using the nitramfs image so I could make my modify/compile/test cycle smaller.

use the vmlinux in the kernel build dir (you can gzip it if you want)

Yes, I did use the vmlinuz image in the build directory.  The best I could determine, the kernel image wasn't set to know where the kernel stopped and the rootfs image began.  Following this tutorial (I know it is really old) http://www.tldp.org/HOWTO/Bootdisk-HOWTO/, I think the vmlinuz image created is freaking out because it doesn't know where to find the root. 

I'll fire it up again and see if I can find the exact error.

I have netbooted a wgt634u (within last month) using the above method.

and an xscale using the file created in bin/

Ok, well, I stand corrected.  I'll try to document my steps a bit here for everyone.

I am running a OpenSuSE 10.2 build system.  I am testing the x86 build of OpenWRT with the plan to run it on a Via EPIA based system. 

My IP is set to static at 192.168.172.130.  I am PXE booting the target machine with the following DHCPd Conf file:

ddns-update-style none;
default-lease-time 14400;

subnet 192.168.172.0 netmask 255.255.255.0 {
  next-server 192.168.172.130;
  filename "pxelinux.0";
  range 192.168.172.131 192.168.172.200;
  default-lease-time 14400;
  max-lease-time 172800;
}

I am running a TFTP boot server on xinetd with the root of /tftpboot/.  That directory looks like the following:

|-- linux
|-- pxelinux.0
`-- pxelinux.cfg
    `-- default

The contents of the default file are:

default linux

label linux
kernel linux

display         message
prompt          1
timeout         10

The 'linux' file under /tftpboot is the copied openwrt-x86-2.6-vmlinuz file that was inside my openwrt bin directory after I build with initframfs enabled.

From there, I turned on the Via machine and it booted right up.

(Last edited by escape164 on 19 Mar 2007, 18:44)

Can you please explain what kernel options to set to have the initramfs build into openwrt or any additional ipkg to install ?

It's not building here...

(Last edited by intrax on 19 Mar 2007, 19:05)

Under "target images" you should have an option called "ramdisk"; selecting this should reconfigure the kernel for an initramfs, where the ramdisk contains everything you've selected.

It is possible to confuse the build system, if you've already compiled the kernel it may not recompile it as an initramfs; if that happens you can just run "make target/clean" and try again.

mbm wrote:

Under "target images" you should have an option called "ramdisk"; selecting this should reconfigure the kernel for an initramfs, where the ramdisk contains everything you've selected.

It is possible to confuse the build system, if you've already compiled the kernel it may not recompile it as an initramfs; if that happens you can just run "make target/clean" and try again.

edit: needed ipkg gawk, which was not installed...

(Last edited by intrax on 20 Mar 2007, 01:45)

The discussion might have continued from here.