From 8b29425cae98c270f524d4ea9ba245e10430cb52 Mon Sep 17 00:00:00 2001
From: wbx <wbx@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Date: Sat, 19 Feb 2005 07:46:01 +0000
Subject: [PATCH] sync with buildroot2 from uclibc, add devices, may be used to
 build other kernel modules for different devices, can be used for other stuff

git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@267 3c298f89-4303-0410-b956-a3cf2f4a3e73
---
 target/Config.in                         |   3 ++-
 target/Makefile.in                       |  18 +++++++++++++++++-
 target/default/openwrt.mk                |  10 ----------
 target/default/skel.tar.gz               | Bin 0 -> 193 bytes
 target/device/Config.in                  |  17 +++++++++++++++++
 target/device/Makefile.in                |   2 ++
 target/jffs2/jffs2root.mk                |   5 +++++
 target/squashfs-lzma/squashfslzmaroot.mk |   5 +++++
 target/squashfs/squashfsroot.mk          |   5 +++++
 9 files changed, 53 insertions(+), 12 deletions(-)
 delete mode 100644 target/default/openwrt.mk
 create mode 100644 target/default/skel.tar.gz
 create mode 100644 target/device/Config.in
 create mode 100644 target/device/Makefile.in

diff --git a/target/Config.in b/target/Config.in
index 1fad54813..d93df6b1c 100644
--- a/target/Config.in
+++ b/target/Config.in
@@ -4,4 +4,5 @@ choice
 	source "target/squashfs/Config.in"
 	source "target/squashfs-lzma/Config.in"
 endchoice
-	comment "After changing root filesystem, do make clean"
+
+source "target/device/Config.in"
diff --git a/target/Makefile.in b/target/Makefile.in
index c01ade299..802b576fb 100644
--- a/target/Makefile.in
+++ b/target/Makefile.in
@@ -1 +1,17 @@
-# Nothing
+# Default target skeleton stuff, may be overridden
+TARGET_SKELETON=target/default/skel.tar.gz
+TARGET_SKEL_DIR=target/default/target_skeleton
+
+include target/device/Makefile.in
+
+openwrt-linux.trx: openwrt-trx
+	PATH=$(TARGET_PATH) trx -o openwrt-linux.trx $(LINUX_DIR)/$(LINUX_BINLOC) $(IMAGE).$(ROOTFS)
+
+openwrt-gs-code.bin: openwrt-addpattern openwrt-linux.trx
+	PATH=$(TARGET_PATH) addpattern -2 -i  openwrt-linux.trx -o openwrt-gs-code.bin -g
+
+openwrt-g-code.bin: openwrt-gs-code.bin
+	sed -e "1s,^W54S,W54G," < openwrt-gs-code.bin > openwrt-g-code.bin
+
+openwrt-image:	openwrt-g-code.bin
+
diff --git a/target/default/openwrt.mk b/target/default/openwrt.mk
deleted file mode 100644
index 89051cd1b..000000000
--- a/target/default/openwrt.mk
+++ /dev/null
@@ -1,10 +0,0 @@
-openwrt-linux.trx: openwrt-trx
-	PATH=$(TARGET_PATH) trx -o openwrt-linux.trx $(LINUX_DIR)/$(LINUX_BINLOC) $(IMAGE).$(ROOTFS)
-
-openwrt-gs-code.bin: openwrt-addpattern openwrt-linux.trx
-	PATH=$(TARGET_PATH) addpattern -2 -i  openwrt-linux.trx -o openwrt-gs-code.bin -g
-
-openwrt-g-code.bin: openwrt-gs-code.bin
-	sed -e "1s,^W54S,W54G," < openwrt-gs-code.bin > openwrt-g-code.bin
-
-openwrt-image:	openwrt-g-code.bin
diff --git a/target/default/skel.tar.gz b/target/default/skel.tar.gz
new file mode 100644
index 0000000000000000000000000000000000000000..86cefb1d24a81521856763fc61a4fa1a0fa2b5dc
GIT binary patch
literal 193
zcmV;y06za8iwFRIuNFc81MSsK4uUWcK;a&R8`#!P=RE$fG>`)7@ugL^ii;9W-nW^M
zvVgo&QrC?;Q<t5oNS;o`mTMP6nJ>m!Z$-R{pVytYE}BLvKUXmd;~_PTxgGBx?rYQV
zW_@{)W&Vkj`}e6kRon#M^bZ<yf7Lzxw@~_zm%ip1P`azG`~I!Z{iCP<CQAQvd#&7m
v{rPW0?k~#uzlqX+8q&}7fByfYSNa1000000000000I=2rOWiqI04M+e8lPYS

literal 0
HcmV?d00001

diff --git a/target/device/Config.in b/target/device/Config.in
new file mode 100644
index 000000000..36d056cad
--- /dev/null
+++ b/target/device/Config.in
@@ -0,0 +1,17 @@
+choice
+	prompt "Device Support"
+	default BR2_TARGET_ALL
+
+config BR2_TARGET_ALL
+	bool "Support for all devices"
+
+config BR2_TARGET_LINKSYS_WRT54G
+    bool "Linksys WRT54G Support"
+
+config BR2_TARGET_LINKSYS_WRT54GS
+    bool "Linksys WRT54GS Support"
+
+config BR2_TARGET_ASUS_WL500G
+	bool "Asus WL-500g Support"
+
+endchoice
diff --git a/target/device/Makefile.in b/target/device/Makefile.in
new file mode 100644
index 000000000..92d6e76bc
--- /dev/null
+++ b/target/device/Makefile.in
@@ -0,0 +1,2 @@
+-include target/device/*/*/Makefile.in
+-include target/device/all/Makefile.in
diff --git a/target/jffs2/jffs2root.mk b/target/jffs2/jffs2root.mk
index 90a60165c..8dcd00f57 100644
--- a/target/jffs2/jffs2root.mk
+++ b/target/jffs2/jffs2root.mk
@@ -43,3 +43,8 @@ jffs2root-clean:
 
 jffs2root-dirclean:
 	rm -rf $(MTD_DIR)
+
+ifeq ($(strip $(BR2_TARGET_ROOTFS_JFFS2)),y)
+TARGETS+=jffs2root openwrt-image
+ROOTFS=jffs2
+endif
diff --git a/target/squashfs-lzma/squashfslzmaroot.mk b/target/squashfs-lzma/squashfslzmaroot.mk
index 6f41f9315..722c20524 100644
--- a/target/squashfs-lzma/squashfslzmaroot.mk
+++ b/target/squashfs-lzma/squashfslzmaroot.mk
@@ -48,3 +48,8 @@ squashfslzmaroot-clean:
 
 squashfslzmaroot-dirclean:
 	rm -rf $(SQUASHFSLZMA_DIR)
+
+ifeq ($(strip $(BR2_TARGET_ROOTFS_SQUASHFS_LZMA)),y)
+TARGETS+=squashfslzmaroot openwrt-image
+ROOTFS=squashfslzma
+endif
diff --git a/target/squashfs/squashfsroot.mk b/target/squashfs/squashfsroot.mk
index 4dd6800a0..d3a104a83 100644
--- a/target/squashfs/squashfsroot.mk
+++ b/target/squashfs/squashfsroot.mk
@@ -47,3 +47,8 @@ squashfsroot-clean:
 
 squashfsroot-dirclean:
 	rm -rf $(SQUASHFS_DIR)
+
+ifeq ($(strip $(BR2_TARGET_ROOTFS_SQUASHFS)),y)
+TARGETS+=squashfsroot openwrt-image
+ROOTFS=squashfs
+endif
-- 
2.20.1