hi guys,
I encounter a few problems during firmware building process I would like to discuss to find a possible solution and to better understand how buildroot works.
The first problem is related to packages and the TARGETS:= variable entries.
Ideally I would like to build a squashfs filesystem containing the following packages: iproute2 pppoecd dropbear libpthread
so I changed the TARGETS:= variable to:
TARGETS:=host-sed iproute2 pppoecd dropbear libpthread openwrt-code.bin
unfortunately when I issue "make" I get the following errors:
make[1]: Entering directory `/home/esivieri/dev/openwrt/buildroot/build_mipsel/iproute2'
Please, Compile the kernel first
make[1]: *** [check-kernel] Error 1
make[1]: Leaving directory `/home/esivieri/dev/openwrt/buildroot/build_mipsel/iproute2'
make: *** [/home/esivieri/dev/openwrt/buildroot/build_mipsel/iproute2/tc/tc] Error 2
it clearly states that I should compile the kernel first, I agree with that but I'm not compiling a package, I'm compiling the firmware WITH the iproute package.
OK, now let's say I dont want iproute2 anymore but I want to the firmware AND the other selected packages:
New variable:
TARGETS:=host-sed pppoecd dropbear libpthread openwrt-code.bin
and new error message:
make[1]: /home/esivieri/dev/openwrt/buildroot/build_mipsel/staging_dir/bin/mipsel-linux-uclibc-gcc: Command not found
make[1]: *** [magic.o] Error 127
Here it says it cannot find the cross compiler anymore mipsel-linux-uclibc-gcc
I figured out that a "make clean" also deletes the toolchain and the build_mipsel contents.
So I decided to build the firmware without any extra builtin packages and the change change the buildroot's Makefile "clean" from:
#clean:
# rm -rf $(TOOL_BUILD_DIR) $(BUILD_DIR) $(IMAGE)
$(BASE_DIR)/packages
openwrt-linux.trx openwrt-g-code.bin openwrt-gs-code.bin
openwrt-kmodules.tar.bz2
to:
clean:
rm -rf $(IMAGE)
$(BASE_DIR)/packages
openwrt-linux.trx openwrt-g-code.bin openwrt-gs-code.bin
openwrt-kmodules.tar.bz2
to be able to finally make the firmware with the required builtin packages.
I did that, it worked but some of the nvram.overraids and other modifications I made wasnt reported in the new created images because most of the stuff was already compiled and copied by previews builds.
I'm sure I'm missing something, I'm sure that might be a better way to achieve what I'm trying to do, any of you guys have a suggestion please?
-----------------
Another point isnt clear for me is the module tarball. I need iptables MAC support and I added "mac" to the PF_EXT_SLIB:= variable in /buildroot/build_mipsel/iptables-1.2.11/extensions/Makefile to be sure to have the MAC library compiled and installed. (WORKED!)
Now I also want to have ipt_mac.o automatically copied in /lib/modules/2.4.20/ but I wasnt able to find any reference to tell the buildroot process to copy it in the right place instead of including it in the modules tarball (openwrt-modules.tar.bz2).
If you guys know how to do it that would be great.
------------------
Another problem I encountered is with dropbear. I included dropbear in the TARGETS:= variable, after I flashed my router I figured out that dropbear wasnt installed, it copied the S51dropbear start script in /etc/init.d but the executrable files wasnt there. I triplechecked all the executables directories without luck. I'm wondering if this problem might be related to the fact that the firmware was actually already compiled a few "make" before (see first problem).
Well, that's all for the moment, I hope I put enought details to be able to get some feedback from you guys, if you need further informations just ask me, I'm also hanging in #wrt54g as nettie.
Thanx again for your time.
Best,
nettie.