Serial cable modification for Landisk
(to be edited)
(to be edited)
( to be edited)
LILO preparation
# wget http://www.superh-linux.org/archive/bsp/sh7751r_se/sh4-lilo-001126.tar.gz
# tar xvf sh4-lilo-001126.tar.gz
# cd sh4-lilo
Edit the source code "second.c" in order to set the serial port to 9600bps.
[line 192]: cmdline = string_set (cmdline, "console=ttySC0,9600");
Edit the source code "first.S" in order to much versions lilo.x86 and boot.b.
[line 53]: .word 4*256 + 21
# make
Note : Cross compile environment is required on your PC.
# cp sh4-lilo/boot.b /mnt/boot/
# vi /mnt/etc/lilo.cross
linear
boot=/dev/sda
disk=/dev/sda
bios=0x80
timeout=50
default=linux
image=/boot/vmlinuz-2.6.22-landisk
label=linux
root=/dev/sda1
read-only
# /mnt/sbin/lilo.x86 -r /mnt -C /etc/lilo.cross
Minimum preparation of configuration files
/etc/hosts
127.0.0.1 localhost
192.168.11.128 landisk
/etc/resolv.conf
# Domain name searches will fail until you point this to a real DNS server.
# search mydomain.com
nameserver 192.168.11.1
/etc/inittab
In order to enable serial console before login, the line regarding serial console configuration should be changed as follow :
1:2345:respawn:/sbin/getty 9600 ttySC1
It is not necessary to change other lines.
Minimum preparation of configuration files
/etc/fstab
# UNCONFIGURED FSTAB FOR BASE SYSTEM
/dev/sda1 / ext3 defaults,errors=remount-ro 0 1
#/dev/sda3 / ext2 defaults 0 0
/dev/sda3 /share ext3 defaults 0 0
/dev/sda2 swap swap defaults 0 0
Note: sda2 and sda3 is optional.
/etc/network/interfaces
# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
# /usr/share/doc/ifupdown/examples for more information.
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.11.128
netmask 255.255.255.0
gateway 192.168.11.1
Note: Assuming the LANDISK will be 192.168.11.128/24
(Continue)
Install base package
#wget http://iohack.sourceforge.jp/kogiidena/debian26/base/base26-sh4-20070709-etch.tgz
#tar zxf [download folder]/base26-sh4-20070709-etch.tgz -C /mnt
#mv /mnt/debian26/* /mnt/
#rm -r /mnt/debian26
Landisk Tools install
#wget http://iohack.sourceforge.jp/kogiidena/debian26/base/landisk-tools-20070516.tgz
#tar zxf [downloaded folder]/landisk-tools-20070516.tgz -C /mnt
(Continue)
Make the partitions on target HDD
Assuming that the HDD is shown as /dev/sda on another linux PC
#cfdisk /dev/sda (Secure the first partition under 8GB as FS type 83[Linux ext2])
Note: sh-lilo understands only under 1023 cylinders. Therefore the boot partition must be under 8GB.
#mke2fs /dev/sda1 (Format sda1 as ext2)
#mount /dev/sda1 /mnt (Mount the boot partition to /mnt )
(Continue)
apt-get install ncurses-dev ncurses-base ncurses-bin ncurses-term libncurses5-dev
a. Set the partitions
b. Download and extract the "base26-sh4-20070709-etch.tgz"
c. Download and extract the "landisk-tools-20070516.tgz"
d. Download the "sh4-lilo-001126.tar.gz" and cross-compile for "boot.b"
e. Connect HDD to PC and execute "lilo.x86" with appropriate "lilo.cross" and "boot.b"
f. Edit necessary configuration file
g. Connect HDD to LANDISK and power on