Add various customize scripts.
This commit is contained in:
parent
2b1d432238
commit
08161b063c
27
tools/tools/nanobsd/Customize/NET4801
Normal file
27
tools/tools/nanobsd/Customize/NET4801
Normal file
@ -0,0 +1,27 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# Customize a nanoBSD flash image for Soekris NET4801
|
||||
#
|
||||
# Copyright (c) 2004 Poul-Henning Kamp
|
||||
#
|
||||
# See /usr/share/examples/etc/bsd-style-copyright for license terms.
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# ${CUSTOMIZE} ${WD} ${WORLDDIR} ${.CURDIR} [ ${LOCAL_FILES_LIST} ]
|
||||
|
||||
|
||||
WD=$1
|
||||
WORLDDIR=$2
|
||||
CURDIR=$3
|
||||
LOCAL_FILES_LIST=$4
|
||||
|
||||
# Older NET4801s do not have the necessary wires on the PCB to run DMA
|
||||
# mode against the CF card. Disable ata_dma so we can boot.
|
||||
|
||||
touch ${WD}/boot/loader.conf
|
||||
sed -i "" -e '/hw.ata.ata_dma/d' ${WD}/boot/loader.conf
|
||||
echo 'hw.ata.ata_dma="0"' >> ${WD}/boot/loader.conf
|
||||
|
30
tools/tools/nanobsd/Customize/comconsole
Normal file
30
tools/tools/nanobsd/Customize/comconsole
Normal file
@ -0,0 +1,30 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# Customize a nanoBSD flash image for serial console
|
||||
#
|
||||
# Copyright (c) 2004 Poul-Henning Kamp
|
||||
#
|
||||
# See /usr/share/examples/etc/bsd-style-copyright for license terms.
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# ${CUSTOMIZE} ${WD} ${WORLDDIR} ${.CURDIR} [ ${LOCAL_FILES_LIST} ]
|
||||
|
||||
WD=$1
|
||||
WORLDDIR=$2
|
||||
CURDIR=$3
|
||||
LOCAL_FILES_LIST=$4
|
||||
|
||||
PKG_DBDIR=${WD}/var/db/pkg
|
||||
export PKG_DBDIR
|
||||
|
||||
# Enable getty on console
|
||||
sed -i "" -e /ttyd0/s/off/on/ ${WD}/etc/ttys
|
||||
|
||||
# Disable getty on syscons devices
|
||||
sed -i "" -e '/ttyv[0-8]/s/on/off/' ${WD}/etc/ttys
|
||||
|
||||
# Tell loader to use serial console early.
|
||||
echo " -h" > ${WD}/boot.config
|
64
tools/tools/nanobsd/Customize/default
Normal file
64
tools/tools/nanobsd/Customize/default
Normal file
@ -0,0 +1,64 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# Customize a nanoBSD flash image
|
||||
#
|
||||
# Copyright (c) 2004 Thomas Quinot
|
||||
#
|
||||
# See /usr/share/examples/etc/bsd-style-copyright for license terms.
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# ${CUSTOMIZE} ${WD} ${WORLDDIR} ${.CURDIR} [ ${LOCAL_FILES_LIST} ]
|
||||
|
||||
WD=$1
|
||||
WORLDDIR=$2
|
||||
CURDIR=$3
|
||||
LOCAL_FILES_LIST=$4
|
||||
|
||||
PKG_DBDIR=${WD}/var/db/pkg
|
||||
export PKG_DBDIR
|
||||
|
||||
add_CURDIR() {
|
||||
case "$1" in
|
||||
/*) echo "$1" ;;
|
||||
*) echo "${CURDIR}/$1" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
pkg_relocate() {
|
||||
sed -e "1,/^@cwd/s#^@cwd #&${WD}#"
|
||||
}
|
||||
|
||||
installlocalfiles() {
|
||||
if [ -n "${LOCAL_FILES_LIST}" ]; then
|
||||
while read src dest;
|
||||
do
|
||||
case "x${src}" in
|
||||
x#*|x)
|
||||
;;
|
||||
x@*)
|
||||
eval "for pkg in `add_CURDIR \"\`echo ${src} | sed 's/^@//'\`\"`;
|
||||
do pkg_add -M \${pkg} | pkg_relocate | pkg_add -S;
|
||||
done"
|
||||
;;
|
||||
*)
|
||||
dest="${dest:-${src}}"
|
||||
mkdir -p ${WD}/`dirname "${dest}x"`
|
||||
eval cp -fp `add_CURDIR ${src}` "${WD}/${dest}"
|
||||
;;
|
||||
esac
|
||||
done < ${LOCAL_FILES_LIST}
|
||||
fi
|
||||
}
|
||||
|
||||
movelocaletc() {
|
||||
if [ ! -d ${WD}/etc/local -a -d ${WD}/usr/local/etc ]; then
|
||||
mv ${WD}/usr/local/etc ${WD}/etc/local
|
||||
ln -s ../../etc/local ${WD}/usr/local/etc
|
||||
fi
|
||||
}
|
||||
|
||||
installlocalfiles
|
||||
movelocaletc
|
25
tools/tools/nanobsd/Customize/nobeastie
Normal file
25
tools/tools/nanobsd/Customize/nobeastie
Normal file
@ -0,0 +1,25 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# Customize a nanoBSD flash image to disable the loaders ascii-art beastie
|
||||
#
|
||||
# Copyright (c) 2004 Poul-Henning Kamp
|
||||
#
|
||||
# See /usr/share/examples/etc/bsd-style-copyright for license terms.
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# ${CUSTOMIZE} ${WD} ${WORLDDIR} ${.CURDIR} [ ${LOCAL_FILES_LIST} ]
|
||||
|
||||
WD=$1
|
||||
WORLDDIR=$2
|
||||
CURDIR=$3
|
||||
LOCAL_FILES_LIST=$4
|
||||
|
||||
PKG_DBDIR=${WD}/var/db/pkg
|
||||
export PKG_DBDIR
|
||||
|
||||
touch ${WD}/boot/loader.conf
|
||||
sed -i "" -e '/beastie_disable/d' ${WD}/boot/loader.conf
|
||||
echo 'beastie_disable="YES"' >> ${WD}/boot/loader.conf
|
Loading…
Reference in New Issue
Block a user