Instructions on installing Debian release 2.2 (potato) on a Motorola MVME147 board Richard Hirst $Id: mvme147-potato.txt,v 1.8 2000/08/22 09:20:15 richard Exp $ Introduction: Thanks to some excellent work by Nick Holgate, a Debian kernel and install package is now available for MVME147 boards. This procedure requires a board with at least 8MB of DRAM, a suitable TFTP and NFS server, a functional ethernet interface between the server and MVME147 board, and some terminal emulator driving the MVME147 serial port with the ability to download Motorola s-records. It also assumes that you have a local SCSI disk on the MVME147 and that you want to configure the system to boot from that disk. Typically an MVME712 distribution board set is used to interface SCSI, serial ports, network, etc to the MVME147 P2 connector. It may be possible to install on to an NFS mounted root partitoin, but I havn't verified that yet. I use an Intel PC running Linux as the server and minicom on that server to drive the MVME147 serial console port. If you have only 4MB of DRAM then you cannot use this proceedure, but it is still possible to run Debian 2.2 on the board (assuming a local disk for swap space). I intend to expand these instructions to cover installation with only 4MB at a later date. For now, you could try and borrow a board with 8MB for the installation phase. Files needed: You need to gather a number of files from mine and Nicks web pages, and from a Debian ftp site. From you need: This file (mvme147-potato.txt) The source package for 16xcfg The source package for sboot From a Debian ftp site (e.g. you need: debian/dists/potato/main/disks-m68k/current/base2_2.tgz (15MB) From Nicks page, you need mvme147-install-kit/bf-mvme147_2.2.16_m68k.tar.gz Which should be expanded (with 'gzip -dc | tar xf -') in to the following files: mvme147/ mvme147/images-1.44/ mvme147/images-1.44/rescue.bin mvme147/images-1.44/root.bin mvme147/images-1.44/driver.bin mvme147/drivers.tgz mvme147/sysmap.gz mvme147/install.txt mvme147/linuxmvme147 (the kernel image) mvme147/rootmvme147.bin (the install ramdisk) Note that the install.txt found there is for an MVME16x board, so is not completely accurate for MVME147 boards. Combining that document with this one should be enough to get you going. Study install.txt carefully. You may also want to get (from a Debian archive) debian/dists/woody/main/binary-m68k/devel/kernel-patch-2.2.10-m68k_2.2.10-7.deb Which will be needed if you wish to rebuild the kernel. Initial setup: Set up your MVME147 with a serial link and network link to the the server. Run minicom (or similar terminal emulator) on the server and verify that you can talk to 147-Bug. You should run the serial port at 9600 baud, 8 bit, no parity, because sboot will reinitialise the port with those parameters anyway. You will need to know the MAC (LAN Station Address) of the MVME147 ethernet port, which you can get using the LSAD command under 147-Bug: 147-Bug>lsad LAN Station Address = $08003E25A5A5 To set the Station Address: Enter the code located on the back of the front panel $08003E2_____ 147-Bug> Vierify that the MVME147 can see the local disk with the IOT;H command: 147-Bug>iot;h Disk Controllers Available LUN Type Address # dev 0 VME147 $FFFE4000 1 SCSI Addr = 0 - SEAGATE ST11200N 9520 1 VME147 $FFFE4000 1 SCSI Addr = 1 2 VME147 $FFFE4000 1 SCSI Addr = 2 3 VME147 $FFFE4000 1 SCSI Addr = 3 4 VME147 $FFFE4000 1 SCSI Addr = 4 5 VME147 $FFFE4000 1 SCSI Addr = 5 6 VME147 $FFFE4000 1 SCSI Addr = 6 VME147 $FFFE4000 * SCSI Addr = 7 147-Bug> You can verify that you can access the local SCSI disk with the IOP command: 147-Bug>iop Controller LUN =00? Device LUN =00? Read/Write/Format=R? Memory Address =00004000? Starting Block =00000000? Number of Blocks =0002? Address Modifier =00? 147-Bug> Entering to each of the prompts accepts the default answer and will read 512 bytes from SCSI ID 0 to memory at 0x4000. Building 16xcfg: 16xcfg is a utility that we will use to combine the kernel and ramdisk in to one downloadable file, and provide the kernel with relevant parameters for memory size, etc. You should have downloaded a file with a name similar to 16xcfg-981129.tgz. Unpack that on the server, and compile the 16xcfg.c source file: $ tar xzf /share/16xcfg-981129.tgz $ cd 16xcfg $ gcc -Wall -o 16xcfg 16xcfg.c $ ./16xcfg -h -- ./16xcfg version 6 -- Usage: ./16xcfg [options] -a File with answers to use -d File with default answers -k Kernel file to patch -l Loader file -s File to save answers -r RamDisk image to append to kernel Defaults are '-k vmlinux -l loader.bin' $ Building sboot: sboot is a small code module that must be loaded in to the MVME147 DRAM as s-records via the serial console. That done, the large kernel and ramdisk image can be downloaded over the network, using tftp. sboot is code I picked up from a NetBSD site, developed by Charles D. Cranor and Seth Widoff - I have only made small modifications to it. You will not in fact need to build sboot; simply unpack the sboot-??????.tgz file you downloaded. The only file of interest is sboot.srec which you should find within it: $ tar xzf /share/sboot-981212.tgz $ ls sboot .... .... sboot.srec .... .... $ Extracting the kernel: The linuxmvme147 kernel you downloaded as part of the install package is a gzipped image and must be decompressed before use: $ zcat linuxmvme147 > vm147-2210 $ Running 16xcfg: 16xcfg will overwrite the kernel image with a new kernel plus ramdisk image, so it is a good idea to make a copy of the kernel first. The ramdisk image, rootmvme147.bin, should be a gzipped image, and should NOT be decompressed before use. You must then run 16xcfg pointing it at the relevant files and answering the questions in a similar way to that shown below: $ cp vm147-2210 vm147-2210rd $ 16xcfg/16xcfg -l 16xcfg/loader.bin -k vm147-2210rd -r rootmvme147.bin -s 147rd.cfg Kernel (2.0,2.1) [2.0]? 2.1 Machine (MVME131,MVME147,MVME16x,BVME6000) [MVME16x]? mvme147 CPU type (68020,68030,68040,68060) [68040]? 68030 FPU present (No,Yes) [Yes]? yes RAM size [0x00400000]? 0x800000 RAMDISK base (0 for none) [0x00000000]? 0x400000 RAMDISK length [0x00000000]? 0x100000 Cmndline parameters [root=/dev/sda1 ro console=ttyS0,19200]? root=/dev/ramdisk $ Specifying '-s 147rd.cfg' made 16xcfg save the answers you gave in a file, so that on subsequent runs you can use '-d 147rd.cfg' to get more useful default answers. The ram size you can change if you have more that 8MB. The ramdisk size just needs to be 'big enough', so 0x100000 (1MB) is sufficient. You should now have a file vm147-2210rd which is about 2MB long. Loading the ARP and RARP caches on the server: Because of limitations in sboot, you need to load the ARP and RARP caches on the server with entries for the MVME147 board. On my Linux server I can do that as follows: $ rarp -s mvme147 08:00:3e:25:a5:a5 $ arp -s mvme147 08:00:3e:25:a5:a5 $ I had previously added an entry 'mvme147 10.1.1.7' to my servers /etc/hosts file; if you don't have such an entry you can substitute an IP address in the above commands. 'arp -a' and 'rarp -a' will display the cache entries. The string 08:00:... is the MVME147 MAC address; you can find the value for your board with the LSAD command as described above. Configuring a TFTP and NFS server: It is difficult to spell out exactly how to configure these services, as it varies from server to server. For TFTP, you may need to edit /etc/inetd.conf to enable the tftp line as it is often disabled by default. Check that it seems to work by using some a tftp client from some other machine on your network. For NFS, you generally need portmap, nfsd and mountd services running, and you need to add an entry for the exprted file system to /etc/exports. Loading sboot.srec: The next stage is to load the sboot.srec module. In minicom, at the 147-Bug> prompt, type 'LO 0'. That tells 147-Bug to expect s-records to be loaded on port 0 (the console port). Now enter followed by to suspend minicom. Ctrl-Z is the default attention key; yours may be different. You should now have a shell prompt. Now send the s-records to the serial port with a command similar to $ cat sboot/sboot.srec > /dev/ttyS1 $ Change ttyS1 to match your configuration. That takes about 30 seonds to complete. Once you get the shell prompt back, enter 'fg' to resume your minicom session. 147-Bug should be prompting you for more input; start the sboot code, and use the 'i', 'a', 'l', and 'e' commands to initialise the chip, do the reverse arp lookup, load the kernel and ramdisk, and exit back to the 147-Bug prompt: 147-Bug>g 8000 Effective address: 00008000 sboot: serial line bootstrap program (&end = ae20) >>> i // initialise chip le0: ethernet address: 8:0:3e:25:a5:a5 >>> a // reverse arp My ip address is: 10.1.1.7 Server ip address is: 10.1.1.6 >>> l 10000 /tftpboot/vm147-2210rd // load a file 1e1800 Download was a success! >>> e // exit to 147Bug exiting to ROM 147-Bug> You will likely have to copy your vm147-2210rd file to somewhere that the servers tftp demon will find it. Starting the kernel: You now start the kernel running; it should mount the ramdisk file system and start running the Debian installer: 147-Bug>g 10800 Effective address: 00010800 ABCGHIJ Linux version 2.2.10 (root@flash) (gcc version 2.7.2.3) #3 Fri Aug 18 05:31:28 BST 2000 Calibrating delay loop... 3.92 BogoMIPS Memory: 6084k/8192k available (744k kernel code, 304k data, 36k init) kmem_create: Forcing size word alignment - filp VFS: Diskquotas version dquot_6.4.0 initialized kmem_create: Forcing size word alignment - dquot POSIX conformance testing by UNIFIX Linux NET4.0 for Linux 2.2 Based upon Swansea University Computer Society NET3.039 kmem_create: Forcing size word alignment - skbuff_head_cache NET4: Unix domain sockets 1.0 for Linux NET4.0. NET4: Linux TCP/IP 1.0 for NET4.0 IP Protocols: ICMP, UDP, TCP kmem_create: Forcing size word alignment - tcp_open_request Starting kswapd v 1.5 M68K Serial driver version 1.01 ttyS1 at 0xfffe3000: SCC on MVME ttyS0 at 0xfffe3002: SCC on MVME pty: 256 Unix98 ptys configured RAM disk driver initialized: 16 RAM disks of 4096K size loop: registered device at major 7 Entering mvme147_detect Calling scsi_register Calling wd33c93_init wd33c93-0: chip=WD33c93/0 no_sync=0xff no_dma=0 debug_flags=0x00 setup_args=,,,,,,,,, Version 1.25 - 09/Jul/1997, Compiled Jul 12 2000 at 12:06:16 Calling request_irq Enabling scsi interrupt Enabling dma interrupt Leaving mvme147_detect scsi0 : MVME147 built-in SCSI scsi : 1 host. sending SDTR 0103015e00sync_xfer=30 Vendor: SEAGATE Model: ST11200N Rev: 9520 Type: Direct-Access ANSI SCSI revision: 02 Detected scsi disk sda at scsi0, channel 0, id 0, lun 0 scsi : detected 1 SCSI disk total. SCSI device sda: hdwr sector= 512 bytes. Sectors= 2059938 [1005 MB] [1.0 GB] eth0: MVME147 at 0xfffe1800, irq 68, Hardware Address 08:00:3e:25:a5:a5 IP-Config: Incomplete network configuration information. Partition check: sda: DOS sda1 sda2 RAMDISK: Compressed image found at block 0 There is a long pause here while the 68030 uncompresses the ramdisk image, then: VFS: Mounted root (ext2 filesystem). serial console detected. Disabling virtual terminals. init started: BusyBox v0.43 (2000.05.11-20:09+0000) multi-call binary modprobe: modprobe: Can't open dependencies file /lib/modules/2.2.10/modules.dep (No such file or directory) cannot create /dev/tty4: error 19 At this point the screen should clear and you should see the Debian 2.2 release notes: +----------------------------+ Release Notes +-----------------------------+ | Software in the Public Interest # | presents : | *** Debian GNU/Linux 2.2 *** : | : | This is the Debian Rescue floppy, version 2.2.13. : | Keep it once you have installed your system, as you can boot from it : | to repair the system on your hard disk if that ever becomes necessary. : | etc, etc, etc. Running the install: This stage should preceed pretty much as described in the Debian install.txt file you downloaded earlier, so I'll skip the fine detail. Your install medium will be nfs, and I found it convenient to save the files in the following directory structure, which should mirror that found on the Debian site: current --+ base2_2.tgz | + mvme147 ------+ drivers.tgz | + install.txt | + linuxmvme147 | + rootmvme147.bin | + images-1.44 -----+ rescue.bin I then specified 10.1.1.6://current as the source. Run through the install, until you get to the 'reboot system' prompt. The MVME147 should be reset, returning you to the 147-Bug> prompt. Enter 'BO' to boot the system from hard disk! Later you can use the 147-Bug 'AB' command to make the system boot automatically. This time it should boot up in to the second stage install, asking about md5 passwords on the first screen. Continue through the configuration screens (sometimes it takes several seconds to switch screens after pressing ). When I got to the "Apt Configuration" screen, I selected 'edit by hand' and verified that there were no apt sources enable din the config file. I saved and exited the editor, then selected 'advanced' for package selection. If you have internet access from the MVME147 you could try pointing apt at a real ftp server. I'm not experienced with apt, so you should read up on it and figure out the most appropriate configuration for yourself. You can grab individual .deb packages and install them with "dpkg -i ", if you wish. After several minutes you should get a final config screen, hit and wait another minute or two for a login prompt. RTC/NOVRAM battery failure: As MVME147 boards are often old, it is not uncommon for the battery in the RTC chip to fail. To get souch a board in to a sane state to try the Linux install you should use the following commands at the 147-Bug prompt: env;d // Sets the NOVRAM to default values lsad // Allows you to set the ethernet MAC address iot;t // Teach 147-Bug about attached disks set // Set time and date I did once find instructions on the web on how to cut open the RTC and sloder in a new battery; it was on a site relating to older Sun machines, I think. 147-Bug and Y2K: It seems that older versions of 147-Bug (pre version 2.44) will not let you set the date to the year 2000. As you cannot currently modify the hardware clock from within Linux, this is a problem. It can be overcome by manually patching the RTC registers from 147-Bug as follows: 147-Bug>time Monday 7/24/92 12:47:15 147-Bug>mm fffe07f8;b // Set the RTC write enable bit FFFE07F8 00? 80. 147-Bug>mm fffe07ff;b // Set the year byte to 00 FFFE07FF 92? 00. 147-Bug>mm fffe07f8;b // Clear the write enable bit FFFE07F8 80? 0. 147-Bug>time Monday 7/24/0 12:47:34 147-Bug>time Monday 7/24/0 12:47:38 147-Bug> Kernel building: If you want to rebuild the kernel, you will need to install the various development tools first. You then need to install the Debian m68k kernel source and patches. The packages I installed were: interpreters/perl-5.005_5.005.03-7.1.deb devel/kernel-source-2.2.10_2.2.10-1.deb utils/patch_2.5-2.2.deb devel/binutils_2.9.5.0.37-1.deb misc/kernel-package_7.04.potato.3.deb utils/dpkg-dev_1.6.13.deb utils/cpio_2.4.2-32.deb devel/make_3.78.1-8.deb libs/libelfg0_0.7.0-1.0.1.deb devel/gcc272_2.7.2.3-15.deb admin/sudo_1.6.2p2-1.deb devel/libc6-dev_2.1.3-10.deb devel/kernel-patch-2.2.10-m68k_2.2.10-7_all.deb (from dists/woody) I then proceeded as follows: cd /usr/src tar xzf kernel-source-2.2.10.tar.gz cd kernel-source-2.2.10 mkdir debian run-parts /usr/src/kernel-patches/m68k/2.2.10/apply cp ../kernel-patches/m68k/2.2.10/config.mvme147 .config make-kpkg --revision 2.2.10-rgh1 --subarch mvme147 --arch_in_name kernel_image The .deb is left in /usr/src. Beware that if you install this .deb it will overwrite /lib/modules/2.2.10 and /boot/vmlinuz-2.2.10. What's even worse, it wont then run vmelilo, leaving the boot block pointing at a deleted kernel image file. Be sure to run vmelilo before reboot to fix that. Of course, if your new kernel is broken, your machine will be unbootable, so it would be wise to duplicate /boot/vmlinuz-2.2.10 as vmlinuz-2.2.10-stable and create a new /etc/vmelilo.conf entry to reference it first. Rather than running make-kpkg, which produces a kernel-image.deb file, you might want to just build a kernel: make config make clean; make dep; make cp vmlinux /boot/new-kernel edit /etc/vmelilo.conf vmelilo -v Beware that the make-kpkg commadn above took 11.5 hours to run on my MVME147 with 32MB of DRAM. Richard < end of document >