On Sunday, January 20, 2013 12:19:06 PM UTC,
ope...@gmail.com wrote:
Hello JC,
Thanks for all your help - I was trying a micro Wifi Dongle - based on RTL8188CU chipset. I tried to compile the drivers from Realtek site, and actually succeeded with a module ( 8192CU ). But Kernel doesnot seem to be built with CONFIG_WLAN or CONFIG_WIRELESS or CONFIG_WIRELESS_EXT. Particuarly the first one needs to be built in the kernel, I suppose?
Yes, no wifi, no sound, nor anything else that the box doesn't has.
KISS, Keep It Simple and Small, is my lemma :-)
Does the kernel supports WLAN? If not any pointers on how do i compile my own kernel and implement it? Please , any help would be highly appreciated.
[root@GNAS ~ linux-2.6.35.14 ] # cat linux-2.6.35.14-km.config | grep WIRELESS
# CONFIG_WIRELESS is not set
CONFIG_USB_SERIAL_SIERRAWIRELESS=m
[root@GNAS ~ linux-2.6.35.14 ] # cat linux-2.6.35.14-km.config | grep WLAN
# CONFIG_WLAN is not set
Also - I have your Alt-F buildroot package compiled and set.
OK, so it's easy.
So you have read the
HowToBuild wiki. Some difficulty? less clear instructions? How can it be improved? Anything worth reporting?
There are two configurations files available, the default one, '.config' which is identical to '.config-base', and '.config-pkgs'.
The first one build the base system for flashing, with a small set of packages, the ones I think are most useful to everybody (and that fits the scarce flash memory space). The second builds all Alt-F available packages, and I use it to generate the Alt-F packages.
To create the kernel modules, adding more modules to the kernel, I have to use the '.config-pkgs' configuration, so I do
cp .config-pkgs .config # use the package configuration file
export BLDDIR=... # where will the build binaries be
make O=$BLDDIR menuconfig # update to the new config, but don't change anything
make O=$BLDDIR # build
make O=$BLDDIR # again, I'm paranoic
./mkpkgs.sh -rm kernel-modules # remove the current kernel modules files from the build tree
./mkpkgs.sh -set # record the current build tree files
make O=$BLDDIR linux26-menuconfig # configure linux, adding the new needed modules
make O=$BLDDIR # make again, with the new modules
make O=$BLDDIR # paranoic?
./mkpkgs.sh -diff > foo # what files are new? Remember, I have removed all kernel modules files before the build.
diff ipkgfiles/kernel-moules.lst foo # what new modules have I built? Everything OK?
cp foo ipkgfiles/kernel-modules.lst # make the new list the default
./mkpkgs.sh kernel-modules # build the kernel modules package with the new files
./mkpkgs.sh -index pkgs # generate an index of the pkgs directory, ready to be a package feed
And that's it, in the 'pkgs' directory the new kernel-module is available
As I have a link from 'pkgs' to '~jcard/public_html/pkgs' and setup 'myhost://~jcard/pkgs' as the Alt-F package feeder, I can install it right from the Alt-F Package Manager.
But the above will download and compile all 174 Alt-F packages, and some issues might arise, see issue
Issue 87
So, what are your options? Build only the base package, using the default .config (or .config-base) first, then make O=... linux26-menuconfig and specify the new kernel modules, then do a new plain make O=...
BTW, I use the following:
export ROOTFS=$BLDDIR/project_build_arm/dns323/root/
export STAGING=$BLDDIR//build_arm/staging_dir/
export BINARIES=$BLDDIR/binaries/dns323;
But at the build end you will not find the new modules in the rootfs ($ROOTFS)! Why not?
Because the 'configfs' script runs as part of the build, and all modules not specified in the KMOD variable are removed.
Why is this? In order to load some modules, the kernel must support them. See the following comment in 'configfs':
# if BRIDGE is not set as a kernel module in the base firmware kernel, it will not load
# the bridge module from kernel-modules.
# So, build the kernel with BRIDGE module enabled, then remove the aditional modules.
# to diferentiate between the base kernel and the pkg kernel, use BR2_PACKAGE_KERNEL_MODULES
# The same as above applies to IPV6 and other modules
So, in order to have wifi or sound, even they are compiled as modules, the kernel must support them, having some code compiled not as a module, and a similar mechanism must be used as it is now used for the BRIDGE or IPv6.
If you find that the new modules that you build does not works or loads correctly with the default kernel, you should experiment them using your own built kernel, look at $BINARIES, and please see
this topic regarding how to do it (the TryIt, reboot/kexec stuff)
Anyone who does this kind of experience should also do a ./mkinitramfs.sh <arg>, followed by a ./mkfw.sh <arg>, in order to see if the kernel size is small enough to fit the available flash memory capacity. If yes, then please send me the kernel configuration, so I will include them in the kernel-modules package.
Joao