├── README ├── functions ├── FlashDevice ├── UsbDevice ├── build_kernel ├── build_world ├── clean_build ├── clean_world ├── create_amd64_cdimage ├── create_amd64_diskimage ├── create_arm_diskimage ├── create_diskimage ├── create_i386_cdimage ├── create_i386_diskimage ├── create_sparc64_diskimage ├── cust_allow_ssh_root ├── cust_compress_kernel ├── cust_console_dual ├── cust_console_serial ├── cust_console_vga ├── cust_ld32_cfg ├── cust_motd ├── cust_pkg ├── cust_pkg_fetch ├── cust_pkgng ├── cust_pkgng_bootstrap ├── cust_remove_paths ├── cust_set_hostname ├── customize_cmd ├── install_etc ├── install_files ├── install_kernel ├── install_world ├── last_orders_cmd ├── late_customize_cmd ├── launch_image_in_qemu ├── make_conf_build ├── make_conf_install ├── nano_cleanup ├── newfs_part ├── packages │ └── pkg_quagga ├── populate_cfg_slice ├── populate_data_slice ├── populate_slice ├── pprint ├── prune_usr ├── run_command_set ├── setup_kernel_conf_vars ├── setup_nanobsd └── setup_nanobsd_etc ├── nanobsd.sh └── targets ├── alix ├── make.conf.build ├── make.conf.install └── nanobsd.conf ├── default ├── Files │ ├── root │ │ ├── change_password │ │ ├── save_cfg │ │ └── save_sshkeys │ └── usr │ │ └── local │ │ └── sbin │ │ ├── updatep1 │ │ └── updatep2 ├── make.conf.build ├── make.conf.install └── nanobsd.conf ├── dev-qemu ├── make.conf.build ├── make.conf.install └── nanobsd.conf ├── net5501 ├── Files │ ├── etc │ │ └── ssh │ │ │ ├── ssh_config │ │ │ └── sshd_config │ ├── root │ │ └── .cshrc │ └── usr │ │ └── ports │ │ └── .keepme ├── i386 │ └── NET5501 ├── make.conf.build ├── make.conf.install ├── nanobsd.conf └── package.list └── rescue ├── Files ├── etc │ ├── ssh │ │ ├── ssh_config │ │ └── sshd_config │ └── ttys ├── root │ └── .cshrc └── usr │ └── ports │ └── .keepme ├── amd64 ├── RESCUE └── nanobsd.conf ├── i386 ├── RESCUE └── nanobsd.conf ├── make.conf.build └── nanobsd.conf /README: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amishHammer/NanoBSD-NG/437e3a299f7ea6c994f78dc4be9c893e42ab007d/README -------------------------------------------------------------------------------- /functions/FlashDevice: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright (c) 2005 Poul-Henning Kamp. 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions 8 | # are met: 9 | # 1. Redistributions of source code must retain the above copyright 10 | # notice, this list of conditions and the following disclaimer. 11 | # 2. Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in the 13 | # documentation and/or other materials provided with the distribution. 14 | # 15 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 16 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 | # SUCH DAMAGE. 26 | # 27 | # $FreeBSD: releng/8.1/tools/tools/nanobsd/FlashDevice.sub 194332 2009-06-17 06:25:45Z edwin $ 28 | # 29 | # Convenience function for commonly used Flash devices. 30 | # 31 | # There is a hook over in nanobsd.sh which allows you to call into 32 | # this function simply with a line like: 33 | # 34 | # FlashDevice Sandisk 256 35 | # 36 | # This file will then set NANO_MEDIASIZE, NANO_HEADS and NANO_SECTS for you. 37 | # 38 | 39 | FlashDevice () { 40 | NANO_IMAGE_TYPE="disk" 41 | a1=`echo $1 | tr '[:upper:]' '[:lower:]'` 42 | a2=`echo $2 | tr '[:upper:]' '[:lower:]'` 43 | case $a1 in 44 | hitachi) 45 | case $a2 in 46 | 256|256mb) 47 | NANO_MEDIASIZE=`expr 256204800 / 512` 48 | NANO_HEADS=15 49 | NANO_SECTS=48 50 | ;; 51 | *) 52 | echo "Unknown Hitachi Flash capacity" 53 | exit 2 54 | ;; 55 | esac 56 | ;; 57 | integral) 58 | # Source: mich@FreeBSD.org 59 | case $a2 in 60 | 256|256mb) 61 | NANO_MEDIASIZE=`expr 259596288 / 512` 62 | NANO_HEADS=16 63 | NANO_SECTS=63 64 | ;; 65 | *) 66 | echo "Unknown Integral i-Pro Flash capacity" 67 | exit 2 68 | ;; 69 | esac 70 | ;; 71 | kodak) 72 | # Source: mwlucas@FreeBSD.org 73 | case $a2 in 74 | 64|64mb) 75 | NANO_MEDIASIZE=`expr 64487424 / 512` 76 | NANO_HEADS=4 77 | NANO_SECTS=32 78 | ;; 79 | *) 80 | echo "Unknown Kodak Flash capacity" 81 | exit 2 82 | ;; 83 | esac 84 | ;; 85 | memorycorp) 86 | # Source: simon@FreeBSD.org 87 | case $a2 in 88 | 512|512mb) 89 | # MC512CFLS2 90 | NANO_MEDIASIZE=`expr 519192576 / 512` 91 | NANO_HEADS=16 92 | NANO_SECTS=63 93 | ;; 94 | *) 95 | echo "Unknown Memory Corp Flash capacity" 96 | exit 2 97 | ;; 98 | esac 99 | ;; 100 | sandisk) 101 | # Source: 102 | # SanDisk CompactFlash Memory Card 103 | # Product Manual 104 | # Version 10.9 105 | # Document No. 20-10-00038 106 | # April 2005 107 | # Table 2-7 108 | # NB: notice math error in SDCFJ-4096-388 line. 109 | # 110 | case $a2 in 111 | 32|32mb) 112 | NANO_MEDIASIZE=`expr 32112640 / 512` 113 | NANO_HEADS=4 114 | NANO_SECTS=32 115 | ;; 116 | 64|64mb) 117 | NANO_MEDIASIZE=`expr 64225280 / 512` 118 | NANO_HEADS=8 119 | NANO_SECTS=32 120 | ;; 121 | 128|128mb) 122 | NANO_MEDIASIZE=`expr 128450560 / 512` 123 | NANO_HEADS=8 124 | NANO_SECTS=32 125 | ;; 126 | 256|256mb) 127 | NANO_MEDIASIZE=`expr 256901120 / 512` 128 | NANO_HEADS=16 129 | NANO_SECTS=32 130 | ;; 131 | 512|512mb) 132 | NANO_MEDIASIZE=`expr 512483328 / 512` 133 | NANO_HEADS=16 134 | NANO_SECTS=63 135 | ;; 136 | 1024|1024mb|1g) 137 | NANO_MEDIASIZE=`expr 1024966656 / 512` 138 | NANO_HEADS=16 139 | NANO_SECTS=63 140 | ;; 141 | 2048|2048mb|2g) 142 | NANO_MEDIASIZE=`expr 2048901120 / 512` 143 | NANO_HEADS=16 144 | NANO_SECTS=63 145 | ;; 146 | 4096|4096mb|4g) 147 | NANO_MEDIASIZE=`expr -e 4097802240 / 512` 148 | NANO_HEADS=16 149 | NANO_SECTS=63 150 | ;; 151 | 8192|8192mb|8g) 152 | NANO_MEDIASIZE=`expr -e 8195604480 / 512` 153 | NANO_HEADS=16 154 | NANO_SECTS=63 155 | ;; 156 | *) 157 | echo "Unknown Sandisk Flash capacity" 158 | exit 2 159 | ;; 160 | esac 161 | ;; 162 | siliconsystems) 163 | case $a2 in 164 | 256|256mb) 165 | NANO_MEDIASIZE=`expr 260571136 / 512` 166 | NANO_HEADS=16 167 | NANO_SECTS=32 168 | ;; 169 | 4096|4g) 170 | NANO_MEDIASIZE=`expr -e 4224761856 / 512` 171 | NANO_HEADS=16 172 | NANO_SECTS=63 173 | ;; 174 | *) 175 | echo "Unknown SiliconSystems Flash capacity" 176 | exit 2 177 | ;; 178 | esac 179 | ;; 180 | soekris) 181 | case $a2 in 182 | net4526 | 4526 | net4826 | 4826 | 64 | 64mb) 183 | NANO_MEDIASIZE=125056 184 | NANO_HEADS=4 185 | NANO_SECTS=32 186 | ;; 187 | *) 188 | echo "Unknown Soekris Flash capacity" 189 | exit 2 190 | ;; 191 | esac 192 | ;; 193 | transcend) 194 | case $a2 in 195 | dom064m) 196 | NANO_MEDIASIZE=125184 197 | NANO_HEADS=4 198 | NANO_SECTS=32 199 | ;; 200 | 2048|2g) 201 | NANO_MEDIASIZE=4061232 202 | NANO_HEADS=16 203 | NANO_SECTS=32 204 | ;; 205 | *) 206 | echo "Unknown Transcend Flash capacity" 207 | exit 2 208 | ;; 209 | esac 210 | ;; 211 | *) 212 | echo "Unknown Flash manufacturer" 213 | exit 2 214 | ;; 215 | esac 216 | } 217 | 218 | -------------------------------------------------------------------------------- /functions/UsbDevice: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2005 Poul-Henning Kamp. 2 | # All rights reserved. 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 1. Redistributions of source code must retain the above copyright 8 | # notice, this list of conditions and the following disclaimer. 9 | # 2. Redistributions in binary form must reproduce the above copyright 10 | # notice, this list of conditions and the following disclaimer in the 11 | # documentation and/or other materials provided with the distribution. 12 | # 13 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 | # SUCH DAMAGE. 24 | ####################################################################### 25 | # USB device geometries 26 | # 27 | # Usage: 28 | # UsbDevice Generic 1000 # a generic flash key sold as having 1GB 29 | # 30 | # This function will set NANO_MEDIASIZE, NANO_HEADS and NANO_SECTS for you. 31 | # 32 | # Note that the capacity of a flash key is usually advertised in MB or 33 | # GB, *not* MiB/GiB. As such, the precise number of cylinders available 34 | # for C/H/S geometry may vary depending on the actual flash geometry. 35 | # 36 | # The following generic device layouts are understood: 37 | # generic An alias for generic-hdd. 38 | # generic-hdd 255H 63S/T xxxxC with no MBR restrictions. 39 | # generic-fdd 64H 32S/T xxxxC with no MBR restrictions. 40 | # 41 | # The generic-hdd device is preferred for flash devices larger than 1GB. 42 | # 43 | 44 | UsbDevice () { 45 | NANO_IMAGE_TYPE="disk" 46 | a1=`echo $1 | tr '[:upper:]' '[:lower:]'` 47 | case $a1 in 48 | generic-fdd) 49 | NANO_HEADS=64 50 | NANO_SECTS=32 51 | NANO_MEDIASIZE=$(( $2 * 1000 * 1000 / 512 )) 52 | ;; 53 | generic|generic-hdd) 54 | NANO_HEADS=255 55 | NANO_SECTS=63 56 | NANO_MEDIASIZE=$(( $2 * 1000 * 1000 / 512 )) 57 | ;; 58 | *) 59 | echo "Unknown USB flash device" 60 | exit 2 61 | ;; 62 | esac 63 | } 64 | -------------------------------------------------------------------------------- /functions/build_kernel: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2005 Poul-Henning Kamp. 2 | # All rights reserved. 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 1. Redistributions of source code must retain the above copyright 8 | # notice, this list of conditions and the following disclaimer. 9 | # 2. Redistributions in binary form must reproduce the above copyright 10 | # notice, this list of conditions and the following disclaimer in the 11 | # documentation and/or other materials provided with the distribution. 12 | # 13 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 | # SUCH DAMAGE. 24 | build_kernel ( ) ( 25 | pprint 2 "build kernel ($NANO_KERNEL)" 26 | pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.bk" 27 | 28 | setup_kernel_conf_vars 29 | 30 | (cd ${NANO_SRC}; 31 | # unset these just in case to avoid compiler complaints 32 | # when cross-building 33 | unset TARGET_CPUTYPE 34 | unset TARGET_BIG_ENDIAN 35 | # Note: We intentionally build all modules, not only the ones in 36 | # NANO_MODULES so the built world can be reused by multiple images. 37 | env TARGET_ARCH=${NANO_ARCH} ${NANO_PMAKE} buildkernel \ 38 | __MAKE_CONF=${NANO_MAKE_CONF_BUILD} \ 39 | ${kernconfdir:+"KERNCONFDIR="}${kernconfdir} \ 40 | KERNCONF=${kernconf} 41 | ) > ${MAKEOBJDIRPREFIX}/_.bk 2>&1 42 | ) 43 | 44 | -------------------------------------------------------------------------------- /functions/build_world: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2005 Poul-Henning Kamp. 2 | # All rights reserved. 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 1. Redistributions of source code must retain the above copyright 8 | # notice, this list of conditions and the following disclaimer. 9 | # 2. Redistributions in binary form must reproduce the above copyright 10 | # notice, this list of conditions and the following disclaimer in the 11 | # documentation and/or other materials provided with the distribution. 12 | # 13 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 | # SUCH DAMAGE. 24 | build_world ( ) ( 25 | pprint 2 "run buildworld" 26 | pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.bw" 27 | 28 | cd ${NANO_SRC} 29 | env TARGET_ARCH=${NANO_ARCH} ${NANO_PMAKE} \ 30 | __MAKE_CONF=${NANO_MAKE_CONF_BUILD} buildworld \ 31 | > ${MAKEOBJDIRPREFIX}/_.bw 2>&1 32 | ) 33 | 34 | -------------------------------------------------------------------------------- /functions/clean_build: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2005 Poul-Henning Kamp. 2 | # All rights reserved. 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 1. Redistributions of source code must retain the above copyright 8 | # notice, this list of conditions and the following disclaimer. 9 | # 2. Redistributions in binary form must reproduce the above copyright 10 | # notice, this list of conditions and the following disclaimer in the 11 | # documentation and/or other materials provided with the distribution. 12 | # 13 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 | # SUCH DAMAGE. 24 | clean_build ( ) ( 25 | pprint 2 "Clean and create object directory (${MAKEOBJDIRPREFIX})" 26 | 27 | if ! rm -rf ${MAKEOBJDIRPREFIX} > /dev/null 2>&1 ; then 28 | chflags -R noschg ${MAKEOBJDIRPREFIX} 29 | rm -r ${MAKEOBJDIRPREFIX} 30 | fi 31 | mkdir -p ${MAKEOBJDIRPREFIX} 32 | printenv > ${MAKEOBJDIRPREFIX}/_.env 33 | ) 34 | 35 | -------------------------------------------------------------------------------- /functions/clean_world: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2005 Poul-Henning Kamp. 2 | # All rights reserved. 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 1. Redistributions of source code must retain the above copyright 8 | # notice, this list of conditions and the following disclaimer. 9 | # 2. Redistributions in binary form must reproduce the above copyright 10 | # notice, this list of conditions and the following disclaimer in the 11 | # documentation and/or other materials provided with the distribution. 12 | # 13 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 | # SUCH DAMAGE. 24 | clean_world ( ) ( 25 | if [ "${NANO_OBJ}" != "${MAKEOBJDIRPREFIX}" ]; then 26 | pprint 2 "Clean and create object directory (${NANO_OBJ})" 27 | if ! rm -rf ${NANO_OBJ} > /dev/null 2>&1 ; then 28 | chflags -R noschg ${NANO_OBJ} 29 | rm -r ${NANO_OBJ} 30 | fi 31 | mkdir -p ${NANO_OBJ} ${NANO_WORLDDIR} 32 | printenv > ${NANO_OBJ}/_.env 33 | else 34 | pprint 2 "Clean and create world directory (${NANO_WORLDDIR})" 35 | if ! rm -rf ${NANO_WORLDDIR}/ > /dev/null 2>&1 ; then 36 | chflags -R noschg ${NANO_WORLDDIR} 37 | rm -rf ${NANO_WORLDDIR} 38 | fi 39 | mkdir -p ${NANO_WORLDDIR} 40 | fi 41 | ) 42 | 43 | -------------------------------------------------------------------------------- /functions/create_amd64_cdimage: -------------------------------------------------------------------------------- 1 | # i386 and amd64 are identical for cd images 2 | create_amd64_cdimage ( ) ( 3 | create_i386_cdimage 4 | ) 5 | 6 | -------------------------------------------------------------------------------- /functions/create_amd64_diskimage: -------------------------------------------------------------------------------- 1 | create_amd64_diskimage ( ) ( 2 | create_i386_diskimage 3 | ) 4 | 5 | -------------------------------------------------------------------------------- /functions/create_arm_diskimage: -------------------------------------------------------------------------------- 1 | create_arm_diskimage() 2 | { 3 | pprint 2 "build diskimage" 4 | pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.di" 5 | 6 | ( 7 | echo "NANO_MEDIASIZE: $NANO_MEDIASIZE" 8 | echo "NANO_IMAGES: $NANO_IMAGES" 9 | echo "NANO_SECTS: $NANO_SECTS" 10 | echo "NANO_HEADS: $NANO_HEADS" 11 | echo "NANO_CODESIZE: $NANO_CODESIZE" 12 | echo "NANO_CONFSIZE: $NANO_CONFSIZE" 13 | echo "NANO_DATASIZE: $NANO_DATASIZE" 14 | 15 | echo $NANO_MEDIASIZE $NANO_IMAGES \ 16 | $NANO_SECTS $NANO_HEADS \ 17 | $NANO_CODESIZE $NANO_CONFSIZE $NANO_DATASIZE | 18 | awk ' 19 | { 20 | printf "# %s\n", $0 21 | 22 | # size of cylinder in sectors 23 | cs = $3 * $4 24 | 25 | # number of full cylinders on media 26 | cyl = int ($1 / cs) 27 | 28 | # output fdisk geometry spec, truncate cyls to 1023 29 | if (cyl <= 1023) 30 | print "g c" cyl " h" $4 " s" $3 31 | else 32 | print "g c" 1023 " h" $4 " s" $3 33 | if ($7 > 0) { 34 | # size of data partition in full cylinders 35 | dsl = int (($7 + cs - 1) / cs) 36 | } else { 37 | dsl = 0; 38 | } 39 | 40 | # size of config partition in full cylinders 41 | csl = int (($6 + cs - 1) / cs) 42 | 43 | if ($5 == 0) { 44 | # size of image partition(s) in full cylinders 45 | isl = int ((cyl - dsl - csl) / $2) 46 | } else { 47 | isl = int (($5 + cs - 1) / cs) 48 | } 49 | 50 | # First image partition start at second track 51 | print "p 1 165 " $3, isl * cs - $3 52 | c = isl * cs; 53 | 54 | # Second image partition (if any) also starts offset one 55 | # track to keep them identical. 56 | if ($2 > 1) { 57 | print "p 2 165 " $3 + c, isl * cs - $3 58 | c += isl * cs; 59 | } 60 | 61 | # Config partition starts at cylinder boundary. 62 | print "p 3 165 " c, csl * cs 63 | c += csl * cs 64 | 65 | # Data partition (if any) starts at cylinder boundary. 66 | if ($7 > 0) { 67 | print "p 4 165 " c, dsl * cs 68 | } else if ($7 < 0 && $1 > c) { 69 | print "p 4 165 " c, $1 - c 70 | } else if ($1 < c) { 71 | print "Disk space overcommitted by", \ 72 | c - $1, "sectors" > "/dev/stderr" 73 | exit 2 74 | } 75 | 76 | # Force slice 1 to be marked active. This is necessary 77 | # for booting the image from a USB device to work. 78 | print "a 1" 79 | } 80 | ' > ${NANO_OBJ}/_.fdisk 81 | 82 | IMG=${NANO_DISKIMGDIR}/${NANO_IMGNAME} 83 | BS=${NANO_SECTS}b 84 | 85 | if [ "${NANO_MD_BACKING}" = "swap" ] ; then 86 | MD=`mdconfig -a -t swap -s ${NANO_MEDIASIZE} -x ${NANO_SECTS} \ 87 | -y ${NANO_HEADS}` 88 | else 89 | echo ""; echo "Creating md backing file ${IMG} ..." 90 | _c=`expr ${NANO_MEDIASIZE} / ${NANO_SECTS}` 91 | pprint 2 "dd if=/dev/zero of=${IMG} bs=${BS} count=${_c}" 92 | dd if=/dev/zero of=${IMG} bs=${BS} count=${_c} 93 | pprint 2 "mdconfig -a -t vnode -f ${IMG} -x ${NANO_SECTS} -y ${NANO_HEADS}" 94 | MD=`mdconfig -a -t vnode -f ${IMG} -x ${NANO_SECTS} \ 95 | -y ${NANO_HEADS}` 96 | fi 97 | 98 | trap "mdconfig -d -u $MD" 1 2 15 EXIT 99 | 100 | echo ""; echo "Write partition table ..." 101 | FDISK=${NANO_OBJ}/_.fdisk 102 | pprint 2 "fdisk -i -f ${FDISK} ${MD}" 103 | fdisk -i -f ${FDISK} ${MD} 104 | pprint 2 "fdisk ${MD}" 105 | fdisk ${MD} 106 | 107 | # Create first image 108 | IMG1=${NANO_DISKIMGDIR}/_.disk.image1 109 | echo ""; echo "Create first image ${IMG1} ..." 110 | SIZE=`awk '/^p 1/ { print $5 "b" }' ${FDISK}` 111 | pprint 2 "${NANO_MAKEFS} -s ${SIZE} ${IMG1} ${NANO_WORLDDIR}" 112 | # TO DO: glabel patch !!!! 113 | ${NANO_MAKEFS} -s ${SIZE} ${IMG1} ${NANO_WORLDDIR} 114 | pprint 2 "dd if=${IMG1} of=/dev/${MD}s1 bs=${BS}" 115 | dd if=${IMG1} of=/dev/${MD}s1 bs=${BS} 116 | tunefs -L ${NANO_LABEL}"s1a" /dev/${MD}s1a 117 | if [ $NANO_IMAGES -gt 1 -a $NANO_INIT_IMG2 -gt 0 ] ; then 118 | IMG2=${NANO_DISKIMGDIR}/_.disk.image2 119 | echo ""; echo "Create second image ${IMG2}..." 120 | for f in ${NANO_WORLDDIR}/etc/fstab ${NANO_WORLDDIR}/conf/base/etc/fstab 121 | do 122 | sed -i "" "s/${NANO_DRIVE}s1/${NANO_DRIVE}s2/g" $f 123 | done 124 | 125 | SIZE=`awk '/^p 2/ { print $5 "b" }' ${FDISK}` 126 | pprint 2 "${NANO_MAKEFS} -s ${SIZE} ${IMG2} ${NANO_WORLDDIR}" 127 | ${NANO_MAKEFS} -s ${SIZE} ${IMG2} ${NANO_WORLDDIR} 128 | pprint 2 "dd if=${IMG2} of=/dev/${MD}s2 bs=${BS}" 129 | dd if=${IMG2} of=/dev/${MD}s2 bs=${BS} 130 | tunefs -L ${NANO_LABEL}"s2a" /dev/${MD}s2a 131 | fi 132 | 133 | # Create Config slice 134 | CFG=${NANO_DISKIMGDIR}/_.disk.cfg 135 | echo ""; echo "Creating config partition ${CFG}..." 136 | SIZE=`awk '/^p 3/ { print $5 "b" }' ${FDISK}` 137 | # XXX: fill from where ? 138 | pprint 2 "${NANO_MAKEFS} -s ${SIZE} ${CFG} ${NANO_CFGDIR}" 139 | # NEED TO SET THE LABEL !!!!! 140 | ${NANO_MAKEFS} -s ${SIZE} ${CFG} ${NANO_CFGDIR} 141 | pprint 2 "dd if=${CFG} of=/dev/${MD}s3 bs=${BS}" 142 | dd if=${CFG} of=/dev/${MD}s3 bs=${BS} 143 | tunefs -L ${NANO_LABEL}"s3" /dev/${MD}s3 144 | pprint 2 "rm ${CFG}" 145 | rm ${CFG}; CFG= # NB: disable printing below 146 | 147 | # Create Data slice, if any. 148 | if [ $NANO_DATASIZE -gt 0 ] ; then 149 | DATA=${NANO_DISKIMGDIR}/_.disk.data 150 | echo ""; echo "Creating data partition ${DATA}..." 151 | SIZE=`awk '/^p 4/ { print $5 "b" }' ${FDISK}` 152 | # XXX: fill from where ? 153 | pprint 2 "${NANO_MAKEFS} -s ${SIZE} ${DATA} /var/empty" 154 | # NEED TO SET THE LABEL !!! 155 | ${NANO_MAKEFS} -s ${SIZE} ${DATA} /var/empty 156 | pprint 2 "dd if=${DATA} of=/dev/${MD}s4 bs=${BS}" 157 | dd if=${DATA} of=/dev/${MD}s4 bs=${BS} 158 | tunefs -L ${NANO_LABEL}"s4" /dev/${MD}s4 159 | pprint 2 "rm ${DATA}" 160 | rm ${DATA}; DATA= # NB: disable printing below 161 | fi 162 | 163 | if [ "${NANO_MD_BACKING}" = "swap" ] ; then 164 | echo "Writing out _.disk.full..." 165 | dd if=/dev/${MD} of=${IMG} bs=${BS} 166 | fi 167 | 168 | echo "" 169 | echo "Completed images in:" 170 | echo "" 171 | echo "Full disk: ${IMG}" 172 | echo "Primary partition: ${IMG1}" 173 | test "${IMG2}" && echo "2ndary partition: ${IMG2}" 174 | test "${CFG}" && echo "/cfg partition: ${CFG}" 175 | test "${DATA}" && echo "/data partition: ${DATA}" 176 | echo "" 177 | echo "Use dd if= of=/dev/ bs=${BS} to transfer an" 178 | echo "image to bootable media /dev/." 179 | ) > ${MAKEOBJDIRPREFIX}/_.di 2>&1 180 | } 181 | 182 | -------------------------------------------------------------------------------- /functions/create_diskimage: -------------------------------------------------------------------------------- 1 | create_diskimage ( ) { 2 | pprint 2 "build diskimage" 3 | pprint 3 "log: ${NANO_OBJ}/_.di" 4 | 5 | ( 6 | echo "NANO_MEDIASIZE: $NANO_MEDIASIZE" 7 | echo "NANO_IMAGES: $NANO_IMAGES" 8 | echo "NANO_SECTS: $NANO_SECTS" 9 | echo "NANO_HEADS: $NANO_HEADS" 10 | echo "NANO_CODESIZE: $NANO_CODESIZE" 11 | echo "NANO_CONFSIZE: $NANO_CONFSIZE" 12 | echo "NANO_DATASIZE: $NANO_DATASIZE" 13 | 14 | 15 | ## Calculate the fdisk disk layout. 16 | echo $NANO_MEDIASIZE $NANO_IMAGES \ 17 | $NANO_SECTS $NANO_HEADS \ 18 | $NANO_CODESIZE $NANO_CONFSIZE $NANO_DATASIZE | 19 | awk ' 20 | { 21 | printf "# %s\n", $0 22 | 23 | # size of cylinder in sectors 24 | cs = $3 * $4 25 | 26 | # number of full cylinders on media 27 | cyl = int ($1 / cs) 28 | 29 | # output fdisk geometry spec, truncate cyls to 1023 30 | if (cyl <= 1023) 31 | print "g c" cyl " h" $4 " s" $3 32 | else 33 | print "g c" 1023 " h" $4 " s" $3 34 | 35 | if ($7 > 0) { 36 | # size of data partition in full cylinders 37 | dsl = int (($7 + cs - 1) / cs) 38 | } else { 39 | dsl = 0; 40 | } 41 | 42 | # size of config partition in full cylinders 43 | csl = int (($6 + cs - 1) / cs) 44 | 45 | if ($5 == 0) { 46 | # size of image partition(s) in full cylinders 47 | isl = int ((cyl - dsl - csl) / $2) 48 | } else { 49 | isl = int (($5 + cs - 1) / cs) 50 | } 51 | 52 | # First image partition start at second track 53 | print "p 1 165 " $3, isl * cs - $3 54 | c = isl * cs; 55 | 56 | # Second image partition (if any) also starts offset one 57 | # track to keep them identical. 58 | if ($2 > 1) { 59 | print "p 2 165 " $3 + c, isl * cs - $3 60 | c += isl * cs; 61 | } 62 | 63 | # Config partition starts at cylinder boundary. 64 | print "p 3 165 " c, csl * cs 65 | c += csl * cs 66 | 67 | # Data partition (if any) starts at cylinder boundary. 68 | if ($7 > 0) { 69 | print "p 4 165 " c, dsl * cs 70 | } else if ($7 < 0 && $1 > c) { 71 | print "p 4 165 " c, $1 - c 72 | } else if ($1 < c) { 73 | print "Disk space overcommitted by", \ 74 | c - $1, "sectors" > "/dev/stderr" 75 | exit 2 76 | } 77 | 78 | # Force slice 1 to be marked active. This is necessary 79 | # for booting the image from a USB device to work. 80 | print "a 1" 81 | } 82 | ' > ${NANO_OBJ}/_.fdisk 83 | 84 | IMG=${NANO_DISKIMGDIR}/${NANO_IMGNAME} 85 | MNT=${NANO_OBJ}/_.mnt 86 | mkdir -p ${MNT} 87 | 88 | if [ "${NANO_MD_BACKING}" = "swap" ] ; then 89 | MD=`mdconfig -a -t swap -s ${NANO_MEDIASIZE} -x ${NANO_SECTS} \ 90 | -y ${NANO_HEADS}` 91 | else 92 | echo "Creating md backing file..." 93 | rm -f ${IMG} 94 | dd if=/dev/zero of=${IMG} seek=${NANO_MEDIASIZE} count=0 95 | MD=`mdconfig -a -t vnode -f ${IMG} -x ${NANO_SECTS} \ 96 | -y ${NANO_HEADS}` 97 | fi 98 | 99 | trap "echo 'Running exit trap code' ; df -i ${MNT} ; umount ${MNT} || true ; mdconfig -d -u $MD" 1 2 15 EXIT 100 | 101 | fdisk -i -f ${NANO_OBJ}/_.fdisk ${MD} 102 | fdisk ${MD} 103 | # XXX: params 104 | # XXX: pick up cached boot* files, they may not be in image anymore. 105 | boot0cfg -B -b ${NANO_WORLDDIR}/${NANO_BOOTLOADER} ${NANO_BOOT0CFG} ${MD} 106 | bsdlabel -w -B -b ${NANO_WORLDDIR}/boot/boot ${MD}s1 107 | bsdlabel ${MD}s1 108 | 109 | # Create first image 110 | populate_slice /dev/${MD}s1a ${NANO_WORLDDIR} ${MNT} "s1a" 111 | mount /dev/${MD}s1a ${MNT} 112 | echo "Generating mtree..." 113 | ( cd ${MNT} && mtree -c ) > ${NANO_OBJ}/_.mtree 114 | ( cd ${MNT} && du -k ) > ${NANO_OBJ}/_.du 115 | umount ${MNT} 116 | 117 | if [ $NANO_IMAGES -gt 1 -a $NANO_INIT_IMG2 -gt 0 ] ; then 118 | # Duplicate to second image (if present) 119 | echo "Duplicating to second image..." 120 | dd if=/dev/${MD}s1 of=/dev/${MD}s2 bs=64k 121 | mount /dev/${MD}s2a ${MNT} 122 | for f in ${MNT}/etc/fstab ${MNT}/conf/base/etc/fstab 123 | do 124 | sed -i "" "s=${NANO_DRIVE}s1=${NANO_DRIVE}s2=g" $f 125 | done 126 | umount ${MNT} 127 | # Override the label from the first partition so we 128 | # don't confuse glabel with duplicates. 129 | if [ ! -z ${NANO_LABEL} ]; then 130 | tunefs -L ${NANO_LABEL}"s2a" /dev/${MD}s2a 131 | fi 132 | fi 133 | 134 | # Create Config slice 135 | populate_cfg_slice /dev/${MD}s3 "${NANO_CFGDIR}" ${MNT} "s3" 136 | 137 | # Create Data slice, if any. 138 | if [ $NANO_DATASIZE -ne 0 ] ; then 139 | populate_data_slice /dev/${MD}s4 "${NANO_DATADIR}" ${MNT} "s4" 140 | fi 141 | 142 | if [ "${NANO_MD_BACKING}" = "swap" ] ; then 143 | echo "Writing out ${NANO_IMGNAME}..." 144 | dd if=/dev/${MD} of=${IMG} bs=64k 145 | fi 146 | 147 | if ${do_copyout_partition} ; then 148 | echo "Writing out _.disk.image..." 149 | dd if=/dev/${MD}s1 of=${NANO_DISKIMGDIR}/_.disk.image bs=64k 150 | fi 151 | mdconfig -d -u $MD 152 | 153 | trap - 1 2 15 EXIT 154 | 155 | ) > ${NANO_OBJ}/_.di 2>&1 156 | } 157 | -------------------------------------------------------------------------------- /functions/create_i386_cdimage: -------------------------------------------------------------------------------- 1 | create_i386_cdimage () ( 2 | pprint 2 "Create CD Image" 3 | ( 4 | cd ${NANO_WORLDDIR} 5 | rm -f conf/default/etc/remount 6 | touch conf/default/etc/.keepme 7 | touch conf/default/var/.keepme 8 | cd .. 9 | mkisofs -quiet -r -J -no-emul-boot -b boot/cdboot -o _.disk.iso _.w/ 10 | ) 11 | ) 12 | 13 | -------------------------------------------------------------------------------- /functions/create_i386_diskimage: -------------------------------------------------------------------------------- 1 | create_i386_diskimage ( ) ( 2 | create_diskimage 3 | ) 4 | 5 | -------------------------------------------------------------------------------- /functions/create_sparc64_diskimage: -------------------------------------------------------------------------------- 1 | create_sparc64_diskimage ( ) ( 2 | pprint 2 "build diskimage" 3 | pprint 3 "log: ${NANO_OBJ}/_.di" 4 | # Using sparc bootloader 5 | NANO_BOOTLOADER="boot/boot1" 6 | 7 | ( 8 | IMG=${NANO_DISKIMGDIR}/${NANO_IMGNAME} 9 | MNT=${NANO_OBJ}/_.mnt 10 | mkdir -p ${MNT} 11 | 12 | if [ "${NANO_MD_BACKING}" = "swap" ] ; then 13 | MD=`mdconfig -a -t swap -s ${NANO_MEDIASIZE} -x ${NANO_SECTS} \ 14 | -y ${NANO_HEADS}` 15 | else 16 | echo "Creating md backing file..." 17 | dd if=/dev/zero of=${IMG} bs=${NANO_SECTS}b \ 18 | count=`expr ${NANO_MEDIASIZE} / ${NANO_SECTS}` 19 | MD=`mdconfig -a -t vnode -f ${IMG} -x ${NANO_SECTS} \ 20 | -y ${NANO_HEADS}` 21 | fi 22 | 23 | trap "echo 'Running exit trap code' ; df -i ${MNT} ; umount ${MNT} || true ; mdconfig -d -u $MD" 1 2 15 EXIT 24 | # Create initial bootable label: 25 | echo "Creating initial empty but bootable sunlabel..." 26 | sunlabel -w -B ${MD} auto 27 | 28 | # Extracting label prototype in cylinder unit 29 | sunlabel -c ${MD} > ${NANO_OBJ}/_.sunlabel 30 | 31 | # Generate partition on the prototype file 32 | # Need to calc the NANO_CODESIZE and the media size that is smaller than given (why??) 33 | # Warning, from sunlabel man page : "partitions in the Sun OpenBoot PROM 34 | # must always start at a cylinder boundary (for whatever geometry emulation 35 | # has been chosen)." 36 | 37 | if [ ${NANO_CODESIZE} = 0 ]; then 38 | #MESURED_MEDIASIZE=`grep "sectors/unit" ${NANO_OBJ}/_.sunlabel | cut -d' ' -f 2` 39 | MESURED_MEDIASIZE_CYL=`grep "text" ${NANO_OBJ}/_.sunlabel| cut -d' ' -f 4` 40 | SEC_PER_CYL=`grep "sectors/cylinder" ${NANO_OBJ}/_.sunlabel | cut -d' ' -f 2` 41 | NANO_CONFSIZE_CYL=`expr $NANO_CONFSIZE / $SEC_PER_CYL` 42 | NANO_DATASIZE_CYL=`expr $NANO_DATASIZE / $SEC_PER_CYL` 43 | NANO_CODESIZE_CYL=`expr \( $MESURED_MEDIASIZE_CYL - $NANO_CONFSIZE_CYL - $NANO_DATASIZE_CYL \) / 2` 44 | fi 45 | echo "a: ${NANO_CODESIZE_CYL} 0" >> ${NANO_OBJ}/_.sunlabel 46 | echo "d: ${NANO_CODESIZE_CYL} *" >> ${NANO_OBJ}/_.sunlabel 47 | echo "e: ${NANO_CONFSIZE_CYL} *" >> ${NANO_OBJ}/_.sunlabel 48 | echo "f: ${NANO_DATASIZE_CYL} *" >> ${NANO_OBJ}/_.sunlabel 49 | 50 | # Apply the label prototype file to the md disk 51 | sunlabel -c -R ${MD} ${NANO_OBJ}/_.sunlabel 52 | 53 | # Create first image 54 | newfs -L ${NANO_LABEL}"s1a" ${NANO_NEWFS} /dev/${MD}a 55 | mount /dev/${MD}a ${MNT} 56 | df -i ${MNT} 57 | echo "Copying worlddir..." 58 | ( cd ${NANO_WORLDDIR} && find . -print | cpio -dump ${MNT} ) 59 | df -i ${MNT} 60 | echo "Generating mtree..." 61 | echo "./etc" > ${NANO_OBJ}/mtree-exclude 62 | echo "./var" >> ${NANO_OBJ}/mtree-exclude 63 | echo "./tmp" >> ${NANO_OBJ}/mtree-exclude 64 | echo "./dev" >> ${NANO_OBJ}/mtree-exclude 65 | ( cd ${MNT} && mtree -x -ic -k flags,gid,mode,nlink,size,link,uid,md5digest,sha256digest -X ${NANO_OBJ}/mtree-exclude ) > ${NANO_OBJ}/_.mtree 66 | 67 | ( cd ${MNT} && du -k ) > ${NANO_OBJ}/_.du 68 | umount ${MNT} 69 | 70 | if [ $NANO_IMAGES -gt 1 -a $NANO_INIT_IMG2 -gt 0 ] ; then 71 | # Duplicate to second image (if present) 72 | echo "Duplicating to second image..." 73 | dd if=/dev/${MD}a of=/dev/${MD}d bs=64k 74 | mount /dev/${MD}d ${MNT} 75 | for f in ${MNT}/etc/fstab ${MNT}/conf/base/etc/fstab 76 | do 77 | sed -i "" "s/${NANO_DRIVE}a/${NANO_DRIVE}d/g" $f 78 | done 79 | umount ${MNT} 80 | fi 81 | 82 | # Create Config slice 83 | newfs -L ${NANO_LABEL}"s3" ${NANO_NEWFS} /dev/${MD}e 84 | # XXX: fill from where ? 85 | 86 | # Create Data slice, if any. 87 | if [ $NANO_DATASIZE -ne 0 ] ; then 88 | newfs -L ${NANO_LABEL}"s4" ${NANO_NEWFS} /dev/${MD}f 89 | # XXX: fill from where ? 90 | fi 91 | 92 | if [ "${NANO_MD_BACKING}" = "swap" ] ; then 93 | echo "Writing out ${NANO_IMGNAME}..." 94 | dd if=/dev/${MD} of=${IMG} bs=64k 95 | fi 96 | 97 | echo "Writing out _.disk.image..." 98 | dd if=/dev/${MD}a of=${NANO_DISKIMGDIR}/_.disk.image bs=64k 99 | mdconfig -d -u $MD 100 | 101 | trap - 1 2 15 EXIT 102 | 103 | ) > ${NANO_OBJ}/_.di 2>&1 104 | ) 105 | 106 | -------------------------------------------------------------------------------- /functions/cust_allow_ssh_root: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2005 Poul-Henning Kamp. 2 | # All rights reserved. 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 1. Redistributions of source code must retain the above copyright 8 | # notice, this list of conditions and the following disclaimer. 9 | # 2. Redistributions in binary form must reproduce the above copyright 10 | # notice, this list of conditions and the following disclaimer in the 11 | # documentation and/or other materials provided with the distribution. 12 | # 13 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 | # SUCH DAMAGE. 24 | ####################################################################### 25 | # Allow root login via ssh 26 | 27 | cust_allow_ssh_root () ( 28 | sed -i "" -e '/PermitRootLogin/s/.*/PermitRootLogin yes/' \ 29 | ${NANO_WORLDDIR}/etc/ssh/sshd_config 30 | ) 31 | 32 | -------------------------------------------------------------------------------- /functions/cust_compress_kernel: -------------------------------------------------------------------------------- 1 | cust_compress_kernel() { 2 | if [ -f ${NANO_WORLDDIR}/boot/kernel/kernel ]; then 3 | if ! gzip -v9 ${NANO_WORLDDIR}/boot/kernel/kernel; then 4 | echo "Error during zipping the kernel" 5 | fi 6 | fi 7 | } 8 | -------------------------------------------------------------------------------- /functions/cust_console_dual: -------------------------------------------------------------------------------- 1 | # Enable use of keyboard/vga and serial 2 | # 3 | ###### Warning #### 4 | # BUG TO FIX: Don't boot if no serial port available! 5 | # 6 | cust_console_dual () { 7 | sed -i "" -e /tty[du]0/s/off/on/ ${NANO_WORLDDIR}/etc/ttys 8 | sed -i "" -e /tty[du]0/s/dialup/vt100/ ${NANO_WORLDDIR}/etc/ttys 9 | sed -i "" -e /tty[du]0/s/9600/${NANO_CONSOLE_SPEED}/ ${NANO_WORLDDIR}/etc/ttys 10 | 11 | # Tell loader to use serial and vga console. 12 | echo ${NANO_BOOT2CFG} > ${NANO_WORLDDIR}/boot.config 13 | 14 | # Customize loader.conf file: 15 | echo 'boot_multicons="YES"' >> ${NANO_WORLDDIR}/boot/loader.conf 16 | echo 'boot_serial="YES"' >> ${NANO_WORLDDIR}/boot/loader.conf 17 | echo "comconsole_speed=\"${NANO_CONSOLE_SPEED}\"" >> ${NANO_WORLDDIR}/boot/loader.conf 18 | echo 'console="comconsole,vidconsole"' >> ${NANO_WORLDDIR}/boot/loader.conf 19 | 20 | } 21 | 22 | -------------------------------------------------------------------------------- /functions/cust_console_serial: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2005 Poul-Henning Kamp. 2 | # All rights reserved. 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 1. Redistributions of source code must retain the above copyright 8 | # notice, this list of conditions and the following disclaimer. 9 | # 2. Redistributions in binary form must reproduce the above copyright 10 | # notice, this list of conditions and the following disclaimer in the 11 | # documentation and/or other materials provided with the distribution. 12 | # 13 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 | # SUCH DAMAGE. 24 | ####################################################################### 25 | # Setup serial console 26 | 27 | cust_console_serial () ( 28 | # Enable getty on console 29 | sed -i "" -e /tty[du]0/s/off/on/ ${NANO_WORLDDIR}/etc/ttys 30 | 31 | # Disable getty on syscons devices 32 | sed -i "" -e '/^ttyv[0-8]/s/ on/ off/' ${NANO_WORLDDIR}/etc/ttys 33 | sed -i "" -e /tty[du]0/s/9600/${NANO_CONSOLE_SPEED}/ ${NANO_WORLDDIR}/etc/ttys 34 | 35 | # Tell loader to use serial console early. 36 | echo ${NANO_BOOT2CFG} > ${NANO_WORLDDIR}/boot.config 37 | 38 | echo 'boot_serial="YES"' >> ${NANO_WORLDDIR}/boot/loader.conf 39 | echo "comconsole_speed=\"${NANO_CONSOLE_SPEED}\"" >> ${NANO_WORLDDIR}/boot/loader.conf 40 | echo 'console="comconsole"' >> ${NANO_WORLDDIR}/boot/loader.conf 41 | ) 42 | 43 | -------------------------------------------------------------------------------- /functions/cust_console_vga: -------------------------------------------------------------------------------- 1 | # Standard vga console, but permit serial port to be use as vt100 console 2 | bsdrp_console_vga () { 3 | sed -i "" -e /tty[du]0/s/off/on/ ${NANO_WORLDDIR}/etc/ttys 4 | sed -i "" -e /tty[du]0/s/dialup/vt100/ ${NANO_WORLDDIR}/etc/ttys 5 | sed -i "" -e /tty[du]0/s/9600/${NANO_CONSOLE_SPEED}/ ${NANO_WORLDDIR}/etc/ttys 6 | 7 | echo "comconsole_speed=\"${NANO_CONSOLE_SPEED}\"" >> ${NANO_WORLDDIR}/boot/loader.conf 8 | } 9 | 10 | -------------------------------------------------------------------------------- /functions/cust_ld32_cfg: -------------------------------------------------------------------------------- 1 | cust_ld32_cfg () ( 2 | cd ${NANO_WORLDDIR}/libexec 3 | if [ \! -f ld-elf32.so.1 ]; then 4 | ln -s ld-elf.so.1 ld-elf32.so.1 5 | fi 6 | ) 7 | 8 | -------------------------------------------------------------------------------- /functions/cust_motd: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014 Tom Judge 2 | # All rights reserved. 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 1. Redistributions of source code must retain the above copyright 8 | # notice, this list of conditions and the following disclaimer. 9 | # 2. Redistributions in binary form must reproduce the above copyright 10 | # notice, this list of conditions and the following disclaimer in the 11 | # documentation and/or other materials provided with the distribution. 12 | # 13 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 | # SUCH DAMAGE. 24 | ####################################################################### 25 | # Setup serial console 26 | 27 | cust_motd() ( 28 | NANO_MOTD="targets/${NANO_TARGET}/motd" 29 | if [ -e ${NANO_MOTD} ]; then 30 | cp ${NANO_MOTD} ${NANO_WORLDDIR}/etc/motd 31 | else 32 | echo > ${NANO_WORLDDIR}/etc/motd 33 | fi 34 | ) 35 | 36 | -------------------------------------------------------------------------------- /functions/cust_pkg: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2005 Poul-Henning Kamp. 2 | # All rights reserved. 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 1. Redistributions of source code must retain the above copyright 8 | # notice, this list of conditions and the following disclaimer. 9 | # 2. Redistributions in binary form must reproduce the above copyright 10 | # notice, this list of conditions and the following disclaimer in the 11 | # documentation and/or other materials provided with the distribution. 12 | # 13 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 | # SUCH DAMAGE. 24 | ####################################################################### 25 | 26 | cust_pkg () ( 27 | NANO_PACKAGE_DIR="targets/${NANO_TARGET}/${NANO_ARCH}/Pkg" 28 | 29 | # If the package directory doesn't exist, we're done. 30 | if [ ! -d ${NANO_PACKAGE_DIR} ]; then 31 | echo "DONE 0 packages" 32 | return 0 33 | fi 34 | 35 | # Copy packages into chroot 36 | mkdir -p ${NANO_WORLDDIR}/Pkg 37 | ( 38 | cd {NANO_PACKAGE_DIR} 39 | find ${NANO_PACKAGE_LIST} -print | 40 | cpio -Ldumpv ${NANO_WORLDDIR}/Pkg 41 | ) 42 | 43 | # Count & report how many we have to install 44 | todo=`ls ${NANO_WORLDDIR}/Pkg | wc -l` 45 | echo "=== TODO: $todo" 46 | ls ${NANO_WORLDDIR}/Pkg 47 | echo "===" 48 | while true 49 | do 50 | # Record how many we have now 51 | have=`ls ${NANO_WORLDDIR}/var/db/pkg | wc -l` 52 | 53 | # Attempt to install more packages 54 | # ...but no more than 200 at a time due to pkg_add's internal 55 | # limitations. 56 | chroot ${NANO_WORLDDIR} sh -c \ 57 | 'ls Pkg/*tbz | xargs -n 200 pkg_add -F' || true 58 | 59 | # See what that got us 60 | now=`ls ${NANO_WORLDDIR}/var/db/pkg | wc -l` 61 | echo "=== NOW $now" 62 | ls ${NANO_WORLDDIR}/var/db/pkg 63 | echo "===" 64 | 65 | 66 | if [ $now -eq $todo ] ; then 67 | echo "DONE $now packages" 68 | break 69 | elif [ $now -eq $have ] ; then 70 | echo "FAILED: Nothing happened on this pass" 71 | exit 2 72 | fi 73 | done 74 | rm -rf ${NANO_WORLDDIR}/Pkg 75 | ) 76 | 77 | -------------------------------------------------------------------------------- /functions/cust_pkg_fetch: -------------------------------------------------------------------------------- 1 | cust_pkg_fetch () { 2 | if [ -e targets/${NANO_TARGET}/package.list ]; then 3 | PKG_LIST=`cat targets/${NANO_TARGET}/package.list` 4 | fi 5 | if [ -e targets/${NANO_TARGET}/${NANO_ARCH}/package.list ]; then 6 | PKG_LIST=`cat targets/${NANO_TARGET}/${NANO_ARCH}/package.list` 7 | fi 8 | if [ -e ${NANO_WORLDDIR}/etc/resolv.conf ]; then 9 | mv ${NANO_WORLDDIR}/etc/resolv.conf ${NANO_WORLDDIR}/etc/resolv.conf.install_pkgs 10 | fi 11 | cp /etc/resolv.conf ${NANO_WORLDDIR}/etc/resolv.conf 12 | todo=`echo "${PKG_LIST}" | wc -w` 13 | pprint 3 "TODO: $todo" 14 | for PKG in ${PKG_LIST}; do 15 | pprint 4 "Installing ${PKG}" 16 | chroot ${NANO_WORLDDIR} sh -c "pkg_add -r ${PKG}" || true 17 | if type pkg_${PKG}; then 18 | pprint 4 "Registering post install customize command for: ${PKG}" 19 | NANO_PKG_POST_CMDS="${NANO_PKG_POST_CMDS} pkg_${PKG}" 20 | fi 21 | done 22 | 23 | if [ -e ${NANO_WORLDDIR}/etc/resolv.conf.install_pkgs ]; then 24 | mv ${NANO_WORLDDIR}/etc/resolv.conf.install_pkgs ${NANO_WORLDDIR}/etc/resolv.conf 25 | else 26 | rm ${NANO_WORLDDIR}/etc/resolv.conf 27 | fi 28 | 29 | } 30 | 31 | -------------------------------------------------------------------------------- /functions/cust_pkgng: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2005 Poul-Henning Kamp. 2 | # All rights reserved. 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 1. Redistributions of source code must retain the above copyright 8 | # notice, this list of conditions and the following disclaimer. 9 | # 2. Redistributions in binary form must reproduce the above copyright 10 | # notice, this list of conditions and the following disclaimer in the 11 | # documentation and/or other materials provided with the distribution. 12 | # 13 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 | # SUCH DAMAGE. 24 | ####################################################################### 25 | 26 | cust_pkgng () ( 27 | NANO_PACKAGE_DIR="targets/${NANO_TARGET}/${NANO_ARCH}/Pkg" 28 | 29 | # If the package directory doesn't exist, we're done. 30 | if [ ! -d ${NANO_PACKAGE_DIR} ]; then 31 | echo "DONE 0 packages" 32 | return 0 33 | fi 34 | 35 | # Copy packages into chroot 36 | mkdir -p ${NANO_WORLDDIR}/Pkg 37 | ( 38 | cd ${NANO_PACKAGE_DIR} 39 | find ${NANO_PACKAGE_LIST} -print | 40 | cpio -Ldumpv ${NANO_WORLDDIR}/Pkg 41 | ) 42 | 43 | # Count & report how many we have to install 44 | todo=`ls ${NANO_WORLDDIR}/Pkg | wc -l` 45 | todo=$(expr $todo + 1) 46 | echo "=== TODO: $todo" 47 | ls ${NANO_WORLDDIR}/Pkg 48 | echo "===" 49 | while true 50 | do 51 | # Record how many we have now 52 | have=`chroot ${NANO_WORLDDIR} sh -c \ 53 | 'env ASSUME_ALWAYS_YES=YES /usr/sbin/pkg info | /usr/bin/wc -l'` 54 | 55 | # Attempt to install more packages 56 | # limitations. 57 | chroot ${NANO_WORLDDIR} sh -c \ 58 | 'ls Pkg/*txz | xargs -n 200 env ASSUME_ALWAYS_YES=YES /usr/sbin/pkg add ' || true 59 | 60 | # See what that got us 61 | now=`chroot ${NANO_WORLDDIR} sh -c \ 62 | 'env ASSUME_ALWAYS_YES=YES /usr/sbin/pkg info | /usr/bin/wc -l'` 63 | echo "=== NOW $now" 64 | chroot ${NANO_WORLDDIR} sh -c \ 65 | 'env ASSUME_ALWAYS_YES=YES /usr/sbin/pkg info' 66 | echo "===" 67 | 68 | 69 | if [ $now -eq $todo ] ; then 70 | echo "DONE $now packages" 71 | break 72 | elif [ $now -eq $have ] ; then 73 | echo "FAILED: Nothing happened on this pass" 74 | exit 2 75 | fi 76 | done 77 | rm -rf ${NANO_WORLDDIR}/Pkg 78 | ) 79 | 80 | -------------------------------------------------------------------------------- /functions/cust_pkgng_bootstrap: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014 Tom Judge 2 | # All rights reserved. 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 1. Redistributions of source code must retain the above copyright 8 | # notice, this list of conditions and the following disclaimer. 9 | # 2. Redistributions in binary form must reproduce the above copyright 10 | # notice, this list of conditions and the following disclaimer in the 11 | # documentation and/or other materials provided with the distribution. 12 | # 13 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 | # SUCH DAMAGE. 24 | ####################################################################### 25 | # Setup serial console 26 | 27 | cust_pkgng_bootstrap () ( 28 | sed -i "" -e '/enabled: /s/yes/no/' \ 29 | ${NANO_WORLDDIR}/etc/pkg/FreeBSD.conf 30 | NANO_PKGNG="targets/${NANO_TARGET}/${NANO_ARCH}/pkg.txz" 31 | cp ${NANO_PKGNG} ${NANO_WORLDDIR}/ 32 | chroot ${NANO_WORLDDIR} /usr/sbin/pkg add /pkg.txz 33 | rm ${NANO_WORLDDIR}/pkg.txz 34 | ) 35 | 36 | -------------------------------------------------------------------------------- /functions/cust_remove_paths: -------------------------------------------------------------------------------- 1 | cust_remove_paths() { 2 | pprint 2 "Removing Files" 3 | FILES_TO_REMOVE="" 4 | if [ -e targets/${NANO_TARGET}/remove.list ]; then 5 | FILES_TO_REMOVE="${FILES_TO_REMOVE} `cat targets/${NANO_TARGET}/remove.list`" 6 | fi 7 | if [ -e targets/${NANO_TARGET}/${NANO_ARCH}/remove.list ]; then 8 | FILES_TO_REMOVE="${FILES_TO_REMOVE} `cat targets/${NANO_TARGET}/${NANO_ARCH}/remove.list`" 9 | fi 10 | 11 | for c in "${FILES_TO_REMOVE}"; do 12 | if [ -f ${NANO_WORLDDIR}/$c ]; 13 | then 14 | pprint 3 "Removing ${NANO_WORLDDIR}/$c" 15 | rm -rf ${NANO_WORLDDIR}/$c 16 | if [ $? != 0 ]; then 17 | pprint 3 "Error: Can't remove: $c" 18 | fi 19 | fi 20 | done 21 | } 22 | 23 | -------------------------------------------------------------------------------- /functions/cust_set_hostname: -------------------------------------------------------------------------------- 1 | cust_set_hostname () ( 2 | echo "hostname=${TARGET_HOSTNAME}" >> ${NANO_WORLDDIR}/etc/rc.conf 3 | ) 4 | 5 | -------------------------------------------------------------------------------- /functions/customize_cmd: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2005 Poul-Henning Kamp. 2 | # All rights reserved. 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 1. Redistributions of source code must retain the above copyright 8 | # notice, this list of conditions and the following disclaimer. 9 | # 2. Redistributions in binary form must reproduce the above copyright 10 | # notice, this list of conditions and the following disclaimer in the 11 | # documentation and/or other materials provided with the distribution. 12 | # 13 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 | # SUCH DAMAGE. 24 | ####################################################################### 25 | # Convenience function: 26 | # Register all args as customize function. 27 | 28 | customize_cmd () { 29 | NANO_CUSTOMIZE="$NANO_CUSTOMIZE $*" 30 | } 31 | 32 | -------------------------------------------------------------------------------- /functions/install_etc: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2005 Poul-Henning Kamp. 2 | # All rights reserved. 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 1. Redistributions of source code must retain the above copyright 8 | # notice, this list of conditions and the following disclaimer. 9 | # 2. Redistributions in binary form must reproduce the above copyright 10 | # notice, this list of conditions and the following disclaimer in the 11 | # documentation and/or other materials provided with the distribution. 12 | # 13 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 | # SUCH DAMAGE. 24 | install_etc ( ) ( 25 | 26 | pprint 2 "install /etc" 27 | pprint 3 "log: ${NANO_OBJ}/_.etc" 28 | 29 | cd ${NANO_SRC} 30 | env TARGET_ARCH=${NANO_ARCH} \ 31 | ${NANO_PMAKE} __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} distribution \ 32 | DESTDIR=${NANO_WORLDDIR} \ 33 | > ${NANO_OBJ}/_.etc 2>&1 34 | # make.conf doesn't get created by default, but some ports need it 35 | # so they can spam it. 36 | cp /dev/null ${NANO_WORLDDIR}/etc/make.conf 37 | ) 38 | 39 | -------------------------------------------------------------------------------- /functions/install_files: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2005 Poul-Henning Kamp. 2 | # All rights reserved. 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 1. Redistributions of source code must retain the above copyright 8 | # notice, this list of conditions and the following disclaimer. 9 | # 2. Redistributions in binary form must reproduce the above copyright 10 | # notice, this list of conditions and the following disclaimer in the 11 | # documentation and/or other materials provided with the distribution. 12 | # 13 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 | # SUCH DAMAGE. 24 | ####################################################################### 25 | # Install the stuff under ./Files 26 | 27 | install_files () ( 28 | if [ -d targets/default/Files ]; then 29 | ( 30 | cd targets/default/Files 31 | find . -print | grep -Ev '/(CVS|\.svn)' | cpio -dumpv ${NANO_WORLDDIR} 32 | ) 33 | fi 34 | if [ -d targets/${NANO_TARGET}/Files ]; then 35 | ( 36 | cd targets/${NANO_TARGET}/Files 37 | find . -print | grep -Ev '/(CVS|\.svn)' | cpio -dumpv ${NANO_WORLDDIR} 38 | ) 39 | fi 40 | if [ -d targets/${NANO_TARGET}/${NANO_ARCH}/Files ]; then 41 | ( 42 | cd targets/${NANO_TARGET}/${NANO_ARCH}/Files 43 | find . -print | grep -Ev '/(CVS|\.svn)' | cpio -dumpv ${NANO_WORLDDIR} 44 | ) 45 | fi 46 | ) 47 | 48 | -------------------------------------------------------------------------------- /functions/install_kernel: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2005 Poul-Henning Kamp. 2 | # All rights reserved. 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 1. Redistributions of source code must retain the above copyright 8 | # notice, this list of conditions and the following disclaimer. 9 | # 2. Redistributions in binary form must reproduce the above copyright 10 | # notice, this list of conditions and the following disclaimer in the 11 | # documentation and/or other materials provided with the distribution. 12 | # 13 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 | # SUCH DAMAGE. 24 | 25 | install_kernel ( ) ( 26 | pprint 2 "install kernel ($NANO_KERNEL)" 27 | pprint 3 "log: ${NANO_OBJ}/_.ik" 28 | 29 | setup_kernel_conf_vars 30 | 31 | (cd ${NANO_SRC} 32 | env TARGET_ARCH=${NANO_ARCH} ${NANO_PMAKE} installkernel \ 33 | DESTDIR=${NANO_WORLDDIR} \ 34 | __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} \ 35 | ${kernconfdir:+"KERNCONFDIR="}${kernconfdir} \ 36 | KERNCONF=${kernconf} \ 37 | MODULES_OVERRIDE="${NANO_MODULES}" 38 | ) > ${NANO_OBJ}/_.ik 2>&1 39 | ) 40 | 41 | -------------------------------------------------------------------------------- /functions/install_world: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2005 Poul-Henning Kamp. 2 | # All rights reserved. 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 1. Redistributions of source code must retain the above copyright 8 | # notice, this list of conditions and the following disclaimer. 9 | # 2. Redistributions in binary form must reproduce the above copyright 10 | # notice, this list of conditions and the following disclaimer in the 11 | # documentation and/or other materials provided with the distribution. 12 | # 13 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 | # SUCH DAMAGE. 24 | install_world ( ) ( 25 | pprint 2 "installworld" 26 | pprint 3 "log: ${NANO_OBJ}/_.iw" 27 | 28 | cd ${NANO_SRC} 29 | env TARGET_ARCH=${NANO_ARCH} \ 30 | ${NANO_PMAKE} __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} installworld \ 31 | DESTDIR=${NANO_WORLDDIR} \ 32 | > ${NANO_OBJ}/_.iw 2>&1 33 | chflags -R noschg ${NANO_WORLDDIR} 34 | ) 35 | 36 | -------------------------------------------------------------------------------- /functions/last_orders_cmd: -------------------------------------------------------------------------------- 1 | last_orders_cmd () { 2 | NANO_LAST_ORDERS="$NANO_LAST_ORDERS $1" 3 | } 4 | -------------------------------------------------------------------------------- /functions/late_customize_cmd: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2005 Poul-Henning Kamp. 2 | # All rights reserved. 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 1. Redistributions of source code must retain the above copyright 8 | # notice, this list of conditions and the following disclaimer. 9 | # 2. Redistributions in binary form must reproduce the above copyright 10 | # notice, this list of conditions and the following disclaimer in the 11 | # documentation and/or other materials provided with the distribution. 12 | # 13 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 | # SUCH DAMAGE. 24 | ####################################################################### 25 | # Convenience function: 26 | # Register all args as late customize function to run just before 27 | # image creation. 28 | 29 | late_customize_cmd () { 30 | NANO_LATE_CUSTOMIZE="$NANO_LATE_CUSTOMIZE $*" 31 | } 32 | 33 | -------------------------------------------------------------------------------- /functions/launch_image_in_qemu: -------------------------------------------------------------------------------- 1 | launch_image_in_qemu ( ) ( 2 | IMG=${NANO_DISKIMGDIR}/${NANO_IMGNAME} 3 | echo qemu -nographic -drive file=${IMG} type=raw -net pcap iface=${QEMU_IFACE:-"em0"} 4 | tmux neww qemu -nographic -drive file=${IMG} type=raw -net pcap iface=${QEMU_IFACE:-"em0"} 5 | ) 6 | -------------------------------------------------------------------------------- /functions/make_conf_build: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2005 Poul-Henning Kamp. 2 | # All rights reserved. 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 1. Redistributions of source code must retain the above copyright 8 | # notice, this list of conditions and the following disclaimer. 9 | # 2. Redistributions in binary form must reproduce the above copyright 10 | # notice, this list of conditions and the following disclaimer in the 11 | # documentation and/or other materials provided with the distribution. 12 | # 13 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 | # SUCH DAMAGE. 24 | make_conf_build ( ) ( 25 | pprint 2 "Construct build make.conf ($NANO_MAKE_CONF_BUILD)" 26 | 27 | if [ -e ${NANO_MAKE_CONF_BUILD} ]; then 28 | rm ${NANO_MAKE_CONF_BUILD} 29 | fi 30 | 31 | ## Copy the target's make.conf.build into place. 32 | if [ -e targets/${NANO_TARGET}/make.conf.build ]; then 33 | cp targets/${NANO_TARGET}/make.conf.build ${NANO_MAKE_CONF_BUILD} 34 | fi 35 | 36 | ## If there is a target arch make.conf.build append it. 37 | if [ -e targets/${NANO_TARGET}/${NANO_ARCH}/make.conf.build ]; then 38 | cat targets/${NANO_TARGET}/${NANO_ARCH}/make.conf.build >> ${NANO_MAKE_CONF_BUILD} 39 | fi 40 | 41 | echo "SRCCONF=/dev/null" >> ${NANO_MAKE_CONF_BUILD} 42 | ) 43 | -------------------------------------------------------------------------------- /functions/make_conf_install: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2005 Poul-Henning Kamp. 2 | # All rights reserved. 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 1. Redistributions of source code must retain the above copyright 8 | # notice, this list of conditions and the following disclaimer. 9 | # 2. Redistributions in binary form must reproduce the above copyright 10 | # notice, this list of conditions and the following disclaimer in the 11 | # documentation and/or other materials provided with the distribution. 12 | # 13 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 | # SUCH DAMAGE. 24 | make_conf_install ( ) ( 25 | pprint 2 "Construct install make.conf ($NANO_MAKE_CONF_INSTALL)" 26 | 27 | if [ -e ${NANO_MAKE_CONF_INSTALL} ]; then 28 | rm ${NANO_MAKE_CONF_INSTALL} 29 | fi 30 | 31 | ## Copy the target's make.conf.build into place. 32 | if [ -e targets/${NANO_TARGET}/make.conf.build ]; then 33 | cp targets/${NANO_TARGET}/make.conf.build ${NANO_MAKE_CONF_INSTALL} 34 | fi 35 | 36 | ## If there is a target arch make.conf.build append it. 37 | if [ -e targets/${NANO_TARGET}/${NANO_ARCH}/make.conf.build ]; then 38 | cat targets/${NANO_TARGET}/${NANO_ARCH}/make.conf.build >> ${NANO_MAKE_CONF_INSTALL} 39 | fi 40 | 41 | ## Copy the target's make.conf.build into place. 42 | if [ -e targets/${NANO_TARGET}/make.conf.install ]; then 43 | cat targets/${NANO_TARGET}/make.conf.install >> ${NANO_MAKE_CONF_INSTALL} 44 | fi 45 | 46 | ## If there is a target arch make.conf.install append it. 47 | if [ -e targets/${NANO_TARGET}/${NANO_ARCH}/make.conf.install ]; then 48 | cat targets/${NANO_TARGET}/${NANO_ARCH}/make.conf.install >> ${NANO_MAKE_CONF_INSTALL} 49 | fi 50 | echo "SRCCONF=/dev/null" >> ${NANO_MAKE_CONF_INSTALL} 51 | ) 52 | 53 | -------------------------------------------------------------------------------- /functions/nano_cleanup: -------------------------------------------------------------------------------- 1 | nano_cleanup() { 2 | if [ $? -ne 0 ]; then 3 | echo "Error encountered. Check for errors in last log file." 1>&2 4 | fi 5 | exit $? 6 | } 7 | 8 | -------------------------------------------------------------------------------- /functions/newfs_part: -------------------------------------------------------------------------------- 1 | newfs_part ( ) ( 2 | local dev mnt lbl 3 | dev=$1 4 | mnt=$2 5 | lbl=$3 6 | echo newfs ${NANO_NEWFS} ${NANO_LABEL:+-L${NANO_LABEL}${lbl}} ${dev} 7 | newfs ${NANO_NEWFS} ${NANO_LABEL:+-L${NANO_LABEL}${lbl}} ${dev} 8 | mount -o async ${dev} ${mnt} 9 | ) 10 | -------------------------------------------------------------------------------- /functions/packages/pkg_quagga: -------------------------------------------------------------------------------- 1 | pkg_quagga() { 2 | # Set Quagga permission 3 | chroot ${NANO_WORLDDIR} /bin/sh -exc 'chown -R quagga:quagga /usr/local/etc/quagga' 4 | } 5 | -------------------------------------------------------------------------------- /functions/populate_cfg_slice: -------------------------------------------------------------------------------- 1 | populate_cfg_slice ( ) ( 2 | populate_slice "$1" "$2" "$3" "$4" 3 | ) 4 | -------------------------------------------------------------------------------- /functions/populate_data_slice: -------------------------------------------------------------------------------- 1 | populate_data_slice ( ) ( 2 | populate_slice "$1" "$2" "$3" "$4" 3 | ) 4 | -------------------------------------------------------------------------------- /functions/populate_slice: -------------------------------------------------------------------------------- 1 | populate_slice ( ) ( 2 | local dev dir mnt lbl 3 | dev=$1 4 | dir=$2 5 | mnt=$3 6 | lbl=$4 7 | test -z $2 && dir=${NANO_WORLDDIR}/var/empty 8 | test -d $dir || dir=${NANO_WORLDDIR}/var/empty 9 | echo "Creating ${dev} with ${dir} (mounting on ${mnt})" 10 | newfs_part $dev $mnt $lbl 11 | if [ -d ${dir} ]; then 12 | cd ${dir} 13 | find . -print | grep -Ev '/(CVS|\.svn)' | cpio -dumpv ${mnt} 14 | fi 15 | df -i ${mnt} 16 | umount ${mnt} 17 | ) 18 | -------------------------------------------------------------------------------- /functions/pprint: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2005 Poul-Henning Kamp. 2 | # All rights reserved. 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 1. Redistributions of source code must retain the above copyright 8 | # notice, this list of conditions and the following disclaimer. 9 | # 2. Redistributions in binary form must reproduce the above copyright 10 | # notice, this list of conditions and the following disclaimer in the 11 | # documentation and/or other materials provided with the distribution. 12 | # 13 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 | # SUCH DAMAGE. 24 | # Progress Print 25 | # Print $2 at level $1. 26 | pprint() { 27 | if [ "$1" -le $PPLEVEL ]; then 28 | runtime=$(( `date +%s` - $NANO_STARTTIME )) 29 | printf "%s %.${1}s %s\n" "`date -u -r $runtime +%H:%M:%S`" "#####" "$2" 1>&3 30 | fi 31 | } 32 | 33 | -------------------------------------------------------------------------------- /functions/prune_usr: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2005 Poul-Henning Kamp. 2 | # All rights reserved. 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 1. Redistributions of source code must retain the above copyright 8 | # notice, this list of conditions and the following disclaimer. 9 | # 2. Redistributions in binary form must reproduce the above copyright 10 | # notice, this list of conditions and the following disclaimer in the 11 | # documentation and/or other materials provided with the distribution. 12 | # 13 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 | # SUCH DAMAGE. 24 | prune_usr() ( 25 | 26 | # Remove all empty directories in /usr 27 | find ${NANO_WORLDDIR}/usr -type d -depth -print | 28 | while read d 29 | do 30 | rmdir $d > /dev/null 2>&1 || true 31 | done 32 | ) 33 | 34 | -------------------------------------------------------------------------------- /functions/run_command_set: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2005 Poul-Henning Kamp. 2 | # All rights reserved. 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 1. Redistributions of source code must retain the above copyright 8 | # notice, this list of conditions and the following disclaimer. 9 | # 2. Redistributions in binary form must reproduce the above copyright 10 | # notice, this list of conditions and the following disclaimer in the 11 | # documentation and/or other materials provided with the distribution. 12 | # 13 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 | # SUCH DAMAGE. 24 | run_command_set() { 25 | 26 | pprint 2 "run command set" 27 | for c in $@ 28 | do 29 | pprint 2 "command \"$c\"" 30 | pprint 3 "log: ${NANO_OBJ}/_.command.$c" 31 | pprint 4 "`type $c`" 32 | $c > ${NANO_OBJ}/_.command.$c 2>&1 33 | done 34 | } 35 | 36 | -------------------------------------------------------------------------------- /functions/setup_kernel_conf_vars: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2011 Tom Judge. 2 | # All rights reserved. 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 1. Redistributions of source code must retain the above copyright 8 | # notice, this list of conditions and the following disclaimer. 9 | # 2. Redistributions in binary form must reproduce the above copyright 10 | # notice, this list of conditions and the following disclaimer in the 11 | # documentation and/or other materials provided with the distribution. 12 | # 13 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 | # SUCH DAMAGE. 24 | 25 | setup_kernel_conf_vars ( ) { 26 | if [ -e targets/${NANO_TARGET}/${NANO_ARCH}/${NANO_KERNEL} ] ; then 27 | NANO_KERNEL="targets/${NANO_TARGET}/${NANO_ARCH}/${NANO_KERNEL}" 28 | kernconfdir=$(realpath $(dirname ${NANO_KERNEL})) 29 | kernconf=$(basename ${NANO_KERNEL}) 30 | else 31 | kernconf=${NANO_KERNEL} 32 | fi 33 | } 34 | -------------------------------------------------------------------------------- /functions/setup_nanobsd: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2005 Poul-Henning Kamp. 2 | # All rights reserved. 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 1. Redistributions of source code must retain the above copyright 8 | # notice, this list of conditions and the following disclaimer. 9 | # 2. Redistributions in binary form must reproduce the above copyright 10 | # notice, this list of conditions and the following disclaimer in the 11 | # documentation and/or other materials provided with the distribution. 12 | # 13 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 | # SUCH DAMAGE. 24 | setup_nanobsd ( ) ( 25 | pprint 2 "configure nanobsd setup" 26 | pprint 3 "log: ${NANO_OBJ}/_.dl" 27 | 28 | ( 29 | cd ${NANO_WORLDDIR} 30 | 31 | # Update login.conf db 32 | chroot ${NANO_WORLDDIR} /bin/sh -exc \ 33 | 'cap_mkdb /etc/login.conf' 34 | 35 | # Move /usr/local/etc to /etc/local so that the /cfg stuff 36 | # can stomp on it. Otherwise packages like ipsec-tools which 37 | # have hardcoded paths under ${prefix}/etc are not tweakable. 38 | if [ -d usr/local/etc ] ; then 39 | ( 40 | mkdir -p etc/local 41 | cd usr/local/etc 42 | find . -print | cpio -dumpl ../../../etc/local 43 | cd .. 44 | rm -rf etc 45 | ln -s ../../etc/local etc 46 | ) 47 | fi 48 | 49 | # relocate /var/cron to /etc/cron 50 | # This permit to save crontab (only /etc and /usr/local/etc are saved) 51 | mkdir -p ${NANO_WORLDDIR}/etc/cron 52 | rm -rf ${NANO_WORLDDIR}/var/cron 53 | ln -s ../etc/cron ${NANO_WORLDDIR}/var/cron 54 | 55 | for d in var etc 56 | do 57 | # link /$d under /conf 58 | # we use hard links so we have them both places. 59 | # the files in /$d will be hidden by the mount. 60 | # XXX: configure /$d ramdisk size 61 | mkdir -p conf/base/$d conf/default/$d 62 | find $d -print | cpio -dumpl conf/base/ 63 | done 64 | 65 | echo "$NANO_RAM_ETCSIZE" > conf/base/etc/md_size 66 | echo "$NANO_RAM_TMPVARSIZE" > conf/base/var/md_size 67 | 68 | # pick up config files from the special partition 69 | echo "mount -o ro /dev/${NANO_DRIVE}s3" > conf/default/etc/remount 70 | 71 | # Put /tmp on the /var ramdisk (could be symlink already) 72 | rmdir tmp || true 73 | rm tmp || true 74 | ln -s var/tmp tmp 75 | 76 | ) > ${NANO_OBJ}/_.dl 2>&1 77 | ) 78 | 79 | -------------------------------------------------------------------------------- /functions/setup_nanobsd_etc: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2005 Poul-Henning Kamp. 2 | # All rights reserved. 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 1. Redistributions of source code must retain the above copyright 8 | # notice, this list of conditions and the following disclaimer. 9 | # 2. Redistributions in binary form must reproduce the above copyright 10 | # notice, this list of conditions and the following disclaimer in the 11 | # documentation and/or other materials provided with the distribution. 12 | # 13 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 | # SUCH DAMAGE. 24 | setup_nanobsd_etc ( ) ( 25 | pprint 2 "configure nanobsd /etc" 26 | 27 | ( 28 | cd ${NANO_WORLDDIR} 29 | 30 | # create diskless marker file 31 | touch etc/diskless 32 | 33 | # Make root filesystem R/O by default 34 | echo "root_rw_mount=NO" >> etc/defaults/rc.conf 35 | 36 | # save config file for scripts 37 | echo "NANO_DRIVE=${NANO_DRIVE}" > etc/nanobsd.conf 38 | 39 | case "${NANO_IMAGE_TYPE}" 40 | in 41 | disk) 42 | echo "/dev/${NANO_DRIVE}s1a / ufs ro 1 1" > etc/fstab 43 | echo "/dev/${NANO_DRIVE}s3 /cfg ufs rw,noauto 2 2" >> etc/fstab 44 | ;; 45 | cd) 46 | echo "/dev/acd0 / cd9660 ro 0 0" > etc/fstab 47 | echo "tmpfs /tmp tmpfs rw,size=268435456,mode=1777 0 0" >> etc/fstab 48 | echo "NANO_DRIVE=${NANO_DRIVE}" > etc/nanobsd.conf 49 | ;; 50 | esac 51 | 52 | mkdir -p cfg 53 | ) 54 | ) 55 | 56 | -------------------------------------------------------------------------------- /nanobsd.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright (c) 2005 Poul-Henning Kamp. 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions 8 | # are met: 9 | # 1. Redistributions of source code must retain the above copyright 10 | # notice, this list of conditions and the following disclaimer. 11 | # 2. Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in the 13 | # documentation and/or other materials provided with the distribution. 14 | # 15 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 16 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 | # SUCH DAMAGE. 26 | # 27 | # $FreeBSD: releng/8.1/tools/tools/nanobsd/nanobsd.sh 206537 2010-04-13 00:57:54Z imp $ 28 | # 29 | 30 | set -e 31 | 32 | # Where to find the NanoBSD-NG code base 33 | # Default: The directory the script is being run from 34 | 35 | if [ -z "${NANO_TOOLS}" ]; then 36 | NANO_TOOLS=`dirname $0` 37 | echo "NANO_TOOLS set to ${NANO_TOOLS}" 38 | fi 39 | 40 | if [ -d ${NANO_TOOLS} ] ; then 41 | true 42 | else 43 | echo "NANO_TOOLS directory does not exist: ${NANO_TOOLS}" 1>&2 44 | exit 1 45 | fi 46 | 47 | ####################################################################### 48 | # 49 | # Pull in all of the function definitions. 50 | # 51 | ####################################################################### 52 | 53 | for FUNC in `find ${NANO_TOOLS}/functions -type f | grep -Ev '(CVS|\.svn|\.swp)'`; do 54 | . ${FUNC} 55 | done 56 | 57 | ####################################################################### 58 | # 59 | # All set up to go... 60 | # 61 | ####################################################################### 62 | 63 | 64 | usage () { 65 | ( 66 | echo "Usage: $0 [-bfiknqvw] [-a target_arch] -t target_name" 67 | echo " -a target cpu architecture (amd64/arm/i386/sparc64)" 68 | echo " -b suppress builds (both kernel and world)" 69 | echo " -f suppress code slice extraction" 70 | echo " -i suppress disk image build" 71 | echo " -k suppress buildkernel" 72 | echo " -n add -DNO_CLEAN to buildworld, buildkernel, etc" 73 | echo " -q make output more quiet" 74 | echo " -v make output more verbose" 75 | echo " -w suppress buildworld" 76 | echo " -t nanobsd target to build" 77 | ) 1>&2 78 | exit 2 79 | } 80 | 81 | ####################################################################### 82 | # Parse arguments 83 | 84 | do_clean=true 85 | do_kernel=true 86 | do_world=true 87 | do_image=true 88 | do_copyout_partition=true 89 | 90 | set +e 91 | args=`getopt bt:a:fhiknqvw $*` 92 | if [ $? -ne 0 ] ; then 93 | usage 94 | exit 2 95 | fi 96 | set -e 97 | 98 | set -- $args 99 | for i 100 | do 101 | case "$i" 102 | in 103 | -b) 104 | do_world=false 105 | do_kernel=false 106 | shift 107 | ;; 108 | -k) 109 | do_kernel=false 110 | shift 111 | ;; 112 | -t) 113 | NANO_TARGET="$2" 114 | shift 115 | shift 116 | ;; 117 | -a) 118 | NANO_ARCH="$2" 119 | shift 120 | shift 121 | ;; 122 | -f) 123 | do_copyout_partition=false 124 | shift 125 | ;; 126 | -h) 127 | usage 128 | ;; 129 | -i) 130 | do_image=false 131 | shift 132 | ;; 133 | -n) 134 | do_clean=false 135 | shift 136 | ;; 137 | -q) 138 | PPLEVEL=$(($PPLEVEL - 1)) 139 | shift 140 | ;; 141 | -v) 142 | PPLEVEL=$(($PPLEVEL + 1)) 143 | shift 144 | ;; 145 | -w) 146 | do_world=false 147 | shift 148 | ;; 149 | --) 150 | shift 151 | break 152 | esac 153 | done 154 | 155 | 156 | if [ $# -gt 0 ] ; then 157 | echo "$0: Extraneous arguments supplied" 158 | usage 159 | fi 160 | 161 | if [ -z "${NANO_TARGET}" ]; then 162 | echo "$0: You must specify a build target" 163 | usage 164 | fi 165 | 166 | if [ -z "${NANO_ARCH}" ]; then 167 | NANO_ARCH=`uname -p` 168 | fi 169 | 170 | case "${NANO_ARCH}" 171 | in 172 | amd64) 173 | ;; 174 | arm) 175 | ;; 176 | i386) 177 | ;; 178 | sparc64) 179 | ;; 180 | *) 181 | echo "$0: Target architechture is not supported" 182 | usage 183 | esac 184 | 185 | 186 | trap "nano_cleanup" EXIT 187 | ####################################################################### 188 | # 189 | # Pull in the defaut variable settings from: 190 | # targets/default/nanobsd.conf 191 | # 192 | ####################################################################### 193 | 194 | . ${NANO_TOOLS}/targets/default/nanobsd.conf 195 | 196 | 197 | ####################################################################### 198 | # 199 | # Process the target configuration 200 | # 201 | ####################################################################### 202 | 203 | if [ ! -d ${NANO_TOOLS}/targets/${NANO_TARGET} ]; then 204 | echo "Build target not found" 1>&2 205 | exit 1 206 | fi 207 | 208 | if [ ! -e ${NANO_TOOLS}/targets/${NANO_TARGET}/nanobsd.conf ]; then 209 | echo "Build target nanobsd.conf not found" 1>&2 210 | exit 1 211 | fi 212 | 213 | . ${NANO_TOOLS}/targets/${NANO_TARGET}/nanobsd.conf 214 | 215 | if [ -e ${NANO_TOOLS}/targets/${NANO_TARGET}/${NANO_ARCH}/nanobsd.conf ]; then 216 | . ${NANO_TOOLS}/targets/${NANO_TARGET}/${NANO_ARCH}/nanobsd.conf 217 | fi 218 | 219 | ####################################################################### 220 | # 221 | # Sanity Checks for build config. 222 | # 223 | ####################################################################### 224 | 225 | case "${NANO_IMAGE_TYPE}" 226 | in 227 | disk) 228 | ;; 229 | cd) 230 | ;; 231 | *) 232 | echo "NANO_IMAGE_TYPE is invalid! Valid values are disk and cd" >&2 233 | exit 1 234 | esac 235 | 236 | 237 | ####################################################################### 238 | # Setup and Export Internal variables 239 | # 240 | test -n "${NANO_OBJ}" || NANO_OBJ=/usr/obj/nanobsd.${NANO_NAME}.${NANO_ARCH} 241 | test -n "${MAKEOBJDIRPREFIX}" || MAKEOBJDIRPREFIX=${NANO_OBJ} 242 | test -n "${NANO_DISKIMGDIR}" || NANO_DISKIMGDIR=${NANO_OBJ} 243 | 244 | NANO_WORLDDIR=${NANO_OBJ}/_.w 245 | NANO_MAKE_CONF_BUILD=${MAKEOBJDIRPREFIX}/make.conf.build 246 | NANO_MAKE_CONF_INSTALL=${NANO_OBJ}/make.conf.install 247 | 248 | 249 | if $do_clean ; then 250 | true 251 | else 252 | NANO_PMAKE="${NANO_PMAKE} -DNO_CLEAN" 253 | fi 254 | 255 | # Override user's NANO_DRIVE if they specified a NANO_LABEL 256 | if [ ! -z "${NANO_LABEL}" ]; then 257 | NANO_DRIVE=ufs/${NANO_LABEL} 258 | fi 259 | 260 | export MAKEOBJDIRPREFIX 261 | 262 | export NANO_ARCH 263 | export NANO_CFGDIR 264 | export NANO_CODESIZE 265 | export NANO_CONFSIZE 266 | export NANO_CUSTOMIZE 267 | export NANO_DATADIR 268 | export NANO_DATASIZE 269 | export NANO_DRIVE 270 | export NANO_HEADS 271 | export NANO_IMAGES 272 | export NANO_IMGNAME 273 | export NANO_LABEL 274 | export NANO_MAKE_CONF_BUILD 275 | export NANO_MAKE_CONF_INSTALL 276 | export NANO_MEDIASIZE 277 | export NANO_NAME 278 | export NANO_NEWFS 279 | export NANO_OBJ 280 | export NANO_PMAKE 281 | export NANO_SECTS 282 | export NANO_SRC 283 | export NANO_TOOLS 284 | export NANO_WORLDDIR 285 | export NANO_BOOT0CFG 286 | export NANO_BOOT2CFG 287 | export NANO_BOOTLOADER 288 | 289 | ####################################################################### 290 | # And then it is as simple as that... 291 | 292 | # File descriptor 3 is used for logging output, see pprint 293 | exec 3>&1 294 | 295 | NANO_STARTTIME=`date +%s` 296 | pprint 1 "NanoBSD image ${NANO_NAME} build starting" 297 | 298 | if $do_world ; then 299 | if $do_clean ; then 300 | clean_build 301 | else 302 | pprint 2 "Using existing build tree (as instructed)" 303 | fi 304 | make_conf_build 305 | build_world 306 | else 307 | pprint 2 "Skipping buildworld (as instructed)" 308 | fi 309 | 310 | if $do_kernel ; then 311 | if ! $do_world ; then 312 | make_conf_build 313 | fi 314 | build_kernel 315 | else 316 | pprint 2 "Skipping buildkernel (as instructed)" 317 | fi 318 | 319 | clean_world 320 | make_conf_install 321 | install_world 322 | install_etc 323 | setup_nanobsd_etc 324 | install_kernel 325 | install_files 326 | 327 | run_command_set "${NANO_CUSTOMIZE}" 328 | run_command_set "${NANO_PKG_POST_CMDS}" 329 | 330 | setup_nanobsd 331 | prune_usr 332 | run_command_set "${NANO_LATE_CUSTOMIZE}" 333 | if $do_image ; then 334 | create_${NANO_ARCH}_${NANO_IMAGE_TYPE}image 335 | else 336 | pprint 2 "Skipping image build (as instructed)" 337 | fi 338 | run_command_set "${NANO_LAST_ORDERS}" 339 | 340 | pprint 1 "NanoBSD image ${NANO_NAME} completed" 341 | -------------------------------------------------------------------------------- /targets/alix/make.conf.build: -------------------------------------------------------------------------------- 1 | WITHOUT_ACPI=YES 2 | WITHOUT_AMD=YES 3 | WITHOUT_APM=YES 4 | WITHOUT_ATM=YES 5 | WITHOUT_BLUETOOTH=YES 6 | WITHOUT_EXAMPLES=YES 7 | WITHOUT_GAMES=YES 8 | WITHOUT_HTML=YES 9 | WITHOUT_INFO=YES 10 | WITHOUT_IPFILTER=YES 11 | WITHOUT_IPFW=YES 12 | WITHOUT_IPX=YES 13 | WITHOUT_JAIL=YES 14 | WITHOUT_LOCALES=YES 15 | WITHOUT_LPR=YES 16 | WITHOUT_MAKE=YES 17 | WITHOUT_NDIS=YES 18 | WITHOUT_NETGRAPH=YES 19 | WITHOUT_NIS=YES 20 | WITHOUT_OBJC=YES 21 | WITHOUT_PMC=YES 22 | WITHOUT_PORTSNAP=YES 23 | WITHOUT_PPP=YES 24 | WITHOUT_PROFILE=YES 25 | WITHOUT_QUOTAS=YES 26 | WITHOUT_RCMDS=YES 27 | WITHOUT_RCS=YES 28 | WITHOUT_ROUTED=YES 29 | WITHOUT_SHAREDOCS=YES 30 | WITHOUT_ZFS=YES 31 | NO_KLDLOAD=YES 32 | NO_NETGRAPH=YES 33 | NO_MODULES=YES 34 | -------------------------------------------------------------------------------- /targets/alix/make.conf.install: -------------------------------------------------------------------------------- 1 | WITHOUT_TOOLCHAIN=YES 2 | -------------------------------------------------------------------------------- /targets/alix/nanobsd.conf: -------------------------------------------------------------------------------- 1 | # 2 | # The ALIX platform is an i386 system with an AMD Geode CPU. 3 | # 4 | case ${NANO_ARCH} 5 | in 6 | i386) 7 | ;; 8 | *) 9 | echo "$0: Target ${NANO_TARGET} does not support the requested architecture ${NANO_ARCH}" >&2 10 | exit 1 11 | esac 12 | 13 | 14 | NANO_NAME=ALIX 15 | NANO_SRC=/usr/src 16 | NANO_KERNEL=ALIXv1 17 | NANO_IMAGES=2 18 | #NANO_CFGDIR=${NANO_TOOLS}/targets/${NANO_TARGET}/cfg 19 | 20 | ##FlashDevice integral 256 21 | # This configuration is specific to the 256Mb CF carded provided by LinITX.com 22 | #NANO_MEDIASIZE=`expr 254435328 / 512` 23 | NANO_MEDIASIZE=30408336 24 | NANO_HEADS=255 25 | NANO_SECTS=63 26 | 27 | 28 | ## Enable the serial console. 29 | customize_cmd cust_console_serial 30 | 31 | ## Set ssh root access 32 | customize_cmd cust_allow_ssh_root 33 | 34 | ## Remove MOTD or install targets/alix/motd if present 35 | customize_cmd cust_motd 36 | 37 | ### Alix specific cust_ commands 38 | 39 | customize_cmd cust_set_hostname 40 | customize_cmd cust_pkgng_bootstrap 41 | customize_cmd cust_pkgng 42 | 43 | # vim:set syntax=sh: 44 | -------------------------------------------------------------------------------- /targets/default/Files/root/change_password: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright (c) 2004-2005 Poul-Henning Kamp. 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions 8 | # are met: 9 | # 1. Redistributions of source code must retain the above copyright 10 | # notice, this list of conditions and the following disclaimer. 11 | # 2. Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in the 13 | # documentation and/or other materials provided with the distribution. 14 | # 15 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 16 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 | # SUCH DAMAGE. 26 | # 27 | # $FreeBSD: releng/8.1/tools/tools/nanobsd/Files/root/change_password 150412 2005-09-21 09:40:45Z phk $ 28 | # 29 | 30 | set -e 31 | 32 | passwd root 33 | 34 | cfgslice=`grep '/cfg' /etc/fstab | cut -d \ -f 1` 35 | 36 | trap "umount /cfg" 1 2 15 EXIT 37 | mount /cfg 38 | cp /etc/master.passwd /etc/passwd /etc/pwd.db /etc/spwd.db /etc/group /cfg 39 | umount /cfg 40 | trap 1 2 15 EXIT 41 | -------------------------------------------------------------------------------- /targets/default/Files/root/save_cfg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright (c) 2006 Mathieu Arnold 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions 8 | # are met: 9 | # 1. Redistributions of source code must retain the above copyright 10 | # notice, this list of conditions and the following disclaimer. 11 | # 2. Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in the 13 | # documentation and/or other materials provided with the distribution. 14 | # 15 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 16 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 | # SUCH DAMAGE. 26 | # 27 | # $FreeBSD: releng/8.1/tools/tools/nanobsd/Files/root/save_cfg 178369 2008-04-21 06:22:27Z phk $ 28 | # 29 | 30 | set -e 31 | 32 | trap "umount /cfg" 1 2 15 EXIT 33 | mount /cfg 34 | ( 35 | cd /cfg 36 | for i in "$@" `find * -type f` 37 | do 38 | cmp -s /etc/$i /cfg/$i || cp -pfv /etc/$i /cfg/$i 39 | done 40 | ) 41 | umount /cfg 42 | trap 1 2 15 EXIT 43 | -------------------------------------------------------------------------------- /targets/default/Files/root/save_sshkeys: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright (c) 2004-2005 Poul-Henning Kamp. 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions 8 | # are met: 9 | # 1. Redistributions of source code must retain the above copyright 10 | # notice, this list of conditions and the following disclaimer. 11 | # 2. Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in the 13 | # documentation and/or other materials provided with the distribution. 14 | # 15 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 16 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 | # SUCH DAMAGE. 26 | # 27 | # $FreeBSD: releng/8.1/tools/tools/nanobsd/Files/root/save_sshkeys 150553 2005-09-25 21:23:19Z phk $ 28 | # 29 | 30 | set -e 31 | 32 | trap "umount /cfg" 1 2 15 EXIT 33 | mount /cfg 34 | mkdir -p /cfg/ssh 35 | ( 36 | cd /etc/ssh 37 | cp ssh_host_* /cfg/ssh 38 | ) 39 | umount /cfg 40 | trap 1 2 15 EXIT 41 | -------------------------------------------------------------------------------- /targets/default/Files/usr/local/sbin/updatep1: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright (c) 2004-2005 Poul-Henning Kamp. 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions 8 | # are met: 9 | # 1. Redistributions of source code must retain the above copyright 10 | # notice, this list of conditions and the following disclaimer. 11 | # 2. Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in the 13 | # documentation and/or other materials provided with the distribution. 14 | # 15 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 16 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 | # SUCH DAMAGE. 26 | # 27 | # $FreeBSD: releng/8.1/tools/tools/nanobsd/Files/root/updatep2 150412 2005-09-21 09:40:45Z phk $ 28 | # 29 | # Script to update partition 2 on a NanoBSD system. 30 | # 31 | # usage: 32 | # ssh somewhere cat image.s1 | sh updatep2 33 | # 34 | 35 | set -e 36 | 37 | . /etc/nanobsd.conf 38 | 39 | name=${0##*/} 40 | 41 | case $name 42 | in 43 | updatep1) 44 | index=1 45 | old_index=2 46 | ;; 47 | updatep2) 48 | index=2 49 | old_index=1 50 | ;; 51 | *) 52 | echo "Bad invocation" 53 | exit 1 54 | ;; 55 | esac 56 | 57 | if mount | grep -q "/dev/${NANO_DRIVE}s${index}a on / "; then 58 | echo "You are running partition ${index} already" 59 | echo "you probably want to use 'updatep${old_index}' instead" 60 | exit 1 61 | fi 62 | 63 | boot_dev=/dev/`glabel status | grep ${NANO_DRIVE}s${old_index}a | awk '{ print $3; }' | cut -d s -f 1` 64 | label=`cut -d '/' -f 2 /etc/nanobsd.conf` 65 | 66 | # Blow away old system. 67 | dd if=/dev/zero of=${boot_dev}s${index} bs=1m count=1 > /dev/null 2>&1 68 | 69 | # Copy in new system 70 | dd of=${boot_dev}s${index} obs=64k 71 | 72 | # Check that it worked 73 | fsck_ffs -n ${boot_dev}s${index}a 74 | 75 | # Set Label into the new slice 76 | tunefs -L ${label}s${index}a ${boot_dev}s${index}a 77 | 78 | # Update the /etc/fstab 79 | trap "umount /mnt" 1 2 15 EXIT 80 | mount /dev/${NANO_DRIVE}s${index}a /mnt 81 | sed -i "" "s/${label}s${old_index}a/${label}s${index}a/" /mnt/conf/base/etc/fstab 82 | sed -i "" "s/${label}s${old_index}a/${label}s${index}a/" /mnt/etc/fstab 83 | umount /mnt 84 | trap 1 2 15 EXIT 85 | boot0cfg -s ${index} -v ${boot_dev} 86 | gpart set -a active -i ${index} ${boot_dev} 87 | -------------------------------------------------------------------------------- /targets/default/Files/usr/local/sbin/updatep2: -------------------------------------------------------------------------------- 1 | updatep1 -------------------------------------------------------------------------------- /targets/default/make.conf.build: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amishHammer/NanoBSD-NG/437e3a299f7ea6c994f78dc4be9c893e42ab007d/targets/default/make.conf.build -------------------------------------------------------------------------------- /targets/default/make.conf.install: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amishHammer/NanoBSD-NG/437e3a299f7ea6c994f78dc4be9c893e42ab007d/targets/default/make.conf.install -------------------------------------------------------------------------------- /targets/default/nanobsd.conf: -------------------------------------------------------------------------------- 1 | # Name of this NanoBSD build. (Used to construct workdir names) 2 | NANO_NAME=full 3 | 4 | # Source tree directory 5 | NANO_SRC=/usr/src 6 | 7 | # Where cust_pkg() finds packages to install 8 | NANO_PACKAGE_DIR=${NANO_TOOLS}/${NANO_TARGET}/packages 9 | NANO_PACKAGE_LIST="*" 10 | 11 | # Object tree directory 12 | # default is subdir of /usr/obj 13 | #NANO_OBJ="" 14 | 15 | # The directory to put the final images 16 | # default is ${NANO_OBJ} 17 | #NANO_DISKIMGDIR="" 18 | 19 | # Parallel Make 20 | NANO_PMAKE="make -j 3" 21 | 22 | # The default name for any image we create. 23 | NANO_IMGNAME="_.disk.full" 24 | 25 | # Kernel config file to use 26 | # If this file exists in targets/${NANO_TARGET}/${NANO_ARCH} then it 27 | # will be copied 28 | NANO_KERNEL=GENERIC 29 | 30 | # Kernel modules to build; default is none 31 | NANO_MODULES= 32 | 33 | # Customize commands. 34 | NANO_CUSTOMIZE="" 35 | 36 | # Late customize commands. 37 | NANO_LATE_CUSTOMIZE="" 38 | 39 | # Last Orders commands. 40 | NANO_LAST_ORDERS="" 41 | 42 | # Newfs paramters to use 43 | NANO_NEWFS="-b 4096 -f 512 -i 8192 -O1 -U" 44 | 45 | # The drive name of the media at runtime 46 | # This value is not used if NANO_LABEL is used 47 | #NANO_DRIVE=ad0 48 | 49 | # Target media size in 512 bytes sectors 50 | NANO_MEDIASIZE=$(( 1000 * 1000 * 1000 / 512 )) 51 | 52 | # Number of code images on media (1 or 2) 53 | NANO_IMAGES=2 54 | 55 | # 0 -> Leave second image all zeroes so it compresses better. 56 | # 1 -> Initialize second image with a copy of the first 57 | NANO_INIT_IMG2=1 58 | 59 | # Size of code file system in 512 bytes sectors 60 | # If zero, size will be as large as possible. 61 | NANO_CODESIZE=0 62 | 63 | # Size of configuration file system in 512 bytes sectors 64 | # Cannot be zero. 65 | NANO_CONFSIZE=2048 66 | 67 | # Size of data file system in 512 bytes sectors 68 | # If zero: no partition configured. 69 | # If negative: max size possible 70 | NANO_DATASIZE=0 71 | 72 | # Size of the /etc ramdisk in 512 bytes sectors 73 | NANO_RAM_ETCSIZE=10240 74 | 75 | # Size of the /tmp+/var ramdisk in 512 bytes sectors 76 | NANO_RAM_TMPVARSIZE=10240 77 | 78 | # Media geometry, only relevant if bios doesn't understand LBA. 79 | NANO_SECTS=63 80 | NANO_HEADS=16 81 | 82 | # boot0 flags/options and configuration 83 | NANO_BOOT0CFG="-o packet -s 1 -m 3" 84 | NANO_BOOTLOADER="boot/boot0sio" 85 | 86 | # boot2 flags/options 87 | # default force serial console 88 | NANO_BOOT2CFG=" -h" 89 | 90 | # Backing type of md(4) device 91 | # Can be "file" or "swap" 92 | NANO_MD_BACKING="file" 93 | 94 | # for swap type md(4) backing, write out the mbr only 95 | NANO_IMAGE_MBRONLY=true 96 | 97 | # Set NANO_LABEL to non-blank to form the basis for using /dev/ufs/label 98 | # in preference to /dev/${NANO_DRIVE} 99 | # Root partition will be ${NANO_LABEL}s{1,2} 100 | # /cfg partition will be ${NANO_LABEL}s3 101 | # /data partition will be ${NANO_LABEL}s4 102 | NANO_LABEL="nanobsd" 103 | 104 | # Directory to populate /cfg from 105 | NANO_CFGDIR=${NANO_TOOLS}/targets/${NANO_TARGET}/cfg 106 | 107 | # Directory to populate /data from 108 | NANO_DATADIR=${NANO_TOOLS}/${NANO_TARGET}/data 109 | 110 | ## Define the image type, acceptable types are disk and cd. 111 | NANO_IMAGE_TYPE="disk" 112 | 113 | ## Speed to enable the serial console at. 114 | NANO_CONSOLE_SPEED="9600" 115 | 116 | # Progress Print level 117 | PPLEVEL=3 118 | 119 | -------------------------------------------------------------------------------- /targets/dev-qemu/make.conf.build: -------------------------------------------------------------------------------- 1 | WITHOUT_ACPI=YES 2 | WITHOUT_AMD=YES 3 | WITHOUT_APM=YES 4 | WITHOUT_ATM=YES 5 | WITHOUT_BLUETOOTH=YES 6 | WITHOUT_EXAMPLES=YES 7 | WITHOUT_GAMES=YES 8 | WITHOUT_GSSAPI=YES 9 | WITHOUT_HTML=YES 10 | WITHOUT_INET6=YES 11 | WITHOUT_INFO=YES 12 | WITHOUT_IPFILTER=YES 13 | WITHOUT_IPFW=YES 14 | WITHOUT_IPX=YES 15 | WITHOUT_JAIL=YES 16 | WITHOUT_KERBEROS=YES 17 | WITHOUT_LOCALES=YES 18 | WITHOUT_LPR=YES 19 | WITHOUT_MAKE=YES 20 | WITHOUT_NDIS=YES 21 | WITHOUT_NETGRAPH=YES 22 | WITHOUT_NIS=YES 23 | WITHOUT_OBJC=YES 24 | WITHOUT_PMC=YES 25 | WITHOUT_PORTSNAP=YES 26 | WITHOUT_PPP=YES 27 | WITHOUT_PROFILE=YES 28 | WITHOUT_QUOTAS=YES 29 | WITHOUT_RCMDS=YES 30 | WITHOUT_RCS=YES 31 | WITHOUT_ROUTED=YES 32 | WITHOUT_SHAREDOCS=YES 33 | WITHOUT_ZFS=YES 34 | NO_KLDLOAD=YES 35 | NO_NETGRAPH=YES 36 | -------------------------------------------------------------------------------- /targets/dev-qemu/make.conf.install: -------------------------------------------------------------------------------- 1 | WITHOUT_TOOLCHAIN=YES 2 | -------------------------------------------------------------------------------- /targets/dev-qemu/nanobsd.conf: -------------------------------------------------------------------------------- 1 | # 2 | # The ALIX platform is an i386 system with an AMD Geode CPU. 3 | # 4 | case ${NANO_ARCH} 5 | in 6 | i386) 7 | ;; 8 | *) 9 | echo "$0: Target ${NANO_TARGET} does not support the requested architecture ${NANO_ARCH}" >&2 10 | exit 1 11 | esac 12 | 13 | 14 | NANO_NAME=DEV-QEMU 15 | NANO_SRC=/usr/src 16 | NANO_KERNEL=GENERIC 17 | NANO_IMAGES=2 18 | 19 | PACKAGESITE=http://tinderbox.home.tomjudge.com/tb/pacakges/8.1-i386/Latest/ 20 | 21 | FlashDevice sandisk 512 22 | # This configuration is specific to the 256Mb CF carded provided by LinITX.com 23 | #NANO_MEDIASIZE=`expr 254435328 / 512` 24 | #NANO_HEADS=16 25 | #NANO_SECTS=63 26 | 27 | 28 | ## Enable the serial console. 29 | customize_cmd cust_console_serial 30 | 31 | ## Set ssh root access 32 | customize_cmd cust_allow_ssh_root 33 | 34 | ### Alix specific cust_ commands 35 | 36 | customize_cmd cust_install_files 37 | 38 | # Launch the QEmu image 39 | last_orders_cmd launch_image_in_qemu 40 | 41 | # vim:set syntax=sh: 42 | -------------------------------------------------------------------------------- /targets/net5501/Files/etc/ssh/ssh_config: -------------------------------------------------------------------------------- 1 | # $OpenBSD: ssh_config,v 1.22 2006/05/29 12:56:33 dtucker Exp $ 2 | # $FreeBSD: releng/8.1/tools/tools/nanobsd/rescue/Files/etc/ssh/ssh_config 188482 2009-02-11 12:15:35Z mr $ 3 | 4 | # This is the ssh client system-wide configuration file. See 5 | # ssh_config(5) for more information. This file provides defaults for 6 | # users, and the values can be changed in per-user configuration files 7 | # or on the command line. 8 | 9 | # Configuration data is parsed as follows: 10 | # 1. command line options 11 | # 2. user-specific file 12 | # 3. system-wide file 13 | # Any configuration value is only changed the first time it is set. 14 | # Thus, host-specific definitions should be at the beginning of the 15 | # configuration file, and defaults at the end. 16 | 17 | # Site-wide defaults for some commonly used options. For a comprehensive 18 | # list of available options, their meanings and defaults, please see the 19 | # ssh_config(5) man page. 20 | 21 | # Host * 22 | # ForwardAgent no 23 | # ForwardX11 no 24 | # RhostsRSAAuthentication no 25 | # RSAAuthentication yes 26 | # PasswordAuthentication yes 27 | # HostbasedAuthentication no 28 | # GSSAPIAuthentication no 29 | # GSSAPIDelegateCredentials no 30 | # BatchMode no 31 | # CheckHostIP no 32 | # AddressFamily any 33 | # ConnectTimeout 0 34 | # StrictHostKeyChecking ask 35 | # IdentityFile ~/.ssh/identity 36 | # IdentityFile ~/.ssh/id_rsa 37 | # IdentityFile ~/.ssh/id_dsa 38 | # Port 22 39 | # Protocol 2,1 40 | # Cipher 3des 41 | # Ciphers aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc 42 | # EscapeChar ~ 43 | # Tunnel no 44 | # TunnelDevice any:any 45 | # PermitLocalCommand no 46 | # VersionAddendum FreeBSD-20061110 47 | -------------------------------------------------------------------------------- /targets/net5501/Files/etc/ssh/sshd_config: -------------------------------------------------------------------------------- 1 | # $OpenBSD: sshd_config,v 1.74 2006/07/19 13:07:10 dtucker Exp $ 2 | # $FreeBSD: releng/8.1/tools/tools/nanobsd/rescue/Files/etc/ssh/sshd_config 188482 2009-02-11 12:15:35Z mr $ 3 | 4 | # This is the sshd server system-wide configuration file. See 5 | # sshd_config(5) for more information. 6 | 7 | # This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin 8 | 9 | # The strategy used for options in the default sshd_config shipped with 10 | # OpenSSH is to specify options with their default value where 11 | # possible, but leave them commented. Uncommented options change a 12 | # default value. 13 | 14 | # Note that some of FreeBSD's defaults differ from OpenBSD's, and 15 | # FreeBSD has a few additional options. 16 | 17 | #VersionAddendum FreeBSD-20061110 18 | 19 | #Port 22 20 | #Protocol 2 21 | #AddressFamily any 22 | #ListenAddress 0.0.0.0 23 | #ListenAddress :: 24 | 25 | # HostKey for protocol version 1 26 | #HostKey /etc/ssh/ssh_host_key 27 | # HostKeys for protocol version 2 28 | #HostKey /etc/ssh/ssh_host_dsa_key 29 | 30 | # Lifetime and size of ephemeral version 1 server key 31 | #KeyRegenerationInterval 1h 32 | #ServerKeyBits 768 33 | 34 | # Logging 35 | # obsoletes QuietMode and FascistLogging 36 | #SyslogFacility AUTH 37 | #LogLevel INFO 38 | 39 | # Authentication: 40 | 41 | #LoginGraceTime 2m 42 | PermitRootLogin yes 43 | #StrictModes yes 44 | #MaxAuthTries 6 45 | 46 | #RSAAuthentication yes 47 | #PubkeyAuthentication yes 48 | #AuthorizedKeysFile .ssh/authorized_keys 49 | 50 | # For this to work you will also need host keys in /etc/ssh/ssh_known_hosts 51 | #RhostsRSAAuthentication no 52 | # similar for protocol version 2 53 | #HostbasedAuthentication no 54 | # Change to yes if you don't trust ~/.ssh/known_hosts for 55 | # RhostsRSAAuthentication and HostbasedAuthentication 56 | #IgnoreUserKnownHosts no 57 | # Don't read the user's ~/.rhosts and ~/.shosts files 58 | #IgnoreRhosts yes 59 | 60 | # Change to yes to enable built-in password authentication. 61 | #PasswordAuthentication no 62 | #PermitEmptyPasswords no 63 | 64 | # Change to no to disable PAM authentication 65 | #ChallengeResponseAuthentication yes 66 | 67 | # Kerberos options 68 | #KerberosAuthentication no 69 | #KerberosOrLocalPasswd yes 70 | #KerberosTicketCleanup yes 71 | #KerberosGetAFSToken no 72 | 73 | # GSSAPI options 74 | #GSSAPIAuthentication no 75 | #GSSAPICleanupCredentials yes 76 | 77 | # Set this to 'no' to disable PAM authentication, account processing, 78 | # and session processing. If this is enabled, PAM authentication will 79 | # be allowed through the ChallengeResponseAuthentication and 80 | # PasswordAuthentication. Depending on your PAM configuration, 81 | # PAM authentication via ChallengeResponseAuthentication may bypass 82 | PermitRootLogin yes 83 | # If you just want the PAM account and session checks to run without 84 | # PAM authentication, then enable this but set PasswordAuthentication 85 | # and ChallengeResponseAuthentication to 'no'. 86 | #UsePAM yes 87 | 88 | #AllowTcpForwarding yes 89 | #GatewayPorts no 90 | #X11Forwarding yes 91 | #X11DisplayOffset 10 92 | #X11UseLocalhost yes 93 | #PrintMotd yes 94 | #PrintLastLog yes 95 | #TCPKeepAlive yes 96 | #UseLogin no 97 | #UsePrivilegeSeparation yes 98 | #PermitUserEnvironment no 99 | #Compression delayed 100 | #ClientAliveInterval 0 101 | #ClientAliveCountMax 3 102 | #UseDNS yes 103 | #PidFile /var/run/sshd.pid 104 | #MaxStartups 10 105 | #PermitTunnel no 106 | 107 | # no default banner path 108 | #Banner /some/path 109 | 110 | # override default of no subsystems 111 | Subsystem sftp /usr/libexec/sftp-server 112 | 113 | # Example of overriding settings on a per-user basis 114 | #Match User anoncvs 115 | # X11Forwarding no 116 | # AllowTcpForwarding no 117 | # ForceCommand cvs server 118 | -------------------------------------------------------------------------------- /targets/net5501/Files/root/.cshrc: -------------------------------------------------------------------------------- 1 | # $FreeBSD: releng/8.1/tools/tools/nanobsd/rescue/Files/root/.cshrc 188482 2009-02-11 12:15:35Z mr $ 2 | # 3 | #csh .cshrc file 4 | 5 | alias a alias 6 | a h history 25 7 | a j jobs -l 8 | a la ls -a 9 | a lf ls -FA 10 | a ll ls -lA 11 | a lm 'll | more' 12 | a m more 13 | 14 | set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin /usr/X11R6/bin /usr/local/jdk1.6.0/bin /usr/local/jdk1.5.0/bin $HOME/bin) 15 | setenv MANPATH "/usr/share/man:/usr/X11R6/man:/usr/local/man" 16 | 17 | setenv PAGER more 18 | setenv EDITOR vi 19 | setenv BLOCKSIZE K 20 | setenv FTP_PASSIVE_MODE YES 21 | #setenv JAVA_HOME /usr/local/jdk1.6.0 22 | #setenv JDK_HOME /usr/local/jdk1.6.0 23 | #setenv JAVA_VERSION 1.5+ 24 | #setenv JAVA_VERSION 1.4 25 | #setenv LANG de_DE.UTF-8 26 | setenv CVS_RSH ssh 27 | 28 | if ($?prompt) then 29 | # An interactive shell -- set some stuff up 30 | set prompt = "`hostname -s`# " 31 | set filec 32 | set history = 100 33 | set savehist = 100 34 | set mail = (/var/mail/$USER) 35 | set autolist 36 | set matchbeep=ambiguos 37 | set autoexpand 38 | set autocorrect 39 | set ignoreeof 40 | set correct=cmd 41 | endif 42 | -------------------------------------------------------------------------------- /targets/net5501/Files/usr/ports/.keepme: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amishHammer/NanoBSD-NG/437e3a299f7ea6c994f78dc4be9c893e42ab007d/targets/net5501/Files/usr/ports/.keepme -------------------------------------------------------------------------------- /targets/net5501/i386/NET5501: -------------------------------------------------------------------------------- 1 | include GENERIC 2 | makeoptions NO_MODULES=yes 3 | 4 | ident NET5501 5 | 6 | ## Setup CPU Config 7 | 8 | options CPU_SOEKRIS 9 | options CPU_GEODE 10 | nooptions SMP 11 | 12 | #ADD ACPI (missing in GENERIC for i386) 13 | device acpi 14 | 15 | 16 | ## Get rid of stuff we wont use. 17 | nooptions COMPAT_FREEBSD4 # Compatible with FreeBSD4 18 | nooptions COMPAT_FREEBSD5 # Compatible with FreeBSD5 19 | nooptions COMPAT_FREEBSD6 # Compatible with FreeBSD6 20 | nooptions COMPAT_FREEBSD7 # Compatible with FreeBSD7 21 | 22 | 23 | 24 | ## Build in GEOM Stuff 25 | options GEOM_STRIPE 26 | options GEOM_MIRROR 27 | options GEOM_GATE 28 | options GEOM_ELI 29 | options GEOM_JOURNAL 30 | 31 | ## Null fs 32 | options NULLFS 33 | ## File Descripter FS 34 | options FDESCFS 35 | 36 | ## IPSec Stuff 37 | options IPSEC 38 | options IPSEC_FILTERTUNNEL 39 | device crypto 40 | device cryptodev 41 | device hifn 42 | 43 | ## Failover stuff 44 | device carp 45 | 46 | ## VLan Dev 47 | device vlan 48 | 49 | ## Bridge dev 50 | device if_bridge 51 | 52 | ## Link Aggragtion 53 | device lagg 54 | 55 | ## IPMI Support 56 | device smbus 57 | device ipmi 58 | 59 | ## Accept Filters 60 | options ACCEPT_FILTER_DATA 61 | options ACCEPT_FILTER_HTTP 62 | 63 | ## Firewall Stuff 64 | device pf 65 | device pflog 66 | device pfsync 67 | 68 | ## QoS Stuff 69 | options ALTQ 70 | options ALTQ_CBQ # Class Bases Queuing (CBQ) 71 | options ALTQ_RED # Random Early Detection (RED) 72 | options ALTQ_RIO # RED In/Out 73 | options ALTQ_HFSC # Hierarchical Packet Scheduler (HFSC) 74 | options ALTQ_PRIQ # Priority Queuing (PRIQ) 75 | options ALTQ_NOPCC # Required for SMP build 76 | 77 | 78 | ##### STUFF WE DONT WANT #### 79 | 80 | ## No ATA Except Disk 81 | nodevice fdc 82 | nodevice ataraid # ATA RAID drives 83 | nodevice atapicd # ATAPI CDROM drives 84 | nodevice atapifd # ATAPI floppy drives 85 | nodevice atapist # ATAPI tape drives 86 | 87 | ### No SCSI Stuff 88 | nodevice ahb # EISA AHA1742 family 89 | nodevice ahc # AHA2940 and onboard AIC7xxx devices 90 | nooptions AHC_REG_PRETTY_PRINT # Print register bitfields in debug 91 | # output. Adds ~128k to driver. 92 | nodevice ahd # AHA39320/29320 and onboard AIC79xx devices 93 | nooptions AHD_REG_PRETTY_PRINT # Print register bitfields in debug 94 | # output. Adds ~215k to driver. 95 | nodevice amd # AMD 53C974 (Tekram DC-390(T)) 96 | nodevice hptiop # Highpoint RocketRaid 3xxx series 97 | nodevice isp # Qlogic family 98 | nodevice ispfw # Firmware for QLogic HBAs- normally a module 99 | nodevice mpt # LSI-Logic MPT-Fusion 100 | nodevice ncr # NCR/Symbios Logic 101 | nodevice sym # NCR/Symbios Logic (newer chipsets + those of `ncr') 102 | nodevice trm # Tekram DC395U/UW/F DC315U adapters 103 | nodevice adv # Advansys SCSI adapters 104 | nodevice adw # Advansys wide SCSI adapters 105 | nodevice aha # Adaptec 154x SCSI adapters 106 | nodevice aic # Adaptec 15[012]x SCSI adapters, AIC-6[23]60. 107 | nodevice bt # Buslogic/Mylex MultiMaster SCSI adapters 108 | nodevice ncv # NCR 53C500 109 | nodevice nsp # Workbit Ninja SCSI-3 110 | nodevice stg # TMC 18C30/18C50 111 | # RAID controllers interfaced to the SCSI subsystem 112 | nodevice amr # AMI MegaRAID 113 | nodevice arcmsr # Areca SATA II RAID 114 | nodevice asr # DPT SmartRAID V, VI and Adaptec SCSI RAID 115 | nodevice ciss # Compaq Smart RAID 5* 116 | nodevice dpt # DPT Smartcache III, IV - See NOTES for options 117 | nodevice hptmv # Highpoint RocketRAID 182x 118 | nodevice hptrr # Highpoint RocketRAID 17xx, 22xx, 23xx, 25xx 119 | nodevice iir # Intel Integrated RAID 120 | nodevice ips # IBM (Adaptec) ServeRAID 121 | nodevice mly # Mylex AcceleRAID/eXtremeRAID 122 | nodevice twa # 3ware 9000 series PATA/SATA RAID 123 | 124 | # RAID controllers 125 | nodevice aac # Adaptec FSA RAID 126 | nodevice aacp # SCSI passthrough for aac (requires CAM) 127 | nodevice ida # Compaq Smart RAID 128 | nodevice mfi # LSI MegaRAID SAS 129 | nodevice mlx # Mylex DAC960 family 130 | nodevice pst # Promise Supertrak SX6000 131 | nodevice twe # 3ware ATA RAID 132 | 133 | # atkbdc0 controls both the keyboard and the PS/2 mouse 134 | nodevice atkbdc # AT keyboard controller 135 | nodevice atkbd # AT keyboard 136 | nodevice psm # PS/2 mouse 137 | 138 | nodevice kbdmux # keyboard multiplexer 139 | 140 | nodevice vga # VGA video card driver 141 | 142 | nodevice splash # Splash screen and screen saver support 143 | 144 | # syscons is the default console driver, resembling an SCO console 145 | nodevice sc 146 | 147 | nodevice agp # support several AGP chipsets 148 | 149 | 150 | 151 | 152 | ## NO WiFi stuff 153 | nodevice wlan # 802.11 support 154 | nodevice wlan_wep # 802.11 WEP support 155 | nodevice wlan_ccmp # 802.11 CCMP support 156 | nodevice wlan_tkip # 802.11 TKIP support 157 | nodevice wlan_amrr # AMRR transmit rate control algorithm 158 | nodevice wlan_scan_ap # 802.11 AP mode scanning 159 | nodevice wlan_scan_sta # 802.11 STA mode scanning 160 | nodevice an # Aironet 4500/4800 802.11 wireless NICs. 161 | nodevice ath # Atheros pci/cardbus NIC's 162 | nodevice ath_hal # Atheros HAL (Hardware Access Layer) 163 | nodevice ath_rate_sample # SampleRate tx rate control for ath 164 | nodevice awi # BayStack 660 and others 165 | nodevice ral # Ralink Technology RT2500 wireless NICs. 166 | nodevice wi # WaveLAN/Intersil/Symbol 802.11 wireless NICs. 167 | 168 | ## No pseudo devs 169 | nodevice sl ## No SLIP 170 | nodevice ppp ## No PPP 171 | nodevice faith ## No 6 in 4 172 | nodevice plip ## No PLIP 173 | 174 | ## PCMCIA 175 | nodevice cbb # cardbus (yenta) bridge 176 | nodevice pccard # PC Card (16-bit) bus 177 | nodevice cardbus # CardBus (32-bit) bus 178 | 179 | # Parallel port 180 | nodevice ppc 181 | nodevice ppbus # Parallel port bus (required) 182 | nodevice lpt # Printer 183 | nodevice plip # TCP/IP over parallel 184 | nodevice ppi # Parallel port interface device 185 | #device vpo # Requires scbus and da 186 | 187 | # PCI Ethernet NICs. 188 | nodevice de # DEC/Intel DC21x4x (``Tulip'') 189 | nodevice em # Intel PRO/1000 Gigabit Ethernet Family 190 | nodevice igb # Intel PRO/1000 PCIE Server Gigabit Family 191 | nodevice ixgb # Intel PRO/10GbE Ethernet Card 192 | nodevice le # AMD Am7900 LANCE and Am79C9xx PCnet 193 | nodevice txp # 3Com 3cR990 (``Typhoon'') 194 | nodevice vx # 3Com 3c590, 3c595 (``Vortex'') 195 | 196 | # PCI Ethernet NICs that use the common MII bus controller code. 197 | # NOTE: Be sure to keep the 'device miibus' line in order to use these NICs! 198 | nodevice age # Attansic/Atheros L1 Gigabit Ethernet 199 | #device ale # Atheros AR8121/AR8113/AR8114 Ethernet 200 | nodevice bce # Broadcom BCM5706/BCM5708 Gigabit Ethernet 201 | nodevice bfe # Broadcom BCM440x 10/100 Ethernet 202 | nodevice bge # Broadcom BCM570xx Gigabit Ethernet 203 | nodevice dc # DEC/Intel 21143 and various workalikes 204 | nodevice et # Agere ET1310 10/100/Gigabit Ethernet 205 | nodevice fxp # Intel EtherExpress PRO/100B (82557, 82558) 206 | nodevice jme # JMicron JMC250 Gigabit/JMC260 Fast Ethernet 207 | nodevice lge # Level 1 LXT1001 gigabit Ethernet 208 | nodevice msk # Marvell/SysKonnect Yukon II Gigabit Ethernet 209 | nodevice nfe # nVidia nForce MCP on-board Ethernet 210 | nodevice nge # NatSemi DP83820 gigabit Ethernet 211 | #device nve # nVidia nForce MCP on-board Ethernet Networking 212 | nodevice pcn # AMD Am79C97x PCI 10/100 (precedence over 'le') 213 | nodevice re # RealTek 8139C+/8169/8169S/8110S 214 | nodevice rl # RealTek 8129/8139 215 | nodevice sf # Adaptec AIC-6915 (``Starfire'') 216 | nodevice sis # Silicon Integrated Systems SiS 900/SiS 7016 217 | nodevice sk # SysKonnect SK-984x & SK-982x gigabit Ethernet 218 | nodevice ste # Sundance ST201 (D-Link DFE-550TX) 219 | nodevice stge # Sundance/Tamarack TC9021 gigabit Ethernet 220 | nodevice ti # Alteon Networks Tigon I/II gigabit Ethernet 221 | nodevice tl # Texas Instruments ThunderLAN 222 | nodevice tx # SMC EtherPower II (83c170 ``EPIC'') 223 | nodevice vge # VIA VT612x gigabit Ethernet 224 | nodevice wb # Winbond W89C840F 225 | nodevice xl # 3Com 3c90x (``Boomerang'', ``Cyclone'') 226 | 227 | # ISA Ethernet NICs. pccard NICs included. 228 | nodevice cs # Crystal Semiconductor CS89x0 NIC 229 | nodevice ed # NE[12]000, SMC Ultra, 3c503, DS8390 cards 230 | nodevice ex # Intel EtherExpress Pro/10 and Pro/10+ 231 | nodevice ep # Etherlink III based cards 232 | nodevice fe # Fujitsu MB8696x based cards 233 | nodevice sn # SMC's 9000 series of Ethernet chips 234 | nodevice xe # Xircom pccard Ethernet 235 | 236 | ## USB 237 | nodevice uhid # "Human Interface Devices" 238 | nodevice ukbd # Keyboard 239 | nodevice ulpt # Printer 240 | nodevice ums # Mouse 241 | nodevice rum 242 | nodevice uath # Atheros AR5523 wireless NICs 243 | nodevice ural # Ralink Technology RT2500USB wireless NICs 244 | nodevice zyd # ZyDAS zb1211/zb1211b wireless NICs 245 | nodevice urio # Diamond Rio 500 MP3 player 246 | nodevice uscanner # Scanners 247 | # USB Serial devices 248 | nodevice ucom # Generic com ttys 249 | nodevice uark # Technologies ARK3116 based serial adapters 250 | nodevice ubsa # Belkin F5U103 and compatible serial adapters 251 | nodevice ubser # BWCT console serial adapters 252 | nodevice uftdi # For FTDI usb serial adapters 253 | nodevice uipaq # Some WinCE based devices 254 | nodevice uplcom # Prolific PL-2303 serial adapters 255 | nodevice uslcom # SI Labs CP2101/CP2102 serial adapters 256 | nodevice uvisor # Visor and Palm devices 257 | nodevice uvscom # USB serial support for DDI pocket's PHS 258 | # USB Ethernet, requires miibus 259 | nodevice aue # ADMtek USB Ethernet 260 | nodevice axe # ASIX Electronics USB Ethernet 261 | nodevice cdce # Generic USB over Ethernet 262 | nodevice cue # CATC USB Ethernet 263 | nodevice kue # Kawasaki LSI USB Ethernet 264 | nodevice rue # RealTek RTL8150 USB Ethernet 265 | 266 | # FireWire support 267 | nodevice firewire # FireWire bus code 268 | nodevice sbp # SCSI over FireWire (Requires scbus and da) 269 | nodevice fwe # Ethernet over FireWire (non-standard!) 270 | nodevice fwip # IP over FireWire (RFC 2734,3146) 271 | nodevice dcons # Dumb console driver 272 | nodevice dcons_crom # Configuration ROM for dcons 273 | -------------------------------------------------------------------------------- /targets/net5501/make.conf.build: -------------------------------------------------------------------------------- 1 | WITHOUT_ACPI=YES 2 | WITHOUT_AMD=YES 3 | WITHOUT_APM=YES 4 | WITHOUT_ATM=YES 5 | WITHOUT_BLUETOOTH=YES 6 | WITHOUT_EXAMPLES=YES 7 | WITHOUT_GAMES=YES 8 | WITHOUT_HTML=YES 9 | WITHOUT_INFO=YES 10 | WITHOUT_IPFILTER=YES 11 | WITHOUT_IPFW=YES 12 | WITHOUT_IPX=YES 13 | WITHOUT_PMC=YES 14 | WITHOUT_PORTSNAP=YES 15 | WITHOUT_PROFILE=YES 16 | WITHOUT_RCMDS=YES 17 | WITHOUT_SHAREDOCS=YES 18 | -------------------------------------------------------------------------------- /targets/net5501/make.conf.install: -------------------------------------------------------------------------------- 1 | WITHOUT_TOOLCHAIN=YES 2 | -------------------------------------------------------------------------------- /targets/net5501/nanobsd.conf: -------------------------------------------------------------------------------- 1 | 2 | NANO_TOOLS=`pwd` 3 | NANO_RAM_TMPVARSIZE=20480 4 | NANO_PMAKE="make -j 8" 5 | NANO_SRC=/usr/src 6 | NANO_IMAGES=2 7 | NANO_KERNEL="NET5501" 8 | 9 | TARGET_HOSTNAME="net5501" 10 | PACKAGESITE="http://tinderbox.home.tomjudge.com/tb/packages/8.1-i386/Latest/" 11 | 12 | FlashDevice Sandisk 8g 13 | 14 | ## Enable the serial console. 15 | customize_cmd cust_console_serial 16 | 17 | customize_cmd cust_install_files 18 | customize_cmd cust_pkg_fetch 19 | customize_cmd cust_set_hostname 20 | 21 | # vim:set syntax=sh: 22 | -------------------------------------------------------------------------------- /targets/net5501/package.list: -------------------------------------------------------------------------------- 1 | tmux 2 | bash 3 | bash-completion 4 | vim-lite 5 | openvpn 6 | ssmtp 7 | keychain 8 | subversion 9 | svnmerge 10 | svn_load_dirs 11 | -------------------------------------------------------------------------------- /targets/rescue/Files/etc/ssh/ssh_config: -------------------------------------------------------------------------------- 1 | # $OpenBSD: ssh_config,v 1.22 2006/05/29 12:56:33 dtucker Exp $ 2 | # $FreeBSD: releng/8.1/tools/tools/nanobsd/rescue/Files/etc/ssh/ssh_config 188482 2009-02-11 12:15:35Z mr $ 3 | 4 | # This is the ssh client system-wide configuration file. See 5 | # ssh_config(5) for more information. This file provides defaults for 6 | # users, and the values can be changed in per-user configuration files 7 | # or on the command line. 8 | 9 | # Configuration data is parsed as follows: 10 | # 1. command line options 11 | # 2. user-specific file 12 | # 3. system-wide file 13 | # Any configuration value is only changed the first time it is set. 14 | # Thus, host-specific definitions should be at the beginning of the 15 | # configuration file, and defaults at the end. 16 | 17 | # Site-wide defaults for some commonly used options. For a comprehensive 18 | # list of available options, their meanings and defaults, please see the 19 | # ssh_config(5) man page. 20 | 21 | # Host * 22 | # ForwardAgent no 23 | # ForwardX11 no 24 | # RhostsRSAAuthentication no 25 | # RSAAuthentication yes 26 | # PasswordAuthentication yes 27 | # HostbasedAuthentication no 28 | # GSSAPIAuthentication no 29 | # GSSAPIDelegateCredentials no 30 | # BatchMode no 31 | # CheckHostIP no 32 | # AddressFamily any 33 | # ConnectTimeout 0 34 | # StrictHostKeyChecking ask 35 | # IdentityFile ~/.ssh/identity 36 | # IdentityFile ~/.ssh/id_rsa 37 | # IdentityFile ~/.ssh/id_dsa 38 | # Port 22 39 | # Protocol 2,1 40 | # Cipher 3des 41 | # Ciphers aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc 42 | # EscapeChar ~ 43 | # Tunnel no 44 | # TunnelDevice any:any 45 | # PermitLocalCommand no 46 | # VersionAddendum FreeBSD-20061110 47 | -------------------------------------------------------------------------------- /targets/rescue/Files/etc/ssh/sshd_config: -------------------------------------------------------------------------------- 1 | # $OpenBSD: sshd_config,v 1.74 2006/07/19 13:07:10 dtucker Exp $ 2 | # $FreeBSD: releng/8.1/tools/tools/nanobsd/rescue/Files/etc/ssh/sshd_config 188482 2009-02-11 12:15:35Z mr $ 3 | 4 | # This is the sshd server system-wide configuration file. See 5 | # sshd_config(5) for more information. 6 | 7 | # This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin 8 | 9 | # The strategy used for options in the default sshd_config shipped with 10 | # OpenSSH is to specify options with their default value where 11 | # possible, but leave them commented. Uncommented options change a 12 | # default value. 13 | 14 | # Note that some of FreeBSD's defaults differ from OpenBSD's, and 15 | # FreeBSD has a few additional options. 16 | 17 | #VersionAddendum FreeBSD-20061110 18 | 19 | #Port 22 20 | #Protocol 2 21 | #AddressFamily any 22 | #ListenAddress 0.0.0.0 23 | #ListenAddress :: 24 | 25 | # HostKey for protocol version 1 26 | #HostKey /etc/ssh/ssh_host_key 27 | # HostKeys for protocol version 2 28 | #HostKey /etc/ssh/ssh_host_dsa_key 29 | 30 | # Lifetime and size of ephemeral version 1 server key 31 | #KeyRegenerationInterval 1h 32 | #ServerKeyBits 768 33 | 34 | # Logging 35 | # obsoletes QuietMode and FascistLogging 36 | #SyslogFacility AUTH 37 | #LogLevel INFO 38 | 39 | # Authentication: 40 | 41 | #LoginGraceTime 2m 42 | PermitRootLogin yes 43 | #StrictModes yes 44 | #MaxAuthTries 6 45 | 46 | #RSAAuthentication yes 47 | #PubkeyAuthentication yes 48 | #AuthorizedKeysFile .ssh/authorized_keys 49 | 50 | # For this to work you will also need host keys in /etc/ssh/ssh_known_hosts 51 | #RhostsRSAAuthentication no 52 | # similar for protocol version 2 53 | #HostbasedAuthentication no 54 | # Change to yes if you don't trust ~/.ssh/known_hosts for 55 | # RhostsRSAAuthentication and HostbasedAuthentication 56 | #IgnoreUserKnownHosts no 57 | # Don't read the user's ~/.rhosts and ~/.shosts files 58 | #IgnoreRhosts yes 59 | 60 | # Change to yes to enable built-in password authentication. 61 | #PasswordAuthentication no 62 | #PermitEmptyPasswords no 63 | 64 | # Change to no to disable PAM authentication 65 | #ChallengeResponseAuthentication yes 66 | 67 | # Kerberos options 68 | #KerberosAuthentication no 69 | #KerberosOrLocalPasswd yes 70 | #KerberosTicketCleanup yes 71 | #KerberosGetAFSToken no 72 | 73 | # GSSAPI options 74 | #GSSAPIAuthentication no 75 | #GSSAPICleanupCredentials yes 76 | 77 | # Set this to 'no' to disable PAM authentication, account processing, 78 | # and session processing. If this is enabled, PAM authentication will 79 | # be allowed through the ChallengeResponseAuthentication and 80 | # PasswordAuthentication. Depending on your PAM configuration, 81 | # PAM authentication via ChallengeResponseAuthentication may bypass 82 | PermitRootLogin yes 83 | # If you just want the PAM account and session checks to run without 84 | # PAM authentication, then enable this but set PasswordAuthentication 85 | # and ChallengeResponseAuthentication to 'no'. 86 | #UsePAM yes 87 | 88 | #AllowTcpForwarding yes 89 | #GatewayPorts no 90 | #X11Forwarding yes 91 | #X11DisplayOffset 10 92 | #X11UseLocalhost yes 93 | #PrintMotd yes 94 | #PrintLastLog yes 95 | #TCPKeepAlive yes 96 | #UseLogin no 97 | #UsePrivilegeSeparation yes 98 | #PermitUserEnvironment no 99 | #Compression delayed 100 | #ClientAliveInterval 0 101 | #ClientAliveCountMax 3 102 | #UseDNS yes 103 | #PidFile /var/run/sshd.pid 104 | #MaxStartups 10 105 | #PermitTunnel no 106 | 107 | # no default banner path 108 | #Banner /some/path 109 | 110 | # override default of no subsystems 111 | Subsystem sftp /usr/libexec/sftp-server 112 | 113 | # Example of overriding settings on a per-user basis 114 | #Match User anoncvs 115 | # X11Forwarding no 116 | # AllowTcpForwarding no 117 | # ForceCommand cvs server 118 | -------------------------------------------------------------------------------- /targets/rescue/Files/etc/ttys: -------------------------------------------------------------------------------- 1 | # 2 | # $FreeBSD: releng/8.1/tools/tools/nanobsd/rescue/Files/etc/ttys 188482 2009-02-11 12:15:35Z mr $ 3 | # @(#)ttys 5.1 (Berkeley) 4/17/89 4 | # 5 | # This file specifies various information about terminals on the system. 6 | # It is used by several different programs. Common entries for the 7 | # various columns include: 8 | # 9 | # name The name of the terminal device. 10 | # 11 | # getty The program to start running on the terminal. Typically a 12 | # getty program, as the name implies. Other common entries 13 | # include none, when no getty is needed, and xdm, to start the 14 | # X Window System. 15 | # 16 | # type The initial terminal type for this port. For hardwired 17 | # terminal lines, this will contain the type of terminal used. 18 | # For virtual consoles, the correct type is typically cons25, but 19 | # vt220 will work better if you need interoperability with other 20 | # systems like Solaris or GNU/Linux. 21 | # Other common values include network for network connections on 22 | # pseudo-terminals, dialup for incoming modem ports, and unknown 23 | # when the terminal type cannot be predetermined. 24 | # 25 | # status Must be on or off. If on, init will run the getty program on 26 | # the specified port. If the word "secure" appears, this tty 27 | # allows root login. 28 | # 29 | # name getty type status comments 30 | # 31 | # If console is marked "insecure", then init will ask for the root password 32 | # when going to single-user mode. 33 | console none unknown off secure 34 | # 35 | ttyv0 "/usr/libexec/getty Pc" cons25 on secure 36 | # Virtual terminals 37 | ttyv1 "/usr/libexec/getty Pc" cons25 on secure 38 | ttyv2 "/usr/libexec/getty Pc" cons25 on secure 39 | ttyv3 "/usr/libexec/getty Pc" cons25 off secure 40 | ttyv4 "/usr/libexec/getty Pc" cons25 off secure 41 | ttyv5 "/usr/libexec/getty Pc" cons25 off secure 42 | ttyv6 "/usr/libexec/getty Pc" cons25 off secure 43 | ttyv7 "/usr/libexec/getty Pc" cons25 off secure 44 | ttyv8 "/usr/local/bin/xdm -nodaemon" xterm off secure 45 | # Serial terminals 46 | # The 'dialup' keyword identifies dialin lines to login, fingerd etc. 47 | ttyu0 "/usr/libexec/getty std.115200" xterm-color on secure 48 | ttyu1 "/usr/libexec/getty std.9600" dialup off secure 49 | ttyu2 "/usr/libexec/getty std.9600" dialup off secure 50 | ttyu3 "/usr/libexec/getty std.9600" dialup off secure 51 | # Dumb console 52 | dcons "/usr/libexec/getty std.9600" vt100 off secure 53 | # Pseudo terminals 54 | ttyp0 none network 55 | ttyp1 none network 56 | ttyp2 none network 57 | ttyp3 none network 58 | ttyp4 none network 59 | ttyp5 none network 60 | ttyp6 none network 61 | ttyp7 none network 62 | ttyp8 none network 63 | ttyp9 none network 64 | ttypa none network 65 | ttypb none network 66 | ttypc none network 67 | ttypd none network 68 | ttype none network 69 | ttypf none network 70 | ttypg none network 71 | ttyph none network 72 | ttypi none network 73 | ttypj none network 74 | ttypk none network 75 | ttypl none network 76 | ttypm none network 77 | ttypn none network 78 | ttypo none network 79 | ttypp none network 80 | ttypq none network 81 | ttypr none network 82 | ttyps none network 83 | ttypt none network 84 | ttypu none network 85 | ttypv none network 86 | ttyq0 none network 87 | ttyq1 none network 88 | ttyq2 none network 89 | ttyq3 none network 90 | ttyq4 none network 91 | ttyq5 none network 92 | ttyq6 none network 93 | ttyq7 none network 94 | ttyq8 none network 95 | ttyq9 none network 96 | ttyqa none network 97 | ttyqb none network 98 | ttyqc none network 99 | ttyqd none network 100 | ttyqe none network 101 | ttyqf none network 102 | ttyqg none network 103 | ttyqh none network 104 | ttyqi none network 105 | ttyqj none network 106 | ttyqk none network 107 | ttyql none network 108 | ttyqm none network 109 | ttyqn none network 110 | ttyqo none network 111 | ttyqp none network 112 | ttyqq none network 113 | ttyqr none network 114 | ttyqs none network 115 | ttyqt none network 116 | ttyqu none network 117 | ttyqv none network 118 | ttyr0 none network 119 | ttyr1 none network 120 | ttyr2 none network 121 | ttyr3 none network 122 | ttyr4 none network 123 | ttyr5 none network 124 | ttyr6 none network 125 | ttyr7 none network 126 | ttyr8 none network 127 | ttyr9 none network 128 | ttyra none network 129 | ttyrb none network 130 | ttyrc none network 131 | ttyrd none network 132 | ttyre none network 133 | ttyrf none network 134 | ttyrg none network 135 | ttyrh none network 136 | ttyri none network 137 | ttyrj none network 138 | ttyrk none network 139 | ttyrl none network 140 | ttyrm none network 141 | ttyrn none network 142 | ttyro none network 143 | ttyrp none network 144 | ttyrq none network 145 | ttyrr none network 146 | ttyrs none network 147 | ttyrt none network 148 | ttyru none network 149 | ttyrv none network 150 | ttys0 none network 151 | ttys1 none network 152 | ttys2 none network 153 | ttys3 none network 154 | ttys4 none network 155 | ttys5 none network 156 | ttys6 none network 157 | ttys7 none network 158 | ttys8 none network 159 | ttys9 none network 160 | ttysa none network 161 | ttysb none network 162 | ttysc none network 163 | ttysd none network 164 | ttyse none network 165 | ttysf none network 166 | ttysg none network 167 | ttysh none network 168 | ttysi none network 169 | ttysj none network 170 | ttysk none network 171 | ttysl none network 172 | ttysm none network 173 | ttysn none network 174 | ttyso none network 175 | ttysp none network 176 | ttysq none network 177 | ttysr none network 178 | ttyss none network 179 | ttyst none network 180 | ttysu none network 181 | ttysv none network 182 | ttyP0 none network 183 | ttyP1 none network 184 | ttyP2 none network 185 | ttyP3 none network 186 | ttyP4 none network 187 | ttyP5 none network 188 | ttyP6 none network 189 | ttyP7 none network 190 | ttyP8 none network 191 | ttyP9 none network 192 | ttyPa none network 193 | ttyPb none network 194 | ttyPc none network 195 | ttyPd none network 196 | ttyPe none network 197 | ttyPf none network 198 | ttyPg none network 199 | ttyPh none network 200 | ttyPi none network 201 | ttyPj none network 202 | ttyPk none network 203 | ttyPl none network 204 | ttyPm none network 205 | ttyPn none network 206 | ttyPo none network 207 | ttyPp none network 208 | ttyPq none network 209 | ttyPr none network 210 | ttyPs none network 211 | ttyPt none network 212 | ttyPu none network 213 | ttyPv none network 214 | ttyQ0 none network 215 | ttyQ1 none network 216 | ttyQ2 none network 217 | ttyQ3 none network 218 | ttyQ4 none network 219 | ttyQ5 none network 220 | ttyQ6 none network 221 | ttyQ7 none network 222 | ttyQ8 none network 223 | ttyQ9 none network 224 | ttyQa none network 225 | ttyQb none network 226 | ttyQc none network 227 | ttyQd none network 228 | ttyQe none network 229 | ttyQf none network 230 | ttyQg none network 231 | ttyQh none network 232 | ttyQi none network 233 | ttyQj none network 234 | ttyQk none network 235 | ttyQl none network 236 | ttyQm none network 237 | ttyQn none network 238 | ttyQo none network 239 | ttyQp none network 240 | ttyQq none network 241 | ttyQr none network 242 | ttyQs none network 243 | ttyQt none network 244 | ttyQu none network 245 | ttyQv none network 246 | ttyR0 none network 247 | ttyR1 none network 248 | ttyR2 none network 249 | ttyR3 none network 250 | ttyR4 none network 251 | ttyR5 none network 252 | ttyR6 none network 253 | ttyR7 none network 254 | ttyR8 none network 255 | ttyR9 none network 256 | ttyRa none network 257 | ttyRb none network 258 | ttyRc none network 259 | ttyRd none network 260 | ttyRe none network 261 | ttyRf none network 262 | ttyRg none network 263 | ttyRh none network 264 | ttyRi none network 265 | ttyRj none network 266 | ttyRk none network 267 | ttyRl none network 268 | ttyRm none network 269 | ttyRn none network 270 | ttyRo none network 271 | ttyRp none network 272 | ttyRq none network 273 | ttyRr none network 274 | ttyRs none network 275 | ttyRt none network 276 | ttyRu none network 277 | ttyRv none network 278 | ttyS0 none network 279 | ttyS1 none network 280 | ttyS2 none network 281 | ttyS3 none network 282 | ttyS4 none network 283 | ttyS5 none network 284 | ttyS6 none network 285 | ttyS7 none network 286 | ttyS8 none network 287 | ttyS9 none network 288 | ttySa none network 289 | ttySb none network 290 | ttySc none network 291 | ttySd none network 292 | ttySe none network 293 | ttySf none network 294 | ttySg none network 295 | ttySh none network 296 | ttySi none network 297 | ttySj none network 298 | ttySk none network 299 | ttySl none network 300 | ttySm none network 301 | ttySn none network 302 | ttySo none network 303 | ttySp none network 304 | ttySq none network 305 | ttySr none network 306 | ttySs none network 307 | ttySt none network 308 | ttySu none network 309 | ttySv none network 310 | ttyl0 none network 311 | ttyl1 none network 312 | ttyl2 none network 313 | ttyl3 none network 314 | ttyl4 none network 315 | ttyl5 none network 316 | ttyl6 none network 317 | ttyl7 none network 318 | ttyl8 none network 319 | ttyl9 none network 320 | ttyla none network 321 | ttylb none network 322 | ttylc none network 323 | ttyld none network 324 | ttyle none network 325 | ttylf none network 326 | ttylg none network 327 | ttylh none network 328 | ttyli none network 329 | ttylj none network 330 | ttylk none network 331 | ttyll none network 332 | ttylm none network 333 | ttyln none network 334 | ttylo none network 335 | ttylp none network 336 | ttylq none network 337 | ttylr none network 338 | ttyls none network 339 | ttylt none network 340 | ttylu none network 341 | ttylv none network 342 | ttym0 none network 343 | ttym1 none network 344 | ttym2 none network 345 | ttym3 none network 346 | ttym4 none network 347 | ttym5 none network 348 | ttym6 none network 349 | ttym7 none network 350 | ttym8 none network 351 | ttym9 none network 352 | ttyma none network 353 | ttymb none network 354 | ttymc none network 355 | ttymd none network 356 | ttyme none network 357 | ttymf none network 358 | ttymg none network 359 | ttymh none network 360 | ttymi none network 361 | ttymj none network 362 | ttymk none network 363 | ttyml none network 364 | ttymm none network 365 | ttymn none network 366 | ttymo none network 367 | ttymp none network 368 | ttymq none network 369 | ttymr none network 370 | ttyms none network 371 | ttymt none network 372 | ttymu none network 373 | ttymv none network 374 | ttyn0 none network 375 | ttyn1 none network 376 | ttyn2 none network 377 | ttyn3 none network 378 | ttyn4 none network 379 | ttyn5 none network 380 | ttyn6 none network 381 | ttyn7 none network 382 | ttyn8 none network 383 | ttyn9 none network 384 | ttyna none network 385 | ttynb none network 386 | ttync none network 387 | ttynd none network 388 | ttyne none network 389 | ttynf none network 390 | ttyng none network 391 | ttynh none network 392 | ttyni none network 393 | ttynj none network 394 | ttynk none network 395 | ttynl none network 396 | ttynm none network 397 | ttynn none network 398 | ttyno none network 399 | ttynp none network 400 | ttynq none network 401 | ttynr none network 402 | ttyns none network 403 | ttynt none network 404 | ttynu none network 405 | ttynv none network 406 | ttyo0 none network 407 | ttyo1 none network 408 | ttyo2 none network 409 | ttyo3 none network 410 | ttyo4 none network 411 | ttyo5 none network 412 | ttyo6 none network 413 | ttyo7 none network 414 | ttyo8 none network 415 | ttyo9 none network 416 | ttyoa none network 417 | ttyob none network 418 | ttyoc none network 419 | ttyod none network 420 | ttyoe none network 421 | ttyof none network 422 | ttyog none network 423 | ttyoh none network 424 | ttyoi none network 425 | ttyoj none network 426 | ttyok none network 427 | ttyol none network 428 | ttyom none network 429 | ttyon none network 430 | ttyoo none network 431 | ttyop none network 432 | ttyoq none network 433 | ttyor none network 434 | ttyos none network 435 | ttyot none network 436 | ttyou none network 437 | ttyov none network 438 | ttyL0 none network 439 | ttyL1 none network 440 | ttyL2 none network 441 | ttyL3 none network 442 | ttyL4 none network 443 | ttyL5 none network 444 | ttyL6 none network 445 | ttyL7 none network 446 | ttyL8 none network 447 | ttyL9 none network 448 | ttyLa none network 449 | ttyLb none network 450 | ttyLc none network 451 | ttyLd none network 452 | ttyLe none network 453 | ttyLf none network 454 | ttyLg none network 455 | ttyLh none network 456 | ttyLi none network 457 | ttyLj none network 458 | ttyLk none network 459 | ttyLl none network 460 | ttyLm none network 461 | ttyLn none network 462 | ttyLo none network 463 | ttyLp none network 464 | ttyLq none network 465 | ttyLr none network 466 | ttyLs none network 467 | ttyLt none network 468 | ttyLu none network 469 | ttyLv none network 470 | ttyM0 none network 471 | ttyM1 none network 472 | ttyM2 none network 473 | ttyM3 none network 474 | ttyM4 none network 475 | ttyM5 none network 476 | ttyM6 none network 477 | ttyM7 none network 478 | ttyM8 none network 479 | ttyM9 none network 480 | ttyMa none network 481 | ttyMb none network 482 | ttyMc none network 483 | ttyMd none network 484 | ttyMe none network 485 | ttyMf none network 486 | ttyMg none network 487 | ttyMh none network 488 | ttyMi none network 489 | ttyMj none network 490 | ttyMk none network 491 | ttyMl none network 492 | ttyMm none network 493 | ttyMn none network 494 | ttyMo none network 495 | ttyMp none network 496 | ttyMq none network 497 | ttyMr none network 498 | ttyMs none network 499 | ttyMt none network 500 | ttyMu none network 501 | ttyMv none network 502 | ttyN0 none network 503 | ttyN1 none network 504 | ttyN2 none network 505 | ttyN3 none network 506 | ttyN4 none network 507 | ttyN5 none network 508 | ttyN6 none network 509 | ttyN7 none network 510 | ttyN8 none network 511 | ttyN9 none network 512 | ttyNa none network 513 | ttyNb none network 514 | ttyNc none network 515 | ttyNd none network 516 | ttyNe none network 517 | ttyNf none network 518 | ttyNg none network 519 | ttyNh none network 520 | ttyNi none network 521 | ttyNj none network 522 | ttyNk none network 523 | ttyNl none network 524 | ttyNm none network 525 | ttyNn none network 526 | ttyNo none network 527 | ttyNp none network 528 | ttyNq none network 529 | ttyNr none network 530 | ttyNs none network 531 | ttyNt none network 532 | ttyNu none network 533 | ttyNv none network 534 | ttyO0 none network 535 | ttyO1 none network 536 | ttyO2 none network 537 | ttyO3 none network 538 | ttyO4 none network 539 | ttyO5 none network 540 | ttyO6 none network 541 | ttyO7 none network 542 | ttyO8 none network 543 | ttyO9 none network 544 | ttyOa none network 545 | ttyOb none network 546 | ttyOc none network 547 | ttyOd none network 548 | ttyOe none network 549 | ttyOf none network 550 | ttyOg none network 551 | ttyOh none network 552 | ttyOi none network 553 | ttyOj none network 554 | ttyOk none network 555 | ttyOl none network 556 | ttyOm none network 557 | ttyOn none network 558 | ttyOo none network 559 | ttyOp none network 560 | ttyOq none network 561 | ttyOr none network 562 | ttyOs none network 563 | ttyOt none network 564 | ttyOu none network 565 | ttyOv none network 566 | -------------------------------------------------------------------------------- /targets/rescue/Files/root/.cshrc: -------------------------------------------------------------------------------- 1 | # $FreeBSD: releng/8.1/tools/tools/nanobsd/rescue/Files/root/.cshrc 188482 2009-02-11 12:15:35Z mr $ 2 | # 3 | #csh .cshrc file 4 | 5 | alias a alias 6 | a h history 25 7 | a j jobs -l 8 | a la ls -a 9 | a lf ls -FA 10 | a ll ls -lA 11 | a lm 'll | more' 12 | a m more 13 | 14 | set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin /usr/X11R6/bin /usr/local/jdk1.6.0/bin /usr/local/jdk1.5.0/bin $HOME/bin) 15 | setenv MANPATH "/usr/share/man:/usr/X11R6/man:/usr/local/man" 16 | 17 | setenv PAGER more 18 | setenv EDITOR vi 19 | setenv BLOCKSIZE K 20 | setenv FTP_PASSIVE_MODE YES 21 | #setenv JAVA_HOME /usr/local/jdk1.6.0 22 | #setenv JDK_HOME /usr/local/jdk1.6.0 23 | #setenv JAVA_VERSION 1.5+ 24 | #setenv JAVA_VERSION 1.4 25 | #setenv LANG de_DE.UTF-8 26 | setenv CVS_RSH ssh 27 | 28 | if ($?prompt) then 29 | # An interactive shell -- set some stuff up 30 | set prompt = "`hostname -s`# " 31 | set filec 32 | set history = 100 33 | set savehist = 100 34 | set mail = (/var/mail/$USER) 35 | set autolist 36 | set matchbeep=ambiguos 37 | set autoexpand 38 | set autocorrect 39 | set ignoreeof 40 | set correct=cmd 41 | endif 42 | -------------------------------------------------------------------------------- /targets/rescue/Files/usr/ports/.keepme: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amishHammer/NanoBSD-NG/437e3a299f7ea6c994f78dc4be9c893e42ab007d/targets/rescue/Files/usr/ports/.keepme -------------------------------------------------------------------------------- /targets/rescue/amd64/RESCUE: -------------------------------------------------------------------------------- 1 | # 2 | # GENERIC -- Generic kernel configuration file for FreeBSD/amd64 3 | # 4 | # For more information on this file, please read the config(5) manual page, 5 | # and/or the handbook section on Kernel Configuration Files: 6 | # 7 | # http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html 8 | # 9 | # The handbook is also available locally in /usr/share/doc/handbook 10 | # if you've installed the doc distribution, otherwise always see the 11 | # FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the 12 | # latest information. 13 | # 14 | # An exhaustive list of options and more detailed explanations of the 15 | # device lines is also present in the ../../conf/NOTES and NOTES files. 16 | # If you are in doubt as to the purpose or necessity of a line, check first 17 | # in NOTES. 18 | # 19 | # $FreeBSD: releng/8.1/tools/tools/nanobsd/rescue/AMD64 190100 2009-03-19 20:33:26Z thompsa $ 20 | 21 | cpu HAMMER 22 | ident RESCUE 23 | 24 | # To statically compile in device wiring instead of /boot/device.hints 25 | #hints "GENERIC.hints" # Default places to look for devices. 26 | 27 | # Use the following to compile in values accessible to the kernel 28 | # through getenv() (or kenv(1) in userland). The format of the file 29 | # is 'variable=value', see kenv(1) 30 | # 31 | # env "GENERIC.env" 32 | 33 | makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols 34 | 35 | options SCHED_ULE # ULE scheduler 36 | options PREEMPTION # Enable kernel thread preemption 37 | options INET # InterNETworking 38 | options INET6 # IPv6 communications protocols 39 | options SCTP # Stream Control Transmission Protocol 40 | options FFS # Berkeley Fast Filesystem 41 | options SOFTUPDATES # Enable FFS soft updates support 42 | options UFS_ACL # Support for access control lists 43 | options UFS_DIRHASH # Improve performance on big directories 44 | options UFS_GJOURNAL # Enable gjournal-based UFS journaling 45 | options MD_ROOT # MD is a potential root device 46 | options NFSCLIENT # Network Filesystem Client 47 | options NFSSERVER # Network Filesystem Server 48 | options NFSLOCKD # Network Lock Manager 49 | options NFS_ROOT # NFS usable as /, requires NFSCLIENT 50 | options MSDOSFS # MSDOS Filesystem 51 | options CD9660 # ISO 9660 Filesystem 52 | options PROCFS # Process filesystem (requires PSEUDOFS) 53 | options PSEUDOFS # Pseudo-filesystem framework 54 | options GEOM_PART_GPT # GUID Partition Tables. 55 | options GEOM_LABEL # Provides labelization 56 | options COMPAT_43TTY # BSD 4.3 TTY compat (sgtty) 57 | options COMPAT_IA32 # Compatible with i386 binaries 58 | options COMPAT_FREEBSD4 # Compatible with FreeBSD4 59 | options COMPAT_FREEBSD5 # Compatible with FreeBSD5 60 | options COMPAT_FREEBSD6 # Compatible with FreeBSD6 61 | options COMPAT_FREEBSD7 # Compatible with FreeBSD7 62 | options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI 63 | options KTRACE # ktrace(1) support 64 | options STACK # stack(9) support 65 | options SYSVSHM # SYSV-style shared memory 66 | options SYSVMSG # SYSV-style message queues 67 | options SYSVSEM # SYSV-style semaphores 68 | options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions 69 | options KBD_INSTALL_CDEV # install a CDEV entry in /dev 70 | options STOP_NMI # Stop CPUS using NMI instead of IPI 71 | options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) 72 | options AUDIT # Security event auditing 73 | #options KDTRACE_FRAME # Ensure frames are compiled in 74 | #options KDTRACE_HOOKS # Kernel DTrace hooks 75 | 76 | # Debugging for use in -current 77 | options KDB # Enable kernel debugger support. 78 | options DDB # Support DDB. 79 | options GDB # Support remote GDB. 80 | #options INVARIANTS # Enable calls of extra sanity checking 81 | #options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS 82 | #options WITNESS # Enable checks to detect deadlocks and cycles 83 | #options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed 84 | 85 | # Make an SMP-capable kernel by default 86 | options SMP # Symmetric MultiProcessor Kernel 87 | 88 | # CPU frequency control 89 | device cpufreq 90 | 91 | # Bus support. 92 | device acpi 93 | device pci 94 | 95 | # Floppy drives 96 | device fdc 97 | 98 | # ATA and ATAPI devices 99 | device ata 100 | device atadisk # ATA disk drives 101 | device ataraid # ATA RAID drives 102 | device atapicd # ATAPI CDROM drives 103 | device atapifd # ATAPI floppy drives 104 | device atapist # ATAPI tape drives 105 | options ATA_STATIC_ID # Static device numbering 106 | 107 | # SCSI Controllers 108 | device ahc # AHA2940 and onboard AIC7xxx devices 109 | options AHC_REG_PRETTY_PRINT # Print register bitfields in debug 110 | # output. Adds ~128k to driver. 111 | device ahd # AHA39320/29320 and onboard AIC79xx devices 112 | options AHD_REG_PRETTY_PRINT # Print register bitfields in debug 113 | # output. Adds ~215k to driver. 114 | device amd # AMD 53C974 (Tekram DC-390(T)) 115 | device hptiop # Highpoint RocketRaid 3xxx series 116 | device isp # Qlogic family 117 | #device ispfw # Firmware for QLogic HBAs- normally a module 118 | device mpt # LSI-Logic MPT-Fusion 119 | #device ncr # NCR/Symbios Logic 120 | device sym # NCR/Symbios Logic (newer chipsets + those of `ncr') 121 | device trm # Tekram DC395U/UW/F DC315U adapters 122 | 123 | device adv # Advansys SCSI adapters 124 | device adw # Advansys wide SCSI adapters 125 | device aic # Adaptec 15[012]x SCSI adapters, AIC-6[23]60. 126 | device bt # Buslogic/Mylex MultiMaster SCSI adapters 127 | 128 | # SCSI peripherals 129 | device scbus # SCSI bus (required for SCSI) 130 | device ch # SCSI media changers 131 | device da # Direct Access (disks) 132 | device sa # Sequential Access (tape etc) 133 | device cd # CD 134 | device pass # Passthrough device (direct SCSI access) 135 | device ses # SCSI Environmental Services (and SAF-TE) 136 | 137 | # RAID controllers interfaced to the SCSI subsystem 138 | device amr # AMI MegaRAID 139 | device arcmsr # Areca SATA II RAID 140 | #XXX it is not 64-bit clean, -scottl 141 | #device asr # DPT SmartRAID V, VI and Adaptec SCSI RAID 142 | device ciss # Compaq Smart RAID 5* 143 | device dpt # DPT Smartcache III, IV - See NOTES for options 144 | device hptmv # Highpoint RocketRAID 182x 145 | device hptrr # Highpoint RocketRAID 17xx, 22xx, 23xx, 25xx 146 | device iir # Intel Integrated RAID 147 | device ips # IBM (Adaptec) ServeRAID 148 | device mly # Mylex AcceleRAID/eXtremeRAID 149 | device twa # 3ware 9000 series PATA/SATA RAID 150 | 151 | # RAID controllers 152 | device aac # Adaptec FSA RAID 153 | device aacp # SCSI passthrough for aac (requires CAM) 154 | device ida # Compaq Smart RAID 155 | device mfi # LSI MegaRAID SAS 156 | device mlx # Mylex DAC960 family 157 | #XXX pointer/int warnings 158 | #device pst # Promise Supertrak SX6000 159 | device twe # 3ware ATA RAID 160 | 161 | # atkbdc0 controls both the keyboard and the PS/2 mouse 162 | device atkbdc # AT keyboard controller 163 | device atkbd # AT keyboard 164 | device psm # PS/2 mouse 165 | 166 | device kbdmux # keyboard multiplexer 167 | 168 | device vga # VGA video card driver 169 | 170 | device splash # Splash screen and screen saver support 171 | 172 | # syscons is the default console driver, resembling an SCO console 173 | device sc 174 | 175 | device agp # support several AGP chipsets 176 | 177 | # PCCARD (PCMCIA) support 178 | # PCMCIA and cardbus bridge support 179 | device cbb # cardbus (yenta) bridge 180 | device pccard # PC Card (16-bit) bus 181 | device cardbus # CardBus (32-bit) bus 182 | 183 | # Serial (COM) ports 184 | device uart # Generic UART driver 185 | 186 | # Parallel port 187 | device ppc 188 | device ppbus # Parallel port bus (required) 189 | device lpt # Printer 190 | device plip # TCP/IP over parallel 191 | device ppi # Parallel port interface device 192 | #device vpo # Requires scbus and da 193 | 194 | # If you've got a "dumb" serial or parallel PCI card that is 195 | # supported by the puc(4) glue driver, uncomment the following 196 | # line to enable it (connects to sio, uart and/or ppc drivers): 197 | #device puc 198 | 199 | # PCI Ethernet NICs. 200 | device de # DEC/Intel DC21x4x (``Tulip'') 201 | device em # Intel PRO/1000 Gigabit Ethernet Family 202 | device igb # Intel PRO/1000 PCIE Server Gigabit Family 203 | device ixgb # Intel PRO/10GbE Ethernet Card 204 | device le # AMD Am7900 LANCE and Am79C9xx PCnet 205 | device ti # Alteon Networks Tigon I/II gigabit Ethernet 206 | device txp # 3Com 3cR990 (``Typhoon'') 207 | device vx # 3Com 3c590, 3c595 (``Vortex'') 208 | 209 | # PCI Ethernet NICs that use the common MII bus controller code. 210 | # NOTE: Be sure to keep the 'device miibus' line in order to use these NICs! 211 | device miibus # MII bus support 212 | device ae # Attansic/Atheros L2 FastEthernet 213 | device age # Attansic/Atheros L1 Gigabit Ethernet 214 | device ale # Atheros AR8121/AR8113/AR8114 Ethernet 215 | device bce # Broadcom BCM5706/BCM5708 Gigabit Ethernet 216 | device bfe # Broadcom BCM440x 10/100 Ethernet 217 | device bge # Broadcom BCM570xx Gigabit Ethernet 218 | device dc # DEC/Intel 21143 and various workalikes 219 | device et # Agere ET1310 10/100/Gigabit Ethernet 220 | device fxp # Intel EtherExpress PRO/100B (82557, 82558) 221 | device jme # JMicron JMC250 Gigabit/JMC260 Fast Ethernet 222 | device lge # Level 1 LXT1001 gigabit Ethernet 223 | device msk # Marvell/SysKonnect Yukon II Gigabit Ethernet 224 | device nfe # nVidia nForce MCP on-board Ethernet 225 | device nge # NatSemi DP83820 gigabit Ethernet 226 | #device nve # nVidia nForce MCP on-board Ethernet Networking 227 | device pcn # AMD Am79C97x PCI 10/100 (precedence over 'le') 228 | device re # RealTek 8139C+/8169/8169S/8110S 229 | device rl # RealTek 8129/8139 230 | device sf # Adaptec AIC-6915 (``Starfire'') 231 | device sis # Silicon Integrated Systems SiS 900/SiS 7016 232 | device sk # SysKonnect SK-984x & SK-982x gigabit Ethernet 233 | device ste # Sundance ST201 (D-Link DFE-550TX) 234 | device stge # Sundance/Tamarack TC9021 gigabit Ethernet 235 | device tl # Texas Instruments ThunderLAN 236 | device tx # SMC EtherPower II (83c170 ``EPIC'') 237 | device vge # VIA VT612x gigabit Ethernet 238 | device vr # VIA Rhine, Rhine II 239 | device wb # Winbond W89C840F 240 | device xl # 3Com 3c90x (``Boomerang'', ``Cyclone'') 241 | 242 | # ISA Ethernet NICs. pccard NICs included. 243 | device cs # Crystal Semiconductor CS89x0 NIC 244 | # 'device ed' requires 'device miibus' 245 | device ed # NE[12]000, SMC Ultra, 3c503, DS8390 cards 246 | device ex # Intel EtherExpress Pro/10 and Pro/10+ 247 | device ep # Etherlink III based cards 248 | device fe # Fujitsu MB8696x based cards 249 | device sn # SMC's 9000 series of Ethernet chips 250 | device xe # Xircom pccard Ethernet 251 | 252 | # Wireless NIC cards 253 | device wlan # 802.11 support 254 | options IEEE80211_DEBUG # enable debug msgs 255 | options IEEE80211_AMPDU_AGE # age frames in AMPDU reorder q's 256 | device wlan_wep # 802.11 WEP support 257 | device wlan_ccmp # 802.11 CCMP support 258 | device wlan_tkip # 802.11 TKIP support 259 | device wlan_amrr # AMRR transmit rate control algorithm 260 | device an # Aironet 4500/4800 802.11 wireless NICs. 261 | device ath # Atheros pci/cardbus NIC's 262 | device ath_hal # pci/cardbus chip support 263 | options AH_SUPPORT_AR5416 # enable AR5416 tx/rx descriptors 264 | device ath_rate_sample # SampleRate tx rate control for ath 265 | device ral # Ralink Technology RT2500 wireless NICs. 266 | device wi # WaveLAN/Intersil/Symbol 802.11 wireless NICs. 267 | 268 | # Pseudo devices. 269 | device loop # Network loopback 270 | device random # Entropy device 271 | device ether # Ethernet support 272 | device tun # Packet tunnel. 273 | device pty # BSD-style compatibility pseudo ttys 274 | device md # Memory "disks" 275 | device gif # IPv6 and IPv4 tunneling 276 | device faith # IPv6-to-IPv4 relaying (translation) 277 | device firmware # firmware assist module 278 | 279 | # The `bpf' device enables the Berkeley Packet Filter. 280 | # Be aware of the administrative consequences of enabling this! 281 | # Note that 'bpf' is required for DHCP. 282 | device bpf # Berkeley packet filter 283 | 284 | # USB support 285 | device uhci # UHCI PCI->USB interface 286 | device ohci # OHCI PCI->USB interface 287 | device ehci # EHCI PCI->USB interface (USB 2.0) 288 | device usb # USB Bus (required) 289 | #device udbp # USB Double Bulk Pipe devices 290 | device ugen # Generic 291 | device uhid # "Human Interface Devices" 292 | device ukbd # Keyboard 293 | device ulpt # Printer 294 | device umass # Disks/Mass storage - Requires scbus and da 295 | device ums # Mouse 296 | device ural # Ralink Technology RT2500USB wireless NICs 297 | device rum # Ralink Technology RT2501USB wireless NICs 298 | device urio # Diamond Rio 500 MP3 player 299 | # USB Serial devices 300 | device ucom # Generic com ttys 301 | device uark # Technologies ARK3116 based serial adapters 302 | device ubsa # Belkin F5U103 and compatible serial adapters 303 | device uftdi # For FTDI usb serial adapters 304 | device uipaq # Some WinCE based devices 305 | device uplcom # Prolific PL-2303 serial adapters 306 | device uslcom # SI Labs CP2101/CP2102 serial adapters 307 | device uvisor # Visor and Palm devices 308 | device uvscom # USB serial support for DDI pocket's PHS 309 | # USB Ethernet, requires miibus 310 | device aue # ADMtek USB Ethernet 311 | device axe # ASIX Electronics USB Ethernet 312 | device cdce # Generic USB over Ethernet 313 | device cue # CATC USB Ethernet 314 | device kue # Kawasaki LSI USB Ethernet 315 | device rue # RealTek RTL8150 USB Ethernet 316 | device udav # Davicom DM9601E USB 317 | 318 | # FireWire support 319 | device firewire # FireWire bus code 320 | device sbp # SCSI over FireWire (Requires scbus and da) 321 | device fwe # Ethernet over FireWire (non-standard!) 322 | device fwip # IP over FireWire (RFC 2734,3146) 323 | device dcons # Dumb console driver 324 | device dcons_crom # Configuration ROM for dcons 325 | -------------------------------------------------------------------------------- /targets/rescue/amd64/nanobsd.conf: -------------------------------------------------------------------------------- 1 | NANO_NAME=rescue_isoamd64 2 | 3 | -------------------------------------------------------------------------------- /targets/rescue/i386/RESCUE: -------------------------------------------------------------------------------- 1 | # 2 | # GENERIC -- Generic kernel configuration file for FreeBSD/i386 3 | # 4 | # For more information on this file, please read the config(5) manual page, 5 | # and/or the handbook section on Kernel Configuration Files: 6 | # 7 | # http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html 8 | # 9 | # The handbook is also available locally in /usr/share/doc/handbook 10 | # if you've installed the doc distribution, otherwise always see the 11 | # FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the 12 | # latest information. 13 | # 14 | # An exhaustive list of options and more detailed explanations of the 15 | # device lines is also present in the ../../conf/NOTES and NOTES files. 16 | # If you are in doubt as to the purpose or necessity of a line, check first 17 | # in NOTES. 18 | # 19 | # $FreeBSD: releng/8.1/tools/tools/nanobsd/rescue/I386 190100 2009-03-19 20:33:26Z thompsa $ 20 | 21 | cpu I486_CPU 22 | cpu I586_CPU 23 | cpu I686_CPU 24 | ident RESCUE 25 | 26 | # To statically compile in device wiring instead of /boot/device.hints 27 | #hints "GENERIC.hints" # Default places to look for devices. 28 | 29 | # Use the following to compile in values accessible to the kernel 30 | # through getenv() (or kenv(1) in userland). The format of the file 31 | # is 'variable=value', see kenv(1) 32 | # 33 | # env "GENERIC.env" 34 | 35 | makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols 36 | 37 | options SCHED_ULE # ULE scheduler 38 | options PREEMPTION # Enable kernel thread preemption 39 | options INET # InterNETworking 40 | options INET6 # IPv6 communications protocols 41 | options SCTP # Stream Control Transmission Protocol 42 | options FFS # Berkeley Fast Filesystem 43 | options SOFTUPDATES # Enable FFS soft updates support 44 | options UFS_ACL # Support for access control lists 45 | options UFS_DIRHASH # Improve performance on big directories 46 | options UFS_GJOURNAL # Enable gjournal-based UFS journaling 47 | options MD_ROOT # MD is a potential root device 48 | options NFSCLIENT # Network Filesystem Client 49 | options NFSSERVER # Network Filesystem Server 50 | options NFSLOCKD # Network Lock Manager 51 | options NFS_ROOT # NFS usable as /, requires NFSCLIENT 52 | options MSDOSFS # MSDOS Filesystem 53 | options CD9660 # ISO 9660 Filesystem 54 | options PROCFS # Process filesystem (requires PSEUDOFS) 55 | options PSEUDOFS # Pseudo-filesystem framework 56 | options GEOM_PART_GPT # GUID Partition Tables. 57 | options GEOM_LABEL # Provides labelization 58 | options COMPAT_43TTY # BSD 4.3 TTY compat (sgtty) 59 | options COMPAT_FREEBSD4 # Compatible with FreeBSD4 60 | options COMPAT_FREEBSD5 # Compatible with FreeBSD5 61 | options COMPAT_FREEBSD6 # Compatible with FreeBSD6 62 | options COMPAT_FREEBSD7 # Compatible with FreeBSD7 63 | options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI 64 | options KTRACE # ktrace(1) support 65 | options STACK # stack(9) support 66 | options SYSVSHM # SYSV-style shared memory 67 | options SYSVMSG # SYSV-style message queues 68 | options SYSVSEM # SYSV-style semaphores 69 | options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions 70 | options KBD_INSTALL_CDEV # install a CDEV entry in /dev 71 | #options STOP_NMI # Stop CPUS using NMI instead of IPI 72 | options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) 73 | options AUDIT # Security event auditing 74 | #options KDTRACE_HOOKS # Kernel DTrace hooks 75 | 76 | # Debugging for use in -current 77 | options KDB # Enable kernel debugger support. 78 | options DDB # Support DDB. 79 | options GDB # Support remote GDB. 80 | #options INVARIANTS # Enable calls of extra sanity checking 81 | #options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS 82 | #options WITNESS # Enable checks to detect deadlocks and cycles 83 | #options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed 84 | 85 | # To make an SMP kernel, the next two lines are needed 86 | options SMP # Symmetric MultiProcessor Kernel 87 | device apic # I/O APIC 88 | 89 | # CPU frequency control 90 | device cpufreq 91 | 92 | # Bus support. 93 | device acpi 94 | device eisa 95 | device pci 96 | 97 | # Floppy drives 98 | device fdc 99 | 100 | # ATA and ATAPI devices 101 | device ata 102 | device atadisk # ATA disk drives 103 | device ataraid # ATA RAID drives 104 | device atapicd # ATAPI CDROM drives 105 | device atapifd # ATAPI floppy drives 106 | device atapist # ATAPI tape drives 107 | options ATA_STATIC_ID # Static device numbering 108 | 109 | # SCSI Controllers 110 | device ahb # EISA AHA1742 family 111 | device ahc # AHA2940 and onboard AIC7xxx devices 112 | options AHC_REG_PRETTY_PRINT # Print register bitfields in debug 113 | # output. Adds ~128k to driver. 114 | device ahd # AHA39320/29320 and onboard AIC79xx devices 115 | options AHD_REG_PRETTY_PRINT # Print register bitfields in debug 116 | # output. Adds ~215k to driver. 117 | device amd # AMD 53C974 (Tekram DC-390(T)) 118 | device hptiop # Highpoint RocketRaid 3xxx series 119 | device isp # Qlogic family 120 | #device ispfw # Firmware for QLogic HBAs- normally a module 121 | device mpt # LSI-Logic MPT-Fusion 122 | #device ncr # NCR/Symbios Logic 123 | device sym # NCR/Symbios Logic (newer chipsets + those of `ncr') 124 | device trm # Tekram DC395U/UW/F DC315U adapters 125 | 126 | device adv # Advansys SCSI adapters 127 | device adw # Advansys wide SCSI adapters 128 | device aha # Adaptec 154x SCSI adapters 129 | device aic # Adaptec 15[012]x SCSI adapters, AIC-6[23]60. 130 | device bt # Buslogic/Mylex MultiMaster SCSI adapters 131 | 132 | device ncv # NCR 53C500 133 | device nsp # Workbit Ninja SCSI-3 134 | device stg # TMC 18C30/18C50 135 | 136 | # SCSI peripherals 137 | device scbus # SCSI bus (required for SCSI) 138 | device ch # SCSI media changers 139 | device da # Direct Access (disks) 140 | device sa # Sequential Access (tape etc) 141 | device cd # CD 142 | device pass # Passthrough device (direct SCSI access) 143 | device ses # SCSI Environmental Services (and SAF-TE) 144 | 145 | # RAID controllers interfaced to the SCSI subsystem 146 | device amr # AMI MegaRAID 147 | device arcmsr # Areca SATA II RAID 148 | device asr # DPT SmartRAID V, VI and Adaptec SCSI RAID 149 | device ciss # Compaq Smart RAID 5* 150 | device dpt # DPT Smartcache III, IV - See NOTES for options 151 | device hptmv # Highpoint RocketRAID 182x 152 | device hptrr # Highpoint RocketRAID 17xx, 22xx, 23xx, 25xx 153 | device iir # Intel Integrated RAID 154 | device ips # IBM (Adaptec) ServeRAID 155 | device mly # Mylex AcceleRAID/eXtremeRAID 156 | device twa # 3ware 9000 series PATA/SATA RAID 157 | 158 | # RAID controllers 159 | device aac # Adaptec FSA RAID 160 | device aacp # SCSI passthrough for aac (requires CAM) 161 | device ida # Compaq Smart RAID 162 | device mfi # LSI MegaRAID SAS 163 | device mlx # Mylex DAC960 family 164 | device pst # Promise Supertrak SX6000 165 | device twe # 3ware ATA RAID 166 | 167 | # atkbdc0 controls both the keyboard and the PS/2 mouse 168 | device atkbdc # AT keyboard controller 169 | device atkbd # AT keyboard 170 | device psm # PS/2 mouse 171 | 172 | device kbdmux # keyboard multiplexer 173 | 174 | device vga # VGA video card driver 175 | 176 | device splash # Splash screen and screen saver support 177 | 178 | # syscons is the default console driver, resembling an SCO console 179 | device sc 180 | 181 | device agp # support several AGP chipsets 182 | 183 | # Power management support (see NOTES for more options) 184 | #device apm 185 | # Add suspend/resume support for the i8254. 186 | device pmtimer 187 | 188 | # PCCARD (PCMCIA) support 189 | # PCMCIA and cardbus bridge support 190 | device cbb # cardbus (yenta) bridge 191 | device pccard # PC Card (16-bit) bus 192 | device cardbus # CardBus (32-bit) bus 193 | 194 | # Serial (COM) ports 195 | device uart # Generic UART driver 196 | 197 | # Parallel port 198 | device ppc 199 | device ppbus # Parallel port bus (required) 200 | device lpt # Printer 201 | device plip # TCP/IP over parallel 202 | device ppi # Parallel port interface device 203 | #device vpo # Requires scbus and da 204 | 205 | # If you've got a "dumb" serial or parallel PCI card that is 206 | # supported by the puc(4) glue driver, uncomment the following 207 | # line to enable it (connects to sio, uart and/or ppc drivers): 208 | #device puc 209 | 210 | # PCI Ethernet NICs. 211 | device de # DEC/Intel DC21x4x (``Tulip'') 212 | device em # Intel PRO/1000 Gigabit Ethernet Family 213 | device igb # Intel PRO/1000 PCIE Server Gigabit Family 214 | device ixgb # Intel PRO/10GbE Ethernet Card 215 | device le # AMD Am7900 LANCE and Am79C9xx PCnet 216 | device ti # Alteon Networks Tigon I/II gigabit Ethernet 217 | device txp # 3Com 3cR990 (``Typhoon'') 218 | device vx # 3Com 3c590, 3c595 (``Vortex'') 219 | 220 | # PCI Ethernet NICs that use the common MII bus controller code. 221 | # NOTE: Be sure to keep the 'device miibus' line in order to use these NICs! 222 | device miibus # MII bus support 223 | device ae # Attansic/Atheros L2 FastEthernet 224 | device age # Attansic/Atheros L1 Gigabit Ethernet 225 | device ale # Atheros AR8121/AR8113/AR8114 Ethernet 226 | device bce # Broadcom BCM5706/BCM5708 Gigabit Ethernet 227 | device bfe # Broadcom BCM440x 10/100 Ethernet 228 | device bge # Broadcom BCM570xx Gigabit Ethernet 229 | device dc # DEC/Intel 21143 and various workalikes 230 | device et # Agere ET1310 10/100/Gigabit Ethernet 231 | device fxp # Intel EtherExpress PRO/100B (82557, 82558) 232 | device jme # JMicron JMC250 Gigabit/JMC260 Fast Ethernet 233 | device lge # Level 1 LXT1001 gigabit Ethernet 234 | device msk # Marvell/SysKonnect Yukon II Gigabit Ethernet 235 | device nfe # nVidia nForce MCP on-board Ethernet 236 | device nge # NatSemi DP83820 gigabit Ethernet 237 | #device nve # nVidia nForce MCP on-board Ethernet Networking 238 | device pcn # AMD Am79C97x PCI 10/100 (precedence over 'le') 239 | device re # RealTek 8139C+/8169/8169S/8110S 240 | device rl # RealTek 8129/8139 241 | device sf # Adaptec AIC-6915 (``Starfire'') 242 | device sis # Silicon Integrated Systems SiS 900/SiS 7016 243 | device sk # SysKonnect SK-984x & SK-982x gigabit Ethernet 244 | device ste # Sundance ST201 (D-Link DFE-550TX) 245 | device stge # Sundance/Tamarack TC9021 gigabit Ethernet 246 | device tl # Texas Instruments ThunderLAN 247 | device tx # SMC EtherPower II (83c170 ``EPIC'') 248 | device vge # VIA VT612x gigabit Ethernet 249 | device vr # VIA Rhine, Rhine II 250 | device wb # Winbond W89C840F 251 | device xl # 3Com 3c90x (``Boomerang'', ``Cyclone'') 252 | 253 | # ISA Ethernet NICs. pccard NICs included. 254 | device cs # Crystal Semiconductor CS89x0 NIC 255 | # 'device ed' requires 'device miibus' 256 | device ed # NE[12]000, SMC Ultra, 3c503, DS8390 cards 257 | device ex # Intel EtherExpress Pro/10 and Pro/10+ 258 | device ep # Etherlink III based cards 259 | device fe # Fujitsu MB8696x based cards 260 | device ie # EtherExpress 8/16, 3C507, StarLAN 10 etc. 261 | device sn # SMC's 9000 series of Ethernet chips 262 | device xe # Xircom pccard Ethernet 263 | 264 | # Wireless NIC cards 265 | device wlan # 802.11 support 266 | options IEEE80211_DEBUG # enable debug msgs 267 | options IEEE80211_AMPDU_AGE # age frames in AMPDU reorder q's 268 | device wlan_wep # 802.11 WEP support 269 | device wlan_ccmp # 802.11 CCMP support 270 | device wlan_tkip # 802.11 TKIP support 271 | device wlan_amrr # AMRR transmit rate control algorithm 272 | device an # Aironet 4500/4800 802.11 wireless NICs. 273 | device ath # Atheros pci/cardbus NIC's 274 | device ath_hal # pci/cardbus chip support 275 | options AH_SUPPORT_AR5416 # enable AR5416 tx/rx descriptors 276 | device ath_rate_sample # SampleRate tx rate control for ath 277 | device ral # Ralink Technology RT2500 wireless NICs. 278 | device wi # WaveLAN/Intersil/Symbol 802.11 wireless NICs. 279 | #device wl # Older non 802.11 Wavelan wireless NIC. 280 | 281 | # Pseudo devices. 282 | device loop # Network loopback 283 | device random # Entropy device 284 | device ether # Ethernet support 285 | device tun # Packet tunnel. 286 | device pty # BSD-style compatibility pseudo ttys 287 | device md # Memory "disks" 288 | device gif # IPv6 and IPv4 tunneling 289 | device faith # IPv6-to-IPv4 relaying (translation) 290 | device firmware # firmware assist module 291 | 292 | # The `bpf' device enables the Berkeley Packet Filter. 293 | # Be aware of the administrative consequences of enabling this! 294 | # Note that 'bpf' is required for DHCP. 295 | device bpf # Berkeley packet filter 296 | 297 | # USB support 298 | device uhci # UHCI PCI->USB interface 299 | device ohci # OHCI PCI->USB interface 300 | device ehci # EHCI PCI->USB interface (USB 2.0) 301 | device usb # USB Bus (required) 302 | #device udbp # USB Double Bulk Pipe devices 303 | device ugen # Generic 304 | device uhid # "Human Interface Devices" 305 | device ukbd # Keyboard 306 | device ulpt # Printer 307 | device umass # Disks/Mass storage - Requires scbus and da 308 | device ums # Mouse 309 | device ural # Ralink Technology RT2500USB wireless NICs 310 | device rum # Ralink Technology RT2501USB wireless NICs 311 | device zyd # ZyDAS zb1211/zb1211b wireless NICs 312 | device urio # Diamond Rio 500 MP3 player 313 | # USB Serial devices 314 | device ucom # Generic com ttys 315 | device u3g # USB-based 3G modems (Option, Huawei, Sierra) 316 | device uark # Technologies ARK3116 based serial adapters 317 | device ubsa # Belkin F5U103 and compatible serial adapters 318 | device uftdi # For FTDI usb serial adapters 319 | device uipaq # Some WinCE based devices 320 | device uplcom # Prolific PL-2303 serial adapters 321 | device uslcom # SI Labs CP2101/CP2102 serial adapters 322 | device uvisor # Visor and Palm devices 323 | device uvscom # USB serial support for DDI pocket's PHS 324 | # USB Ethernet, requires miibus 325 | device aue # ADMtek USB Ethernet 326 | device axe # ASIX Electronics USB Ethernet 327 | device cdce # Generic USB over Ethernet 328 | device cue # CATC USB Ethernet 329 | device kue # Kawasaki LSI USB Ethernet 330 | device rue # RealTek RTL8150 USB Ethernet 331 | device udav # Davicom DM9601E USB 332 | 333 | # FireWire support 334 | device firewire # FireWire bus code 335 | device sbp # SCSI over FireWire (Requires scbus and da) 336 | device fwe # Ethernet over FireWire (non-standard!) 337 | device fwip # IP over FireWire (RFC 2734,3146) 338 | device dcons # Dumb console driver 339 | device dcons_crom # Configuration ROM for dcons 340 | -------------------------------------------------------------------------------- /targets/rescue/i386/nanobsd.conf: -------------------------------------------------------------------------------- 1 | NANO_NAME=rescue_isoi386 2 | -------------------------------------------------------------------------------- /targets/rescue/make.conf.build: -------------------------------------------------------------------------------- 1 | CFLAGS=-O -pipe 2 | -------------------------------------------------------------------------------- /targets/rescue/nanobsd.conf: -------------------------------------------------------------------------------- 1 | 2 | NANO_TOOLS=`pwd` 3 | NANO_PACKAGE_DIR=`pwd`/Pkg 4 | NANO_RAM_TMPVARSIZE=20480 5 | NANO_PMAKE="make -j 8" 6 | NANO_IMAGE_TYPE="cd" 7 | #NANO_KERNEL="RESCUE" 8 | 9 | customize_cmd cust_allow_ssh_root 10 | customize_cmd cust_install_files 11 | 12 | customize_cmd cust_ld32_cfg 13 | 14 | customize_cmd cust_pkg 15 | 16 | --------------------------------------------------------------------------------