summaryrefslogtreecommitdiff
path: root/target/linux/rdc-2.6
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2007-04-16 21:46:44 +0000
committerFlorian Fainelli <florian@openwrt.org>2007-04-16 21:46:44 +0000
commit1612bd2f9170c5aa96d96bac7ce71699f5ccdc70 (patch)
tree58033f487c2ae349052428a1372e3896b264ef62 /target/linux/rdc-2.6
parent53a2bf0f5927d763e06e9a435261988371b610ee (diff)
downloadmtk-20170518-1612bd2f9170c5aa96d96bac7ce71699f5ccdc70.zip
mtk-20170518-1612bd2f9170c5aa96d96bac7ce71699f5ccdc70.tar.gz
mtk-20170518-1612bd2f9170c5aa96d96bac7ce71699f5ccdc70.tar.bz2
No longer mark rdc-2.6 as broken, squashfs is now working, thanks sn9
SVN-Revision: 6976
Diffstat (limited to 'target/linux/rdc-2.6')
-rw-r--r--target/linux/rdc-2.6/Makefile12
-rw-r--r--target/linux/rdc-2.6/config/default15
-rw-r--r--target/linux/rdc-2.6/files/drivers/mtd/maps/rdc3210.c2
-rw-r--r--target/linux/rdc-2.6/image/Makefile21
-rw-r--r--target/linux/rdc-2.6/image/preinit.arch2
5 files changed, 27 insertions, 25 deletions
diff --git a/target/linux/rdc-2.6/Makefile b/target/linux/rdc-2.6/Makefile
index 40d6b75..df920dd 100644
--- a/target/linux/rdc-2.6/Makefile
+++ b/target/linux/rdc-2.6/Makefile
@@ -9,15 +9,23 @@ include $(TOPDIR)/rules.mk
ARCH:=i386
BOARD:=rdc
BOARDNAME:=RDC x86
-FEATURES:=broken squashfs jffs2
+FEATURES:=squashfs
define Target/Description
Build firmware images for RDC3211 based routers
- (e.g. Airlink101 AR525W)
+ (e.g. Airlink101 AR525W, Linksys WRT54R)
endef
include $(INCLUDE_DIR)/kernel-build.mk
+ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
+ define Kernel/SetInitramfs
+ rm -f $(BUILD_DIR)/root/sbin/init
+ $(CP) $(GENERIC_PLATFORM_DIR)/files/init $(BUILD_DIR)/root/sbin/
+ $(CP) $(PLATFORM_DIR)/image/preinit.arch $(BUILD_DIR)/root/etc/
+ endef
+endif
+
# include the profiles
-include profiles/*.mk
diff --git a/target/linux/rdc-2.6/config/default b/target/linux/rdc-2.6/config/default
index 8b4efe3..747f809 100644
--- a/target/linux/rdc-2.6/config/default
+++ b/target/linux/rdc-2.6/config/default
@@ -8,8 +8,6 @@
# CONFIG_ALIM7101_WDT is not set
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
CONFIG_ARCH_POPULATES_NODE_MAP=y
-CONFIG_ARCH_SELECT_MEMORY_MODEL=y
-CONFIG_ARCH_SPARSEMEM_ENABLE=y
# CONFIG_ARPD is not set
# CONFIG_ATM is not set
# CONFIG_B44 is not set
@@ -92,6 +90,7 @@ CONFIG_INET_XFRM_MODE_BEET=m
CONFIG_INET_XFRM_MODE_TRANSPORT=m
CONFIG_INET_XFRM_MODE_TUNNEL=m
# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INITRAMFS_SOURCE=""
CONFIG_INOTIFY=y
CONFIG_INOTIFY_USER=y
CONFIG_IOSCHED_CFQ=y
@@ -110,8 +109,6 @@ CONFIG_JFFS2_FS_DEBUG=0
CONFIG_JFFS2_RUBIN=y
# CONFIG_KEXEC is not set
CONFIG_KTIME_SCALAR=y
-CONFIG_LEGACY_PTYS=y
-CONFIG_LEGACY_PTY_COUNT=256
CONFIG_LIBCRC32C=y
# CONFIG_LLC2 is not set
# CONFIG_M386 is not set
@@ -180,15 +177,16 @@ CONFIG_MTD_PARTITIONS=y
# CONFIG_MTD_PNC2000 is not set
# CONFIG_MTD_RAM is not set
CONFIG_MTD_RDC3210=y
-# CONFIG_MTD_RDC3210_STATIC_MAP is not set
CONFIG_MTD_RDC3210_ALLOW_JFFS2=y
+CONFIG_MTD_RDC3210_BUSWIDTH=2
# CONFIG_MTD_RDC3210_FACTORY_PRESENT is not set
CONFIG_MTD_RDC3210_SIZE=0x400000
-CONFIG_MTD_RDC3210_BUSWIDTH=2
+# CONFIG_MTD_RDC3210_STATIC_MAP is not set
# CONFIG_MTD_REDBOOT_PARTS is not set
# CONFIG_MTD_ROM is not set
# CONFIG_MTD_SC520CDP is not set
# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_SPLIT_ROOTFS is not set
# CONFIG_MTD_TS5500 is not set
CONFIG_MTRR=y
# CONFIG_MVIAC3_2 is not set
@@ -246,7 +244,7 @@ CONFIG_SERIAL_8250_NR_UARTS=4
# CONFIG_SMSC37B787_WDT is not set
CONFIG_SOFT_WATCHDOG=m
# CONFIG_SOUND is not set
-CONFIG_SPARSEMEM_STATIC=y
+# CONFIG_SPARSEMEM_STATIC is not set
# CONFIG_SYSVIPC is not set
# CONFIG_TCP_CONG_ADVANCED is not set
CONFIG_TCP_CONG_CUBIC=y
@@ -304,6 +302,3 @@ CONFIG_X86_WP_WORKS_OK=y
CONFIG_X86_XADD=y
# CONFIG_XFRM_USER is not set
# CONFIG_YENTA is not set
-CONFIG_INITRAMFS_SOURCE="rootfs"
-CONFIG_INITRAMFS_ROOT_UID=0
-CONFIG_INITRAMFS_ROOT_GID=0
diff --git a/target/linux/rdc-2.6/files/drivers/mtd/maps/rdc3210.c b/target/linux/rdc-2.6/files/drivers/mtd/maps/rdc3210.c
index cd449ba..fd16d90 100644
--- a/target/linux/rdc-2.6/files/drivers/mtd/maps/rdc3210.c
+++ b/target/linux/rdc-2.6/files/drivers/mtd/maps/rdc3210.c
@@ -259,7 +259,7 @@ static int __init init_rdc3210_map(void)
len = 1;
tmp4 = tmp3;
tmp = hdr->imagesz;
- rdc3210_parts[2].name = "rootfs";
+ rdc3210_parts[2].name = "rootfs_data";
rdc3210_parts[2].offset = rdc3210_parts[0].offset + (((tmp / tmp2) + ((tmp % tmp2) ? 1 : 0)) * tmp2);
}
else
diff --git a/target/linux/rdc-2.6/image/Makefile b/target/linux/rdc-2.6/image/Makefile
index 7cb4e04..e73d27b 100644
--- a/target/linux/rdc-2.6/image/Makefile
+++ b/target/linux/rdc-2.6/image/Makefile
@@ -12,29 +12,26 @@ define Image/Prepare
endef
define trxalign/jffs2-128k
--a 0x20000
+bs=128k
endef
define trxalign/jffs2-64k
--a 0x10000
+bs=64k
endef
define trxalign/squashfs
--a 1024
+bs=1024
endef
define Image/Build/Airlink
- touch $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(3)-$(2).img
-ifneq ($(1),squashfs)
- $(STAGING_DIR)/bin/airlink -b 1 -j 64 $(KDIR)/bzImage $(KDIR)/root.$(1) $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(3)-$(2).img
-else
- $(STAGING_DIR)/bin/airlink -b 1 $(KDIR)/bzImage $(KDIR)/root.$(1) $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(3)-$(2).img
-endif
+ touch $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1)-$(2).img
+ mv $(KDIR)/root.$(1) $(KDIR)/root.tmp
+ dd of=$(KDIR)/root.$(1) if=$(KDIR)/root.tmp $(call trxalign/$(1)) conv=sync
+ rm -f $(KDIR)/root.tmp
+ $(STAGING_DIR)/bin/airlink -b 1 -j $(shell bash -c 'echo $$[$(3)]') $(KDIR)/bzImage $(KDIR)/root.$(1) $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1)-$(2).img
endef
define Image/Build
$(CP) $(KDIR)/bzImage $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL).bzImage
-ifneq ($(1),jffs2-128K)
- $(call Image/Build/Airlink,$(1),ar525w,$(patsubst jffs2-%,jffs2,$(1)))
-endif
+ $(call Image/Build/Airlink,$(1),ar525w,$(patsubst jffs2-%k,%,$(1)))
endef
$(eval $(call BuildImage))
diff --git a/target/linux/rdc-2.6/image/preinit.arch b/target/linux/rdc-2.6/image/preinit.arch
new file mode 100644
index 0000000..2e88efd
--- /dev/null
+++ b/target/linux/rdc-2.6/image/preinit.arch
@@ -0,0 +1,2 @@
+mount_root ${FAILSAFE:+failsafe}
+exec /bin/busybox init