diff options
author | Florian Fainelli <florian@openwrt.org> | 2007-08-08 12:01:51 +0000 |
---|---|---|
committer | Florian Fainelli <florian@openwrt.org> | 2007-08-08 12:01:51 +0000 |
commit | acde70bfd5ec1708f6fcef79df9807e7ec54576e (patch) | |
tree | 99d94e5d17dc6fdede2e0e5655c3396eebb99c57 /target/linux/rdc-2.6 | |
parent | a5d582ad434bad1fa5531c7fbe2864552560d045 (diff) | |
download | mtk-20170518-acde70bfd5ec1708f6fcef79df9807e7ec54576e.zip mtk-20170518-acde70bfd5ec1708f6fcef79df9807e7ec54576e.tar.gz mtk-20170518-acde70bfd5ec1708f6fcef79df9807e7ec54576e.tar.bz2 |
More rdc fixes, thanks to Daniel Gimpelevich
SVN-Revision: 8378
Diffstat (limited to 'target/linux/rdc-2.6')
-rw-r--r-- | target/linux/rdc-2.6/Makefile | 2 | ||||
-rw-r--r-- | target/linux/rdc-2.6/config/default | 2 | ||||
-rw-r--r-- | target/linux/rdc-2.6/files/drivers/mtd/maps/rdc3210.c | 6 | ||||
-rw-r--r-- | target/linux/rdc-2.6/image/Makefile | 8 | ||||
-rw-r--r-- | target/linux/rdc-2.6/patches/000-rdc_fixes.patch | 39 |
5 files changed, 48 insertions, 9 deletions
diff --git a/target/linux/rdc-2.6/Makefile b/target/linux/rdc-2.6/Makefile index 8452618..1b5f34b 100644 --- a/target/linux/rdc-2.6/Makefile +++ b/target/linux/rdc-2.6/Makefile @@ -23,7 +23,7 @@ include $(INCLUDE_DIR)/kernel-build.mk ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y) define Kernel/SetInitramfs echo "r6040 parent=wlan0" > $(TARGET_DIR)/etc/modules.d/99-r6040 - $(RM) -f $(TARGET_DIR)/sbin/init + $(RM) $(TARGET_DIR)/sbin/init ln -s /etc/preinit $(TARGET_DIR)/sbin/init sed -i 's,exec /sbin/init,exec /bin/busybox init,g' $(TARGET_DIR)/etc/preinit sed -i 's,/sbin/init,/bin/busybox init,g' $(TARGET_DIR)/init diff --git a/target/linux/rdc-2.6/config/default b/target/linux/rdc-2.6/config/default index ec8a6e6..d64a9fb 100644 --- a/target/linux/rdc-2.6/config/default +++ b/target/linux/rdc-2.6/config/default @@ -301,7 +301,7 @@ CONFIG_X86_MSR=y CONFIG_X86_POPAD_OK=y CONFIG_X86_PPRO_FENCE=y CONFIG_X86_RDC=y -# CONFIG_X86_REBOOTFIXUPS is not set +CONFIG_X86_REBOOTFIXUPS=y # CONFIG_X86_SUMMIT is not set # CONFIG_X86_UP_APIC is not set # CONFIG_X86_VISWS is not set 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 16ce471..fb2a3f8 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 @@ -38,9 +38,9 @@ static struct mtd_partition rdc3210_parts[] = #endif { name: "bootldr", offset: 0x003E0000, size: 0x00020000 }, /* 128 KB */ #elif CONFIG_MTD_RDC3210_SIZE == 0x200000 - { name: "linux", offset: 0x00010000, size: 0x001E0000 }, - { name: "romfs", offset: 0x000D0000, size: 0x00120000 }, - { name: "nvram", offset: 0x00000000, size: 0x00010000 }, /* 64 KB */ + { name: "linux", offset: 0x00008000, size: 0x001E8000 }, + { name: "romfs", offset: 0x000C8000, size: 0x00128000 }, + { name: "nvram", offset: 0x00000000, size: 0x00008000 }, /* 64 KB */ #ifdef CONFIG_MTD_RDC3210_FACTORY_PRESENT #error Unsupported configuration! #endif diff --git a/target/linux/rdc-2.6/image/Makefile b/target/linux/rdc-2.6/image/Makefile index 74713e2..52e4f4a 100644 --- a/target/linux/rdc-2.6/image/Makefile +++ b/target/linux/rdc-2.6/image/Makefile @@ -25,20 +25,20 @@ define Image/Build/ar525w 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 + $(RM) $(KDIR)/root.tmp $(STAGING_DIR_HOST)/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/wl153 - echo $(shell ls -l $(KDIR)/bzImage | sed -r 's/^[^[:blank:]]+[[:blank:]]+[^[:blank:]]+[[:blank:]]+[^[:blank:]]+[[:blank:]]+[^[:blank:]]+[[:blank:]]+([^[:blank:]]+).+$$/\1/' | xargs printf '%.8x') > $(KDIR)/bzSize + ls -l $(KDIR)/bzImage | sed -r 's/^[^[:blank:]]+[[:blank:]]+[^[:blank:]]+[[:blank:]]+[^[:blank:]]+[[:blank:]]+[^[:blank:]]+[[:blank:]]+([^[:blank:]]+).+$$$$/\1/' | xargs printf '%.8x' > $(KDIR)/bzSize gzip -9c $(KDIR)/root.$(1) > $(KDIR)/root.$(1).gz - echo $(shell ls -l $(KDIR)/root.$(1).gz | sed -r 's/^[^[:blank:]]+[[:blank:]]+[^[:blank:]]+[[:blank:]]+[^[:blank:]]+[[:blank:]]+[^[:blank:]]+[[:blank:]]+([^[:blank:]]+).+$$/\1/' | xargs printf '%.8x') > $(KDIR)/rdSize + ls -l $(KDIR)/root.$(1).gz | sed -r 's/^[^[:blank:]]+[[:blank:]]+[^[:blank:]]+[[:blank:]]+[^[:blank:]]+[[:blank:]]+[^[:blank:]]+[[:blank:]]+([^[:blank:]]+).+$$$$/\1/' | xargs printf '%.8x' > $(KDIR)/rdSize echo -ne "\x$$$$(cut -c 7,8 < $(KDIR)/bzSize)\x$$$$(cut -c 5,6 < $(KDIR)/bzSize)\x$$$$(cut -c 3,4 < $(KDIR)/bzSize)\x$$$$(cut -c 1,2 < $(KDIR)/bzSize)" > $(KDIR)/bzSize.tmp echo -n 'CSYS' > $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1)-$(2).img cat $(KDIR)/bzSize.tmp >> $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1)-$(2).img echo -ne "\x$$$$(cut -c 7,8 < $(KDIR)/rdSize)\x$$$$(cut -c 5,6 < $(KDIR)/rdSize)\x$$$$(cut -c 3,4 < $(KDIR)/rdSize)\x$$$$(cut -c 1,2 < $(KDIR)/rdSize)WRRM" >> $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1)-$(2).img cat $(KDIR)/bzSize.tmp $(KDIR)/bzImage $(KDIR)/root.$(1).gz >> $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1)-$(2).img - rm -f $(KDIR)/bzSize.tmp $(KDIR)/bzSize $(KDIR)/rdSize + $(RM) $(KDIR)/bzSize.tmp $(KDIR)/bzSize $(KDIR)/rdSize endef define Image/Build diff --git a/target/linux/rdc-2.6/patches/000-rdc_fixes.patch b/target/linux/rdc-2.6/patches/000-rdc_fixes.patch index 1f0ac21..b8cf2a9 100644 --- a/target/linux/rdc-2.6/patches/000-rdc_fixes.patch +++ b/target/linux/rdc-2.6/patches/000-rdc_fixes.patch @@ -39,3 +39,42 @@ diff -urN linux-2.6.19/arch/i386/mach-rdc/Makefile linux-2.6.19.new/arch/i386/ma +# + +obj-$(CONFIG_X86_RDC) := gpio.o platform.o +--- timex.h 2007-08-07 10:44:03.816112250 -0700 ++++ linux/include/asm-i386/timex.h 2007-08-07 10:48:47.905866750 -0700 +@@ -11,6 +11,8 @@ + + #ifdef CONFIG_X86_ELAN + # define CLOCK_TICK_RATE 1189200 /* AMD Elan has different frequency! */ ++#elif defined(CONFIG_X86_RDC) ++# define CLOCK_TICK_RATE 1041667 /* Underlying HZ for R8610 */ + #else + # define CLOCK_TICK_RATE 1193182 /* Underlying HZ */ + #endif +--- reboot_fixups.c 2007-08-07 12:02:00.908412250 -0700 ++++ linux/arch/i386/kernel/reboot_fixups.c 2007-08-07 12:18:49.391438500 -0700 +@@ -13,6 +13,17 @@ + #include <linux/pci.h> + #include <asm/reboot_fixups.h> + #include <asm/msr.h> ++ ++static void r8610_reset(struct pci_dev *dev) ++{ ++ int i; ++ ++ outl(0x80003840,0xCF8); ++ i=inl(0xCFC); ++ i |= 0x1600; ++ outl(i,0xCFC); ++ outb(1,0x92); ++} + + static void cs5530a_warm_reset(struct pci_dev *dev) + { +@@ -40,6 +53,7 @@ + }; + + static struct device_fixup fixups_table[] = { ++{ 0x17F3, 0x6030, r8610_reset }, + { PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5530_LEGACY, cs5530a_warm_reset }, + { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_ISA, cs5536_warm_reset }, + }; |