diff options
author | John Bowler <jbowler@nslu2-linux.org> | 2005-11-29 07:57:27 +0000 |
---|---|---|
committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2005-11-29 07:57:27 +0000 |
commit | 828a00a6508ced61f02bde7a527052d1f38a2aff (patch) | |
tree | 24d94127f113467ea432e2cb94e73f99548324f2 /packages | |
parent | 78d2ca44a8dd2bad6a4314772ad9c9ac6e30bf46 (diff) |
nslu2-kernel: change board setup to call maclist in 2.6.14.3, 2.6.15-rc2
Diffstat (limited to 'packages')
-rw-r--r-- | packages/linux/nslu2-kernel/2.6/92-nslu2-maclist.patch | 80 | ||||
-rw-r--r-- | packages/linux/nslu2-kernel_2.6.14.3.bb | 3 | ||||
-rw-r--r-- | packages/linux/nslu2-kernel_2.6.15-rc2.bb | 3 |
3 files changed, 84 insertions, 2 deletions
diff --git a/packages/linux/nslu2-kernel/2.6/92-nslu2-maclist.patch b/packages/linux/nslu2-kernel/2.6/92-nslu2-maclist.patch new file mode 100644 index 0000000000..c8b8a9bede --- /dev/null +++ b/packages/linux/nslu2-kernel/2.6/92-nslu2-maclist.patch @@ -0,0 +1,80 @@ +--- linux-2.6.15/arch/arm/mach-ixp4xx/Kconfig 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.15/arch/arm/mach-ixp4xx/Kconfig 1970-01-01 00:00:00.000000000 +0000 +@@ -11,8 +11,8 @@ comment "IXP4xx Platforms" + # This entry is placed on top because otherwise it would have + # been shown as a submenu. + config MACH_NSLU2 +- bool +- prompt "NSLU2" if !(MACH_IXDP465 || MACH_IXDPG425 || ARCH_IXDP425 || ARCH_ADI_COYOTE || ARCH_AVILA || ARCH_IXCDP1100 || ARCH_PRPMC1100 || MACH_GTWX5715) ++ bool "NSLU2" ++ select MACLIST + help + Say 'Y' here if you want your kernel to support Linksys's + NSLU2 NAS device. For more information on this platform, +--- linux-2.6.15/arch/arm/mach-ixp4xx/nslu2-setup.c 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.15/arch/arm/mach-ixp4xx/nslu2-setup.c 1970-01-01 00:00:00.000000000 +0000 +@@ -16,11 +16,14 @@ + #include <linux/kernel.h> + #include <linux/serial.h> + #include <linux/serial_8250.h> ++#include <linux/mtd/mtd.h> + + #include <asm/mach-types.h> + #include <asm/mach/arch.h> + #include <asm/mach/flash.h> + ++#include <net/maclist.h> ++ + static struct flash_platform_data nslu2_flash_data = { + .map_name = "cfi_probe", + .width = 2, +@@ -112,6 +115,37 @@ static void nslu2_power_off(void) + gpio_line_set(NSLU2_PO_GPIO, IXP4XX_GPIO_HIGH); + } + ++/* ++ * When the RedBoot partition is added the MAC address is read from ++ * it. ++ */ ++void flash_add(struct mtd_info *mtd) { ++ if (strcmp(mtd->name, "RedBoot") == 0) { ++ size_t retlen; ++ u_char mac[6]; ++ ++ /* The MAC is at a known offset... */ ++ if (mtd->read(mtd, 0x3FFB0, 6, &retlen, mac) == 0 && retlen == 6) { ++ printk(KERN_INFO "NSLU2 MAC: %.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n", ++ mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); ++ maclist_add(mac); ++ } else { ++ printk(KERN_ERR "NSLU2 MAC: read failed\n"); ++ } ++ } ++} ++ ++/* ++ * Nothing to do on remove at present. ++ */ ++void flash_remove(struct mtd_info *mtd) { ++} ++ ++struct mtd_notifier flash_notifier = { ++ .add = flash_add, ++ .remove = flash_remove, ++}; ++ + static void __init nslu2_init(void) + { + /* The NSLU2 has a 33MHz crystal on board - 1.01% different +@@ -119,6 +153,11 @@ static void __init nslu2_init(void) + */ + ixp4xx_set_board_tick_rate(66000000); + ++ /* The flash has an ethernet MAC embedded in it which we need, ++ * that is all this notifier does. ++ */ ++ register_mtd_user(&flash_notifier); ++ + ixp4xx_sys_init(); + + pm_power_off = nslu2_power_off; diff --git a/packages/linux/nslu2-kernel_2.6.14.3.bb b/packages/linux/nslu2-kernel_2.6.14.3.bb index 71282bbea2..3868757ffb 100644 --- a/packages/linux/nslu2-kernel_2.6.14.3.bb +++ b/packages/linux/nslu2-kernel_2.6.14.3.bb @@ -8,7 +8,7 @@ PR_CONFIG = "0" # Increment the number below (i.e. the digits after PR) when # making changes within this file or for changes to the patches # applied to the kernel. -PR = "r1.${PR_CONFIG}" +PR = "r2.${PR_CONFIG}" include nslu2-kernel.inc @@ -31,6 +31,7 @@ N2K_PATCHES = "\ file://90-pegasus.patch;patch=1 \ file://20-timer.patch;patch=1 \ file://91-maclist.patch;patch=1 \ + file://92-nslu2-maclist.patch;patch=1 \ file://anonymiser.patch;patch=1 \ " diff --git a/packages/linux/nslu2-kernel_2.6.15-rc2.bb b/packages/linux/nslu2-kernel_2.6.15-rc2.bb index 79f382713c..9bb7e75346 100644 --- a/packages/linux/nslu2-kernel_2.6.15-rc2.bb +++ b/packages/linux/nslu2-kernel_2.6.15-rc2.bb @@ -8,7 +8,7 @@ PR_CONFIG = "0" # Increment the number below (i.e. the digits after PR) when # making changes within this file or for changes to the patches # applied to the kernel. -PR = "r1.${PR_CONFIG}" +PR = "r2.${PR_CONFIG}" include nslu2-kernel.inc @@ -26,6 +26,7 @@ N2K_PATCHES = "\ file://90-ixp4xx-nslu2.patch;patch=1 \ file://20-timer.patch;patch=1 \ file://91-maclist.patch;patch=1 \ + file://92-nslu2-maclist.patch;patch=1 \ file://anonymiser.patch;patch=1 \ " |