summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgroz <groz@3c298f89-4303-0410-b956-a3cf2f4a3e73>2006-07-20 21:06:47 +0000
committergroz <groz@3c298f89-4303-0410-b956-a3cf2f4a3e73>2006-07-20 21:06:47 +0000
commitd4641bd34dcc4fd0eab0b68c5b1d3a2b9ea3a9d2 (patch)
treef5796f661d2a6ed126170f59624c311d0a6c5b07
parent0afe2603ce9afb1e2b32d319a676a76d1a412e2e (diff)
UML target completed. Added ext2 target fs for use with uml images
git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@4178 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--Config.in8
-rw-r--r--include/image.mk9
-rw-r--r--include/kernel-build.mk4
-rw-r--r--include/kernel.mk5
-rw-r--r--include/target.mk1
-rw-r--r--target/Config.in8
-rwxr-xr-xtarget/image/uml/Makefile15
-rw-r--r--target/linux/uml-2.6/config26
8 files changed, 61 insertions, 15 deletions
diff --git a/Config.in b/Config.in
index a2e6bddd2..e059f06ab 100644
--- a/Config.in
+++ b/Config.in
@@ -74,6 +74,14 @@ menu "Target Images"
depends !TARGET_ROOTFS_INITRAMFS
help
Build a compressed tar archive of the the root filesystem
+
+ config TARGET_ROOTFS_EXT2FS
+ bool "ext2"
+ default n
+ depends !TARGET_ROOTFS_INITRAMFS
+ help
+ Ext2 file system with some free space for uml images
+
endmenu
diff --git a/include/image.mk b/include/image.mk
index 95accd6e1..54f0e8b6b 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -44,6 +44,14 @@ ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
tar -zcf $(BIN_DIR)/openwrt-rootfs.tgz --owner=root --group=root -C $(BUILD_DIR)/root/ .
endef
endif
+
+ ifeq ($(CONFIG_TARGET_ROOTFS_EXT2FS),y)
+ define Image/mkfs/ext2
+ genext2fs -q -b 4096 -I 1500 -d $(BUILD_DIR)/root/ $(KDIR)/root.ext2
+ $(call Image/Build,ext2)
+ endef
+ endif
+
endif
define Image/mkfs/prepare/default
@@ -69,6 +77,7 @@ install:
$(call Image/mkfs/jffs2)
$(call Image/mkfs/squashfs)
$(call Image/mkfs/tgz)
+ $(call Image/mkfs/ext2)
clean:
$(call Build/Clean)
diff --git a/include/kernel-build.mk b/include/kernel-build.mk
index 942a91516..f46e7f0ff 100644
--- a/include/kernel-build.mk
+++ b/include/kernel-build.mk
@@ -72,13 +72,13 @@ $(LINUX_DIR)/vmlinux: $(STAMP_DIR)/.linux-compile pkg-install ramdisk-config
$(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH)
$(LINUX_KERNEL): $(LINUX_DIR)/vmlinux
- $(TARGET_CROSS)objcopy -O binary -R .reginfo -R .note -R .comment -R .mdebug -S $< $@
+ $(KERNEL_CROSS)objcopy -O binary -R .reginfo -R .note -R .comment -R .mdebug -S $< $@
touch -c $(LINUX_KERNEL)
$(LINUX_DIR)/.modules_done:
rm -rf $(KERNEL_BUILD_DIR)/modules
$(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) PATH="$(TARGET_PATH)" modules
- $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" DEPMOD=true INSTALL_MOD_PATH=$(KERNEL_BUILD_DIR)/modules modules_install
+ $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) DEPMOD=true INSTALL_MOD_PATH=$(KERNEL_BUILD_DIR)/modules modules_install
touch $(LINUX_DIR)/.modules_done
modules: $(LINUX_DIR)/.modules_done
diff --git a/include/kernel.mk b/include/kernel.mk
index 2c5d09377..318ca6869 100644
--- a/include/kernel.mk
+++ b/include/kernel.mk
@@ -28,6 +28,11 @@ LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \
-e 's/armeb/arm/' \
)
+ifneq (,$(findstring uml,$(BOARD)))
+LINUX_KARCH="um"
+KERNEL_CROSS=
+endif
+
KERNEL_BUILD_DIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)
LINUX_DIR := $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)
diff --git a/include/target.mk b/include/target.mk
index 44ff11128..95bd1dbfb 100644
--- a/include/target.mk
+++ b/include/target.mk
@@ -18,6 +18,7 @@ $(eval $(call kernel_template,2.6,brcm,2_6_BRCM))
$(eval $(call kernel_template,2.6,brcm63xx,2_6_BRCM63XX))
$(eval $(call kernel_template,2.6,rb532,2_6_RB532))
$(eval $(call kernel_template,2.6,x86,2_6_X86))
+$(eval $(call kernel_template,2.6,uml,2_6_UML))
$(eval $(call kernel_template,2.4,ar531x,2_4_AR531X))
$(eval $(call kernel_template,2.6,aruba,2_6_ARUBA))
$(eval $(call kernel_template,2.6,au1000,2_6_AU1000))
diff --git a/target/Config.in b/target/Config.in
index 5dd905c75..5b85eadb3 100644
--- a/target/Config.in
+++ b/target/Config.in
@@ -83,6 +83,14 @@ config LINUX_2_6_X86
Build firmware images for x86 based boards
(e.g. Soekris net4521 and net4801, PC Engines WRAP...)
+config LINUX_2_6_UML
+ bool "x86 [uml]"
+ select i386
+ select LINUX_2_6
+ help
+ Build uml targetted images
+
+
config LINUX_2_6_AU1000
bool "AMD Alchemy AUxx [2.6]"
select mipsel
diff --git a/target/image/uml/Makefile b/target/image/uml/Makefile
new file mode 100755
index 000000000..6af4b8b81
--- /dev/null
+++ b/target/image/uml/Makefile
@@ -0,0 +1,15 @@
+#
+# 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/Build
+ cp $(KDIR)/root.$(1) $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).img
+ cp $(LINUX_DIR)/linux $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinux
+endef
+
+$(eval $(call BuildImage))
diff --git a/target/linux/uml-2.6/config b/target/linux/uml-2.6/config
index 82433d9b1..b44ca40dc 100644
--- a/target/linux/uml-2.6/config
+++ b/target/linux/uml-2.6/config
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.17
-# Tue Jul 18 01:55:58 2006
+# Thu Jul 20 13:48:28 2006
#
CONFIG_GENERIC_HARDIRQS=y
CONFIG_UML=y
@@ -77,8 +77,8 @@ CONFIG_LD_SCRIPT_DYN=y
CONFIG_NET=y
CONFIG_BINFMT_ELF=y
# CONFIG_BINFMT_MISC is not set
-CONFIG_HOSTFS=y
-CONFIG_HPPFS=y
+# CONFIG_HOSTFS is not set
+# CONFIG_HPPFS is not set
CONFIG_MCONSOLE=y
# CONFIG_MAGIC_SYSRQ is not set
CONFIG_NEST_LEVEL=0
@@ -106,9 +106,7 @@ CONFIG_SYSCTL=y
# CONFIG_AUDIT is not set
# CONFIG_IKCONFIG is not set
# CONFIG_RELAY is not set
-CONFIG_INITRAMFS_SOURCE="../../root"
-CONFIG_INITRAMFS_ROOT_UID=0
-CONFIG_INITRAMFS_ROOT_GID=0
+CONFIG_INITRAMFS_SOURCE=""
CONFIG_UID16=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_EMBEDDED=y
@@ -166,7 +164,9 @@ CONFIG_BLK_DEV_COW_COMMON=y
CONFIG_BLK_DEV_LOOP=m
CONFIG_BLK_DEV_CRYPTOLOOP=m
CONFIG_BLK_DEV_NBD=m
-# CONFIG_BLK_DEV_RAM is not set
+CONFIG_BLK_DEV_RAM=m
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=4096
CONFIG_BLK_DEV_INITRD=y
# CONFIG_ATA_OVER_ETH is not set
@@ -184,13 +184,13 @@ CONFIG_XTERM_CHAN=y
# CONFIG_NOCONFIG_CHAN is not set
CONFIG_CON_ZERO_CHAN="fd:0,fd:1"
CONFIG_CON_CHAN="xterm"
-CONFIG_SSL_CHAN="pty"
+CONFIG_SSL_CHAN="xterm"
CONFIG_UNIX98_PTYS=y
# CONFIG_LEGACY_PTYS is not set
CONFIG_WATCHDOG=y
CONFIG_WATCHDOG_NOWAYOUT=y
CONFIG_SOFT_WATCHDOG=m
-CONFIG_UML_WATCHDOG=m
+# CONFIG_UML_WATCHDOG is not set
# CONFIG_UML_SOUND is not set
# CONFIG_SOUND is not set
# CONFIG_HOSTAUDIO is not set
@@ -529,7 +529,7 @@ CONFIG_UML_NET_SLIP=y
CONFIG_UML_NET_DAEMON=y
CONFIG_UML_NET_MCAST=y
# CONFIG_UML_NET_PCAP is not set
-CONFIG_UML_NET_SLIRP=y
+# CONFIG_UML_NET_SLIRP is not set
#
# Network device support
@@ -589,12 +589,12 @@ CONFIG_CONNECTOR=m
#
# File systems
#
-CONFIG_EXT2_FS=m
+CONFIG_EXT2_FS=y
# CONFIG_EXT2_FS_XATTR is not set
# CONFIG_EXT2_FS_XIP is not set
-CONFIG_EXT3_FS=m
+CONFIG_EXT3_FS=y
# CONFIG_EXT3_FS_XATTR is not set
-CONFIG_JBD=m
+CONFIG_JBD=y
# CONFIG_JBD_DEBUG is not set
CONFIG_REISERFS_FS=m
# CONFIG_REISERFS_CHECK is not set