adding isofs to mbwe

Adding a kernel modules to the MBWE may be a big pain.

Here is a brief instructions what i did to enable isofs support in my brand new MBWE.

Before I began:

1. Enabled ssh root access.

2. Installed some optware modules to make my life easy (I like mc).

3. Downloaded source code archive from WD site.

This site provides an excelent links to all things mentioned above. was my starting point.

Many thanks to the author.

To build cross compiler i used pretty old virtual box with rh-9.0 and required
development packages (cos i've used a crosstool to build arm compiler
- it requires gcc 3.[2-9] , see crosstool scripts).

on rh-9.0 box:

$ ls -la ~/tmp/WD-GPL-v1.18.tar.bz2
-rwxr--r--    1 mike     mike     420230384 Mar 24 20:42 /home/mike/tmp/WD-GPL-v1.18.tar.bz2

$ pwd
$ tar -xjf ~/tmp/WD-GPL-v1.18.tar.bz2
$ cd WD-GPL-v1.18/
$ tar -xf gpl-crosstool-archive.tar
$ tar -xzf ./crosstool-archives/crosstool-0.42.tar.gz
$ cd crosstool-0.42/
$ cp ../crosstool-patches/* .
$ ./

….. this take a long time and should build ok.

After all you should see something like:

+ echo testhello: C compiler can in fact build a trivial program.
testhello: C compiler can in fact build a trivial program.
+ test '' = 1
+ test '' = 1
+ test '' = 1
+ test 1 = ''
+ echo Done.


on rh-9.0 box:

$ cd ..
$ export PATH="$PATH:`pwd`/crosstool-toolchain/gcc-4.1.0-glibc-2.3.2/arm-linux-gnu/bin"
$ which arm-linux-gnu-gcc
$ cd ./vendor/linux-kernel/
$ make CROSS_COMPILE=arm-linux-gnu- oxnas_wd2nc_defconfig

$ make CROSS_COMPILE=arm-linux-gnu- menuconfig

… here I've added support for isofs

$ make CROSS_COMPILE=arm-linux-gnu- modules

$ make CROSS_COMPILE=arm-linux-gnu- INSTALL_MOD_PATH=../kernel-modules modules_install
$ cd ../kernel-modules/lib/modules/

my MyBookWorld at, so:

$ scp fs/isofs/isofs.ko lib/zlib_inflate/zlib_inflate.ko root@

on MyBookWorld box (be extra carefully here, you always make
a backup copy, don't you ?).

# cd /lib/modules/
# mkdir -p fs/isofs lib/zlib_inflate
# cp /tmp/isofs.ko fs/isofs/
# cp /tmp/zlib_inflate.ko lib/zlib_inflate/

!!!! Make a copy !!!!

# cp /lib/modules/ /lib/modules/

!!! Use editor if you unsure, WARINIG: You should understand what you are doing

!!! cause it may damage OS on your MBWE.

# echo "`pwd`/lib/zlib_inflate/zlib_inflate.ko:" >> /lib/modules/
# echo "`pwd`/fs/isofs/isofs.ko: `pwd`/lib/zlib_inflate/zlib_inflate.ko" >> /lib/modules/

… just to check:

# tail -2 /lib/modules/
/lib/modules/ /lib/modules/

Try to load module

# modprobe isofs

Now I able to mount any cd iso images. That's it.

… just to test:

# mkdir -p /mnt/iso
# mount /shares/internal/PUBLIC/images/RedHat/9.0/i386/RH-9.0-i386-disc1.iso /mnt/iso
# mount | grep loop
/dev/loop0 on /mnt/iso type iso9660 (ro)

To add more loop devices to mount more iso:

# mknod /dev/loop2 b 7 2
# mknod /dev/loop3 b 7 3

… and so on

my rh-9.0 box:

$ uname -a
Linux localhost.localdomain 2.4.20-8 #1 Thu Mar 13 17:54:28 EST 2003 i686 athlon i386 GNU/Linux
$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --host=i386-redhat-linux
Thread model: posix
gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)

my MyBookWorld box:

# uname -a
Linux MyBookWorld #1 PREEMPT Fri Jan 18 10:40:25 GMT 2008 armv5tejl GNU/Linux

PS. Check dmesg if module cannot be loaded.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License