diff options
-rw-r--r-- | packages/linux/nslu2-kernel.inc | 2 | ||||
-rw-r--r-- | packages/linux/nslu2-kernel_2.6.12.2.bb | 3 | ||||
-rw-r--r-- | packages/linux/nslu2-kernel_2.6.12.bb | 3 | ||||
-rw-r--r-- | packages/linux/openslug-kernel-2.6.11.2/mtd-shutdown.patch | 66 | ||||
-rw-r--r-- | packages/linux/openslug-kernel-2.6.11.2/xscale-reset.patch | 2 | ||||
-rw-r--r-- | packages/linux/openslug-kernel_2.6.11.2.bb | 3 | ||||
-rw-r--r-- | packages/meta/openslug-packages.bb | 2 | ||||
-rw-r--r-- | packages/openslug-init/openslug-init-0.10/initscripts/umountinitrd.sh | 17 | ||||
-rw-r--r-- | packages/openslug-init/openslug-init_0.10.bb | 2 |
9 files changed, 92 insertions, 8 deletions
diff --git a/packages/linux/nslu2-kernel.inc b/packages/linux/nslu2-kernel.inc index 991805e1ab..44f466ef49 100644 --- a/packages/linux/nslu2-kernel.inc +++ b/packages/linux/nslu2-kernel.inc @@ -25,6 +25,7 @@ # file://ixp4xx_copy_from.patch;patch=1 # file://anonymiser.patch;patch=1 # file://xscale-reset.patch;patch=1 +# file://mtd-shutdown.patch;patch=1 # ${N2K_EXTRA_PATCHES} # # N2K_SUFFIX - the suffix to add after 'zImage-' in the @@ -194,6 +195,7 @@ N2K_PATCHES ?= "\ file://ixp4xx_copy_from.patch;patch=1 \ file://anonymiser.patch;patch=1 \ file://xscale-reset.patch;patch=1 \ + file://mtd-shutdown.patch;patch=1 \ ${N2K_EXTRA_PATCHES}" N2K_SUFFIX ?= "openslug" diff --git a/packages/linux/nslu2-kernel_2.6.12.2.bb b/packages/linux/nslu2-kernel_2.6.12.2.bb index 8ab9379708..6fbb5d02ae 100644 --- a/packages/linux/nslu2-kernel_2.6.12.2.bb +++ b/packages/linux/nslu2-kernel_2.6.12.2.bb @@ -1,5 +1,5 @@ # Kernel for NSLU2 -PR = "r1" +PR = "r3" include nslu2-kernel.inc # N2K_EXTRA_PATCHES - list of patches to apply (can include @@ -20,4 +20,5 @@ N2K_PATCHES = "\ file://anonymiser.patch;patch=1 \ file://xscale-reset.patch;patch=1 \ file://x1205-rtc.c-id.patch;patch=1 \ + file://mtd-shutdown.patch;patch=1 \ " diff --git a/packages/linux/nslu2-kernel_2.6.12.bb b/packages/linux/nslu2-kernel_2.6.12.bb index e3e536fe3e..6cea8a4daa 100644 --- a/packages/linux/nslu2-kernel_2.6.12.bb +++ b/packages/linux/nslu2-kernel_2.6.12.bb @@ -1,5 +1,5 @@ # Kernel for NSLU2 -PR = "r0" +PR = "r2" include nslu2-kernel.inc # N2K_EXTRA_PATCHES - list of patches to apply (can include @@ -20,4 +20,5 @@ N2K_PATCHES = "\ file://anonymiser.patch;patch=1 \ file://xscale-reset.patch;patch=1 \ file://x1205-rtc.c-id.patch;patch=1 \ + file://mtd-shutdown.patch;patch=1 \ " diff --git a/packages/linux/openslug-kernel-2.6.11.2/mtd-shutdown.patch b/packages/linux/openslug-kernel-2.6.11.2/mtd-shutdown.patch new file mode 100644 index 0000000000..e7cce4ebc0 --- /dev/null +++ b/packages/linux/openslug-kernel-2.6.11.2/mtd-shutdown.patch @@ -0,0 +1,66 @@ +# Ensure that the MTD is shut down on halt/reboot, otherwise the +# hardware reset hangs + +--- linux-2.6.12.2/drivers/mtd/maps/ixp4xx.c.orig 2005-07-17 15:07:47.790388300 -0700 ++++ linux-2.6.12.2/drivers/mtd/maps/ixp4xx.c 2005-07-17 17:00:08.082672710 -0700 +@@ -144,6 +144,52 @@ + return 0; + } + ++static void ixp4xx_flash_shutdown(struct device *_dev) ++{ ++ struct platform_device *dev = to_platform_device(_dev); ++ struct flash_platform_data *plat = dev->dev.platform_data; ++ struct ixp4xx_flash_info *info = dev_get_drvdata(&dev->dev); ++ map_word d; ++ ++ dev_set_drvdata(&dev->dev, NULL); ++ ++ if(!info) ++ return; ++ ++ /* ++ * This is required for a soft reboot to work. ++ */ ++ d.x[0] = 0xff; ++ ixp4xx_write16(&info->map, d, 0x55 * 0x2); ++ ++#if 0 ++ /* This is commented out because it seems to cause a kernel ++ * panic (at least if it isn't commented out the kernel fails ++ * to shut down). Should be investigated. ++ */ ++ if (info->mtd) { ++ del_mtd_partitions(info->mtd); ++ map_destroy(info->mtd); ++ } ++#endif ++ if (info->map.map_priv_1) ++ iounmap((void *) info->map.map_priv_1); ++ ++ if (info->partitions) ++ kfree(info->partitions); ++ ++ if (info->res) { ++ release_resource(info->res); ++ kfree(info->res); ++ } ++ ++ if (plat->exit) ++ plat->exit(); ++ ++ /* Disable flash write */ ++ *IXP4XX_EXP_CS0 &= ~IXP4XX_FLASH_WRITABLE; ++} ++ + static int ixp4xx_flash_probe(struct device *_dev) + { + struct platform_device *dev = to_platform_device(_dev); +@@ -243,6 +289,7 @@ + .bus = &platform_bus_type, + .probe = ixp4xx_flash_probe, + .remove = ixp4xx_flash_remove, ++ .shutdown = ixp4xx_flash_shutdown, + }; + + static int __init ixp4xx_flash_init(void) diff --git a/packages/linux/openslug-kernel-2.6.11.2/xscale-reset.patch b/packages/linux/openslug-kernel-2.6.11.2/xscale-reset.patch index 3995ba691e..4e68456e20 100644 --- a/packages/linux/openslug-kernel-2.6.11.2/xscale-reset.patch +++ b/packages/linux/openslug-kernel-2.6.11.2/xscale-reset.patch @@ -102,7 +102,7 @@ + ldr r7, =IXP4XX_TIMER_BASE_VIRT + ldr r8, =IXP4XX_WDT_KEY @ set key + str r8, [r7, #IXP4XX_OSWK_OFFSET] -+ mov r8, #0x10000000 @ about 4 seconds ++ mov r8, #0x1000000 @ about 0.25 seconds + str r8, [r7, #IXP4XX_OSWT_OFFSET] @ set timer + mov r8, #(IXP4XX_WDT_RESET_ENABLE | IXP4XX_WDT_COUNT_ENABLE) + str r8, [r7, #IXP4XX_OSWE_OFFSET] @ enable reset diff --git a/packages/linux/openslug-kernel_2.6.11.2.bb b/packages/linux/openslug-kernel_2.6.11.2.bb index c4408ae479..8e2555d014 100644 --- a/packages/linux/openslug-kernel_2.6.11.2.bb +++ b/packages/linux/openslug-kernel_2.6.11.2.bb @@ -2,7 +2,7 @@ SECTION = "kernel" DESCRIPTION = "Linux kernel for the Linksys NSLU2 device" LICENSE = "GPL" MAINTAINER = "Chris Larson <kergoth@handhelds.org>" -PR = "r13" +PR = "r15" KERNEL_SUFFIX = "openslug" @@ -12,6 +12,7 @@ SRC_URI = "ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.11.2.tar.bz2 \ file://ixp4xx_copy_from.patch;patch=1 \ file://anonymiser.patch;patch=1 \ file://xscale-reset.patch;patch=1 \ + file://mtd-shutdown.patch;patch=1 \ file://defconfig \ file://x1205-rtc.c \ file://nslu2-io.c \ diff --git a/packages/meta/openslug-packages.bb b/packages/meta/openslug-packages.bb index 3fb0587727..2a7bc68794 100644 --- a/packages/meta/openslug-packages.bb +++ b/packages/meta/openslug-packages.bb @@ -33,7 +33,6 @@ OPENSLUG_DEVELOPMENT = "\ pciutils \ quilt \ sed \ - util-linux \ " # These packages only build on TARGET_OS=linux, not @@ -41,6 +40,7 @@ OPENSLUG_DEVELOPMENT = "\ OPENSLUG_DEVELOPMENT_append_linux = "\ perl \ tar \ + util-linux \ " diff --git a/packages/openslug-init/openslug-init-0.10/initscripts/umountinitrd.sh b/packages/openslug-init/openslug-init-0.10/initscripts/umountinitrd.sh index b7ae8b76e5..da39b425f8 100644 --- a/packages/openslug-init/openslug-init-0.10/initscripts/umountinitrd.sh +++ b/packages/openslug-init/openslug-init-0.10/initscripts/umountinitrd.sh @@ -1,5 +1,18 @@ #!/bin/sh # # umount /mnt, which is where the initrd ends up mounted -# if the directory /initrd is not present -exec umount /mnt 2>/dev/null +# if the directory /initrd is not present, if this fails +# then the /initrd is mounted and we want to remount that +# ro - this works round the shutdown -r hang problem +umount /mnt 2>/dev/null || { + # need the device for a remount + . /etc/default/functions + ffspart=Flashdisk + ffsdev="$(mtblockdev $ffspart)" + if test -n "$ffsdev" -a -b "$ffsdev" + then + mount -o remount,ro "$ffsdev" /initrd + else + echo "Flashdisk: $ffsdev: flash device not found" >&2 + fi +} diff --git a/packages/openslug-init/openslug-init_0.10.bb b/packages/openslug-init/openslug-init_0.10.bb index 537760f8d5..59b8c0fd5d 100644 --- a/packages/openslug-init/openslug-init_0.10.bb +++ b/packages/openslug-init/openslug-init_0.10.bb @@ -3,7 +3,7 @@ SECTION = "console/network" LICENSE = "GPL" DEPENDS = "base-files devio" RDEPENDS = "busybox devio" -PR = "r37" +PR = "r38" SRC_URI = "file://linuxrc \ file://boot/flash \ |