openslug-init(modprobe.conf),nslu2.conf: generate the correct ixp-eth alias, support le
authorJohn Bowler <jbowler@nslu2-linux.org>
Wed, 5 Oct 2005 18:15:38 +0000 (18:15 +0000)
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>
Wed, 5 Oct 2005 18:15:38 +0000 (18:15 +0000)
modprobe.conf is now machine generated to use the PROVIDER of virtual/ixp-eth
in place of a hard code module name - PREFERRED_PROVIDER_virtual/ixp-eth must
be specified to make this work, the configuration files have been updated
appropriate.  openslug-image now pulls in virtual/ixp-eth, not a specific
provider and uses the PREFERRED_PROVIDER of that module as the RDEPENDS.
nslu2.conf and ucslugc.conf have changes to support configuration of the build
endianness correctly - not fully functional because the flash read code still
needs word swapping on LE.

conf/distro/openslug.conf
conf/distro/ucslugc.conf
conf/machine/nslu2.conf
packages/meta/openslug-image.bb
packages/openslug-init/openslug-init-0.10/modprobe.conf
packages/openslug-init/openslug-init_0.10.bb

index bbccbf2..72c2397 100644 (file)
@@ -161,16 +161,28 @@ PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}gcc-initial:gcc-cross-initial"
 PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}gcc:gcc-cross"
 PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}g++:gcc-cross"
 
+# compiler/binary/library versions (unslung uses different ones so these
+# cannot be in nslu2.conf)
+PREFERRED_VERSION_binutils ?= "2.16"
+PREFERRED_VERSION_binutils-cross ?= "2.16"
+PREFERRED_VERSION_gcc-cross-initial ?= "3.4.4"
+PREFERRED_VERSION_gcc-cross ?= "3.4.4"
+PREFERRED_VERSION_gcc ?= "3.4.4"
+PREFERRED_VERSION_glibc ?= "2.3.5+cvs20050627"
+
 # Select the smallest provider of x11 libraries
 PREFERRED_PROVIDER_x11 ?= "diet-x11"
-CVSDATE_diet-xll ?= "20050930"
+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-rc2"
+PREFERRED_VERSION_openslug-kernel ?= "2.6.14-rc3"
 
+PREFERRED_PROVIDER_virtual/ixp-eth ?= "ixp425-eth"
 PREFERRED_VERSION_ixp4xx-csr ?= "1.4"
 PREFERRED_VERSION_ixp425-eth ?= "1.1"
+PREFERRED_VERSION_ixp-osal ?= "2.0"
+PREFERRED_VERSION_ixp400-eth ?= "1.4"
 
 PREFERRED_VERSION_nslu2-linksys-firmware ?= "2.3r29"
index c4db50c..fee0c0f 100644 (file)
@@ -10,12 +10,21 @@ DISTRO_VERSION = "3-beta"
 DISTRO_FEED = "unstable"
 DISTRO_TYPE ?= "beta"
 
+# Overridable settings
+#DANGER: overriding any of these builds something very different from the base
+# usclugc!
+UCSLUGC_OS ?= "linux-uclibc"
+UCSLUGC_INTERWORK ?= ":thumb-interwork"
+UCSLUGC_INSTRUCTION_SET ?= ":thumb"
+UCSLUGC_ARCH_TYPE ?= "b"
+
+# Target OS - uclibc or glibc(linux)
 TARGET_FPU = "soft"
-TARGET_OS = "linux-uclibc"
+TARGET_OS = "${UCSLUGC_OS}"
 
-# Select thumb-interwork and (TBD) thumb
-ARM_INTERWORK = ":thumb-interwork"
-ARM_INSTRUCTION_SET = ":thumb"
+# Select thumb-interwork and thumb
+ARM_INTERWORK = "${UCSLUGC_INTERWORK}"
+ARM_INSTRUCTION_SET = "${UCSLUGC_INSTRUCTION_SET}"
 
 USE_NLS ?= "no"
 USE_NLS_glib-2.0 = "yes"
@@ -26,6 +35,11 @@ INHERIT += " package_ipk debian"
 # present (ucslugc overrides take precedence).
 NSLU2_BASE_DISTRO = ":openslug"
 
+# The standard arch is big-endian - "b", set to "l" for a little-endian
+# build
+NSLU2_ARCH_TYPE = "${UCSLUGC_ARCH_TYPE}"
+TARGET_ARCH = "${@['arm', 'armeb'][bb.data.getVar('UCSLUGC_ARCH_TYPE', d, 1) == 'b']}"
+
 # We are building packages which are armvteb (big endian) for arm or thumbv5tb for
 # thumb instructions.  The PACKAGE_ARCH should reflect this because generated code
 # requires that instruction set support.
@@ -129,18 +143,28 @@ PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}gcc-initial:gcc-cross-initial"
 PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}gcc:gcc-cross"
 PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}g++:gcc-cross"
 
-# Select the smallest provider of x11 libraries
-PREFERRED_PROVIDER_x11 ?= "diet-x11"
-CVSDATE_diet-xll ?= "20050930"
+# compiler/binary/library versions (unslung uses different ones so these
+# cannot be in nslu2.conf)
+PREFERRED_VERSION_binutils ?= "2.16"
+PREFERRED_VERSION_binutils-cross ?= "2.16"
+PREFERRED_VERSION_gcc-cross-initial ?= "3.4.4"
+PREFERRED_VERSION_gcc-cross ?= "3.4.4"
+PREFERRED_VERSION_gcc ?= "3.4.4"
+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-rc2"
+PREFERRED_VERSION_openslug-kernel ?= "2.6.14-rc3"
 
+PREFERRED_PROVIDER_virtual/ixp-eth ?= "ixp425-eth"
 PREFERRED_VERSION_ixp4xx-csr ?= "1.4"
 PREFERRED_VERSION_ixp425-eth ?= "1.1"
+PREFERRED_VERSION_ixp-osal ?= "2.0"
+PREFERRED_VERSION_ixp400-eth ?= "1.4"
 
-PREFERRED_VERSION_samba ?= "3.0.14a"
+# Select the smallest provider of x11 libraries
+PREFERRED_PROVIDER_x11 ?= "diet-x11"
+CVSDATE_diet-x11 ?= "20051005"
 
-PREFERRED_VERSION_nslu2-linksys-firmware ?= "2.3r29"
+PREFERRED_VERSION_samba ?= "3.0.14a"
index 03af449..d22c3b5 100644 (file)
@@ -84,14 +84,16 @@ FULL_OPTIMIZATION = "-Os -fomit-frame-pointer -frename-registers \
 # lot of work, so has not yet been done.
 #NOTE: do *not* change this is a distro.conf, a lot of work is required
 # to get this fixed.
-TARGET_ARCH = "armeb"
+NSLU2_ARCH_TYPE = "b"
+TARGET_ARCH = "arme${NSLU2_ARCH_TYPE}"
+# To change to little endian see distro/ucslugc.conf
 
 # The list of valid architectures for thumb or arm on NSLU2.  The arm list is
 # derived from the architecture settings known to gcc, the thumb list is then
 # derived from that (only the 't' architectures of course).  Note: NSLU2 is
 # assumed to imply 'big-endian', though in fact this need not be the case.
-NSLU2_ARM_ARCHITECTURES = "armeb armv2b armv2ab armv3b armv3mb armv4b armv4tb armv5b armv5tb armv5eb armv5teb xscaleb"
-NSLU2_THUMB_ARCHITECTURES = "thumbeb thumbv4tb thumbv5tb"
+NSLU2_ARM_ARCHITECTURES = "${TARGET_ARCH} armv2${NSLU2_ARCH_TYPE} armv2a${NSLU2_ARCH_TYPE} armv3${NSLU2_ARCH_TYPE} armv3m${NSLU2_ARCH_TYPE} armv4${NSLU2_ARCH_TYPE} armv4t${NSLU2_ARCH_TYPE} armv5${NSLU2_ARCH_TYPE} armv5t${NSLU2_ARCH_TYPE} armv5e${NSLU2_ARCH_TYPE} armv5te${NSLU2_ARCH_TYPE} xscale${NSLU2_ARCH_TYPE}"
+NSLU2_THUMB_ARCHITECTURES = "thumbe${NSLU2_ARCH_TYPE} thumbv4t${NSLU2_ARCH_TYPE} thumbv5t${NSLU2_ARCH_TYPE}"
 
 # NOTE: this list contains just the things which rootfs_ipk.bbclass does not
 # add, rootfs_ipk.bbclass evaluates:
@@ -115,8 +117,8 @@ IPKG_ARCHS = "${@(lambda arch_thumb, arch_arm, is_arm, interwork: \
 # in the old system list).
 #NOTE: new distros with independent feeds are encouraged to fix this, the
 # variable NSLU2_PACKAGE_ARCH is provided for this purpose.
-PACKAGE_ARCH = "armeb"
-NSLU2_PACKAGE_ARCH = "${@['thumbv5tb', 'armv5teb'][bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) == '']}"
+PACKAGE_ARCH = "${TARGET_ARCH}"
+NSLU2_PACKAGE_ARCH = "${@['thumbv5t${NSLU2_ARCH_TYPE}', 'armv5te${NSLU2_ARCH_TYPE}'][bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) == '']}"
 
 #-------------------------------------------------------------------------------
 # Miscellany
index 4916711..177ce25 100644 (file)
@@ -1,4 +1,4 @@
-PR = "r13"
+PR = "r14"
 
 IMAGE_BASENAME = "openslug"
 
@@ -11,7 +11,7 @@ OPENSLUG_HIDDEN_PACKAGES = "ipkg-native ipkg-utils-native fakeroot-native ${PATC
 DEPENDS = "virtual/kernel base-files base-passwd \
         busybox dropbear hotplug-ng initscripts-openslug netbase \
         sysvinit tinylogin portmap \
-        ixp4xx-csr ixp425-eth openslug-init \
+        virtual/ixp-eth openslug-init \
        module-init-tools modutils-initscripts \
         ipkg-collateral ipkg ipkg-link diffutils \
        cpio findutils mtd-utils udev \
@@ -23,7 +23,7 @@ DEPENDS = "virtual/kernel base-files base-passwd \
 IPKG_INSTALL = "base-files base-passwd \
         busybox dropbear hotplug-ng initscripts-openslug netbase \
         update-modules sysvinit tinylogin portmap \
-        ixp4xx-csr ixp425-eth openslug-init \
+        ${PREFERRED_PROVIDER_virtual/ixp-eth} openslug-init \
        module-init-tools modutils-initscripts \
         ipkg-collateral ipkg ipkg-link diffutils \
        cpio findutils \
index 9ed8547..08482e8 100644 (file)
@@ -1,4 +1,3 @@
-# Add an alias for eth0 to ixp425_eth to cause the S40networking
-# init script to load the ixp425_eth driver on the frist boot
-alias eth0 ixp425_eth
-
+# Add an alias for eth0 to MODULE to cause the S40networking
+# init script to load the MODULE driver on the first boot
+alias eth0 MODULE
index e5665d4..fa85d9c 100644 (file)
@@ -3,7 +3,7 @@ SECTION = "console/network"
 LICENSE = "GPL"
 DEPENDS = "base-files devio"
 RDEPENDS = "busybox devio"
-PR = "r43"
+PR = "r44"
 
 SRC_URI = "file://linuxrc \
           file://boot/flash \
@@ -99,7 +99,9 @@ do_install() {
 
        # Configuration files
        install -m 0644 conffiles ${D}${sysconfdir}/default
-       install -m 0644 modprobe.conf ${D}${sysconfdir}/
+       # Change MODULE in modprobe.conf to the correct module name
+       rm -f ${D}${sysconfdir}/modprobe.conf
+       sed 's/MODULE/'"$(echo '${PREFERRED_PROVIDER_virtual/ixp-eth}'|sed 's/-/_/g')"'/g' modprobe.conf >${D}${sysconfdir}/modprobe.conf
 
        set +ex
 }