Specifically, I want to compile the usb-hid and usb-raw modules that I believe I need to get apcupsd working. Here's what I'm done so far.
Note, that I'm compiling this source on an updated Ubuntu 9.04 Jaunty workstation. I've needed (at least) the following packages installed on my machine: bison, flex, texinfo, libc6-dev-i386, build-essential .
- Downloaded WD-MyBookWorld-v1.00.16-GPL.tar.gz from http://support.wdc.com/product/download.asp?groupid=118&sid=116&lang=en
- cd kernel
- tar -xzvf kernel-source.tar.gz
- cd kernel-source
- source ./setup-paths.sh
- tar -xjvf buildroot-20080225.tar.bz2
- cd buildroot
- Manually downloaded http://www.roku.com/rokuplayer/software/fakeroot_1.9.tar.gz to "WD-MyBookWorld-v1.00.16-GPL/kernel/kernel-source/buildroot/dl" (The debian location for this gzip in the make scripts is 404'd)
- vim "target/makedevs/makedevs.c" edited line 531 to read:
bb_error_msg("sync failed, continuing anyway");
- make menuconfig
- set the following options:
- Target architecture = arm
- Target architecture variant = arm926t
- "Kernel/.config file" : .config
- Ran through the kernel config, where I enabled module support, along with the modules I needed ( Hard for me to tell you what's needed here, since I can't try any of this out…)
Once everything is compiled, you'll find a bunch of your modules in "./project_build_arm/uclibc/root/lib/modules/22.214.171.124/kernel/drivers/usb" . However, if you scp them to the MyBook, and try to insmod them, you'll get:
insmod: cannot insert ‘./hid.ko’: Invalid module format (-1): Exec format error
And dmesg reads:
hid: version magic '126.96.36.199 mod_unload ARMv5 ' should be '188.8.131.52 mod_unload ARMv5 '