Subject: Problems with cross-building release i386 -> hp300
To: None <port-hp300@netbsd.org, tech-toolchain@netbsd.org>
From: Jarle Greipsland <jarle@uninett.no>
List: tech-toolchain
Date: 04/12/2002 10:03:05
Hi,

I've just tried to cross build myself a NetBSD/hp300 snapshot on
a NetBSD/i386 1.5.3-ish system.  I've managed to get the snapshot
built, and have tried to install it on one of our systems.  The
SYS_INST installation program loads and boots OK across the
network.  Disk partitioning also worked OK AFAICT.  SYS_INST
loads the miniroot.fs, and the kernel boots out of the miniroot
as well.  However, most programs being run out of the miniroot
image fail with signal "Illegal instruction".  I've built the
snapshot twice, and still see the same behavior, so I'm fairly
certain this is not a problem of spurious errors from faulty
networks or disks.

Has anybody else seen this?  Is there something amiss with
regards to cross building from the i386 to m68k platform?  Other
toolchain issues?  Something wrong in the hp300 build structure?
The hp300 source tree?

>> NetBSD/hp300 Miniroot Installer, Revision 1.7
>> (jarle@pepperoni.uninett.no, Thu Apr 11 22:14:46 CEST 2002)
>> HP 9000/433t SPU
>> Available commands:
>>     disklabel - place partition map on disk
>>     miniroot - place miniroot on disk
>>     boot - boot from miniroot
>>     reset - reset the system
>>     help - display command list
sys_inst> miniroot
Disk for miniroot? sd6
Source? (N)FS, (t)ape, (d)one > n
Name of miniroot file? miniroot.fs
My IP address? a.b.c.d
My netmask? 255.255.255.0
My gateway? a.b.c.e
Server IP address? a.b.c.f
Server path? /scratch
WARNING: bad date in battery clock
Copying miniroot from miniroot.fs to sd6...done
Successfully copied miniroot image.
sys_inst> boot
Disk to boot from? sd6
booting: sd6b:/netbsd -s
692388+24936+164536 [75424+51641]=0xf86e8
Start @ 0xfc003400 [1=0xfc0db4c8-0xf86e8]...
Entry point: 0xfc003400
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 1.5ZC (INSTALL) #0: Thu Apr 11 21:40:18 CEST 2002
    jarle@pepperoni.uninett.no:/usr/users/jarle/work/hp300/obj/sys/arch/hp300/compile/INSTALL
HP 9000/433t (33MHz MC68040 CPU+MMU+FPU, 4k on-chip physical I/D caches)
total memory = 65524 KB
avail memory = 61828 KB
using 16 buffers containing 65536 of memory
mainbus0 (root)
intio0 at mainbus0
rtc0 at intio0 addr 0x420000
frodo0 at intio0 addr 0x41c000
dnkbd at frodo0 offset 0x0 not configured
apci0 at frodo0 offset 0x40: no fifo
apci1 at frodo0 offset 0x60: no fifo
hil0 at intio0 addr 0x428000
fb at intio0 addr 0x560000 not configured
dio0 at mainbus0: 98620C, 2 channels, 32 bit DMA
nhpib0 at dio0 scode 7 ipl 3: internal HP-IB
hpibbus0 at nhpib0
dca0 at dio0 scode 9 ipl 5: console, working fifo
device id = 0x6 secid = 0x0 at dio0 scode 12 not configured
oscsi0 at dio0 scode 14 ipl 4: 32 bit dma, async, scsi id 7
sd0 at oscsi0 targ 6 lun 0: <IBM, DCAS-34330, S61A> (SCSI-2)
sd0: 8205 cylinders, 6 heads, 8467200 blocks, 512 bytes/block
le0 at dio0 scode 21 ipl 5: address 08:00:09:13:7d:8d
le0: 8 receive buffers, 2 transmit buffers
hyper0 at dio0 scode 133: 1280 x 1024 monochrome hyperion display
grf0 at hyper0
ite0 at grf0
interrupt levels: bio = 4, net = 5, tty = 5
hil0 device 1: US ASCII keyboard
boot device: sd0
root on sd0b dumps on sd0b
root file system type: ffs
erase ^H, werase ^W, kill ^U, intr ^C
Illegal instruction
(I)nstall or (U)pgrade? i
Illegal instruction
Illegal instruction
Proceed with installation? [n] n

OK, then.  Enter 'halt' at the prompt to halt the machine.  Once the
machine has halted, power-cycle the system to load new boot code.

Illegal instruction
# ls -l
Illegal instruction
# echo *
bin dev dist etc install install.md install.sub kern mnt mnt2 netbsd sbin tmp upgrade usr var

					-jarle