This section describes the creation of a short script that helps us creating the file we can transfer to our SEGA Dreamcast. Remeber, you always have to do the same many steps for building this file. So, we just bundle these commands in one single script:
$ cat <<. > cook.sh #!/bin/sh OLDPW=$(pwd) cd ~/Dreamcast dd if=/dev/zero of=initrd.img bs=1k count=4096 mke2fs -F -vm0 initrd.img mount -o loop initrd.img initrd.DIR (cd INITRD ; tar -cvf - .) | (cd initrd.DIR ; tar xvf -) umount initrd.DIR gzip -c -9 initrd.img > initrd.bin cp ./KERNEL/linux/arch/sh/boot/zImage \ ./BUILD/sh-boot/tools/dreamcast/zImage.bin cp initrd.bin ./BUILD/sh-boot/tools/dreamcast cd ./BUILD/sh-boot/tools/dreamcast make clean scramble kernel-boot.bin mv kernel-boot.bin kernel-boot-\ .`date +"%d.%m.%Y-%X"`-.bin cd $OLDPWD . $ chmod u+x cook.sh
Consider, you run this script as the super user due to the use of privileged commands in this script:
$ su -c "./cook.sh"
The last line in this script creates for every file being transferred to the SEGA Dreamcast an own time stamp. That helps, believe me :-)