Enable bsd.mod on coreboot
PATCH 1/1 Enable bsd.mod on coreboot
Tested with grub-qemu. Testers on real hw are welcome. FreeBSD64, NetBSD64, OpenBSD64 and OpenBSD32 work (with 2 previous patches). FreeBSD32 and NetBSD32 try to do BIOS calls and crash.
Signature · 4 lines
Regards Vladimir 'phcoder' Serbinenko Personal git repository: http://repo.or.cz/w/grub2/phcoder.git
ChangeLog +12 -0
@@ -1,5 +1,17 @@ 2009-08-25 Vladimir Serbinenko <[email protected]> + Enable bsd.mod on coreboot. + + * conf/i386-coreboot.rmk (pkglib_MODULES): Add bsd.mod. + (bsd_mod_SOURCES): New variable. + (bsd_mod_CFLAGS): Likewise. + (bsd_mod_LDFLAGS): Likewise. + (bsd_mod_ASFLAGS): Likewise. + * loader/i386/bsd.c [!GRUB_MACHINE_PCBIOS]: Fix includes. + (grub_bsd_get_device) [!GRUB_MACHINE_PCBIOS]: Set *biosdev to 0xff. + +2009-08-25 Vladimir Serbinenko <[email protected]> + Cleanup NetBSD root support. * loader/i386/bsd.c (grub_netbsd_boot): Remove call to
conf/i386-coreboot.rmk +7 -0
@@ -204,6 +204,13 @@ aout_mod_SOURCES = loader/aout.c aout_mod_CFLAGS = $(COMMON_CFLAGS) aout_mod_LDFLAGS = $(COMMON_LDFLAGS) +# For bsd.mod +pkglib_MODULES += bsd.mod +bsd_mod_SOURCES = loader/i386/bsd.c loader/i386/bsd32.c loader/i386/bsd64.c loader/i386/bsd_helper.S loader/i386/bsd_trampoline.S +bsd_mod_CFLAGS = $(COMMON_CFLAGS) +bsd_mod_LDFLAGS = $(COMMON_LDFLAGS) +bsd_mod_ASFLAGS = $(COMMON_ASFLAGS) + # For play.mod. play_mod_SOURCES = commands/i386/pc/play.c play_mod_CFLAGS = $(COMMON_CFLAGS)
loader/i386/bsd.c +5 -1
@@ -37,10 +37,10 @@#ifdef GRUB_MACHINE_PCBIOS #include <grub/machine/biosnum.h> +#endif #include <grub/disk.h> #include <grub/device.h> #include <grub/partition.h> -#endif #define ALIGN_DWORD (a) ALIGN_UP (a, 4)#define ALIGN_QWORD (a) ALIGN_UP (a, 8)
@@ -138,7 +138,11 @@ grub_bsd_get_device (grub_uint32_t * biosdev,char *p;grub_device_t dev; +#ifdef GRUB_MACHINE_PCBIOS *biosdev =grub_get_root_biosnumber () &0xff ; +#else + *biosdev =0xff ; +#endif *unit = (*biosdev &0x7f ); *slice =0xff ; *part =0xff ;
Quoted 3 lines · Vladimir 'phcoder' Serbinenko
Tested with grub-qemu. Testers on real hw are welcome. FreeBSD64, NetBSD64, OpenBSD64 and OpenBSD32 work (with 2 previous patches). FreeBSD32 and NetBSD32 try to do BIOS calls and crash.
Please commit.
Thanks
Signature · 5 lines
Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all."
Quoted 7 lines · Robert Millan
Quoted 3 lines · Vladimir 'phcoder' Serbinenko
Tested with grub-qemu. Testers on real hw are welcome. FreeBSD64, NetBSD64, OpenBSD64 and OpenBSD32 work (with 2 previous patches). FreeBSD32 and NetBSD32 try to do BIOS calls and crash.
Please commit.
Comitted. Other 2 patches are needed to achieve the result I mentionned previously
Quoted 2 lines
Thanks
You're welcome
Quoted 13 lines
--
Robert MillanThe DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all."
_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel
Signature · 4 lines
Regards Vladimir 'phcoder' Serbinenko Personal git repository: http://repo.or.cz/w/grub2/phcoder.git