NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
install/59007: FFSv2 support for install-image and live-image with Makefile.bootimage
>Number: 59007
>Category: install
>Synopsis: FFSv2 support for install-image and live-image with Makefile.bootimage
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: install-manager
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sat Jan 18 22:00:01 +0000 2025
>Originator: Izumi Tsutsui
>Release: NetBSD 10.1 and -current
>Organization:
>Environment:
System: NetBSD mirage 10.1 NetBSD 10.1 (GENERIC) #0: Mon Dec 16 13:08:11 UTC 2024 mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/i386/compile/GENERIC i386
Architecture: amd64 and i386 etc.
Machine: x86_64 and i386 etc.
>Description:
Currently src/distrib/common/bootimage/Makefile.bootimage doesn't
support creating FFSv2 images.
>How-To-Repeat:
By design (as a person who committed the initial revision back in 2012).
>Fix:
The attachd patch adds "IMGFFSVERSION" variable for MD Makefiles
and uses "-o version=$IMGFFSVERSION" for ${TOOL_MAKEFS} options
in common Makefile.bootimage:
Index: distrib/amd64/installimage/installimage.mk
===================================================================
RCS file: /cvsroot/src/distrib/amd64/installimage/installimage.mk,v
retrieving revision 1.4
diff -u -p -d -r1.4 installimage.mk
--- distrib/amd64/installimage/installimage.mk 14 Aug 2023 13:54:05 -0000 1.4
+++ distrib/amd64/installimage/installimage.mk 18 Jan 2025 21:40:50 -0000
@@ -9,7 +9,8 @@ INSTIMAGEMB?= 2500 # for all installat
INSTIMAGEMB?= 3800 # for all installation binaries
.endif
-PRIMARY_BOOT= bootxx_ffsv1
+IMGFFSVERSION= 2
+PRIMARY_BOOT= bootxx_ffsv2
SECONDARY_BOOT= boot
SECONDARY_BOOT_ARG= # unnecessary
Index: distrib/amd64/liveimage/Makefile.liveimage
===================================================================
RCS file: /cvsroot/src/distrib/amd64/liveimage/Makefile.liveimage,v
retrieving revision 1.3
diff -u -p -d -r1.3 Makefile.liveimage
--- distrib/amd64/liveimage/Makefile.liveimage 13 Apr 2024 18:38:17 -0000 1.3
+++ distrib/amd64/liveimage/Makefile.liveimage 18 Jan 2025 21:40:51 -0000
@@ -3,7 +3,8 @@
.include <bsd.own.mk>
KERN_SET= kern-GENERIC
-PRIMARY_BOOT= bootxx_ffsv1
+IMGFFSVERSION= 2
+PRIMARY_BOOT= bootxx_ffsv2
SECONDARY_BOOT= boot
SECONDARY_BOOT_ARG= # unnecessary
Index: distrib/common/bootimage/Makefile.bootimage
===================================================================
RCS file: /cvsroot/src/distrib/common/bootimage/Makefile.bootimage,v
retrieving revision 1.44
diff -u -p -d -r1.44 Makefile.bootimage
--- distrib/common/bootimage/Makefile.bootimage 18 Jan 2025 09:07:14 -0000 1.44
+++ distrib/common/bootimage/Makefile.bootimage 18 Jan 2025 21:40:51 -0000
@@ -113,6 +113,9 @@
# IMGMAKEFSOPTIONS
# options passed to makefs(8) to create root file system
# (default: -o bsize=16384,fsize=2048,density=8192)
+# IMGFFSVERSION
+# version of FFS created by makefs(8)
+# (default: 1)
# INSTALLBOOTOPTIONS
# options passed to installboot(8), e.g., -o console=com0
# (default: empty)
@@ -271,6 +274,7 @@ FSTAB_IN?= ${DISTRIBDIR}/common/bootimag
SPEC_IN?= ${DISTRIBDIR}/common/bootimage/spec.in
IMGMAKEFSOPTIONS?= -o bsize=16384,fsize=2048,density=8192
+IMGFFSVERSION?= 1
FATMAKEFSOPTIONS?= -o fat_type=16
WORKDIR?= work
@@ -451,7 +455,9 @@ ${TARGETFS}: prepare_md_post ${WORKFSTAB
-B ${TARGET_ENDIANNESS} \
-xx -F ${WORKSPEC} -N ${WORKDIR}/etc \
${MAKEFS_TIMESTAMP} \
+ -t ffs \
${IMGMAKEFSOPTIONS} \
+ -o version=${IMGFFSVERSION} \
${WORKFS} ${WORKDIR}
.if !empty(PRIMARY_BOOT) && ${INSTALLBOOT_AFTER_DISKLABEL} == "no"
${TOOL_INSTALLBOOT} -v -m ${MACHINE} ${INSTALLBOOTOPTIONS} ${WORKFS} \
---
Izumi Tsutsui
Home |
Main Index |
Thread Index |
Old Index