socsvn commit: r301086 - in soc2015/kczekirda/mfsbsd: . conf mini mini/conf mini/files tools

kczekirda at FreeBSD.org kczekirda at FreeBSD.org
Thu Apr 14 10:33:34 UTC 2016


Author: kczekirda
Date: Thu Apr 14 10:33:25 2016
New Revision: 301086
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=301086

Log:
  bump to mfsBSD 2.2

Added:
  soc2015/kczekirda/mfsbsd/mini/
  soc2015/kczekirda/mfsbsd/mini/Makefile
  soc2015/kczekirda/mfsbsd/mini/README.md
  soc2015/kczekirda/mfsbsd/mini/conf/
  soc2015/kczekirda/mfsbsd/mini/conf/.cshrc.sample
  soc2015/kczekirda/mfsbsd/mini/conf/.profile.sample
  soc2015/kczekirda/mfsbsd/mini/conf/hosts.sample
  soc2015/kczekirda/mfsbsd/mini/conf/loader.conf.sample
  soc2015/kczekirda/mfsbsd/mini/conf/rc.local
  soc2015/kczekirda/mfsbsd/mini/conf/rc.sample
  soc2015/kczekirda/mfsbsd/mini/conf/ttys.sample
  soc2015/kczekirda/mfsbsd/mini/files/
  soc2015/kczekirda/mfsbsd/mini/files/basedirs
  soc2015/kczekirda/mfsbsd/mini/files/basefiles
  soc2015/kczekirda/mfsbsd/mini/files/instdirs
  soc2015/kczekirda/mfsbsd/mini/files/instfiles
  soc2015/kczekirda/mfsbsd/mini/files/localfiles
  soc2015/kczekirda/mfsbsd/mini/files/rescuelinks
  soc2015/kczekirda/mfsbsd/tools/do_gpt.sh   (contents, props changed)
Modified:
  soc2015/kczekirda/mfsbsd/BUILD
  soc2015/kczekirda/mfsbsd/INSTALL
  soc2015/kczekirda/mfsbsd/LICENSE
  soc2015/kczekirda/mfsbsd/Makefile
  soc2015/kczekirda/mfsbsd/README
  soc2015/kczekirda/mfsbsd/README.md
  soc2015/kczekirda/mfsbsd/conf/loader.conf.sample
  soc2015/kczekirda/mfsbsd/conf/rc.local.sample
  soc2015/kczekirda/mfsbsd/tools/zfsinstall

Modified: soc2015/kczekirda/mfsbsd/BUILD
==============================================================================
--- soc2015/kczekirda/mfsbsd/BUILD	Thu Apr 14 09:10:09 2016	(r301085)
+++ soc2015/kczekirda/mfsbsd/BUILD	Thu Apr 14 10:33:25 2016	(r301086)
@@ -1,9 +1,9 @@
 # $Id$
 #
 # mfsBSD building instructions
-# Copyright (c) 2007-2013 Martin Matuska <mm at FreeBSD.org>
+# Copyright (c) 2007-2015 Martin Matuska <mm at FreeBSD.org>
 #
-# Version 2.1
+# Version 2.2
 
 BUILDING INSTRUCTIONS:
  1. Configuration
@@ -43,26 +43,26 @@
 
     a) disc image
 	make BASE=/cdrom/usr/freebsd-dist
-	make BASE=/cdrom/9.2-RELEASE
+	make BASE=/cdrom/10.2-RELEASE
         make CUSTOM=1 BUILDWORLD=1 BUILDKERNEL=1
 
     b) bootable ISO file:
 	make iso BASE=/cdrom/usr/freebsd-dist
-	make iso BASE=/cdrom/9.2-RELEASE
+	make iso BASE=/cdrom/10.2-RELEASE
 	make iso CUSTOM=1 BUILDWORLD=1 BUILDKERNEL=1
 
     c) .tar.gz file:
 	make tar BASE=/cdrom/usr/freebsd-dist
-	make tar BASE=/cdrom/9.2-RELEASE
+	make tar BASE=/cdrom/10.2-RELEASE
 	make tar CUSTOM=1 BUILDWORLD=1 BUILDKERNEL=1
 
     d) roothack edition:
 	make iso CUSTOM=1 BUILDWORLD=1 BUILDKERNEL=1 ROOTHACK=1
 
     e) special edition (with FreeBSD distribution):
-	make iso BASE=/cdrom/9.2-RELEASE RELEASE=9.2-RELEASE ARCH=amd64
+	make iso BASE=/cdrom/10.2-RELEASE RELEASE=10.2-RELEASE ARCH=amd64
 
     f) GCE-compatible .tar.gz file:
 	make gce BASE=/cdrom/usr/freebsd-dist
-	make gce BASE=/cdrom/9.2-RELEASE
+	make gce BASE=/cdrom/10.2-RELEASE
 	make gce CUSTOM=1 BUILDWORLD=1 BUILDKERNEL=1

Modified: soc2015/kczekirda/mfsbsd/INSTALL
==============================================================================
--- soc2015/kczekirda/mfsbsd/INSTALL	Thu Apr 14 09:10:09 2016	(r301085)
+++ soc2015/kczekirda/mfsbsd/INSTALL	Thu Apr 14 10:33:25 2016	(r301086)
@@ -1,9 +1,9 @@
 # $Id$
 #
 # mfsBSD installation (deployment) instructions
-# Copyright (c) 2007-2013 Martin Matuska <mm at FreeBSD.org>
+# Copyright (c) 2007-2015 Martin Matuska <mm at FreeBSD.org>
 #
-# Version 2.1
+# Version 2.2
 
 BUILD:
 For customized build please see the BUILD file
@@ -15,7 +15,7 @@
 FreeBSD on this server.
 
 a) modify your configuration files (do this properly, or no ssh access)
-b) create an image file (e.g. make BASE=/cdrom/9.2-RELEASE)
+b) create an image file (e.g. make BASE=/cdrom/10.2-RELEASE)
 c) write image with dd to the bootable harddrive of the linux server
 d) reboot
 e) ssh to your machine and enjoy :)
@@ -25,7 +25,7 @@
 need to remain in the tray after booting.
 
 a) modify your configuration files
-b) create an iso image file (e.g. make iso BASE=/cdrom/9.2-RELEASE)
+b) create an iso image file (e.g. make iso BASE=/cdrom/10.2-RELEASE)
 c) burn ISO image onto a writable CD
 d) boot from the CD and enjoy :)
 
@@ -34,10 +34,9 @@
 all harddrives remotely.
 
 a) modify your configuration files
-b) create an .tar.gz file (e.g. make tar BASE=/cdrom/9.2-RELEASE)
-c) create your slice with sysinstall or fdisk (e.g. ada0s1)
-d) auto-label the slice (e.g. bsdlabel -r -w ada0s1 auto)
-e) create a filesystem on the slice (e.g. newfs /dev/ada0s1a)
-f) mount the slice and extract your .tar.gz file on it
-g) configure a bootmanager (e.g. boot0cfg -B -s 1 /dev/ada0)
-h) boot from your rescue system and enjoy :)
+b) create an .tar.gz file (e.g. make tar BASE=/cdrom/10.2-RELEASE)
+c) create your UFS partition with sysinstall or gpart (e.g. ada0p2)
+d) create a filesystem on the partition (e.g. newfs /dev/ada0p2)
+e) mount the slice and extract your .tar.gz file on it
+f) configure a bootmanager (e.g. gpart bootcode -b /poot/pmbr -p /boot/gptboot -i 1 ada0)
+g) boot from your rescue system and enjoy :)

Modified: soc2015/kczekirda/mfsbsd/LICENSE
==============================================================================
--- soc2015/kczekirda/mfsbsd/LICENSE	Thu Apr 14 09:10:09 2016	(r301085)
+++ soc2015/kczekirda/mfsbsd/LICENSE	Thu Apr 14 10:33:25 2016	(r301086)
@@ -1,7 +1,7 @@
 The compilation of software known as mfsBSD is distributed under the
 following terms:
 
-Copyright (C) 2007-2013 Martin Matuska. All rights reserved.
+Copyright (C) 2007-2015 Martin Matuska. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions

Modified: soc2015/kczekirda/mfsbsd/Makefile
==============================================================================
--- soc2015/kczekirda/mfsbsd/Makefile	Thu Apr 14 09:10:09 2016	(r301085)
+++ soc2015/kczekirda/mfsbsd/Makefile	Thu Apr 14 10:33:25 2016	(r301086)
@@ -1,7 +1,7 @@
 # $Id$
 #
 # mfsBSD
-# Copyright (c) 2007-2013 Martin Matuska <mm at FreeBSD.org>
+# Copyright (c) 2007-2015 Martin Matuska <mm at FreeBSD.org>
 #
 # Version 2.1
 #
@@ -13,7 +13,7 @@
 KERNCONF?= GENERIC
 MFSROOT_FREE_INODES?=10%
 MFSROOT_FREE_BLOCKS?=10%
-MFSROOT_MAXSIZE?=64m
+MFSROOT_MAXSIZE?=80m
 
 # If you want to build your own kernel and make you own world, you need to set
 # -DCUSTOM or CUSTOM=1
@@ -84,8 +84,10 @@
 
 .if defined(V)
 _v=
+VERB=1
 .else
 _v=@
+VERB=
 .endif
 
 .if !defined(ARCH)
@@ -385,7 +387,6 @@
 .if !defined(ROOTHACK)
 	${_v}echo "/dev/md0 / ufs rw 0 0" > ${_DESTDIR}/etc/fstab
 	${_v}echo "tmpfs /tmp tmpfs rw,mode=1777 0 0" >> ${_DESTDIR}/etc/fstab
-	${_v}echo "tmpfs /usr tmpfs rw,mode=1755 0 0" >> ${_DESTDIR}/etc/fstab
 .else
 	${_v}${TOUCH} ${_DESTDIR}/etc/fstab
 .endif
@@ -457,7 +458,8 @@
 	${_v}${MKDIR} ${WRKDIR}/disk/boot && ${CHOWN} root:wheel ${WRKDIR}/disk
 	${_v}${RM} -f ${_BOOTDIR}/kernel/kernel.debug
 	${_v}${CP} -rp ${_BOOTDIR}/kernel ${WRKDIR}/disk/boot
-.for FILE in boot defaults loader loader.help *.rc *.4th
+	${_v}${CP} -rp ${_DESTDIR}/boot.config ${WRKDIR}/disk
+.for FILE in boot defaults device.hints loader loader.help *.rc *.4th
 	${_v}${CP} -rp ${_DESTDIR}/boot/${FILE} ${WRKDIR}/disk/boot
 .endfor
 	${_v}${RM} -rf ${WRKDIR}/disk/boot/kernel/*.ko ${WRKDIR}/disk/boot/kernel/*.symbols
@@ -501,7 +503,7 @@
 	@echo -n "Creating and compressing mfsroot ..."
 	${_v}${MKDIR} ${WRKDIR}/mnt
 	${_v}${MAKEFS} -t ffs -m ${MFSROOT_MAXSIZE} -f ${MFSROOT_FREE_INODES} -b ${MFSROOT_FREE_BLOCKS} ${WRKDIR}/disk/mfsroot ${_ROOTDIR} > /dev/null
-	${_v}${RM} -rf ${WRKDIR}/mnt ${_DESTDIR}
+	${_v}${RM} -rf ${WRKDIR}/mnt
 	${_v}${GZIP} -9 -f ${WRKDIR}/disk/mfsroot
 	${_v}${GZIP} -9 -f ${WRKDIR}/disk/boot/kernel/kernel
 	${_v}if [ -f "${CFGDIR}/loader.conf" ]; then \
@@ -524,13 +526,17 @@
 image: install prune config genkeys customfiles boot compress-usr mfsroot fbsddist ${IMAGE}
 ${IMAGE}:
 	@echo -n "Creating image file ..."
+.if defined(BSDPART)
 	${_v}${MKDIR} ${WRKDIR}/mnt ${WRKDIR}/trees/base/boot
 	${_v}${INSTALL} -m 0444 ${WRKDIR}/disk/boot/boot ${WRKDIR}/trees/base/boot/
 	${_v}${DOFS} ${BSDLABEL} "" ${WRKDIR}/disk.img ${WRKDIR} ${WRKDIR}/mnt 0 ${WRKDIR}/disk 80000 auto > /dev/null 2> /dev/null
 	${_v}${RM} -rf ${WRKDIR}/mnt ${WRKDIR}/trees
-	${_v}${MV} ${WRKDIR}/disk.img ${IMAGE}
+	${_v}${MV} ${WRKDIR}/disk.img ${.TARGET}
+.else
+	${_v}${TOOLSDIR}/do_gpt.sh ${.TARGET} ${WRKDIR}/disk 0 ${_ROOTDIR}/boot ${VERB}
+.endif
 	@echo " done"
-	${_v}${LS} -l ${IMAGE}
+	${_v}${LS} -l ${.TARGET}
 
 gce: install prune config genkeys customfiles boot compress-usr mfsroot fbsddist ${IMAGE} ${GCEFILE}
 ${GCEFILE}:

Modified: soc2015/kczekirda/mfsbsd/README
==============================================================================
--- soc2015/kczekirda/mfsbsd/README	Thu Apr 14 09:10:09 2016	(r301085)
+++ soc2015/kczekirda/mfsbsd/README	Thu Apr 14 10:33:25 2016	(r301086)
@@ -1,9 +1,9 @@
 # $Id$
 #
 # mfsBSD README
-# Copyright (c) 2007-2013 Martin Matuska <mm at FreeBSD.org>
+# Copyright (c) 2007-2015 Martin Matuska <mm at FreeBSD.org>
 #
-# Version 2.1
+# Version 2.2
 
 DESCRIPTION:
 This is a set of scripts that generates a bootable image, ISO file or boot 

Modified: soc2015/kczekirda/mfsbsd/README.md
==============================================================================
--- soc2015/kczekirda/mfsbsd/README.md	Thu Apr 14 09:10:09 2016	(r301085)
+++ soc2015/kczekirda/mfsbsd/README.md	Thu Apr 14 10:33:25 2016	(r301086)
@@ -1,7 +1,7 @@
 mfsBSD
 =========
 
-Copyright (c) 2007-2013 Martin Matuska <mm at FreeBSD.org>
+Copyright (c) 2007-2015 Martin Matuska <mm at FreeBSD.org>
 
 ## Description
 

Modified: soc2015/kczekirda/mfsbsd/conf/loader.conf.sample
==============================================================================
--- soc2015/kczekirda/mfsbsd/conf/loader.conf.sample	Thu Apr 14 09:10:09 2016	(r301085)
+++ soc2015/kczekirda/mfsbsd/conf/loader.conf.sample	Thu Apr 14 10:33:25 2016	(r301086)
@@ -46,8 +46,6 @@
 #
 # Do not change anything here until you know what you are doing
 #
-geom_uzip_load="YES"
-tmpfs_load="YES"
 mfs_load="YES"
 mfs_type="mfs_root"
 mfs_name="/mfsroot"

Modified: soc2015/kczekirda/mfsbsd/conf/rc.local.sample
==============================================================================
--- soc2015/kczekirda/mfsbsd/conf/rc.local.sample	Thu Apr 14 09:10:09 2016	(r301085)
+++ soc2015/kczekirda/mfsbsd/conf/rc.local.sample	Thu Apr 14 10:33:25 2016	(r301086)
@@ -1,11 +1,7 @@
 #!/bin/sh
 
-#echo "CC=clang" >> /etc/make.conf
-#echo "CXX=clang++" >> /etc/make.conf
-#echo "CPP=clang-cpp" >> /etc/make.conf
-
 sleep 10
 
 mkdir /cluster
-mount -t nfs -o nolockd 192.168.22.19:/mnt/tank/freebsd/$(hostname)/cluster /cluster
+mount -t nfs -o nolockd 192.168.22.19:/cluster/$(hostname)/cluster /cluster
 sh -x /cluster/run.sh > /cluster/run.log 2>&1 &

Added: soc2015/kczekirda/mfsbsd/mini/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ soc2015/kczekirda/mfsbsd/mini/Makefile	Thu Apr 14 10:33:25 2016	(r301086)
@@ -0,0 +1,297 @@
+# $Id$
+#
+# mfsBSD-mini
+# Copyright (c) 2015 Martin Matuska <mm at FreeBSD.org>
+#
+# Version 0.1
+#
+
+#
+# User-defined variables
+#
+BASEDIR?=${CURDIR}/../tmp/mfs
+CFGDIR?=${CURDIR}/conf
+MFSROOT_FREE_INODES?=5000
+MFSROOT_FREE_BLOCKS?=10%
+MFSROOT_MINSIZE?=64m
+MFSROOT_MAXSIZE?=64m
+ROOTPW?=mfsroot
+LOCALBASEDIR?=/
+
+#
+# Program defaults
+#
+CAT=/bin/cat
+CHFLAGS=/bin/chflags
+CHOWN=/usr/sbin/chown
+CP=/bin/cp
+DIRNAME=/usr/bin/dirname
+FIND=/usr/bin/find
+GTAR=/usr/local/bin/gtar
+GZIP=/usr/bin/gzip
+INSTALL=/usr/bin/install
+LN=/bin/ln
+LS=/bin/ls
+MAKEFS=/usr/sbin/makefs
+MKDIR=/bin/mkdir -p
+MTREE=/usr/sbin/mtree
+MV=/bin/mv
+PW=/usr/sbin/pw
+PWD=/bin/pwd
+RM=/bin/rm
+RMDIR=/bin/rmdir
+SYSCTL=/sbin/sysctl
+TAR=/usr/bin/tar
+TOUCH=/usr/bin/touch
+UNAME=/usr/bin/uname
+#
+BSDLABEL=bsdlabel
+
+#
+CURDIR!=${PWD}
+WRKDIR?=${CURDIR}/tmp
+FILESDIR=${CURDIR}/files
+TOOLSDIR=${CURDIR}/../tools
+#
+#
+DOFS=${TOOLSDIR}/doFS.sh
+BOOTMODULES=acpi ahci
+MFSMODULES=geom_mirror geom_nop opensolaris zfs ext2fs smbus ipmi ntfs nullfs tmpfs \
+	aesni crypto cryptodev geom_eli
+#
+.if defined(V)
+_v=
+VERB=1
+.else
+_v=@
+VERB=
+.endif
+
+.if !defined(ARCH)
+TARGET!=	${SYSCTL} -n hw.machine_arch
+.else
+TARGET=		${ARCH} 
+.endif
+
+.if !defined(RELEASE)
+RELEASE!=${UNAME} -r
+.endif
+
+IMAGE_PREFIX=mfsbsd-mini
+
+IMAGE?=	${IMAGE_PREFIX}-${RELEASE}-${TARGET}.img
+ISOIMAGE?= ${IMAGE_PREFIX}-${RELEASE}-${TARGET}.iso
+TARFILE?= ${IMAGE_PREFIX}-${RELEASE}-${TARGET}.tar
+GCEFILE?= ${IMAGE_PREFIX}-${RELEASE}-${TARGET}.tar.gz
+_DISTDIR= ${WRKDIR}/dist/${RELEASE}-${TARGET}
+
+.if !defined(DEBUG)
+EXCLUDE=--exclude *.symbols
+.else
+EXCLUDE=
+.endif
+
+_ROOTDIR=	${WRKDIR}/mfs
+_BOOTDIR=	${_ROOTDIR}/boot
+
+all: image
+
+destdir: ${_ROOTDIR} ${_BOOTDIR}
+${_ROOTDIR}:
+	${_v}${MKDIR} ${_ROOTDIR} && ${CHOWN} root:wheel ${_ROOTDIR}
+
+${_BOOTDIR}:
+	${_v}${MKDIR} ${_BOOTDIR}/kernel ${_BOOTDIR}/modules && ${CHOWN} -R root:wheel ${_BOOTDIR}
+
+hierarchy: destdir ${WRKDIR}/.hierarchy_done
+${WRKDIR}/.hierarchy_done:
+	${_v}echo -n "Creating directory hierarchy ..."
+	${_v}${MTREE} -deU -f ${BASEDIR}/etc/mtree/BSD.root.dist -p ${_ROOTDIR} > /dev/null
+	${_v}${MTREE} -deU -f ${BASEDIR}/etc/mtree/BSD.usr.dist -p ${_ROOTDIR}/usr > /dev/null
+	${_v}${TOUCH} ${WRKDIR}/.hierarchy_done
+	${_v}echo " done"
+
+installkernel: ${_BOOTDIR} ${WRKDIR}/.installkernel_done
+${WRKDIR}/.installkernel_done:
+	${_v}echo -n "Installing kernel ..."
+	${_v}${CP} -a ${BASEDIR}/boot/ ${_BOOTDIR}
+	${_v}${TOUCH} ${WRKDIR}/.installkernel_done
+	${_v}echo " done"
+
+rescuelinks: hierarchy ${WRKDIR}/.rescuelinks_done
+${WRKDIR}/.rescuelinks_done:
+	${_v}echo -n "Installing rescue with linking script ..."
+	${_v}${INSTALL} -m 0555 ${BASEDIR}/rescue/rescue ${_ROOTDIR}/rescue/rescue
+	${_v}for FILE in `cat ${FILESDIR}/rescuelinks`; do \
+		${LN} ${_ROOTDIR}/rescue/rescue ${_ROOTDIR}/$${FILE}; \
+	done
+	${_v}${TOUCH} ${WRKDIR}/.rescuelinks_done
+	${_v}echo " done"
+
+installbase: hierarchy rescuelinks ${WRKDIR}/.installbase_done
+${WRKDIR}/.installbase_done:
+	${_v}echo -n "Installing base files ..."
+	${_v}cd ${_ROOTDIR} && for FILE in `cat ${FILESDIR}/instfiles`; do \
+		${CP} -pP ${BASEDIR}/$${FILE} ${_ROOTDIR}/$${FILE}; \
+	done
+	${_v}cd ${_ROOTDIR} && for DIR in `cat ${FILESDIR}/instdirs`; do \
+		${CP} -a ${BASEDIR}/$${DIR}/ ${_ROOTDIR}/$${DIR}; \
+	done
+	${_v}${TOUCH} ${WRKDIR}/.installbase_done
+	${_v}echo " done"
+
+basetar: hierarchy rescuelinks ${WRKDIR}/.basetar_done
+${WRKDIR}/.basetar_done:
+	${_v}echo -n "Creating tar of base libraries and binaries ..."
+	${_v}cd ${BASEDIR} && ${TAR} -cJf ${_ROOTDIR}/.mfs_base.txz \
+	`cat ${FILESDIR}/basedirs` `cat ${FILESDIR}/basefiles`
+	${_v}${TOUCH} ${WRKDIR}/.basetar_done
+	${_v}echo " done"
+
+localtar: hierarchy ${WRKDIR}/.localtar_done
+${WRKDIR}/.localtar_done:
+.if exists(${FILESDIR}/localfiles)
+	${_v}echo -n "Creating local files tar ..."
+	${_v}cd ${LOCALBASEDIR}/usr/local && ${TAR} -cJf ${_ROOTDIR}/.mfs_local.txz \
+	`cat ${FILESDIR}/localfiles`
+	${_v}${TOUCH} ${WRKDIR}/.localtar_done
+	${_v}echo " done"
+.endif
+	
+install: installbase basetar localtar
+
+config: install ${WRKDIR}/.config_done
+${WRKDIR}/.config_done:
+	${_v}echo -n "Installing configuration scripts and files ..."
+	${_v}if [ -f "${CFGDIR}/loader.conf" ]; then \
+		${INSTALL} -m 0644 ${CFGDIR}/loader.conf ${_BOOTDIR}/loader.conf; \
+	else \
+		${INSTALL} -m 0644 ${CFGDIR}/loader.conf.sample ${_BOOTDIR}/loader.conf; \
+	fi
+.for FILE in rc hosts ttys resolv.conf rc.local
+	${_v}if [ -f "${CFGDIR}/${FILE}" ]; then \
+		${INSTALL} -m 0644 ${CFGDIR}/${FILE} ${_ROOTDIR}/etc/${FILE}; \
+	elif [ -f "${CFGDIR}/${FILE}.sample" ]; then \
+		${INSTALL} -m 0644 ${CFGDIR}/${FILE}.sample ${_ROOTDIR}/etc/${FILE}; \
+	fi
+.endfor
+	${_v}${MKDIR} ${_ROOTDIR}/root/bin
+.for FILE in .cshrc .profile
+	${_v}if [ -f "${CFGDIR}/${FILE}" ]; then \
+		${INSTALL} -m 0644 ${CFGDIR}/${FILE} ${_ROOTDIR}/root/${FILE}; \
+	elif [ -f "${CFGDIR}/${FILE}.sample" ]; then \
+		${INSTALL} -m 0644 ${CFGDIR}/${FILE}.sample ${_ROOTDIR}/root/${FILE}; \
+	fi
+.endfor
+	${_v}${INSTALL} ${TOOLSDIR}/zfsinstall ${_ROOTDIR}/root/bin
+	${_v}${INSTALL} ${TOOLSDIR}/destroygeom ${_ROOTDIR}/root/bin
+	${_v}echo "/dev/md0 / ufs rw 0 0" > ${_ROOTDIR}/etc/fstab
+	${_v}echo "tmpfs /tmp tmpfs rw,mode=1777 0 0" >> ${_ROOTDIR}/etc/fstab
+	${_v}echo ${ROOTPW} | ${PW} -V ${_ROOTDIR}/etc usermod root -h 0
+	${_v}${TOUCH} ${WRKDIR}/.config_done
+	${_v}echo " done"
+
+
+boot: installkernel install ${WRKDIR}/.boot_done
+${WRKDIR}/.boot_done:
+	${_v}echo -n "Configuring boot environment ..."
+	${_v}${MKDIR} ${WRKDIR}/disk/boot && ${CHOWN} root:wheel ${WRKDIR}/disk
+	${_v}${RM} -f ${_BOOTDIR}/kernel/kernel.debug
+	${_v}${CP} -rp ${_BOOTDIR}/kernel ${WRKDIR}/disk/boot
+.for FILE in boot defaults device.hints loader loader.help *.rc *.4th
+	${_v}${CP} -rp ${_ROOTDIR}/boot/${FILE} ${WRKDIR}/disk/boot
+.endfor
+	${_v}${RM} -rf ${WRKDIR}/disk/boot/kernel/*.ko ${WRKDIR}/disk/boot/kernel/*.symbols
+.if defined(DEBUG)
+	${_v}test -f ${_BOOTDIR}/kernel/kernel.symbols \
+	&& ${INSTALL} -m 0555 ${_BOOTDIR}/kernel/kernel.symbols ${WRKDIR}/disk/boot/kernel >/dev/null 2>/dev/null || exit 0
+.endif
+.for FILE in ${BOOTMODULES}
+	${_v}test -f ${_BOOTDIR}/kernel/${FILE}.ko \
+	&& ${INSTALL} -m 0555 ${_BOOTDIR}/kernel/${FILE}.ko ${WRKDIR}/disk/boot/kernel >/dev/null 2>/dev/null || exit 0
+. if defined(DEBUG)
+	${_v}test -f ${_BOOTDIR}/kernel/${FILE}.ko \
+	&& ${INSTALL} -m 0555 ${_BOOTDIR}/kernel/${FILE}.ko.symbols ${WRKDIR}/disk/boot/kernel >/dev/null 2>/dev/null || exit 0
+. endif
+.endfor
+	${_v}${MKDIR} ${_ROOTDIR}/boot/modules
+.for FILE in ${MFSMODULES}
+	${_v}test -f ${_BOOTDIR}/kernel/${FILE}.ko \
+	&& ${INSTALL} -m 0555 ${_BOOTDIR}/kernel/${FILE}.ko ${_ROOTDIR}/boot/modules >/dev/null 2>/dev/null || exit 0
+. if defined(DEBUG)
+	${_v}test -f ${_BOOTDIR}/kernel/${FILE}.ko.symbols \
+	&& ${INSTALL} -m 0555 ${_BOOTDIR}/kernel/${FILE}.ko.symbols ${_ROOTDIR}/boot/modules >/dev/null 2>/dev/null || exit 0
+. endif
+.endfor
+	${_v}${RM} -rf ${_BOOTDIR}/kernel ${_BOOTDIR}/*.symbols
+	${_v}${TOUCH} ${WRKDIR}/.boot_done
+	${_v}echo " done"
+
+boottar: boot ${WRKDIR}/.boottar_done
+${WRKDIR}/.boottar_done:
+	${_v}echo -n "Compressing mfsroot boot ..."
+	${_v}${TAR} -c -J -C ${_ROOTDIR} -f ${_ROOTDIR}/.mfs_boot.txz boot
+	${_v}cd ${_ROOTDIR} && ${RM} -rf boot
+	${_v}${TOUCH} ${WRKDIR}/.boottar_done
+	${_v}echo " done"
+
+mfsroot: boottar ${WRKDIR}/.mfsroot_done
+${WRKDIR}/.mfsroot_done:
+	${_v}echo -n "Creating and compressing mfsroot ..."
+	${_v}${MKDIR} ${WRKDIR}/mnt
+	${_v}${MAKEFS} -t ffs -M ${MFSROOT_MINSIZE} -m ${MFSROOT_MAXSIZE} -f ${MFSROOT_FREE_INODES} -b ${MFSROOT_FREE_BLOCKS} ${WRKDIR}/disk/mfsroot ${_ROOTDIR} > /dev/null
+	${_v}${RM} -rf ${WRKDIR}/mnt
+	${_v}${GZIP} -9 -f ${WRKDIR}/disk/mfsroot
+	${_v}${GZIP} -9 -f ${WRKDIR}/disk/boot/kernel/kernel
+	${_v}if [ -f "${CFGDIR}/loader.conf" ]; then \
+		${INSTALL} -m 0644 ${CFGDIR}/loader.conf ${WRKDIR}/disk/boot/loader.conf; \
+	else \
+		${INSTALL} -m 0644 ${CFGDIR}/loader.conf.sample ${WRKDIR}/disk/boot/loader.conf; \
+	fi
+	${_v}${TOUCH} ${WRKDIR}/.mfsroot_done
+	${_v}echo " done"
+
+image: install config boot mfsroot ${IMAGE}
+${IMAGE}:
+	@echo -n "Creating image file ..."
+.if defined(BSDPART)
+	${_v}${MKDIR} ${WRKDIR}/mnt ${WRKDIR}/trees/base/boot
+	${_v}${INSTALL} -m 0444 ${WRKDIR}/disk/boot/boot ${WRKDIR}/trees/base/boot/
+	${_v}${DOFS} ${BSDLABEL} "" ${WRKDIR}/disk.img ${WRKDIR} ${WRKDIR}/mnt 0 ${WRKDIR}/disk 80000 auto > /dev/null 2> /dev/null
+	${_v}${RM} -rf ${WRKDIR}/mnt ${WRKDIR}/trees
+	${_v}${MV} ${WRKDIR}/disk.img ${.TARGET}
+.else
+	${_v}${TOOLSDIR}/do_gpt.sh ${.TARGET} ${WRKDIR}/disk 0 ${BASEDIR}/boot ${VERB}
+.endif
+	@echo " done"
+	${_v}${LS} -l ${.TARGET}
+
+gce: install config boot mfsroot ${IMAGE} ${GCEFILE}
+${GCEFILE}:
+	${_v}echo -n "Creating GCE-compatible tarball..."
+.if !exists(${GTAR})
+	${_v}echo "${GTAR} is missing, please install archivers/gtar first"; exit 1
+.else
+	${_v}${GTAR} -C ${CURDIR} -Szcf ${GCEFILE} --transform='s/${IMAGE}/disk.raw/' ${IMAGE}
+	${_v}echo " GCE tarball built"
+	${_v}${LS} -l ${GCEFILE}
+.endif
+
+iso: install config boot mfsroot ${ISOIMAGE}
+${ISOIMAGE}:
+	${_v}echo -n "Creating ISO image ..."
+	${_v}${MAKEFS} -t cd9660 -o rockridge,bootimage=i386\;/boot/cdboot,no-emul-boot,label=mfsBSD ${ISOIMAGE} ${WRKDIR}/disk
+	${_v}echo " done"
+	${_v}${LS} -l ${ISOIMAGE}
+
+tar: install config boot mfsroot ${TARFILE}
+${TARFILE}:
+	${_v}echo -n "Creating tar file ..."
+	${_v}cd ${WRKDIR}/disk && ${FIND} . -depth 1 \
+		-exec ${TAR} -r -f ${CURDIR}/${TARFILE} {} \;
+	${_v}echo " done"
+	${_v}${LS} -l ${TARFILE}
+
+clean: 
+	${_v}if [ -d ${WRKDIR} ]; then ${CHFLAGS} -R noschg ${WRKDIR}; fi
+	${_v}cd ${WRKDIR} && ${RM} -rf mfs mnt disk dist trees .*_done

Added: soc2015/kczekirda/mfsbsd/mini/README.md
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ soc2015/kczekirda/mfsbsd/mini/README.md	Thu Apr 14 10:33:25 2016	(r301086)
@@ -0,0 +1,20 @@
+mfsBSD-mini
+===========
+
+Copyright (c) 2015 Martin Matuska <mm at FreeBSD.org>
+
+## Description
+
+This is a set of scripts that generates a small bootable image, ISO file or 
+tar archive from a installed FreeBSD system. The image gets completely loaded
+into memory.
+
+The image may be written directly using dd(1) onto any bootable block device,
+e.g. a hard disk or a USB stick e.g. /dev/da0, or a bootable partition only, 
+e.g. /dev/ada0p2
+
+## Building
+
+You need to do "make extract" in the main mfsBSD directory 
+
+Project homepage: http://mfsbsd.vx.sk

Added: soc2015/kczekirda/mfsbsd/mini/conf/.cshrc.sample
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ soc2015/kczekirda/mfsbsd/mini/conf/.cshrc.sample	Thu Apr 14 10:33:25 2016	(r301086)
@@ -0,0 +1,43 @@
+# $FreeBSD: releng/10.1/etc/root/dot.cshrc 243893 2012-12-05 13:56:39Z eadler $
+#
+# .cshrc - csh resource script, read at beginning of execution by each shell
+#
+# see also csh(1), environ(7).
+# more examples available at /usr/share/examples/csh/
+#
+
+alias h		history 25
+alias j		jobs -l
+alias la	ls -aF
+alias lf	ls -FA
+alias ll	ls -lAF
+
+# A righteous umask
+umask 22
+
+set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin $HOME/bin)
+
+setenv	EDITOR	vi
+setenv	PAGER	more
+setenv	BLOCKSIZE	K
+
+if ($?prompt) then
+	# An interactive shell -- set some stuff up
+	set prompt = "%N@%m:%~ %# "
+	set promptchars = "%#"
+
+	set filec
+	set history = 1000
+	set savehist = (1000 merge)
+	set autolist = ambiguous
+	# Use history to aid expansion
+	set autoexpand
+	set autorehash
+	set mail = (/var/mail/$USER)
+	if ( $?tcsh ) then
+		bindkey "^W" backward-delete-word
+		bindkey -k up history-search-backward
+		bindkey -k down history-search-forward
+	endif
+
+endif

Added: soc2015/kczekirda/mfsbsd/mini/conf/.profile.sample
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ soc2015/kczekirda/mfsbsd/mini/conf/.profile.sample	Thu Apr 14 10:33:25 2016	(r301086)
@@ -0,0 +1,10 @@
+# $FreeBSD: releng/10.1/etc/root/dot.profile 199243 2009-11-13 05:54:55Z ed $
+#
+PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:~/bin
+export PATH
+HOME=/root
+export HOME
+TERM=${TERM:-xterm}
+export TERM
+PAGER=more
+export PAGER

Added: soc2015/kczekirda/mfsbsd/mini/conf/hosts.sample
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ soc2015/kczekirda/mfsbsd/mini/conf/hosts.sample	Thu Apr 14 10:33:25 2016	(r301086)
@@ -0,0 +1,6 @@
+# $Id$
+#
+# The file will be the /etc/hosts file in your image
+#
+::1             localhost localhost.my.domain
+127.0.0.1       localhost localhost.my.domain

Added: soc2015/kczekirda/mfsbsd/mini/conf/loader.conf.sample
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ soc2015/kczekirda/mfsbsd/mini/conf/loader.conf.sample	Thu Apr 14 10:33:25 2016	(r301086)
@@ -0,0 +1,4 @@
+mfs_load="YES"
+mfs_type="mfs_root"
+mfs_name="/mfsroot"
+vfs.root.mountfrom="ufs:/dev/md0"

Added: soc2015/kczekirda/mfsbsd/mini/conf/rc.local
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ soc2015/kczekirda/mfsbsd/mini/conf/rc.local	Thu Apr 14 10:33:25 2016	(r301086)
@@ -0,0 +1,4 @@
+#!/bin/sh
+ln -s /usr/local/bin/dbclient /usr/local/bin/ssh
+mkdir -p /usr/local/etc/dropbear
+/usr/local/sbin/dropbear -R

Added: soc2015/kczekirda/mfsbsd/mini/conf/rc.sample
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ soc2015/kczekirda/mfsbsd/mini/conf/rc.sample	Thu Apr 14 10:33:25 2016	(r301086)
@@ -0,0 +1,40 @@
+#!/bin/sh
+HOME=/
+PATH=/sbin:/bin/:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
+export HOME PATH
+
+# REMOUT ROOT
+mount -uw /
+
+# EXTRACT BOOT
+tar -x -J -C / -f /.mfs_boot.txz
+
+# MOUNT TMPFS FILESYSTEMS
+mount -t tmpfs tmpfs /tmp
+mount -t tmpfs tmpfs /var
+mount -t tmpfs tmpfs /usr/local
+
+# EXTRACT BASE and LOCAL
+tar -x -J -C / -f /.mfs_base.txz
+[ -f /.mfs_local.txz ] && tar -x -J -C /usr/local -f /.mfs_local.txz
+
+# VAR
+mtree -deU -f /etc/mtree/BSD.var.dist -p /var > /dev/null
+touch /var/log/utx.lastlogin /var/log/utx.log
+cap_mkdb -f /tmp/termcap /etc/termcap.small
+
+# NETWORKING
+ifconfig lo0 inet 127.0.0.1/8
+for i in `ifconfig -l`; do
+	if [ "$i" != "lo0" ]; then
+		dhclient $i
+	fi
+done
+hostname mfsbsd
+
+# SERVERS
+newsyslog -C
+syslogd -s
+
+# LOCAL
+[ -f /etc/rc.local ] && . /etc/rc.local

Added: soc2015/kczekirda/mfsbsd/mini/conf/ttys.sample
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ soc2015/kczekirda/mfsbsd/mini/conf/ttys.sample	Thu Apr 14 10:33:25 2016	(r301086)
@@ -0,0 +1,278 @@
+# $Id$
+#
+console	none				unknown	off secure
+#
+ttyv0	"/usr/libexec/getty Pc"		cons25	on  secure
+# Virtual terminals
+ttyv1	"/usr/libexec/getty Pc"		cons25	on  secure
+ttyv2	"/usr/libexec/getty Pc"		cons25	off secure
+ttyv3	"/usr/libexec/getty Pc"		cons25	off secure
+ttyv4	"/usr/libexec/getty Pc"		cons25	off secure
+ttyv5	"/usr/libexec/getty Pc"		cons25	off secure
+ttyv6	"/usr/libexec/getty Pc"		cons25	off secure
+ttyv7	"/usr/libexec/getty Pc"		cons25	off secure
+ttyv8	"/usr/local/bin/xdm -nodaemon"	xterm	off secure
+# Serial terminals
+ttyu0	"/usr/libexec/getty std.19200"	dialup	on secure
+ttyu1	"/usr/libexec/getty std.19200"	dialup	on secure
+ttyu2	"/usr/libexec/getty std.9600"	dialup	off secure
+ttyu3	"/usr/libexec/getty std.9600"	dialup	off secure
+# Dumb console
+dcons	"/usr/libexec/getty std.9600"	vt100	off secure
+# Pseudo terminals
+ttyp0	none			network
+ttyp1	none			network
+ttyp2	none			network
+ttyp3	none			network
+ttyp4	none			network
+ttyp5	none			network
+ttyp6	none			network
+ttyp7	none			network
+ttyp8	none			network
+ttyp9	none			network
+ttypa	none			network
+ttypb	none			network
+ttypc	none			network
+ttypd	none			network
+ttype	none			network
+ttypf	none			network
+ttypg	none			network
+ttyph	none			network
+ttypi	none			network
+ttypj	none			network
+ttypk	none			network
+ttypl	none			network
+ttypm	none			network
+ttypn	none			network
+ttypo	none			network
+ttypp	none			network
+ttypq	none			network
+ttypr	none			network
+ttyps	none			network
+ttypt	none			network
+ttypu	none			network
+ttypv	none			network
+ttyq0	none			network
+ttyq1	none			network
+ttyq2	none			network
+ttyq3	none			network
+ttyq4	none			network
+ttyq5	none			network
+ttyq6	none			network
+ttyq7	none			network
+ttyq8	none			network
+ttyq9	none			network
+ttyqa	none			network
+ttyqb	none			network
+ttyqc	none			network
+ttyqd	none			network
+ttyqe	none			network
+ttyqf	none			network
+ttyqg	none			network
+ttyqh	none			network
+ttyqi	none			network
+ttyqj	none			network
+ttyqk	none			network
+ttyql	none			network
+ttyqm	none			network
+ttyqn	none			network
+ttyqo	none			network
+ttyqp	none			network
+ttyqq	none			network
+ttyqr	none			network
+ttyqs	none			network
+ttyqt	none			network
+ttyqu	none			network
+ttyqv	none			network
+ttyr0	none			network
+ttyr1	none			network
+ttyr2	none			network
+ttyr3	none			network
+ttyr4	none			network
+ttyr5	none			network
+ttyr6	none			network
+ttyr7	none			network
+ttyr8	none			network
+ttyr9	none			network
+ttyra	none			network
+ttyrb	none			network
+ttyrc	none			network
+ttyrd	none			network
+ttyre	none			network
+ttyrf	none			network
+ttyrg	none			network
+ttyrh	none			network
+ttyri	none			network
+ttyrj	none			network
+ttyrk	none			network
+ttyrl	none			network
+ttyrm	none			network
+ttyrn	none			network
+ttyro	none			network
+ttyrp	none			network
+ttyrq	none			network
+ttyrr	none			network
+ttyrs	none			network
+ttyrt	none			network
+ttyru	none			network
+ttyrv	none			network
+ttys0	none			network
+ttys1	none			network
+ttys2	none			network
+ttys3	none			network
+ttys4	none			network
+ttys5	none			network
+ttys6	none			network
+ttys7	none			network
+ttys8	none			network
+ttys9	none			network
+ttysa	none			network
+ttysb	none			network
+ttysc	none			network
+ttysd	none			network
+ttyse	none			network
+ttysf	none			network
+ttysg	none			network
+ttysh	none			network
+ttysi	none			network
+ttysj	none			network
+ttysk	none			network
+ttysl	none			network
+ttysm	none			network
+ttysn	none			network
+ttyso	none			network
+ttysp	none			network
+ttysq	none			network
+ttysr	none			network
+ttyss	none			network
+ttyst	none			network
+ttysu	none			network
+ttysv	none			network
+ttyP0	none			network
+ttyP1	none			network
+ttyP2	none			network
+ttyP3	none			network
+ttyP4	none			network
+ttyP5	none			network
+ttyP6	none			network
+ttyP7	none			network
+ttyP8	none			network
+ttyP9	none			network
+ttyPa	none			network
+ttyPb	none			network
+ttyPc	none			network
+ttyPd	none			network
+ttyPe	none			network
+ttyPf	none			network
+ttyPg	none			network
+ttyPh	none			network
+ttyPi	none			network
+ttyPj	none			network
+ttyPk	none			network
+ttyPl	none			network
+ttyPm	none			network
+ttyPn	none			network
+ttyPo	none			network
+ttyPp	none			network
+ttyPq	none			network
+ttyPr	none			network
+ttyPs	none			network
+ttyPt	none			network
+ttyPu	none			network
+ttyPv	none			network
+ttyQ0	none			network
+ttyQ1	none			network
+ttyQ2	none			network
+ttyQ3	none			network
+ttyQ4	none			network
+ttyQ5	none			network
+ttyQ6	none			network
+ttyQ7	none			network
+ttyQ8	none			network
+ttyQ9	none			network
+ttyQa	none			network
+ttyQb	none			network
+ttyQc	none			network
+ttyQd	none			network
+ttyQe	none			network
+ttyQf	none			network
+ttyQg	none			network
+ttyQh	none			network
+ttyQi	none			network
+ttyQj	none			network
+ttyQk	none			network
+ttyQl	none			network
+ttyQm	none			network
+ttyQn	none			network
+ttyQo	none			network
+ttyQp	none			network
+ttyQq	none			network
+ttyQr	none			network
+ttyQs	none			network
+ttyQt	none			network
+ttyQu	none			network
+ttyQv	none			network
+ttyR0	none			network
+ttyR1	none			network
+ttyR2	none			network
+ttyR3	none			network
+ttyR4	none			network
+ttyR5	none			network
+ttyR6	none			network
+ttyR7	none			network
+ttyR8	none			network
+ttyR9	none			network
+ttyRa	none			network
+ttyRb	none			network
+ttyRc	none			network
+ttyRd	none			network
+ttyRe	none			network
+ttyRf	none			network
+ttyRg	none			network
+ttyRh	none			network
+ttyRi	none			network
+ttyRj	none			network
+ttyRk	none			network
+ttyRl	none			network
+ttyRm	none			network
+ttyRn	none			network
+ttyRo	none			network
+ttyRp	none			network
+ttyRq	none			network
+ttyRr	none			network
+ttyRs	none			network
+ttyRt	none			network
+ttyRu	none			network
+ttyRv	none			network
+ttyS0	none			network
+ttyS1	none			network
+ttyS2	none			network
+ttyS3	none			network
+ttyS4	none			network
+ttyS5	none			network
+ttyS6	none			network
+ttyS7	none			network
+ttyS8	none			network
+ttyS9	none			network
+ttySa	none			network
+ttySb	none			network
+ttySc	none			network
+ttySd	none			network
+ttySe	none			network
+ttySf	none			network
+ttySg	none			network
+ttySh	none			network
+ttySi	none			network
+ttySj	none			network
+ttySk	none			network
+ttySl	none			network
+ttySm	none			network
+ttySn	none			network
+ttySo	none			network
+ttySp	none			network
+ttySq	none			network
+ttySr	none			network
+ttySs	none			network
+ttySt	none			network
+ttySu	none			network
+ttySv	none			network

Added: soc2015/kczekirda/mfsbsd/mini/files/basedirs
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ soc2015/kczekirda/mfsbsd/mini/files/basedirs	Thu Apr 14 10:33:25 2016	(r301086)
@@ -0,0 +1,7 @@
+lib/geom
+libexec
+usr/libexec/bsdconfig
+usr/libexec/bsdinstall
+usr/share/bsdconfig
+usr/share/syscons
+usr/share/zoneinfo

Added: soc2015/kczekirda/mfsbsd/mini/files/basefiles
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ soc2015/kczekirda/mfsbsd/mini/files/basefiles	Thu Apr 14 10:33:25 2016	(r301086)
@@ -0,0 +1,116 @@
+bin/domainname
+bin/sleep
+sbin/dhclient-script
+sbin/geli
+sbin/gnop
+sbin/poweroff
+sbin/resolvconf
+sbin/rmd160
+sbin/sha1
+sbin/sha256
+sbin/sha512
+sbin/shutdown
+lib/libalias*
+lib/libbegemot.so.*
+lib/libbsdxml.so.*
+lib/libc.so.*
+lib/libcam.so.*
+lib/libcrypt.so.*
+lib/libcrypto.so.*
+lib/libctf.so.*
+lib/libcxxrt.so.*
+lib/libdevstat.so.*
+lib/libedit.so.*

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***


More information about the svn-soc-all mailing list