Re: Autoconf-ing mklifboot
Jochen Kunz <[email protected]>
| Newsgroups | gmane.os.netbsd.ports.hp700 |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 11 Jun 2004 09:35:36 +0900 (JST) [email protected] (ITOH Yasufumi) wrote: > Another solution is to use a first-stage boot loader that fits in > normal 8KB boot block area of FFS. > > ftp://ftp.netbsd.org/pub/NetBSD/misc/itohy/hp700-sdboot-20031216.shar.gz This works! Thanks for this work. :-) Observations: A trivial bug: --- readufs.c.orig Fri Jun 11 18:06:14 2004 +++ readufs.c Fri Jun 11 18:07:17 2004 @@ -219,7 +219,7 @@ #if 0 printf("ufs_read: read: blk: %d\n", (int) pos << ufsinfo->fsbtodb); -endif +#endif raw_read_queue(*buf, pos << ufsinfo->fsbtodb, bsize); *buf += bsize; count -= bsize; Installboot has no hp700 support and disklabel doesn't interact well with this boot code. I.e. disklabel overwrites parts of the first stage boot loader. To get a first stage boot loader onto the disk with a disklabel I did this: $ cp sdboot /tmp/sdboot $ grep '^ a:' /root/dl.sd0 a: 264192 0 4.2BSD 1024 8192 32856 # (Cyl. 0 - 191) $ disklabel -rR sd0 /root/dl.sd0 Make filesystem on /dev/rsd0a, put "/usr/mdec/boot" and "netbsd" on it. $ dd if=/dev/rsd0c of=/tmp/sdboot bs=512 skip=1 seek=1 conv=notrunc $ dd if=/tmp/sdboot of=/dev/rsd0c bs=512 and now disklabel(8) doesn't recognize the disklabel on the disk anymore. Seems like it checks more as it should. $ reboot The disk is now bootable. The bootloader / kernel doesn't get the correct root device. So I used "-a" at the boot prompt and entered "sd0" when it asked for the root device. Unfortunately a kernel bug stoped further progress. I'll now try to get sdboot, boot, disklabel(8), installboot(8) and the kernel into sync. Main Menu: Enter command > b alt Interact with IPL (Y, N, Q)?> n Booting... Boot IO Dependent Code (IODC) revision 150 SOFT Booted. NetBSD/hp700 FFS/LFS Primary Bootstrap 32bit firmware booting from partition a filesystem: FFS looking up boot.hp700 looking up boot loading boot at 0x32800...done >> NetBSD/hp700 LIF/FFS/LFS Boot, Revision 1.2 >> (jkunz@MrPomeroy, Fri May 21 21:13:42 CEST 2004) >> Enter "reset" to reset system. Boot: [[[dk0a:]netbsd][-a][-c][-d][-s][-v][-q]] :- -a 3908312+69632+364544 [132032+110158]=0x4a544c Start @ 0x200000 [1=0x66a000-0x6a544c]... SPID bits: 0x0, error = -2 WARNING: PDC_COPROC error -3 Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 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 2.0E (SMALL) #71: Fri Jun 11 17:18:20 CEST 2004 jkunz@MrPomeroy:/home/tmp/SMALL HP9000/778/B132L (Merlin L2 132) real mem = 192 MB (2048 KB reserved for PROM, 176 MB used by NetBSD) avail mem = 172 MB mainbus0 (root) [flex fff80000] pdc0 at mainbus0 cpu0 at mainbus0 hpa 0xfffbe000 path 62 irq 31 ipl 0: PA7300LC (Velociraptor) rev 4 cpu0: PCX-L2, PA-RISC 1.1e, lev 1, cat A, 132 MHz clk cpu0: shadows, 64K/64K D/I caches, 96 shared TLB, 8 shared BTLB cpu0: type 82, sv 0 floating point, rev 3 mem0 at mainbus0 hpa 0xfffbf000 path 63: size 192MB, 1MB L2 cache phantomas0 at mainbus0 hpa 0xffc00000 path 8 "PCI Bridge" at phantomas0 (type 0xd, sv 0xa) hpa 0xfff80000 path 8/0 not configured lasi0 at phantomas0 hpa 0xffc00000 path 8/16 irq 28: rev 3.0 gsc0 at lasi0 lpt0 at gsc0 hpa 0xffd02000 path 8/16/0 irq 7 ipl 1 "Advanced audio (ext.)" at gsc0 (type 0xa, sv 0x7b) hpa 0xffd04000 path 8/16/1 not configured com0 at gsc0 hpa 0xffd05000 path 8/16/4 irq 5 ipl 2: ns16550a, working fifo com0: console osiop0 at gsc0 hpa 0xffd06000 path 8/16/5 irq 9 ipl 3: NCR53C710 rev 2, 40MHz, SCSI ID 7 scsibus0 at osiop0: 8 targets, 8 luns per target iee0 at gsc0 hpa 0xffd07000 path 8/16/6 irq 8 ipl 4: Intel 82596CA address 08:00:09:ef:04:41 "PS/2 port" at gsc0 (type 0xa, sv 0x84) hpa 0xffd08000 path 8/16/7 not configured "PS/2 port" at gsc0 (type 0xa, sv 0x84) hpa 0xffd08100 path 8/16/8 not configured "WAX Bus Adapter" at phantomas0 (type 0xb, sv 0x8e) hpa 0xffe00000 path 8/20 not configured "SGC Graphics" at phantomas0 (type 0xa, sv 0x77) hpa 0xf8000000 path 8/24 not configured biomask 00000068 netmask 00000078 ttymask 000000fe scsibus0: waiting 2 seconds for devices to settle... sd0 at scsibus0 target 0 lun 0: <DEC, DSP3210S, 441G> disk fixed sd0: 2048 MB, 3045 cyl, 16 head, 86 sec, 512 bytes/sect x 4194685 sectors sd0: sync (100.00ns offset 8), 8-bit (10.000MB/s) transfers boot device: iee0 root device (default iee0): sd0 dump device (default sd0b): file system (default generic): root on sd0a dumps on sd0b chuq: pc 0x404f30 stacktrace (null)(f,6a7a80,0,68) at 0 $tlb_missend(6692f0,2,66958c,5bb000) at netbsd:$tlb_missend+0x27c $tlb_missend(14b6f00,b11000,148ee40,14b7000) at netbsd:$tlb_missend+0x27c scsipi_get_xs(14b6f00,6a7798,6,14b705c) at netbsd:scsipi_get_xs+0x1e0 scsipi_make_xs(14b6f00,6a7798,6,14b705c) at netbsd:scsipi_make_xs+0x40 scsi_scsipi_cmd(14b6f00,6a7798,6,14b705c) at netbsd:scsi_scsipi_cmd+0x70 scsipi_command(14b7000,0,14b7000,6a74b8) at netbsd:scsipi_command+0xf4 scsipi_request_sense(14b7000,10,5957c0,0) at netbsd:scsipi_request_sense+0xd8 scsipi_complete(14b7000,6a7508,6,6a73c8) at netbsd:scsipi_complete+0x19c scsipi_execute_xs(14b6f00,6a7508,6,6a73c8) at netbsd:scsipi_execute_xs+0x554 scsi_scsipi_cmd(14b6f00,6a7508,6,6a73c8) at netbsd:scsi_scsipi_cmd+0x170 scsipi_command(14b6f00,0,5,6a73c8) at netbsd:scsipi_command+0xf4 scsipi_mode_sense(14b5c00,14b5cc0,6a73c8,28) at netbsd:scsipi_mode_sense+0xa0 sd_mode_sense(14b5c00,14b5cc0,0,14b5c1c) at netbsd:sd_mode_sense+0x12c sd_get_parms(401,0,6000,0) at netbsd:sd_get_parms+0x3d0 sdopen(401,0,6a7268,6a73d4) at netbsd:sdopen+0x3a4 sdsize(662aa8,20,57f144,0) at netbsd:sdsize+0x16c cpu_dumpconf(6ae000,0,0,0) at netbsd:cpu_dumpconf+0xb4 main(0,0,0,0) at netbsd:main+0x9b0 start(0,0,0,0) at netbsd:start+0x188 panic: trap: uvm_fault(0x630c80, 30000000, 0, 2): 14 Stopped in pid 0.1 (swapper) at netbsd:cpu_Debugger+0x10: ldo R'40(%r3 ),%r30 db> -- tschüß, Jochen Homepage: http://www.unixag-kl.fh-kl.de/~jkunz/