diff options
author | mr <mr@FreeBSD.org> | 2009-11-19 16:27:51 +0000 |
---|---|---|
committer | mr <mr@FreeBSD.org> | 2009-11-19 16:27:51 +0000 |
commit | 9aa490f096ff30310ba6a6a03699e8ccc2efe2c9 (patch) | |
tree | f6d84909c28c6e8045dd7a23f7ee56ad472bee1b /tools | |
parent | af622569ad1d70f37fb76be7bd555b817c8a545d (diff) | |
download | FreeBSD-src-9aa490f096ff30310ba6a6a03699e8ccc2efe2c9.zip FreeBSD-src-9aa490f096ff30310ba6a6a03699e8ccc2efe2c9.tar.gz |
Add nanobsd example for the PC Engines ALIX board (serial console).
Diffstat (limited to 'tools')
18 files changed, 1312 insertions, 0 deletions
diff --git a/tools/tools/nanobsd/pcengines/ALIX_DSK b/tools/tools/nanobsd/pcengines/ALIX_DSK new file mode 100644 index 0000000..b45822e --- /dev/null +++ b/tools/tools/nanobsd/pcengines/ALIX_DSK @@ -0,0 +1,113 @@ +# +# $FreeBSD$ +# + +cpu I586_CPU +ident ALIX_DSK +makeoptions DEBUG=-g +options CPU_GEODE +options SCHED_ULE +options PREEMPTION +options INET +options INET6 +options FFS +options SOFTUPDATES +options UFS_ACL +options UFS_DIRHASH +options NFSCLIENT +options NFSLOCKD +options MSDOSFS +options CD9660 +options PROCFS +options PSEUDOFS +options GEOM_PART_GPT +options GEOM_LABEL +options COMPAT_43TTY +options COMPAT_FREEBSD7 +options SCSI_DELAY=5000 +options SYSVSHM +options SYSVMSG +options SYSVSEM +options P1003_1B_SEMAPHORES +options _KPOSIX_PRIORITY_SCHEDULING +options PRINTF_BUFR_SIZE=128 +device apic +device pci +device fdc +device ata +device atadisk +device atapicd +device atapist +options ATA_STATIC_ID +device scbus +device da +device sa +device cd +device pass +device uart +device em +device miibus +device vr +device wlan +options IEEE80211_DEBUG +options IEEE80211_AMPDU_AGE +options IEEE80211_SUPPORT_MESH +device wlan_wep +device wlan_ccmp +device wlan_tkip +device wlan_amrr +device an +device ath +device ath_hal +options AH_SUPPORT_AR5416 +device ath_rate_sample +device wi +device loop +device random +device ether +device tun +device pty +device md +device gif +device faith +device firmware +device bpf +device uhci +device ohci +device ehci +device usb +device ulpt +device umass +device u3g +device ubsa +device uftdi + +options INCLUDE_CONFIG_FILE + +options ALTQ +options ALTQ_CBQ +options ALTQ_RED +options ALTQ_RIO +options ALTQ_HFSC +options ALTQ_CDNR +options ALTQ_PRIQ + +device pf +device pflog +device pfsync +device carp +device if_bridge + +options DEVICE_POLLING + +options NETGRAPH +options NETGRAPH_BPF +options NETGRAPH_ETHER +options NETGRAPH_IFACE +options NETGRAPH_PPP +options NETGRAPH_PPPOE +options NETGRAPH_PPTPGRE +options NETGRAPH_MPPC_ENCRYPTION +options NETGRAPH_SOCKET +options NETGRAPH_KSOCKET +options NETGRAPH_VJC diff --git a/tools/tools/nanobsd/pcengines/ALIX_NFS b/tools/tools/nanobsd/pcengines/ALIX_NFS new file mode 100644 index 0000000..fe911da --- /dev/null +++ b/tools/tools/nanobsd/pcengines/ALIX_NFS @@ -0,0 +1,121 @@ +# +# $FreeBSD$ +# + +cpu I586_CPU +ident ALIX_DSK +makeoptions DEBUG=-g +options CPU_GEODE +options SCHED_ULE +options PREEMPTION +options INET +options INET6 +options FFS +options SOFTUPDATES +options UFS_ACL +options UFS_DIRHASH +options NFSCLIENT +options NFSLOCKD +options MSDOSFS +options CD9660 +options PROCFS +options PSEUDOFS +options GEOM_PART_GPT +options GEOM_LABEL +options COMPAT_43TTY +options COMPAT_FREEBSD7 +options SCSI_DELAY=5000 +options SYSVSHM +options SYSVMSG +options SYSVSEM +options P1003_1B_SEMAPHORES +options _KPOSIX_PRIORITY_SCHEDULING +options PRINTF_BUFR_SIZE=128 +device apic +device pci +device fdc +device ata +device atadisk +device atapicd +device atapist +options ATA_STATIC_ID +device scbus +device da +device sa +device cd +device pass +device uart +device em +device miibus +device vr +device wlan +options IEEE80211_DEBUG +options IEEE80211_AMPDU_AGE +options IEEE80211_SUPPORT_MESH +device wlan_wep +device wlan_ccmp +device wlan_tkip +device wlan_amrr +device an +device ath +device ath_hal +options AH_SUPPORT_AR5416 +device ath_rate_sample +device wi +device loop +device random +device ether +device tun +device pty +device md +device gif +device faith +device firmware +device bpf +device uhci +device ohci +device ehci +device usb +device ulpt +device umass +device u3g +device ubsa +device uftdi + +options INCLUDE_CONFIG_FILE + +options ALTQ +options ALTQ_CBQ +options ALTQ_RED +options ALTQ_RIO +options ALTQ_HFSC +options ALTQ_CDNR +options ALTQ_PRIQ + +device pf +device pflog +device pfsync +device carp +device if_bridge + +options DEVICE_POLLING + +options NETGRAPH +options NETGRAPH_BPF +options NETGRAPH_ETHER +options NETGRAPH_IFACE +options NETGRAPH_PPP +options NETGRAPH_PPPOE +options NETGRAPH_PPTPGRE +options NETGRAPH_MPPC_ENCRYPTION +options NETGRAPH_SOCKET +options NETGRAPH_KSOCKET +options NETGRAPH_VJC + +options NFS_ROOT +options BOOTP +options BOOTP_NFSROOT +options BOOTP_NFSV3 +#options BOOTP_WIRED_TO=fxp0 +#options BOOTP_WIRED_TO=ath0 +options BOOTP_COMPAT diff --git a/tools/tools/nanobsd/pcengines/Files/etc/rc.conf b/tools/tools/nanobsd/pcengines/Files/etc/rc.conf new file mode 100644 index 0000000..4db828e --- /dev/null +++ b/tools/tools/nanobsd/pcengines/Files/etc/rc.conf @@ -0,0 +1,13 @@ +# +# $FreeBSD$ +# + +hostname="alix" +ifconfig_vr0="DHCP" +ifconfig_em0="DHCP" + +sshd_enable="YES" +#ntpdate_enable="YES" +#ntpdate_hosts="1.0.0.0" +#ntpd_enable="YES" +#ntpd_sync_on_start="YES" diff --git a/tools/tools/nanobsd/pcengines/Files/etc/ttys b/tools/tools/nanobsd/pcengines/Files/etc/ttys new file mode 100644 index 0000000..7d28bad --- /dev/null +++ b/tools/tools/nanobsd/pcengines/Files/etc/ttys @@ -0,0 +1,565 @@ +# +# $FreeBSD$ +# @(#)ttys 5.1 (Berkeley) 4/17/89 +# +# This file specifies various information about terminals on the system. +# It is used by several different programs. Common entries for the +# various columns include: +# +# name The name of the terminal device. +# +# getty The program to start running on the terminal. Typically a +# getty program, as the name implies. Other common entries +# include none, when no getty is needed, and xdm, to start the +# X Window System. +# +# type The initial terminal type for this port. For hardwired +# terminal lines, this will contain the type of terminal used. +# For virtual consoles, the correct type is typically xterm, but +# vt220 will work better if you need interoperability with other +# systems like Solaris or GNU/Linux. +# Other common values include network for network connections on +# pseudo-terminals, dialup for incoming modem ports, and unknown +# when the terminal type cannot be predetermined. +# +# status Must be on or off. If on, init will run the getty program on +# the specified port. If the word "secure" appears, this tty +# allows root login. +# +# name getty type status comments +# +# If console is marked "insecure", then init will ask for the root password +# when going to single-user mode. +console none unknown off secure +# +ttyv0 "/usr/libexec/getty Pc" xterm off secure +# Virtual terminals +ttyv1 "/usr/libexec/getty Pc" xterm off secure +ttyv2 "/usr/libexec/getty Pc" xterm off secure +ttyv3 "/usr/libexec/getty Pc" xterm off secure +ttyv4 "/usr/libexec/getty Pc" xterm off secure +ttyv5 "/usr/libexec/getty Pc" xterm off secure +ttyv6 "/usr/libexec/getty Pc" xterm off secure +ttyv7 "/usr/libexec/getty Pc" xterm off secure +ttyv8 "/usr/local/bin/xdm -nodaemon" xterm off secure +# Serial terminals +# The 'dialup' keyword identifies dialin lines to login, fingerd etc. +ttyu0 "/usr/libexec/getty std.9600" xterm on secure +ttyd1 "/usr/libexec/getty std.9600" dialup off secure +ttyd2 "/usr/libexec/getty std.9600" dialup off secure +ttyd3 "/usr/libexec/getty std.9600" dialup off secure +# Dumb console +dcons "/usr/libexec/getty std.9600" vt100 off secure +# Pseudo terminals +ttyp0 none network +ttyp1 none network +ttyp2 none network +ttyp3 none network +ttyp4 none network +ttyp5 none network +ttyp6 none network +ttyp7 none network +ttyp8 none network +ttyp9 none network +ttypa none network +ttypb none network +ttypc none network +ttypd none network +ttype none network +ttypf none network +ttypg none network +ttyph none network +ttypi none network +ttypj none network +ttypk none network +ttypl none network +ttypm none network +ttypn none network +ttypo none network +ttypp none network +ttypq none network +ttypr none network +ttyps none network +ttypt none network +ttypu none network +ttypv none network +ttyq0 none network +ttyq1 none network +ttyq2 none network +ttyq3 none network +ttyq4 none network +ttyq5 none network +ttyq6 none network +ttyq7 none network +ttyq8 none network +ttyq9 none network +ttyqa none network +ttyqb none network +ttyqc none network +ttyqd none network +ttyqe none network +ttyqf none network +ttyqg none network +ttyqh none network +ttyqi none network +ttyqj none network +ttyqk none network +ttyql none network +ttyqm none network +ttyqn none network +ttyqo none network +ttyqp none network +ttyqq none network +ttyqr none network +ttyqs none network +ttyqt none network +ttyqu none network +ttyqv none network +ttyr0 none network +ttyr1 none network +ttyr2 none network +ttyr3 none network +ttyr4 none network +ttyr5 none network +ttyr6 none network +ttyr7 none network +ttyr8 none network +ttyr9 none network +ttyra none network +ttyrb none network +ttyrc none network +ttyrd none network +ttyre none network +ttyrf none network +ttyrg none network +ttyrh none network +ttyri none network +ttyrj none network +ttyrk none network +ttyrl none network +ttyrm none network +ttyrn none network +ttyro none network +ttyrp none network +ttyrq none network +ttyrr none network +ttyrs none network +ttyrt none network +ttyru none network +ttyrv none network +ttys0 none network +ttys1 none network +ttys2 none network +ttys3 none network +ttys4 none network +ttys5 none network +ttys6 none network +ttys7 none network +ttys8 none network +ttys9 none network +ttysa none network +ttysb none network +ttysc none network +ttysd none network +ttyse none network +ttysf none network +ttysg none network +ttysh none network +ttysi none network +ttysj none network +ttysk none network +ttysl none network +ttysm none network +ttysn none network +ttyso none network +ttysp none network +ttysq none network +ttysr none network +ttyss none network +ttyst none network +ttysu none network +ttysv none network +ttyP0 none network +ttyP1 none network +ttyP2 none network +ttyP3 none network +ttyP4 none network +ttyP5 none network +ttyP6 none network +ttyP7 none network +ttyP8 none network +ttyP9 none network +ttyPa none network +ttyPb none network +ttyPc none network +ttyPd none network +ttyPe none network +ttyPf none network +ttyPg none network +ttyPh none network +ttyPi none network +ttyPj none network +ttyPk none network +ttyPl none network +ttyPm none network +ttyPn none network +ttyPo none network +ttyPp none network +ttyPq none network +ttyPr none network +ttyPs none network +ttyPt none network +ttyPu none network +ttyPv none network +ttyQ0 none network +ttyQ1 none network +ttyQ2 none network +ttyQ3 none network +ttyQ4 none network +ttyQ5 none network +ttyQ6 none network +ttyQ7 none network +ttyQ8 none network +ttyQ9 none network +ttyQa none network +ttyQb none network +ttyQc none network +ttyQd none network +ttyQe none network +ttyQf none network +ttyQg none network +ttyQh none network +ttyQi none network +ttyQj none network +ttyQk none network +ttyQl none network +ttyQm none network +ttyQn none network +ttyQo none network +ttyQp none network +ttyQq none network +ttyQr none network +ttyQs none network +ttyQt none network +ttyQu none network +ttyQv none network +ttyR0 none network +ttyR1 none network +ttyR2 none network +ttyR3 none network +ttyR4 none network +ttyR5 none network +ttyR6 none network +ttyR7 none network +ttyR8 none network +ttyR9 none network +ttyRa none network +ttyRb none network +ttyRc none network +ttyRd none network +ttyRe none network +ttyRf none network +ttyRg none network +ttyRh none network +ttyRi none network +ttyRj none network +ttyRk none network +ttyRl none network +ttyRm none network +ttyRn none network +ttyRo none network +ttyRp none network +ttyRq none network +ttyRr none network +ttyRs none network +ttyRt none network +ttyRu none network +ttyRv none network +ttyS0 none network +ttyS1 none network +ttyS2 none network +ttyS3 none network +ttyS4 none network +ttyS5 none network +ttyS6 none network +ttyS7 none network +ttyS8 none network +ttyS9 none network +ttySa none network +ttySb none network +ttySc none network +ttySd none network +ttySe none network +ttySf none network +ttySg none network +ttySh none network +ttySi none network +ttySj none network +ttySk none network +ttySl none network +ttySm none network +ttySn none network +ttySo none network +ttySp none network +ttySq none network +ttySr none network +ttySs none network +ttySt none network +ttySu none network +ttySv none network +ttyl0 none network +ttyl1 none network +ttyl2 none network +ttyl3 none network +ttyl4 none network +ttyl5 none network +ttyl6 none network +ttyl7 none network +ttyl8 none network +ttyl9 none network +ttyla none network +ttylb none network +ttylc none network +ttyld none network +ttyle none network +ttylf none network +ttylg none network +ttylh none network +ttyli none network +ttylj none network +ttylk none network +ttyll none network +ttylm none network +ttyln none network +ttylo none network +ttylp none network +ttylq none network +ttylr none network +ttyls none network +ttylt none network +ttylu none network +ttylv none network +ttym0 none network +ttym1 none network +ttym2 none network +ttym3 none network +ttym4 none network +ttym5 none network +ttym6 none network +ttym7 none network +ttym8 none network +ttym9 none network +ttyma none network +ttymb none network +ttymc none network +ttymd none network +ttyme none network +ttymf none network +ttymg none network +ttymh none network +ttymi none network +ttymj none network +ttymk none network +ttyml none network +ttymm none network +ttymn none network +ttymo none network +ttymp none network +ttymq none network +ttymr none network +ttyms none network +ttymt none network +ttymu none network +ttymv none network +ttyn0 none network +ttyn1 none network +ttyn2 none network +ttyn3 none network +ttyn4 none network +ttyn5 none network +ttyn6 none network +ttyn7 none network +ttyn8 none network +ttyn9 none network +ttyna none network +ttynb none network +ttync none network +ttynd none network +ttyne none network +ttynf none network +ttyng none network +ttynh none network +ttyni none network +ttynj none network +ttynk none network +ttynl none network +ttynm none network +ttynn none network +ttyno none network +ttynp none network +ttynq none network +ttynr none network +ttyns none network +ttynt none network +ttynu none network +ttynv none network +ttyo0 none network +ttyo1 none network +ttyo2 none network +ttyo3 none network +ttyo4 none network +ttyo5 none network +ttyo6 none network +ttyo7 none network +ttyo8 none network +ttyo9 none network +ttyoa none network +ttyob none network +ttyoc none network +ttyod none network +ttyoe none network +ttyof none network +ttyog none network +ttyoh none network +ttyoi none network +ttyoj none network +ttyok none network +ttyol none network +ttyom none network +ttyon none network +ttyoo none network +ttyop none network +ttyoq none network +ttyor none network +ttyos none network +ttyot none network +ttyou none network +ttyov none network +ttyL0 none network +ttyL1 none network +ttyL2 none network +ttyL3 none network +ttyL4 none network +ttyL5 none network +ttyL6 none network +ttyL7 none network +ttyL8 none network +ttyL9 none network +ttyLa none network +ttyLb none network +ttyLc none network +ttyLd none network +ttyLe none network +ttyLf none network +ttyLg none network +ttyLh none network +ttyLi none network +ttyLj none network +ttyLk none network +ttyLl none network +ttyLm none network +ttyLn none network +ttyLo none network +ttyLp none network +ttyLq none network +ttyLr none network +ttyLs none network +ttyLt none network +ttyLu none network +ttyLv none network +ttyM0 none network +ttyM1 none network +ttyM2 none network +ttyM3 none network +ttyM4 none network +ttyM5 none network +ttyM6 none network +ttyM7 none network +ttyM8 none network +ttyM9 none network +ttyMa none network +ttyMb none network +ttyMc none network +ttyMd none network +ttyMe none network +ttyMf none network +ttyMg none network +ttyMh none network +ttyMi none network +ttyMj none network +ttyMk none network +ttyMl none network +ttyMm none network +ttyMn none network +ttyMo none network +ttyMp none network +ttyMq none network +ttyMr none network +ttyMs none network +ttyMt none network +ttyMu none network +ttyMv none network +ttyN0 none network +ttyN1 none network +ttyN2 none network +ttyN3 none network +ttyN4 none network +ttyN5 none network +ttyN6 none network +ttyN7 none network +ttyN8 none network +ttyN9 none network +ttyNa none network +ttyNb none network +ttyNc none network +ttyNd none network +ttyNe none network +ttyNf none network +ttyNg none network +ttyNh none network +ttyNi none network +ttyNj none network +ttyNk none network +ttyNl none network +ttyNm none network +ttyNn none network +ttyNo none network +ttyNp none network +ttyNq none network +ttyNr none network +ttyNs none network +ttyNt none network +ttyNu none network +ttyNv none network +ttyO0 none network +ttyO1 none network +ttyO2 none network +ttyO3 none network +ttyO4 none network +ttyO5 none network +ttyO6 none network +ttyO7 none network +ttyO8 none network +ttyO9 none network +ttyOa none network +ttyOb none network +ttyOc none network +ttyOd none network +ttyOe none network +ttyOf none network +ttyOg none network +ttyOh none network +ttyOi none network +ttyOj none network +ttyOk none network +ttyOl none network +ttyOm none network +ttyOn none network +ttyOo none network +ttyOp none network +ttyOq none network +ttyOr none network +ttyOs none network +ttyOt none network +ttyOu none network +ttyOv none network diff --git a/tools/tools/nanobsd/pcengines/Files/root/.cshrc b/tools/tools/nanobsd/pcengines/Files/root/.cshrc new file mode 100644 index 0000000..313af8e --- /dev/null +++ b/tools/tools/nanobsd/pcengines/Files/root/.cshrc @@ -0,0 +1,35 @@ +# $FreeBSD$ +# +# .cshrc - csh resource script, read at beginning of execution by each shell +# +# see also csh(1), environ(7). +# + +alias h history 25 +alias j jobs -l +alias la ls -a +alias lf ls -FA +alias ll ls -lA + +# A righteous umask +umask 22 + +set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin /usr/X11R6/bin $HOME/bin) + +setenv EDITOR vi +setenv PAGER more +setenv BLOCKSIZE K + +if ($?prompt) then + # An interactive shell -- set some stuff up + set prompt = "`/bin/hostname -s`# " + set filec + set history = 100 + set savehist = 100 + set mail = (/var/mail/$USER) + if ( $?tcsh ) then + bindkey "^W" backward-delete-word + bindkey -k up history-search-backward + bindkey -k down history-search-forward + endif +endif diff --git a/tools/tools/nanobsd/pcengines/Files/root/.k5login b/tools/tools/nanobsd/pcengines/Files/root/.k5login new file mode 100644 index 0000000..e01b941 --- /dev/null +++ b/tools/tools/nanobsd/pcengines/Files/root/.k5login @@ -0,0 +1,4 @@ +# $FreeBSD$ +# +# user1/root@YOUR.REALM.WHEREVER +# user2/root@YOUR.REALM.WHEREVER diff --git a/tools/tools/nanobsd/pcengines/Files/root/.login b/tools/tools/nanobsd/pcengines/Files/root/.login new file mode 100644 index 0000000..3032ef9 --- /dev/null +++ b/tools/tools/nanobsd/pcengines/Files/root/.login @@ -0,0 +1,9 @@ +# $FreeBSD$ +# +# .login - csh login script, read by login shell, after `.cshrc' at login. +# +# see also csh(1), environ(7). +# + +# Uncomment to display a random cookie each login: +# [ -x /usr/games/fortune ] && /usr/games/fortune -s diff --git a/tools/tools/nanobsd/pcengines/Files/root/change_password b/tools/tools/nanobsd/pcengines/Files/root/change_password new file mode 100644 index 0000000..daf4c8c --- /dev/null +++ b/tools/tools/nanobsd/pcengines/Files/root/change_password @@ -0,0 +1,40 @@ +#!/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$ +# + +set -e + +passwd root + +cfgslice=`grep '/cfg' /etc/fstab | cut -d \ -f 1` + +trap "umount /cfg" 1 2 15 EXIT +mount /cfg +cp /etc/master.passwd /etc/passwd /etc/pwd.db /etc/spwd.db /etc/group /cfg +umount /cfg +trap 1 2 15 EXIT diff --git a/tools/tools/nanobsd/pcengines/Files/root/save_cfg b/tools/tools/nanobsd/pcengines/Files/root/save_cfg new file mode 100644 index 0000000..19f1195 --- /dev/null +++ b/tools/tools/nanobsd/pcengines/Files/root/save_cfg @@ -0,0 +1,42 @@ +#!/bin/sh +# +# Copyright (c) 2006 Mathieu Arnold +# 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$ +# + +set -e + +trap "umount /cfg" 1 2 15 EXIT +mount /cfg +( +cd /cfg +for i in "$@" `find * -type f` +do + cmp -s /etc/$i /cfg/$i || cp -pfv /etc/$i /cfg/$i +done +) +umount /cfg +trap 1 2 15 EXIT diff --git a/tools/tools/nanobsd/pcengines/Files/root/save_sshkeys b/tools/tools/nanobsd/pcengines/Files/root/save_sshkeys new file mode 100644 index 0000000..03fccf4 --- /dev/null +++ b/tools/tools/nanobsd/pcengines/Files/root/save_sshkeys @@ -0,0 +1,40 @@ +#!/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$ +# + +set -e + +trap "umount /cfg" 1 2 15 EXIT +mount /cfg +mkdir -p /cfg/ssh +( +cd /etc/ssh +cp ssh_host_* /cfg/ssh +) +umount /cfg +trap 1 2 15 EXIT diff --git a/tools/tools/nanobsd/pcengines/Files/root/updatep1 b/tools/tools/nanobsd/pcengines/Files/root/updatep1 new file mode 100644 index 0000000..6b83de5 --- /dev/null +++ b/tools/tools/nanobsd/pcengines/Files/root/updatep1 @@ -0,0 +1,54 @@ +#!/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}s1a + +gpart set -a active -i 1 ${NANO_DRIVE} diff --git a/tools/tools/nanobsd/pcengines/Files/root/updatep2 b/tools/tools/nanobsd/pcengines/Files/root/updatep2 new file mode 100644 index 0000000..fc5312b --- /dev/null +++ b/tools/tools/nanobsd/pcengines/Files/root/updatep2 @@ -0,0 +1,61 @@ +#!/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}s2a + +# Update the /etc/fstab +trap "umount /mnt" 1 2 15 EXIT +mount /dev/${NANO_DRIVE}s2a /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} diff --git a/tools/tools/nanobsd/pcengines/Files/usr/ports/.keepme b/tools/tools/nanobsd/pcengines/Files/usr/ports/.keepme new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tools/tools/nanobsd/pcengines/Files/usr/ports/.keepme diff --git a/tools/tools/nanobsd/pcengines/alix_dsk.conf b/tools/tools/nanobsd/pcengines/alix_dsk.conf new file mode 100644 index 0000000..559f6ab --- /dev/null +++ b/tools/tools/nanobsd/pcengines/alix_dsk.conf @@ -0,0 +1,29 @@ +# +# $FreeBSD$ +# + +NANO_KERNEL=ALIX_DSK +NANO_NAME=alix_dsk +NANO_ARCH=i386 +TARGET_ARCH=i386; export TARGET_ARCH +#TARGET_CPUTYPE=i386; export TARGET_CPUTYPE +#CONF_BUILD="TARGET_ARCH=i386 TARGET_CPUTYPE=i386" +#CONF_INSTALL="TARGET_ARCH=i386 TARGET_CPUTYPE=i386" +#CONF_BUILD="TARGET_ARCH=i386" +#CONF_INSTALL="TARGET_ARCH=i386" +# Phys C/H/S 7964/16/63 +# Log C/H/S 995/128/63 +NANO_MEDIASIZE="8027712" +NANO_SECTS="63" +#PHYS +NANO_HEADS="16" +#LOG +#NANO_HEADS="64" +NANO_IMAGES="2" +# Initialize the second slice =1, or not =0 +NANO_INIT_IMG2="0" +#NANO_BOOT0CFG="-o packet,noupdate -s 1 -m 3" +NANO_BOOT0CFG="-o packet,update,nosetdrv -s 1 -m 3" +NANO_DRIVE=ad0 + +. common.conf diff --git a/tools/tools/nanobsd/pcengines/alix_nfs.conf b/tools/tools/nanobsd/pcengines/alix_nfs.conf new file mode 100644 index 0000000..745fd4b --- /dev/null +++ b/tools/tools/nanobsd/pcengines/alix_nfs.conf @@ -0,0 +1,26 @@ +# +# $FreeBSD$ +# + +NANO_KERNEL=ALIX_NFS +NANO_NAME=alix_nfs +NANO_ARCH=i386 +TARGET_ARCH=i386; export TARGET_ARCH +#TARGET_CPUTYPE=i386; export TARGET_CPUTYPE +#CONF_BUILD="TARGET_ARCH=i386 TARGET_CPUTYPE=i386" +#CONF_INSTALL="TARGET_ARCH=i386 TARGET_CPUTYPE=i386" +#CONF_BUILD="TARGET_ARCH=i386" +#CONF_INSTALL="TARGET_ARCH=i386" +# Phys C/H/S 7964/16/63 +# Log C/H/S 995/128/63 +NANO_MEDIASIZE="8027712" +NANO_SECTS="63" +#PHYS +NANO_HEADS="16" +#LOG +#NANO_HEADS="64" +NANO_IMAGES="2" +NANO_INIT_IMG2="0" +NANO_BOOT0CFG="-o nopacket,noupdate -s 1 -m 3" + +. common.conf diff --git a/tools/tools/nanobsd/pcengines/build.sh b/tools/tools/nanobsd/pcengines/build.sh new file mode 100755 index 0000000..525b7ba --- /dev/null +++ b/tools/tools/nanobsd/pcengines/build.sh @@ -0,0 +1,18 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +if [ -z "${1}" -o \! -f "${1}" ]; then + echo "Usage: $0 cfg_file [-bhiknw]" + echo "-i : skip image build" + echo "-w : skip buildworld step" + echo "-k : skip buildkernel step" + echo "-b : skip buildworld and buildkernel step" + exit +fi + +CFG="${1}" +shift; + +sh ../nanobsd.sh $* -c ${CFG} diff --git a/tools/tools/nanobsd/pcengines/common.conf b/tools/tools/nanobsd/pcengines/common.conf new file mode 100644 index 0000000..cfbe8d6 --- /dev/null +++ b/tools/tools/nanobsd/pcengines/common.conf @@ -0,0 +1,83 @@ +# +# $FreeBSD$ +# + +NANO_TOOLS=`pwd` +NANO_PACKAGE_DIR=`pwd`/Pkg +#NANO_RAM_TMPVARSIZE=20480 +#NANO_RAM_TMPVARSIZE=30720 +NANO_RAM_TMPVARSIZE=40960 +NANO_PMAKE="make -j 8" + +NANO_MD_BACKING="swap" +#NANO_MAKEFS="makefs \ +# -o bsize=4096,fsize=512,density=8192,optimization=space" +#export NANO_MAKEFS + +# Options to put in make.conf during buildworld only +CONF_BUILD=' +NO_CLEAN=YES +' +# Options to put in make.conf during installworld only +CONF_INSTALL=' +' +# Options to put in make.conf during both build- & installworld. +CONF_WORLD=' +#TARGET_ARCH=i386 +CFLAGS=-O -pipe +WITHOUT_ACPI= +MODULES_OVERRIDE=netgraph rc4 +BOOT_PXELDR_PROBE_KEYBOARD=1 +BOOT_PXELDR_ALWAYS_SERIAL=1 +BOOT_COMCONSOLE_SPEED=9600 +' + +customize_cmd cust_comconsole +customize_cmd cust_allow_ssh_root +customize_cmd cust_install_files +cust_install_machine_files() ( + MACHINE_DIR="${NANO_TOOLS}/Files.${NANO_NAME}" + if [ -d "${MACHINE_DIR}" ]; then + cd ${MACHINE_DIR} + find . -print | grep -Ev '/(CVS|\.svn)' | cpio -dumpv ${NANO_WORLDDIR} + else + echo "${MACHINE_DIR} not found, skipping step" + fi +) +customize_cmd cust_install_machine_files + +cust_ld32_cfg () ( + cd ${NANO_WORLDDIR}/libexec + if [ \! -f ld-elf32.so.1 ]; then + ln -s ld-elf.so.1 ld-elf32.so.1 + fi +) +customize_cmd cust_ld32_cfg + +cust_boot_cfg () ( + cd ${NANO_WORLDDIR} + echo "-S9600 -h" > boot.config + echo "console=\"comconsole\"" > boot/loader.conf + echo "comconsole_speed=\"9600\"" >> boot/loader.conf + echo "hint.acpi.0.disabled=\"1\"" >> boot/loader.conf +) +customize_cmd cust_boot_cfg +customize_cmd cust_pkg +cust_etc_cfg () ( + cd ${NANO_WORLDDIR} + mkdir -pv z/scratch + echo "fs:/usr/ports /usr/ports nfs rw,noauto,noatime,bg,soft,intr,nfsv3 0 0" >> etc/fstab + echo "fs:/mnt/Backup /mnt/Backup nfs rw,noauto,noatime,bg,soft,intr,nfsv3 0 0" >> etc/fstab + echo "fs:/mnt/Ablage /mnt/Ablage nfs rw,noauto,noatime,bg,soft,intr,nfsv3 0 0" >> etc/fstab + echo "/dev/ad1s1a /z/scratch ufs rw,noauto,noatime 0 0" >> etc/fstab +) +customize_cmd cust_etc_cfg + +last_orders () ( + pprint 2 "last orders" + ( + cd ${NANO_WORLDDIR} + touch conf/default/etc/.keepme + touch conf/default/var/.keepme + ) +) diff --git a/tools/tools/nanobsd/pcengines/test.sh b/tools/tools/nanobsd/pcengines/test.sh new file mode 100755 index 0000000..9997c81 --- /dev/null +++ b/tools/tools/nanobsd/pcengines/test.sh @@ -0,0 +1,59 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +_run () { + case "$1" in + "alix_dsk") + ARG="-cpu pentium" + ARG="$ARG -hda /usr/obj/nanobsd.alix_dsk/_.disk.full -boot c" + ARG="$ARG -hdb /z/scratch/scratch" + ARG="$ARG -net nic,model=e1000" + ARG="$ARG -net tap,ifname=tap0,script=no,downscript=no" + ARG="$ARG -m 1024 -k de -localtime -nographic" + break + ;; + "alix_nfs") + ARG="-cpu pentium" + ARG="$ARG -hda /usr/obj/nanobsd.alix_nfs/_.disk.full -boot c" + ARG="$ARG -hdb /z/scratch/scratch" + ARG="$ARG -net nic,model=e1000" + ARG="$ARG -net tap,ifname=tap0,script=no,downscript=no" + ARG="$ARG -m 1024 -k de -localtime -nographic" + break + ;; + + esac + qemu-system-x86_64 -kernel-kqemu $ARG +} + +_init () { + kldstat -n kqemu || kldload kqemu + kldstat -n aio || kldload aio + kldstat -n if_tap || kldload if_tap + kldstat -n if_bridge || kldload if_bridge + sysctl net.link.tap.up_on_open=1 + ifconfig bridge0 down destroy + ifconfig tap0 down destroy + ifconfig tap0 create up + ifconfig bridge0 create + ifconfig bridge0 addm nfe0 addm tap0 up +} + +_ifup () { + sleep 2; + ifconfig bridge0 -learn nfe0 + ifconfig tap0 up + ifconfig bridge0 up +} + +_clear () { + ifconfig bridge0 down destroy + ifconfig tap0 down destroy +} + +_init +(_ifup) & +_run "$1" +_clear |