1.1 --- a/README.txt Thu May 26 23:55:42 2011 +0200
1.2 +++ b/README.txt Mon Jul 11 02:16:57 2011 +0200
1.3 @@ -209,10 +209,10 @@
1.4
1.5 The user-setup, user-postsetup and user-do scripts also support a --root
1.6 option which sets up a package manager for a user with root privileges. To
1.7 -set up such an installation, the following commands could be used:
1.8 +set up such an installation, the following commands can be used:
1.9
1.10 sudo user-setup --root
1.11 -sudo user-postsetup
1.12 +sudo user-postsetup --root
1.13
1.14 Entering the installation is done using the user-do script:
1.15
1.16 @@ -254,30 +254,19 @@
1.17 environment for package installation and testing. This can be performed using
1.18 the User Mode Linux (UML) software.
1.19
1.20 -To convert a package manager installation into a UML instance, start with the
1.21 -user-to-uml script which changes the installation's configuration in a number
1.22 -of areas:
1.23 +Since UML needs to see its filesystems as images, not directories within an
1.24 +existing filesystem, the uml-make-image script needs to create these image
1.25 +files. For example, to create a root filesystem 1GB in size, along with a swap
1.26 +file 512MB in size:
1.27
1.28 -user-to-uml
1.29 -
1.30 -Then, as a privileged user, run the uml-setupdev script to initialise some
1.31 -UML-specific device files:
1.32 -
1.33 -sudo uml-setupdev
1.34 +uml-make-image 4 512
1.35
1.36 -Since UML needs to see its filesystems as images, not directories within an
1.37 -existing filesystem, the uml-setupfs script needs to create these image files.
1.38 -For example, to create a root filesystem 1GB in size, along with a swap file
1.39 -512MB in size:
1.40 -
1.41 -uml-setupfs 4 512
1.42 +This will create a UML instance from an existing package manager installation.
1.43
1.44 -Again, as a privileged user, these images are then populated with the package
1.45 -manager contents as follows:
1.46 +Building User Mode Linux
1.47 +------------------------
1.48
1.49 -sudo uml-postsetupfs
1.50 -
1.51 -NOTE: Add Linux build process.
1.52 +To make a User Mode Linux executable, run the uml-build-linux script.
1.53
1.54 Enabling Networking for UML Instances
1.55 -------------------------------------
2.1 --- a/uml-do Thu May 26 23:55:42 2011 +0200
2.2 +++ b/uml-do Mon Jul 11 02:16:57 2011 +0200
2.3 @@ -1,25 +1,23 @@
2.4 -#!/bin/bash
2.5 -# Usage: uml-enter <memory> [ <command and options> ]
2.6 +#!/bin/sh
2.7
2.8 # Configuration:
2.9 if [ -e userinstall-defaults-uml ]; then
2.10 - source userinstall-defaults-uml
2.11 + . "$PWD/userinstall-defaults-uml"
2.12 elif [ -e /etc/default/userinstall-uml ]; then
2.13 - source /etc/default/userinstall-uml
2.14 + . /etc/default/userinstall-uml
2.15 else
2.16 - echo "No defaults found for userinstall (UML)."
2.17 + echo "No defaults found for userinstall (UML)." 1>&2
2.18 exit 1
2.19 fi
2.20
2.21 +PROGNAME=`basename "$0"`
2.22 +
2.23 if [ ! "$1" ]; then
2.24 - echo "$0 <memory>"
2.25 + echo "Usage: $PROGNAME <memory-with-unit>" 1>&2
2.26 exit 1
2.27 fi
2.28
2.29 -export IMAGE="$UMLROOT/rootfs"
2.30 -export SWAPIMAGE="$UMLROOT/swap"
2.31 -export UML_MEMORY="$1"
2.32 -export THIS_DIR="`dirname $0`"
2.33 +UML_MEMORY="$1"
2.34
2.35 # Discard the memory argument.
2.36
2.37 @@ -27,12 +25,12 @@
2.38
2.39 # Test for networking.
2.40
2.41 -if [ "$1" == '--net' ]; then
2.42 - export UML_NETWORKING="$NETDEVICE=tuntap,$TUNDEVICE,fe:fd:0:0:0:1,$HOSTADDRESS"
2.43 +if [ "$1" = '--net' ]; then
2.44 + UML_NETWORKING="$NETDEVICE=tuntap,$TUNDEVICE,fe:fd:0:0:0:1,$HOSTADDRESS"
2.45 xhost +"$GUESTADDRESS"
2.46 shift 1
2.47 fi
2.48
2.49 # Now we start the virtual machine...
2.50
2.51 -"$THIS_DIR/linux" ubd0="$IMAGE" ubd1="$SWAPIMAGE" mem="$UML_MEMORY" "$UML_NETWORKING" $*
2.52 +./linux ubd0="$IMAGE" ubd1="$SWAPIMAGE" mem="$UML_MEMORY" "$UML_NETWORKING" $*
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/uml-linux-build Mon Jul 11 02:16:57 2011 +0200
3.3 @@ -0,0 +1,76 @@
3.4 +#!/bin/sh
3.5 +
3.6 +# Configuration:
3.7 +if [ -e userinstall-defaults-uml ]; then
3.8 + . "$PWD/userinstall-defaults-uml"
3.9 +elif [ -e /etc/default/userinstall-uml ]; then
3.10 + . /etc/default/userinstall-uml
3.11 +else
3.12 + echo "No defaults found for userinstall (UML)." 1>&2
3.13 + exit 1
3.14 +fi
3.15 +
3.16 +if [ ! -e "$PACKAGEROOT" ]; then
3.17 + echo "A package root must first be made using user-setup." 1>&2
3.18 + exit 1
3.19 +fi
3.20 +
3.21 +THISDIR=`dirname "$0"`
3.22 +
3.23 +if [ ! -e linux ]; then
3.24 + if [ ! -e "$LINUXDIRNAME" ]; then
3.25 + if [ ! -e "$LINUXARCHIVE" ]; then
3.26 + echo "Getting the Linux kernel archive..." 1>&2
3.27 + wget -O "$LINUXARCHIVE" "$LINUXADDRESS"
3.28 + fi
3.29 +
3.30 + echo "Unpacking the archive..." 1>&2
3.31 + tar jxf "$LINUXARCHIVE"
3.32 + fi
3.33 + if [ ! -e "$LINUXDIRNAME/linux" ]; then
3.34 +
3.35 + # Copy our configuration into the unpacked directory.
3.36 + # Normally we would do this:
3.37 + # make defconfig ARCH=um
3.38 + # make menuconfig ARCH=um
3.39 + # In "File systems", "CD-ROM/DVD Filesystems", press Y for "ISO 9660...".
3.40 + # The supplied configuration file should include this information.
3.41 + echo "Adding configuration..." 1>&2
3.42 + if [ -e "$LINUXDIRNAME/.config" ]; then
3.43 + if [ ! -e "$LINUXDIRNAME/.config.original" ]; then
3.44 + echo "$LINUXDIRNAME/.config -> $LINUXDIRNAME/.config.original" 1>&2
3.45 + mv "$LINUXDIRNAME/.config" "$LINUXDIRNAME/.config.original"
3.46 + fi
3.47 + fi
3.48 +
3.49 + echo "uml-linux-build.config -> $LINUXDIRNAME/.config"
3.50 + cp "$THISDIR/uml-linux-build.config" "$LINUXDIRNAME/.config"
3.51 + fi
3.52 +
3.53 + # Enter the unpacked directory and build.
3.54 + cd "$LINUXDIRNAME"
3.55 +
3.56 + #echo "Patching hostaudio for SDL..."
3.57 + #patch -p0 < ../patches/hostaudio_kern.c.diff
3.58 +
3.59 + echo "Building..." 1>&2
3.60 + make ARCH=um
3.61 +
3.62 + # Mount the root filesystem and install the modules.
3.63 + echo "Making the modules..." 1>&2
3.64 + make modules ARCH=um
3.65 +
3.66 + echo "Installing the modules..." 1>&2
3.67 + make modules_install INSTALL_MOD_PATH="$PACKAGEROOT" ARCH=um
3.68 + cd ..
3.69 +fi
3.70 +
3.71 +# Now get the executable and remove the build directory.
3.72 +if [ ! -e linux ]; then
3.73 + mv "$LINUXDIRNAME/linux" .
3.74 +fi
3.75 +
3.76 +if [ -e linux ]; then
3.77 + echo "To remove the Linux kernel sources, do this:" 1>&2
3.78 + echo "rm -rf '$LINUXDIRNAME'" 1>&2
3.79 +fi
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/uml-linux-build.config Mon Jul 11 02:16:57 2011 +0200
4.3 @@ -0,0 +1,569 @@
4.4 +#
4.5 +# Automatically generated make config: don't edit
4.6 +# Linux kernel version: 2.6.24.3
4.7 +# Sat Mar 15 21:01:57 2008
4.8 +#
4.9 +CONFIG_DEFCONFIG_LIST="arch/$ARCH/defconfig"
4.10 +CONFIG_GENERIC_HARDIRQS=y
4.11 +CONFIG_UML=y
4.12 +CONFIG_MMU=y
4.13 +CONFIG_NO_IOMEM=y
4.14 +# CONFIG_TRACE_IRQFLAGS_SUPPORT is not set
4.15 +CONFIG_LOCKDEP_SUPPORT=y
4.16 +# CONFIG_STACKTRACE_SUPPORT is not set
4.17 +CONFIG_GENERIC_CALIBRATE_DELAY=y
4.18 +CONFIG_GENERIC_BUG=y
4.19 +CONFIG_GENERIC_TIME=y
4.20 +CONFIG_GENERIC_CLOCKEVENTS=y
4.21 +CONFIG_IRQ_RELEASE_METHOD=y
4.22 +
4.23 +#
4.24 +# UML-specific options
4.25 +#
4.26 +# CONFIG_STATIC_LINK is not set
4.27 +
4.28 +#
4.29 +# Host processor type and features
4.30 +#
4.31 +# CONFIG_M386 is not set
4.32 +# CONFIG_M486 is not set
4.33 +# CONFIG_M586 is not set
4.34 +# CONFIG_M586TSC is not set
4.35 +# CONFIG_M586MMX is not set
4.36 +CONFIG_M686=y
4.37 +# CONFIG_MPENTIUMII is not set
4.38 +# CONFIG_MPENTIUMIII is not set
4.39 +# CONFIG_MPENTIUMM is not set
4.40 +# CONFIG_MPENTIUM4 is not set
4.41 +# CONFIG_MK6 is not set
4.42 +# CONFIG_MK7 is not set
4.43 +# CONFIG_MK8 is not set
4.44 +# CONFIG_MCRUSOE is not set
4.45 +# CONFIG_MEFFICEON is not set
4.46 +# CONFIG_MWINCHIPC6 is not set
4.47 +# CONFIG_MWINCHIP2 is not set
4.48 +# CONFIG_MWINCHIP3D is not set
4.49 +# CONFIG_MGEODEGX1 is not set
4.50 +# CONFIG_MGEODE_LX is not set
4.51 +# CONFIG_MCYRIXIII is not set
4.52 +# CONFIG_MVIAC3_2 is not set
4.53 +# CONFIG_MVIAC7 is not set
4.54 +# CONFIG_MPSC is not set
4.55 +# CONFIG_MCORE2 is not set
4.56 +# CONFIG_GENERIC_CPU is not set
4.57 +# CONFIG_X86_GENERIC is not set
4.58 +CONFIG_X86_CMPXCHG=y
4.59 +CONFIG_X86_L1_CACHE_SHIFT=5
4.60 +CONFIG_X86_XADD=y
4.61 +CONFIG_X86_PPRO_FENCE=y
4.62 +CONFIG_X86_WP_WORKS_OK=y
4.63 +CONFIG_X86_INVLPG=y
4.64 +CONFIG_X86_BSWAP=y
4.65 +CONFIG_X86_POPAD_OK=y
4.66 +CONFIG_X86_GOOD_APIC=y
4.67 +CONFIG_X86_USE_PPRO_CHECKSUM=y
4.68 +CONFIG_X86_TSC=y
4.69 +CONFIG_X86_CMOV=y
4.70 +CONFIG_X86_MINIMUM_CPU_FAMILY=4
4.71 +CONFIG_UML_X86=y
4.72 +CONFIG_X86_32=y
4.73 +CONFIG_RWSEM_XCHGADD_ALGORITHM=y
4.74 +# CONFIG_64BIT is not set
4.75 +CONFIG_SEMAPHORE_SLEEPERS=y
4.76 +CONFIG_HOST_VMSPLIT_3G=y
4.77 +# CONFIG_HOST_VMSPLIT_3G_OPT is not set
4.78 +# CONFIG_HOST_VMSPLIT_2G is not set
4.79 +# CONFIG_HOST_VMSPLIT_1G is not set
4.80 +CONFIG_TOP_ADDR=0xC0000000
4.81 +# CONFIG_3_LEVEL_PGTABLES is not set
4.82 +CONFIG_ARCH_HAS_SC_SIGNALS=y
4.83 +CONFIG_ARCH_REUSE_HOST_VSYSCALL_AREA=y
4.84 +CONFIG_GENERIC_HWEIGHT=y
4.85 +CONFIG_SELECT_MEMORY_MODEL=y
4.86 +CONFIG_FLATMEM_MANUAL=y
4.87 +# CONFIG_DISCONTIGMEM_MANUAL is not set
4.88 +# CONFIG_SPARSEMEM_MANUAL is not set
4.89 +CONFIG_FLATMEM=y
4.90 +CONFIG_FLAT_NODE_MEM_MAP=y
4.91 +# CONFIG_SPARSEMEM_STATIC is not set
4.92 +# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
4.93 +CONFIG_SPLIT_PTLOCK_CPUS=4
4.94 +# CONFIG_RESOURCES_64BIT is not set
4.95 +CONFIG_ZONE_DMA_FLAG=0
4.96 +CONFIG_VIRT_TO_BUS=y
4.97 +# CONFIG_TICK_ONESHOT is not set
4.98 +# CONFIG_NO_HZ is not set
4.99 +# CONFIG_HIGH_RES_TIMERS is not set
4.100 +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
4.101 +CONFIG_LD_SCRIPT_DYN=y
4.102 +CONFIG_NET=y
4.103 +CONFIG_BINFMT_ELF=y
4.104 +# CONFIG_BINFMT_AOUT is not set
4.105 +CONFIG_BINFMT_MISC=m
4.106 +# CONFIG_HOSTFS is not set
4.107 +# CONFIG_HPPFS is not set
4.108 +CONFIG_MCONSOLE=y
4.109 +# CONFIG_MAGIC_SYSRQ is not set
4.110 +# CONFIG_SMP is not set
4.111 +CONFIG_NEST_LEVEL=0
4.112 +# CONFIG_HIGHMEM is not set
4.113 +CONFIG_KERNEL_STACK_ORDER=2
4.114 +
4.115 +#
4.116 +# General setup
4.117 +#
4.118 +CONFIG_EXPERIMENTAL=y
4.119 +CONFIG_BROKEN_ON_SMP=y
4.120 +CONFIG_INIT_ENV_ARG_LIMIT=128
4.121 +CONFIG_LOCALVERSION=""
4.122 +CONFIG_LOCALVERSION_AUTO=y
4.123 +CONFIG_SWAP=y
4.124 +CONFIG_SYSVIPC=y
4.125 +CONFIG_SYSVIPC_SYSCTL=y
4.126 +CONFIG_POSIX_MQUEUE=y
4.127 +CONFIG_BSD_PROCESS_ACCT=y
4.128 +# CONFIG_BSD_PROCESS_ACCT_V3 is not set
4.129 +# CONFIG_TASKSTATS is not set
4.130 +# CONFIG_USER_NS is not set
4.131 +# CONFIG_PID_NS is not set
4.132 +# CONFIG_AUDIT is not set
4.133 +CONFIG_IKCONFIG=y
4.134 +CONFIG_IKCONFIG_PROC=y
4.135 +CONFIG_LOG_BUF_SHIFT=14
4.136 +# CONFIG_CGROUPS is not set
4.137 +CONFIG_FAIR_GROUP_SCHED=y
4.138 +CONFIG_FAIR_USER_SCHED=y
4.139 +# CONFIG_FAIR_CGROUP_SCHED is not set
4.140 +CONFIG_SYSFS_DEPRECATED=y
4.141 +# CONFIG_RELAY is not set
4.142 +# CONFIG_BLK_DEV_INITRD is not set
4.143 +CONFIG_CC_OPTIMIZE_FOR_SIZE=y
4.144 +CONFIG_SYSCTL=y
4.145 +# CONFIG_EMBEDDED is not set
4.146 +CONFIG_UID16=y
4.147 +CONFIG_SYSCTL_SYSCALL=y
4.148 +CONFIG_KALLSYMS=y
4.149 +# CONFIG_KALLSYMS_ALL is not set
4.150 +CONFIG_KALLSYMS_EXTRA_PASS=y
4.151 +CONFIG_HOTPLUG=y
4.152 +CONFIG_PRINTK=y
4.153 +CONFIG_BUG=y
4.154 +CONFIG_ELF_CORE=y
4.155 +CONFIG_BASE_FULL=y
4.156 +CONFIG_FUTEX=y
4.157 +CONFIG_ANON_INODES=y
4.158 +CONFIG_EPOLL=y
4.159 +CONFIG_SIGNALFD=y
4.160 +CONFIG_EVENTFD=y
4.161 +CONFIG_SHMEM=y
4.162 +CONFIG_VM_EVENT_COUNTERS=y
4.163 +CONFIG_SLAB=y
4.164 +# CONFIG_SLUB is not set
4.165 +# CONFIG_SLOB is not set
4.166 +CONFIG_SLABINFO=y
4.167 +CONFIG_RT_MUTEXES=y
4.168 +# CONFIG_TINY_SHMEM is not set
4.169 +CONFIG_BASE_SMALL=0
4.170 +CONFIG_MODULES=y
4.171 +CONFIG_MODULE_UNLOAD=y
4.172 +# CONFIG_MODULE_FORCE_UNLOAD is not set
4.173 +# CONFIG_MODVERSIONS is not set
4.174 +# CONFIG_MODULE_SRCVERSION_ALL is not set
4.175 +CONFIG_KMOD=y
4.176 +CONFIG_BLOCK=y
4.177 +# CONFIG_LBD is not set
4.178 +# CONFIG_BLK_DEV_IO_TRACE is not set
4.179 +# CONFIG_LSF is not set
4.180 +# CONFIG_BLK_DEV_BSG is not set
4.181 +
4.182 +#
4.183 +# IO Schedulers
4.184 +#
4.185 +CONFIG_IOSCHED_NOOP=y
4.186 +CONFIG_IOSCHED_AS=y
4.187 +CONFIG_IOSCHED_DEADLINE=y
4.188 +CONFIG_IOSCHED_CFQ=y
4.189 +CONFIG_DEFAULT_AS=y
4.190 +# CONFIG_DEFAULT_DEADLINE is not set
4.191 +# CONFIG_DEFAULT_CFQ is not set
4.192 +# CONFIG_DEFAULT_NOOP is not set
4.193 +CONFIG_DEFAULT_IOSCHED="anticipatory"
4.194 +CONFIG_BLK_DEV=y
4.195 +CONFIG_BLK_DEV_UBD=y
4.196 +# CONFIG_BLK_DEV_UBD_SYNC is not set
4.197 +CONFIG_BLK_DEV_COW_COMMON=y
4.198 +CONFIG_BLK_DEV_LOOP=m
4.199 +# CONFIG_BLK_DEV_CRYPTOLOOP is not set
4.200 +CONFIG_BLK_DEV_NBD=m
4.201 +# CONFIG_BLK_DEV_RAM is not set
4.202 +# CONFIG_ATA_OVER_ETH is not set
4.203 +
4.204 +#
4.205 +# Character Devices
4.206 +#
4.207 +CONFIG_STDERR_CONSOLE=y
4.208 +CONFIG_STDIO_CONSOLE=y
4.209 +CONFIG_SSL=y
4.210 +CONFIG_NULL_CHAN=y
4.211 +CONFIG_PORT_CHAN=y
4.212 +CONFIG_PTY_CHAN=y
4.213 +CONFIG_TTY_CHAN=y
4.214 +CONFIG_XTERM_CHAN=y
4.215 +# CONFIG_NOCONFIG_CHAN is not set
4.216 +CONFIG_CON_ZERO_CHAN="fd:0,fd:1"
4.217 +CONFIG_CON_CHAN="xterm"
4.218 +CONFIG_SSL_CHAN="pty"
4.219 +CONFIG_UNIX98_PTYS=y
4.220 +CONFIG_LEGACY_PTYS=y
4.221 +# CONFIG_RAW_DRIVER is not set
4.222 +CONFIG_LEGACY_PTY_COUNT=256
4.223 +# CONFIG_WATCHDOG is not set
4.224 +CONFIG_UML_SOUND=m
4.225 +CONFIG_SOUND=m
4.226 +CONFIG_HOSTAUDIO=m
4.227 +# CONFIG_HW_RANDOM is not set
4.228 +CONFIG_UML_RANDOM=y
4.229 +# CONFIG_MMAPPER is not set
4.230 +
4.231 +#
4.232 +# Generic Driver Options
4.233 +#
4.234 +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
4.235 +CONFIG_STANDALONE=y
4.236 +CONFIG_PREVENT_FIRMWARE_BUILD=y
4.237 +# CONFIG_FW_LOADER is not set
4.238 +# CONFIG_DEBUG_DRIVER is not set
4.239 +# CONFIG_DEBUG_DEVRES is not set
4.240 +# CONFIG_SYS_HYPERVISOR is not set
4.241 +
4.242 +#
4.243 +# Networking
4.244 +#
4.245 +
4.246 +#
4.247 +# Networking options
4.248 +#
4.249 +CONFIG_PACKET=y
4.250 +CONFIG_PACKET_MMAP=y
4.251 +CONFIG_UNIX=y
4.252 +CONFIG_XFRM=y
4.253 +# CONFIG_XFRM_USER is not set
4.254 +# CONFIG_XFRM_SUB_POLICY is not set
4.255 +# CONFIG_XFRM_MIGRATE is not set
4.256 +# CONFIG_NET_KEY is not set
4.257 +CONFIG_INET=y
4.258 +# CONFIG_IP_MULTICAST is not set
4.259 +# CONFIG_IP_ADVANCED_ROUTER is not set
4.260 +CONFIG_IP_FIB_HASH=y
4.261 +# CONFIG_IP_PNP is not set
4.262 +# CONFIG_NET_IPIP is not set
4.263 +# CONFIG_NET_IPGRE is not set
4.264 +# CONFIG_ARPD is not set
4.265 +# CONFIG_SYN_COOKIES is not set
4.266 +# CONFIG_INET_AH is not set
4.267 +# CONFIG_INET_ESP is not set
4.268 +# CONFIG_INET_IPCOMP is not set
4.269 +# CONFIG_INET_XFRM_TUNNEL is not set
4.270 +# CONFIG_INET_TUNNEL is not set
4.271 +CONFIG_INET_XFRM_MODE_TRANSPORT=y
4.272 +CONFIG_INET_XFRM_MODE_TUNNEL=y
4.273 +CONFIG_INET_XFRM_MODE_BEET=y
4.274 +# CONFIG_INET_LRO is not set
4.275 +CONFIG_INET_DIAG=y
4.276 +CONFIG_INET_TCP_DIAG=y
4.277 +# CONFIG_TCP_CONG_ADVANCED is not set
4.278 +CONFIG_TCP_CONG_CUBIC=y
4.279 +CONFIG_DEFAULT_TCP_CONG="cubic"
4.280 +# CONFIG_TCP_MD5SIG is not set
4.281 +# CONFIG_IPV6 is not set
4.282 +# CONFIG_INET6_XFRM_TUNNEL is not set
4.283 +# CONFIG_INET6_TUNNEL is not set
4.284 +# CONFIG_NETWORK_SECMARK is not set
4.285 +# CONFIG_NETFILTER is not set
4.286 +# CONFIG_IP_DCCP is not set
4.287 +# CONFIG_IP_SCTP is not set
4.288 +# CONFIG_TIPC is not set
4.289 +# CONFIG_ATM is not set
4.290 +# CONFIG_BRIDGE is not set
4.291 +# CONFIG_VLAN_8021Q is not set
4.292 +# CONFIG_DECNET is not set
4.293 +# CONFIG_LLC2 is not set
4.294 +# CONFIG_IPX is not set
4.295 +# CONFIG_ATALK is not set
4.296 +# CONFIG_X25 is not set
4.297 +# CONFIG_LAPB is not set
4.298 +# CONFIG_ECONET is not set
4.299 +# CONFIG_WAN_ROUTER is not set
4.300 +# CONFIG_NET_SCHED is not set
4.301 +
4.302 +#
4.303 +# Network testing
4.304 +#
4.305 +# CONFIG_NET_PKTGEN is not set
4.306 +# CONFIG_HAMRADIO is not set
4.307 +# CONFIG_IRDA is not set
4.308 +# CONFIG_BT is not set
4.309 +# CONFIG_AF_RXRPC is not set
4.310 +
4.311 +#
4.312 +# Wireless
4.313 +#
4.314 +# CONFIG_CFG80211 is not set
4.315 +# CONFIG_WIRELESS_EXT is not set
4.316 +# CONFIG_MAC80211 is not set
4.317 +# CONFIG_IEEE80211 is not set
4.318 +# CONFIG_RFKILL is not set
4.319 +# CONFIG_NET_9P is not set
4.320 +
4.321 +#
4.322 +# UML Network Devices
4.323 +#
4.324 +CONFIG_UML_NET=y
4.325 +CONFIG_UML_NET_ETHERTAP=y
4.326 +CONFIG_UML_NET_TUNTAP=y
4.327 +CONFIG_UML_NET_SLIP=y
4.328 +CONFIG_UML_NET_DAEMON=y
4.329 +# CONFIG_UML_NET_VDE is not set
4.330 +CONFIG_UML_NET_MCAST=y
4.331 +# CONFIG_UML_NET_PCAP is not set
4.332 +CONFIG_UML_NET_SLIRP=y
4.333 +CONFIG_NETDEVICES=y
4.334 +# CONFIG_NETDEVICES_MULTIQUEUE is not set
4.335 +CONFIG_DUMMY=m
4.336 +# CONFIG_BONDING is not set
4.337 +# CONFIG_MACVLAN is not set
4.338 +# CONFIG_EQUALIZER is not set
4.339 +CONFIG_TUN=m
4.340 +# CONFIG_VETH is not set
4.341 +
4.342 +#
4.343 +# Wireless LAN
4.344 +#
4.345 +# CONFIG_WLAN_PRE80211 is not set
4.346 +# CONFIG_WLAN_80211 is not set
4.347 +# CONFIG_WAN is not set
4.348 +CONFIG_PPP=m
4.349 +# CONFIG_PPP_MULTILINK is not set
4.350 +# CONFIG_PPP_FILTER is not set
4.351 +# CONFIG_PPP_ASYNC is not set
4.352 +# CONFIG_PPP_SYNC_TTY is not set
4.353 +# CONFIG_PPP_DEFLATE is not set
4.354 +# CONFIG_PPP_BSDCOMP is not set
4.355 +# CONFIG_PPP_MPPE is not set
4.356 +# CONFIG_PPPOE is not set
4.357 +# CONFIG_PPPOL2TP is not set
4.358 +CONFIG_SLIP=m
4.359 +# CONFIG_SLIP_COMPRESSED is not set
4.360 +CONFIG_SLHC=m
4.361 +# CONFIG_SLIP_SMART is not set
4.362 +# CONFIG_SLIP_MODE_SLIP6 is not set
4.363 +# CONFIG_SHAPER is not set
4.364 +# CONFIG_NETCONSOLE is not set
4.365 +# CONFIG_NETPOLL is not set
4.366 +# CONFIG_NET_POLL_CONTROLLER is not set
4.367 +# CONFIG_CONNECTOR is not set
4.368 +
4.369 +#
4.370 +# File systems
4.371 +#
4.372 +CONFIG_EXT2_FS=y
4.373 +# CONFIG_EXT2_FS_XATTR is not set
4.374 +# CONFIG_EXT2_FS_XIP is not set
4.375 +CONFIG_EXT3_FS=y
4.376 +# CONFIG_EXT3_FS_XATTR is not set
4.377 +# CONFIG_EXT4DEV_FS is not set
4.378 +CONFIG_JBD=y
4.379 +CONFIG_REISERFS_FS=y
4.380 +# CONFIG_REISERFS_CHECK is not set
4.381 +# CONFIG_REISERFS_PROC_INFO is not set
4.382 +# CONFIG_REISERFS_FS_XATTR is not set
4.383 +# CONFIG_JFS_FS is not set
4.384 +# CONFIG_FS_POSIX_ACL is not set
4.385 +# CONFIG_XFS_FS is not set
4.386 +# CONFIG_GFS2_FS is not set
4.387 +# CONFIG_OCFS2_FS is not set
4.388 +# CONFIG_MINIX_FS is not set
4.389 +# CONFIG_ROMFS_FS is not set
4.390 +CONFIG_INOTIFY=y
4.391 +CONFIG_INOTIFY_USER=y
4.392 +CONFIG_QUOTA=y
4.393 +# CONFIG_QUOTA_NETLINK_INTERFACE is not set
4.394 +CONFIG_PRINT_QUOTA_WARNING=y
4.395 +# CONFIG_QFMT_V1 is not set
4.396 +# CONFIG_QFMT_V2 is not set
4.397 +CONFIG_QUOTACTL=y
4.398 +CONFIG_DNOTIFY=y
4.399 +CONFIG_AUTOFS_FS=m
4.400 +CONFIG_AUTOFS4_FS=m
4.401 +CONFIG_FUSE_FS=y
4.402 +
4.403 +#
4.404 +# CD-ROM/DVD Filesystems
4.405 +#
4.406 +CONFIG_ISO9660_FS=y
4.407 +CONFIG_JOLIET=y
4.408 +# CONFIG_ZISOFS is not set
4.409 +# CONFIG_UDF_FS is not set
4.410 +
4.411 +#
4.412 +# DOS/FAT/NT Filesystems
4.413 +#
4.414 +# CONFIG_MSDOS_FS is not set
4.415 +# CONFIG_VFAT_FS is not set
4.416 +# CONFIG_NTFS_FS is not set
4.417 +
4.418 +#
4.419 +# Pseudo filesystems
4.420 +#
4.421 +CONFIG_PROC_FS=y
4.422 +CONFIG_PROC_KCORE=y
4.423 +CONFIG_PROC_SYSCTL=y
4.424 +CONFIG_SYSFS=y
4.425 +CONFIG_TMPFS=y
4.426 +# CONFIG_TMPFS_POSIX_ACL is not set
4.427 +# CONFIG_HUGETLB_PAGE is not set
4.428 +# CONFIG_CONFIGFS_FS is not set
4.429 +
4.430 +#
4.431 +# Miscellaneous filesystems
4.432 +#
4.433 +# CONFIG_ADFS_FS is not set
4.434 +# CONFIG_AFFS_FS is not set
4.435 +# CONFIG_HFS_FS is not set
4.436 +# CONFIG_HFSPLUS_FS is not set
4.437 +# CONFIG_BEFS_FS is not set
4.438 +# CONFIG_BFS_FS is not set
4.439 +# CONFIG_EFS_FS is not set
4.440 +# CONFIG_CRAMFS is not set
4.441 +# CONFIG_VXFS_FS is not set
4.442 +# CONFIG_HPFS_FS is not set
4.443 +# CONFIG_QNX4FS_FS is not set
4.444 +# CONFIG_SYSV_FS is not set
4.445 +# CONFIG_UFS_FS is not set
4.446 +CONFIG_NETWORK_FILESYSTEMS=y
4.447 +# CONFIG_NFS_FS is not set
4.448 +# CONFIG_NFSD is not set
4.449 +# CONFIG_SMB_FS is not set
4.450 +# CONFIG_CIFS is not set
4.451 +# CONFIG_NCP_FS is not set
4.452 +# CONFIG_CODA_FS is not set
4.453 +# CONFIG_AFS_FS is not set
4.454 +
4.455 +#
4.456 +# Partition Types
4.457 +#
4.458 +# CONFIG_PARTITION_ADVANCED is not set
4.459 +CONFIG_MSDOS_PARTITION=y
4.460 +CONFIG_NLS=y
4.461 +CONFIG_NLS_DEFAULT="iso8859-1"
4.462 +# CONFIG_NLS_CODEPAGE_437 is not set
4.463 +# CONFIG_NLS_CODEPAGE_737 is not set
4.464 +# CONFIG_NLS_CODEPAGE_775 is not set
4.465 +# CONFIG_NLS_CODEPAGE_850 is not set
4.466 +# CONFIG_NLS_CODEPAGE_852 is not set
4.467 +# CONFIG_NLS_CODEPAGE_855 is not set
4.468 +# CONFIG_NLS_CODEPAGE_857 is not set
4.469 +# CONFIG_NLS_CODEPAGE_860 is not set
4.470 +# CONFIG_NLS_CODEPAGE_861 is not set
4.471 +# CONFIG_NLS_CODEPAGE_862 is not set
4.472 +# CONFIG_NLS_CODEPAGE_863 is not set
4.473 +# CONFIG_NLS_CODEPAGE_864 is not set
4.474 +# CONFIG_NLS_CODEPAGE_865 is not set
4.475 +# CONFIG_NLS_CODEPAGE_866 is not set
4.476 +# CONFIG_NLS_CODEPAGE_869 is not set
4.477 +# CONFIG_NLS_CODEPAGE_936 is not set
4.478 +# CONFIG_NLS_CODEPAGE_950 is not set
4.479 +# CONFIG_NLS_CODEPAGE_932 is not set
4.480 +# CONFIG_NLS_CODEPAGE_949 is not set
4.481 +# CONFIG_NLS_CODEPAGE_874 is not set
4.482 +# CONFIG_NLS_ISO8859_8 is not set
4.483 +# CONFIG_NLS_CODEPAGE_1250 is not set
4.484 +# CONFIG_NLS_CODEPAGE_1251 is not set
4.485 +# CONFIG_NLS_ASCII is not set
4.486 +# CONFIG_NLS_ISO8859_1 is not set
4.487 +# CONFIG_NLS_ISO8859_2 is not set
4.488 +# CONFIG_NLS_ISO8859_3 is not set
4.489 +# CONFIG_NLS_ISO8859_4 is not set
4.490 +# CONFIG_NLS_ISO8859_5 is not set
4.491 +# CONFIG_NLS_ISO8859_6 is not set
4.492 +# CONFIG_NLS_ISO8859_7 is not set
4.493 +# CONFIG_NLS_ISO8859_9 is not set
4.494 +# CONFIG_NLS_ISO8859_13 is not set
4.495 +# CONFIG_NLS_ISO8859_14 is not set
4.496 +# CONFIG_NLS_ISO8859_15 is not set
4.497 +# CONFIG_NLS_KOI8_R is not set
4.498 +# CONFIG_NLS_KOI8_U is not set
4.499 +# CONFIG_NLS_UTF8 is not set
4.500 +# CONFIG_DLM is not set
4.501 +
4.502 +#
4.503 +# Security options
4.504 +#
4.505 +# CONFIG_KEYS is not set
4.506 +# CONFIG_SECURITY is not set
4.507 +# CONFIG_SECURITY_FILE_CAPABILITIES is not set
4.508 +# CONFIG_CRYPTO is not set
4.509 +
4.510 +#
4.511 +# Library routines
4.512 +#
4.513 +CONFIG_BITREVERSE=m
4.514 +# CONFIG_CRC_CCITT is not set
4.515 +# CONFIG_CRC16 is not set
4.516 +# CONFIG_CRC_ITU_T is not set
4.517 +CONFIG_CRC32=m
4.518 +# CONFIG_CRC7 is not set
4.519 +# CONFIG_LIBCRC32C is not set
4.520 +CONFIG_PLIST=y
4.521 +CONFIG_HAS_DMA=y
4.522 +
4.523 +#
4.524 +# SCSI device support
4.525 +#
4.526 +# CONFIG_RAID_ATTRS is not set
4.527 +# CONFIG_SCSI is not set
4.528 +# CONFIG_SCSI_DMA is not set
4.529 +# CONFIG_SCSI_NETLINK is not set
4.530 +# CONFIG_MD is not set
4.531 +# CONFIG_INPUT is not set
4.532 +CONFIG_INSTRUMENTATION=y
4.533 +# CONFIG_PROFILING is not set
4.534 +# CONFIG_MARKERS is not set
4.535 +
4.536 +#
4.537 +# Kernel hacking
4.538 +#
4.539 +# CONFIG_PRINTK_TIME is not set
4.540 +CONFIG_ENABLE_WARN_DEPRECATED=y
4.541 +CONFIG_ENABLE_MUST_CHECK=y
4.542 +# CONFIG_UNUSED_SYMBOLS is not set
4.543 +# CONFIG_DEBUG_FS is not set
4.544 +CONFIG_DEBUG_KERNEL=y
4.545 +# CONFIG_DEBUG_SHIRQ is not set
4.546 +CONFIG_DETECT_SOFTLOCKUP=y
4.547 +CONFIG_SCHED_DEBUG=y
4.548 +# CONFIG_SCHEDSTATS is not set
4.549 +# CONFIG_TIMER_STATS is not set
4.550 +CONFIG_DEBUG_SLAB=y
4.551 +# CONFIG_DEBUG_SLAB_LEAK is not set
4.552 +# CONFIG_DEBUG_RT_MUTEXES is not set
4.553 +# CONFIG_RT_MUTEX_TESTER is not set
4.554 +# CONFIG_DEBUG_SPINLOCK is not set
4.555 +# CONFIG_DEBUG_MUTEXES is not set
4.556 +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
4.557 +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
4.558 +# CONFIG_DEBUG_KOBJECT is not set
4.559 +CONFIG_DEBUG_BUGVERBOSE=y
4.560 +CONFIG_DEBUG_INFO=y
4.561 +# CONFIG_DEBUG_VM is not set
4.562 +# CONFIG_DEBUG_LIST is not set
4.563 +# CONFIG_DEBUG_SG is not set
4.564 +CONFIG_FRAME_POINTER=y
4.565 +CONFIG_FORCED_INLINING=y
4.566 +# CONFIG_BOOT_PRINTK_DELAY is not set
4.567 +# CONFIG_RCU_TORTURE_TEST is not set
4.568 +# CONFIG_FAULT_INJECTION is not set
4.569 +# CONFIG_SAMPLES is not set
4.570 +# CONFIG_GPROF is not set
4.571 +# CONFIG_GCOV is not set
4.572 +# CONFIG_DEBUG_STACK_USAGE is not set
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
5.2 +++ b/uml-make-devices Mon Jul 11 02:16:57 2011 +0200
5.3 @@ -0,0 +1,22 @@
5.4 +#!/bin/sh
5.5 +
5.6 +if [ ! "$1" ]; then
5.7 + echo "Need an image directory for the UML system." 1>&2
5.8 + exit 1
5.9 +fi
5.10 +
5.11 +IMAGEDIR=$1
5.12 +
5.13 +echo "Creating special UML devices..." 1>&2
5.14 +if [ ! -e "$IMAGEDIR/dev/ubda" ]; then
5.15 + for i in `seq 0 7`; do
5.16 + let=$(echo $i|tr '0-7' 'a-z')
5.17 + mknod "$IMAGEDIR/dev/ubd$let" b 98 $((16 * $i))
5.18 + for p in `seq 1 16`; do
5.19 + mknod "$IMAGEDIR/dev/ubd$let$p" b 98 $((16 * $i + $p))
5.20 + done
5.21 + done
5.22 +fi
5.23 +
5.24 +echo "Initialising device files..." 1>&2
5.25 +chroot "$IMAGEDIR" /bin/sh -c 'mount -t proc proc /proc; cd /dev; ./MAKEDEV generic; umount /proc'
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
6.2 +++ b/uml-make-image Mon Jul 11 02:16:57 2011 +0200
6.3 @@ -0,0 +1,100 @@
6.4 +#!/bin/sh
6.5 +
6.6 +# Configuration:
6.7 +if [ -e userinstall-defaults-uml ]; then
6.8 + . "$PWD/userinstall-defaults-uml"
6.9 +elif [ -e /etc/default/userinstall-uml ]; then
6.10 + . /etc/default/userinstall-uml
6.11 +else
6.12 + echo "No defaults found for userinstall (UML)." 1>&2
6.13 + exit 1
6.14 +fi
6.15 +
6.16 +if [ ! "$1" ]; then
6.17 + echo "Need a root image size in GB." 1>&2
6.18 + exit 1
6.19 +fi
6.20 +
6.21 +if [ ! "$2" ]; then
6.22 + echo "Need a swap image size in MB." 1>&2
6.23 + exit 1
6.24 +fi
6.25 +
6.26 +IMAGESIZE=$1
6.27 +SWAPSIZE=$2
6.28 +THISDIR=`dirname "$0"`
6.29 +
6.30 +if [ ! -e "$PACKAGEROOT" ]; then
6.31 + echo "A package root must first be made using user-setup." 1>&2
6.32 + exit 1
6.33 +fi
6.34 +
6.35 +if [ ! "$IMAGEDIR" ]; then
6.36 + echo "An image directory must be defined." 1>&2
6.37 + exit 1
6.38 +fi
6.39 +
6.40 +echo "Making the filesystem with size ${IMAGESIZE}GB..."
6.41 +dd if=/dev/zero of=$IMAGE bs=1024 count=1 seek=$(($IMAGESIZE*1024*1024-1024))
6.42 +mkfs.ext3 $IMAGE
6.43 +
6.44 +echo "Making the swap file with size ${SWAPSIZE}MB..."
6.45 +dd if=/dev/zero of=$SWAPIMAGE bs=1M count=$SWAPSIZE
6.46 +
6.47 +echo "Accessing the image..." 1>&2
6.48 +if [ ! -e "$IMAGEDIR" ]; then
6.49 + mkdir "$IMAGEDIR"
6.50 +fi
6.51 +sudo mount -o loop "$IMAGE" "$IMAGEDIR"
6.52 +
6.53 +echo "Installing the package root..." 1>&2
6.54 +cp -a "$PACKAGEROOT/"* "$IMAGEDIR"/
6.55 +
6.56 +echo "Removing any linked /dev entry..." 1>&2
6.57 +if [ -h "$IMAGEDIR/dev" ]; then
6.58 + rm "$IMAGEDIR/dev"
6.59 +fi
6.60 +
6.61 +if [ ! -e "$IMAGEDIR/dev" ]; then
6.62 + mkdir "$IMAGEDIR/dev"
6.63 +fi
6.64 +
6.65 +cp "/dev/MAKEDEV" "$IMAGEDIR/dev"
6.66 +
6.67 +echo "Removing any linked /proc entry..." 1>&2
6.68 +if [ -h "$IMAGEDIR/proc" ]; then
6.69 + rm "$IMAGEDIR/proc"
6.70 +fi
6.71 +
6.72 +if [ ! -e "$IMAGEDIR/proc" ]; then
6.73 + mkdir "$IMAGEDIR/proc"
6.74 +fi
6.75 +
6.76 +echo "Using a special fstab..." 1>&2
6.77 +if [ -e "$IMAGEDIR/etc/fstab" ]; then
6.78 + if [ ! -e "$IMAGEDIR/etc/fstab.orig" ]; then
6.79 + mv "$IMAGEDIR/etc/fstab" "$IMAGEDIR/etc/fstab.orig"
6.80 + fi
6.81 +fi
6.82 +cp "$THISDIR/UML/fstab" "$IMAGEDIR/etc/fstab"
6.83 +
6.84 +# Tweak the inittab to only use tty0 and add it to securetty.
6.85 +echo "Reconfiguring the console settings..." 1>&2
6.86 +if [ ! -e "$IMAGEDIR/etc/inittab.orig" ]; then
6.87 + if [ -e "$IMAGEDIR/etc/inittab" ]; then
6.88 + cp "$IMAGEDIR/etc/inittab" "$IMAGEDIR/etc/inittab.orig"
6.89 + grep -v "getty" "$IMAGEDIR/etc/inittab.orig" > "$IMAGEDIR/etc/inittab"
6.90 + fi
6.91 + echo "# We launch just one console for UML:" >> "$IMAGEDIR/etc/inittab"
6.92 + echo "c0:1235:respawn:/sbin/getty 38400 tty0 linux" >> "$IMAGEDIR/etc/inittab"
6.93 +
6.94 + echo "# UML modification: use tty0 or vc/0" >> "$IMAGEDIR/etc/securetty"
6.95 + echo "tty0" >> "$IMAGEDIR/etc/securetty"
6.96 + echo "vc/0" >> "$IMAGEDIR/etc/securetty"
6.97 +fi
6.98 +
6.99 +sudo "$THISDIR/uml-make-devices" "$IMAGEDIR"
6.100 +
6.101 +echo "Unmounting the image..." 1>&2
6.102 +sudo umount "$IMAGEDIR"
6.103 +rmdir "$IMAGEDIR"
7.1 --- a/uml-net Thu May 26 23:55:42 2011 +0200
7.2 +++ b/uml-net Mon Jul 11 02:16:57 2011 +0200
7.3 @@ -1,17 +1,17 @@
7.4 -#!/bin/bash
7.5 +#!/bin/sh
7.6 # Usage: uml-net ( --start <username> | --stop )
7.7
7.8 # Configuration:
7.9 if [ -e userinstall-defaults-uml ]; then
7.10 - source userinstall-defaults-uml
7.11 + . "$PWD/userinstall-defaults-uml"
7.12 elif [ -e /etc/default/userinstall-uml ]; then
7.13 - source /etc/default/userinstall-uml
7.14 + . /etc/default/userinstall-uml
7.15 else
7.16 - echo "No defaults found for userinstall (UML)."
7.17 + echo "No defaults found for userinstall (UML)." 1>&2
7.18 exit 1
7.19 fi
7.20
7.21 -if [ "$1" == "--start" ]; then
7.22 +if [ "$1" = "--start" ]; then
7.23 chgrp adm /dev/net/tun
7.24 tunctl -u "$2" -t "$TUNDEVICE"
7.25 ifconfig "$TUNDEVICE" "$HOSTADDRESS" up
7.26 @@ -20,7 +20,7 @@
7.27 iptables -I FORWARD -i "$TUNDEVICE" -j ACCEPT
7.28 iptables -I FORWARD -o "$TUNDEVICE" -j ACCEPT
7.29
7.30 -elif [ "$1" == "--stop" ]; then
7.31 +elif [ "$1" = "--stop" ]; then
7.32 iptables -t nat -D POSTROUTING 1
7.33 iptables -D FORWARD 1
7.34 iptables -D FORWARD 1
8.1 --- a/uml-postsetupfs Thu May 26 23:55:42 2011 +0200
8.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
8.3 @@ -1,44 +0,0 @@
8.4 -#!/bin/bash
8.5 -# Usage: uml-postsetupfs
8.6 -
8.7 -# Configuration:
8.8 -if [ -e userinstall-defaults-uml ]; then
8.9 - source userinstall-defaults-uml
8.10 -elif [ -e /etc/default/userinstall-uml ]; then
8.11 - source /etc/default/userinstall-uml
8.12 -else
8.13 - echo "No defaults found for userinstall (UML)."
8.14 - exit 1
8.15 -fi
8.16 -
8.17 -# Ensure that images have been set up.
8.18 -if [ ! -e "$UMLROOT" ]; then
8.19 - echo "No UML instances set up at $UMLROOT."
8.20 - exit 1
8.21 -fi
8.22 -
8.23 -export IMAGE="$UMLROOT/rootfs"
8.24 -
8.25 -if [ ! -e "$IMAGE" ]; then
8.26 - echo "No image set up at $IMAGE."
8.27 - exit 1
8.28 -fi
8.29 -
8.30 -export IMAGEDIR="$UMLROOT/rootfsdir"
8.31 -
8.32 -if [ ! -e "$IMAGEDIR" ]; then
8.33 - mkdir "$IMAGEDIR"
8.34 -fi
8.35 -
8.36 -echo "Initialising device files..."
8.37 -chroot "$PACKAGEROOT" /bin/bash -c 'mount -t proc proc /proc; cd /dev; ./MAKEDEV generic; umount /proc'
8.38 -
8.39 -echo "Accessing the image..."
8.40 -mount -o loop "$IMAGE" "$IMAGEDIR" || exit 1
8.41 -
8.42 -echo "Copying the filesystem into the image..."
8.43 -cp -a "$PACKAGEROOT/"* "$IMAGEDIR"
8.44 -
8.45 -echo "Unmounting the image..."
8.46 -umount "$IMAGEDIR"
8.47 -rmdir "$IMAGEDIR"
9.1 --- a/uml-setupdev Thu May 26 23:55:42 2011 +0200
9.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
9.3 @@ -1,29 +0,0 @@
9.4 -#!/bin/bash
9.5 -# From UMLconfig...
9.6 -
9.7 -# Configuration:
9.8 -if [ -e userinstall-defaults ]; then
9.9 - source userinstall-defaults
9.10 -elif [ -e /etc/default/userinstall ]; then
9.11 - source /etc/default/userinstall
9.12 -else
9.13 - echo "No defaults found for userinstall."
9.14 - exit 1
9.15 -fi
9.16 -
9.17 -echo "Creating special UML devices..."
9.18 -if [ ! -e "$PACKAGEROOT/dev/ubda" ]; then
9.19 - if [ -e "$PACKAGEROOT/dev" ]; then
9.20 - for ((i=0; i<8; i++))
9.21 - do
9.22 - let=$(echo $i|tr '0-7' 'a-z')
9.23 - mknod "$PACKAGEROOT/dev/ubd$let" b 98 $[16 * $i]
9.24 - for ((p=1; p<=16; p++)) do
9.25 - mknod "$PACKAGEROOT/dev/ubd$let$p" b 98 $[16 * $i + $p]
9.26 - done
9.27 - done
9.28 - else
9.29 - echo "/dev not found!"
9.30 - exit 1
9.31 - fi
9.32 -fi
10.1 --- a/uml-setupfs Thu May 26 23:55:42 2011 +0200
10.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
10.3 @@ -1,37 +0,0 @@
10.4 -#!/bin/bash
10.5 -# Usage: uml-setupfs <root-filesystem-size-in-GB> <swap-size-in-MB>
10.6 -
10.7 -# Configuration:
10.8 -if [ -e userinstall-defaults-uml ]; then
10.9 - source userinstall-defaults-uml
10.10 -elif [ -e /etc/default/userinstall-uml ]; then
10.11 - source /etc/default/userinstall-uml
10.12 -else
10.13 - echo "No defaults found for userinstall (UML)."
10.14 - exit 1
10.15 -fi
10.16 -
10.17 -# Ensure arguments have been provided.
10.18 -if [[ ! "$1" || ! "$2" ]]; then
10.19 - echo "$0 <root-filesystem-size-in-GB> <swap-size-in-MB>"
10.20 - exit 1
10.21 -fi
10.22 -
10.23 -# Make the UML instance directory if not already present.
10.24 -
10.25 -echo "Making the UML instance directory at $UMLROOT..."
10.26 -if [ ! -e "$UMLROOT" ]; then
10.27 - mkdir "$UMLROOT"
10.28 -fi
10.29 -
10.30 -export IMAGE="$UMLROOT/rootfs"
10.31 -export IMAGESIZE="$1"
10.32 -export SWAPIMAGE="$UMLROOT/swap"
10.33 -export SWAPSIZE="$2"
10.34 -
10.35 -echo "Making the filesystem with size ${IMAGESIZE}GB..."
10.36 -dd if=/dev/zero of="$IMAGE" bs=1024 count=1 seek=$((${IMAGESIZE}*1024*1024-1024))
10.37 -mkfs.ext3 "$IMAGE"
10.38 -
10.39 -echo "Making the swap file with size ${SWAPSIZE}MB..."
10.40 -dd if=/dev/zero of="$SWAPIMAGE" bs=1M count="$SWAPSIZE"
11.1 --- a/user-do Thu May 26 23:55:42 2011 +0200
11.2 +++ b/user-do Mon Jul 11 02:16:57 2011 +0200
11.3 @@ -1,37 +1,44 @@
11.4 -#!/bin/bash
11.5 +#!/bin/sh
11.6 # Usage: user-do [ --root [ --dev ] ] [ <command and options> ]
11.7
11.8 # Configuration:
11.9 if [ -e userinstall-defaults ]; then
11.10 - source userinstall-defaults
11.11 + . "$PWD/userinstall-defaults"
11.12 elif [ -e /etc/default/userinstall ]; then
11.13 - source /etc/default/userinstall
11.14 + . /etc/default/userinstall
11.15 else
11.16 echo "No defaults found for userinstall."
11.17 exit 1
11.18 fi
11.19
11.20 -if [[ "$1" == '--root' ]]; then
11.21 +if [ "$1" = '--root' ]; then
11.22 shift 1
11.23 mount -o bind /proc "$PACKAGEROOT/proc"
11.24 mount -o bind /sys "$PACKAGEROOT/sys"
11.25 - if [[ "$1" == '--dev' ]]; then
11.26 + if [ "$1" = '--dev' ]; then
11.27 + DEV=$1
11.28 shift 1
11.29 if [ -e "$PACKAGEROOT/dev.orig" ]; then
11.30 echo "Devices may already be defined for the installation."
11.31 else
11.32 - mv "$PACKAGEROOT/dev" "$PACKAGEROOT/dev.orig"
11.33 - mkdir "$PACKAGEROOT/dev"
11.34 + if [ -e "$PACKAGEROOT/dev" ]; then
11.35 + mv "$PACKAGEROOT/dev" "$PACKAGEROOT/dev.orig"
11.36 + fi
11.37 + if [ ! -e "$PACKAGEROOT/dev" ]; then
11.38 + mkdir "$PACKAGEROOT/dev"
11.39 + fi
11.40 mount -o bind /dev "$PACKAGEROOT/dev"
11.41 fi
11.42 fi
11.43 chroot "$PACKAGEROOT" $*
11.44 umount "$PACKAGEROOT/proc"
11.45 umount "$PACKAGEROOT/sys"
11.46 - if [ -e "$PACKAGEROOT/dev.orig" ]; then
11.47 + if [ "$DEV" ]; then
11.48 umount "$PACKAGEROOT/dev"
11.49 rmdir "$PACKAGEROOT/dev"
11.50 - mv "$PACKAGEROOT/dev.orig" "$PACKAGEROOT/dev"
11.51 + if [ -e "$PACKAGEROOT/dev.orig" ]; then
11.52 + mv "$PACKAGEROOT/dev.orig" "$PACKAGEROOT/dev"
11.53 + fi
11.54 fi
11.55 else
11.56 fakeroot fakechroot $FAKECHROOT_OPTIONS chroot "$PACKAGEROOT" $*
12.1 --- a/user-path Thu May 26 23:55:42 2011 +0200
12.2 +++ b/user-path Mon Jul 11 02:16:57 2011 +0200
12.3 @@ -1,11 +1,11 @@
12.4 -#!/bin/bash
12.5 +#!/bin/sh
12.6 # Usage: user-path <path-inside-package-root>
12.7
12.8 # Configuration:
12.9 if [ -e userinstall-defaults ]; then
12.10 - source userinstall-defaults
12.11 + . "$PWD/userinstall-defaults"
12.12 elif [ -e /etc/default/userinstall ]; then
12.13 - source /etc/default/userinstall
12.14 + . /etc/default/userinstall
12.15 else
12.16 echo "No defaults found for userinstall."
12.17 exit 1
13.1 --- a/user-postsetup Thu May 26 23:55:42 2011 +0200
13.2 +++ b/user-postsetup Mon Jul 11 02:16:57 2011 +0200
13.3 @@ -1,24 +1,24 @@
13.4 -#!/bin/bash
13.5 +#!/bin/sh
13.6 # Usage: user-postsetup [ --root [ --dev ] ] [ <country> ]
13.7
13.8 # Configuration:
13.9 if [ -e userinstall-defaults ]; then
13.10 - source userinstall-defaults
13.11 + . "$PWD/userinstall-defaults"
13.12 elif [ -e /etc/default/userinstall ]; then
13.13 - source /etc/default/userinstall
13.14 + . /etc/default/userinstall
13.15 else
13.16 echo "No defaults found for userinstall."
13.17 exit 1
13.18 fi
13.19
13.20 -if [[ "$1" && "$1" == '--root' ]]; then
13.21 +if [[ "$1" && "$1" = '--root' ]]; then
13.22 export AS_ROOT=' --root'
13.23 shift 1
13.24 fi
13.25
13.26 export COUNTRY="$1"
13.27
13.28 -export THIS_DIR="`dirname $0`"
13.29 +THIS_DIR=`dirname "$0"`
13.30
13.31 echo "Copying host DNS configuration..."
13.32 cp /etc/resolv.conf "$PACKAGEROOT/etc/"
13.33 @@ -31,7 +31,7 @@
13.34 cp /etc/network/interfaces "$PACKAGEROOT/etc/network/"
13.35
13.36 echo "Copying package repository configuration..."
13.37 -if [ "$USERINSTALL_CODENAME" == "$DISTRIB_CODENAME" ]; then
13.38 +if [ "$USERINSTALL_CODENAME" = "$DISTRIB_CODENAME" ]; then
13.39 cp /etc/apt/sources.list "$PACKAGEROOT/etc/apt/"
13.40 elif [ -e "$USERINSTALL_CODENAME/sources.list" ]; then
13.41 cp "$USERINSTALL_CODENAME/sources.list" "$PACKAGEROOT/etc/apt/"
13.42 @@ -42,20 +42,20 @@
13.43
13.44 if [ "$AS_ROOT" ]; then
13.45 echo "Mounting filesystems..."
13.46 - "$THIS_DIR/user-do$AS_ROOT" mount -t proc proc /proc
13.47 + "$THIS_DIR/user-do"$AS_ROOT mount -t proc proc /proc
13.48 fi
13.49
13.50 echo "Updating package details and upgrading..."
13.51 -"$THIS_DIR/user-do$AS_ROOT" apt-get update
13.52 -"$THIS_DIR/user-do$AS_ROOT" apt-get upgrade
13.53 +"$THIS_DIR/user-do"$AS_ROOT apt-get update
13.54 +"$THIS_DIR/user-do"$AS_ROOT apt-get upgrade
13.55
13.56 if [ "$AS_ROOT" ]; then
13.57 echo "Configuring a root installation..."
13.58 - "$THIS_DIR/user-do$AS_ROOT" apt-get install locales console-data
13.59 - "$THIS_DIR/user-do$AS_ROOT" dpkg-reconfigure locales
13.60 - "$THIS_DIR/user-do$AS_ROOT" dpkg-reconfigure tzdata
13.61 - "$THIS_DIR/user-do$AS_ROOT" dpkg-reconfigure console-data
13.62 + "$THIS_DIR/user-do"$AS_ROOT apt-get install locales console-data
13.63 + "$THIS_DIR/user-do"$AS_ROOT dpkg-reconfigure locales
13.64 + "$THIS_DIR/user-do"$AS_ROOT dpkg-reconfigure tzdata
13.65 + "$THIS_DIR/user-do"$AS_ROOT dpkg-reconfigure console-data
13.66
13.67 echo "Unmounting filesystems..."
13.68 - "$THIS_DIR/user-do$AS_ROOT" umount /proc
13.69 + "$THIS_DIR/user-do"$AS_ROOT umount /proc
13.70 fi
14.1 --- a/user-setup Thu May 26 23:55:42 2011 +0200
14.2 +++ b/user-setup Mon Jul 11 02:16:57 2011 +0200
14.3 @@ -1,17 +1,17 @@
14.4 -#!/bin/bash
14.5 +#!/bin/sh
14.6 # Usage: user-setup [ --root ] [ <mirror> ]
14.7
14.8 # Configuration:
14.9 if [ -e userinstall-defaults ]; then
14.10 - source userinstall-defaults
14.11 + . "$PWD/userinstall-defaults"
14.12 elif [ -e /etc/default/userinstall ]; then
14.13 - source /etc/default/userinstall
14.14 + . /etc/default/userinstall
14.15 else
14.16 echo "No defaults found for userinstall."
14.17 exit 1
14.18 fi
14.19
14.20 -if [ "$1" == "--help" ]; then
14.21 +if [ "$1" = "--help" ]; then
14.22 echo "Usage: user-setup [ --root ] [ <mirror> ]"
14.23 echo
14.24 echo "Examples:"
14.25 @@ -23,7 +23,7 @@
14.26 exit 1
14.27 fi
14.28
14.29 -if [[ "$1" && "$1" == '--root' ]]; then
14.30 +if [[ "$1" && "$1" = '--root' ]]; then
14.31 export AS_ROOT=' --root'
14.32 export MIRROR="$2"
14.33 else
15.1 --- a/user-to-uml Thu May 26 23:55:42 2011 +0200
15.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
15.3 @@ -1,47 +0,0 @@
15.4 -#!/bin/bash
15.5 -# Usage: user-to-uml
15.6 -
15.7 -# Configuration:
15.8 -if [ -e userinstall-defaults ]; then
15.9 - source userinstall-defaults
15.10 -elif [ -e /etc/default/userinstall ]; then
15.11 - source /etc/default/userinstall
15.12 -else
15.13 - echo "No defaults found for userinstall."
15.14 - exit 1
15.15 -fi
15.16 -
15.17 -echo "Removing any linked /dev entry..."
15.18 -if [ -h "$PACKAGEROOT/dev" ]; then
15.19 - rm "$PACKAGEROOT/dev"
15.20 - mkdir "$PACKAGEROOT/dev"
15.21 -fi
15.22 -
15.23 -cp /dev/MAKEDEV $PACKAGEROOT/dev
15.24 -
15.25 -echo "Removing any linked /proc entry..."
15.26 -if [ -h "$PACKAGEROOT/proc" ]; then
15.27 - rm "$PACKAGEROOT/proc"
15.28 - mkdir "$PACKAGEROOT/proc"
15.29 -fi
15.30 -
15.31 -echo "Using a special fstab..."
15.32 -if [ -e "$PACKAGEROOT/etc/fstab" ]; then
15.33 - if [ ! -e "$PACKAGEROOT/etc/fstab.orig" ]; then
15.34 - mv "$PACKAGEROOT/etc/fstab" "$PACKAGEROOT/etc/fstab.orig"
15.35 - fi
15.36 -fi
15.37 -cp "`dirname $0`/UML/fstab" "$PACKAGEROOT/etc/fstab"
15.38 -
15.39 -# Tweak the inittab to only use tty0 and add it to securetty.
15.40 -echo "Reconfiguring the console settings..."
15.41 -if [ ! -e "$PACKAGEROOT/etc/inittab.orig" ]; then
15.42 - cp "$PACKAGEROOT/etc/inittab" "$PACKAGEROOT/etc/inittab.orig"
15.43 - grep -v "getty" "$PACKAGEROOT/etc/inittab.orig" > "$PACKAGEROOT/etc/inittab"
15.44 - echo "# We launch just one console for UML:" >> "$PACKAGEROOT/etc/inittab"
15.45 - echo "c0:1235:respawn:/sbin/getty 38400 tty0 linux" >> "$PACKAGEROOT/etc/inittab"
15.46 -
15.47 - echo "# UML modification: use tty0 or vc/0" >> "$PACKAGEROOT/etc/securetty"
15.48 - echo "tty0" >> "$PACKAGEROOT/etc/securetty"
15.49 - echo "vc/0" >> "$PACKAGEROOT/etc/securetty"
15.50 -fi
16.1 --- a/userinstall-defaults Thu May 26 23:55:42 2011 +0200
16.2 +++ b/userinstall-defaults Mon Jul 11 02:16:57 2011 +0200
16.3 @@ -1,6 +1,6 @@
16.4 -#!/bin/bash
16.5 +#!/bin/sh
16.6
16.7 -source /etc/lsb-release
16.8 +. /etc/lsb-release
16.9
16.10 # If not using the same distribution inside the userinstall, replace these
16.11 # definitions:
16.12 @@ -16,5 +16,5 @@
16.13
16.14 # Configuration details for building and using a personal package manager.
16.15
16.16 -export PACKAGEROOT="$HOME/.userinstall"
16.17 -export KEYRING=$(echo $USERINSTALL_ID | tr '[:upper:]' '[:lower:]')-keyring
16.18 +PACKAGEROOT="$HOME/.userinstall"
16.19 +KEYRING=$(echo $USERINSTALL_ID | tr '[:upper:]' '[:lower:]')-keyring
17.1 --- a/userinstall-defaults-uml Thu May 26 23:55:42 2011 +0200
17.2 +++ b/userinstall-defaults-uml Mon Jul 11 02:16:57 2011 +0200
17.3 @@ -1,18 +1,33 @@
17.4 -#!/bin/bash
17.5 +#!/bin/sh
17.6
17.7 # Main configuration:
17.8 if [ -e userinstall-defaults ]; then
17.9 - source userinstall-defaults
17.10 + . "$PWD/userinstall-defaults"
17.11 elif [ -e /etc/default/userinstall ]; then
17.12 - source /etc/default/userinstall
17.13 + . /etc/default/userinstall
17.14 else
17.15 echo "No defaults found for userinstall."
17.16 exit 1
17.17 fi
17.18
17.19 -# Configuration details for building a UML instance.
17.20 +# Make sure the package root can be appended to.
17.21 +
17.22 +PACKAGEROOT=$(dirname "$PACKAGEROOT")/$(basename "$PACKAGEROOT")
17.23 +
17.24 +# Define the image locations.
17.25
17.26 -export UMLROOT="$HOME/.userinstall-uml"
17.27 +IMAGEDIR="$PACKAGEROOT-root"
17.28 +IMAGE="$IMAGEDIR.fs"
17.29 +SWAPIMAGE="$PACKAGEROOT-swap.fs"
17.30 +
17.31 +# The Linux version, location of the Linux kernel archive, and the download
17.32 +# address.
17.33 +
17.34 +LINUXVERSION=2.6.39.2
17.35 +LINUXDIRNAME=linux-$LINUXVERSION
17.36 +LINUXFILENAME=$LINUXDIRNAME.tar.bz2
17.37 +LINUXARCHIVE=$LINUXFILENAME
17.38 +LINUXADDRESS=http://www.kernel.org/pub/linux/kernel/v2.6/$LINUXFILENAME
17.39
17.40 # Optional settings.
17.41 # Guest: the address used inside the UML instance
17.42 @@ -20,7 +35,7 @@
17.43 # Devices: the tunnelling device (or interface) used by the actual machine, plus
17.44 # the device (or interface) used inside the UML instance
17.45
17.46 -export GUESTADDRESS=192.168.0.99
17.47 -export HOSTADDRESS=192.168.0.254
17.48 -export TUNDEVICE=tap0
17.49 -export NETDEVICE=eth0
17.50 +GUESTADDRESS=192.168.0.99
17.51 +HOSTADDRESS=192.168.0.254
17.52 +TUNDEVICE=tap0
17.53 +NETDEVICE=eth0