OpenWrt Forum Archive

Topic: howto compile additional modules into flash image

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

Hi

I'm a noob and I've spent the past week trying (unsuccessfully) to work out how to compile a kamikaze image for my NSLU2 that includes support for the VFAT filesystem and the cp437 national language set.

I've got two questions I've been unable to find answers to

1) I've run make menuconfig -> Kernel-Modules -> Filesystems, and set every option to 'M' to build a module.

After a build, the openwrt-kamikaze_7.09/build_armeb/root/lib/modules/2.6.21.6 directory doesn't contain any of the NLS modules selected above.

The openwrt-kamikaze_7.09/build_armeb/OpenWrt-ImageBuilder-ixp4xx-2.6-for-Linux-i686 directory contains only kmod-nls-utf8 kmod-nls-cp1250 kmod-nls-base

Unsurprisingly, when I try and mount a USB flash stick, the mount fails and dmesg tells me that the cp437 module couldn't be loaded (duh - its not there).

What am I doing wrong? Why is this module not being built and linked into the target flash image??

(Note: I'm also trying to build the i2c support and have enabled both i2c kernel module options as 'M' also. These modules are not appearing in the built image either. But I presume that when I solve the VFAT and NLS issue above, the same fix will work for my i2c module problem)

2) After re-running make menuconfig and changing something, I don't seem to be able to rebuild properly unless I do a make dirclean ; make.

This seems excessively wasteful, and I presume there's a simple way of updating the Makefiles (eg like running make dep when you rebuild a kernel). I can't seem to find any howtos telling me any more details about compiling than the basic 'run make menuconfig ; make' - which is OK if you're building from scratch, but not what you want to do every time.

Thanks in advance.
Stefan

You've told it not to include it -
<*> include package in firmware image
<M> compile package, exclude from firmware image
< > do not compile package

Ahhh. There's always a simple explanation. Thanks!

And my other question.... if you go and change a config (to a '*' rather than an 'M'), can you rebuild using 'make' or is there something else to run first to reconstruct all the Makefiles?? I'm wondering whether its been because I've been compiling 'modules' rather than packages that I've not been noticing any changes in the flash-image....

Thanks again,
Stefan
-------------------
EDIT:

I've recompiled using '*' instead of 'M'. Some of the packages marked with '*' now compiled into the image, but others have not even compiled at all.

For example, I've set the kmod-nls-cp437 (and several other code pages) in 'make menuconfig -> kernel options -> filesystems' to '*', but only nls_utf8 has been compiled and copied into the image. I've also set both I2C options under 'make menuconfig -> kernel options -> i2c bus' to '*' and neither have compiled at all (ie no evidence of the *.ko files under the build_armeb/linux-2.6-ixp4xx/linux-2.6.21.6' directory.

There must be something else that needs tweaking / needs to be flicked on. Any ideas? (I'll update the nslu2 wiki when I get this sorted - I saw just now that the openwrt wiki already mentions that '*' and 'M' mean something different - how many wikis do you need to read ;-))

Stefan

(Last edited by skellert on 8 May 2008, 01:21)

I've just managed to get the nls_cp437.ko and nls_cp850.ko modules to build and install into the image.... I needed to run 'make kernel_menuconfig' and enable the same nls modules there, as well as enable them in the top level 'make menuconfig'. Result: I've successfully mounted a VFAT USB stick on my NLSU2 for the first time.

Alas, I still haven't been able to compile the I2C modules. I'm now guessing that they also need to be enabled in the kernel as well as the top level make. I tried this but it didn't work.

Any hints on what are the correct I2C modules to enable in the kernel?

Stefan

The discussion might have continued from here.