OLD VERSION


This script has recently been updated - this is the old page! You probably want the link... try looking in the sitemap link at the bottom of the page


Setup

Copy your standard firmware image (for me it is U96CPQ163.bin) into the t20 directory you made when you were patching/building grub - it's 94Meg, so it might take a moment to copy!

Copy the kernel and initrd from your DSL flash drive into the t20 directory. I did it like this (starting in the t20 directory):

$ mkdir mnt
$ sudo mount /dev/sda1 mnt
Password: *******
$ cp mnt/linux24 mnt/minirt24.gz .
`mnt/linux24' -> `./linux24'
`mnt/minirt24.gz' -> `./minirt24.gz'
$ sudo umount mnt
$ rmdir mnt

Note that your flash drive might not be /dev/sda1 - you'll have to figure this one out yourself.

Get the script

Create a file called build-devosl-old.sh in the t20 directory containing this:

build-devosl-old.sh

Loop devices

NOTE: You need to be root for this section.

Check for the loop module

# lsmod | grep '^loop'
loop                   59596  0

If nothing is displayed, try this:

# modprobe loop

and then try the above lsmod/grep command again.

Check for some loop devices

# ls /dev/loop*
/dev/loop0  /dev/loop1  /dev/loop2  /dev/loop3  /dev/loop4  /dev/loop5  /dev/loop6  /dev/loop7

You want some loop devices listed here. You may have something slightly different, including possibly a /dev/loop/ directory - I think that if you have /dev/loop/ listed then it's probably OK. If you managed to load the loop module, but still have no loop devices, you may need to use MAKEDEV or mknod - look it up on the web.

Run the script

At this point, you should have these files/directories in the t20 directory:

$ ls
build-devosl-old.sh  devosl-grub.patch  grub-0.97/  grub-0.97.tar.gz  linux24  minirt24.gz  U96CPQ163.bin

You have to be root to do this; in the t20 directory, do:

# chmod +x build-devosl-old.sh
# ./build-devosl-old.sh 
(lots of stuff displayed, hopefully no errors)

You now have a bootable image (bootp.bin) to install in your T20!

Flash the T20 with this, then plug in your DSL USB-flashdrive, reboot the T20, and rejoice!

Notes and possible problems


    # build-devosl-old.sh 
    === Sanity checks =================================================
    Check that we can use losetup.
    Check that the chosen loop device exists.
    Check that we can use dd.
    Check that we can use mkfs.vfat
    Check that we can use the strings command.
    Check/setup mount directory.
    Check source image exists and is readable.
    Check grub stage1 and stage2 exist and are readable.
    Check kernel and initrd exist and are readable.
    === Start working =================================================
    Copying standard firmware "./U96CPQ163.bin" to working file "./bootp.bin"
    Searching for Master Boot Record.
    === Make bootable =================================================
    Setting the partition type as FAT (standard was NTFS).
    1+0 records in
    1+0 records out
    1 byte (1 B) copied, 0.000590184 seconds, 1.7 kB/s
    Setting up loop for partition (start at 834748).
    Cleaning the partition, for tidiness.
    Creating FAT filesystem with large reserved space (for grub).
    mkfs.vfat 2.11 (12 Mar 2005)
    Loop device does not match a floppy size, using default hd params
    Installing grub stage1 (part1).
    3+0 records in
    3+0 records out
    3 bytes (3 B) copied, 0.00623498 seconds, 0.5 kB/s
    Installing grub stage1 (part2).
    450+0 records in
    450+0 records out
    450 bytes (450 B) copied, 0.00323267 seconds, 139 kB/s
    Installing grub stage2.
    148+1 records in
    148+1 records out
    76010 bytes (76 kB) copied, 0.0135971 seconds, 5.6 MB/s
    === Copy files =================================================
    Mounting image.
    Copying kernel.
    Copying initrd.
    === Close up =================================================
    Unmounting image
    Detaching loop.
    Making image "./bootp.bin" accessible by anyone.
    === Finished! =================================================
    Done!  You should now flash the T20 with "./bootp.bin"