diff options
| author | John Bowler <jbowler@nslu2-linux.org> | 2005-11-11 07:07:34 +0000 |
|---|---|---|
| committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2005-11-11 07:07:34 +0000 |
| commit | a90c73d1c0f133ae4e0b32ec9c290597be03b876 (patch) | |
| tree | 9f741a92308f44b03640e34601343fcad55841dd /packages | |
| parent | 894b7f2a3c1ab1fd49948ae812010d23520fc554 (diff) | |
nslu2-kernel: cleanup openslug, ucslugc and slugos kernels, ALL
- remove old kernel versions
- remove openslug-kernel
- move patches from openslug-kernel
- fix kernel UTS_RELEASE handling (requires change in kernel.bbclass)
- fix nslu2-kernel MM build
- move to 2.6.14.1 (important security fix)
Diffstat (limited to 'packages')
77 files changed, 1162 insertions, 16979 deletions
diff --git a/packages/linux/nslu2-kernel.inc b/packages/linux/nslu2-kernel.inc index a0cc1daf25..39dcb6bed3 100644 --- a/packages/linux/nslu2-kernel.inc +++ b/packages/linux/nslu2-kernel.inc @@ -1,5 +1,3 @@ -# nslu2-kernel.inc -# # Standard definitions for any NSLU2 Linux kernel. # Include this file in a .bb which specifies, at least, # PN,PV,PR for the desired kernel @@ -7,32 +5,10 @@ # Define the following *before* including this file as # required: # -# N2K_EXTRA_FILES - kernel-tree path of extra files to install -# N2K_FILES - kernel-tree path of files to install, defaults to: -# drivers/i2c/chips/x1205-rtc.c -# arch/arm/mach-ixp4xx/nslu2-io.c -# arch/arm/mach-ixp4xx/nslu2-setup.c -# arch/arm/mach-ixp4xx/nslu2-pci.c -# arch/arm/mach-ixp4xx/nslu2-part.c -# include/asm-arm/arch-ixp4xx/nslu2.h -# ${N2K_EXTRA_FILES} -# -# N2K_EXTRA_PATCHES - list of patches to apply (can include -# patches to the files installed above) -# N2K_PATCHES - full list of patches to apply, defaults to: -# file://nslu2_2.6.11.patch;patch=1 -# file://usbnet.patch;patch=1 -# 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_PATCHES - full list of patches to apply, to add files +# generate a patch against /dev/null # N2K_SUFFIX - the suffix to add after 'zImage-' in the -# deploy/images directory - defaults to "openslug" -# -# Notice that the N2K_PATCHES list is appropriate for -# openslug-kernel_2.6.11.2 and probably nothing else. +# deploy/images directory, should identify the image config # # DEFAULT_PREFERENCE is set automagically in this file as # follows: @@ -72,7 +48,6 @@ DEPENDS += "devio-native" # file). Files, including the all important defconfig, are # searched for in the following directories (last one first): # -# openslug-kernel-2.6.11.2 # nslu2-kernel/files # nslu2-kernel/X.Y # nslu2-kernel/X.Y.Z @@ -163,47 +138,23 @@ python () { # FILESPATH: this list is in order last-searched-first, therefore # the first entry is the *latest* and/or most specific -FILESPATH = "${FILE_DIRNAME}/${P}:${N2K_FILESPATH}:${FILE_DIRNAME}/openslug-kernel-2.6.11.2" +FILESPATH = "${FILE_DIRNAME}/${P}:${N2K_FILESPATH}" # The working directory will be the 'base' version (which may not be the # same as implied by the PV variable because it corresponds to the prior # minor version for rc and pre patched versions). S = "${WORKDIR}/linux-${N2K_SRCVER}" -# N2K_FILES is a list of additional files added to the source, these are -# put in place before the patches, so may themselves be patched. The list -# gives the path name relative to the base of the kernel source tree, the -# base file name is used to *find* the file. -N2K_EXTRA_FILES ?= -N2K_FILES ?= "\ - drivers/i2c/chips/x1205-rtc.c \ - arch/arm/mach-ixp4xx/nslu2-io.c \ - arch/arm/mach-ixp4xx/nslu2-setup.c \ - arch/arm/mach-ixp4xx/nslu2-pci.c \ - arch/arm/mach-ixp4xx/nslu2-part.c \ - include/asm-arm/arch-ixp4xx/nslu2.h \ - ${N2K_EXTRA_FILES}" - -N2K_SRCFILES = "${@( ' '.join([ ("file://" + n2k_file.split('/')[-1]) for n2k_file in bb.data.getVar("N2K_FILES",d,1).split(None) ]) )}" - -# N2K_PATCHES is a list of additional patches, the list specified -# here comes from the openslug-2.6.11.2 kernel, typically extra -# patches will be required and very often patches will need to -# be removed (i.e. the default is typically not very useful!) -N2K_EXTRA_PATCHES ?= -N2K_PATCHES ?= "\ - file://nslu2_2.6.11.patch;patch=1 \ - file://usbnet.patch;patch=1 \ - 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_PATCHES is the list of patches. +N2K_PATCHES ?= "" +# Image suffix - actually set in conf/machine/nslu2.conf as it is also +# used by anything which needs to know the name of the generated image. +# May be overridden in the distro if patches or defconfig are changed. +#FIXME: this can be removed, it is just here for safety with the old names. N2K_SUFFIX ?= "openslug" SRC_URI = "${N2K_SRCURI}" -SRC_URI += "${N2K_SRCFILES}" SRC_URI += "${N2K_PATCHES}" SRC_URI += "file://defconfig" @@ -235,27 +186,22 @@ EXTRA_OEMAKE += "EXTRAVERSION=" EXTRA_OEMAKE += "LOCALVERSION=" EXTRA_OEMAKE += "MAKEFLAGS='--no-print-directory'" -# By putting the added files in place in a separate task before -# do_patch it becomes possible to patch these files. -do_unpacklocal() { - for f in ${N2K_FILES} - do - s="$(basename "$f")" - install -m 0644 "${WORKDIR}/$s" "${S}/$f" - done -} +# Override KERNEL_RELEASE from kernel.bbclass to match: +KERNEL_RELEASE = "${KERNEL_VERSION}" addtask unpacklocal before do_patch after do_unpack +# NOTE: in MM kernel builds the config options (oldconfig, menuconfig +# and so on) do not allow an option to be overridden, so the following +# removes the options which must be changed. do_configure_prepend() { - install -m 0644 ${WORKDIR}/defconfig ${S}/.config - if test '${ARCH_BYTE_SEX}' = le + rm -f ${S}/.config + echo "CONFIG_CMDLINE=\"${CMDLINE}\"" >>'${S}/.config' + if test '${ARCH_BYTE_SEX}' = be then - sed -i '/CONFIG_CPU_BIG_ENDIAN/d' '${S}/.config' - else echo 'CONFIG_CPU_BIG_ENDIAN=y' >>'${S}/.config' fi - echo "CONFIG_CMDLINE=\"${CMDLINE}\"" >> ${S}/.config + sed -e '/CONFIG_CPU_BIG_ENDIAN/d' -e '/CONFIG_CMDLINE=/d' '${WORKDIR}/defconfig' >>'${S}/.config' rm -rf ${S}/include/asm-arm/arch ${S}/include/asm-arm/proc \ ${S}/include/asm-arm/.proc ${S}/include/asm-arm/.arch } @@ -310,5 +256,5 @@ python () { # Don't build the kernel unless we're targeting an nslu2 mach = bb.data.getVar("MACHINE", d, 1) if mach != 'nslu2': - raise bb.parse.SkipPackage("OpenSlug only builds for the Linksys NSLU2") + raise bb.parse.SkipPackage("nslu2-kernel only builds for the Linksys NSLU2") } diff --git a/packages/linux/nslu2-kernel/2.6.13/10-ixp4xx-copy-from.patch b/packages/linux/nslu2-kernel/2.6.13/10-ixp4xx-copy-from.patch deleted file mode 100644 index 03d94d282c..0000000000 --- a/packages/linux/nslu2-kernel/2.6.13/10-ixp4xx-copy-from.patch +++ /dev/null @@ -1,39 +0,0 @@ -# This patch fixes ixp4xx_copy_from for cases where the 'from' -# pointer is odd - that would cause all the accesses to be -# misaligned in the old code. ---- linux-2.6.12.2/.pc/ixp4xx_copy_from.patch/drivers/mtd/maps/ixp4xx.c 2005-09-21 22:35:38.761014739 -0700 -+++ linux-2.6.12.2/drivers/mtd/maps/ixp4xx.c 2005-09-23 01:27:54.696223365 -0700 -@@ -54,19 +54,23 @@ - static void ixp4xx_copy_from(struct map_info *map, void *to, - unsigned long from, ssize_t len) - { -- int i; -- u8 *dest = (u8 *) to; -- u16 *src = (u16 *) (map->map_priv_1 + from); -- u16 data; -+ if (len <= 0) -+ return; - -- for (i = 0; i < (len / 2); i++) { -- data = src[i]; -- dest[i * 2] = BYTE0(data); -- dest[i * 2 + 1] = BYTE1(data); -+ u8 *dest = (u8 *) to; -+ u8 *src = (u8 *) (map->map_priv_1 + from); -+ if (from & 1) -+ *dest++ = BYTE1(*(u16 *)(src-1)), ++src, --len; -+ -+ while (len >= 2) { -+ u16 data = *(u16 *)src; src += 2; -+ *dest++ = BYTE0(data); -+ *dest++ = BYTE1(data); -+ len -= 2; - } - -- if (len & 1) -- dest[len - 1] = BYTE0(src[i]); -+ if (len > 0) -+ *dest++ = BYTE0(*(u16 *)src); - } - - /* diff --git a/packages/linux/nslu2-kernel/2.6.13/10-ixp4xx-regs.patch b/packages/linux/nslu2-kernel/2.6.13/10-ixp4xx-regs.patch deleted file mode 100644 index 32f7e3ccb8..0000000000 --- a/packages/linux/nslu2-kernel/2.6.13/10-ixp4xx-regs.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- linux-2.6.11/.pc/2.6.patch/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h 2005-03-01 23:37:49.000000000 -0800 -+++ linux-2.6.11/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h 2005-06-17 17:51:32.569981939 -0700 -@@ -52,7 +52,7 @@ - * Expansion BUS Configuration registers - */ - #define IXP4XX_EXP_CFG_BASE_PHYS (0xC4000000) --#define IXP4XX_EXP_CFG_BASE_VIRT (0xFFBFD000) -+#define IXP4XX_EXP_CFG_BASE_VIRT (0xFFBFE000) - #define IXP4XX_EXP_CFG_REGION_SIZE (0x00001000) - - /* diff --git a/packages/linux/nslu2-kernel/2.6.13/20-timer.patch b/packages/linux/nslu2-kernel/2.6.13/20-timer.patch deleted file mode 100644 index 356da6bb28..0000000000 --- a/packages/linux/nslu2-kernel/2.6.13/20-timer.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -urN linux-2.6.13.1/include/asm-arm/arch-ixp4xx/timex.h nslu2-2.6.13.1/include/asm-arm/arch-ixp4xx/timex.h ---- linux-2.6.13.1/include/asm-arm/arch-ixp4xx/timex.h 2005-09-17 12:42:45.000000000 +0200 -+++ nslu2-2.6.13.1/include/asm-arm/arch-ixp4xx/timex.h 2005-09-17 12:15:31.000000000 +0200 -@@ -9,7 +9,12 @@ - * We use IXP425 General purpose timer for our timer needs, it runs at - * 66.66... MHz. We do a convulted calculation of CLOCK_TICK_RATE b/c the - * timer register ignores the bottom 2 bits of the LATCH value. -+ * The NSLU2 has a 33.00MHz crystal, so a different FREQ is required. - */ -+#ifdef CONFIG_ARCH_NSLU2 -+#define FREQ 66000000 -+#else - #define FREQ 66666666 -+#endif - #define CLOCK_TICK_RATE (((FREQ / HZ & ~IXP4XX_OST_RELOAD_MASK) + 1) * HZ) - diff --git a/packages/linux/nslu2-kernel/2.6.13/30-i2c-x1205.patch b/packages/linux/nslu2-kernel/2.6.13/30-i2c-x1205.patch deleted file mode 100644 index f05609f1e6..0000000000 --- a/packages/linux/nslu2-kernel/2.6.13/30-i2c-x1205.patch +++ /dev/null @@ -1,580 +0,0 @@ -diff -urN linux-2.6.13.1/drivers/i2c/chips/Kconfig nslu2-2.6.13.1/drivers/i2c/chips/Kconfig ---- linux-2.6.13.1/drivers/i2c/chips/Kconfig 2005-09-17 12:42:33.000000000 +0200 -+++ nslu2-2.6.13.1/drivers/i2c/chips/Kconfig 2005-09-17 13:46:42.000000000 +0200 -@@ -136,4 +136,14 @@ - This driver can also be built as a module. If so, the module - will be called max6875. - -+config SENSORS_X1205 -+ tristate "Xicor X1205 RTC chip" -+ depends on I2C && EXPERIMENTAL -+ select I2C_SENSOR -+ help -+ If you say yes here you get support for the Xicor x1205 RTC chip. -+ -+ This driver can also be built as a module. If so, the module -+ will be called x1205-rtc -+ - endmenu -diff -urN linux-2.6.13.1/drivers/i2c/chips/Makefile nslu2-2.6.13.1/drivers/i2c/chips/Makefile ---- linux-2.6.13.1/drivers/i2c/chips/Makefile 2005-09-17 12:42:33.000000000 +0200 -+++ nslu2-2.6.13.1/drivers/i2c/chips/Makefile 2005-09-17 13:35:39.000000000 +0200 -@@ -13,6 +13,7 @@ - obj-$(CONFIG_SENSORS_RTC8564) += rtc8564.o - obj-$(CONFIG_ISP1301_OMAP) += isp1301_omap.o - obj-$(CONFIG_TPS65010) += tps65010.o -+obj-$(CONFIG_SENSORS_X1205) += x1205-rtc.o - - ifeq ($(CONFIG_I2C_DEBUG_CHIP),y) - EXTRA_CFLAGS += -DDEBUG -diff -urN linux-2.6.13.1/drivers/i2c/chips/x1205-rtc.c nslu2-2.6.13.1/drivers/i2c/chips/x1205-rtc.c ---- linux-2.6.13.1/drivers/i2c/chips/x1205-rtc.c 1970-01-01 01:00:00.000000000 +0100 -+++ nslu2-2.6.13.1/drivers/i2c/chips/x1205-rtc.c 2005-09-17 13:51:03.000000000 +0200 -@@ -0,0 +1,547 @@ -+/* -+ x1205 - an 12c driver for the Xicor X1205 RTC -+ Copyright 2004 Karen Spearel -+ -+ please send all reports to: -+ kas11 at tampabay dot rr dot com -+ -+ based on linux/drivers/acron/char/pcf8583.h -+ Copyright (C) 2000 Russell King -+ -+ This program is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2 of the License, or -+ (at your option) any later version. -+ -+ This program is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ GNU General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with this program; if not, write to the Free Software -+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+*/ -+/* -+ -+ * i2c_adapter is the structure used to identify a physical i2c bus along -+ * with the access algorithms necessary to access it. -+ -+struct i2c_adapter { -+ struct module *owner; -+ unsigned int id; == is algo->id | hwdep.struct->id, for registered values see below -+ unsigned int class; -+ struct i2c_algorithm *algo; the algorithm to access the bus -+ void *algo_data; -+ -+ --- administration stuff. -+ int (*client_register)(struct i2c_client *); -+ int (*client_unregister)(struct i2c_client *); -+ -+ data fields that are valid for all devices -+ struct semaphore bus_lock; -+ struct semaphore clist_lock; -+ -+ int timeout; -+ int retries; -+ struct device dev; the adapter device -+ struct class_device class_dev; the class device -+ -+#ifdef CONFIG_PROC_FS -+ No need to set this when you initialize the adapter -+ int inode; -+#endif def CONFIG_PROC_FS -+ -+ int nr; -+ struct list_head clients; -+ struct list_head list; -+ char name[I2C_NAME_SIZE]; -+ struct completion dev_released; -+ struct completion class_dev_released; -+}; -+*/ -+ -+ -+/*========== Driver for the X1205 on the Linksys NSLU2 ==================*/ -+ -+#include <linux/init.h> -+#include <linux/i2c.h> -+#include <linux/slab.h> -+#include <linux/string.h> -+#include <linux/errno.h> -+#include <linux/bcd.h> -+#include <linux/rtc.h> -+#include <linux/fs.h> -+#include <linux/proc_fs.h> -+#include <linux/miscdevice.h> -+#include <linux/device.h> -+#include <asm/uaccess.h> -+#include <asm/system.h> -+#include <linux/moduleparam.h> -+ -+#define RTC_GETDAT |
