diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2014-10-26 10:43:00 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2014-10-26 10:43:00 +0000 |
commit | fb747a2e9e1cbcaba9d08e7f4977578ad7ff8bfa (patch) | |
tree | a324cad3ce68e74117cf22fcca9661d9f40c22f3 /distrib | |
parent | 31d80c993fb0c7986d5861f542549a0b156b2450 (diff) |
Append 512 bytes of zero to the kernel image intended to be put into lif.fs,
so that valid bytes exist at the end of the kernel image.
Since the lif image stores files size in 256-byte unit, we can not report EOF
while reading the kernel image until the remainder of the 256-byte sector has
been read. But these zero bytes would cause the gzip readahead machinery in
libsa to believe the kernel is followed by an uncompressed file, and switch to
transparent mode, preventing backwards seeks into the kernel image from working.
This fixes the ``read section header string table failed(0)'' errors when
attempting to boot lif.fs since loadfile_elf.c 1.9.
Diffstat (limited to 'distrib')
-rw-r--r-- | distrib/hppa/ramdisk/Makefile | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/distrib/hppa/ramdisk/Makefile b/distrib/hppa/ramdisk/Makefile index b0060eab9c0..1a8de8262b1 100644 --- a/distrib/hppa/ramdisk/Makefile +++ b/distrib/hppa/ramdisk/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.27 2013/10/23 03:43:27 deraadt Exp $ +# $OpenBSD: Makefile,v 1.28 2014/10/26 10:42:59 miod Exp $ CBIN= instbin ARCHDIR= ${.CURDIR}/.. @@ -70,7 +70,7 @@ bsd.rd: obsd ${IMAGE} rdsetroot @${STRIP} bsd.rd bsd: bsd.rd - ${GZIPCMD} ${GZIPFLAGS} < bsd.rd > bsd + (cat bsd.rd ; dd if=/dev/zero count=1) | ${GZIPCMD} ${GZIPFLAGS} > bsd rdsetroot: ${.CURDIR}/../../common/elfrdsetroot.c \ ${.CURDIR}/../../common/elf32.c ${.CURDIR}/../../common/elf64.c |