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