Add an example on how to create a live CD with xorg.
authorSascha Wildner <swildner@dragonflybsd.org>
Sat, 8 Mar 2008 22:00:03 +0000 (22:00 +0000)
committerSascha Wildner <swildner@dragonflybsd.org>
Sat, 8 Mar 2008 22:00:03 +0000 (22:00 +0000)
To build one, you can use the following commands:

% cd /usr/src/nrelease
% make PKGSRC_PKG_PATH=/pkgsrc/dir/All release gui

See release(7) for more information.

Note that you will need pkgsrc binary packages locally. In the example above,
replace /pkgsrc/dir with the path where they are kept.

The resulting ISO will be /usr/release/dfly-gui.iso.

nrelease/Makefile
nrelease/gui/etc/X11/xorg.conf [new file with mode: 0644]
nrelease/gui/etc/fstab [new file with mode: 0644]
nrelease/gui/etc/rc.conf [new file with mode: 0644]
nrelease/gui/root/.xinitrc [new file with mode: 0644]
share/man/man7/release.7

index 1a8a1ca..af6e433 100644 (file)
@@ -1,4 +1,4 @@
-# $DragonFly: src/nrelease/Makefile,v 1.76 2008/03/07 20:29:24 swildner Exp $
+# $DragonFly: src/nrelease/Makefile,v 1.77 2008/03/08 22:00:03 swildner Exp $
 #
 
 #########################################################################
@@ -20,7 +20,7 @@ WITH_INSTALLER=
 # targes may be specified which set make variables which enhance
 # the build in various ways.
 #
-installer:
+gui installer:
 
 warning:
        @echo "WARNING: The installer_* targets are now obsolete, please"
@@ -29,6 +29,9 @@ warning:
        @echo "will continue in 10 seconds"
        @sleep 10
 
+.if make(gui)
+WITH_GUI=
+.endif
 .if make(installer)
 WITH_INSTALLER=
 .endif
@@ -38,7 +41,6 @@ WITH_INSTALLER=
 #########################################################################
 
 ISODIR ?= /usr/release
-ISOFILE ?= ${ISODIR}/dfly.iso
 ISOROOT = ${ISODIR}/root
 OBJSYS= ${.OBJDIR}/../sys
 KERNCONF ?= GENERIC VKERNEL
@@ -78,6 +80,16 @@ OLD_PKGSRC_PACKAGES?= cdrtools-2.01.01.27nb1 cdrecord-2.00.3nb2 \
 REQ_ROOTSKELS= ${.CURDIR}/root
 ROOTSKELS?=    ${REQ_ROOTSKELS}
 
+.if defined(WITH_GUI)
+ISOFILE?=              ${ISODIR}/dfly-gui.iso
+PKGSRC_PACKAGES+=      modular-xorg-apps \
+                       modular-xorg-drivers \
+                       modular-xorg-fonts \
+                       modular-xorg-libs \
+                       fluxbox
+ROOTSKELS+=            ${.CURDIR}/gui
+.endif
+
 .if defined(WITH_INSTALLER)
 # note: the old dfuibe_install and curses depend on the old gettext and
 # must be removed for the old gettext to be removed.  The new dfuibe install
@@ -91,6 +103,8 @@ PKGSRC_PACKAGES+=    libaura-3.1.tgz libdfui-4.2.tgz libinstaller-5.1.tgz
 ROOTSKELS+=            ${.CURDIR}/installer
 .endif
 
+ISOFILE ?= ${ISODIR}/dfly.iso
+
 # note: we use the '${NRLOBJDIR}/nrelease' construct, that is we add
 # the additional '/nrelease' manually, as a safety measure.
 #
@@ -234,6 +248,11 @@ customizeiso:
        rmdir ${ISOROOT}/tmp/packages
        find ${ISOROOT}${PKGSRC_DB} -name +CONTENTS -type f -exec sed -i '' -e 's,${ISOROOT},,' -- {} \;
        chroot ${ISOROOT} ${PKGBIN_PKG_ADMIN} rebuild
+.if defined(WITH_GUI)
+.for FONT in 75dpi 100dpi misc Type1 TTF
+       chroot ${ISOROOT} /usr/pkg/bin/mkfontdir /usr/pkg/lib/X11/fonts/${FONT}
+.endfor
+.endif
 
 mklocatedb:
        ( find -s ${ISOROOT} -path ${ISOROOT}/tmp -or \
diff --git a/nrelease/gui/etc/X11/xorg.conf b/nrelease/gui/etc/X11/xorg.conf
new file mode 100644 (file)
index 0000000..fa50280
--- /dev/null
@@ -0,0 +1,74 @@
+# $DragonFly: src/nrelease/gui/etc/X11/xorg.conf,v 1.1 2008/03/08 22:00:03 swildner Exp $
+
+Section "ServerLayout"
+       Identifier      "Layout0"
+       Screen  0       "Screen0"       0       0
+       InputDevice     "Keyboard0"     "CoreKeyboard"
+       InputDevice     "Mouse0"        "CorePointer"
+EndSection
+
+Section "Files"
+       RgbPath      "/usr/pkg/share/X11/rgb"
+       ModulePath   "/usr/pkg/lib/xorg/modules"
+       FontPath     "/usr/pkg/lib/X11/fonts/misc/"
+       FontPath     "/usr/pkg/lib/X11/fonts/TTF/"
+       FontPath     "/usr/pkg/lib/X11/fonts/OTF"
+       FontPath     "/usr/pkg/lib/X11/fonts/Type1/"
+       FontPath     "/usr/pkg/lib/X11/fonts/100dpi/"
+       FontPath     "/usr/pkg/lib/X11/fonts/75dpi/"
+EndSection
+
+Section "InputDevice"
+       Identifier  "Keyboard0"
+       Driver      "kbd"
+EndSection
+
+Section "InputDevice"
+       Identifier  "Mouse0"
+       Driver      "mouse"
+       Option      "Protocol" "auto"
+       Option      "Device" "/dev/sysmouse"
+       Option      "ZAxisMapping" "4 5 6 7"
+EndSection
+
+Section "Monitor"
+       Identifier      "Monitor0"
+       HorizSync       30 - 60
+       VertRefresh     50.0 - 100.0
+       Option          "DPMS"
+EndSection
+
+Section "Device"
+       Identifier      "Card0"
+       Driver          "vesa"
+EndSection
+
+Section "Screen"
+       Identifier "Screen0"
+       Device     "Card0"
+       Monitor    "Monitor0"
+       SubSection "Display"
+               Depth     1
+               Modes   "640x480"
+       EndSubSection
+       SubSection "Display"
+               Depth     4
+               Modes   "800x600" "640x480"
+       EndSubSection
+       SubSection "Display"
+               Depth     8
+               Modes   "800x600" "640x480"
+       EndSubSection
+       SubSection "Display"
+               Depth     15
+               Modes   "1024x768" "800x600" "640x480"
+       EndSubSection
+       SubSection "Display"
+               Depth     16
+               Modes   "1024x768" "800x600" "640x480"
+       EndSubSection
+       SubSection "Display"
+               Depth     24
+               Modes   "1024x768" "800x600" "640x480"
+       EndSubSection
+EndSection
diff --git a/nrelease/gui/etc/fstab b/nrelease/gui/etc/fstab
new file mode 100644 (file)
index 0000000..cafada2
--- /dev/null
@@ -0,0 +1,12 @@
+# $DragonFly: src/nrelease/gui/etc/fstab,v 1.1 2008/03/08 22:00:03 swildner Exp $
+#
+# Device               Mountpoint      FStype  Options         Dump    Pass#
+/dev/acd0a             /               cd9660  ro,noauto       0       0
+swap                   /root           mfs     rw,-C,-s=32768  0       0
+swap                   /var            mfs     rw,-C,-s=32768,-i=2048 0 0
+swap                   /tmp            mfs     rw,-C,-s=8192   0       0
+swap                   /etc            mfs     rw,-C,-s=8192   0       0
+swap                   /dev            mfs     rw,-C,-s=8192,-i=512 0  0
+swap                   /usr/local/etc  mfs     rw,-C,-s=8192   0       0
+swap                   /usr/pkg/share/X11/xkb/compiled mfs     rw,-C,-s=8192   0       0
+proc                   /proc           procfs  rw              0       0
diff --git a/nrelease/gui/etc/rc.conf b/nrelease/gui/etc/rc.conf
new file mode 100644 (file)
index 0000000..ff3ff21
--- /dev/null
@@ -0,0 +1,19 @@
+# $DragonFly: src/nrelease/gui/etc/rc.conf,v 1.1 2008/03/08 22:00:03 swildner Exp $
+# rc.conf for CDRom boot.
+#
+# NOTE!  This rc.conf is designed for a CD boot.  When starting fresh on
+# your HD you can simply remove most or all of the lines below and then
+# add features as appropriate.
+#
+kern_securelevel_enable="NO"
+nfs_reserved_port_only="YES"
+sshd_enable="NO"
+usbd_enable="NO"
+syslogd_enable="NO"
+nfs_client_enable="YES"
+nfs_server_enable="NO"
+rpc_umntall_enable="NO"
+rpcbind_program="/usr/sbin/portmap"
+sendmail_enable="NO"
+cron_enable="NO"
+moused_enable="YES"
diff --git a/nrelease/gui/root/.xinitrc b/nrelease/gui/root/.xinitrc
new file mode 100644 (file)
index 0000000..75feae9
--- /dev/null
@@ -0,0 +1,4 @@
+# $DragonFly: src/nrelease/gui/root/.xinitrc,v 1.1 2008/03/08 22:00:03 swildner Exp $
+
+xterm -geometry +0+0 -ls &
+exec startfluxbox
index 1ba1eca..6d9ead7 100644 (file)
@@ -29,9 +29,9 @@
 .\" SUCH DAMAGE.
 .\"
 .\" $FreeBSD: src/share/man/man7/release.7,v 1.3.2.6 2003/04/12 20:42:30 murray Exp $
-.\" $DragonFly: src/share/man/man7/release.7,v 1.10 2008/02/19 21:20:54 thomas Exp $
+.\" $DragonFly: src/share/man/man7/release.7,v 1.11 2008/03/08 22:00:03 swildner Exp $
 .\"
-.Dd August 19, 2007
+.Dd March 8, 2008
 .Dt RELEASE 7
 .Os
 .Sh NAME
@@ -103,6 +103,9 @@ or
 target, the
 .Bx
 Installer will be added to the resulting ISO image.
+Likewise, if the
+.Cm gui
+target is specified, X11 will be added to the ISO.
 .Pp
 During the process of rolling a release a check is performed to find
 out if a number of external packages to be put on the CD exist on
@@ -110,7 +113,11 @@ your system.
 If they cannot be found, the release process will stop and give
 proper commands for downloading and setting up these packages.
 .Sh ENVIRONMENT
-.Bl -tag -width ".Va WITHOUT_SRCS"
+.Bl -tag -width ".Va PKGSRC_PKG_PATH"
+.It Va PKGSRC_PKG_PATH
+Specifies the location where binary
+.Xr pkgsrc 7
+packages are kept.
 .It Va WITHOUT_SRCS
 If set, this variable will prevent kernel source code from being copied
 to
@@ -143,7 +150,8 @@ directory.
 .Xr cvs 1 ,
 .Xr make 1 ,
 .Xr make.conf 5 ,
-.Xr build 7
+.Xr build 7 ,
+.Xr pkgsrc 7
 .Sh HISTORY
 .Pa src/nrelease
 was added in