Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/distrib/utils/embedded/conf merge more, and add an i386 image
details: https://anonhg.NetBSD.org/src/rev/275cc72fa7fe
branches: trunk
changeset: 328497:275cc72fa7fe
user: christos <christos%NetBSD.org@localhost>
date: Fri Apr 04 16:45:51 2014 +0000
description:
merge more, and add an i386 image
diffstat:
distrib/utils/embedded/conf/amd64.conf | 42 +---------------------------------
distrib/utils/embedded/conf/i386.conf | 6 ++++
distrib/utils/embedded/conf/x86.conf | 39 +++++++++++++++++++++++--------
3 files changed, 36 insertions(+), 51 deletions(-)
diffs (155 lines):
diff -r 2986f7b43e03 -r 275cc72fa7fe distrib/utils/embedded/conf/amd64.conf
--- a/distrib/utils/embedded/conf/amd64.conf Fri Apr 04 16:41:55 2014 +0000
+++ b/distrib/utils/embedded/conf/amd64.conf Fri Apr 04 16:45:51 2014 +0000
@@ -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
-}
diff -r 2986f7b43e03 -r 275cc72fa7fe distrib/utils/embedded/conf/i386.conf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/utils/embedded/conf/i386.conf Fri Apr 04 16:45:51 2014 +0000
@@ -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
diff -r 2986f7b43e03 -r 275cc72fa7fe distrib/utils/embedded/conf/x86.conf
--- a/distrib/utils/embedded/conf/x86.conf Fri Apr 04 16:41:55 2014 +0000
+++ b/distrib/utils/embedded/conf/x86.conf Fri Apr 04 16:45:51 2014 +0000
@@ -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 @@
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 @@
# 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 @@
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 @@
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 @@
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
+}
Home |
Main Index |
Thread Index |
Old Index