A few small OpenBSD-ish fixes
cover A few small OpenBSD-ish fixes
Hello,
I built GRUB on OpenBSD 6.9 over the weekend, and ran into a few issues. The minor ones attached were easy enough to
fix. Unfortunately, once installed, it merely prints "Grub Loading" (or something similar) and reboots. In trying to recover from this, I wiped out the MBR and that's when I gave up and figured maybe I should do this in a VM instead.
One other issue I ran into was that setjmp.mod would fail to build because it didn't export any symbols. No other modules seemed to depend on it. I just removed it from Makefile, but I'm not familiar enough with GRUB to know whether that's a reasonable enough solution, or if that's related to the inability to boot.
Cheers,
// jacob
jacob berkman (3):
Do not fail configure if Python is missing. It's only required for
developement of GRUB.
Fix warning about misleading indentation on OpenBSD 6.9 with -Werror
enabled (which is the default).
Use size_t printf format to match type
configure.ac | 2 +- grub-core/fs/zfs/zfs.c | 4 ++-- grub-core/lib/LzmaEnc.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
Signature · 1 line
2.30.1 (Apple Git-130)
PATCH 1/3 Do not fail configure if Python is missing. It's only required for developement of GRUB.
--- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
configure.ac +1 -1
@@ -362,7 +362,7 @@ gl_EARLY AC_PROG_CXX AM_PROG_CC_C_O AM_PROG_AS -AM_PATH_PYTHON([2.6]) +AM_PATH_PYTHON([2.6],, [:]) # Must be GCC. test "x$GCC" = xyes || AC_MSG_ERROR([GCC is required])
Signature · 1 line
2.30.1 (Apple Git-130)
PATCH 2/3 Fix warning about misleading indentation on OpenBSD 6.9 with -Werror enabled (which is the default).
In reply to jacob berkman--- grub-core/lib/LzmaEnc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
grub-core/lib/LzmaEnc.c +1 -1
@@ -1358,7 +1358,7 @@ static UInt32 GetOptimum(CLzmaEnc *p, UInt32 position, UInt32 *backRes)if (repIndex ==0 ) startLen = lenTest +1 ; -/* if (_maxMode) */ +if (True/* _maxMode */ ) {UInt32 lenTest2 = lenTest +1 ;UInt32 limit = lenTest2 + p->numFastBytes;
Signature · 1 line
2.30.1 (Apple Git-130)
PATCH 3/3 Use size_t printf format to match type
In reply to jacob berkman--- grub-core/fs/zfs/zfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
grub-core/fs/zfs/zfs.c +2 -2
@@ -1881,8 +1881,8 @@ zio_read (blkptr_t *bp, grub_zfs_endian_t endian, void **buf, << SPA_MINBLOCKSHIFT)); psize =get_psize (bp, endian); } -grub_dprintf ("zfs" ,"zio_read: E %d: size %" PRIdGRUB_SSIZE"/%" - PRIdGRUB_SSIZE"\n" , (int )BP_IS_EMBEDDED (bp), lsize, psize); +grub_dprintf ("zfs" ,"zio_read: E %d: size %" PRIuGRUB_SIZE"/%" + PRIuGRUB_SIZE"\n" , (int )BP_IS_EMBEDDED (bp), lsize, psize);if (size) *size = lsize;
Signature · 1 line
2.30.1 (Apple Git-130)
Hi Jacob,
Quoted 8 lines · jacob berkman
Hello,
I built GRUB on OpenBSD 6.9 over the weekend, and ran into a few issues. The minor ones attached were easy enough to
fix. Unfortunately, once installed, it merely prints "Grub Loading" (or something similar) and reboots. In trying to recover from this, I wiped out the MBR and that's when I gave up and figured maybe I should do this in a VM instead.
The patches look more or less good to me. Though I would like to ask you to add to all of them your SOB line like:
Additionally, please do not put whole description of the issue into the subject. The subject should contain only a hint what a given patch does.
Quoted 5 lines
One other issue I ran into was that setjmp.mod would fail to build because it didn't export any symbols. No other modules seemed to depend on it. I just removed it from
Makefile, but I'm not familiar enough with GRUB to know whether that's a reasonable enough solution, or if that's related to the inability to boot.
Could you provide more details how to reproduce the issue?
Daniel