These are very brief instructions on installing the Debian 2.0 m68k linux distribution on a Motorola MVME147, 162, 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). There is a mvme147.txt file with specific instructions for that board. 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 a copy up 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. 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 pull base2_0.tgz over from an NFS mounted host filesystem. NOTE: THE CURRENT RAMDISK ONLY WORKS WITH 2.0 KERNELS 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 you can configure it with 'init=/bin/sh' in the parameters so that it boots in to a shell; otherwise it will boot up as a standard Debian install disk. 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.0 MACHINE BVME6000 CPUTYPE 68060 FPU Yes RAMSIZE 0x00800000 RDBASE 0x00600000 RDSIZE 1843200 CMNDLINE root=/dev/ramdisk init=/bin/sh =================================== cut ================================= With later versions of 16xcfg you can combine the kernel and ramdisk in to one download image. The /dev/console device in the ramdisk is configured for use with a 2.0.xx kernel. If you are using a ramdisk and an NFS mount, then the procedure looks something like this: Configure the kernel with 16xcfg. Load kernel and ramdisk image in to memory. Start the kernel (go XXX, where XXX is 0x800 above the address you loaded the kernel at), producing output similar to the following: =================================== cut ================================= 147-Bug>g 10800 Effective address: 00010800 ABCDJKLMN Bootinfo: machtype=0x7 cputype=0x42 Ramdisk size=0x708 addr=0x200000 Command Line= Memory: NumBlocks=1 Block 1: size=0x1000000 addr=0x0 DEBUG: request_irq: irq=0x48 flags=0x2 devname=timer 1 handler=0x5e70 Calibrating delay loop.. ok - 3.92 BogoMIPS Memory: 13616k/16384k available (476k kernel code, 492k 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) #19 Sat Dec 5 22: 08:26 GMT 1998 Starting kswapd v 1.4.2.2 M68K Serial driver version 1.01 ttyS0 at 0xfffe3002: SCC w/o DMA calling SCC_init_port for line 0, 0xfffe3002 DEBUG: request_irq: irq=0x43 flags=0x2 devname=MVME147 SCC handler=0x625fe ttyS1 at 0xfffe3000: SCC w/o DMA calling SCC_init_port for line 1, 0xfffe3000 Ramdisk driver initialized : 16 ramdisks of 4096K size loop: registered device at major 7 wd33c93-0: chip=unknown/255 no_sync=0xff no_dma=0 debug_flags=0x00 setup_args=,,,,,,,,, Version 1.25 - 09/Jul/1997, Compiled Dec 5 1998 at 22:20:45 DEBUG: request_irq: irq=0x45 flags=0x2 devname=MVME147 SCSI PORT handler=0x75e44 DEBUG: request_irq: irq=0x46 flags=0x2 devname=MVME147 SCSI DMA handler=0x75e44 --UNKNOWN INTERRUPT:80:00:00--MVME147 Scsi interface installed scsi0 : MVME147 built-in SCSI scsi : 1 host. Vendor: FUJITSU Model: M2614S Rev: M606 Type: Direct-Access ANSI SCSI revision: 01 CCS Detected scsi disk sda at scsi0, channel 0, id 0, lun 0 Vendor: FUJITSU Model: M2614S Rev: M606 Type: Direct-Access ANSI SCSI revision: 01 CCS Detected scsi disk sdb at scsi0, channel 0, id 1, lun 0 Vendor: SEAGATE Model: ST11200N Rev: 9520 Type: Direct-Access ANSI SCSI revision: 02 Detected scsi disk sdc at scsi0, channel 0, id 2, lun 0 Vendor: ARCHIVE Model: VIPER 150 21247 Rev: -011 Type: Sequential-Access ANSI SCSI revision: 01 Detected scsi tape st0 at scsi0, channel 0, id 6, lun 0 scsi : detected 1 SCSI tape 3 SCSI disks total. SCSI device sda: hdwr sector= 512 bytes. Sectors= 352176 [171 MB] [0.2 GB] SCSI device sdb: hdwr sector= 512 bytes. Sectors= 352176 [171 MB] [0.2 GB] SCSI device sdc: hdwr sector= 512 bytes. Sectors= 2059938 [1005 MB] [1.0 GB] eth0: MVME147 at 0xfffe1800, Hardware Address 08:00:3e:a5:a5:a5 eth0: Using buffers at 0xff0000 Partition check: sda: DOS sda1 sda2 sdb: unknown partition table sdc: DOS sdc1 sdc2 sdc3 sdc4 < sdc5 sdc6 sdc7 > RAMDISK: Minix filesystem found at block 0 RAMDISK: Loading 1800 blocks into ram disk... done. VFS: Mounted root (minix filesystem). You are running "ash", a Bourne-shell clone. The root filesystem is a RAM disk or floppy disk. The hard disk filesystems are mounted under "/target". The editor available to you on this floppy is "ae". It's very small and easy to figure out - sorry but "vi" and "emacs" wouldn't fit. To get an idea of what Unix utilities are available to you, run "ls /bin /sbin /usr/bin /usr/sbin". The key combination Alt-F1 switches to the first console window, and Alt-F2 switches to the second one. # =================================== cut ================================= Then you can run pmac-fdisk to partition your harddisk: =================================== cut ================================= # pmac-fdisk /dev/sda 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, although this is really redundant now vmelilo is available. Next you can set up your swap space and filesystem partitions, mount the file system, bring up the ethernet interface, and use nfs 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 eth0 10.1.1.4 up # route add -net 10.0.0.0 # mkdir /nfs # mount 10.1.1.1:/tftpboot /nfs # cd /mnt # cp /nfs/base2_0.tgz . # =================================== 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. 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 # 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. VMELILO is available, and should be used, once you have the local disk up and running. Note that if you have problems with scsi, then you can add "53c7xx=nosync:0,nodisconnect:0" (without the quotes) to the CMNDLINE (not for MVME147). 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 12 Dec 1998