Index: head/tools/tools/nanobsd/embedded/common =================================================================== --- head/tools/tools/nanobsd/embedded/common (revision 336135) +++ head/tools/tools/nanobsd/embedded/common (revision 336136) @@ -1,678 +1,674 @@ # $FreeBSD$ #- # Copyright (c) 2015 M. Warner Losh. # Copyright (c) 2010-2011 iXsystems, Inc. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL iXsystems, Inc OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # # # This file is heavily derived from both Sam Leffler's Avilia config, # as well as the BSDRP project's config file. Neither of these have # an explicit copyright/license statement, but are implicitly BSDL. This # example has been taken from the FreeNAS project (an early version) and # simplified to meet the needs of the example. # # NB: You want the other file as the command line arg :) # Missing in base: # o mkimg setting active partition # o mkimg starting at arbitrary offset (needed for A10, et al) # o mtools still needed because we have no makefs -t msdos # o nanobsd doesn't record changes to WORLDTEMP in customization # scripts yet, so we have kludge to pick up all files # o easy way for pkg to grab files from other repos and put that # data on the image # o Need to have some way to create / resize the s4 slice to do ping # pong bouncing between s3 and s4 for an arbitrary image. we can resize # one slice, not two # o hints in the uboot ports for how to create the image # # Missing here # o documentation for how to run the qemu images # o msdos mtools fallback # o special boot for !x86 !arm platforms # o qemu image for arm # o qemu image for aarch64 # o qemu image for armv6/armv7 # o easy support for different image / vm formats # o need to promote much of this to nanobsd.sh and friends # o uses old kludge to build image w/o ownership being right # for many files. Should move to mtree-dedup.awk. # o support for EFI images # o support for GPT partitioning # # Long Term # o common tooling for creating images for odd-ball platforms # o support for boot loaders other than uboot in the image # or via special instructions # o no pony support; sadly, you cannot have a pony # if [ -z $NANO_NAME ]; then echo "NANO_NAME not defined. Use foo.cfg instead." fi NANO_SLICE_FAT_SIZE=32m NANO_SLICE_CFG_SIZE=32m NANO_BOOT2CFG="-h -S115200" NANO_RAM_ETCSIZE=8192 NANO_RAM_TMPVARSIZE=8192 NANO_IMAGES=2 NANO_PMAKE="make -j $(sysctl -n hw.ncpu)" NANO_CFG_BASE=$(pwd) NANO_CFG_BASE=$(realpath ${NANO_CFG_BASE}/..) NANO_SRC=$(realpath ${NANO_CFG_BASE}/../../..) #### XXX share obj if [ -z ${NANO_CPUTYPE} ]; then NANO_OBJ=${NANO_SRC}/../embedded/obj else # Alas, I can't set OBJTREE to ${MACHINE}.${MACHINE_ARCH}.${CPUTYPE} # so this will have to do until I can. NANO_OBJ=${NANO_SRC}/../embedded/obj.${NANO_CPUTYPE} fi NANO_LOG=${NANO_OBJ}/../${NANO_NAME} NANO_DISKIMGDIR=${NANO_OBJ}/../images NANO_WORLDDIR=${NANO_LOG}/_.w NANO_INIT_IMG2=0 NANO_NOPRIV_BUILD=t unset MAKEOBJDIRPREFIX mkdir -p ${NANO_OBJ} NANO_OBJ=$(realpath ${NANO_OBJ}) mkdir -p ${NANO_LOG} NANO_LOG=$(realpath ${NANO_LOG}) mkdir -p ${NANO_WORLDDIR} NANO_WORLDDIR=$(realpath ${NANO_WORLDDIR}) mkdir -p ${NANO_DISKIMGDIR} NANO_DISKIMGDIR=$(realpath ${NANO_DISKIMGDIR}) NANO_FAT_DIR=${NANO_LOG}/_.fat customize_cmd cust_allow_ssh_root add_etc_make_conf ( ) ( touch ${NANO_WORLDDIR}/etc/make.conf ) customize_cmd add_etc_make_conf cust_install_machine_files ( ) ( echo "cd ${NANO_CFG_BASE}/Files" cd ${NANO_CFG_BASE}/Files find . -print | grep -Ev '/(CVS|\.svn|\.hg|\.git)' | cpio -dumpv ${NANO_WORLDDIR} ) customize_cmd cust_install_files customize_cmd cust_install_machine_files # NB: leave c++ enabled so devd can be built CONF_BUILD=" LOCAL_XTOOL_DIRS=usr.bin/mkimg WITHOUT_ACPI=true WITHOUT_ATM=true WITHOUT_AUDIT=true WITHOUT_BIND_DNSSEC=true WITHOUT_BIND_ETC=true WITHOUT_BIND_LIBS_LWRES=true WITHOUT_BLUETOOTH=true WITHOUT_CALENDAR=true WITHOUT_CVS=true WITHOUT_DICT=true WITHOUT_EXAMPLES=true WITHOUT_FORTRAN=true WITHOUT_GAMES=true WITHOUT_GCOV=true WITHOUT_GPIB=true WITHOUT_HTML=true WITHOUT_I4B=true WITHOUT_IPFILTER=true WITHOUT_IPX=true WITHOUT_LIBKSE=true WITHOUT_LOCALES=true WITHOUT_LPR=true WITHOUT_MAN=true WITHOUT_NETCAT=true WITHOUT_NIS=true WITHOUT_NLS=true WITHOUT_NS_CACHING=true WITHOUT_OBJC=true WITHOUT_PROFILE=true WITHOUT_SENDMAIL=true WITHOUT_SHAREDOCS=true WITHOUT_SYSCONS=true WITHOUT_LIB32=true WITHOUT_TESTS=true WITHOUT_DEBUG_FILES=t WITHOUT_KERNEL_SYMBOLS=t " CONF_INSTALL="$CONF_BUILD INSTALL_NODEBUG=t NOPORTDOCS=t NO_INSTALL_MANPAGES=t " # The following would help... # WITHOUT_TOOLCHAIN=true can't build ports # WITHOUT_INSTALLLIB=true libgcc.a # # from the build # WITHOUT_INFO=true makeinfo # WITHOUT_RCS=true PKG_ONLY_MAKE_CONF=" WITHOUT_TOOLCHAIN=true WITHOUT_INSTALLLIB=true WITHOUT_INFO=true WITHOUT_RCS=true " NANO_PACKAGE_ONLY=1 # Creates images for all the formats that use MBR / GPT # split later if the #ifdef soup gets too bad. create_diskimage_gpt ( ) ( pprint 2 "build diskimage gpt ${NANO_NAME}" create_diskimage_mbr $* ) create_diskimage_mbr ( ) ( local fmt [ -z ${NANO_DISKIMAGE_FORMAT} ] || fmt=".${NANO_DISKIMAGE_FORMAT}" pprint 2 "build diskimage ${NANO_NAME}" pprint 3 "log: ${NANO_LOG}/_.di" pprint 3 "image in: ${NANO_DISKIMGDIR}/_.disk.image.${NANO_NAME}${fmt}" ( local extra i sz fmt fmtarg bootmbr bootbsd skiparg set -o xtrace # Tell mtools not to be too picky export MTOOLS_SKIP_CHECK=1 [ -z ${NANO_DISKIMAGE_FORMAT} ] || fmtarg="-f ${NANO_DISKIMAGE_FORMAT}" [ -z ${NANO_DISKIMAGE_FORMAT} ] || fmt=".${NANO_DISKIMAGE_FORMAT}" bootmbr=${NANO_BOOT_MBR:+-b ${NANO_BOOT_MBR}} bootbsd=${NANO_BOOT_BSD:+-b ${NANO_BOOT_BSD}} skiparg=${NANO_MBR_FIRST_SKIP:+-S ${NANO_MBR_FIRST_SKIP}} for i in s1 s2 s3 s4 p1 p2 p3 p4 p5 empty; do rm -fr ${NANO_LOG}/_.${i}* done # Populate the FAT partition, if needed if [ -n "${NANO_SLICE_FAT}" ]; then echo Creating MSDOS partition for kernel newfs_msdos -C ${NANO_SLICE_FAT_SIZE} -F 16 -L ${NANO_NAME} \ ${NANO_LOG}/_.${NANO_SLICE_FAT} if [ -d ${NANO_FAT_DIR} ]; then # Need to copy files from ${NANO_FATDIR} with mtools, or use # makefs -t msdos once that's supported mcopy -i ${NANO_LOG}/_.${NANO_SLICE_FAT} ${NANO_FAT_DIR}/* :: fi fi # Populate the Powerpc boot image, if needed if [ "${NANO_LAYOUT}" = powerpc64-ibm ]; then dd if=${NANO_WORLDDIR}/boot/boot1.elf of=${NANO_LOG}/_.s1 bs=800k count=1 conv=sync fi # Populate the / partition, and place it into a slice with a # bsd label [ -z ${NANO_NOPRIV_BUILD} ] || extra="-F ${NANO_METALOG}" sz=${NANO_SLICE_ROOT_SIZE:+-s ${NANO_SLICE_ROOT_SIZE}} eval "${NANO_MAKEFS_UFS}" ${extra} $sz "${NANO_LOG}/_.${NANO_ROOT}" \ "${NANO_WORLDDIR}" case ${NANO_DISK_SCHEME} in mbr) mkimg -s bsd ${bootbsd} -p freebsd-ufs:=${NANO_LOG}/_.${NANO_ROOT} \ -o ${NANO_LOG}/_.${NANO_SLICE_ROOT} eval $NANO_SLICE_CFG=freebsd eval $NANO_SLICE_ROOT=freebsd ;; gpt) eval $NANO_SLICE_CFG=freebsd-ufs eval $NANO_SLICE_ROOT=freebsd-ufs ;; esac # Populate the /cfg partition, empty if none given if [ -z "${NANO_CFGDIR}" ]; then echo "Faking cfg dir, it's empty" NANO_CFGDIR=${NANO_LOG}/_.empty mkdir -p ${NANO_CFGDIR} fi # XXX -F cfg-mtree eval "${NANO_MAKEFS_UFS}" -s ${NANO_SLICE_CFG_SIZE} \ "${NANO_LOG}/_.${NANO_SLICE_CFG}" "${NANO_CFGDIR}" # data slice not supported since we need the part for FAT for # booting # Now shuffle all the slices together into the proper layout if [ -n "$NANO_SLICE_FAT" ]; then eval $NANO_SLICE_FAT=fat16b fi out=${NANO_DISKIMGDIR}/_.disk.image.${NANO_NAME}${fmt} # below depends on https://reviews.freebsd.org/D4403 not yet in the tree # but there's problems: it marks all partitions as active, so you have to # boot off partition 3 or 2 by hand if you're playing around with this WIP case ${NANO_LAYOUT} in std-embedded) mkimg -a 3 ${skiparg} ${fmtarg} ${bootmbr} -s mbr -p ${s1}:=${NANO_LOG}/_.s1 \ -p ${s2}:=${NANO_LOG}/_.s2 \ -p ${s3}:=${NANO_LOG}/_.s3 \ -o ${out} ;; std-x86) # s3 is cfg, s1 is /, s2 is other / (s2 is created in first boot script) mkimg -a 1 ${fmtarg} ${bootmbr} -s mbr -p ${s1}:=${NANO_LOG}/_.s1 \ -p- \ -p ${s3}:=${NANO_LOG}/_.s3 \ -o ${out} ;; std-uefi) # s1 is boot, s2 is cfg, s3 is /, not sure how to make that # boot (marked as active) with mkimg yet mkimg -a 2 ${fmtarg} ${bootmbr} -s mbr \ -p efi:=${NANO_WORLDDIR}/boot/boot1.efifat \ -p ${s2}:=${NANO_LOG}/_.s2 \ -p ${s3}:=${NANO_LOG}/_.s3 \ -o ${out} ;; std-uefi-bios) # p1 is boot for uefi, p2 is boot for gpt, p3 is cfg, p4 is / # and p5 is alt-root (after resize) mkimg -a 2 ${fmtarg} ${bootmbr} -s gpt \ -p efi:=${NANO_WORLDDIR}/boot/boot1.efifat \ -p freebsd-boot:=${NAANO_WORLDDIR}/boot/gptboot \ -p ${p3}:=${NANO_LOG}/_.p3 \ -p ${p4}:=${NANO_LOG}/_.p4 \ -o ${out} ;; powerpc64-ibm) # A lie to make the boot loader work, it boots the first BSD partition # it finds, regardless of the active flag. s2=fat16b # boot image is on a special partition, ala std-embedded, but that # partition isn't FAT with special files, but a copy of the boot # loader itself. mkimg -a 1 ${fmtarg} -s mbr -p prepboot:=${NANO_LOG}/_.s1 \ -p ${s2}:=${NANO_LOG}/_.s2 \ -p ${s3}:=${NANO_LOG}/_.s3a \ -o ${out} ;; esac rm -f ${out}.xz xz -9 --keep ${out} ) > ${NANO_LOG}/_.di 2>&1 ) die( ) { echo "$*" exit 1 } # Automatically include the packaging port here so it is always first so it # builds the port and adds the package so we can add other packages. #XXX Doesn't work for cross build, so punting until I can integreate qemu-static #XXX or poudriere, both of which require priv'd execution. Or qemu-system, #XXX which is super, super slow. #add_port ports-mgmt/pkg #add_port security/sudo #add_port ftp/curl rp=$(realpath ${NANO_OBJ}/) __a=`mount | grep ${rp} | awk '{print length($3), $3;}' | sort -rn | awk '{$1=""; print;}'` if [ -n "$__a" ]; then echo "unmounting $__a" umount $__a fi if [ "$DEBUG" = 1 ]; then DEBUG_BUILD=" DEBUG_FLAGS= -g " else DEBUG_INSTALL=" INSTALL_NODEBUG= t " fi CONF_INSTALL="$CONF_BUILD ${DEBUG_BUILD} " CONF_INSTALL="$CONF_INSTALL ${DEBUG_INSTALL} " if [ "${NANO_PACKAGE_ONLY}" -eq 1 ]; then CONF_INSTALL="${CONF_INSTALL} ${PKG_ONLY_MAKE_CONF} " echo "Automatically building a thin image with packages" else echo "Automatically building a * * F A T * * image so we can build ports" fi VARS="MASTER_SITE_BACKUP MASTER_SITE_OVERRIDE PACKAGEROOT PACKAGESITE" for var in $VARS; do val=$(eval echo "\$$var") if [ -n "$val" ]; then CONF_INSTALL="${CONF_INSTALL} $var=$val" fi done typical_embedded ( ) ( # Need to create rc.conf before we copy over /etc to /conf/base/etc # so now's a good time. local rc=${NANO_WORLDDIR}/etc/rc.conf echo "hostname=nanobsd-${NANO_NAME}" > $rc echo "growfs_enable=YES" >> $rc echo "growfs_type=nanobsd-pingpong" >> $rc echo "ntpdate_enable=YES" >> $rc echo "ifconfig_DEFAULT=DHCP" >> $rc echo "ntpdate_hosts='0.freebsd.pool.ntp.org 1.freebsd.pool.ntp.org'" >> $rc # Make sure that firstboot scripts run so growfs works. # Note: still some issues remvoing this XXX touch ${NANO_WORLDDIR}/firstboot ) customize_cmd typical_embedded fix_pkg ( ) ( chdir ${NANO_WORLDDIR} mkdir -p pkg mkdir -p pkg/db mkdir -p pkg/cache mkdir -p pkg/tmp # Needed for pkg bootstrap mkdir -p usr/local/etc # Will get moved to local/etc ( echo 'PKG_DBDIR = "/pkg/db"' echo 'PKG_CACHEDIR = "/pkg/cache"' echo 'DEFAULT_ALWAYS_YES = "yes"' echo 'ASSUME_ALWAYS_YES = "yes"' ) >> usr/local/etc/pkg.conf [ -z ${NANO_NOPRIV_BUILD} ] || ( echo "./pkg type=dir uname=root gname=wheel mode=0755" echo "./pkg/cache type=dir uname=root gname=wheel mode=0755" echo "./pkg/db type=dir uname=root gname=wheel mode=0755" echo "./pkg/tmp type=dir uname=root gname=wheel mode=0755" ) >> ${NANO_METALOG} ) customize_cmd fix_pkg save_build ( ) ( VERSION_FILE=${NANO_WORLDDIR}/etc/version if [ "${SVNREVISION}" = "${REVISION}" ]; then echo "${NANO_NAME}" > "${VERSION_FILE}" else echo "${NANO_NAME} (${SVNREVISION})" > "${VERSION_FILE}" fi ) customize_cmd save_build shrink_md_fbsize ( ) ( # We have a lot of little files on our memory disks. Let's decrease # the block and frag size to fit more little files on them (this # halves our space requirement by ~50% on /etc and /var on 8.x -- # and gives us more back on 9.x as the default block and frag size # are 4 times larger). sed -i '' -e 's,-S -i 4096,-S -i 4096 -b 4096 -f 512,' \ ${NANO_WORLDDIR}/etc/rc.initdiskless ) customize_cmd shrink_md_fbsize customize_cmd cust_comconsole dos_boot_part ( ) ( local d=/usr/local/share/u-boot/${NANO_BOOT_PKG} local f=${NANO_FAT_DIR} # For now, just copy all the files. However, for iMX6 and Allwinner, # we'll need to put a special boot block at a fixed location # on the disk as well. rm -rf $f mkdir $f chdir $f cp ${d}/* . # Also copy ubldr. u-boot will load it and it will load the kernel # from the ufs partition cp ${NANO_WORLDDIR}/boot/ubldr . cp ${NANO_WORLDDIR}/boot/ubldr.bin . # We have to touch the saveenv file touch uEnv.txt # Now we need to copy over dtb files from the build. cp ${NANO_WORLDDIR}/boot/dtb/*.dtb . ) if [ -n "$NANO_BOOT_PKG" ]; then d=/usr/local/share/u-boot/${NANO_BOOT_PKG} if [ ! -d ${d} ]; then echo ${NANO_BOOT_PKG} not installed. Sadly, it must be. exit 1 fi if [ ! -x /usr/local/bin/mcopy ]; then echo mtools not installed. Sadly, we gotta have it. exit 1 fi customize_cmd dos_boot_part fi product_custom ( ) ( # not quite ready to tweak these in nopriv build if [ -z ${NANO_NOPRIV_BUILD} ]; then # Last second tweaks -- generally not needed chown -R root:wheel ${NANO_WORLDDIR}/root chmod 0755 ${NANO_WORLDDIR}/root/* chmod 0755 ${NANO_WORLDDIR}/* chown -R root:wheel ${NANO_WORLDDIR}/etc chown -R root:wheel ${NANO_WORLDDIR}/boot chown root:wheel ${NANO_WORLDDIR}/ chown root:wheel ${NANO_WORLDDIR}/usr fi ) late_customize_cmd product_custom # # Convenience routines to bring up many settings for standard environments # # # For each architecture, we have a standard set of settings to the extent # it makes sense. For architectures that don't have a standard environment # cfg files need to either define a lot of settings, provide their own disk # imaging, or set which of the variants we support. No subshells, since we # set global variables # std_aarch64 ( ) { } std_amd64 ( ) { std_i386 } std_arm ( ) { } -std_armeb ( ) { - NANO_ENDIAN=big -} - std_armv6 ( ) { } std_armv7 ( ) { } std_i386 ( ) { # Default values, if not overridden in .cfg file : ${NANO_KERNEL:=GENERIC} : ${NANO_DRIVE:=ada0} : ${NANO_LAYOUT:=std-x86} : ${NANO_BOOT_MBR:=${NANO_WORLDDIR}/boot/boot0sio} : ${NANO_BOOT_BSD:=${NANO_WORLDDIR}/boot/boot} } std_mips ( ) { NANO_ENDIAN=big } std_mipsel ( ) { } std_mips64 ( ) { NANO_ENDIAN=big } std_mips64el ( ) { } std_powerpc ( ) { NANO_ENDIAN=big } std_powerpc64 ( ) { NANO_LAYOUT=powerpc64-ibm NANO_ENDIAN=big } std_sparc64 ( ) { NANO_ENDIAN=big } # # QEMU settings for the standard environments # qemu_env ( ) { NANO_DISKIMAGE_FORMAT=qcow2 } # other standard environments will go here eval std_${NANO_ARCH} # Slice 1: FAT for ROM loading bootstrap # Slice 2: Config partition # Slice 3: FreeBSD partition (sized exactly) # Slice 4: FreeBSD partition (empty) # on first boot, we resize slice 3 & 4 to be 1/2 of what's # left over on the SD card after slice 1 and 2 are taken # off the top. We also resize the 'a' partion on first boot # to the size of the partition for the ping/pong upgrade. # This feature needs support in the rc.d bootup script. # # Ideally, we'd not put BSD labels on the MBR disks. # However, we can't boot off raw MBR disks. First, # boot2 defaults to 'a' partition, and freaks out # unless you tell it to use 'c'. But even if we # hack that, then /boot/loader wants to load off # of 'c' partition. If you fix that, then we'll # try to mount root, but sanity checks prevent # slices from working. # : ${NANO_ENDIAN:=little} # make -V something to figure it out? : ${NANO_LAYOUT:=std-embedded} : ${NANO_MAKEFS_UFS:=makefs -t ffs -B ${NANO_ENDIAN}} : ${NANO_DISK_SCHEME:=mbr} # No others really supported ATM (well, gpt) case ${NANO_LAYOUT} in std-embedded) NANO_SLICE_FAT=s1 NANO_SLICE_CFG=s2 NANO_SLICE_ROOT=s3 NANO_SLICE_ALTROOT=s4 NANO_ROOT=${NANO_SLICE_ROOT}a NANO_ALTROOT=${NANO_SLICE_ALTROOT}a ;; std-x86) NANO_SLICE_CFG=s3 NANO_SLICE_ROOT=s1 NANO_SLICE_ALTROOT=s2 NANO_ROOT=${NANO_SLICE_ROOT}a NANO_ALTROOT=${NANO_SLICE_ALTROOT}a ;; powerpc64-ibm) NANO_SLICE_PPCBOOT=s1 NANO_SLICE_CFG=s2 NANO_SLICE_ROOT=s3 NANO_SLICE_ALTROOT=s4 NANO_ROOT=${NANO_SLICE_ROOT}a NANO_ALTROOT=${NANO_SLICE_ALTROOT}a ;; powerpc64-apple) echo Not yet exit 1 ;; std-uefi) NANO_SLICE_UEFI=s1 NANO_SLICE_CFG=s2 NANO_SLICE_ROOT=s3 NANO_SLICE_ALTROOT=s4 NANO_ROOT=${NANO_SLICE_ROOT} NANO_ALTROOT=${NANO_SLICE_ALTROOT} ;; std-uefi-bios) NANO_DISK_SCHEME=gpt NANO_SLICE_UEFI=p1 NANO_SLICE_BOOT=p2 NANO_SLICE_CFG=p3 NANO_SLICE_ROOT=p4 NANO_SLICE_ALTROOT=p5 NANO_ROOT=${NANO_SLICE_ROOT} NANO_ALTROOT=${NANO_SLICE_ALTROOT} ;; *) echo Unknown Layout ${NANO_LAYOUT} exit 1 ;; esac NANO_SLICE_DATA= # Not included # Each major disk scheme has its own routine. Generally # this is for mbr, gpt, etc. These are generally are widely # shared, but some specialized formats won't be shared. create_diskimage ( ) ( eval create_diskimage_${NANO_DISK_SCHEME} ) # Set the path to the same path we use for buldworld to use latest mkimg NANO_TARGET=$(cd ${NANO_SRC}; ${NANO_MAKE} TARGET_ARCH=${NANO_ARCH} -V _TARGET) NANO_TMPPATH=$(cd ${NANO_SRC}; ${NANO_MAKE} MK_AUTO_OBJ=no TARGET=${NANO_TARGET} TARGET_ARCH=${NANO_ARCH} -f Makefile.inc1 buildenv -V TMPPATH) export PATH="${NANO_TMPPATH}" Index: head/tools/tools/nanobsd/gateworks/cambria =================================================================== --- head/tools/tools/nanobsd/gateworks/cambria (revision 336135) +++ head/tools/tools/nanobsd/gateworks/cambria (nonexistent) @@ -1,10 +0,0 @@ -# $FreeBSD$ - -NANO_NAME="cambria-HEAD" -NANO_SRC=`pwd | sed 's/.tools.tools.nanobsd.*//'` -NANO_KERNEL="G2358" - -NANO_IMAGES=1 -FlashDevice Sandisk 64 - -. common Property changes on: head/tools/tools/nanobsd/gateworks/cambria ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/tools/tools/nanobsd/gateworks/avila =================================================================== --- head/tools/tools/nanobsd/gateworks/avila (revision 336135) +++ head/tools/tools/nanobsd/gateworks/avila (nonexistent) @@ -1,10 +0,0 @@ -# $FreeBSD$ - -NANO_NAME="avila-HEAD" -NANO_SRC=`pwd | sed 's/.tools.tools.nanobsd.*//'` -NANO_KERNEL="G2348" - -NANO_IMAGES=2 -FlashDevice Sandisk 512 - -. common Property changes on: head/tools/tools/nanobsd/gateworks/avila ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/tools/tools/nanobsd/gateworks/common =================================================================== --- head/tools/tools/nanobsd/gateworks/common (revision 336135) +++ head/tools/tools/nanobsd/gateworks/common (nonexistent) @@ -1,356 +0,0 @@ -# $FreeBSD$ - -NANO_CFGDIR=${NANO_CFGDIR:-${NANO_SRC}/${NANO_TOOLS}/gateworks/cfg} -test -d ${NANO_CFGDIR} || NANO_CFGDIR=/var/empty -NANO_PMAKE="make" # NB: disable -j 3 - -NANO_ARCH=armeb -TARGET_CPUTYPE=xscale; export TARGET_CPUTYPE # XXX - -NANO_CUSTOMIZE="cust_allow_ssh_root" - -clean_usr_local() -{ - LOCAL_DIR=${NANO_WORLDDIR}/usr/local - pprint 2 "Clean and create world directory (${LOCAL_DIR})" - if rm -rf ${LOCAL_DIR}/ > /dev/null 2>&1 ; then - true - else - chflags -R noschg ${LOCAL_DIR}/ - rm -rf ${LOCAL_DIR}/ - fi - for f in bin etc lib libdata libexec sbin share; do - mkdir -p ${LOCAL_DIR}/$f - done -} -NANO_CUSTOMIZE="$NANO_CUSTOMIZE clean_usr_local" - -cust_install_machine_files() -{ - echo "cd ${NANO_TOOLS}/gateworks/Files" - cd ${NANO_TOOLS}/gateworks/Files - find . -print | grep -Ev '/(CVS|\.svn)' | cpio -dumpv ${NANO_WORLDDIR} -} -NANO_CUSTOMIZE="$NANO_CUSTOMIZE cust_install_files cust_install_machine_files" - -buildenv() -{ - cd ${NANO_SRC} - env TARGET_ARCH=${NANO_ARCH} __MAKE_CONF=${NANO_MAKE_CONF_BUILD} \ - DESTDIR=${NANO_WORLDDIR} make buildenv -} - -net80211_tools() -{ - for f in wlanstats wlanwds wlanwatch; do - echo "(cd tools/tools/net80211/$f; make $1)"; - done | buildenv -} -net80211_clean_tools() -{ - net80211_tools "clean" -} -net80211_build_tools() -{ - net80211_tools "" -} -net80211_install_tools() -{ - net80211_tools "install" -} -NANO_CUSTOMIZE="$NANO_CUSTOMIZE net80211_clean_tools" -NANO_CUSTOMIZE="$NANO_CUSTOMIZE net80211_build_tools" -NANO_CUSTOMIZE="$NANO_CUSTOMIZE net80211_install_tools" - -ath_clean_tools() -{ - echo "cd tools/tools/ath; make clean" | buildenv -} -ath_build_tools() -{ - echo "cd tools/tools/ath; make" | buildenv -} -ath_install_tools() -{ - echo "cd tools/tools/ath; make install" | buildenv -} -NANO_CUSTOMIZE="$NANO_CUSTOMIZE ath_clean_tools" -NANO_CUSTOMIZE="$NANO_CUSTOMIZE ath_build_tools" -NANO_CUSTOMIZE="$NANO_CUSTOMIZE ath_install_tools" - -npe_clean_tools() -{ - echo "cd tools/tools/npe; make clean" | buildenv -} -npe_build_tools() -{ - echo "cd tools/tools/npe; make" | buildenv -} -npe_install_tools() -{ - echo "cd tools/tools/npe; make install" | buildenv -} -NANO_CUSTOMIZE="$NANO_CUSTOMIZE npe_clean_tools" -NANO_CUSTOMIZE="$NANO_CUSTOMIZE npe_build_tools" -NANO_CUSTOMIZE="$NANO_CUSTOMIZE npe_install_tools" - -NANO_MAKEFS="makefs -B big \ - -o bsize=4096,fsize=512,density=8192,optimization=space" -export NANO_MAKEFS - -# NB: leave c++ enabled so devd can be built -CONF_BUILD=" -WITHOUT_ACCT=true -WITHOUT_ACPI=true -WITHOUT_APM=true -WITHOUT_ATM=true -WITHOUT_AUDIT=true -WITHOUT_BIND_DNSSEC=true -WITHOUT_BIND_ETC=true -WITHOUT_BIND_LIBS_LWRES=true -WITHOUT_BLUETOOTH=true -WITHOUT_BSNMP=true -WITHOUT_CALENDAR=true -WITHOUT_CDDL=true -WITHOUT_CTM=true -WITHOUT_DICT=true -WITHOUT_EXAMPLES=true -WITHOUT_FLOPPY=true -WITHOUT_FORTRAN=true -WITHOUT_GAMES=true -WITHOUT_GCOV=true -WITHOUT_GPIB=true -WITHOUT_GROFF=true -WITHOUT_HTML=true -WITHOUT_INET6=true -WITHOUT_INFO=true -WITHOUT_IPFILTER=true -WITHOUT_KERBEROS=true -WITHOUT_LOCALES=true -WITHOUT_LPR=true -WITHOUT_MAN=true -WITHOUT_MAIL=true -WITHOUT_MAILWRAPPER=true -WITHOUT_NETCAT=true -WITHOUT_NIS=true -WITHOUT_NLS=true -WITHOUT_NS_CACHING=true -WITHOUT_OBJC=true -WITHOUT_PMC=true -WITHOUT_PORTSNAP=true -WITHOUT_PROFILE=true -WITHOUT_QUOTAS=true -WITHOUT_RCS=true -WITHOUT_RESCUE=true -WITHOUT_SENDMAIL=true -WITHOUT_SHAREDOCS=true -WITHOUT_SSP=true -WITHOUT_SYSCONS=true -WITHOUT_TCSH=true -WITHOUT_TFTPD=true -WITHOUT_ZFS=true -" -CONF_INSTALL="$CONF_BUILD -WITHOUT_TOOLCHAIN=true -WITHOUT_INSTALLLIB=true -INSTALL_NODEBUG=true -" - -# NB: override to force / on s1 instead of s1a -setup_nanobsd_etc() -{ - pprint 2 "configure nanobsd /etc" - - ( - cd ${NANO_WORLDDIR} - - # create diskless marker file - touch etc/diskless - - # Make root filesystem R/O by default - echo "root_rw_mount=NO" >> etc/defaults/rc.conf - - # save config file for scripts - echo "NANO_DRIVE=${NANO_DRIVE}" > etc/nanobsd.conf - - echo "/dev/${NANO_DRIVE}s1 / ufs ro 1 1" > etc/fstab - echo "/dev/${NANO_DRIVE}s3 /cfg ufs rw,noauto 2 2" >> etc/fstab - mkdir -p cfg - ) -} - -create_arm_diskimage() -{ - pprint 2 "build diskimage" - pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.di" - - ( - echo "NANO_MEDIASIZE: $NANO_MEDIASIZE" - echo "NANO_IMAGES: $NANO_IMAGES" - echo "NANO_SECTS: $NANO_SECTS" - echo "NANO_HEADS: $NANO_HEADS" - echo "NANO_CODESIZE: $NANO_CODESIZE" - echo "NANO_CONFSIZE: $NANO_CONFSIZE" - echo "NANO_DATASIZE: $NANO_DATASIZE" - - echo $NANO_MEDIASIZE $NANO_IMAGES \ - $NANO_SECTS $NANO_HEADS \ - $NANO_CODESIZE $NANO_CONFSIZE $NANO_DATASIZE | - awk ' - { - printf "# %s\n", $0 - - # size of cylinder in sectors - cs = $3 * $4 - - # number of full cylinders on media - cyl = int ($1 / cs) - - # output fdisk geometry spec, truncate cyls to 1023 - if (cyl <= 1023) - print "g c" cyl " h" $4 " s" $3 - else - print "g c" 1023 " h" $4 " s" $3 - - if ($7 > 0) { - # size of data partition in full cylinders - dsl = int (($7 + cs - 1) / cs) - } else { - dsl = 0; - } - - # size of config partition in full cylinders - csl = int (($6 + cs - 1) / cs) - - if ($5 == 0) { - # size of image partition(s) in full cylinders - isl = int ((cyl - dsl - csl) / $2) - } else { - isl = int (($5 + cs - 1) / cs) - } - - # First image partition start at second track - print "p 1 165 " $3, isl * cs - $3 - c = isl * cs; - - # Second image partition (if any) also starts offset one - # track to keep them identical. - if ($2 > 1) { - print "p 2 165 " $3 + c, isl * cs - $3 - c += isl * cs; - } - - # Config partition starts at cylinder boundary. - print "p 3 165 " c, csl * cs - c += csl * cs - - # Data partition (if any) starts at cylinder boundary. - if ($7 > 0) { - print "p 4 165 " c, dsl * cs - } else if ($7 < 0 && $1 > c) { - print "p 4 165 " c, $1 - c - } else if ($1 < c) { - print "Disk space overcommitted by", \ - c - $1, "sectors" > "/dev/stderr" - exit 2 - } - - # Force slice 1 to be marked active. This is necessary - # for booting the image from a USB device to work. - print "a 1" - } - ' > ${MAKEOBJDIRPREFIX}/_.fdisk - - IMG=${NANO_DISKIMGDIR}/${NANO_IMGNAME} - BS=${NANO_SECTS}b - - if [ "${NANO_MD_BACKING}" = "swap" ] ; then - MD=`mdconfig -a -t swap -s ${NANO_MEDIASIZE} -x ${NANO_SECTS} \ - -y ${NANO_HEADS}` - else - echo ""; echo "Creating md backing file ${IMG} ..." - _c=`expr ${NANO_MEDIASIZE} / ${NANO_SECTS}` - pprint 2 "dd if=/dev/zero of=${IMG} bs=${BS} count=${_c}" - dd if=/dev/zero of=${IMG} bs=${BS} count=${_c} - pprint 2 "mdconfig -a -t vnode -f ${IMG} -x ${NANO_SECTS} -y ${NANO_HEADS}" - MD=`mdconfig -a -t vnode -f ${IMG} -x ${NANO_SECTS} \ - -y ${NANO_HEADS}` - fi - - trap "mdconfig -d -u $MD" 1 2 15 EXIT - - echo ""; echo "Write partition table ..." - FDISK=${MAKEOBJDIRPREFIX}/_.fdisk - pprint 2 "fdisk -i -f ${FDISK} ${MD}" - fdisk -i -f ${FDISK} ${MD} - pprint 2 "fdisk ${MD}" - fdisk ${MD} - - # Create first image - IMG1=${NANO_DISKIMGDIR}/_.disk.image1 - echo ""; echo "Create first image ${IMG1} ..." - SIZE=`awk '/^p 1/ { print $5 "b" }' ${FDISK}` - pprint 2 "${NANO_MAKEFS} -s ${SIZE} ${IMG1} ${NANO_WORLDDIR}" - ${NANO_MAKEFS} -s ${SIZE} ${IMG1} ${NANO_WORLDDIR} - pprint 2 "dd if=${IMG1} of=/dev/${MD}s1 bs=${BS}" - dd if=${IMG1} of=/dev/${MD}s1 bs=${BS} - - if [ $NANO_IMAGES -gt 1 -a $NANO_INIT_IMG2 -gt 0 ] ; then - IMG2=${NANO_DISKIMGDIR}/_.disk.image2 - echo ""; echo "Create second image ${IMG2}..." - for f in ${NANO_WORLDDIR}/etc/fstab ${NANO_WORLDDIR}/conf/base/etc/fstab - do - sed -i "" "s/${NANO_DRIVE}s1/${NANO_DRIVE}s2/g" $f - done - - SIZE=`awk '/^p 2/ { print $5 "b" }' ${FDISK}` - pprint 2 "${NANO_MAKEFS} -s ${SIZE} ${IMG2} ${NANO_WORLDDIR}" - ${NANO_MAKEFS} -s ${SIZE} ${IMG2} ${NANO_WORLDDIR} - pprint 2 "dd if=${IMG2} of=/dev/${MD}s2 bs=${BS}" - dd if=${IMG2} of=/dev/${MD}s2 bs=${BS} - fi - - # Create Config slice - CFG=${NANO_DISKIMGDIR}/_.disk.cfg - echo ""; echo "Creating config partition ${CFG}..." - SIZE=`awk '/^p 3/ { print $5 "b" }' ${FDISK}` - # XXX: fill from where ? - pprint 2 "${NANO_MAKEFS} -s ${SIZE} ${CFG} ${NANO_CFGDIR}" - ${NANO_MAKEFS} -s ${SIZE} ${CFG} ${NANO_CFGDIR} - pprint 2 "dd if=${CFG} of=/dev/${MD}s3 bs=${BS}" - dd if=${CFG} of=/dev/${MD}s3 bs=${BS} - pprint 2 "rm ${CFG}" - rm ${CFG}; CFG= # NB: disable printing below - - # Create Data slice, if any. - if [ $NANO_DATASIZE -gt 0 ] ; then - DATA=${NANO_DISKIMGDIR}/_.disk.data - echo ""; echo "Creating data partition ${DATA}..." - SIZE=`awk '/^p 4/ { print $5 "b" }' ${FDISK}` - # XXX: fill from where ? - pprint 2 "${NANO_MAKEFS} -s ${SIZE} ${DATA} /var/empty" - ${NANO_MAKEFS} -s ${SIZE} ${DATA} /var/empty - pprint 2 "dd if=${DATA} of=/dev/${MD}s4 bs=${BS}" - dd if=${DATA} of=/dev/${MD}s4 bs=${BS} - pprint 2 "rm ${DATA}" - rm ${DATA}; DATA= # NB: disable printing below - fi - - if [ "${NANO_MD_BACKING}" = "swap" ] ; then - echo "Writing out _.disk.full..." - dd if=/dev/${MD} of=${IMG} bs=${BS} - fi - - echo "" - echo "Completed images in:" - echo "" - echo "Full disk: ${IMG}" - echo "Primary partition: ${IMG1}" - test "${IMG2}" && echo "2ndary partition: ${IMG2}" - test "${CFG}" && echo "/cfg partition: ${CFG}" - test "${DATA}" && echo "/data partition: ${DATA}" - echo "" - echo "Use dd if= of=/dev/ bs=${BS} to transfer an" - echo "image to bootable media /dev/." - ) > ${MAKEOBJDIRPREFIX}/_.di 2>&1 -} Property changes on: head/tools/tools/nanobsd/gateworks/common ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/tools/tools/nanobsd/gateworks/G2348 =================================================================== --- head/tools/tools/nanobsd/gateworks/G2348 (revision 336135) +++ head/tools/tools/nanobsd/gateworks/G2348 (nonexistent) @@ -1,119 +0,0 @@ -# -# Gateworks Avila IXP425 XScale board -# kernel configuration file for FreeBSD/arm -# -# $FreeBSD$ - -machine arm -ident G2348 - -include "../xscale/ixp425/std.ixp425" -include "../xscale/ixp425/std.avila" -options XSCALE_CACHE_READ_WRITE_ALLOCATE -#options ARM_USE_SMALL_ALLOC -hints "AVILA.hints" -makeoptions MODULES_OVERRIDE="" - -# NB: patched by boot2 to reflect boot/root partition -options ROOTDEVNAME=\"ufs:ad0s1\" - -makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols -makeoptions CONF_CFLAGS=-mcpu=xscale - -options HZ=100 -#options DEVICE_POLLING - -# Debugging for use in -current -options KDB -options DDB #Enable the kernel debugger -#options INVARIANTS #Enable calls of extra sanity checking -#options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS -#options WITNESS #Enable checks to detect deadlocks and cycles -#options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed -#options DIAGNOSTIC - -options SCHED_4BSD #4BSD scheduler -options PREEMPTION - -options INET #InterNETworking -#options INET6 #IPv6 communications protocols -options FFS #Berkeley Fast Filesystem -#options SOFTUPDATES #Enable FFS soft updates support -#options UFS_ACL #Support for access control lists -#options UFS_DIRHASH #Improve performance on big directories -options NFSCL #Network Filesystem Client -options NFSLOCKD #Network Lock Manager -options KTRACE #ktrace(1) support -#options SYSVSHM #SYSV-style shared memory -#options SYSVMSG #SYSV-style message queues -#options SYSVSEM #SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions -#options KBD_INSTALL_CDEV # install a CDEV entry in /dev -#options VERBOSE_SYSINIT - -#device saarm - -device pci -device uart - -# I2C support -device iicbus -device iicbb -device iic -device ixpiic -device ds1672 # DS1672 on ipxiic -device ad7418 # AD7418 on ipxiic - -device ixpwdog # watchdog timer -device avila_led - -device cfi # flash support -#options CFI_SUPPORT_STRATAFLASH - -device ata -device atadisk # ATA disk drives -device avila_ata # Gateworks CF/IDE support - -device npe # Network Processing Engine -device npe_fw -device firmware -device qmgr # Q Manager (required by npe) -device mii # NB: required by npe -device ether -device bpf - -device pty -device loop -device if_bridge - -device md -device random # Entropy device - -# Wireless NIC cards -device wlan # 802.11 support -options IEEE80211_DEBUG # enable debugging msgs -options IEEE80211_AMPDU_AGE # age frames in AMPDU reorder q's -options IEEE80211_SUPPORT_MESH -options IEEE80211_SUPPORT_TDMA -device wlan_wep # 802.11 WEP support -device wlan_ccmp # 802.11 CCMP support -device wlan_tkip # 802.11 TKIP support - -device ath # Atheros pci/cardbus NIC's -device ath_rate_sample # SampleRate tx rate control for ath -options ATH_DEBUG # enable athdebug msgs -options ATH_DIAGAPI # enable api for athregs - -device ath_hal # Atheros HAL (includes binary component) -options AH_DEBUG -#options AH_ASSERT -options AH_SUPPORT_AR5416 - -device usb -#options USB_DEBUG -device ohci -device ehci - -device umass -device scbus # SCSI bus (required for SCSI) -device da # Direct Access (disks) Property changes on: head/tools/tools/nanobsd/gateworks/G2348 ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/tools/tools/nanobsd/gateworks/G2358 =================================================================== --- head/tools/tools/nanobsd/gateworks/G2358 (revision 336135) +++ head/tools/tools/nanobsd/gateworks/G2358 (nonexistent) @@ -1,130 +0,0 @@ -# -# Gateworks Cambria IXP435 XScale board -# kernel configuration file for FreeBSD/arm -# -# $FreeBSD$ - -machine arm -ident G2358 - -include "../xscale/ixp425/std.ixp435" -include "../xscale/ixp425/std.avila" -options XSCALE_CACHE_READ_WRITE_ALLOCATE -#options ARM_USE_SMALL_ALLOC -hints "CAMBRIA.hints" -makeoptions MODULES_OVERRIDE="" - -# NB: patched by boot2 to reflect boot/root partition -options ROOTDEVNAME=\"ufs:ad0s1\" - -makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols -makeoptions CONF_CFLAGS=-mcpu=xscale - -options HZ=100 -#options DEVICE_POLLING - -# Debugging for use in -current -options KDB -options DDB #Enable the kernel debugger -#options INVARIANTS #Enable calls of extra sanity checking -#options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS -#options WITNESS #Enable checks to detect deadlocks and cycles -#options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed -#options DIAGNOSTIC - -options SCHED_4BSD #4BSD scheduler -options PREEMPTION - -options INET #InterNETworking -#options INET6 #IPv6 communications protocols -options FFS #Berkeley Fast Filesystem -#options SOFTUPDATES #Enable FFS soft updates support -#options UFS_ACL #Support for access control lists -#options UFS_DIRHASH #Improve performance on big directories -options NFSCL #New Network Filesystem Client -options NFSLOCKD #Network Lock Manager -options KTRACE #ktrace(1) support -#options SYSVSHM #SYSV-style shared memory -#options SYSVMSG #SYSV-style message queues -#options SYSVSEM #SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions -#options KBD_INSTALL_CDEV # install a CDEV entry in /dev -#options VERBOSE_SYSINIT - -#device saarm - -device pci -device uart - -# I2C support -device iicbus -device iicbb -device iic -device ixpiic -device ds1672 # DS1672 on ipxiic -device ad7418 # AD7418 on ipxiic - -device ixpwdog # watchdog timer -device cambria_fled # front panel led -device cambria_led # octal led latch - -device ata -device atadisk # ATA disk drives -device avila_ata # Gateworks CF/IDE support - -device cfi # flash support -#options CFI_SUPPORT_STRATAFLASH - -device npe # Network Processing Engine -device npe_fw -device firmware -device qmgr # Q Manager (required by npe) -device mii # NB: required by npe -device ether -device bpf - -device pty -device loop -device if_bridge - -device md -device random # Entropy device - -# Wireless NIC cards -device wlan # 802.11 support -options IEEE80211_DEBUG # enable debugging msgs -options IEEE80211_AMPDU_AGE # age frames in AMPDU reorder q's -options IEEE80211_SUPPORT_MESH -options IEEE80211_SUPPORT_TDMA -device wlan_wep # 802.11 WEP support -device wlan_ccmp # 802.11 CCMP support -device wlan_tkip # 802.11 TKIP support - -device ath # Atheros pci/cardbus NIC's -device ath_rate_sample # SampleRate tx rate control for ath -options ATH_DEBUG # enable athdebug msgs -options ATH_DIAGAPI # enable api for athregs - -device ath_hal # Atheros HAL (includes binary component) -options AH_DEBUG -#options AH_ASSERT -options AH_SUPPORT_AR5416 - -#device crypto -#device cryptodev -#device hifn # NB: Soekris minipci card known to work - -# NB: 2 USB 2.0 ports standard -device usb -options USB_EHCI_BIG_ENDIAN_DESC # handle big-endian byte order -#options USB_DEBUG -device ehci -device umass -device scbus # SCSI bus (required for SCSI) -device da # Direct Access (disks) - -#device ural -#device zyd -#device wlan_amrr - -device axe Property changes on: head/tools/tools/nanobsd/gateworks/G2358 ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/tools/tools/nanobsd/gateworks/Files/root/.profile =================================================================== --- head/tools/tools/nanobsd/gateworks/Files/root/.profile (revision 336135) +++ head/tools/tools/nanobsd/gateworks/Files/root/.profile (nonexistent) @@ -1,15 +0,0 @@ -# $FreeBSD: src/etc/root/dot.profile,v 1.21 2007/05/29 06:33:10 dougb Exp $ -# -PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:~/bin -export PATH -HOME=/root; export HOME -TERM=${TERM:-xterm}; export TERM -PAGER=more; export PAGER - -#set -o vi -set -o emacs -if [ `id -u` = 0 ]; then - PS1="`hostname -s`# " -else - PS1="`hostname -s`% " -fi Property changes on: head/tools/tools/nanobsd/gateworks/Files/root/.profile ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -true \ No newline at end of property Index: head/tools/tools/nanobsd/gateworks/Files/root/updatep1 =================================================================== --- head/tools/tools/nanobsd/gateworks/Files/root/updatep1 (revision 336135) +++ head/tools/tools/nanobsd/gateworks/Files/root/updatep1 (nonexistent) @@ -1,54 +0,0 @@ -#!/bin/sh -# -# Copyright (c) 2004-2005 Poul-Henning Kamp. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. -# -# $FreeBSD$ -# -# Script to update partition 1 on a NanoBSD system. -# -# usage: -# ssh somewhere cat image.s1 | sh updatep1 -# - -set -e - -. /etc/nanobsd.conf - -if mount | grep ${NANO_DRIVE}s1 > /dev/null ; then - echo "You are running partition 1 already" - echo "you probably want to use 'updatep2' instead" - exit 1 -fi - -# Blow away old system. -dd if=/dev/zero of=/dev/${NANO_DRIVE}s1 bs=1m count=1 > /dev/null 2>&1 - -# Copy in new system -dd of=/dev/${NANO_DRIVE}s1 obs=64k - -# Check that it worked -fsck_ffs -n /dev/${NANO_DRIVE}s1 - -gpart set -a active -i 1 ${NANO_DRIVE} Property changes on: head/tools/tools/nanobsd/gateworks/Files/root/updatep1 ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/tools/tools/nanobsd/gateworks/Files/root/updatep2 =================================================================== --- head/tools/tools/nanobsd/gateworks/Files/root/updatep2 (revision 336135) +++ head/tools/tools/nanobsd/gateworks/Files/root/updatep2 (nonexistent) @@ -1,62 +0,0 @@ -#!/bin/sh -# -# Copyright (c) 2004-2005 Poul-Henning Kamp. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. -# -# $FreeBSD$ -# -# Script to update partition 2 on a NanoBSD system. -# -# usage: -# ssh somewhere cat image.s1 | sh updatep2 -# - -set -e - -. /etc/nanobsd.conf - -if mount | grep ${NANO_DRIVE}s2 > /dev/null ; then - echo "You are running partition 2 already" - echo "you probably want to use 'updatep1' instead" - exit 1 -fi - -# Blow away old system. -dd if=/dev/zero of=/dev/${NANO_DRIVE}s2 bs=1m count=1 > /dev/null 2>&1 - -# Copy in new system -dd of=/dev/${NANO_DRIVE}s2 obs=64k - -# Check that it worked -fsck_ffs -n /dev/${NANO_DRIVE}s2 - -# Update the /etc/fstab -trap "umount /mnt" 1 2 15 EXIT -mount /dev/${NANO_DRIVE}s2 /mnt -sed -i "" "s/${NANO_DRIVE}s1/${NANO_DRIVE}s2/" /mnt/conf/base/etc/fstab -sed -i "" "s/${NANO_DRIVE}s1/${NANO_DRIVE}s2/" /mnt/etc/fstab -umount /mnt -trap 1 2 15 EXIT - -gpart set -a active -i 2 ${NANO_DRIVE} Property changes on: head/tools/tools/nanobsd/gateworks/Files/root/updatep2 ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/tools/tools/nanobsd/gateworks/cfg/motd =================================================================== --- head/tools/tools/nanobsd/gateworks/cfg/motd (revision 336135) +++ head/tools/tools/nanobsd/gateworks/cfg/motd (nonexistent) @@ -1 +0,0 @@ -FreeBSD 7.1-PRERELEASE (G2348) #1: Fri Sep 26 14:37:41 PDT 2008 Property changes on: head/tools/tools/nanobsd/gateworks/cfg/motd ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -true \ No newline at end of property Index: head/tools/tools/nanobsd/gateworks/cfg/rc.conf =================================================================== --- head/tools/tools/nanobsd/gateworks/cfg/rc.conf (revision 336135) +++ head/tools/tools/nanobsd/gateworks/cfg/rc.conf (nonexistent) @@ -1,24 +0,0 @@ -#!/bin/sh - -hostname="avila" -ifconfig_npe0="DHCP" -background_dhclient_npe0="YES" # Start dhcp client in the background. -#ifconfig_npe1="DHCP" -background_dhclient_npe1="YES" # Start dhcp client in the background. - -wlans_ath0="wlan0" - -sshd_enable="YES" -nfs_client_enable="YES" - -sendmail_enable="NO" # Run the sendmail inbound daemon (YES/NO). -sendmail_submit_enable="NO" # Start a localhost-only MTA for mail submission -sendmail_outbound_enable="NO" # Dequeue stuck mail (YES/NO). -sendmail_msp_queue_enable="NO" # Dequeue stuck clientmqueue mail (YES/NO). - -dumpdev="NO" # Device to crashdump to (device name, AUTO, or NO). -background_fsck="NO" - -harvest_interrupt="NO" # Entropy device harvests interrupt randomness -harvest_ethernet="NO" # Entropy device harvests ethernet randomness -harvest_p_to_p="NO" # Entropy device harvests point-to-point randomness Property changes on: head/tools/tools/nanobsd/gateworks/cfg/rc.conf ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -true \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/tools/tools/nanobsd/gateworks/cfg/ssh/sshd_config =================================================================== --- head/tools/tools/nanobsd/gateworks/cfg/ssh/sshd_config (revision 336135) +++ head/tools/tools/nanobsd/gateworks/cfg/ssh/sshd_config (nonexistent) @@ -1,126 +0,0 @@ -# $OpenBSD: sshd_config,v 1.80 2008/07/02 02:24:18 djm Exp $ -# $FreeBSD: src/crypto/openssh/sshd_config,v 1.48 2008/08/01 02:48:36 des Exp $ - -# This is the sshd server system-wide configuration file. See -# sshd_config(5) for more information. - -# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin - -# The strategy used for options in the default sshd_config shipped with -# OpenSSH is to specify options with their default value where -# possible, but leave them commented. Uncommented options change a -# default value. - -# Note that some of FreeBSD's defaults differ from OpenBSD's, and -# FreeBSD has a few additional options. - -#VersionAddendum FreeBSD-20080801 - -#Port 22 -#Protocol 2 -#AddressFamily any -#ListenAddress 0.0.0.0 -#ListenAddress :: - -# Disable legacy (protocol version 1) support in the server for new -# installations. In future the default will change to require explicit -# activation of protocol 1 -Protocol 2 - -# HostKey for protocol version 1 -#HostKey /etc/ssh/ssh_host_key -# HostKeys for protocol version 2 -#HostKey /etc/ssh/ssh_host_rsa_key -#HostKey /etc/ssh/ssh_host_dsa_key - -# Lifetime and size of ephemeral version 1 server key -#KeyRegenerationInterval 1h -#ServerKeyBits 1024 - -# Logging -# obsoletes QuietMode and FascistLogging -#SyslogFacility AUTH -#LogLevel INFO - -# Authentication: - -#LoginGraceTime 2m -PermitRootLogin yes -#StrictModes yes -#MaxAuthTries 6 -#MaxSessions 10 - -#RSAAuthentication yes -#PubkeyAuthentication yes -#AuthorizedKeysFile .ssh/authorized_keys - -# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts -#RhostsRSAAuthentication no -# similar for protocol version 2 -#HostbasedAuthentication no -# Change to yes if you don't trust ~/.ssh/known_hosts for -# RhostsRSAAuthentication and HostbasedAuthentication -#IgnoreUserKnownHosts no -# Don't read the user's ~/.rhosts and ~/.shosts files -#IgnoreRhosts yes - -# Change to yes to enable built-in password authentication. -PasswordAuthentication yes -PermitEmptyPasswords yes - -# Change to no to disable PAM authentication -ChallengeResponseAuthentication no - -# Kerberos options -#KerberosAuthentication no -#KerberosOrLocalPasswd yes -#KerberosTicketCleanup yes -#KerberosGetAFSToken no - -# GSSAPI options -#GSSAPIAuthentication no -#GSSAPICleanupCredentials yes - -# Set this to 'no' to disable PAM authentication, account processing, -# and session processing. If this is enabled, PAM authentication will -# be allowed through the ChallengeResponseAuthentication and -# PasswordAuthentication. Depending on your PAM configuration, -# PAM authentication via ChallengeResponseAuthentication may bypass -# the setting of "PermitRootLogin without-password". -# If you just want the PAM account and session checks to run without -# PAM authentication, then enable this but set PasswordAuthentication -# and ChallengeResponseAuthentication to 'no'. -#UsePAM yes - -#AllowAgentForwarding yes -#AllowTcpForwarding yes -#GatewayPorts no -#X11Forwarding yes -#X11DisplayOffset 10 -#X11UseLocalhost yes -#PrintMotd yes -#PrintLastLog yes -#TCPKeepAlive yes -#UseLogin no -#UsePrivilegeSeparation yes -#PermitUserEnvironment no -#Compression delayed -#ClientAliveInterval 0 -#ClientAliveCountMax 3 -#UseDNS yes -#PidFile /var/run/sshd.pid -#MaxStartups 10 -#PermitTunnel no -#ChrootDirectory none - -# no default banner path -#Banner none - -# override default of no subsystems -Subsystem sftp /usr/libexec/sftp-server - -# Example of overriding settings on a per-user basis -#Match User anoncvs -# X11Forwarding no -# AllowTcpForwarding no -# ForceCommand cvs server Property changes on: head/tools/tools/nanobsd/gateworks/cfg/ssh/sshd_config ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -true \ No newline at end of property