aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/uml
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-09-06 16:27:37 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-09-06 16:27:37 +0000
commit92558d67a463bfbb351d30e28648de03b635f024 (patch)
treea5d41b991a151e72663527a96fbc6c494565d65c /target/linux/uml
parente1dbce411cd2a3a067f387cee011cd889486a07d (diff)
downloadupstream-92558d67a463bfbb351d30e28648de03b635f024.tar.gz
upstream-92558d67a463bfbb351d30e28648de03b635f024.tar.bz2
upstream-92558d67a463bfbb351d30e28648de03b635f024.zip
strip the kernel version suffix from target directories, except for brcm-2.4 (the -2.4 will be included in the board name here). CONFIG_LINUX_<ver>_<board> becomes CONFIG_TARGET_<board>, same for profiles.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@8653 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/uml')
-rw-r--r--target/linux/uml/Makefile35
-rw-r--r--target/linux/uml/README45
-rw-r--r--target/linux/uml/config/i386162
-rw-r--r--target/linux/uml/config/x86_64121
-rwxr-xr-xtarget/linux/uml/image/Makefile19
5 files changed, 382 insertions, 0 deletions
diff --git a/target/linux/uml/Makefile b/target/linux/uml/Makefile
new file mode 100644
index 0000000000..a6be082d0b
--- /dev/null
+++ b/target/linux/uml/Makefile
@@ -0,0 +1,35 @@
+#
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/host.mk
+
+# UML only makes sense on linux
+ifeq ($(HOST_OS),Linux)
+
+ARCH:=$(shell uname -m | sed \
+ -e 's/i[3-9]86/i386/' \
+ -e 's/mipsel/mips/' \
+ -e 's/mipseb/mips/' \
+ -e 's/powerpc/ppc/' \
+ -e 's/sh[234]/sh/' \
+ -e 's/armeb/arm/' \
+)
+BOARD:=uml
+BOARDNAME:=User Mode Linux
+FEATURES:=broken ext2
+LINUX_CONFIG:=$(CURDIR)/config/$(ARCH)
+
+LINUX_VERSION:=2.6.22.4
+
+include $(INCLUDE_DIR)/kernel-build.mk
+
+# include the profiles
+-include profiles/*.mk
+
+endif
+
+$(eval $(call BuildKernel))
diff --git a/target/linux/uml/README b/target/linux/uml/README
new file mode 100644
index 0000000000..85cc72c2bb
--- /dev/null
+++ b/target/linux/uml/README
@@ -0,0 +1,45 @@
+Openwrt inside a user mode linux. Why would we even want this many ask?
+
+There are potentially a lot of reasons, one obvious one to me, it allows
+folks to 'kick the tires' without actually flashing up any hardware. It's
+also a great environment for porting over packages, you can get a package
+fully functional in the uclibc root environment inside a uml without actually
+disturbing your 'real router', and then rebuild for a specific target once
+it's fully tested.
+
+This is a first stab at a build that 'just works' and there will be more
+cleanup to come. The simple directions are:-
+
+Configure for uml target
+Configure with an ext2 root file system
+build it all
+
+In your bin directory you will find a kernel and an ext2 root file system
+when it's finished. Just run it like this:-
+
+bin/openwrt-uml-2.6-vmlinux ubd0=bin/openwrt-uml-2.6-ext2.img con=null ssl=null ssl0=fd:0,fd:1 con0=null,fd:1 init=/etc/preinit
+
+The uml will start, and eventually the serial console of the uml will be at your
+console prompt. If you would like it in xterms, substitute con=xterm and con0=xterm.
+No networking is configured, but, it's a starting point. The resulting file system
+has just enough free space to start kicking the tires and playing in the world of
+'embedded routers' along with all the resource restrictions that come with that
+world.
+
+To configure networking and more, refer to the user mode linux documentation online.
+A quick start goes along this line. install the uml-utilities packages so you have
+the uml switch in and running, then add a command param to your uml start like this
+
+eth0=daemon,00:01:01:01:01:01,unix,/<your uml switch control socket here>
+
+With that in, and uml networking actually functional (can be a challenge at times),
+you should be able to ifconfig the interface and talk to the host side, or, if you
+bridged the uml switch to your host network, you should be able to run udhcp and be
+away with networking off to the world. Again, if you are unfamiliar with uml and
+uml networking, please read the docs and how-to stuff available on the net. It does
+take some fiddling to get it started and working right the first time, but after that,
+it opens up a whole new world of virtual machines.
+
+
+
+http://user-mode-linux.sourceforge.net/
diff --git a/target/linux/uml/config/i386 b/target/linux/uml/config/i386
new file mode 100644
index 0000000000..f2286da4e1
--- /dev/null
+++ b/target/linux/uml/config/i386
@@ -0,0 +1,162 @@
+# CONFIG_3_LEVEL_PGTABLES is not set
+# CONFIG_64BIT is not set
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_ARCH_HAS_SC_SIGNALS=y
+CONFIG_ARCH_REUSE_HOST_VSYSCALL_AREA=y
+# CONFIG_ATM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_BITREVERSE=y
+CONFIG_BLK_DEV_COW_COMMON=y
+CONFIG_BLK_DEV_UBD=y
+CONFIG_BLK_DEV_UBD_SYNC=y
+# CONFIG_BT is not set
+CONFIG_CON_CHAN="xterm"
+CONFIG_CON_ZERO_CHAN="fd:0,fd:1"
+CONFIG_CRAMFS=y
+# CONFIG_CRYPTO_AES_586 is not set
+# CONFIG_CRYPTO_TWOFISH_586 is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+CONFIG_DEFCONFIG_LIST="arch/$ARCH/defconfig"
+CONFIG_DNOTIFY=y
+CONFIG_ELF_CORE=y
+# CONFIG_EMBEDDED is not set
+CONFIG_EXT2_FS=y
+CONFIG_EXT3_FS=y
+CONFIG_FS_POSIX_ACL=y
+# CONFIG_FW_LOADER is not set
+CONFIG_GENERIC_BUG=y
+# CONFIG_HAMRADIO is not set
+# CONFIG_HIGHMEM is not set
+CONFIG_HOSTAUDIO=m
+CONFIG_HOSTFS=y
+# CONFIG_HOST_VMSPLIT_1G is not set
+# CONFIG_HOST_VMSPLIT_2G is not set
+CONFIG_HOST_VMSPLIT_3G=y
+# CONFIG_HOST_VMSPLIT_3G_OPT is not set
+# CONFIG_HPPFS is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_IFB is not set
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_INIT_ENV_ARG_LIMIT=128
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_CFQ=y
+CONFIG_IRQ_RELEASE_METHOD=y
+CONFIG_ISO9660_FS=y
+CONFIG_JBD=y
+CONFIG_KALLSYMS=y
+CONFIG_KALLSYMS_EXTRA_PASS=y
+CONFIG_KERNEL_STACK_ORDER=2
+CONFIG_LBD=y
+CONFIG_LD_SCRIPT_STATIC=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+# CONFIG_M386 is not set
+# CONFIG_M486 is not set
+# CONFIG_M586 is not set
+# CONFIG_M586MMX is not set
+# CONFIG_M586TSC is not set
+# CONFIG_M686 is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MAGIC_SYSRQ=y
+CONFIG_MCONSOLE=y
+# CONFIG_MCORE2 is not set
+# CONFIG_MCRUSOE is not set
+# CONFIG_MCYRIXIII is not set
+# CONFIG_MEFFICEON is not set
+# CONFIG_MGEODEGX1 is not set
+# CONFIG_MGEODE_LX is not set
+# CONFIG_MINI_FO is not set
+# CONFIG_MK6 is not set
+# CONFIG_MK7 is not set
+# CONFIG_MK8 is not set
+# CONFIG_MMAPPER is not set
+CONFIG_MODE_SKAS=y
+# CONFIG_MPENTIUM4 is not set
+CONFIG_MPENTIUMII=y
+# CONFIG_MPENTIUMIII is not set
+# CONFIG_MPENTIUMM is not set
+# CONFIG_MVIAC3_2 is not set
+# CONFIG_MVIAC7 is not set
+# CONFIG_MWINCHIP2 is not set
+# CONFIG_MWINCHIP3D is not set
+# CONFIG_MWINCHIPC6 is not set
+CONFIG_NEST_LEVEL=0
+# CONFIG_NET_RADIO is not set
+CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y
+# CONFIG_NET_SCH_CLK_JIFFIES is not set
+CONFIG_NET_SCH_FIFO=y
+CONFIG_NFSD_V2_ACL=y
+CONFIG_NFSD_V3_ACL=y
+# CONFIG_NFSD_V4 is not set
+CONFIG_NFS_ACL_SUPPORT=m
+CONFIG_NFS_V3_ACL=y
+# CONFIG_NFS_V4 is not set
+CONFIG_NLS=y
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NOCONFIG_CHAN is not set
+CONFIG_NO_IOMEM=y
+CONFIG_NULL_CHAN=y
+CONFIG_PORT_CHAN=y
+CONFIG_POSIX_MQUEUE=y
+CONFIG_PTY_CHAN=y
+CONFIG_QFMT_V1=y
+CONFIG_QFMT_V2=y
+CONFIG_QUOTA=y
+CONFIG_QUOTACTL=y
+CONFIG_RELAY=y
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_SEMAPHORE_SLEEPERS=y
+CONFIG_SOFT_WATCHDOG=m
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SQUASHFS_EMBEDDED=y
+CONFIG_SSL=y
+CONFIG_SSL_CHAN="pty"
+# CONFIG_STACKTRACE_SUPPORT is not set
+CONFIG_STATIC_LINK=y
+CONFIG_STDERR_CONSOLE=y
+CONFIG_STDIO_CONSOLE=y
+CONFIG_STUB_CODE=0xbfffe000
+CONFIG_STUB_DATA=0xbffff000
+CONFIG_STUB_START=0xbfffe000
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_TOP_ADDR=0xC0000000
+# CONFIG_TRACE_IRQFLAGS_SUPPORT is not set
+CONFIG_TTY_CHAN=y
+CONFIG_UID16=y
+CONFIG_UML=y
+CONFIG_UML_NET=y
+CONFIG_UML_NET_DAEMON=y
+CONFIG_UML_NET_ETHERTAP=y
+CONFIG_UML_NET_MCAST=y
+# CONFIG_UML_NET_PCAP is not set
+CONFIG_UML_NET_SLIP=y
+CONFIG_UML_NET_SLIRP=y
+CONFIG_UML_NET_TUNTAP=y
+CONFIG_UML_RANDOM=y
+CONFIG_UML_REAL_TIME_CLOCK=y
+CONFIG_UML_SOUND=m
+CONFIG_UML_WATCHDOG=m
+CONFIG_UML_X86=y
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_X86_BSWAP=y
+CONFIG_X86_CMPXCHG=y
+CONFIG_X86_CMPXCHG64=y
+CONFIG_X86_GENERIC=y
+CONFIG_X86_GOOD_APIC=y
+CONFIG_X86_INTEL_USERCOPY=y
+CONFIG_X86_INVLPG=y
+CONFIG_X86_L1_CACHE_SHIFT=7
+CONFIG_X86_POPAD_OK=y
+CONFIG_X86_TSC=y
+CONFIG_X86_USE_PPRO_CHECKSUM=y
+CONFIG_X86_WP_WORKS_OK=y
+CONFIG_XTERM_CHAN=y
+CONFIG_ZLIB_DEFLATE=m
+CONFIG_ZONE_DMA_FLAG=0
diff --git a/target/linux/uml/config/x86_64 b/target/linux/uml/config/x86_64
new file mode 100644
index 0000000000..8a7f031a1d
--- /dev/null
+++ b/target/linux/uml/config/x86_64
@@ -0,0 +1,121 @@
+CONFIG_3_LEVEL_PGTABLES=y
+CONFIG_64BIT=y
+# CONFIG_ARCH_HAS_SC_SIGNALS is not set
+# CONFIG_ARCH_REUSE_HOST_VSYSCALL_AREA is not set
+# CONFIG_ATM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_BINFMT_MISC=m
+CONFIG_BITREVERSE=y
+CONFIG_BLK_DEV_COW_COMMON=y
+CONFIG_BLK_DEV_UBD=y
+CONFIG_BLK_DEV_UBD_SYNC=y
+# CONFIG_BT is not set
+CONFIG_CON_CHAN="xterm"
+CONFIG_CON_ZERO_CHAN="fd:0,fd:1"
+CONFIG_CRAMFS=y
+# CONFIG_CRYPTO_AES_X86_64 is not set
+# CONFIG_CRYPTO_TWOFISH_X86_64 is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+CONFIG_DEFCONFIG_LIST="arch/$ARCH/defconfig"
+CONFIG_DNOTIFY=y
+CONFIG_ELF_CORE=y
+# CONFIG_EMBEDDED is not set
+CONFIG_EXT2_FS=y
+CONFIG_EXT3_FS=y
+CONFIG_FS_POSIX_ACL=y
+# CONFIG_FW_LOADER is not set
+CONFIG_GENERIC_BUG=y
+# CONFIG_HAMRADIO is not set
+CONFIG_HAS_DMA=y
+CONFIG_HOSTAUDIO=m
+CONFIG_HOSTFS=y
+# CONFIG_HPPFS is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_IFB is not set
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_INIT_ENV_ARG_LIMIT=128
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_IP_NF_MATCH_LAYER7 is not set
+CONFIG_IRQ_RELEASE_METHOD=y
+CONFIG_ISO9660_FS=y
+CONFIG_JBD=y
+CONFIG_KALLSYMS=y
+CONFIG_KALLSYMS_EXTRA_PASS=y
+CONFIG_KERNEL_STACK_ORDER=2
+CONFIG_LD_SCRIPT_STATIC=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MAGIC_SYSRQ=y
+CONFIG_MCONSOLE=y
+# CONFIG_MINI_FO is not set
+# CONFIG_MMAPPER is not set
+CONFIG_MODE_SKAS=y
+CONFIG_NEST_LEVEL=0
+CONFIG_NET_SCH_FIFO=y
+CONFIG_NFSD_V2_ACL=y
+CONFIG_NFSD_V3_ACL=y
+# CONFIG_NFSD_V4 is not set
+CONFIG_NFS_ACL_SUPPORT=m
+CONFIG_NFS_V3_ACL=y
+# CONFIG_NFS_V4 is not set
+CONFIG_NLS=y
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NOCONFIG_CHAN is not set
+CONFIG_NO_IOMEM=y
+CONFIG_NULL_CHAN=y
+CONFIG_PORT_CHAN=y
+CONFIG_POSIX_MQUEUE=y
+CONFIG_PTY_CHAN=y
+CONFIG_QFMT_V1=y
+CONFIG_QFMT_V2=y
+CONFIG_QUOTA=y
+CONFIG_QUOTACTL=y
+CONFIG_RELAY=y
+CONFIG_RESOURCES_64BIT=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+CONFIG_SCSI_WAIT_SCAN=m
+CONFIG_SEMAPHORE_SLEEPERS=y
+CONFIG_SMP_BROKEN=y
+CONFIG_SOFT_WATCHDOG=m
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SQUASHFS_EMBEDDED=y
+CONFIG_SSL=y
+CONFIG_SSL_CHAN="pty"
+# CONFIG_STACKTRACE_SUPPORT is not set
+CONFIG_STATIC_LINK=y
+CONFIG_STDERR_CONSOLE=y
+CONFIG_STDIO_CONSOLE=y
+CONFIG_STUB_CODE=0x7fbfffe000
+CONFIG_STUB_DATA=0x7fbffff000
+CONFIG_STUB_START=0x7fbfffe000
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_TOP_ADDR=0x80000000
+# CONFIG_TRACE_IRQFLAGS_SUPPORT is not set
+CONFIG_TTY_CHAN=y
+CONFIG_UID16=y
+CONFIG_UML=y
+CONFIG_UML_NET=y
+CONFIG_UML_NET_DAEMON=y
+CONFIG_UML_NET_ETHERTAP=y
+CONFIG_UML_NET_MCAST=y
+# CONFIG_UML_NET_PCAP is not set
+CONFIG_UML_NET_SLIP=y
+CONFIG_UML_NET_SLIRP=y
+CONFIG_UML_NET_TUNTAP=y
+CONFIG_UML_RANDOM=y
+CONFIG_UML_REAL_TIME_CLOCK=y
+CONFIG_UML_SOUND=m
+CONFIG_UML_WATCHDOG=m
+CONFIG_UML_X86=y
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_XTERM_CHAN=y
+CONFIG_ZLIB_DEFLATE=m
+CONFIG_ZONE_DMA_FLAG=0
diff --git a/target/linux/uml/image/Makefile b/target/linux/uml/image/Makefile
new file mode 100755
index 0000000000..b7bd9e9e65
--- /dev/null
+++ b/target/linux/uml/image/Makefile
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/image.mk
+
+define Image/Prepare
+ cp $(LINUX_DIR)/linux $(KDIR)/vmlinux.elf
+endef
+
+define Image/Build
+ cp $(KDIR)/root.$(1) $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).img
+ cp $(KDIR)/vmlinux.elf $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinux
+endef
+
+$(eval $(call BuildImage))