Module Name: src
Committed By: christos
Date: Fri Apr 4 16:45:51 UTC 2014
Modified Files:
src/distrib/utils/embedded/conf: amd64.conf x86.conf
Added Files:
src/distrib/utils/embedded/conf: i386.conf
Log Message:
merge more, and add an i386 image
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/distrib/utils/embedded/conf/amd64.conf
cvs rdiff -u -r0 -r1.1 src/distrib/utils/embedded/conf/i386.conf
cvs rdiff -u -r1.3 -r1.4 src/distrib/utils/embedded/conf/x86.conf
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/distrib/utils/embedded/conf/amd64.conf
diff -u src/distrib/utils/embedded/conf/amd64.conf:1.1 src/distrib/utils/embedded/conf/amd64.conf:1.2
--- src/distrib/utils/embedded/conf/amd64.conf:1.1 Mon Mar 31 12:20:49 2014
+++ src/distrib/utils/embedded/conf/amd64.conf Fri Apr 4 12:45:51 2014
@@ -1,46 +1,6 @@
-# $NetBSD: amd64.conf,v 1.1 2014/03/31 16:20:49 christos Exp $
+# $NetBSD: amd64.conf,v 1.2 2014/04/04 16:45:51 christos Exp $
# Amd64 customization script used by mkimage
#
board=amd64
-MACHINE=amd64
-kernel=$src/sys/arch/amd64/compile/GENERIC/netbsd
-bootfile=$release/usr/mdec/boot
-
. ${DIR}/conf/x86.conf
-
-make_filesystems() {
- make_filesystems_x86
-}
-
-make_fstab() {
- make_fstab_x86
-}
-
-make_label() {
- make_label_x86
-}
-
-customize() {
- customize_x86
- cat >> ${mnt}/etc/rc.conf << EOF
-wscons=YES
-devpubd=YES
-EOF
-
-}
-
-populate() {
- if [ ! -f ${kernel} ]; then
- echo ${PROG}: Missing ${kernel} 1>&2
- exit 1
- fi
-
- echo "${bar} installing kernel ${bar}"
- cp ${kernel} ${mnt}/netbsd
- if [ ! -f ${bootfile} ]; then
- echo ${PROG}: Missing ${bootfile} 1>&2
- exit 1
- fi
- cp ${bootfile} ${mnt}/boot
-}
Index: src/distrib/utils/embedded/conf/x86.conf
diff -u src/distrib/utils/embedded/conf/x86.conf:1.3 src/distrib/utils/embedded/conf/x86.conf:1.4
--- src/distrib/utils/embedded/conf/x86.conf:1.3 Mon Mar 31 14:18:45 2014
+++ src/distrib/utils/embedded/conf/x86.conf Fri Apr 4 12:45:51 2014
@@ -1,18 +1,20 @@
-# $NetBSD: x86.conf,v 1.3 2014/03/31 18:18:45 christos Exp $
+# $NetBSD: x86.conf,v 1.4 2014/04/04 16:45:51 christos Exp $
# x86 shared config
#
+
image=$HOME/${board}.img
+MACHINE=${board}
+kernel=$src/sys/arch/${board}/compile/GENERIC/netbsd
+bootfile=$release/usr/mdec/boot
specialdirs="/kern /proc"
extra=8 # spare space
-
size=0 # autocompute
netbsdid=169
-
ffsoffset=63b
-make_label_x86() {
+make_label() {
# compute all sizes in terms of sectors
local totalsize=$(( ${newsize} * 1024 * 2 / 512 ))
@@ -52,7 +54,7 @@ drivedata: 0
EOF
}
-make_fstab_x86_normal() {
+make_fstab_normal() {
cat > ${mnt}/etc/fstab << EOF
# NetBSD /etc/fstab
# See /usr/share/examples/fstab/ for more examples.
@@ -66,7 +68,7 @@ EOF
# From Richard Neswold's:
# http://rich-tbp.blogspot.com/2013/03/netbsd-on-rpi-minimizing-disk-writes.html
# Also for the postfix stuff below
-make_fstab_x86_minwrites() {
+make_fstab_minwrites() {
cat > ${mnt}/etc/fstab << EOF
# NetBSD /etc/fstab
# See /usr/share/examples/fstab/ for more examples.
@@ -84,15 +86,15 @@ tmpfs /var/chroot tmpfs rw,union,-s10M
EOF
}
-make_fstab_x86() {
+make_fstab() {
if $minwrites; then
- make_fstab_x86_minwrites
+ make_fstab_minwrites
else
- make_fstab_x86_normal
+ make_fstab_normal
fi
}
-customize_x86() {
+customize() {
cp ${release}/etc/rc.conf ${mnt}/etc/rc.conf
if $minwrites; then
mkdir ${mnt}/etc/postfix
@@ -105,6 +107,8 @@ rc_configured=YES
hostname=${board}
sshd=YES
dhcpcd=YES
+wscons=YES
+devpubd=YES
EOF
if [ ! -f ${release}/dev/MAKEDEV ]; then
echo ${PROG}: Missing ${release}/dev/MAKEDEV 1>&2
@@ -117,3 +121,18 @@ EOF
echo "${bar} creating directories ${bar}"
mkdir ${mnt}/proc ${mnt}/kern
}
+
+populate() {
+ if [ ! -f ${kernel} ]; then
+ echo ${PROG}: Missing ${kernel} 1>&2
+ exit 1
+ fi
+
+ echo "${bar} installing kernel ${bar}"
+ cp ${kernel} ${mnt}/netbsd
+ if [ ! -f ${bootfile} ]; then
+ echo ${PROG}: Missing ${bootfile} 1>&2
+ exit 1
+ fi
+ cp ${bootfile} ${mnt}/boot
+}
Added files:
Index: src/distrib/utils/embedded/conf/i386.conf
diff -u /dev/null src/distrib/utils/embedded/conf/i386.conf:1.1
--- /dev/null Fri Apr 4 12:45:51 2014
+++ src/distrib/utils/embedded/conf/i386.conf Fri Apr 4 12:45:51 2014
@@ -0,0 +1,6 @@
+# $NetBSD: i386.conf,v 1.1 2014/04/04 16:45:51 christos Exp $
+# i386 customization script used by mkimage
+#
+
+board=i386
+. ${DIR}/conf/x86.conf