Permalink
Browse files

Adding files

  • Loading branch information...
1 parent 51390f0 commit 167ed2680c7c5b22fe52eb0c6fd25818da9cee89 Scott Ullrich committed Jun 20, 2011
Showing with 4,890 additions and 0 deletions.
  1. +28 −0 COPYING
  2. +121 −0 Makefile
  3. +307 −0 conf/amd64/FREESBIE
  4. +132 −0 conf/freesbie.defaults.conf
  5. +321 −0 conf/i386/FREESBIE
  6. +5 −0 conf/make.conf
  7. +52 −0 conf/make.conf.minimal
  8. +142 −0 conf/powerpc/FREESBIE
  9. +40 −0 conf/rc.d/unionfs
  10. +42 −0 conf/rc.d/uzip
  11. +59 −0 extra/README
  12. +69 −0 extra/adduser.sh
  13. +62 −0 extra/adduser/homemfs.rc
  14. +20 −0 extra/autologin.sh
  15. +26 −0 extra/backup.sh
  16. +35 −0 extra/backup/restorebackup.rc
  17. +166 −0 extra/backup/restorebackup.sh
  18. +143 −0 extra/backup/savebackup.sh
  19. +35 −0 extra/buildmodules.sh
  20. +47 −0 extra/comconsole.sh
  21. +53 −0 extra/customroot.sh
  22. +9 −0 extra/customroot/README
  23. +28 −0 extra/customscripts.sh
  24. +4 −0 extra/customscripts/README
  25. +29 −0 extra/etcmfs.sh
  26. +80 −0 extra/etcmfs/etcmfs.rc
  27. +75 −0 extra/installports.sh
  28. +19 −0 extra/l10n.sh
  29. +229 −0 extra/l10n/l10n.rc
  30. +31 −0 extra/mountdisks.sh
  31. +160 −0 extra/mountdisks/mountdisks.sh
  32. +27 −0 extra/mountdisks/mountdisksrc.sh
  33. +22 −0 extra/pf.sh
  34. +45 −0 extra/pf/pf_rules.sh
  35. +24 −0 extra/rootmfs.sh
  36. +62 −0 extra/rootmfs/rootmfs.rc
  37. +23 −0 extra/sound.sh
  38. +16 −0 extra/sound/snd_card_ids.txt
  39. +37 −0 extra/sound/sound_detect.sh
  40. +24 −0 extra/suid.sh
  41. +20 −0 extra/swapfind.sh
  42. +44 −0 extra/swapfind/swapfind.sh
  43. +26 −0 extra/varmfs.sh
  44. +66 −0 extra/varmfs/varmfs.rc
  45. +22 −0 extra/xautostart.sh
  46. +57 −0 extra/xautostart/xautostart.rc
  47. +25 −0 extra/xconfig-probe.sh
  48. +35 −0 extra/xconfig-probe/xconfig-probe.sh
  49. +75 −0 extra/xconfig-probe/xkbdlayout.sh
  50. +26 −0 extra/xconfig.sh
  51. +73 −0 extra/xconfig/xconfig.sh
  52. +75 −0 extra/xconfig/xkbdlayout.sh
  53. +1 −0 pfSense-freesbie2
  54. 0 pfSense_version
  55. +113 −0 scripts/buildkernel.sh
  56. +59 −0 scripts/buildworld.sh
  57. +36 −0 scripts/cleandir.sh
  58. +219 −0 scripts/clonefs.sh
  59. +123 −0 scripts/compressfs.sh
  60. +5 −0 scripts/custom/README
  61. +36 −0 scripts/extra.sh
  62. +56 −0 scripts/flash.sh
  63. +71 −0 scripts/img.sh
  64. +64 −0 scripts/installkernel.sh
  65. +57 −0 scripts/installworld.sh
  66. +67 −0 scripts/iso.sh
  67. +108 −0 scripts/launch.sh
  68. +201 −0 scripts/pkginstall.sh
  69. +219 −0 scripts/pkgselect.sh
  70. +62 −0 scripts/powerpc/iso.sh
View
28 COPYING
@@ -0,0 +1,28 @@
+/*-
+ * Copyright (c) 2005-2008 FreeSBIE Project
+ * 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$
+ * $Id: COPYING,v 1.1.1.1 2008/03/25 19:58:15 sullrich Exp $
+ */
View
121 Makefile
@@ -0,0 +1,121 @@
+#
+# Copyright (c) 2005 Dario Freni
+#
+# See COPYING for licence terms.
+#
+# $FreeBSD$
+# $Id: Makefile,v 1.3 2008/05/05 20:51:04 sullrich Exp $
+#
+# FreeSBIE makefile. Main targets are:
+#
+# iso: build an iso image
+# img: build a loopback image
+# flash: copy the built system on a device (interactive)
+# freesbie: same of `iso'
+#
+# pkgselect: choose packages to include in the built system (interactive)
+
+.if defined(MAKEOBJDIRPREFIX)
+CANONICALOBJDIR:=${MAKEOBJDIRPREFIX}${.CURDIR}
+.else
+CANONICALOBJDIR:=/usr/obj${.CURDIR}
+.endif
+
+all: freesbie
+
+freesbie: iso
+
+pkgselect: obj
+ @sh ${.CURDIR}/scripts/launch.sh ${.CURDIR} pkgselect
+
+obj: .done_objdir
+.done_objdir:
+ @if ! test -d ${CANONICALOBJDIR}/; then \
+ mkdir -p ${CANONICALOBJDIR}; \
+ if ! test -d ${CANONICALOBJDIR}/; then \
+ ${ECHO} "Unable to create ${CANONICALOBJDIR}."; \
+ exit 1; \
+ fi; \
+ fi
+ @if ! test -f .done_objdir; then \
+ touch ${CANONICALOBJDIR}/.done_objdir; \
+ fi
+
+buildworld: .done_buildworld
+.done_buildworld: .done_objdir
+ @-rm -f ${CANONICALOBJDIR}/.tmp_buildworld
+ @touch ${CANONICALOBJDIR}/.tmp_buildworld
+ @sh ${.CURDIR}/scripts/launch.sh ${.CURDIR} buildworld ${CANONICALOBJDIR}/.tmp_buildworld
+ @mv ${CANONICALOBJDIR}/.tmp_buildworld ${CANONICALOBJDIR}/.done_buildworld
+
+installworld: .done_installworld
+.done_installworld: .done_buildworld
+ @-rm -f ${CANONICALOBJDIR}/.tmp_installworld
+ @touch ${CANONICALOBJDIR}/.tmp_installworld
+ @sh ${.CURDIR}/scripts/launch.sh ${.CURDIR} installworld ${CANONICALOBJDIR}/.tmp_installworld
+ @mv ${CANONICALOBJDIR}/.tmp_installworld ${CANONICALOBJDIR}/.done_installworld
+
+buildkernel: .done_buildkernel
+.done_buildkernel: .done_buildworld
+ @-rm -f ${CANONICALOBJDIR}/.tmp_buildkernel
+ @touch ${CANONICALOBJDIR}/.tmp_buildkernel
+ @sh ${.CURDIR}/scripts/launch.sh ${.CURDIR} buildkernel ${CANONICALOBJDIR}/.tmp_buildkernel
+ @mv ${CANONICALOBJDIR}/.tmp_buildkernel ${CANONICALOBJDIR}/.done_buildkernel
+
+installkernel: .done_installkernel
+.done_installkernel: .done_buildkernel .done_installworld
+ @-rm -f ${CANONICALOBJDIR}/.tmp_installkernel
+ @touch ${CANONICALOBJDIR}/.tmp_installkernel
+ @sh ${.CURDIR}/scripts/launch.sh ${.CURDIR} installkernel ${CANONICALOBJDIR}/.tmp_installkernel
+ @mv ${CANONICALOBJDIR}/.tmp_installkernel ${CANONICALOBJDIR}/.done_installkernel
+
+pkginstall: .done_pkginstall
+.done_pkginstall: .done_installworld
+ @-rm -f ${CANONICALOBJDIR}/.tmp_pkginstall
+ @touch ${CANONICALOBJDIR}/.tmp_pkginstall
+ @sh ${.CURDIR}/scripts/launch.sh ${.CURDIR} pkginstall ${CANONICALOBJDIR}/.tmp_pkginstall
+ @mv ${CANONICALOBJDIR}/.tmp_pkginstall ${CANONICALOBJDIR}/.done_pkginstall
+
+extra: .done_extra
+.done_extra: .done_installworld
+ @-rm -f ${CANONICALOBJDIR}/.tmp_extra
+ @touch ${CANONICALOBJDIR}/.tmp_extra
+ @sh ${.CURDIR}/scripts/launch.sh ${.CURDIR} extra ${CANONICALOBJDIR}/.tmp_extra
+ @mv ${CANONICALOBJDIR}/.tmp_extra ${CANONICALOBJDIR}/.done_extra
+
+clonefs: .done_clonefs
+.done_clonefs: .done_installkernel .done_pkginstall .done_extra
+ @-rm -f ${CANONICALOBJDIR}/.tmp_clonefs
+ @touch ${CANONICALOBJDIR}/.tmp_clonefs
+ @sh ${.CURDIR}/scripts/launch.sh ${.CURDIR} clonefs ${CANONICALOBJDIR}/.tmp_clonefs
+ @mv ${CANONICALOBJDIR}/.tmp_clonefs ${CANONICALOBJDIR}/.done_clonefs
+
+compressfs:
+ @sh ${.CURDIR}/scripts/launch.sh ${.CURDIR} compressfs ${CANONICALOBJDIR}/.tmp_extra
+
+iso: .done_iso
+.done_iso: .done_clonefs
+ @-rm -f ${CANONICALOBJDIR}/.tmp_iso
+ @touch ${CANONICALOBJDIR}/.tmp_iso
+ @sh ${.CURDIR}/scripts/launch.sh ${.CURDIR} iso ${CANONICALOBJDIR}/.tmp_iso
+ @mv ${CANONICALOBJDIR}/.tmp_iso ${CANONICALOBJDIR}/.done_iso
+
+img: .done_img
+.done_img: .done_clonefs
+ @-rm -f ${CANONICALOBJDIR}/.tmp_img
+ @touch ${CANONICALOBJDIR}/.tmp_img
+ @sh ${.CURDIR}/scripts/launch.sh ${.CURDIR} img ${CANONICALOBJDIR}/.tmp_img
+ @mv ${CANONICALOBJDIR}/.tmp_img ${CANONICALOBJDIR}/.done_img
+
+flash: .done_flash
+.done_flash: .done_clonefs
+ @-rm -f ${CANONICALOBJDIR}/.tmp_flash
+ @touch ${CANONICALOBJDIR}/.tmp_flash
+ @sh ${.CURDIR}/scripts/launch.sh ${.CURDIR} flash ${CANONICALOBJDIR}/.tmp_flash
+ @mv ${CANONICALOBJDIR}/.tmp_flash ${CANONICALOBJDIR}/.done_flash
+
+clean:
+ @-rm -f .tmp* .done* > /dev/null 2>&1
+
+cleandir: clean
+ @sh ${.CURDIR}/scripts/launch.sh ${.CURDIR} cleandir
View
307 conf/amd64/FREESBIE
@@ -0,0 +1,307 @@
+ # $FreeBSD$
+# $Id: FREESBIE,v 1.1.1.1 2008/03/25 19:58:15 sullrich Exp $
+
+machine amd64
+cpu HAMMER
+ident FREESBIE
+
+# To statically compile in device wiring instead of /boot/device.hints
+#hints "GENERIC.hints" # Default places to look for devices.
+
+options SCHED_ULE # ULE scheduler
+#options SCHED_4BSD # 4BSD scheduler
+options PREEMPTION # Enable kernel thread preemption
+options INET # InterNETworking
+options INET6 # IPv6 communications protocols
+options SCTP # Stream Control Transmission Protocol
+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 UFS_GJOURNAL # Enable gjournal-based UFS journaling
+options MD_ROOT # MD is a potential root device
+options NFSCLIENT # Network Filesystem Client
+options NFSSERVER # Network Filesystem Server
+options NFS_ROOT # NFS usable as /, requires NFSCLIENT
+options NTFS # NT Filesystem
+options MSDOSFS # MSDOS Filesystem
+options CD9660 # ISO 9660 Filesystem
+options PROCFS # Process filesystem (requires PSEUDOFS)
+options PSEUDOFS # Pseudo-filesystem framework
+options GEOM_PART_GPT # GUID Partition Tables.
+options GEOM_LABEL # Provides labelization
+options COMPAT_43TTY # Needed by COMPAT_LINUX32
+options COMPAT_IA32 # Compatible with i386 binaries
+options COMPAT_FREEBSD6 # Compatible with FreeBSD6
+options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI
+options KTRACE # ktrace(1) support
+options STACK # stack(9) 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 STOP_NMI # Stop CPUS using NMI instead of IPI
+options UNIONFS # Union filesystem
+options TMPFS # efficient memory filesystem
+
+# Workarounds for some known-to-be-broken chipsets (nVidia nForce3-Pro150)
+device atpic # 8259A compatability
+
+# Enabling NO_MIXED_MODE gives a performance improvement on some motherboards
+# but does not work with some boards (mostly nVidia chipset based).
+#options NO_MIXED_MODE # Don't penalize working chipsets
+
+# SMP kernel
+options SMP # Symmetric MultiProcessor Kernel
+
+# CPU frequency control
+device cpufreq
+
+# Bus supports
+device acpi
+device pci
+
+# Floppy drives
+device fdc
+
+# ATA and ATAPI devices
+device ata
+device atadisk # ATA disk drives
+device ataraid # ATA RAID drives
+device atapicd # ATAPI CDROM drives
+device atapifd # ATAPI floppy drives
+device atapist # ATAPI tape drives
+options ATA_STATIC_ID # Static device numbering
+
+# SCSI Controllers
+device ahc # AHA2940 and onboard AIC7xxx devices
+options AHC_REG_PRETTY_PRINT # Print register bitfields in debug
+ # output. Adds ~128k to driver.
+device ahd # AHA39320/29320 and onboard AIC79xx devices
+options AHD_REG_PRETTY_PRINT # Print register bitfields in debug
+ # output. Adds ~215k to driver.
+device amd # AMD 53C974 (Tekram DC-390(T))
+device hptiop # Highpoint RocketRaid 3xxx series
+device isp # Qlogic family
+#device ispfw # Firmware for QLogic HBAs- normally a module
+device mpt # LSI-Logic MPT-Fusion
+#device ncr # NCR/Symbios Logic
+device sym # NCR/Symbios Logic (newer chipsets + those of `ncr')
+device trm # Tekram DC395U/UW/F DC315U adapters
+
+device adv # Advansys SCSI adapters
+device adw # Advansys wide SCSI adapters
+device aic # Adaptec 15[012]x SCSI adapters, AIC-6[23]60.
+device bt # Buslogic/Mylex MultiMaster SCSI adapters
+
+
+# SCSI peripherals
+device scbus # SCSI bus (required for SCSI)
+device ch # SCSI media changers
+device da # Direct Access (disks)
+device sa # Sequential Access (tape etc)
+device cd # CD
+device pass # Passthrough device (direct SCSI access)
+device ses # SCSI Environmental Services (and SAF-TE)
+
+# RAID controllers interfaced to the SCSI subsystem
+device amr # AMI MegaRAID
+device arcmsr # Areca SATA II RAID
+device ciss # Compaq Smart RAID 5*
+device dpt # DPT Smartcache III, IV - See NOTES for options
+device hptmv # Highpoint RocketRAID 182x
+device hptrr # Highpoint RocketRAID 17xx, 22xx, 23xx, 25xx
+device rr232x # Highpoint RocketRAID 232x
+device iir # Intel Integrated RAID
+device ips # IBM (Adaptec) ServeRAID
+device mly # Mylex AcceleRAID/eXtremeRAID
+device twa # 3ware 9000 series PATA/SATA RAID
+
+# RAID controllers
+device aac # Adaptec FSA RAID
+device aacp # SCSI passthrough for aac (requires CAM)
+device ida # Compaq Smart RAID
+device mfi # LSI MegaRAID SAS
+device mlx # Mylex DAC960 family
+#XXX pointer/int warnings
+#device pst # Promise Supertrak SX6000
+device twe # 3ware ATA RAID
+
+# atkbdc0 controls both the keyboard and the PS/2 mouse
+device atkbdc # AT keyboard controller
+device atkbd # AT keyboard
+device psm # PS/2 mouse
+
+device kbdmux # keyboard multiplexer
+
+device vga # VGA video card driver
+
+device splash # Splash screen and screen saver support
+
+# syscons is the default console driver, resembling an SCO console
+device sc
+
+device agp # support several AGP chipsets
+
+# PCCARD (PCMCIA) support
+# PCMCIA and cardbus bridge support
+device cbb # cardbus (yenta) bridge
+device pccard # PC Card (16-bit) bus
+device cardbus # CardBus (32-bit) bus
+
+# Serial (COM) ports
+device sio # 8250, 16[45]50 based serial ports
+device uart # Generic UART driver
+
+# Parallel port
+device ppc
+device ppbus # Parallel port bus (required)
+device lpt # Printer
+device plip # TCP/IP over parallel
+device ppi # Parallel port interface device
+#device vpo # Requires scbus and da
+
+# If you've got a "dumb" serial or parallel PCI card that is
+# supported by the puc(4) glue driver, uncomment the following
+# line to enable it (connects to the sio and/or ppc drivers):
+#device puc
+
+# PCI Ethernet NICs.
+device de # DEC/Intel DC21x4x (``Tulip'')
+device em # Intel PRO/1000 adapter Gigabit Ethernet Card
+device ixgb # Intel PRO/10GbE Ethernet Card
+device txp # 3Com 3cR990 (``Typhoon'')
+device vx # 3Com 3c590, 3c595 (``Vortex'')
+
+# PCI Ethernet NICs that use the common MII bus controller code.
+# NOTE: Be sure to keep the 'device miibus' line in order to use these NICs!
+device miibus # MII bus support
+device bce # Broadcom BCM5706/BCM5708 Gigabit Ethernet
+device bfe # Broadcom BCM440x 10/100 Ethernet
+device bge # Broadcom BCM570xx Gigabit Ethernet
+device dc # DEC/Intel 21143 and various workalikes
+device fxp # Intel EtherExpress PRO/100B (82557, 82558)
+device lge # Level 1 LXT1001 gigabit Ethernet
+device msk # Marvell/SysKonnect Yukon II Gigabit Ethernet
+device nfe # nVidia nForce MCP on-board Ethernet
+device nge # NatSemi DP83820 gigabit Ethernet
+#device nve # nVidia nForce MCP on-board Ethernet Networking
+device pcn # AMD Am79C97x PCI 10/100(precedence over 'lnc')
+device re # RealTek 8139C+/8169/8169S/8110S
+device rl # RealTek 8129/8139
+device sf # Adaptec AIC-6915 (``Starfire'')
+device sis # Silicon Integrated Systems SiS 900/SiS 7016
+device sk # SysKonnect SK-984x & SK-982x gigabit Ethernet
+device ste # Sundance ST201 (D-Link DFE-550TX)
+device ti # Alteon Networks Tigon I/II gigabit Ethernet
+device tl # Texas Instruments ThunderLAN
+device tx # SMC EtherPower II (83c170 ``EPIC'')
+device vge # VIA VT612x gigabit Ethernet
+device vr # VIA Rhine, Rhine II
+device wb # Winbond W89C840F
+device xl # 3Com 3c90x (``Boomerang'', ``Cyclone'')
+
+# ISA Ethernet NICs. pccard NICs included.
+device cs # Crystal Semiconductor CS89x0 NIC
+# 'device ed' requires 'device miibus'
+device ed # NE[12]000, SMC Ultra, 3c503, DS8390 cards
+device ex # Intel EtherExpress Pro/10 and Pro/10+
+device ep # Etherlink III based cards
+device fe # Fujitsu MB8696x based cards
+device sn # SMC's 9000 series of Ethernet chips
+device xe # Xircom pccard Ethernet
+
+# Wireless NIC cards
+device wlan # 802.11 support
+device wlan_wep # 802.11 WEP support
+device wlan_ccmp # 802.11 CCMP support
+device wlan_tkip # 802.11 TKIP support
+device wlan_amrr # 802.11 AMRR support
+device wlan_amrr # AMRR transmit rate control algorithm
+device wlan_scan_ap # 802.11 AP mode scanning
+device an # Aironet 4500/4800 802.11 wireless NICs.
+device ath # Atheros pci/cardbus NIC's
+device ath_hal # Atheros HAL (Hardware Access Layer)
+device ath_rate_sample # SampleRate tx rate control for ath
+device awi # BayStack 660 and others
+device ral # Ralink Technology RT2500 wireless NICs.
+device wi # WaveLAN/Intersil/Symbol 802.11 wireless NICs.
+
+# Pseudo devices.
+device loop # Network loopback
+device random # Entropy device
+device ether # Ethernet support
+device sl # Kernel SLIP
+device ppp # Kernel PPP
+device tun # Packet tunnel.
+device pty # Pseudo-ttys (telnet etc)
+device md # Memory "disks"
+device gif # IPv6 and IPv4 tunneling
+device faith # IPv6-to-IPv4 relaying (translation)
+device firmware # firmware assist module
+
+# The `bpf' device enables the Berkeley Packet Filter.
+# Be aware of the administrative consequences of enabling this!
+# Note that 'bpf' is required for DHCP.
+device bpf # Berkeley packet filter
+
+# USB support
+device uhci # UHCI PCI->USB interface
+device ohci # OHCI PCI->USB interface
+device ehci # EHCI PCI->USB interface (USB 2.0)
+device usb # USB Bus (required)
+#device udbp # USB Double Bulk Pipe devices
+device ugen # Generic
+device uhid # "Human Interface Devices"
+device ukbd # Keyboard
+device ulpt # Printer
+device umass # Disks/Mass storage - Requires scbus and da
+device ums # Mouse
+device ural # Ralink Technology RT2500USB wireless NICs
+device rum # Ralink Technology RT2501USB wireless NICs
+device urio # Diamond Rio 500 MP3 player
+device uscanner # Scanners
+# USB Serial devices
+device ucom # Generic com ttys
+device uark # Technologies ARK3116 based serial adapters
+device ubsa # Belkin F5U103 and compatible serial adapters
+device ubser # BWCT console serial adapters
+device uftdi # For FTDI usb serial adapters
+device uipaq # Some WinCE based devices
+device uplcom # Prolific PL-2303 serial adapters
+device uvisor # Visor and Palm devices
+device uvscom # USB serial support for DDI pocket's PHS
+# USB Ethernet, requires miibus
+device aue # ADMtek USB Ethernet
+device axe # ASIX Electronics USB Ethernet
+device cdce # Generic USB over Ethernet
+device cue # CATC USB Ethernet
+device kue # Kawasaki LSI USB Ethernet
+device rue # RealTek RTL8150 USB Ethernet
+device udav # Davicom DM9601E USB
+
+# FireWire support
+device firewire # FireWire bus code
+device sbp # SCSI over FireWire (Requires scbus and da)
+device fwe # Ethernet over FireWire (non-standard!)
+device fwip # IP over FireWire (rfc2734 and rfc3146)
+device dcons # Dumb console driver
+device dcons_crom # Configuration ROM for dcons
+
+device bktr
+
+options IPFIREWALL #firewall
+options IPFIREWALL_VERBOSE #print information about
+options IPFIREWALL_DEFAULT_TO_ACCEPT #allow everything by default
+
+device pf #PF OpenBSD packet-filter firewall
+device pflog #logging support interface for PF
+device pfsync #synchronization interface for PF
+
+options IPSTEALTH
+options IPDIVERT
+
+options GEOM_UZIP # Read-only compressed disks
+
+options SC_PIXEL_MODE # add support for the raster text mode
View
132 conf/freesbie.defaults.conf
@@ -0,0 +1,132 @@
+#!/bin/sh
+#
+# Default configuration file.
+#
+# Copyright (c) 2005 Dario Freni
+#
+# See COPYING for license terms.
+#
+# $FreeBSD$
+# $Id: freesbie.defaults.conf,v 1.1.1.1 2008/03/25 19:58:15 sullrich Exp $
+#
+# Don't modify this file, create your own conf/freesbie.conf instead,
+# or set an environment variable called FREESBIE_CONF to the absolute
+# path of your configuration file. Alternatively, you can set the
+# variables you want to override as environment variables.
+#
+# Hint: when creating your own file, do not copy freesbie.defaults.conf,
+# create it anew and override only the variables you need. Pay attention
+# not to use the syntax
+# BASEDIR=${BASEDIR:-"/foo/bla"}
+# otherwise you'll end up using the default value of BASEDIR instead of
+# "foo/bla" !
+# Simply write:
+# BASEDIR="/foo/bla"
+
+
+# Variables
+
+# Path where files are installed.
+BASEDIR=${BASEDIR:-"/usr/local/freesbie-fs"}
+
+# Temporary directory used when building images
+CLONEDIR=${CLONEDIR:-"/usr/local/freesbie-clone"}
+
+# Directory with system sources
+SRCDIR=${SRCDIR:-"/usr/src"}
+
+# Path of the built iso, use absolute path
+ISOPATH=${ISOPATH:-"/usr/obj/FreeSBIE.iso"}
+
+# Path of the built image, use absolute path
+IMGPATH=${IMGPATH:-"/usr/obj/FreeSBIE.img"}
+
+# Default parameters for the image, use diskinfo(1) to obtain yours
+SECTS=${SECTS:-501760} # Total number of sectors
+SECTT=${SECTT:-32} # Sectors/track
+HEADS=${HEADS:-16} # Heads
+
+#
+# Optional variables
+
+# Arguments passed to make(1) when building world and kernel.
+# Cannot be an environment variable.
+#
+#MAKEJ_WORLD=${MAKEJ_WORLD:-"-j3"}
+#MAKEJ_KERNEL=${MAKEJ_KERNEL:-"-j1"}
+
+# Arguments passed to make(1) when building world and kernel.
+# Can also be an environment variable.
+#
+#MAKEOPT="-DNO_CLEAN"
+
+# Kernel configuration file, with complete path
+#
+#KERNELCONF=/complete/path/to/MYCUSTOMKERNEL
+
+# If you want to use a custom make.conf, define it here. Otherwise,
+# make.conf or make.conf.minimal under conf/ are used.
+#
+#SRCCONF=/etc/make.conf
+
+# The src.conf file contains settings that will apply to every build
+# involving the FreeBSD source tree; see build(7) and src.conf(5)
+# only for 7.0-CURRENT
+SRC_CONF=${SRC_CONF:-"/dev/null"}
+
+# You can specify which files to add to your system one by one. Just
+# put the list in a text file and set the absolute path in FILE_LIST
+# variable
+#
+#FILE_LIST=/my/own/file_list.txt
+
+# You can specify which files to remove from your built system. Just
+# put the list in a text file and set the absolute path in PRUNE_LIST
+# variable. Wildcards are also accepted
+#
+#PRUNE_LIST=/my/own/prune_em_all.txt
+
+# Set PFSPKGFILE variable to a text file containing a list of packages to
+# install in the built system. This file can be either a pkg_info(1)
+# like output either a list of packages without version number. Please
+# note that this file will be rewritten if you run `make pkgselect'
+#
+#PFSPKGFILE=/my/own/pkg_info_output.txt
+
+# Set EXTRA variable to the additional plugins you want to run in your
+# system. Please note that plugins are executed in the same order as
+# listed in this variable
+#
+#EXTRA="customroot rootmfs etcmfs"
+
+# Knobs
+
+# Define MINIMAL to build a minimal world (i.e.: use
+# make.conf.minimal, full of NO_* knobs.
+#
+#MINIMAL=YES
+
+# Define NO_BUILDWORLD to avoid rebuilding world. Be sure you know
+# what you're doing, you should have an already compiled world
+#
+#NO_BUILDWORLD=YES
+
+# Define NO_BUILDKERNEL to avoid rebuilding kernel. Be sure you know
+# what you're doing, you should have an already compiled kernel
+#
+#NO_BUILDKERNEL=YES
+
+# Define MAKEOBJDIRPREFIX to use an object directory different than /usr/obj.
+# Be sure you know what you're doing, it is easy to introduce suble bugs.
+#
+#MAKEOBJDIRPREFIX=/path/to/obj
+
+# Define NO_COMPRESSEDFS if you don't want to have compressed fs
+# inside the resulting image.
+#
+#NO_COMPRESSEDFS=YES
+
+# Define NO_UNIONFS if you want to avoid using unionfs in the built
+# system
+#
+NO_UNIONFS=YES # Unionfs is broken in > 6.0, so disable it by default
View
321 conf/i386/FREESBIE
@@ -0,0 +1,321 @@
+ $FreeBSD$
+# $Id: FREESBIE,v 1.1.1.1 2008/03/25 19:58:15 sullrich Exp $
+
+machine i386
+cpu I486_CPU
+cpu I586_CPU
+cpu I686_CPU
+ident FREESBIE
+
+# To statically compile in device wiring instead of /boot/device.hints
+#hints "GENERIC.hints" # Default places to look for devices.
+
+options SCHED_ULE # ULE scheduler
+#options SCHED_4BSD # 4BSD scheduler
+options PREEMPTION # Enable kernel thread preemption
+options INET # InterNETworking
+options INET6 # IPv6 communications protocols
+options SCTP # Stream Control Transmission Protocol
+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 UFS_GJOURNAL # Enable gjournal-based UFS journaling
+options MD_ROOT # MD is a potential root device
+options NFSCLIENT # Network Filesystem Client
+options NFSSERVER # Network Filesystem Server
+options NFS_ROOT # NFS usable as /, requires NFSCLIENT
+options MSDOSFS # MSDOS Filesystem
+options CD9660 # ISO 9660 Filesystem
+options PROCFS # Process filesystem (requires PSEUDOFS)
+options PSEUDOFS # Pseudo-filesystem framework
+options GEOM_PART_GPT # GUID Partition Tables.
+options GEOM_LABEL # Provides labelization
+options COMPAT_43TTY # Compatible with BSD 4.3 [KEEP THIS!]
+options COMPAT_FREEBSD6 # Compatible with FreeBSD6
+options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI
+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 STOP_NMI # Stop CPUS using NMI instead of IPI
+options UNIONFS # Union filesystem
+options TMPFS # efficient memory filesystem
+
+# To make an SMP kernel, the next two lines are needed
+options SMP # Symmetric MultiProcessor Kernel
+device apic # I/O APIC
+
+# CPU frequency control
+device cpufreq
+
+# Bus support. Do not remove isa, even if you have no isa slots
+device eisa
+device pci
+
+device firmware
+# Floppy drives
+device fdc
+
+# ATA and ATAPI devices
+device ata
+device atadisk # ATA disk drives
+device ataraid # ATA RAID drives
+device atapicd # ATAPI CDROM drives
+device atapifd # ATAPI floppy drives
+device atapist # ATAPI tape drives
+options ATA_STATIC_ID # Static device numbering
+
+# SCSI Controllers
+device ahb # EISA AHA1742 family
+device ahc # AHA2940 and onboard AIC7xxx devices
+options AHC_REG_PRETTY_PRINT # Print register bitfields in debug
+ # output. Adds ~128k to driver.
+device ahd # AHA39320/29320 and onboard AIC79xx devices
+options AHD_REG_PRETTY_PRINT # Print register bitfields in debug
+ # output. Adds ~215k to driver.
+device amd # AMD 53C974 (Tekram DC-390(T))
+device hptiop # Highpoint RocketRaid 3xxx series
+device isp # Qlogic family
+#device ispfw # Firmware for QLogic HBAs- normally a module
+device mpt # LSI-Logic MPT-Fusion
+#device ncr # NCR/Symbios Logic
+device sym # NCR/Symbios Logic (newer chipsets + those of `ncr')
+device trm # Tekram DC395U/UW/F DC315U adapters
+
+device adv # Advansys SCSI adapters
+device adw # Advansys wide SCSI adapters
+device aha # Adaptec 154x SCSI adapters
+device aic # Adaptec 15[012]x SCSI adapters, AIC-6[23]60.
+device bt # Buslogic/Mylex MultiMaster SCSI adapters
+
+device ncv # NCR 53C500
+device nsp # Workbit Ninja SCSI-3
+device stg # TMC 18C30/18C50
+
+# SCSI peripherals
+device scbus # SCSI bus (required for SCSI)
+device ch # SCSI media changers
+device da # Direct Access (disks)
+device sa # Sequential Access (tape etc)
+device cd # CD
+device pass # Passthrough device (direct SCSI access)
+device ses # SCSI Environmental Services (and SAF-TE)
+
+# RAID controllers interfaced to the SCSI subsystem
+device amr # AMI MegaRAID
+device arcmsr # Areca SATA II RAID
+device asr # DPT SmartRAID V, VI and Adaptec SCSI RAID
+device ciss # Compaq Smart RAID 5*
+device dpt # DPT Smartcache III, IV - See NOTES for options
+device hptmv # Highpoint RocketRAID 182x
+device hptrr # Highpoint RocketRAID 17xx, 22xx, 23xx, 25xx
+device rr232x # Highpoint RocketRAID 232x
+device iir # Intel Integrated RAID
+device ips # IBM (Adaptec) ServeRAID
+device mly # Mylex AcceleRAID/eXtremeRAID
+device twa # 3ware 9000 series PATA/SATA RAID
+
+# RAID controllers
+device aac # Adaptec FSA RAID
+device aacp # SCSI passthrough for aac (requires CAM)
+device ida # Compaq Smart RAID
+device mfi # LSI MegaRAID SAS
+device mlx # Mylex DAC960 family
+device pst # Promise Supertrak SX6000
+device twe # 3ware ATA RAID
+
+# atkbdc0 controls both the keyboard and the PS/2 mouse
+device atkbdc # AT keyboard controller
+device atkbd # AT keyboard
+device psm # PS/2 mouse
+
+device vga # VGA video card driver
+
+device splash # Splash screen and screen saver support
+
+# syscons is the default console driver, resembling an SCO console
+device sc
+
+device agp # support several AGP chipsets
+
+# Power management support (see NOTES for more options)
+#device apm
+# Add suspend/resume support for the i8254.
+device pmtimer
+
+# PCCARD (PCMCIA) support
+# PCMCIA and cardbus bridge support
+device cbb # cardbus (yenta) bridge
+device pccard # PC Card (16-bit) bus
+device cardbus # CardBus (32-bit) bus
+
+# Serial (COM) ports
+device sio # 8250, 16[45]50 based serial ports
+device uart # Generic UART driver
+
+# Parallel port
+device ppc
+device ppbus # Parallel port bus (required)
+device lpt # Printer
+device plip # TCP/IP over parallel
+device ppi # Parallel port interface device
+#device vpo # Requires scbus and da
+
+# If you've got a "dumb" serial or parallel PCI card that is
+# supported by the puc(4) glue driver, uncomment the following
+# line to enable it (connects to the sio and/or ppc drivers):
+#device puc
+
+# PCI Ethernet NICs.
+device de # DEC/Intel DC21x4x (``Tulip'')
+device em # Intel PRO/1000 adapter Gigabit Ethernet Card
+device ixgb # Intel PRO/10GbE Ethernet Card
+device le # AMD Am7900 LANCE and Am79C9xx PCnet
+device txp # 3Com 3cR990 (``Typhoon'')
+device vx # 3Com 3c590, 3c595 (``Vortex'')
+
+# PCI Ethernet NICs that use the common MII bus controller code.
+# NOTE: Be sure to keep the 'device miibus' line in order to use these NICs!
+device miibus # MII bus support
+device bce # Broadcom BCM5706/BCM5708 Gigabit Ethernet
+device bfe # Broadcom BCM440x 10/100 Ethernet
+device bge # Broadcom BCM570xx Gigabit Ethernet
+device dc # DEC/Intel 21143 and various workalikes
+device fxp # Intel EtherExpress PRO/100B (82557, 82558)
+device lge # Level 1 LXT1001 gigabit Ethernet
+device msk # Marvell/SysKonnect Yukon II Gigabit Ethernet
+device nfe # nVidia nForce MCP on-board Ethernet
+device nge # NatSemi DP83820 gigabit Ethernet
+#device nve # nVidia nForce MCP on-board Ethernet Networking
+device pcn # AMD Am79C97x PCI 10/100(precedence over 'lnc')
+device re # RealTek 8139C+/8169/8169S/8110S
+device rl # RealTek 8129/8139
+device sf # Adaptec AIC-6915 (``Starfire'')
+device sis # Silicon Integrated Systems SiS 900/SiS 7016
+device sk # SysKonnect SK-984x & SK-982x gigabit Ethernet
+device ste # Sundance ST201 (D-Link DFE-550TX)
+device stge # Sundance/Tamarack TC9021 gigabit Ethernet
+device ti # Alteon Networks Tigon I/II gigabit Ethernet
+device tl # Texas Instruments ThunderLAN
+device tx # SMC EtherPower II (83c170 ``EPIC'')
+device vge # VIA VT612x gigabit Ethernet
+device vr # VIA Rhine, Rhine II
+device wb # Winbond W89C840F
+device xl # 3Com 3c90x (``Boomerang'', ``Cyclone'')
+
+# ISA Ethernet NICs. pccard NICs included.
+device cs # Crystal Semiconductor CS89x0 NIC
+# 'device ed' requires 'device miibus'
+device ed # NE[12]000, SMC Ultra, 3c503, DS8390 cards
+device ex # Intel EtherExpress Pro/10 and Pro/10+
+device ep # Etherlink III based cards
+device fe # Fujitsu MB8696x based cards
+device ie # EtherExpress 8/16, 3C507, StarLAN 10 etc.
+device sn # SMC's 9000 series of Ethernet chips
+device xe # Xircom pccard Ethernet
+
+# ISA devices that use the old ISA shims
+#device le
+
+# Wireless NIC cards
+device wlan # 802.11 support
+device wlan_wep # 802.11 WEP support
+device wlan_ccmp # 802.11 CCMP support
+device wlan_tkip # 802.11 TKIP support
+device wlan_amrr # 802.11 support
+device wlan_scan_ap # 802.11 AP mode scanning
+device wlan_scan_sta # 802.11 STA mode scanning
+device an # Aironet 4500/4800 802.11 wireless NICs.
+device ath # Atheros pci/cardbus NIC's
+device ath_hal # Atheros HAL (Hardware Access Layer)
+device ath_rate_sample # SampleRate tx rate control for ath
+device awi # BayStack 660 and others
+device ral # Ralink Technology RT2500 wireless NICs.
+device wi # WaveLAN/Intersil/Symbol 802.11 wireless NICs.
+#device wl # Older non 802.11 Wavelan wireless NIC.
+
+# Pseudo devices.
+device loop # Network loopback
+device random # Entropy device
+device ether # Ethernet support
+device sl # Kernel SLIP
+device ppp # Kernel PPP
+device tun # Packet tunnel.
+device pty # Pseudo-ttys (telnet etc)
+device md # Memory "disks"
+device gif # IPv6 and IPv4 tunneling
+device faith # IPv6-to-IPv4 relaying (translation)
+device firmware # firmware assist module
+
+# The `bpf' device enables the Berkeley Packet Filter.
+# Be aware of the administrative consequences of enabling this!
+# Note that 'bpf' is required for DHCP.
+device bpf # Berkeley packet filter
+
+# USB support
+device uhci # UHCI PCI->USB interface
+device ohci # OHCI PCI->USB interface
+device ehci # EHCI PCI->USB interface (USB 2.0)
+device usb # USB Bus (required)
+#device udbp # USB Double Bulk Pipe devices
+device ugen # Generic
+device uhid # "Human Interface Devices"
+device ukbd # Keyboard
+device ulpt # Printer
+device umass # Disks/Mass storage - Requires scbus and da
+device ums # Mouse
+device ural # Ralink Technology RT2500USB wireless NICs
+device rum # Ralink Technology RT2501USB wireless NICs
+device zyd # ZyDAS zb1211/zb1211b wireless NICs
+device urio # Diamond Rio 500 MP3 player
+device uscanner # Scanners
+# USB Serial devices
+device ucom # Generic com ttys
+device uark # Technologies ARK3116 based serial adapters
+device ubsa # Belkin F5U103 and compatible serial adapters
+device ubser # BWCT console serial adapters
+device uftdi # For FTDI usb serial adapters
+device uipaq # Some WinCE based devices
+device uplcom # Prolific PL-2303 serial adapters
+device uvisor # Visor and Palm devices
+device uvscom # USB serial support for DDI pocket's PHS
+# USB Ethernet, requires miibus
+device aue # ADMtek USB Ethernet
+device axe # ASIX Electronics USB Ethernet
+device cdce # Generic USB over Ethernet
+device cue # CATC USB Ethernet
+device kue # Kawasaki LSI USB Ethernet
+device rue # RealTek RTL8150 USB Ethernet
+
+# FireWire support
+device firewire # FireWire bus code
+device sbp # SCSI over FireWire (Requires scbus and da)
+device fwe # Ethernet over FireWire (non-standard!)
+device fwip # IP over FireWire (rfc2734 and rfc3146)
+device dcons # Dumb console driver
+device dcons_crom # Configuration ROM for dcons
+
+device bktr
+
+device crypto # core crypto support
+device cryptodev # /dev/crypto for access to h/w
+
+options IPFIREWALL #firewall
+options IPFIREWALL_VERBOSE #print information about
+options IPFIREWALL_DEFAULT_TO_ACCEPT #allow everything by default
+
+device pf #PF OpenBSD packet-filter firewall
+device pflog #logging support interface for PF
+device pfsync #synchronization interface for PF
+
+options IPSTEALTH
+options IPDIVERT
+
+options GEOM_UZIP # Read-only compressed disks
+
+options VESA
+options SC_PIXEL_MODE
+
View
5 conf/make.conf
@@ -0,0 +1,5 @@
+# $FreeBSD$
+# $Id: make.conf,v 1.1.1.1 2008/03/25 19:58:15 sullrich Exp $
+
+NO_PROFILE=TRUE
+INSTALL_NODEBUG=TRUE
View
52 conf/make.conf.minimal
@@ -0,0 +1,52 @@
+# $FreeBSD$
+# $Id: make.conf.minimal,v 1.1.1.1 2008/03/25 19:58:15 sullrich Exp $
+
+NO_ACPI=YES
+NO_ATM=YES
+NO_AUTHPF=YES
+NO_BIND=YES
+NO_BIND_DNSSEC=YES
+NO_BIND_ETC=YES
+NO_BIND_LIBS_LWRES=YES
+NO_BIND_MTREE=YES
+NO_BIND_NAMED=YES
+NO_BIND_UTILS=YES
+NO_BLUETOOTH=YES
+NO_CVS=YES
+NO_CXX=YES
+NO_DICT=YES
+NO_FORTRAN=YES
+NO_GAMES=YES
+NO_GCOV=YES
+NO_GDB=YES
+NO_GPIB=YES
+NO_HESIOD_LIBC=YES
+NO_HTML=YES
+NO_I4B=YES
+NO_INET6=YES
+NO_INFO=YES
+NO_IPFILTER=YES
+NO_KERBEROS=YES
+NO_KLDLOAD=YES
+NO_LIBC_R=YES
+NO_LIBPTHREAD=YES
+NO_LIBTHR=YES
+NO_LPR=YES
+NO_MAILWRAPPER=YES
+NO_MAN=YES
+NO_MODULES=YES
+NO_NETCAT=YES
+NO_NETGRAPH=YES
+NO_NIS=YES
+NO_OBJC=YES
+NO_P1003_1B=YES
+NO_PAM=YES
+NO_PF=YES
+NO_PROFILE=YES
+NO_RESCUE=YES
+NO_TOOLCHAIN=YES
+NO_USB=YES
+NO_VINUM=YES
+NO_SENDMAIL=YES
+NO_SHAREDOCS=YES
+PPP_NO_RADIUS=YES
View
142 conf/powerpc/FREESBIE
@@ -0,0 +1,142 @@
+# $FreeBSD$
+# $Id: FREESBIE,v 1.1.1.1 2008/03/25 19:58:15 sullrich Exp $
+
+machine powerpc
+cpu OEA
+ident FREESBIE
+
+#To statically compile in device wiring instead of /boot/device.hints
+#hints "GENERIC.hints"
+
+makeoptions WERROR=-Wno-error #XXX: We don't want -Werror just now
+
+# Platform support
+options POWERMAC #NewWorld Apple PowerMacs
+options PSIM #GDB PSIM ppc simulator
+
+#options SCHED_ULE #ULE scheduler
+options SCHED_4BSD #4BSD scheduler
+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 MD_ROOT #MD is a potential root device
+options NFSCLIENT #Network Filesystem Client
+options NFSSERVER #Network Filesystem Server
+options NFS_ROOT #NFS usable as root device
+options MSDOSFS #MSDOS Filesystem
+options CD9660 #ISO 9660 Filesystem
+options PROCFS #Process filesystem (requires PSEUDOFS)
+options PSEUDOFS #Pseudo-filesystem framework
+options GEOM_GPT #GUID Partition Tables.
+options COMPAT_43 #Compatible with BSD 4.3 [KEEP THIS!]
+options COMPAT_FREEBSD4 #Keep this for a while
+options SCSI_DELAY=5000 #Delay (in ms) before probing SCSI
+options KTRACE #ktrace(1) syscall trace 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
+
+# To make an SMP kernel, the next line is needed
+#options SMP # Symmetric MultiProcessor Kernel
+
+# Standard busses
+device pci
+
+# ATA and ATAPI devices
+device ata
+device atadisk # ATA disk drives
+device atapicd # ATAPI CDROM drives
+#device atapifd # ATAPI floppy drives
+#device atapist # ATAPI tape drives
+
+# SCSI peripherals
+device scbus # SCSI bus (required for SCSI)
+device da # Direct Access (disks)
+device sa # Sequential Access (tape etc)
+device cd # CD
+device pass # Passthrough device (direct SCSI access)
+
+# syscons is the default console driver, resembling an SCO console
+device sc
+options SC_OFWFB # OFW frame buffer
+options SC_DFLT_FONT # compile font in
+makeoptions SC_DFLT_FONT=cp437
+
+# Serial (COM) ports
+#device sio # 8250, 16[45]50 based serial ports
+device zs # Zilog 8350 based serial ports
+
+# PCI Ethernet NICs that use the common MII bus controller code.
+device miibus # MII bus support
+device gem # Sun GEM/Sun ERI/Apple GMAC
+device dc # DEC/Intel 21143 and various workalikes
+device fxp # Intel EtherExpress PRO/100B (82557, 82558)
+
+# Pseudo devices.
+device loop # Network loopback
+device mem # Memory and kernel memory devices
+device random # Entropy device
+device ether # Ethernet support
+device sl # Kernel SLIP
+device ppp # Kernel PPP
+device tun # Packet tunnel.
+device pty # Pseudo-ttys (telnet etc)
+device md # Memory "disks"
+device ofwd # Open Firmware disks
+device gif # IPv6 and IPv4 tunneling
+device faith # IPv6-to-IPv4 relaying/(translation)
+
+# The `bpf' device enables the Berkeley Packet Filter.
+# Be aware of the administrative consequences of enabling this!
+# Note that 'bpf' is required for DHCP.
+device bpf #Berkeley packet filter
+
+# USB support
+device uhci # UHCI PCI->USB interface
+device ohci # OHCI PCI->USB interface
+device ehci # EHCI PCI->USB interface
+device usb # USB Bus (required)
+device ugen # Generic
+device uhid # "Human Interface Devices"
+device ukbd # Keyboard
+device ulpt # Printer
+device umass # Disks/Mass storage - Requires scbus and da0
+device ums # Mouse
+device urio # Diamond Rio 500 MP3 player
+device uscanner # Scanners
+# USB Ethernet
+device aue # ADMtek USB Ethernet
+device axe # ASIX Electronics USB Ethernet
+device cdce # Generic USB over Ethernet
+device cue # CATC USB Ethernet
+device kue # Kawasaki LSI USB Ethernet
+
+# FireWire support
+device firewire # FireWire bus code
+device sbp # SCSI over FireWire (Requires scbus and da)
+device fwe # Ethernet over FireWire (non-standard!)
+
+options KTR
+options KTR_COMPILE=0xffffffff
+#options KTR_MASK=KTR_SIG
+options KTR_VERBOSE
+
+options IPFIREWALL #firewall
+options IPFIREWALL_VERBOSE #print information about
+options IPFIREWALL_DEFAULT_TO_ACCEPT #allow everything by default
+
+device pf #PF OpenBSD packet-filter firewall
+device pflog #logging support interface for PF
+device pfsync #synchronization interface for PF
+
+options IPSTEALTH
+options IPDIVERT
+options TCP_DROP_SYNFIN #drop TCP packets with SYN+FIN
+
+options GEOM_UZIP # Read-only compressed disks
+options GEOM_LABEL # Providers labelization.
+
View
40 conf/rc.d/unionfs
@@ -0,0 +1,40 @@
+#!/bin/sh
+#
+# $FreeBSD$
+# $Id: unionfs,v 1.1.1.1 2008/03/25 19:58:15 sullrich Exp $
+#
+
+# PROVIDE: unionfs
+# REQUIRE: disks
+# BEFORE: hostid
+# KEYWORD: nojail
+
+. /etc/rc.subr
+
+name="unionfs"
+start_cmd="unionfs_start"
+stop_cmd=""
+
+unionfs_start() {
+ unionsize="$(($(sysctl -n hw.usermem) / 2))b"
+ device=$(mdconfig -a -t malloc -s ${unionsize})
+ newfs /dev/${device} > /dev/null 2>&1
+ mount /dev/${device} /mnt/union
+
+ # TMPFS does not support unionfs yet.
+ #mount -t tmpfs tmpfs /mnt/union
+
+ # Use TMPFS for /tmp
+ mount -t tmpfs tmpfs /tmp
+
+ while read uniondir; do
+ mkdir /mnt/union/${uniondir}
+ mount_unionfs -o copymode=transparent -o noatime /mnt/union/${uniondir} /${uniondir}
+ if [ -f /dist/${uniondir}.dirs ]; then
+ mtree -PU -p /${uniondir} < /dist/${uniondir}.dirs > /dev/null 2>&1
+ fi
+ done < /dist/uniondirs
+}
+
+load_rc_config $name
+run_rc_command "$1"
View
42 conf/rc.d/uzip
@@ -0,0 +1,42 @@
+#!/bin/sh
+#
+# $FreeBSD$
+# $Id: uzip,v 1.1.1.1 2008/03/25 19:58:15 sullrich Exp $
+#
+
+# PROVIDE: uzip
+# BEFORE: disks
+# KEYWORD: nojail
+
+. /etc/rc.subr
+
+name="uzip"
+start_cmd="uzip_start"
+stop_cmd="uzip_stop"
+
+uzip_start() {
+ for loopfs in /uzip/*.uzip; do
+ if [ -f ${loopfs} ]; then
+ filename=${loopfs#/uzip/}
+ mountpoint=/${filename%.uzip}
+ device=/dev/$(mdconfig -a -t vnode -o readonly -f $loopfs)
+ sleep 1
+ if [ -c ${device} ]; then
+ mount -r ${device}.uzip ${mountpoint}
+ fi
+ fi
+ done
+}
+
+uzip_stop() {
+ for mounteddev in /dev/*.uzip; do
+ if [ -c ${mounteddev} ]; then
+ device=${mounteddev%.uzip}
+ umount ${mounteddev}
+ mdconfig -d -u ${device}
+ fi
+ done
+}
+
+load_rc_config $name
+run_rc_command "$1"
View
59 extra/README
@@ -0,0 +1,59 @@
+$Id: README,v 1.1.1.1 2008/03/25 19:58:15 sullrich Exp $
+
+This directory contains files and subdirectories related to the
+plugins'set. Available plugins and a brief description of each
+follows.
+
+adduser Add the user "freesbie" to the LiveCD (username can be
+ set using the FREESBIE_ADDUSER variable
+
+autologin Enable autologin for the user "freesbie"
+
+backup Add support for backup/restore files from a LiveCD
+
+buildmodules Build modules listed in BUILDMODULES variable. Useful
+ in minimalenvironments when NO_MODULES is set.
+
+comconsole Enable serial console at boot in addition to video
+ console. To use serial console only , the SERIAL_ONLY
+ variable should be set
+
+customroot Install file in the customroot/ directory to the live
+ filesystem. This directory has to be considered as a
+ / filesystem. Files are just copied to the livefs
+ directory after every other operation, just before
+ packing it into the final image. If a file is already
+ present in the live fs it will be overrided.
+
+customscripts Run scripts found in the customscripts/ directory in
+ the livefs chroot, right before the iso is packed.
+ Useful to do internal operations such as adding users
+ or editing files in an automatic way.
+
+etcmfs Add support for a /etc memory filesystem
+
+installports Remount the ports' tree under ${BASEDIR}/usr/ports
+ and install ports listed in the INSTALL_PORTS variable
+ in the usual category/portname
+
+l10n Set localization.
+
+mountdisks Mount any UFS, FAT, NTFS slice found
+
+pf Create basic PF rulesets at bootime
+
+rootmfs Add support for a /root memory filesystem
+
+sound Detect soundcard and load the correct kernel module.
+
+swapfind Find swap partitions and use them.
+
+varmfs Add support for a /var memory filesystem
+
+xautostart Start X.org at bootime
+
+xconfig Autoconfigure X.org at boottime using X.org
+ autoconfigure features
+
+xconfig-probe Autoconfigure X.org at bootime using X.org -configure
+
View
69 extra/adduser.sh
@@ -0,0 +1,69 @@
+#!/bin/sh
+#
+# Copyright (c) 2005 Dario Freni
+#
+# See COPYING for licence terms.
+#
+# $FreeBSD$
+# $Id: adduser.sh,v 1.1.1.1 2008/03/25 19:58:15 sullrich Exp $
+
+set -e -u
+
+if [ -z "${LOGFILE:-}" ]; then
+ echo "This script can't run standalone."
+ echo "Please use launch.sh to execute it."
+ exit 1
+fi
+
+TMPFILE=$(mktemp -t adduser)
+
+FREESBIE_ADDUSER="${FREESBIE_ADDUSER:-freesbie}"
+
+# If directory /home exists, move it to /usr/home and do a symlink
+if [ ! -L ${BASEDIR}/home -a -d ${BASEDIR}/home ]; then
+ mv ${BASEDIR}/home ${BASEDIR}/usr/home
+fi
+
+if [ ! -d ${BASEDIR}/usr/home ]; then
+ mkdir -p ${BASEDIR}/usr/home
+fi
+
+if [ ! -d ${BASEDIR}/usr/home/${FREESBIE_ADDUSER} ]; then
+ mkdir -p ${BASEDIR}/usr/home/${FREESBIE_ADDUSER}
+fi
+
+if [ ! -L ${BASEDIR}/home ]; then
+ ln -s usr/home ${BASEDIR}/home
+fi
+
+
+set +e
+grep -q ^${FREESBIE_ADDUSER}: ${BASEDIR}/etc/master.passwd
+
+if [ $? -ne 0 ]; then
+ chroot ${BASEDIR} pw useradd ${FREESBIE_ADDUSER} \
+ -u 1000 -c "FreeSBIE User" -d "/home/${FREESBIE_ADDUSER}" \
+ -g 0 -G 5 -m -s /bin/tcsh -k /usr/share/skel -w none
+else
+ chroot ${BASEDIR} pw usermod ${FREESBIE_ADDUSER} \
+ -u 1000 -c "FreeSBIE User" -d "/home/${FREESBIE_ADDUSER}" \
+ -g 0 -G 5 -m -s /bin/tcsh -k /usr/share/skel -w none
+fi
+
+chroot ${BASEDIR} pw group mod operator -m ${FREESBIE_ADDUSER}
+
+set -e
+
+chown -R 1000:0 ${BASEDIR}/usr/home/${FREESBIE_ADDUSER}
+
+if [ ! -z "${NO_UNIONFS:-}" ]; then
+ echo ">>> Adding init script for /home mfs"
+
+ cp ${LOCALDIR}/extra/adduser/homemfs.rc ${BASEDIR}/etc/rc.d/homemfs
+ chmod 555 ${BASEDIR}/etc/rc.d/homemfs
+
+ echo ">>> Saving mtree structure for /home/"
+
+ mtree -Pcp ${BASEDIR}/usr/home > ${TMPFILE}
+ mv ${TMPFILE} ${BASEDIR}/etc/mtree/home.dist
+fi
View
62 extra/adduser/homemfs.rc
@@ -0,0 +1,62 @@
+#!/bin/sh
+#
+# Copyright (c) 2005 Dario Freni
+# 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$
+# $Id: homemfs.rc,v 1.1.1.1 2008/03/25 19:58:15 sullrich Exp $
+#
+
+# PROVIDE: homemfs
+# REQUIRE: mountcritlocal
+# BEFORE: var
+
+. /etc/rc.subr
+
+name="homemfs"
+kenvhomesize=`kenv -q freesbie.homesize`
+homesize=${kenvhomesize:-"32m"}
+
+load_rc_config $name
+
+tempdir=/tmp
+
+echo "Generating MFS /usr/home partition"
+
+device=$(mdconfig -a -t malloc -o compress -s ${homesize})
+bsdlabel -w ${device} auto
+newfs -n -m 2 /dev/${device} > /dev/null 2>&1
+mount -o noatime /dev/${device} ${tempdir}
+
+back=$PWD
+
+cd /usr/home
+find . -print -depth | cpio -dump --quiet ${tempdir}
+
+cd $back
+
+mtree -PUer -q -p ${tempdir} < /etc/mtree/home.dist > /dev/null 2>&1
+
+umount ${tempdir}
+mount -o noatime /dev/${device} /usr/home
View
20 extra/autologin.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+#
+# Copyright (c) 2006 Matteo Riondato
+#
+# See COPYING for licence terms.
+#
+# $FreeBSD$
+# $Id: autologin.sh,v 1.1.1.1 2008/03/25 19:58:15 sullrich Exp $
+#
+# Enable autologin of the $FREESBIE_ADDUSER user on the first terminal
+#
+
+FREESBIE_ADDUSER="${FREESBIE_ADDUSER:-freesbie}"
+
+echo "# ${FREESBIE_ADDUSER} user autologin" >> ${BASEDIR}/etc/gettytab
+echo "${FREESBIE_ADDUSER}:\\" >> ${BASEDIR}/etc/gettytab
+echo ":al=${FREESBIE_ADDUSER}:ht:np:sp#115200:" >> ${BASEDIR}/etc/gettytab
+
+sed -i "" "/ttyv0/s/Pc/${FREESBIE_ADDUSER}/" ${BASEDIR}/etc/ttys
+
View
26 extra/backup.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# Copyright (c) 2006 Matteo Riondato
+#
+# See COPYING for licence terms.
+#
+# $Id: backup.sh,v 1.1.1.1 2008/03/25 19:58:15 sullrich Exp $
+
+set -e -u
+
+if [ -z "${LOGFILE:-}" ]; then
+ echo "This script can't run standalone."
+ echo "Please use launch.sh to execute it."
+ exit 1
+fi
+
+# we use ".sh" in the destination so that the script will be sourced
+# in the "main" shell
+cp extra/backup/restorebackup.rc $BASEDIR/etc/rc.d/restorebackup
+chmod 555 $BASEDIR/etc/rc.d/restorebackup
+mkdir -p $BASEDIR/usr/local/bin
+cp extra/backup/restorebackup.sh $BASEDIR/usr/local/sbin/restorebackup
+chmod 555 $BASEDIR/usr/local/sbin/restorebackup
+cp extra/backup/savebackup.sh $BASEDIR/usr/local/sbin/savebackup
+chmod 555 $BASEDIR/usr/local/sbin/savebackup
+
View
35 extra/backup/restorebackup.rc
@@ -0,0 +1,35 @@
+#!/bin/sh
+#
+# Copyright (c) 2006 Matteo Riondato
+#
+# See COPYING for licence terms
+#
+# $Id: restorebackup.rc,v 1.1.1.1 2008/03/25 19:58:15 sullrich Exp $
+#
+# PROVIDE: restorebackup
+# REQUIRE: etcmfs varmfs rootmfs
+# BEFORE: var mountdisks
+
+. /etc/rc.subr
+
+name="restorebackup"
+start_cmd="do_restore"
+stop_cmd=":"
+
+restorescript="/usr/local/sbin/restorebackup"
+
+do_restore()
+{
+ backup_dev=`kenv -q freesbie.backup`
+ if [ "${backup_dev}" != "NO" -o "${backup_dev}" != "no" ]; then
+ if [ -z ${backup_dev} ]; then
+ ${restorescript}
+ else
+ ${restorescript} -d ${backup_dev}
+ fi
+ fi
+}
+
+load_rc_config $name
+run_rc_command "$1"
+
View
166 extra/backup/restorebackup.sh
@@ -0,0 +1,166 @@
+#!/bin/sh
+#
+# Copyright (c) 2006 Matteo Riondato
+#
+# See COPYING for licence terms
+#
+# $Id: restorebackup.sh,v 1.1.1.1 2008/03/25 19:58:16 sullrich Exp $
+#
+
+#tmpmntdir=$(mktemp -d -t fsbiebk)
+tmpmntdir="/mnt"
+
+_findfs() {
+ local offset=${1}
+ local value=${2}
+
+ [ -z "${offset}" -o -z "${value}" ] && return 1
+
+ local size=$((($(echo -n "${value}" | wc -c) + 1) / 2))
+
+ [ "$(hexdump -v -e '1/1 "%X"' -s "${offset}" -n "${size}" "${harddisk}" 2>/dev/null)" = "${value}" ]
+
+ return $?
+}
+
+findfs() {
+ harddisk=$1
+ while read x; do
+ local offset="$(echo "${x}" | cut -d : -f 2)"
+ local value="$(echo "${x}" | cut -d : -f 3)"
+
+ if _findfs "${offset}" "${value}"; then
+ local fs="$(echo "${x}" | cut -d : -f 1)"
+ echo "${fs}"
+ return 0
+ fi
+ #description:offset:value
+ done << EOF
+ UFS2:0x1055C:1915419
+ EXT:0x438:53EF
+ FAT16:54:4641543136202020
+ FAT32:82:4641543332202020
+ FAT12:54:4641543132202020
+ NTFS:3:4E54465320202020
+ ISO9660:0x8001:4344303031
+ XFS:0:42534658
+ REISERFS:0x10034:5265497345724673
+ REISERFS:0x10034:526549734572324673
+ HFS+:0x400:2B48
+ LINUXSWAP:0xFF6:53574150535041434532
+EOF
+ return 1
+}
+
+
+find_backup_dev() {
+devlist=`/sbin/camcontrol devlist | cut -d\( -f 2 | cut -d\) -f 1 \
+ | grep da | sed "s/.*da/da/" | sed "s/,.*//"`
+
+if [ "x$devlist" != "x" ]; then
+for i in ${devlist}; do
+ FS=`findfs /dev/$i`
+ case $FS in
+ FAT*)
+ mount_msdosfs /dev/$i ${tmpmntdir}
+ found=`ls ${tmpmntdir}/FreeSBIE/`
+ if [ -n "${found}" ]; then
+ backup_dev="/dev/$i"
+ umount ${tmpmntdir}
+ break
+ fi
+ ;;
+ *)
+ ;;
+ esac
+done
+fi
+}
+
+echo -n "Restoring backup: "
+
+set +e
+args=`getopt d:f:h`
+if [ $? -ne 0 ]; then
+ usage
+ exit 2
+fi
+set -e
+
+set -- $args
+for i
+do
+ case "$i"
+ in
+ -d)
+ backup_dev=$2
+ shift;
+ shift;
+ ;;
+ -f)
+ archive=$2
+ shift;
+ shift;
+ ;;
+ -h)
+ usage
+ exit 0
+ ;;
+ --)
+ shift;
+ break
+ esac
+done
+if [ $# -gt 0 ] ; then
+ echo "$0: Extraneous arguments supplied"
+ usage
+fi
+
+if [ -z ${backup_dev} ]; then
+ find_backup_dev
+fi
+
+if [ "x$backup_dev" != "x" ]; then
+ FS=`findfs ${backup_dev}`
+ case $FS in
+ FAT*)
+ FSTYPE="msdosfs"
+ ;;
+ UFS*)
+ FSTYPE="ufs"
+ ;;
+ EXT)
+ FSTYPE="ext2fs"
+ ;;
+ ISO*)
+ FSTYPE="cd9660"
+ ;;
+ REISERFS*)
+ kldload reiserfs 2> /dev/null
+ FSTYPE="reiserfs"
+ ;;
+ XFS)
+ kldload xfs 2> /dev/null
+ FSTYPE="xfs"
+ ;;
+ NTFS)
+ FSTYPE="ntfs"
+ ;;
+ *)
+ echo "Filesystem $FS not supported"
+ ;;
+ esac
+
+ mount -t $FSTYPE ${backup_dev} ${tmpmntdir}
+ if [ -z ${archive} ]; then
+ archive=`find ${tmpmntdir}/FreeSBIE/ -name "*freesbie_*" | tail -1`
+ fi
+ echo -n "Found backup on ${backup_dev}: `basename ${archive}`...Restoring..."
+ tar -C / -xjPpf ${archive}
+ umount ${tmpmntdir}
+ echo "Done"
+else
+ echo "No backup found"
+fi
+
+
View
143 extra/backup/savebackup.sh
@@ -0,0 +1,143 @@
+#! /bin/sh
+#
+# Copyright (c) 2006 Matteo Riondato <rionda@FreeSBIE.org>
+#
+# See COPYING for licence terms
+#
+# $Id: savebackup.sh,v 1.1.1.1 2008/03/25 19:58:16 sullrich Exp $
+#
+
+TMPMNTDIR="/mnt"
+ARCH_DIR="${TMPMNTDIR}/FreeSBIE/"
+ARCH_NAME=`date "+freesbie_%Y%m%d_%H%M"`
+ARCHIVE="${ARCH_DIR}${ARCH_NAME}.tar"
+BKUP_LIST="/etc/backup.lst"
+
+usage() {
+ echo "usage: $0 backup_device"
+}
+
+_findfs() {
+ local offset=${1}
+ local value=${2}
+
+ [ -z "${offset}" -o -z "${value}" ] && return 1
+
+ local size=$((($(echo -n "${value}" | wc -c) + 1) / 2))
+
+ [ "$(hexdump -v -e '1/1 "%X"' -s "${offset}" -n "${size}" "${harddisk}" 2>/dev/null)" = "${value}" ]
+
+ return $?
+}
+
+findfs() {
+ harddisk=${1}
+ while read x; do
+ local offset="$(echo "${x}" | cut -d : -f 2)"
+ local value="$(echo "${x}" | cut -d : -f 3)"
+
+ if _findfs "${offset}" "${value}"; then
+ local fs="$(echo "${x}" | cut -d : -f 1)"
+ echo "${fs}"
+ return 0
+ fi
+ #description:offset:value
+ done << EOF
+ UFS2:0x1055C:1915419
+ EXT:0x438:53EF
+ FAT16:54:4641543136202020
+ FAT32:82:4641543332202020
+ FAT12:54:4641543132202020
+ NTFS:3:4E54465320202020
+EOF
+ return 1
+}
+
+
+echo "FreeSBIE Backup Script"
+
+if [ $# -ne 1 ]; then
+ usage
+ exit 1
+elif [ ! -c /dev/$1 ]; then
+ usage
+ exit 1
+else
+ FS=`findfs /dev/$1`
+ case $FS in
+ UFS2)
+ FSTYPE="ufs"
+ ;;
+ FAT*)
+ FSTYPE="msdosfs"
+ ;;
+ *)
+ echo "Slice /dev/$1 has a $FS filesystem. FreeBSD cannot write on $FS."
+ echo "Please choose another slice"
+ exit
+ ;;
+ esac
+ mount -t $FSTYPE /dev/$1 ${TMPMNTDIR}
+ if [ ! -e ${ARCH_DIR} ]; then
+ mkdir ${ARCH_DIR}
+ fi
+fi
+
+MARK=`cat ${BKUP_LIST} | grep -v "#" | grep -v "^-" | wc -l | awk '{print $1}'`
+if [ ${MARK} -gt 10 ]; then
+ MARK=10
+fi
+BKUPPED="0"
+NEXT_MARK="1"
+
+add_to_archive() {
+ if [ -d $1 ]; then
+ FILE_LIST=`find $1 -print0 | xargs -0`
+ NEW_FILE_LIST=""
+ for i in `cat $BKUP_LIST | grep -v "#" | grep $1 \
+ | grep "^-" | sed 's/^-//g'`; do
+ for x in ${FILE_LIST}; do
+ if [ ${x} != ${i} ]; then
+ NEW_FILE_LIST=`echo $NEW_FILE_LIST $x`
+ fi
+ done
+ done
+ if [ "x$NEW_FILE_LIST" != "x" ]; then
+ FILE_LIST=$NEW_FILE_LIST
+ fi
+ else
+ FILE_LIST=$1
+ fi
+ BKUPPING=`echo ${FILE_LIST} | wc -w | awk '{print $1}'`
+ BKUPPED=$((${BKUPPED} + ${BKUPPING}))
+ i=0
+ while [ $i -lt $((${BKUPPING} / 5)) ]; do
+ echo -n "."
+ i=$(($i + 1))
+ done
+
+ if [ ${BKUPPED} -ge ${NEXT_MARK} ]; then
+ echo -n "."
+ while [ ${NEXT_MARK} -lt ${BKUPPED} ]; do
+ NEXT_MARK=$((${NEXT_MARK} + ${MARK}))
+ done
+ fi
+
+ if [ ! -e $ARCHIVE ]; then
+ tar ncpf $ARCHIVE $FILE_LIST 2> /dev/null
+ else
+ tar nrpf $ARCHIVE $FILE_LIST 2> /dev/null
+ fi
+}
+
+echo -n "Adding files: "
+for i in `cat ${BKUP_LIST} | grep -v "#" | grep -v "^-"`; do
+ add_to_archive $i
+done
+echo " Done"
+echo -n "Compressing the archive:"
+bzip2 ${ARCHIVE}
+echo " Done"
+sync
+umount ${TMPMNTDIR}
+
View
35 extra/buildmodules.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+#
+# Copyright (c) 2005 Dario Freni
+#
+# See COPYING for licence terms.
+#
+# $FreeBSD$
+# $Id: buildmodules.sh,v 1.1.1.1 2008/03/25 19:58:15 sullrich Exp $
+#
+# Build modules listed in BUILDMODULES variable. Useful in minimal
+# environments when NO_MODULES is set.
+
+set -e -u
+
+if [ -z "${LOGFILE:-}" ]; then
+ echo "This script can't run standalone."
+ echo "Please use launch.sh to execute it."
+ exit 1
+fi
+
+BUILDMODULES=${BUILDMODULES:-}
+
+makecmd="make __SRCCONF=${SRC_CONF} SRCCONF=${SRC_CONF} TARGET_ARCH=${ARCH} DESTDIR=${BASEDIR}"
+
+set +e # grep could fail.
+for i in ${BUILDMODULES} ; do
+ (cd ${SRCDIR}/sys/modules/${i}/ && \
+ ${makecmd} clean && \
+ ${makecmd} depend && \
+ ${makecmd} all && \
+ ${makecmd} install DESTDIR=${BASEDIR} && \
+ ${makecmd} clean) | grep '^====>'
+done
+
+return 0
View
47 extra/comconsole.sh
@@ -0,0 +1,47 @@
+#!/bin/sh
+#
+# Copyright (c) 2005 Dario Freni
+#
+# See COPYING for licence terms.
+#
+# $FreeBSD$
+# $Id: comconsole.sh,v 1.1.1.1 2008/03/25 19:58:15 sullrich Exp $
+#
+# Enable serial console at boot, in addition to video console
+# If you want to use only serial console, define the
+# SERIAL_ONLY variable somewhere
+
+set -e -u
+
+if [ -z "${LOGFILE:-}" ]; then
+ echo "This script can't run standalone."
+ echo "Please use launch.sh to execute it."
+ exit 1
+fi
+
+TMPFILE=$(mktemp -t comconsole)
+
+# Remove any existing line regarding console in loader.conf
+touch ${BASEDIR}/boot/loader.conf
+set +e # grep exit status depends on actual content of loader.conf
+grep -v '^console=' ${BASEDIR}/boot/loader.conf > ${TMPFILE};
+set -e
+mv ${TMPFILE} ${BASEDIR}/boot/loader.conf
+
+# Remove any existing line regarding console in ttys
+set +e # grep exit status depends on actual content of ttys
+grep -v '^ttyd0' ${BASEDIR}/etc/ttys > ${TMPFILE};
+set -e
+mv ${TMPFILE} ${BASEDIR}/etc/ttys
+
+printf "ttyd0\t\"/usr/libexec/getty std.9600\"\tdialup\ton\tsecure\n" >> ${BASEDIR}/etc/ttys
+
+if [ -z "${SERIAL_ONLY:-}" ]; then
+ echo "-D" > ${BASEDIR}/boot.config
+ echo 'console="vidconsole, comconsole"' >> ${BASEDIR}/boot/loader.conf
+else
+ echo "-h" > ${BASEDIR}/boot.config
+ echo 'console="comconsole"' >> ${BASEDIR}/boot/loader.conf
+fi
+
+return 0
View
53 extra/customroot.sh
@@ -0,0 +1,53 @@
+#!/bin/sh
+#
+# Copyright (c) 2005 Dario Freni
+#
+# See COPYING for licence terms.
+#
+# $FreeBSD$
+# $Id: customroot.sh,v 1.1.1.1 2008/03/25 19:58:15 sullrich Exp $
+
+set -e -u
+
+if [ -z "${LOGFILE:-}" ]; then
+ echo "This script can't run standalone."
+ echo "Please use launch.sh to execute it."
+ exit 1
+fi
+
+CUSTOMROOT=${CUSTOMROOT:-extra/customroot}
+
+cd ${CUSTOMROOT}
+
+if [ "$FREEBSD_VERSION" = "8" ]; then
+ tar cf - * | ( cd /$BASEDIR; tar xfp -)
+ set +e
+ find $BASEDIR -name README -exec rm {} \;
+ find $BASEDIR -name CVS -exec rm -rf {} \;
+ set -e
+else
+ find . -not -name 'README' -not -path '*CVS*' | \
+ cpio -dump -R 0:0 -v ${BASEDIR} >> ${LOGFILE} 2>&1
+fi
+
+# Regenerate the password db if ${CUSTOMROOT}/etc/master.passwd exists
+if [ -f etc/master.passwd ]; then
+ chroot ${BASEDIR} cap_mkdb /etc/master.passwd
+ chroot ${BASEDIR} pwd_mkdb /etc/master.passwd
+fi
+
+# Fix permissions of ssh keys
+find ${BASEDIR}/etc/ssh -name 'ssh_host*key' -exec chmod 600 {} \;
+
+# If CUSTOMROOT_MTREE is set, fix file properties using
+# $CUSTOMROOT_MTREE file.
+# You can easily create your mtree file using:
+# mtree -Pcp /your/customrootdir > /your/customrootmtree
+# You can also edit the resulting file
+
+if [ ! -z "${CUSTOMROOT_MTREE:-}" ]; then
+ mtree -PUe -p ${BASEDIR} < ${CUSTOMROOT_MTREE}
+fi
+
+cd ${LOCALDIR}
+
View
9 extra/customroot/README
@@ -0,0 +1,9 @@
+$FreeBSD$
+$Id: README,v 1.1.1.1 2008/03/25 19:58:16 sullrich Exp $
+
+This directory contains the custom files to be included into the live
+filesystem. It has to be considered as a / filesystem. Files are just
+copied to the livefs directory after every other operation, just
+before packing it into the final image. If a file is already present
+in the live fs it will be overrided.
+
View
28 extra/customscripts.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+#
+# Copyright (c) 2005 Dominique Goncalves
+#
+# See COPYING for licence terms.
+#
+# $FreeBSD$
+# $Id: customscripts.sh,v 1.1.1.1 2008/03/25 19:58:15 sullrich Exp $
+
+set -e -u
+
+if [ -z "${LOGFILE:-}" ]; then
+ echo "This script can't run standalone."
+ echo "Please use launch.sh to execute it."
+ exit 1
+fi
+
+CUSTOMSCRIPTS=${CUSTOMSCRIPTS:-extra/customscripts}
+
+cd ${CUSTOMSCRIPTS}
+for script in `find . -type f -name "*.sh"` ; do
+ /bin/cp ${script} ${BASEDIR}/root
+ echo -n " ${script}"
+ /usr/sbin/chroot ${BASEDIR} /bin/sh /root/${script}
+ /bin/rm ${BASEDIR}/root/${script}
+done
+
+cd ${LOCALDIR}
View
4 extra/customscripts/README
@@ -0,0 +1,4 @@
+This directory contains scripts to be executed in the livefs chroot
+by customscripts plugin, right before the iso is packed. Useful to
+do internal operations such as adding users or editing files in an
+automatic way.
View
29 extra/etcmfs.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# Copyright (c) 2005 Dario Freni
+#
+# See COPYING for licence terms.
+#
+# $FreeBSD$
+# $Id: etcmfs.sh,v 1.1.1.1 2008/03/25 19:58:15 sullrich Exp $
+
+set -e -u
+
+if [ -z "${LOGFILE:-}" ]; then
+ echo "This script can't run standalone."
+ echo "Please use launch.sh to execute it."
+ exit 1
+fi
+
+TMPFILE=$(mktemp -t etcmfs)
+
+cp ${LOCALDIR}/extra/etcmfs/etcmfs.rc ${BASEDIR}/etc/rc.d/etcmfs
+chmod 555 ${BASEDIR}/etc/rc.d/etcmfs
+
+mtree -Pcp ${BASEDIR}/etc > ${TMPFILE}
+mv ${TMPFILE} ${BASEDIR}/etc/mtree/etc.dist
+
+if [ -d ${BASEDIR}/usr/local/etc ]; then
+ mtree -Pcp ${BASEDIR}/usr/local/etc > ${TMPFILE}
+ mv ${TMPFILE} ${BASEDIR}/etc/mtree/localetc.dist
+fi
View
80 extra/etcmfs/etcmfs.rc
@@ -0,0 +1,80 @@
+#!/bin/sh
+#
+# Copyright (c) 2005 Dario Freni
+# 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$
+# $Id: etcmfs.rc,v 1.1.1.1 2008/03/25 19:58:16 sullrich Exp $
+#
+
+# PROVIDE: etcmfs
+# REQUIRE: mountcritlocal
+# BEFORE: var
+
+. /etc/rc.subr
+
+name="etcmfs"
+kenvetcsize=`kenv -q freesbie.etcsize`
+etcsize=${kenvetcsize:-"10m"}
+kenvlocaletcsize=`kenv -q freesbie.localetcsize`
+localetcsize=${kenvlocaletcsize:-"32m"}
+
+load_rc_config $name
+
+tempdir=/tmp
+
+echo "Generating MFS /etc partition"
+
+device=$(mdconfig -a -t malloc -o compress -s ${etcsize})
+bsdlabel -w ${device} auto
+newfs -n -m 2 /dev/${device} > /dev/null 2>&1
+mount -o noatime /dev/${device} ${tempdir}
+
+back=$PWD
+
+cd /etc
+find . -print -depth | cpio -dump --quiet ${tempdir}
+
+cd $back
+
+mtree -PUer -q -p ${tempdir} < /etc/mtree/etc.dist > /dev/null 2>&1
+
+umount ${tempdir}
+mount -o noatime /dev/${device} /etc
+
+if [ -f /etc/mtree/localetc.dist ]; then
+ device=$(mdconfig -a -t malloc -o compress -s ${localetcsize})
+ newfs /dev/${device} > /dev/null 2>&1
+ mount -o noatime /dev/${device} ${tempdir}
+
+ cd /usr/local/etc
+ find . -print -depth | cpio -dump --quiet ${tempdir}
+
+ cd $back
+
+ mtree -PUer -q -p ${tempdir} < /etc/mtree/localetc.dist > /dev/null 2>&1
+
+ umount ${tempdir}
+ mount -o noatime /dev/${device} /usr/local/etc
+fi
View
75 extra/installports.sh
@@ -0,0 +1,75 @@
+#!/bin/sh
+#
+# Copyright (c) 2005 Dario Freni
+#
+# See COPYING for licence terms.
+#
+# $FreeBSD$
+# $Id: installports.sh,v 1.1.1.1 2008/03/25 19:58:15 sullrich Exp $
+#
+# Remount the ports' tree under ${BASEDIR}/usr/ports and install ports
+# listed in the INSTALL_PORTS variable in the usual category/portname
+# form, e.g.: x11/nvidia-driver audio/emu10kx ...
+
+set -e -u
+
+if [ -z "${LOGFILE:-}" ]; then
+ echo "This script can't run standalone."
+ echo "Please use launch.sh to execute it."
+ exit 1
+fi
+
+INSTALL_PORTS=${INSTALL_PORTS:-}
+
+if [ ! -z "${INSTALL_PORTS}" ]; then
+ echo -n ">>> Mounting ports' tree in the livefs chroot..."
+ set +e
+ if ! kldstat -v | grep -q nullfs; then
+ if ! kldload nullfs; then
+ echo "Cannot find nullfs support in kernel and cannot find the proper module, aborting"
+ exit 1
+ fi
+ fi
+ set -e
+
+ mkdir -p ${BASEDIR}/usr/ports ${BASEDIR}/usr/src
+ mount_nullfs ${PORTSDIR:-/usr/ports} ${BASEDIR}/usr/ports
+ mount_nullfs ${SRCDIR:-/usr/src} ${BASEDIR}/usr/src
+ mount_devfs none ${BASEDIR}/dev
+
+ print_error_umount() {
+ echo "Something went wrong, check errors!" >&2
+ [ -n "${LOGFILE:-}" ] && \
+ echo "Log saved on ${LOGFILE}" >&2
+ umount_null
+ kill $$ # XXX exit 1 won't work.
+ }
+
+ umount_null() {
+ umount ${BASEDIR}/usr/ports;
+ umount ${BASEDIR}/usr/src;
+ umount ${BASEDIR}/dev;
+ }
+
+ trap "umount_null; exit 1" INT
+
+ tmpmakeconf=$(TMPDIR=${BASEDIR}/tmp mktemp -t make.conf)
+ envvars="BATCH=true"
+ if [ ! -z "${SRCCONF:-}" ]; then
+ cat ${SRCCONF} > ${tmpmakeconf}
+ envvars="${envvars} __SRCCONF=${tmpmakeconf#$BASEDIR}"
+ fi
+
+ for i in ${INSTALL_PORTS}; do
+ echo "Compiling ${i}"
+ (script -aq ${LOGFILE} chroot ${BASEDIR} make -C /usr/ports/${i} \
+ ${envvars} clean install clean || print_error_umount;) | grep '^===>'
+ done
+
+ umount_null
+ trap "" INT
+fi
+
+cd ${LOCALDIR}
+
+echo "Done!"
View
19 extra/l10n.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+#
+# Copyright (c) 2006 Matteo Riondato
+#
+# See COPYING for licence terms.
+#
+# $FreeBSD$
+# $Id: l10n.sh,v 1.1.1.1 2008/03/25 19:58:15 sullrich Exp $
+
+set -e -u
+
+if [ -z "${LOGFILE:-}" ]; then
+ echo "This script can't run standalone."
+ echo "Please use launch.sh to execute it."
+ exit 1
+fi
+
+cp ${LOCALDIR}/extra/l10n/l10n.rc ${BASEDIR}/etc/rc.d/l10n
+chmod 555 ${BASEDIR}/etc/rc.d/l10n
View
229 extra/l10n/l10n.rc
@@ -0,0 +1,229 @@
+#!/bin/sh
+#
+# Copyright (c) 2006 Mozhaisky Sergei
+# Copyright (c) 2006 Matteo Riondato
+#
+# See COPYING for licence terms.
+#
+#
+# $Id: l10n.rc,v 1.1.1.1 2008/03/25 19:58:16 sullrich Exp $
+#
+# PROVIDE: l10n
+# REQUIRE: etcmfs syscons xconfig
+
+. /etc/rc.subr
+
+name="l10n"
+start_cmd="l10n_start"
+stop_cmd=":"
+
+FL=`kenv -q freesbie.lang`
+
+SUPLANG="bg cs/cz de en es fr it pl ru sk ua"
+
+# path
+P="/etc"
+F_CSHRC="${P}/csh.cshrc"
+F_PROFILE="${P}/profile"
+F_RC="${P}/rc.conf"
+F_TTYS="${P}/ttys"
+
+set_lang() {
+case $1 in
+ # Bulgarian
+ bg)
+ X_LANG="cs_CZ.ISO8859-2"
+ X_MM_CHARSET="ISO-8859-2"
+ X_KEYMAP="bg.bds.ctrlcaps"
+ X_XORG_KEYMAP="bg"
+ ;;
+ # Czech
+ cz|cs)
+ X_LANG="cs_CZ.ISO8859-2"
+ X_MM_CHARSET="ISO-8859-2"
+ X_KEYMAP="cz.iso2"
+ X_XORG_KEYMAP="cz"
+ ;;
+ # German
+ de)
+ X_LANG="de_DE.ISO8859-1"
+ X_MM_CHARSET="ISO-8859-1"
+ X_KEYMAP="german.iso"
+ X_XORG_KEYMAP="de"
+ ;;
+ # English
+ en)
+ ;;
+ # Spanish
+ es)
+ X_LANG="es_ES.ISO8859-1"
+ X_MM_CHARSET="ISO-8859-1"
+ X_KEYMAP="spanish.iso"
+ X_XORG_KEYMAP="es"
+ ;;
+ # French
+ fr)
+ X_LANG="fr_FR.ISO8859-1"
+ X_MM_CHARSET="ISO-8859-1"
+ X_KEYMAP="fr.iso"
+ X_XORG_KEYMAP="fr"
+ ;;
+ # Italian
+ it)
+ X_LANG="it_IT.ISO8859-15"
+ X_MM_CHARSET="ISO-8859-15"
+ X_KEYMAP="it.iso"
+ X_XORG_KEYMAP="it"
+ ;;
+ # Polski
+ pl)
+ X_LANG="pl_PL.ISO8859-2"
+ X_MM_CHARSET="ISO-8859-2"
+ X_KEYMAP="pl_PL.ISO8859-2"
+ X_XORG_KEYMAP="pl"
+ ;;
+ # Russian
+ ru)
+ X_LANG="ru_RU.KOI8-R"
+ X_MM_CHARSET="KOI8-R"
+ X_KEYMAP="ru.koi8-r.win"
+ ;;
+ # Slovak
+ sk)
+ X_LANG="sk_SK.ISO8859-2"
+ X_MM_CHARSET="ISO-8859-2"
+ X_KEYMAP="sk.iso2"
+ X_XORG_KEYMAP="sk"
+ ;;
+ # Ukrainian
+ ua)
+ X_LANG="uk_UA.KOI8-U"
+ X_MM_CHARSET="KOI8-U"
+ X_KEYMAP="ua.koi8-u"
+ X_SCRNMAP="koi8-u2cp866u"
+ X_XORG_KEYMAP="ua(winkeys)"
+ ;;
+esac
+}
+
+set_tty()
+{
+case $1 in
+ ISO-8859-1|ISO-8859-15)
+ X_TTY="cons25l1"
+ ;;
+ ISO-8859-2)
+ X_TTY="cons25l2"
+ ;;
+ ISO-8859-7)
+ X_TTY="cons25l7"
+ ;;
+ KOI8-R)
+ X_TTY="cons25r"
+ ;;
+ KOI8-U)
+ X_TTY="cons25u"
+ ;;
+ US-ASCII)
+ X_TTY="cons25w"
+ ;;
+ *)
+ X_TTY="cons25"
+ ;;
+esac
+}
+
+set_font() {
+case $1 in
+ ISO-8859-1)
+ X_FONT="iso"
+ ;;
+ ISO-8859-15)
+ X_FONT="iso15"
+ ;;
+ ISO-8859-2)
+ X_FONT="iso02"
+ ;;
+ ISO-8859-7)
+ X_FONT="iso07"
+ ;;
+ KOI8-R)
+ X_FONT="cp866"
+ #X_FONT="866-frenzy"
+ X_SCRNMAP="koi8-r2cp866"
+ ;;
+ KOI8-U)
+ X_FONT="cp866u"
+ #X_FONT="866-frenzy"
+ X_SCRNMAP="koi8-r2cp866"
+ ;;
+ KOI8-U)
+ X_FONT="cp866u"
+ #X_FONT="866-frenzy"
+ X_SCRNMAP="koi8-u2cp866u"
+ ;;
+ US-ASCII)
+ X_FONT="iso"
+ ;;
+ *)
+ X_FONT="cp437"
+ ;;
+esac
+}
+
+l10n_start() {
+
+ if [ -z ${FL} ]; then
+ exit 1
+ fi
+
+ echo -n "setting locale: "
+ set_lang ${FL}
+ set_tty ${X_MM_CHARSET}
+ set_font ${X_MM_CHARSET}
+
+ DATENOW=`date "+%Y-%m-%d %H:%M:%S"`
+
+ # set language
+ printf "
+### locale # ${DATENOW} #
+setenv LANG ${X_LANG}
+setenv MM_CHARSET ${X_MM_CHARSET}
+setenv LC_ALL ${X_LANG}
+" >> ${F_CSHRC}
+ printf "
+### locale # ${DATENOW} #
+LANG=${X_LANG}; export LANG
+MM_CHARSET=${X_MM_CHARSET}; export MM_CHARSET
+LC_ALL=${X_LANG}; export LC_ALL
+" >> ${F_PROFILE}
+
+ # patching ttys
+ TTY_C=`awk '/ttyv0/{print $4}' ${F_TTYS}`
+ sed -i "" "s/[[:<:]]${TTY_C}[[:>:]]/${X_TTY}/g" ${F_TTYS}
+
+ # patching rc.conf
+ printf "
+### locale # ${DATENOW} #
+keymap=\"${X_KEYMAP}\"
+font8x16=\"${X_FONT}\"
+" >> ${F_RC}
+
+ if [ "x${X_SCRNMAP}" != "x" ]; then
+ printf "
+scrnmap=\"${X_SCRNMAP}\"