Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/distrib Use the special device name "ROOT." in /etc/fstab no...



details:   https://anonhg.NetBSD.org/src/rev/4ad72e3933eb
branches:  trunk
changeset: 446723:4ad72e3933eb
user:      gson <gson%NetBSD.org@localhost>
date:      Sat Dec 15 18:03:16 2018 +0000

description:
Use the special device name "ROOT." in /etc/fstab not just on the arm
images, but also on the bootable disk images of other ports, so that
they can be booted from differently named devices.  Merge the i386 and
amd64 -live-sd0root and -live-wd0root images into a single live image
per port, bootable both from usb media and in qemu.  Drop the -xx0root
suffixes from image names as they are no longer meaningful.

diffstat:

 distrib/amd64/installimage/Makefile                |   3 +--
 distrib/amd64/liveimage/Makefile                   |   3 +--
 distrib/amd64/liveimage/Makefile.liveimage         |   3 +--
 distrib/amd64/liveimage/emuimage/Makefile          |  10 ++++------
 distrib/amd64/liveimage/usbimage/Makefile          |  11 -----------
 distrib/amd64/uefi-installimage/Makefile           |   3 +--
 distrib/amd64/uefi-installimage/Makefile.bootimage |  19 +++++++------------
 distrib/common/bootimage/Makefile.bootimage        |   8 ++------
 distrib/common/bootimage/fstab.in                  |   4 ++--
 distrib/common/bootimage/fstab.install.in          |   2 +-
 distrib/i386/installimage/Makefile                 |   3 +--
 distrib/i386/liveimage/Makefile                    |   3 +--
 distrib/i386/liveimage/Makefile.liveimage          |   3 +--
 distrib/i386/liveimage/emuimage/Makefile           |  10 ++++------
 distrib/i386/liveimage/usbimage/Makefile           |  11 -----------
 distrib/pmax/liveimage/emuimage/Makefile           |   5 ++---
 distrib/sparc/liveimage/emuimage/Makefile          |   5 ++---
 distrib/sparc64/liveimage/emuimage/Makefile        |   6 ++----
 distrib/sun2/liveimage/emuimage/Makefile           |   5 ++---
 distrib/sun3/liveimage/emuimage/Makefile           |   5 ++---
 distrib/vax/liveimage/emuimage/Makefile            |   5 ++---
 21 files changed, 39 insertions(+), 88 deletions(-)

diffs (truncated from 380 to 300 lines):

diff -r 9ab69608cecc -r 4ad72e3933eb distrib/amd64/installimage/Makefile
--- a/distrib/amd64/installimage/Makefile       Sat Dec 15 17:11:10 2018 +0000
+++ b/distrib/amd64/installimage/Makefile       Sat Dec 15 18:03:16 2018 +0000
@@ -1,10 +1,9 @@
-#      $NetBSD: Makefile,v 1.9 2017/09/18 14:42:16 joerg Exp $
+#      $NetBSD: Makefile,v 1.10 2018/12/15 18:03:16 gson Exp $
 
 .include <bsd.own.mk>
 
 INSTIMGBASE=   NetBSD-${DISTRIBVER}-amd64-install      # gives ${IMGBASE}.img
 
-BOOTDISK=      sd0                     # for USB flash etc.
 INSTIMAGEMB?=  1450                    # for all installation binaries
 
 PRIMARY_BOOT=          bootxx_ffsv1
diff -r 9ab69608cecc -r 4ad72e3933eb distrib/amd64/liveimage/Makefile
--- a/distrib/amd64/liveimage/Makefile  Sat Dec 15 17:11:10 2018 +0000
+++ b/distrib/amd64/liveimage/Makefile  Sat Dec 15 18:03:16 2018 +0000
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.1 2012/01/22 03:53:29 tsutsui Exp $
+# $NetBSD: Makefile,v 1.2 2018/12/15 18:03:17 gson Exp $
 
 SUBDIR=
 SUBDIR+=       emuimage
-SUBDIR+=       usbimage
 
 TARGETS+=      release live_image
 
diff -r 9ab69608cecc -r 4ad72e3933eb distrib/amd64/liveimage/Makefile.liveimage
--- a/distrib/amd64/liveimage/Makefile.liveimage        Sat Dec 15 17:11:10 2018 +0000
+++ b/distrib/amd64/liveimage/Makefile.liveimage        Sat Dec 15 18:03:16 2018 +0000
@@ -1,9 +1,8 @@
-#      $NetBSD: Makefile.liveimage,v 1.1 2012/01/22 03:53:29 tsutsui Exp $
+#      $NetBSD: Makefile.liveimage,v 1.2 2018/12/15 18:03:17 gson Exp $
 
 .include <bsd.own.mk>
 
 KERN_SET=              kern-GENERIC
-BOOTDISK?=             wd0             # for emulators
 PRIMARY_BOOT=          bootxx_ffsv1
 SECONDARY_BOOT=                boot
 SECONDARY_BOOT_ARG=    # unnecessary
diff -r 9ab69608cecc -r 4ad72e3933eb distrib/amd64/liveimage/emuimage/Makefile
--- a/distrib/amd64/liveimage/emuimage/Makefile Sat Dec 15 17:11:10 2018 +0000
+++ b/distrib/amd64/liveimage/emuimage/Makefile Sat Dec 15 18:03:16 2018 +0000
@@ -1,10 +1,8 @@
-#      $NetBSD: Makefile,v 1.3 2012/11/03 14:25:32 tsutsui Exp $
-
-LIVEIMGBASE=   NetBSD-${DISTRIBVER}-amd64-live-wd0root # gives ${IMGBASE}.img
+#      $NetBSD: Makefile,v 1.4 2018/12/15 18:03:17 gson Exp $
 
-BOOTDISK=      wd0                     # for QEMU etc.
-.if defined(EMUIMAGEMB)
+LIVEIMGBASE=   NetBSD-${DISTRIBVER}-amd64-live # gives ${IMGBASE}.img
+
+USBIMAGEMB?=   1536                    # 2GB USB flash memories aren't 2GiB
 LIVEIMAGEMB=   ${EMUIMAGEMB}
-.endif
 
 .include "${.CURDIR}/../Makefile.liveimage"
diff -r 9ab69608cecc -r 4ad72e3933eb distrib/amd64/liveimage/usbimage/Makefile
--- a/distrib/amd64/liveimage/usbimage/Makefile Sat Dec 15 17:11:10 2018 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-#      $NetBSD: Makefile,v 1.3 2012/11/03 14:25:32 tsutsui Exp $
-
-LIVEIMGBASE=   NetBSD-${DISTRIBVER}-amd64-live-sd0root # gives ${IMGBASE}.img
-
-USBIMAGEMB?=   1536                    # 2GB USB flash memories aren't 2GiB
-
-BOOTDISK=      sd0                     # for USB flash etc.
-LIVEIMAGEMB=   ${USBIMAGEMB}
-OMIT_SWAPIMG=  yes                     # no need to write swap
-
-.include "${.CURDIR}/../Makefile.liveimage"
diff -r 9ab69608cecc -r 4ad72e3933eb distrib/amd64/uefi-installimage/Makefile
--- a/distrib/amd64/uefi-installimage/Makefile  Sat Dec 15 17:11:10 2018 +0000
+++ b/distrib/amd64/uefi-installimage/Makefile  Sat Dec 15 18:03:16 2018 +0000
@@ -1,10 +1,9 @@
-#      $NetBSD: Makefile,v 1.5 2018/03/28 22:38:47 joerg Exp $
+#      $NetBSD: Makefile,v 1.6 2018/12/15 18:03:17 gson Exp $
 
 .include <bsd.own.mk>
 
 INSTIMGBASE=   NetBSD-${DISTRIBVER}-amd64-uefi-install # gives ${IMGBASE}.img
 
-BOOTDISK=      dk1                     # unused (use GUID)
 INSTIMAGEMB?=  1550                    # for all installation binaries
 
 PRIMARY_BOOT=          bootxx_ffsv1
diff -r 9ab69608cecc -r 4ad72e3933eb distrib/amd64/uefi-installimage/Makefile.bootimage
--- a/distrib/amd64/uefi-installimage/Makefile.bootimage        Sat Dec 15 17:11:10 2018 +0000
+++ b/distrib/amd64/uefi-installimage/Makefile.bootimage        Sat Dec 15 18:03:16 2018 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.bootimage,v 1.8 2018/11/19 20:05:37 aymeric Exp $
+#      $NetBSD: Makefile.bootimage,v 1.9 2018/12/15 18:03:17 gson Exp $
 #
 # Copyright (c) 2009, 2010, 2011 Izumi Tsutsui.  All rights reserved.
 #
@@ -34,9 +34,6 @@
 #              Basename of the image
 #
 # Optional variables:
-#      BOOTDISK
-#              device name of target bootable disk specified in /etc/fstab
-#              (default: sd0)
 #      USE_MBR
 #              set yes if target disk image requires MBR partition
 #              (default: no)
@@ -158,7 +155,6 @@
 #
 # common definitions for image
 #
-BOOTDISK?=     sd0
 USE_MBR?=      no
 USE_GPT?=      no
 USE_SUNLABEL?= no
@@ -276,22 +272,21 @@
 .if ${USE_GPT} != "no"
 .if ${OMIT_SWAPIMG} == "no"
        ${TOOL_SED}                                                     \
-           -e "s/\/dev\/@@BOOTDISK@@a/NAME=${BOOTDISK_UUID}/"          \
-           -e "s/\/dev\/@@BOOTDISK@@b/NAME=${SWAPDISK_UUID}/"          \
+           -e "s/ROOT.a/NAME=${BOOTDISK_UUID}/"                        \
+           -e "s/ROOT.b/NAME=${SWAPDISK_UUID}/"                        \
            < ${FSTAB_IN} > ${WORKFSTAB}
 .else
        ${TOOL_SED}                                                     \
-           -e "s/\/dev\/@@BOOTDISK@@a/NAME=${BOOTDISK_UUID}/"          \
-           -e "/@@BOOTDISK@@b/d"                                       \
+           -e "s/ROOT.a/NAME=${BOOTDISK_UUID}/"                        \
+           -e "/ROOT.b/d"                                              \
            < ${FSTAB_IN} > ${WORKFSTAB}
 .endif
 .else  # USE_GPT == "no"
 .if ${OMIT_SWAPIMG} == "no"
-       ${TOOL_SED} "s/@@BOOTDISK@@/${BOOTDISK}/" < ${FSTAB_IN} > ${WORKFSTAB}
+       ${TOOL_SED} < ${FSTAB_IN} > ${WORKFSTAB}
 .else
        ${TOOL_SED}                                                     \
-           -e "s/@@BOOTDISK@@/${BOOTDISK}/"                            \
-           -e "/@@BOOTDISK@@b/d"                                       \
+           -e "/ROOT.b/d"                                              \
            < ${FSTAB_IN} > ${WORKFSTAB}
 .endif
 .endif # USE_GPT != "no"
diff -r 9ab69608cecc -r 4ad72e3933eb distrib/common/bootimage/Makefile.bootimage
--- a/distrib/common/bootimage/Makefile.bootimage       Sat Dec 15 17:11:10 2018 +0000
+++ b/distrib/common/bootimage/Makefile.bootimage       Sat Dec 15 18:03:16 2018 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.bootimage,v 1.19 2018/11/19 20:05:37 aymeric Exp $
+#      $NetBSD: Makefile.bootimage,v 1.20 2018/12/15 18:03:17 gson Exp $
 #
 # Copyright (c) 2009, 2010, 2011 Izumi Tsutsui.  All rights reserved.
 #
@@ -34,9 +34,6 @@
 #              Basename of the image
 #
 # Optional variables:
-#      BOOTDISK
-#              device name of target bootable disk specified in /etc/fstab
-#              (default: sd0)
 #      USE_MBR
 #              set yes if target disk image requires MBR partition
 #              (default: no)
@@ -148,7 +145,6 @@
 #
 # common definitions for image
 #
-BOOTDISK?=     sd0
 USE_MBR?=      no
 USE_SUNLABEL?= no
 INSTALLBOOT_AFTER_DISKLABEL?=  no
@@ -247,7 +243,7 @@
        ${INSTALL} ${COPY} -m 0644 ${WORKDIR}/usr/mdec/${SECONDARY_BOOT} ${WORKDIR}
 .endif
        @echo Preparing /etc/fstab ...
-       ${TOOL_SED} "s/@@BOOTDISK@@/${BOOTDISK}/" < ${FSTAB_IN} > ${WORKFSTAB}
+       ${TOOL_SED} < ${FSTAB_IN} > ${WORKFSTAB}
        ${INSTALL} ${COPY} -m 0644 ${WORKFSTAB} ${WORKDIR}/etc/fstab
        @echo Setting rc_configured=YES in /etc/rc.conf ...
        ${TOOL_SED} "s/rc_configured=NO/rc_configured=YES/"             \
diff -r 9ab69608cecc -r 4ad72e3933eb distrib/common/bootimage/fstab.in
--- a/distrib/common/bootimage/fstab.in Sat Dec 15 17:11:10 2018 +0000
+++ b/distrib/common/bootimage/fstab.in Sat Dec 15 18:03:16 2018 +0000
@@ -1,5 +1,5 @@
-/dev/@@BOOTDISK@@a     /               ffs     rw              1 1
-/dev/@@BOOTDISK@@b     none            none    sw              0 0
+ROOT.a         /               ffs     rw              1 1
+ROOT.b         none            none    sw              0 0
 ptyfs          /dev/pts        ptyfs   rw              0 0
 kernfs         /kern           kernfs  rw,noauto       0 0
 procfs         /proc           procfs  rw,noauto       0 0
diff -r 9ab69608cecc -r 4ad72e3933eb distrib/common/bootimage/fstab.install.in
--- a/distrib/common/bootimage/fstab.install.in Sat Dec 15 17:11:10 2018 +0000
+++ b/distrib/common/bootimage/fstab.install.in Sat Dec 15 18:03:16 2018 +0000
@@ -1,2 +1,2 @@
-/dev/@@BOOTDISK@@a     /               ffs     rw              1 1
+ROOT.a                 /               ffs     rw              1 1
 tmpfs                  /tmp            tmpfs   rw              0 0
diff -r 9ab69608cecc -r 4ad72e3933eb distrib/i386/installimage/Makefile
--- a/distrib/i386/installimage/Makefile        Sat Dec 15 17:11:10 2018 +0000
+++ b/distrib/i386/installimage/Makefile        Sat Dec 15 18:03:16 2018 +0000
@@ -1,10 +1,9 @@
-#      $NetBSD: Makefile,v 1.12 2018/10/30 20:18:30 christos Exp $
+#      $NetBSD: Makefile,v 1.13 2018/12/15 18:03:17 gson Exp $
 
 .include <bsd.own.mk>
 
 INSTIMGBASE=   NetBSD-${DISTRIBVER}-i386-install       # gives ${IMGBASE}.img
 
-BOOTDISK=      sd0                     # for USB flash etc.
 INSTIMAGEMB?=  1450                    # for all installation binaries
 
 PRIMARY_BOOT=          bootxx_ffsv1
diff -r 9ab69608cecc -r 4ad72e3933eb distrib/i386/liveimage/Makefile
--- a/distrib/i386/liveimage/Makefile   Sat Dec 15 17:11:10 2018 +0000
+++ b/distrib/i386/liveimage/Makefile   Sat Dec 15 18:03:16 2018 +0000
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.1 2012/01/22 03:53:30 tsutsui Exp $
+# $NetBSD: Makefile,v 1.2 2018/12/15 18:03:17 gson Exp $
 
 SUBDIR=
 SUBDIR+=       emuimage
-SUBDIR+=       usbimage
 
 TARGETS+=      release live_image
 
diff -r 9ab69608cecc -r 4ad72e3933eb distrib/i386/liveimage/Makefile.liveimage
--- a/distrib/i386/liveimage/Makefile.liveimage Sat Dec 15 17:11:10 2018 +0000
+++ b/distrib/i386/liveimage/Makefile.liveimage Sat Dec 15 18:03:16 2018 +0000
@@ -1,9 +1,8 @@
-#      $NetBSD: Makefile.liveimage,v 1.1 2012/01/22 03:53:30 tsutsui Exp $
+#      $NetBSD: Makefile.liveimage,v 1.2 2018/12/15 18:03:17 gson Exp $
 
 .include <bsd.own.mk>
 
 KERN_SET=              kern-GENERIC
-BOOTDISK?=             wd0             # for emulators
 PRIMARY_BOOT=          bootxx_ffsv1
 SECONDARY_BOOT=                boot
 SECONDARY_BOOT_ARG=    # unnecessary
diff -r 9ab69608cecc -r 4ad72e3933eb distrib/i386/liveimage/emuimage/Makefile
--- a/distrib/i386/liveimage/emuimage/Makefile  Sat Dec 15 17:11:10 2018 +0000
+++ b/distrib/i386/liveimage/emuimage/Makefile  Sat Dec 15 18:03:16 2018 +0000
@@ -1,10 +1,8 @@
-#      $NetBSD: Makefile,v 1.3 2012/11/03 14:25:33 tsutsui Exp $
-
-LIVEIMGBASE=   NetBSD-${DISTRIBVER}-i386-live-wd0root  # gives ${IMGBASE}.img
+#      $NetBSD: Makefile,v 1.4 2018/12/15 18:03:17 gson Exp $
 
-BOOTDISK=      wd0                     # for QEMU etc.
-.if defined(EMUIMAGEMB)
+LIVEIMGBASE=   NetBSD-${DISTRIBVER}-i386-live  # gives ${IMGBASE}.img
+
+EMUIMAGEMB?=   1536                    # 2GB USB flash memories aren't 2GiB
 LIVEIMAGEMB=   ${EMUIMAGEMB}
-.endif
 
 .include "${.CURDIR}/../Makefile.liveimage"
diff -r 9ab69608cecc -r 4ad72e3933eb distrib/i386/liveimage/usbimage/Makefile
--- a/distrib/i386/liveimage/usbimage/Makefile  Sat Dec 15 17:11:10 2018 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-#      $NetBSD: Makefile,v 1.3 2012/11/03 14:25:33 tsutsui Exp $
-
-LIVEIMGBASE=   NetBSD-${DISTRIBVER}-i386-live-sd0root  # gives ${IMGBASE}.img
-
-USBIMAGEMB?=   1536                    # 2GB USB flash memories aren't 2GiB
-
-BOOTDISK=      sd0                     # for USB flash etc.
-LIVEIMAGEMB=   ${USBIMAGEMB}
-OMIT_SWAPIMG=  yes                     # no need to write swap
-
-.include "${.CURDIR}/../Makefile.liveimage"
diff -r 9ab69608cecc -r 4ad72e3933eb distrib/pmax/liveimage/emuimage/Makefile
--- a/distrib/pmax/liveimage/emuimage/Makefile  Sat Dec 15 17:11:10 2018 +0000
+++ b/distrib/pmax/liveimage/emuimage/Makefile  Sat Dec 15 18:03:16 2018 +0000
@@ -1,11 +1,10 @@
-#      $NetBSD: Makefile,v 1.3 2012/11/03 14:25:33 tsutsui Exp $
+#      $NetBSD: Makefile,v 1.4 2018/12/15 18:03:17 gson Exp $
 
-LIVEIMGBASE=   NetBSD-${DISTRIBVER}-pmax-live-sd0root  # gives ${IMGBASE}.img
+LIVEIMGBASE=   NetBSD-${DISTRIBVER}-pmax-live  # gives ${IMGBASE}.img
 
 .include <bsd.own.mk>
 
 KERN_SET=              kern-GENERIC
-BOOTDISK=              sd0
 .if defined(EMUIMAGEMB)
 LIVEIMAGEMB=           ${EMUIMAGEMB}
 .endif
diff -r 9ab69608cecc -r 4ad72e3933eb distrib/sparc/liveimage/emuimage/Makefile
--- a/distrib/sparc/liveimage/emuimage/Makefile Sat Dec 15 17:11:10 2018 +0000
+++ b/distrib/sparc/liveimage/emuimage/Makefile Sat Dec 15 18:03:16 2018 +0000
@@ -1,11 +1,10 @@
-#      $NetBSD: Makefile,v 1.3 2012/11/03 14:25:33 tsutsui Exp $
+#      $NetBSD: Makefile,v 1.4 2018/12/15 18:03:17 gson Exp $
 
-LIVEIMGBASE=   NetBSD-${DISTRIBVER}-sparc-live-sd0root # gives ${IMGBASE}.img



Home | Main Index | Thread Index | Old Index