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
# 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
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
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
# 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
# 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
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
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))