These are very brief instructions on installing the Debian 2.0 m68k linux distribution on a Motorola MVME162, 166, 167, 172, or 177 board, or on a BVME4000 or BVME6000 board from BVM Ltd. For 2.1.xx, a single kernel image will boot on any of the Motorola boards, or on the BVM boards, provided it is configured correctly with the 16xcfg utility. For 2.0.xx a different kernel is needed for each class of board. Please see the hwconfig.txt file for details of how to configure the boards (hardware patches and Bug settings). Please note that Debian 2.0 has not been released yet so you should expect some rough corners. Beta versions are available on the web. Also note that there may be problems installing debian packages with a 2.1.xx kernel, due to changes in the kernel regarding chown-ing via symbolic links. There may also be problems with the debian install scripts trying to create links to files before installing the files. If you install Debian you will have more success doing your package installations with a 2.0 kernel for the time being. The base Debian file system is provided as a tar-gzip archive, called base2_0.tgz. I picked up a March 1998 Debian base filesystem from: That filesystem is sufficient to boot in to multi-user, but if you want to do much else (eg. gcc), you will need to install extra packages. I usually get mine from: You can find a list of some useful packages at the end of this file. Packages.gz is a good file to get first - it lists all available packages. You will need to read up on the Debian package installer, dpkg, if you are not familiar with it. I have always used dpkg, rather than the dselect front end. As the Debian stuff is all pre-release, you may want to subscribe to the Debian maillists (debian-68k-request@lists.debian.org). See www.debian.org for general Debian information. My ports of linux for VME systems assume you are using an MSDOS-style partition table format; the pmac-fdisk binary in base2_0.tgz handles that format. For now I assume you will use one of the following installation methods: 1. Partition your disk and create the root file system on a Linux PC, and then move the disk to your VME system, or 2. NFS mount all file systems from some server and run without a local disk. 3. NFS mount the base2_0.tgz file system and use that to set up a local disk. 4. Boot from a RAMDISK and use that to install and configure a local disk. This would probably use tftp to pull base2_0.tgz over from a host system. NOTE: THE RAMDISK ONLY WORKS WITH THE 2.1.101 KERNEL If you are going to NFS mount your root file system, you need to export it from your host. For my linux PC I had to have the nfsd and mountd deamon running, and I also added my 166 board into the PCs /etc/hosts file, and entries to /etc/exports to allow access from my local LAN as follows: > /tftpboot 10.1.1.0/255.255.255.0(no_root_squash) After changing /etc/exports I had to restart nfsd and mountd. You should also read linux/Documentation/nfsroot.txt in a relevant kernel source tree. Having configured your hardware, the next thing you need to do is to configure your kernel image. That is done with the 16xcfg utility, available, with instructions, from my web site. The current 16xcfg utility handles Motorola and BVM boards, and both 2.0.xx and 2.1.xx kernels. If you are using the RAMDISK, it is important that you configure it with 'single' in the parameters, so that it boots in to a shell. The ramdisk image is about 1.8MB, and you need an 8MB board to use it. I normally load the kernel at address 0x00000000, and the ramdisk image (after uncompressing it) at address 0x00600000 (6MB). I would then use a 16xcfg config file something like the following: =================================== cut ================================= KERNEL 2.1 MACHINE BVME6000 CPUTYPE 68060 FPU Yes RAMSIZE 0x00800000 RDBASE 0x00600000 RDSIZE 1843200 CMNDLINE root=/dev/ramdisk single console=ttyS0,19200 =================================== cut ================================= The /dev/console device in the ramdisk is configured for use with a 2.1.xx kernel. If you are using a ramdisk and tftp, then the procedure looks something like this: Configure the kernel with 16xcfg. Load kernel anbd ramdisk image in to memory. 'g 800' at the Bug prompt, producing output similar to the following: =================================== cut ================================= ABCDFJLMN Linux version 2.1.101 (richard@rgh68k) (gcc version 2.7.2.3) #25 Thu May 28 20:3 8:32 GMT 1998 Board is not configured as a System Controller Calibrating delay loop... 99.53 BogoMIPS Memory: 5212k/8192k available (844k kernel code, 308k data, 28k init) kmem_create: Forcing size word alignment - uid_cache kmem_create: Forcing size word alignment - vm_area_struct kmem_create: Forcing size word alignment - filp Swansea University Computer Society NET3.039 for Linux 2.1 kmem_create: Forcing size word alignment - skbuff_head_cache NET3: Unix domain sockets 0.16 for Linux NET3.038. Swansea University Computer Society TCP/IP for NET3.037 IP Protocols: ICMP, UDP, TCP POSIX conformance testing by UNIFIX Starting kswapd v 1.5 M68K Serial driver version 1.01 ttyS1 at 0xffb00003: SCC on BVME ttyS0 at 0xffb0000b: SCC on BVME lp_init: lp using interrupt driver lp0: Builtin parallel port at 0xffa00000 DP8570A Real Time Clock Driver v1.00 Ramdisk driver initialized : 16 ramdisks of 4096K size loop: registered device at major 7 scsi-ncr53c7xx : NCR53c710 at memory 0xff000000, io 0x0, irq 27 scsi: Registered size increased by 256 to 9172 scsi: CmdPageStart = 0x20 scsi: tmp = 0x007d9018, hostdata->free set to 0x007d9020 scsi0: Revision 0x1 scsi0 : NCR code relocated to 0x7d864c (virt 0x007d864c) scsi0 : test 1 started scsi0 : BVME6000 NCR53c710 SCSI scsi : 1 host. scsi0 : target 1 accepting period 200ns offset 7 5.00MHz synchronous SCSI scsi0 : setting target 1 to period 200ns offset 7 5.00MHz synchronous SCSI Vendor: SEAGATE Model: ST1239N Rev: 9233 Type: Direct-Access ANSI SCSI revision: 01 CCS Detected scsi disk sda at scsi0, channel 0, id 1, lun 0 scsi0 : target 2 rejected SDTR scsi0 : setting target 2 to asynchronous SCSI Vendor: TEAC Model: FC-1 HF 10 Rev: RV D Type: Direct-Access ANSI SCSI revision: 01 CCS Detected scsi removable disk sdb at scsi0, channel 0, id 2, lun 0 scsi0 : target 3 accepting period 248ns offset 8 4.03MHz synchronous SCSI scsi0 : setting target 3 to period 248ns offset 8 4.03MHz synchronous SCSI Vendor: SONY Model: CD-ROM CDU-55S Rev: 1.0t Type: CD-ROM ANSI SCSI revision: 02 Detected scsi CD-ROM sr0 at scsi0, channel 0, id 3, lun 0 scsi : detected 1 SCSI cdrom 2 SCSI disks total. Uniform CD-ROM driver Revision: 2.12 SCSI device sda: hdwr sector= 512 bytes. Sectors= 398790 [194 MB] [0.2 GB] SCSI device sdb: hdwr sector= 512 bytes. Sectors= 2880 [1 MB] [0.0 GB] sdb: Write Protect is off eth0: Apricot 82596 at 0xff100000, 08 00 3E 21 DB 99 IRQ 26. apricot.c:v0.3 27/11/97 eth0: lp at 0x007c9430, lp->scb at 0x007c9444 eth0: i596_open() irq 26. eth0: init_rx_bufs 16. eth0: starting i82596. eth0: set multicast list, 0 entries, promisc OFF, allmulti OFF eth0: Time 0. eth0: set multicast list, 0 entries, promisc OFF, allmulti OFF IP-Config: Incomplete network configuration information. eth0: set multicast list, 0 entries, promisc OFF, allmulti OFF eth0: Shutting down ethercard, status was 0040. eth0: i596 interrupt receive unit inactive 0. Partition check: sda: DOS sdb: unknown partition table RAMDISK: Minix filesystem found at block 0 RAMDISK: Loading 1800 blocks [1 disk] into ram disk... done. VFS: Mounted root (minix filesystem). mounting /proc ... done. sh: can't access tty; job control turned off # =================================== cut ================================= IMPORTANT: The next thing you should do is start the update daemon: =================================== cut ================================= # update =================================== cut ================================= Then you can run fdisk to partition your harddisk: =================================== cut ================================= # fdisk Using /dev/sda as default device! Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-1017): 17 Last cylinder or +size or +sizeM or +sizeK ([17]-1017): 920 Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 2 First cylinder (1-1017): 921 Last cylinder or +size or +sizeM or +sizeK ([921]-1017): 1017 Command (m for help): t Partition number (1-4): 2 Hex code (type L to list codes): 82 Changed system type of partition 2 to 82 (Linux swap) Command (m for help): p Disk /dev/sda: 7 heads, 56 sectors, 1017 cylinders Units = cylinders of 392 * 512 bytes Device Boot Begin Start End Blocks Id System /dev/sda1 17 17 920 177184 83 Linux native /dev/sda2 921 921 1017 19012 82 Linux swap Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. (Reboot to ensure the partition table has been updated.) SCSI device sda: hdwr sector= 512 bytes. Sectors= 398790 [194 MB] [0.2 GB] sda: DOS sda1 sda2 SCSI device sda: hdwr sector= 512 bytes. Sectors= 398790 [194 MB] [0.2 GB] sda: DOS sda1 sda2 Syncing disks. WARNING: If you have created or modified any DOS 6.x partitions, please see the fdisk manual page for additional information. # =================================== cut ================================= I left a few cylinders free at the start of the disk, as somewhere to save a raw kernel image for later booting. Next you can set up your swap space and filesystem partitions, mount the file system, bring up the ethernet interface, and use tftp to pull the base2_0.tgz archive across: =================================== cut ================================= # mkswap /dev/sda2 Setting up swapspace, size = 19464192 bytes # swapon /dev/sda2 Adding Swap: 19008k swap-space (priority -1) # # # mke2fs /dev/sda1 mke2fs 1.10, 24-Apr-97 for EXT2 FS 0.5b, 95/08/09 Linux ext2 filesystem format Filesystem label= 44352 inodes, 177184 blocks 8859 blocks (5.00%) reserved for the super user First data block=1 Block size=1024 (log=0) Fragment size=1024 (log=0) 22 block groups 8192 blocks per group, 8192 fragments per group 2016 inodes per group Superblock backups stored on blocks: 8193, 16385, 24577, 32769, 40961, 49153, 57345, 65537, 73729, 81921, 90113, 98305, 106497, 114689, 122881, 131073, 139265, 147457, 155649, 163841, 172033 Writing inode tables: done Writing superblocks and filesystem accounting information: done # mount /dev/sda1 /mnt # # # ifconfig lo 127.0.0.1 up # ifconfig eth0 10.1.1.4 up eth0: i596_open() irq 26. eth0: init_rx_bufs 16. eth0: starting i82596. eth0: set multicast list, 0 entries, promisc OFF, allmulti OFF eth0: Time 0. eth0: set multicast list, 1 entries, promisc OFF, allmulti OFF eth0: Adding address 01:00:5e:00:00:01 eth0: set multicast list, 1 entries, promisc OFF, allmulti OFF eth0: Adding address 01:00:5e:00:00:01 eth0: set multicast list, 1 entries, promisc OFF, allmulti OFF eth0: Adding address 01:00:5e:00:00:01 # # # cd /mnt # tftp 10.1.1.1 tftp> get base2_0.tgz Received 7187487 bytes in 86.0 seconds tftp> quit # =================================== cut ================================= You can then unpack the base file system on to your partition with some thing like # zcat < base2_0.tgz | star 'star' is a minimal 'tar'. Having unpacked base2_0.tgz, you need to make a few modifications before you can try to boot from it. These changes are necessary regardless of which installation method you use. If you are booted from a ramdisk, then the editor is 'ae'. Invoke it as 'vi' and use the on-screen help for driving instructions. NOTE: commands like ':q' don't echo to the screen. NOTE: You probably have to type '^J' in place of the more normal carriage return after a ':q'. NOTE: Even worse, if you enter new lines in a file with the editor, you have to terminate them with '^J' rather than , otherwise you end up with ^M on the end of each line. The changes are as follows (lines starting with '#' are comments): # sbin/unconfigured.sh is part of the offical Debian install process, and # not needed here rm sbin/unconfigured.sh # If you are going to boot a 2.1 kernel you need to fix /dev/console. The # following four lines are not required for a 2.0 kernel. rm -f dev/console mknod dev/console c 5 1 chmod 622 dev/console chown root.tty dev/console # fails if running from ramdisk # Set up etc/fstab; contents vary depending on your configuration. For an # NFS root you probably only want a 'proc' entry - otherwise you may need # 'root' and 'swap' entries. echo "/dev/sda1 / ext2 defaults 0 1" > etc/fstab echo "/dev/sda2 none swap sw 0 0" >> etc/fstab echo "proc /proc proc defaults 0 0" >> etc/fstab # Allow root login from serial port 0 -very important! echo ttyS0 > etc/securetty # Add entries to etc/hosts and etc/hostname. My system is called nfs68k, on # 10.1.1.9. echo "127.0.0.1 localhost" > etc/hosts echo "10.1.1.1 sleepie" >> etc/hosts echo "10.1.1.9 nfs68k" >> etc/hosts echo nfs68k > etc/hostname # In etc/inittab, remove the gettys on tty[1-6] and add the following line: T0:2345:respawn:/sbin/getty -L ttyS0 19200 vt100 # Created etc/init.d/network, similar to the following example: ======================== cut ============================================ #! /bin/sh # # network Establish the network connection. # # Version: @(#)network 1.2 14-Nov-1996 miquels@cistron.nl # # Configure the loopback device. ifconfig lo 127.0.0.1 route add -net 127.0.0.0 dev lo # Configure the ethernet device or start SLIP/PPP below. IPADDR="10.1.1.9" # Your IP address. NETMASK="255.0.0.0" # Your netmask. NETWORK="10.0.0.0" # Your network address. BROADCAST="10.255.255.255" # Your broadcast address (blank if none). GATEWAY="" # Your gateway address. /sbin/ifconfig eth0 ${IPADDR} netmask ${NETMASK} broadcast ${BROADCAST} /sbin/route add -net ${NETWORK} [ ! -z "$GATEWAY" ] && /sbin/route add default gw ${GATEWAY} ======================== cut ============================================ # Set access permissions: chmod 755 etc/init.d/network # End of modifications. Unmount the new file system before rebooting. You should now be able to boot your system. To do that you have to get your configured kernel in to memory on the board at address 0, and then 'go' it from address 800. You can use various methods to load the kernel, depending on your configuration; tftp works well, as does 'raw-writing' the kernel to some sectors of a disk and using the on-board Bug to read it in. A later section on this document details how you might set up a boot floppy on a BVM system. I usually leave a few megabytes spare before the first partition on my harddisk, and store the kernel there. Both Motorola and BVM Bug PROMS can be configured to load a set of sectors in to memory and execute them on reset. BVM supply a version of LILO, for use with their boards. Note that if you have problems with scsi, then you can add "53c7xx=nosync:0,nodisconnect:0" (without the quotes) to the CMNDLINE. Having booted the system log in as root, set your password, etc. Quit dselect, log in again and run tzconfig to set your timezone. The system bootup messages should look something like this (a 2.0.xx kernel on a BVME6000 booting over NFS in this case): =========================================================================== dump: g 800 ABCDFJLMN Board is not configured as a System Controller Calibrating delay loop.. ok - 99.53 BogoMIPS Memory: 7152k/8192k available (636k kernel code, 404k data) Swansea University Computer Society NET3.035 for Linux 2.0 NET3: Unix domain sockets 0.13 for Linux NET3.035. Swansea University Computer Society TCP/IP for NET3.034 IP Protocols: ICMP, UDP, TCP Linux version 2.0.33pl1 (richard@rgh68k) (gcc version 2.7.2.3) #13 Sat May 2 20:54:59 GMT 1998 Starting kswapd v 1.4.2.2 M68K Serial driver version 1.01 ttyS1 at 0xffb00003: SCC w/o DMA ttyS0 at 0xffb0000b: SCC w/o DMA DP8570A Real Time Clock Driver v1.00 Ramdisk driver initialized : 16 ramdisks of 4096K size loop: registered device at major 7 scsi: Registered size increased by 256 to 12288 scsi: CmdPageStart = 0xe8 scsi: tmp = 0x00119fa8, hostdata->free set to 0x00119fe8 scsi: hostdata[0] = 0x01150976 scsi0: Revision 0x1 scsi0 : NCR code relocated to 0x1195dc (virt 0x001195dc) scsi0 : test 1 started scsi0 : BVME6000 SCSI scsi : 1 host. scsi0 : target 1 accepting asynchronous SCSI scsi0 : setting target 1 to asynchronous SCSI Vendor: SEAGATE Model: ST1239N Rev: 9233 Type: Direct-Access ANSI SCSI revision: 01 CCS Detected scsi disk sda at scsi0, channel 0, id 1, lun 0 scsi0 : target 2 rejected SDTR scsi0 : setting target 2 to asynchronous SCSI Vendor: TEAC Model: FC-1 HF 10 Rev: RV D Type: Direct-Access ANSI SCSI revision: 01 CCS Detected scsi removable disk sdb at scsi0, channel 0, id 2, lun 0 scsi0 : target 3 accepting asynchronous SCSI scsi0 : setting target 3 to asynchronous SCSI Vendor: SONY Model: CD-ROM CDU-55S Rev: 1.0t Type: CD-ROM ANSI SCSI revision: 02 Detected scsi CD-ROM sr0 at scsi0, channel 0, id 3, lun 0 scsi : detected 1 SCSI cdrom 2 SCSI disks total. SCSI device sda: hdwr sector= 512 bytes. Sectors= 398790 [194 MB] [0.2 GB] SCSI device sdb: hdwr sector= 512 bytes. Sectors= 2880 [1 MB] [0.0 GB] sdb: Write Protect is off eth0: Apricot 82596 at 0xff100000, 08 00 3E 21 DB 99 IRQ 26. apricot.c:v0.2 05/12/94 eth0: lp at 0x007f7000, size 2920, lp->scb at 0x007f7014 Partition check: sda: unknown partition table sdb: unknown partition table Root-NFS: Got file handle for /tftpboot/debian-fs via RPC VFS: Mounted root (nfs filesystem). INIT: version 2.73 booting Loading /etc/kbd/default.map.gz Couldnt get a file descriptor referring to the console Activating swap... mount: can't find / in /etc/mtab or /etc/fstab *** ERROR! Cannot fsck root fs because it is not mounted read-only! mount: can't find / in /etc/mtab or /etc/fstab mount: can't find / in /etc/mtab or /etc/fstab WARNING: no modules present for this kernel Checking all file systems... WARNING: Your /etc/fstab does not contain the fsck passno field. I will kludge around things for you, but you should fix your /etc/fstab file as soon as you can. Parallelizing fsck version 1.10 (24-Apr-97) Mounting local file systems... not mounted anything Mounting remote file systems... Local time: Sat May 2 22:45:39 BST 1998 Cleaning: /tmp /var/lock /var/run . Initializing random number generator... done. INIT: Entering runlevel: 2 Starting system log daemon: syslogd klogd. Starting base networking daemons: portmap inetd. Debian GNU/Linux 2.0 (unstable) nfs68k ttyS0 nfs68k login: =========================================================================== Assuming that was an NFS boot, you might then want to go on and partition a local harddisk and make file systems, as detailed above. From the base file system you use pmac-fdisk in place of fdisk. Finally you can now boot off you harddisk and use 'dpkg -i ' to install some useful packages. When I tried to install packages on to an NFS mounted root file system, as you would if you were going to be fully NFS based, I hit a problem where each run of 'dpkg -i' reported: > nfs_stat_to_errno: bad nfs status return value: 39 > dpkg: error while cleaning up: > failed to rmdir/unlink `/var/lib/dpkg/tmp.ci': Input/output error and then dpkg would error onthe next run because /var/lib/dpkg/tmp.ci existed. I got round this by doing > rm -rf /var/lib/dpkg/tmp.ci after each dpkg -i run. =========================================================================== =========================================================================== Notes specific to the BVM board: I am booting new kernels for the BVM board from a SCSI floppy. I assume you have BVMbug PROMs in your board (I have rev-D). First you need to configure the boot record on your floppy, as follows: > BVMBug: br > > WARNING: This disk does not contain a valid boot record > > Do you want to create a new boot record? (y or n) : y > Linear boot image start sector : 2 > Linear boot image size in sectors : a00 > Boot image load address : 0 > Does the boot image begin with a vector table? (y or n) : y > > Enter post boot message one line at a time, enter a > single period '.' on a line by itself to finish: > > - Linux 2.1.90 for BVM > - . > > Linear boot image starts at logical sector 2 (0x2). > Boot image is 1310720 bytes long, 2560 (0xA00) sectors. > Boot image will be loaded at address 0x00000000. > Control will be passed to the boot image by using the reset SP and PC > values from the vector table of the loaded data. > The following message will be displayed during boot: > - Linux 2.1.90 for BVM > > Do you want to save these changes? (y or n) : y > > Changes saved > BVMBug: Then you have to write the kernel to the floppy (after running 16xcfg on it). Uncompress the kernel first! I did this on my Linux PC: dd if=vmlinux of=/dev/fd0 bs=1k seek=1 Then you should be able to boot from the floppy with a "bog " command. ========================================================================== The following set of packages are a good starting point - they let you compile and debug 'C' programs. I had to upgrade perl-base, but you may not have to if you found a newer base2_0.tgz image. ./base/perl-base_5.004.04-5.deb ./text/groff_1.11a-2.deb ./libs/libdb2_2.3.16-3.deb ./doc/man-db_2.3.10-62.deb ./doc/manpages-dev_1.18-2.deb ./doc/manpages_1.18-2.deb ./interpreters/cpp_2.7.2.3-3.deb ./interpreters/perl_5.004.04-5.deb ./interpreters/gawk_3.0.3-0.3.deb ./interpreters/m4_1.4-8.deb ./devel/binutils_2.8.1.0.19-1.deb ./devel/gcc_2.7.2.3-3.deb ./devel/make_3.76.1-8.deb ./devel/gdb_4.16.85-2.deb ./devel/kernel-headers-2.0.33_2.0.33-4.deb ./devel/libc6-dev_2.0.7pre1-3.deb ./devel/ncurses3.4-dev_1.9.9g-8.deb ./editors/vim_5.0-0.1.deb ./net/netstd_3.03-1.deb ./comm/minicom_1.75-3.deb ./utils/patch_2.5-2.deb ./utils/strace_3.1-13.deb ========================================================================== richard@sleepie.demon.co.uk 5th May 1998