16xcfg is a utility written in 'C' which is used to configure a kernel image, prior to booting it on a VME board. It is so named because it was developed first for Morotola MVME16x boards, but can now also be used for kernels on BVM boards, and MVME147 boards. The utility does four things: a) It patches a start address and initial stack pointer in to the kernel at address zero, making it start with a standard 680x0 exception table format. b) It patches boot parameters (eg memory size, CPU type, root device, etc) in to the kernel image at address 0x100. It uses one of two formats for these parameters, depending on whether this is a 2.0.xx or a 2.1.xx kernel. c) It patches a code module, known as loader.bin, in to the image at address 0x800. To start a kernel you have to execute code from 0x800. This module is necessary because the kernel image is an ELF format file, and something needs to move the various sections of the file to the correct addresses, and zero workspace, before starting the kernel proper. loader.bin also moves the boot parameters from 0x100 to the end of the relocated kernel image, where the kernel startup code expects to find them. d) Optionally, as of version 5, it combines a kernel and a ramdisk in to one single boot file. Parameters relating to the ramdisk are patched in at offset 0x200. 16xcfg.c is written to be little/big endian independent, so it can be run on, say, a 386 or a 680x0 system. You compile 16xcfg.c with a command such as "cc -o 16xcfg 16xcfg.c", and can run it with '-h' for an option summary: > # ./16xcfg -h > -- 16xcfg/16xcfg version 5 -- > > Usage: 16xcfg/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' > > # When you run 16xcfg it presents you with a series of questions, and for each one gives you a choice of possible answers and a default answer. Pressing return will select the default answer. It can save your answers to a file (option -s), which you can then use later as new defaults (option -d). The '-a' option runs 16xcfg without prompting. The configuration files produced by 16xcfg are simple text files and can be editted by any means, provided you preserve the format. An example run, showing default answers typical of those for a BVME6000 board is shown below: > # ./16xcfg -l loader.bin -d bvm20.cfg -k vmlinux-2033pl1a > Kernel (2.0,2.1) [2.0]? > Machine (MVME131,MVME147,MVME162,MVME167,BVME6000) [BVME6000]? > CPU type (68020,68030,68040,68060) [68060]? > FPU present (No,Yes) [Yes]? > RAM size [0x00800000]? > RAMDISK base (0 for none) [0x00000000]? > Cmndline parameters [root=/dev/sda1 ro]? > # Example answers for an MVME147 booting from a ramdisk might be: KERNEL 2.0 MACHINE MVME147 CPUTYPE 68030 FPU Yes RAMSIZE 0x01000000 RDBASE 0x00e00000 RDSIZE 0x001c2000 CMNDLINE root=/dev/ramdisk init=/bin/sh For a 2.1.xx kernel there are fewer choices for 'Machine', as the same kernel can run on an MVME162 and an MVME167. Command line parameters for a 2.0.xx kernel are typically root=/dev/sda1 ro for a root file system on a local disk, or root=/dev/nfs nfsroot=/tftpboot/debian-fs nfsaddrs=10.1.1.9:10.1.1.1:::nfs68k::none for an NFS mounted root file system. Command line parameters for a 2.1.xx kernel are typically root=/dev/sda1 ro console=ttyS0,19200 for a root file system on a local disk, or root=/dev/nfs nfsroot=10.1.1.1:/tftpboot/debian-fs ip=10.1.1.9:10.1.1.1:::nfs68k::off ro console=ttyS0,19200 for an NFS mounted root file system. Refer to linux/Documentation/nfsroot.txt in the relevant kernel source tree for details of the parameter fields. For either kernel, the following options to the scsi driver may be of use: 53c7xx=nosync:0,nodisconnect:0 Append those to the command line if you experience SCSI related problems. To create a combined ramdisk and kernel file, you must specify the ramdisk filename with '-r', and you must provide ramdisk base and ramdisk length parameters to the appropriate questions. 16xcfg only works with uncompressed kernels and ramdisk images. Last updated 981212. ---------------- End ------------------