openslug-kernel: cleanup, move to 2.6.14-rc4
authorJohn Bowler <jbowler@nslu2-linux.org>
Thu, 20 Oct 2005 04:47:57 +0000 (04:47 +0000)
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>
Thu, 20 Oct 2005 04:47:57 +0000 (04:47 +0000)
  - potentially optional parts of openslug-image can now be removed
  - removed 2.6.14-rc2
  - moved to 2.6.14-rc4
  - added RedBoot FIS Directory automagic byte swap

13 files changed:
conf/distro/openslug.conf
conf/distro/ucslugc.conf
packages/linux/nslu2-kernel.inc
packages/linux/nslu2-kernel/2.6.14/10-mtdpart-redboot-fis-byteswap.patch [new file with mode: 0644]
packages/linux/nslu2-kernel/2.6.14/defconfig
packages/linux/nslu2-kernel_2.6.14-rc4.bb [new file with mode: 0644]
packages/linux/openslug-kernel-2.6.14-rc4/.mtn2git_empty [moved from packages/linux/openslug-kernel-2.6.14-rc2/.mtn2git_empty with 100% similarity]
packages/linux/openslug-kernel-2.6.14-rc4/README [moved from packages/linux/openslug-kernel-2.6.14-rc2/README with 100% similarity]
packages/linux/openslug-kernel-2.6.14-rc4/defconfig [moved from packages/linux/openslug-kernel-2.6.14-rc2/defconfig with 98% similarity]
packages/linux/openslug-kernel_2.6.14-rc4.bb [moved from packages/linux/openslug-kernel_2.6.14-rc2.bb with 94% similarity]
packages/meta/openslug-image.bb
packages/meta/openslug-packages.bb
packages/meta/ucslugc-packages.bb

index 72c2397..5755fa0 100644 (file)
@@ -108,7 +108,7 @@ OPENSLUG_STANDARD_RDEPENDS += "udev"
 # The 'standard' values are the defaults for the 'extra' packages added
 # to the firmware image.  None of these things are requirements to have
 # a bootable, useable, system however they *are* expected to be present
-# in OpenSlug - see osuclibc for a more minimal configuration and some
+# in OpenSlug - see ucslugc for a more minimal configuration and some
 # more instructions about how to make a non-openslug image.
 OPENSLUG_EXTRA_DEPENDS  ?= "${OPENSLUG_STANDARD_DEPENDS}"
 OPENSLUG_EXTRA_RDEPENDS ?= "${OPENSLUG_STANDARD_RDEPENDS}"
@@ -177,7 +177,7 @@ CVSDATE_diet-x11 ?= "20051005"
 # Select the correct versions of the kernel and modules
 PREFERRED_PROVIDER_virtual/kernel ?= "openslug-kernel"
 PREFERRED_PROVIDERS += "virtual/${TARGET_PREFIX}depmod:module-init-tools-cross"
-PREFERRED_VERSION_openslug-kernel ?= "2.6.14-rc3"
+PREFERRED_VERSION_openslug-kernel ?= "2.6.14-rc4"
 
 PREFERRED_PROVIDER_virtual/ixp-eth ?= "ixp425-eth"
 PREFERRED_VERSION_ixp4xx-csr ?= "1.4"
index e155df4..730a6ae 100644 (file)
@@ -156,7 +156,7 @@ PREFERRED_VERSION_glibc ?= "2.3.5+cvs20050627"
 # Select the correct versions of the kernel and modules
 PREFERRED_PROVIDER_virtual/kernel ?= "openslug-kernel"
 PREFERRED_PROVIDERS += "virtual/${TARGET_PREFIX}depmod:module-init-tools-cross"
-PREFERRED_VERSION_openslug-kernel ?= "2.6.14-rc3"
+PREFERRED_VERSION_openslug-kernel ?= "2.6.14-rc4"
 
 PREFERRED_PROVIDER_virtual/ixp-eth ?= "ixp425-eth"
 PREFERRED_VERSION_ixp4xx-csr ?= "1.4"
index d55d05f..6b5167e 100644 (file)
@@ -260,6 +260,7 @@ do_configure_prepend() {
 #    e3a01c02 e3811055
 # 2) For LE kernels it is necessary to prefix change-to-le code to the kernel image:
 #    ee110f10 e3c00080 ee010f10
+#    and to byte swap the (LE) image to match the BE flash layout
 #
 # The argument to the function is the destination directory
 redboot_fixup_armeb() {
@@ -274,12 +275,17 @@ redboot_fixup_armeb() {
 redboot_fixup_arm() {
        rm -f "$1".new
        devio '<<arch/${ARCH}/boot/${KERNEL_IMAGETYPE}' >"$1".new \
-               'wl 0xe3a01c02,4' \
-               'wl 0xe3811055,4' \
-               'wl 0xee110f10,4' \
-               'wl 0xe3c00080,4' \
-               'wl 0xee010f10,4' \
-               'cp$'
+               'wb 0xe3a01c02,4' \
+               'wb 0xe3811055,4' \
+               'wb 0xee110f10,4' \
+               'wb 0xe3c00080,4' \
+               'wb 0xee010f10,4' \
+               'A= $' \
+               '$( A3>; wb l,4; A= A4-; $) A3>' \
+               '$( A0>; !! 1; $) 0' || {
+               echo 'arch/${ARCH}/boot/${KERNEL_IMAGETYPE}: bad zImage length (not a multiple of 4)' >&2
+               return 1
+       }
        mv "$1".new "$1"
 }
 
diff --git a/packages/linux/nslu2-kernel/2.6.14/10-mtdpart-redboot-fis-byteswap.patch b/packages/linux/nslu2-kernel/2.6.14/10-mtdpart-redboot-fis-byteswap.patch
new file mode 100644 (file)
index 0000000..c5e322c
--- /dev/null
@@ -0,0 +1,42 @@
+On IXP4XX systems the FIS directory is big endian even with a little
+endian kernel.  This patch recognises the FIS directory on such a
+system and byte swaps it to obtain a valid table based on the 'size'
+field of the FIS directory (the size field is know to always match the
+erase block size on such systems, and probably all systems.)
+
+--- linux-2.6.13/drivers/mtd/redboot.c.orig    2005-10-19 17:14:19.304956677 -0700
++++ linux-2.6.13/drivers/mtd/redboot.c 2005-10-19 17:48:16.457146582 -0700
+@@ -89,8 +89,32 @@
+                       i = numslots;
+                       break;
+               }
+-              if (!memcmp(buf[i].name, "FIS directory", 14))
++              if (!memcmp(buf[i].name, "FIS directory", 14)) {
++                      /* This is apparently the FIS directory entry for the
++                       * FIS directory itself.  The FIS directory size is
++                       * one erase block, if the buf[i].size field is
++                       * swab32(erasesize) then we know we are looking at
++                       * a byte swapped FIS directory - swap all the entries!
++                       * (NOTE: this is 'size' not 'data_length', size is
++                       * the full size of the entry.)
++                       */
++                      if (swab32(buf[i].size) == master->erasesize) {
++                              int j;
++                              for (j = 0; j < numslots && buf[j].name[0] != 0xff; ++j) {
++                                      /* The unsigned long fields were written with the
++                                       * wrong byte sex, name and pad have no byte sex.
++                                       */
++                                      swab32s(&buf[j].flash_base);
++                                      swab32s(&buf[j].mem_base);
++                                      swab32s(&buf[j].size);
++                                      swab32s(&buf[j].entry_point);
++                                      swab32s(&buf[j].data_length);
++                                      swab32s(&buf[j].desc_cksum);
++                                      swab32s(&buf[j].file_cksum);
++                              }
++                      }
+                       break;
++              }
+       }
+       if (i == numslots) {
+               /* Didn't find it */
index 7826182..3a6c777 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.14-rc3
-# Fri Oct  7 19:32:33 2005
+# Linux kernel version: 2.6.14-rc4
+# Tue Oct 18 21:53:12 2005
 #
 CONFIG_ARM=y
 CONFIG_MMU=y
@@ -559,6 +559,7 @@ CONFIG_SCSI_MULTI_LUN=y
 # CONFIG_SCSI_DPT_I2O is not set
 # CONFIG_MEGARAID_NEWGEN is not set
 # CONFIG_MEGARAID_LEGACY is not set
+# CONFIG_MEGARAID_SAS is not set
 # CONFIG_SCSI_SATA is not set
 # CONFIG_SCSI_BUSLOGIC is not set
 # CONFIG_SCSI_DMX3191D is not set
diff --git a/packages/linux/nslu2-kernel_2.6.14-rc4.bb b/packages/linux/nslu2-kernel_2.6.14-rc4.bb
new file mode 100644 (file)
index 0000000..5633f42
--- /dev/null
@@ -0,0 +1,44 @@
+# Kernel for NSLU2
+#
+# Increment PR_CONFIG for changes to the nslu2-kernel specific
+# defconfig (do *NOT* increment anything in here for changes
+# to other kernel configs!)
+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}"
+
+include nslu2-kernel.inc
+
+# 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
+#   ${N2K_EXTRA_PATCHES}
+#
+# There are no added files no more.
+N2K_FILES = ""
+
+N2K_PATCHES = "\
+       file://10-ixp4xx-copy-from.patch;patch=1 \
+       file://10-mtdpart-redboot-fis-byteswap.patch;patch=1 \
+       file://15-ixp4xx-writesb-l-w.patch;patch=1 \
+       file://20-timer.patch;patch=1 \
+       file://25-nslu2-arch-reset.patch;patch=1 \
+       file://30-i2c-x1205.patch;patch=1 \
+       file://50-nslu2-arch.patch;patch=1 \
+       file://50-nslu2-general.patch;patch=1 \
+       file://60-nslu2-beeper.patch;patch=1 \
+       file://90-ixp4xx-pci-le.patch;patch=1 \
+       file://anonymiser.patch;patch=1 \
+"
+
+# These options get added to the kernel command line, only put things
+# specific to the bootstrap of *this* kernel in here - DISTRO specfic
+# config must be in CMDLINE_ROOT (see the full definition of CMDLINE
+# in nslu2-kernel.inc)
+CMDLINE_KERNEL_OPTIONS = "x1205.hctosys=1"
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.14-rc2
-# Sat Sep 24 16:19:17 2005
+# Linux kernel version: 2.6.14-rc4
+# Tue Oct 18 21:53:12 2005
 #
 CONFIG_ARM=y
 CONFIG_MMU=y
@@ -121,7 +121,7 @@ CONFIG_CPU_TLB_V4WBI=y
 # Processor Features
 #
 CONFIG_ARM_THUMB=y
-CONFIG_CPU_BIG_ENDIAN=y
+# CONFIG_CPU_BIG_ENDIAN is not set
 CONFIG_XSCALE_PMU=y
 CONFIG_DMABOUNCE=y
 
@@ -150,6 +150,7 @@ CONFIG_FLATMEM_MANUAL=y
 CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
+# CONFIG_LEDS is not set
 CONFIG_ALIGNMENT_TRAP=y
 
 #
@@ -168,6 +169,7 @@ CONFIG_CMDLINE="root=/dev/mtdblock4 rw rootfstype=jffs2 mem=32M@0x00000000 init=
 # At least one emulation must be selected
 #
 CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
 # CONFIG_FPE_FASTFPE is not set
 
 #
@@ -278,6 +280,7 @@ CONFIG_IP_NF_FILTER=m
 CONFIG_IP_NF_TARGET_LOG=m
 CONFIG_IP_NF_TARGET_ULOG=m
 CONFIG_IP_NF_TARGET_TCPMSS=m
+# CONFIG_IP_NF_TARGET_NFQUEUE is not set
 CONFIG_IP_NF_NAT=m
 CONFIG_IP_NF_NAT_NEEDED=y
 CONFIG_IP_NF_TARGET_MASQUERADE=m
@@ -304,6 +307,7 @@ CONFIG_IP_NF_TARGET_CLASSIFY=m
 #
 # CONFIG_IP6_NF_QUEUE is not set
 # CONFIG_IP6_NF_IPTABLES is not set
+# CONFIG_IP6_NF_TARGET_NFQUEUE is not set
 
 #
 # Bridge: Netfilter Configuration
@@ -390,7 +394,7 @@ CONFIG_MTD_REDBOOT_PARTS=y
 CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
 # CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
 # CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
-CONFIG_MTD_CMDLINE_PARTS=y
+# CONFIG_MTD_CMDLINE_PARTS is not set
 # CONFIG_MTD_AFS_PARTS is not set
 
 #
@@ -408,10 +412,14 @@ CONFIG_MTD_BLOCK=y
 CONFIG_MTD_CFI=y
 # CONFIG_MTD_JEDECPROBE is not set
 CONFIG_MTD_GEN_PROBE=y
-# CONFIG_MTD_CFI_ADV_OPTIONS is not set
-CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_CFI_ADV_OPTIONS=y
+# CONFIG_MTD_CFI_NOSWAP is not set
+CONFIG_MTD_CFI_BE_BYTE_SWAP=y
+# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
+CONFIG_MTD_CFI_GEOMETRY=y
+# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set
 CONFIG_MTD_MAP_BANK_WIDTH_2=y
-CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_4 is not set
 # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
 # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
 # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
@@ -419,6 +427,7 @@ CONFIG_MTD_CFI_I1=y
 CONFIG_MTD_CFI_I2=y
 # CONFIG_MTD_CFI_I4 is not set
 # CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_OTP is not set
 CONFIG_MTD_CFI_INTELEXT=y
 # CONFIG_MTD_CFI_AMDSTD is not set
 # CONFIG_MTD_CFI_STAA is not set
@@ -550,6 +559,7 @@ CONFIG_SCSI_MULTI_LUN=y
 # CONFIG_SCSI_DPT_I2O is not set
 # CONFIG_MEGARAID_NEWGEN is not set
 # CONFIG_MEGARAID_LEGACY is not set
+# CONFIG_MEGARAID_SAS is not set
 # CONFIG_SCSI_SATA is not set
 # CONFIG_SCSI_BUSLOGIC is not set
 # CONFIG_SCSI_DMX3191D is not set
@@ -602,6 +612,7 @@ CONFIG_BLK_DEV_DM=m
 # CONFIG_FUSION is not set
 # CONFIG_FUSION_SPI is not set
 # CONFIG_FUSION_FC is not set
+# CONFIG_FUSION_SAS is not set
 
 #
 # IEEE 1394 (FireWire) support
@@ -639,6 +650,7 @@ CONFIG_NET_ETHERNET=y
 CONFIG_MII=y
 # CONFIG_HAPPYMEAL is not set
 # CONFIG_SUNGEM is not set
+# CONFIG_CASSINI is not set
 # CONFIG_NET_VENDOR_3COM is not set
 # CONFIG_SMC91X is not set
 # CONFIG_DM9000 is not set
similarity index 94%
rename from packages/linux/openslug-kernel_2.6.14-rc2.bb
rename to packages/linux/openslug-kernel_2.6.14-rc4.bb
index 36010dd..b30d767 100644 (file)
@@ -5,4 +5,4 @@
 include nslu2-kernel_${PV}.bb
 # Increment the following if the openslug-kernel defconfig is
 # changed.
-PR_CONFIG = "1"
+PR_CONFIG = "0"
index 177ce25..e351d3b 100644 (file)
@@ -1,35 +1,47 @@
-PR = "r14"
+# This describes a generic NSLU2 image, even though the bb file is
+# called 'openslug-image.bb' the OpenSlug specific configuration is
+# done in conf/distro/openslug.conf
+#
+PR = "r15"
 
 IMAGE_BASENAME = "openslug"
 
 IMAGE_LINGUAS = ""
+# Setting USE_DEVFS prevents *any* entries being created initially
+# in /dev
 USE_DEVFS = "1"
 
-OPENSLUG_HIDDEN_PACKAGES = "ipkg-native ipkg-utils-native fakeroot-native ${PATCH_DEPENDS} virtual/armeb-linux-uclibc-gcc \
-       virtual/libc makedevs-native mtd-utils-native slugimage-native nslu2-linksys-firmware "
+# diff, cpio and find are required for reflash and turnup ram.
+# Removing these probably leaves the system bootable, but standard
+# openslug and ucslugc stuff won't work, so only take these out in
+# very non-standard turnkey ucslugc builds.
+OPENSLUG_SUPPORT ?= "diffutils cpio findutils"
 
+# NOTE: file system kernel modules are defined in openslug.conf
+# (OPENSLUG_EXTRA_FILESYSTEMS, included in OPENSLUG_EXTRA_INSTALL)
+# kernel-module-af-packet must be in the image for DHCP to work
+OPENSLUG_KERNEL ?= "kernel-module-af-packet kernel-module-netconsole"
+       
+# The things explicitly included in the following lists are the
+# absolute minimum to have any chance of a bootable system.
 DEPENDS = "virtual/kernel base-files base-passwd \
         busybox dropbear hotplug-ng initscripts-openslug netbase \
         sysvinit tinylogin portmap \
         virtual/ixp-eth openslug-init \
        module-init-tools modutils-initscripts \
-        ipkg-collateral ipkg ipkg-link diffutils \
-       cpio findutils mtd-utils udev \
+        ipkg-collateral ipkg ipkg-link \
+       ${OPENSLUG_SUPPORT} \
         ${OPENSLUG_EXTRA_DEPENDS}"
 
-# NOTE: file system kernel modules are defined in openslug.conf
-# (OPENSLUG_EXTRA_FILESYSTEMS, included in OPENSLUG_EXTRA_INSTALL)
-# kernel-module-af-packet must be in the image for DHCP to work
 IPKG_INSTALL = "base-files base-passwd \
         busybox dropbear hotplug-ng initscripts-openslug netbase \
         update-modules sysvinit tinylogin portmap \
         ${PREFERRED_PROVIDER_virtual/ixp-eth} openslug-init \
        module-init-tools modutils-initscripts \
-        ipkg-collateral ipkg ipkg-link diffutils \
-       cpio findutils \
-       kernel-module-af-packet \
-       kernel-module-netconsole \
-        ${OPENSLUG_EXTRA_INSTALL}"
+        ipkg-collateral ipkg ipkg-link \
+       ${OPENSLUG_SUPPORT} \
+       ${OPENSLUG_KERNEL} \
+       ${OPENSLUG_EXTRA_INSTALL}"
 
 inherit image_ipk
 
index ca22879..dc7564b 100644 (file)
@@ -74,6 +74,7 @@ OPENSLUG_PACKAGES = "\
        minicom \
        monotone-5 \
        mpd \
+       mtd-utils \
        mt-daapd \
        mutt \
        mysql \
index 5d250f4..b551155 100644 (file)
@@ -90,6 +90,7 @@ UCSLUGC_PACKAGES = "\
        miau \ 
        microcom \
        mpd \
+       mtd-utils \
        mt-daapd \
        mutt \
        nail \