From: Steve Weinreich <lairsdra...@gmail.com> Patch for reset of the gemini plattform and a ugly hack for handling the mtd Redboot FIS Partition table naming.
Signed-off-by: Steve Weinreich <lairsdra...@gmail.com> --- .../145-arm-gemini-fis-label-and-reboot.patch | 61 ++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 target/linux/gemini/patches-3.3/145-arm-gemini-fis-label-and-reboot.patch diff --git a/target/linux/gemini/patches-3.3/145-arm-gemini-fis-label-and-reboot.patch b/target/linux/gemini/patches-3.3/145-arm-gemini-fis-label-and-reboot.patch new file mode 100644 index 0000000..f18ab7d --- /dev/null +++ b/target/linux/gemini/patches-3.3/145-arm-gemini-fis-label-and-reboot.patch @@ -0,0 +1,61 @@ +--- a/arch/arm/mach-gemini/Makefile ++++ b/arch/arm/mach-gemini/Makefile +@@ -4,7 +4,7 @@ + + # Object file lists. + +-obj-y := irq.o mm.o time.o devices.o gpio.o ++obj-y := irq.o mm.o time.o devices.o gpio.o system.o + + obj-$(CONFIG_PCI) += pci.o + +--- /dev/null ++++ b/arch/arm/mach-gemini/system.c +@@ -0,0 +1,22 @@ ++/* ++ * arch/arm/mach-gemini/system.c ++ */ ++ ++#include <linux/init.h> ++#include <linux/io.h> ++#include <mach/hardware.h> ++#include <mach/global_reg.h> ++#include <asm/system.h> ++ ++static void gemini_arch_reset(char mode, const char *cmd) ++{ ++ __raw_writel(RESET_GLOBAL | RESET_CPU1, ++ IO_ADDRESS(GEMINI_GLOBAL_BASE) + GLOBAL_RESET); ++} ++ ++static int __init gemini_arch_reset_init(void) ++{ ++ arm_pm_restart = gemini_arch_reset; ++ return 0; ++} ++arch_initcall(gemini_arch_reset_init); +--- a/drivers/mtd/mtdpart.c ++++ b/drivers/mtd/mtdpart.c +@@ -890,6 +890,22 @@ + printk(KERN_NOTICE "Creating %d MTD partitions on \"%s\":\n", nbparts, master->name); + + for (i = 0; i < nbparts; i++) { ++ /* Ugly Hack for WBD-111 / RUT-104 */ ++ if (!strcmp(parts[i].name, "Ramdisk")) { ++ printk(KERN_NOTICE "mtd: partition \"rootfs\" " ++ "renamed to rootfs\n"); ++ dump_stack(); ++ /* Ramdisk is longer than rootfs therefore we overwrite the string */ ++ strcpy(parts[i].name,"rootfs"); ++ } ++ if (!strcmp(parts[i].name, "Application")) { ++ printk(KERN_NOTICE "mtd: partition \"Application\" " ++ "renamed to rootfs_data\n"); ++ dump_stack(); ++ /* Application is as long as rootfs_data therefore we overwrite the string */ ++ strcpy(parts[i].name,"rootfs_data"); ++ } ++ + slave = allocate_partition(master, parts + i, i, cur_offset); + if (IS_ERR(slave)) + return PTR_ERR(slave); -- 1.7.9.5 _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel