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