Subject: Re: sdboot (was Re: Autoconf-ing mklifboot)
To: None <port-hp700@netbsd.org>
From: Jochen Kunz <jkunz@unixag-kl.fh-kl.de>
List: port-hp700
Date: 06/14/2004 00:54:19
On Sat, 12 Jun 2004 19:13:58 +0900 (JST)
itohy@netbsd.org (ITOH Yasufumi) wrote:

> ftp://ftp.netbsd.org/pub/NetBSD/misc/itohy/hp700-sdboot-20040612.shar.gz
> I did a little cleanup.
Please commit sdboot and the corresponding patch to disklabel that you
sugested. I did some tests and it seems to work well.=20

--- src/sbin/disklabel/Makefile.orig       Fri Jun 11 23:01:50 2004
+++ src/sbin/disklabel/Makefile    Sat Jun 12 09:41:55 2004
@@ -8,7 +8,7 @@
 DPADD+=3D ${LIBUTIL}
=20
 .if (${MACHINE} =3D=3D "hp300") || (${MACHINE} =3D=3D "vax") \
-       || (${MACHINE} =3D=3D "arm32")
+       || (${MACHINE} =3D=3D "arm32") || (${MACHINE} =3D=3D "hp700")
 CPPFLAGS+=3D -DNUMBOOT=3D1
 .endif
=20
@@ -18,7 +18,7 @@
 CPPFLAGS+=3D -DSTRICT_CYLINDER_ALIGNMENT
 .endif
=20
-.if (${MACHINE} =3D=3D "alpha") || (${MACHINE} =3D=3D "x68k")
+.if (${MACHINE} =3D=3D "alpha") || (${MACHINE} =3D=3D "x68k") || (${MACHIN=
E} =3D=3D
"hp700")
 # preserve the non-disklabel portions of the first 8KB of the disk
 CPPFLAGS+=3D -DSAVEBOOTAREA
 .endif

(Beware of the linewarp that my MUA inserted.)

I will commit a patch to sys/arch/hp700/hp700/disksubr.c that fixes the
"boot code is overwritten by disklabel" problem later.

At the moment the kernel doesn't get the correct boot / root device.
I already located the firmware data structure to query the boot / root
device. I can get the HPA / device path of the boot / root device and
now I am working on code to map this into the right struct device *.
So we should be able to auto boot from disk real soon.
--=20


tsch=FC=DF,
       Jochen

Homepage: http://www.unixag-kl.fh-kl.de/~jkunz/