1#
2# $FreeBSD$
3#
4
5NANO_SRC=$(pwd)
6NANO_SRC=${NANO_SRC%/tools/tools/nanobsd/pcengines}
7NANO_OBJ=${NANO_SRC}/../nanobsd-builds/${NANO_NAME}/obj
8NANO_TOOLS=$(pwd)
9NANO_PACKAGE_DIR=$(pwd)/Pkg
10#NANO_RAM_TMPVARSIZE=20480
11#NANO_RAM_TMPVARSIZE=30720
12NANO_RAM_TMPVARSIZE=40960
13
14NANO_MD_BACKING="swap"
15
16# Options to put in make.conf during buildworld only
17CONF_BUILD='
18NO_CLEAN=YES
19'
20# Options to put in make.conf during installworld only
21CONF_INSTALL='
22'
23# Options to put in make.conf during both build- & installworld.
24CONF_WORLD='
25CFLAGS=-O -pipe
26WITHOUT_ACPI=
27WITHOUT_TESTS=
28MODULES_OVERRIDE=netgraph rc4
29BOOT_PXELDR_PROBE_KEYBOARD=1
30BOOT_PXELDR_ALWAYS_SERIAL=1
31BOOT_COMCONSOLE_SPEED=9600
32'
33
34customize_cmd cust_comconsole
35customize_cmd cust_allow_ssh_root
36customize_cmd cust_install_files
37cust_install_machine_files() (
38  MACHINE_DIR="${NANO_TOOLS}/Files.${NANO_NAME}"
39  if [ -d "${MACHINE_DIR}" ]; then
40    cd ${MACHINE_DIR}
41    find . -print | grep -Ev '/(CVS|\.git|\.hg|\.svn)' | cpio -dumpv ${NANO_WORLDDIR}
42  else
43    echo "${MACHINE_DIR} not found, skipping step"
44  fi
45)
46customize_cmd cust_install_machine_files
47
48cust_ld32_cfg () (
49  cd ${NANO_WORLDDIR}/libexec
50  if [ \! -f ld-elf32.so.1 ]; then
51    ln -s ld-elf.so.1 ld-elf32.so.1
52  fi
53)
54customize_cmd cust_ld32_cfg
55
56cust_boot_cfg () (
57  cd ${NANO_WORLDDIR}
58  echo "-S9600 -h" > boot.config
59  echo "console=\"comconsole\"" > boot/loader.conf
60  echo "comconsole_speed=\"9600\"" >> boot/loader.conf
61  echo "hint.acpi.0.disabled=\"1\"" >> boot/loader.conf
62)
63customize_cmd cust_boot_cfg
64customize_cmd cust_pkgng
65cust_etc_cfg () (
66  cd ${NANO_WORLDDIR}
67  mkdir -pv z/scratch
68  echo "fs:/usr/ports /usr/ports nfs rw,noauto,noatime,bg,soft,intr,nfsv3 0 0" >> etc/fstab
69  echo "fs:/mnt/Backup /mnt/Backup nfs rw,noauto,noatime,bg,soft,intr,nfsv3 0 0" >> etc/fstab
70  echo "fs:/mnt/Ablage /mnt/Ablage nfs rw,noauto,noatime,bg,soft,intr,nfsv3 0 0" >> etc/fstab
71  echo "/dev/ad1s1a /z/scratch ufs rw,noauto,noatime 0 0" >> etc/fstab
72)
73customize_cmd cust_etc_cfg
74
75last_orders () (
76        pprint 2 "last orders"
77        (
78        cd ${NANO_WORLDDIR}
79        touch conf/default/etc/.keepme
80        touch conf/default/var/.keepme
81        )
82)
83