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