A bootable Linux kernel on the MVME147
(already in SREC format for the hardcore)


These instructions will help you build a bootable Linux disk using the Motorola MVME-147 single board computer. Using the supplied files in S-record format, you can do this without the need for an existing Unix platform. Connect a serial cable from your computer to the console port of the 147. Make sure that you can get to the debugger and get familiar with it. Unzip the files to a temp directory and ascii upload them as follows:
You need this file

The Boot Sector

The first file is the boot sector. It goes at the very beginning of the disk, and contains the bare minimum information to start the boot process. Load the file "bootsect.rec" somewhere into the CPU memory. This command loads s-records from port 0 into ram at 100000:

147-Bug>lo 0 100000

Then write the data to the beginning of the disk. This command writes 2 blocks of ram to block 0 of scsi device 1:
147-Bug>iop
Controller LUN   =00? 1
Device LUN       =00? 0
Read/Write/Format=R? w
Memory Address   =00100000? 100000
Starting Block   =00000000? 0
Number of Blocks =0002? 2
Address Modifier =00? 0
147-Bug>

The Loader

The loader code is called from the bootsector, which is expected to reside at block 2.
Load the file "loader2.rec" into memory and write it to disk:

147-Bug>lo 0 100000            (and then ascii upload the file)

147-Bug>iop
Controller LUN   =00? 1
Device LUN       =00? 0
Read/Write/Format=R? w
Memory Address   =00100000?
Starting Block   =00000000? 2
Number of Blocks =0002? 10
Address Modifier =00? 0
147-Bug>

The Linux Kernel



The kernel file "dflinux.rec" is 1 meg, so it takes a bit longer. The s-record file already has the 100000 offset in it.

147-Bug>lo 0         (and then ascii upload the file "dflinux.rec")

Now, write it to disk at block 1000:

147-Bug>iop
Controller LUN   =00? 1
Device LUN       =00? 0
Read/Write/Format=R? w
Memory Address   =00100000? 100000
Starting Block   =00000002? 1000
Number of Blocks =0010? 1000
Address Modifier =00?
147-Bug>

The RamDisk Image

Still awake? OK, now two more large chunks make up the ramdisk image. The files "dframimg.rec" and "dframim2.rec" already have offsets at 200000 and 300000. Load both files into memory, then write it to disk at block 2000:
147-Bug>lo 0         (and then ascii upload "dframimg.rec")
147-Bug>lo 0         (and then ascii upload "dframim2.rec")

Write it as one chunk starting at block 2000:

147-Bug>iop
Controller LUN   =00? 1
Device LUN       =00? 0
Read/Write/Format=R? w
Memory Address   =00100000? 200000
Starting Block   =00001000? 2000
Number of Blocks =1000? 2000
Address Modifier =00? 0
147-Bug>

Try it out!

That's all there is to it. Now the disk should be bootable. Try it out with:
147-Bug>bh1,0

RAM address from VMEbus = $00000000

Booting from: VME147, Controller 1, Device 0
Loading File: ˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜

Volume:

IPL loaded at:  $00100000
PC   =00100008 SR   =2700=TR:OFF_S._7_.....  VBR  =00000000
USP  =00005830 MSP  =00005C18 ISP* =001FFFFF SFC  =0=F0
CACR =0=D:...._I:...          CAAR =00000000 DFC  =0=F0
D0   =00000000 D1   =00000000 D2   =000021F0 D3   =00100000
D4   =49504C2C D5   =00000000 D6   =00000000 D7   =00000000
A0   =FFFE4000 A1   =00100008 A2   =00000000 A3   =00000000
A4   =00000000 A5   =00001540 A6   =0000155B A7   =001FFFFF
00100008 41FA01D1           LEA.L       $1001DB(PC),A0
147-Bug>

If that looks good, then try it for real with:

147-Bug>bo1,0

RAM address from VMEbus = $00000000

Booting from: VME147, Controller 1, Device 0
Loading File: ˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜

Volume:

IPL loaded at:  $00100000
Loading kernel from disk...
Moving kernel to 0x4000...
Moving data as defined in ELF header...
Loading ramdsk from disk...
Do you want to use a ramdisk? (y|N): y
lilo: root=/dev/ramdisk


And it will boot using the ramdisk image as root. This is about as far as I have gotten with mine. Thanks to Dave (chaos@mindspring.com) for help, I have a real Linux box running on a single-board VME computer.