diff options
author | Denys Dmytriyenko <denis@denix.org> | 2009-03-17 14:32:59 -0400 |
---|---|---|
committer | Denys Dmytriyenko <denis@denix.org> | 2009-03-17 14:32:59 -0400 |
commit | 709c4d66e0b107ca606941b988bad717c0b45d9b (patch) | |
tree | 37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/apex | |
parent | fa6cd5a3b993f16c27de4ff82b42684516d433ba (diff) |
rename packages/ to recipes/ per earlier agreement
See links below for more details:
http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326
http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816
Signed-off-by: Denys Dmytriyenko <denis@denix.org>
Acked-by: Mike Westerhof <mwester@dls.net>
Acked-by: Philip Balister <philip@balister.org>
Acked-by: Khem Raj <raj.khem@gmail.com>
Acked-by: Marcin Juszkiewicz <hrw@openembedded.org>
Acked-by: Koen Kooi <koen@openembedded.org>
Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/apex')
-rw-r--r-- | recipes/apex/apex-env_1.5.14.bb | 24 | ||||
-rw-r--r-- | recipes/apex/apex-env_1.5.8.bb | 24 | ||||
-rw-r--r-- | recipes/apex/apex-nslu2-1.5.14/defconfig | 165 | ||||
-rw-r--r-- | recipes/apex/apex-nslu2-16mb-1.5.14/defconfig | 165 | ||||
-rw-r--r-- | recipes/apex/apex-nslu2-16mb_1.5.14.bb | 63 | ||||
-rw-r--r-- | recipes/apex/apex-nslu2_1.5.14.bb | 63 | ||||
-rw-r--r-- | recipes/apex/files/find-apex-partition.patch | 34 |
7 files changed, 538 insertions, 0 deletions
diff --git a/recipes/apex/apex-env_1.5.14.bb b/recipes/apex/apex-env_1.5.14.bb new file mode 100644 index 0000000000..e97522e5e9 --- /dev/null +++ b/recipes/apex/apex-env_1.5.14.bb @@ -0,0 +1,24 @@ +DESCRIPTION = "APEX Boot Loader Environment User Modification Tool" +SECTION = "misc" +PRIORITY = "optional" +HOMEPAGE = "http://wiki.buici.com/twiki/bin/view/Main/ApexBootloader" +LICENSE = "GPL" +PR = "r0" + +SRC_URI = "ftp://ftp.buici.com/pub/apex/apex-${PV}.tar.gz \ + file://find-apex-partition.patch;patch=1 \ + " +S = ${WORKDIR}/apex-${PV}/usr + +EXTRA_OEMAKE_append = " CROSS_COMPILE=${CROSS_DIR}/bin/${HOST_PREFIX}" + +oe_runmake() { + oenote make ${PARALLEL_MAKE} CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} "$@" + make ${PARALLEL_MAKE} LDFLAGS= CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} "$@" || die "oe_runmake failed" +} + +do_install() { + ${STRIP} ${S}/apex-env + install -d ${D}/${sbindir} + install -m 755 ${S}/apex-env ${D}/${sbindir} +} diff --git a/recipes/apex/apex-env_1.5.8.bb b/recipes/apex/apex-env_1.5.8.bb new file mode 100644 index 0000000000..a0e44346bb --- /dev/null +++ b/recipes/apex/apex-env_1.5.8.bb @@ -0,0 +1,24 @@ +DESCRIPTION = "APEX Boot Loader Environment User Modification Tool" +SECTION = "util" +PRIORITY = "optional" +HOMEPAGE = "http://wiki.buici.com/twiki/bin/view/Main/ApexBootloader" +LICENSE = "GPL" +PR = "r1" + +SRC_URI = "ftp://ftp.buici.com/pub/apex/apex-${PV}.tar.gz \ + file://find-apex-partition.patch;patch=1 \ + " +S = ${WORKDIR}/apex-${PV}/usr + +EXTRA_OEMAKE_append = " CROSS_COMPILE=${CROSS_DIR}/bin/${HOST_PREFIX}" + +oe_runmake() { + oenote make ${PARALLEL_MAKE} CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} "$@" + make ${PARALLEL_MAKE} LDFLAGS= CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} "$@" || die "oe_runmake failed" +} + +do_install() { + ${STRIP} ${S}/apex-env + install -d ${D}/${sbindir} + install -m 755 ${S}/apex-env ${D}/${sbindir} +} diff --git a/recipes/apex/apex-nslu2-1.5.14/defconfig b/recipes/apex/apex-nslu2-1.5.14/defconfig new file mode 100644 index 0000000000..264f8539fc --- /dev/null +++ b/recipes/apex/apex-nslu2-1.5.14/defconfig @@ -0,0 +1,165 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: +# Mon Dec 24 14:54:47 2007 +# +CONFIG_ARM=y +CONFIG_CPU_ARMV5=y +CONFIG_CPU_XSCALE=y +# CONFIG_ARCH_LH7952X is not set +# CONFIG_ARCH_LH7A40X is not set +CONFIG_ARCH_IXP42X=y +# CONFIG_ARCH_S3C2410 is not set +# CONFIG_ARCH_MX3 is not set +CONFIG_EXPERIMENTAL=y +# CONFIG_SMALL is not set + +# +# General Setup +# +CONFIG_TARGET_DESCRIPTION="SlugOS NSLU2 (bigendian)" +CONFIG_CROSS_COMPILE="" +CONFIG_AEABI=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +# CONFIG_CC_OPTIMIZE_FOR_SPEED is not set +# CONFIG_CC_NO_OPTIMIZATION is not set +CONFIG_STARTUP_UART=y +# CONFIG_DEBUG_LL is not set +CONFIG_SPINNER=y +CONFIG_ATAG=y +CONFIG_MMU=y +# CONFIG_FORCE_WRITETHROUGH_DCACHE is not set +CONFIG_DISABLE_MMU_AT_BOOT=y +# CONFIG_INTERRUPTS is not set +CONFIG_SDRAMBOOT_REPORT=y +CONFIG_STACK_SIZE=0x1000 +CONFIG_STACKLIMIT=y +# CONFIG_BOOTSTRAP_MEMTEST is not set +CONFIG_ATAG_PHYS=0x00000100 +CONFIG_ARCH_NUMBER=597 +CONFIG_APEX_VMA=0x00200000 +CONFIG_KERNEL_LMA=0x00008000 +# CONFIG_USE_RAMDISK is not set +CONFIG_SDRAM_BANK0=y +# CONFIG_SDRAM_BANK1 is not set +CONFIG_NOR_BUSWIDTH=16 +CONFIG_NOR_BANK0=y +CONFIG_NOR_BANK0_START=0x50000000 +CONFIG_NOR_BANK0_LENGTH=0x00800000 +CONFIG_MACH="ixp42x" +CONFIG_MACH_NSLU2=y +# CONFIG_MACH_NAS100D is not set +# CONFIG_MACH_DSMG600 is not set +# CONFIG_MACH_FSG3 is not set +# CONFIG_MACH_AVILA2347 is not set +# CONFIG_USER_DEFAULTENDIAN is not set +# CONFIG_USER_BIGENDIAN is not set +# CONFIG_USER_LITTLEENDIAN is not set + +# +# Platform Setup +# +CONFIG_SDRAM_BANK_LENGTH=0x02000000 +# CONFIG_DISABLE_SECOND_UART_INIT is not set +CONFIG_ARCH_IXP420=y + +# +# Commands +# +CONFIG_ALLHELP=y +CONFIG_ALPHABETIZE_COMMANDS=y +CONFIG_DEL_IS_BS=y +CONFIG_ANSI_KEYS=y +CONFIG_COMMAND_HISTORY=y +CONFIG_COMMAND_EDITING=y +# CONFIG_TIME_COMMANDS is not set +CONFIG_CMD_ALIAS=y +CONFIG_CMD_CHECKSUM=y +CONFIG_CMD_COPY=y +CONFIG_CMD_COMPARE=y +CONFIG_CMD_DRVINFO=y +CONFIG_CMD_DUMP=y +CONFIG_CMD_ENV=y +CONFIG_CMD_SETENV=y +CONFIG_CMD_ERASE=y +CONFIG_CMD_FILL=y +CONFIG_CMD_GO=y +CONFIG_CMD_INFO=y +# CONFIG_CMD_PAUSE is not set +CONFIG_CMD_WAIT=y +CONFIG_CMD_XRECEIVE=y +CONFIG_CMD_MEMLIMIT=y +CONFIG_CMD_MEMSCAN=y +CONFIG_CMD_MEMTEST=y + +# +# Generic Drivers +# +# CONFIG_DRIVER_FAT is not set +# CONFIG_DRIVER_EXT2 is not set +# CONFIG_DRIVER_JFFS2 is not set +CONFIG_DRIVER_FIS=y +CONFIG_DRIVER_FIS_BLOCKDEVICE="nor:0x7e0000+4k" +CONFIG_DRIVER_NOR_CFI=y +# CONFIG_DRIVER_NOR_CFI_NO_BUFFERED is not set +# CONFIG_DRIVER_NOR_CFI_USE_CACHE is not set +CONFIG_DRIVER_NOR_CFI_TYPE_INTEL=y +# CONFIG_DRIVER_NOR_CFI_TYPE_SPANSION is not set +# CONFIG_DRIVER_ONENAND is not set +# CONFIG_DRIVER_IXP4XX_NPE_ETH is not set +CONFIG_USES_NOR_CFI=y +CONFIG_USES_PATHNAME_PARSER=y +CONFIG_USES_IXP4XX_NPE_ETH=y + +# +# Environment +# +CONFIG_ENV=y +CONFIG_ENV_LINK=y +CONFIG_ENV_MUTABLE=y +CONFIG_ENV_REGION="nor:0x7c000+15k" +# CONFIG_ENV_SAVEATONCE is not set +CONFIG_ENV_CHECK_LEN=1024 +CONFIG_VARIATIONS=y +CONFIG_VARIATION_SUFFIX="-alt" +# CONFIG_NO_BOOTSTRAP is not set +CONFIG_NOR_BOOT=y +# CONFIG_NAND_BOOT is not set +# CONFIG_ONENAND_BOOT is not set +# CONFIG_COMPANION_EVT1_BOOT is not set +# CONFIG_COMPANION_EVT2_BOOT is not set + +# +# Default Startup +# +CONFIG_AUTOBOOT=y +CONFIG_AUTOBOOT_DELAY=10 +CONFIG_ENV_STARTUP_KERNEL_COPY=y +# CONFIG_ENV_REGION_KERNEL_SWAP is not set +CONFIG_ENV_STARTUP_PREFIX_P=y +CONFIG_ENV_STARTUP_PREFIX="sdram-init; memscan -u 0+256m" + +# +# Regions +# +CONFIG_ENV_REGION_KERNEL="fis://kernel" +CONFIG_ENV_REGION_KERNEL_ALT_P=y +CONFIG_ENV_REGION_KERNEL_ALT="fis://kernel" + +# +# Overrides +# +CONFIG_ENV_DEFAULT_CMDLINE_OVERRIDE=y +CONFIG_ENV_DEFAULT_CMDLINE="root=/dev/mtdblock4 rootfstype=jffs2 console=ttyS0,115200" +CONFIG_ENV_DEFAULT_CMDLINE_ALT_P=y +CONFIG_ENV_DEFAULT_CMDLINE_ALT="root=/dev/mtdblock4 rootfstype=jffs2 console=ttyS0,115200" +# CONFIG_ENV_DEFAULT_STARTUP_OVERRIDE is not set +# CONFIG_ENV_DEFAULT_STARTUP_ALT_P is not set +CONFIG_USES_NOR_BOOTFLASH=y +CONFIG_RELOCATE_SIMPLE=y +CONFIG_INLINE_PLATFORM_INITIALIZATION=y +CONFIG_INLINE_PLATFORM_INITIALIZATION_SDRAM_PRE_OVERRIDE=y +# CONFIG_BIGENDIAN is not set +# CONFIG_LITTLEENDIAN is not set +CONFIG_CLEAR_STACKS=y +CONFIG_ALIASES=y diff --git a/recipes/apex/apex-nslu2-16mb-1.5.14/defconfig b/recipes/apex/apex-nslu2-16mb-1.5.14/defconfig new file mode 100644 index 0000000000..11658813d5 --- /dev/null +++ b/recipes/apex/apex-nslu2-16mb-1.5.14/defconfig @@ -0,0 +1,165 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: +# Mon Dec 24 15:00:01 2007 +# +CONFIG_ARM=y +CONFIG_CPU_ARMV5=y +CONFIG_CPU_XSCALE=y +# CONFIG_ARCH_LH7952X is not set +# CONFIG_ARCH_LH7A40X is not set +CONFIG_ARCH_IXP42X=y +# CONFIG_ARCH_S3C2410 is not set +# CONFIG_ARCH_MX3 is not set +CONFIG_EXPERIMENTAL=y +# CONFIG_SMALL is not set + +# +# General Setup +# +CONFIG_TARGET_DESCRIPTION="SlugOS NSLU2/BE (16MiB Flash)" +CONFIG_CROSS_COMPILE="" +CONFIG_AEABI=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +# CONFIG_CC_OPTIMIZE_FOR_SPEED is not set +# CONFIG_CC_NO_OPTIMIZATION is not set +CONFIG_STARTUP_UART=y +# CONFIG_DEBUG_LL is not set +CONFIG_SPINNER=y +CONFIG_ATAG=y +CONFIG_MMU=y +# CONFIG_FORCE_WRITETHROUGH_DCACHE is not set +CONFIG_DISABLE_MMU_AT_BOOT=y +# CONFIG_INTERRUPTS is not set +CONFIG_SDRAMBOOT_REPORT=y +CONFIG_STACK_SIZE=0x1000 +CONFIG_STACKLIMIT=y +# CONFIG_BOOTSTRAP_MEMTEST is not set +CONFIG_ATAG_PHYS=0x00000100 +CONFIG_ARCH_NUMBER=597 +CONFIG_APEX_VMA=0x00200000 +CONFIG_KERNEL_LMA=0x00008000 +# CONFIG_USE_RAMDISK is not set +CONFIG_SDRAM_BANK0=y +# CONFIG_SDRAM_BANK1 is not set +CONFIG_NOR_BUSWIDTH=16 +CONFIG_NOR_BANK0=y +CONFIG_NOR_BANK0_START=0x50000000 +CONFIG_NOR_BANK0_LENGTH=0x01000000 +CONFIG_MACH="ixp42x" +CONFIG_MACH_NSLU2=y +# CONFIG_MACH_NAS100D is not set +# CONFIG_MACH_DSMG600 is not set +# CONFIG_MACH_FSG3 is not set +# CONFIG_MACH_AVILA2347 is not set +# CONFIG_USER_DEFAULTENDIAN is not set +# CONFIG_USER_BIGENDIAN is not set +# CONFIG_USER_LITTLEENDIAN is not set + +# +# Platform Setup +# +CONFIG_SDRAM_BANK_LENGTH=0x02000000 +# CONFIG_DISABLE_SECOND_UART_INIT is not set +CONFIG_ARCH_IXP420=y + +# +# Commands +# +CONFIG_ALLHELP=y +CONFIG_ALPHABETIZE_COMMANDS=y +CONFIG_DEL_IS_BS=y +CONFIG_ANSI_KEYS=y +CONFIG_COMMAND_HISTORY=y +CONFIG_COMMAND_EDITING=y +# CONFIG_TIME_COMMANDS is not set +CONFIG_CMD_ALIAS=y +CONFIG_CMD_CHECKSUM=y +CONFIG_CMD_COPY=y +CONFIG_CMD_COMPARE=y +CONFIG_CMD_DRVINFO=y +CONFIG_CMD_DUMP=y +CONFIG_CMD_ENV=y +CONFIG_CMD_SETENV=y +CONFIG_CMD_ERASE=y +CONFIG_CMD_FILL=y +CONFIG_CMD_GO=y +CONFIG_CMD_INFO=y +# CONFIG_CMD_PAUSE is not set +CONFIG_CMD_WAIT=y +CONFIG_CMD_XRECEIVE=y +CONFIG_CMD_MEMLIMIT=y +CONFIG_CMD_MEMSCAN=y +CONFIG_CMD_MEMTEST=y + +# +# Generic Drivers +# +# CONFIG_DRIVER_FAT is not set +# CONFIG_DRIVER_EXT2 is not set +# CONFIG_DRIVER_JFFS2 is not set +CONFIG_DRIVER_FIS=y +CONFIG_DRIVER_FIS_BLOCKDEVICE="nor:0xfe0000+4k" +CONFIG_DRIVER_NOR_CFI=y +# CONFIG_DRIVER_NOR_CFI_NO_BUFFERED is not set +# CONFIG_DRIVER_NOR_CFI_USE_CACHE is not set +CONFIG_DRIVER_NOR_CFI_TYPE_INTEL=y +# CONFIG_DRIVER_NOR_CFI_TYPE_SPANSION is not set +# CONFIG_DRIVER_ONENAND is not set +# CONFIG_DRIVER_IXP4XX_NPE_ETH is not set +CONFIG_USES_NOR_CFI=y +CONFIG_USES_PATHNAME_PARSER=y +CONFIG_USES_IXP4XX_NPE_ETH=y + +# +# Environment +# +CONFIG_ENV=y +CONFIG_ENV_LINK=y +CONFIG_ENV_MUTABLE=y +CONFIG_ENV_REGION="nor:0x7c000+15k" +# CONFIG_ENV_SAVEATONCE is not set +CONFIG_ENV_CHECK_LEN=1024 +CONFIG_VARIATIONS=y +CONFIG_VARIATION_SUFFIX="-alt" +# CONFIG_NO_BOOTSTRAP is not set +CONFIG_NOR_BOOT=y +# CONFIG_NAND_BOOT is not set +# CONFIG_ONENAND_BOOT is not set +# CONFIG_COMPANION_EVT1_BOOT is not set +# CONFIG_COMPANION_EVT2_BOOT is not set + +# +# Default Startup +# +CONFIG_AUTOBOOT=y +CONFIG_AUTOBOOT_DELAY=10 +CONFIG_ENV_STARTUP_KERNEL_COPY=y +# CONFIG_ENV_REGION_KERNEL_SWAP is not set +CONFIG_ENV_STARTUP_PREFIX_P=y +CONFIG_ENV_STARTUP_PREFIX="sdram-init; memscan -u 0+256m" + +# +# Regions +# +CONFIG_ENV_REGION_KERNEL="fis://kernel" +CONFIG_ENV_REGION_KERNEL_ALT_P=y +CONFIG_ENV_REGION_KERNEL_ALT="fis://kernel" + +# +# Overrides +# +CONFIG_ENV_DEFAULT_CMDLINE_OVERRIDE=y +CONFIG_ENV_DEFAULT_CMDLINE="root=/dev/mtdblock4 rootfstype=jffs2 console=ttyS0,115200" +CONFIG_ENV_DEFAULT_CMDLINE_ALT_P=y +CONFIG_ENV_DEFAULT_CMDLINE_ALT="root=/dev/mtdblock4 rootfstype=jffs2 console=ttyS0,115200" +# CONFIG_ENV_DEFAULT_STARTUP_OVERRIDE is not set +# CONFIG_ENV_DEFAULT_STARTUP_ALT_P is not set +CONFIG_USES_NOR_BOOTFLASH=y +CONFIG_RELOCATE_SIMPLE=y +CONFIG_INLINE_PLATFORM_INITIALIZATION=y +CONFIG_INLINE_PLATFORM_INITIALIZATION_SDRAM_PRE_OVERRIDE=y +# CONFIG_BIGENDIAN is not set +# CONFIG_LITTLEENDIAN is not set +CONFIG_CLEAR_STACKS=y +CONFIG_ALIASES=y diff --git a/recipes/apex/apex-nslu2-16mb_1.5.14.bb b/recipes/apex/apex-nslu2-16mb_1.5.14.bb new file mode 100644 index 0000000000..0ccf2eb5da --- /dev/null +++ b/recipes/apex/apex-nslu2-16mb_1.5.14.bb @@ -0,0 +1,63 @@ +DESCRIPTION = "APEX Boot Loader" +SECTION = "misc" +PRIORITY = "optional" +HOMEPAGE = "http://wiki.buici.com/twiki/bin/view/Main/ApexBootloader" +LICENSE = "GPL" +PR = "r2" + +SRC_URI = "ftp://ftp.buici.com/pub/apex/apex-${PV}.tar.gz \ + file://defconfig" +S = ${WORKDIR}/apex-${PV} + +CMDLINE_CONSOLE = "console=${@bb.data.getVar("KERNEL_CONSOLE",d,1) or "ttyS0"}" + +CMDLINE_ROOT ?= "root=/dev/mtdblock4 rootfstype=jffs2 rw" + +CMDLINE_DEBUG ?= "" + +EXTRA_OEMAKE_append = " CROSS_COMPILE=${CROSS_DIR}/bin/${HOST_PREFIX}" + +oe_runmake() { + oenote make ${PARALLEL_MAKE} CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} "$@" + make ${PARALLEL_MAKE} LDFLAGS= CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} "$@" || die "oe_runmake failed" +} + +# Set the correct CONFIG_USER_xxx_ENDIAN and CONFIG_CMDLINE at the head +# of the .config file and remove any settings in defconfig then append +# defconfig to .config +do_configure() { + rm -f ${S}/.config + . ${CONFIG_SITE} + if [ "x$ac_cv_c_bigendian" = "xyes" -o "x$ac_cv_c_littleendian" = "xno" ]; then + sed -e 's/.*CONFIG_USER_BIGENDIAN.*/CONFIG_USER_BIGENDIAN=y/' \ + -e 's/.*CONFIG_BIGENDIAN.*/CONFIG_BIGENDIAN=y/' \ + -e 's/.*CONFIG_TARGET_DESCRIPTION.*/CONFIG_TARGET_DESCRIPTION=\"OpenEmbedded NSLU2\/BE (16MiB Flash)\"/' \ + -e 's|CONFIG_ENV_DEFAULT_CMDLINE=|CONFIG_ENV_DEFAULT_CMDLINE=\"${CMDLINE_CONSOLE} ${CMDLINE_ROOT} ${CMDLINE_DEBUG}\"|' \ + -e 's|CONFIG_ENV_DEFAULT_CMDLINE_ALT=|CONFIG_ENV_DEFAULT_CMDLINE_ALT=\"${CMDLINE_CONSOLE} ${CMDLINE_ROOT} ${CMDLINE_DEBUG}\"|' \ + ${WORKDIR}/defconfig > ${S}/.config + elif [ "x$ac_cv_c_littleendian" = "xyes" -o "x$ac_cv_c_bigendian" = "xno" ]; then + sed -e 's/.*CONFIG_USER_LITTLEENDIAN.*/CONFIG_USER_LITTLEENDIAN=y/' \ + -e 's/.*CONFIG_LITTLEENDIAN.*/CONFIG_LITTLEENDIAN=y/' \ + -e 's/.*CONFIG_TARGET_DESCRIPTION.*/CONFIG_TARGET_DESCRIPTION=\"OpenEmbedded NSLU2\/LE (16MiB Flash)\"/' \ + -e 's|CONFIG_ENV_DEFAULT_CMDLINE=|CONFIG_ENV_DEFAULT_CMDLINE=\"${CMDLINE_CONSOLE} ${CMDLINE_ROOT} ${CMDLINE_DEBUG}\"|' \ + -e 's|CONFIG_ENV_DEFAULT_CMDLINE_ALT=|CONFIG_ENV_DEFAULT_CMDLINE_ALT=\"${CMDLINE_CONSOLE} ${CMDLINE_ROOT} ${CMDLINE_DEBUG}\"|' \ + ${WORKDIR}/defconfig > ${S}/.config + else + oefatal do_configure cannot determine endianess + fi + oe_runmake oldconfig +} + +DEPENDS += "devio-native" + +do_stage() { + install -d ${STAGING_LOADER_DIR} + . ${CONFIG_SITE} + if [ "x$ac_cv_c_bigendian" = "xyes" -o "x$ac_cv_c_littleendian" = "xno" ]; then + cp src/arch-arm/rom/apex.bin ${STAGING_LOADER_DIR}/apex-nslu2-16mb.bin + elif [ "x$ac_cv_c_littleendian" = "xyes" -o "x$ac_cv_c_bigendian" = "xno" ]; then + devio '<<'src/arch-arm/rom/apex.bin >${STAGING_LOADER_DIR}/apex-nslu2-16mb.bin 'xp $,4' + else + oefatal do_populate_staging cannot determine endianess + fi +} diff --git a/recipes/apex/apex-nslu2_1.5.14.bb b/recipes/apex/apex-nslu2_1.5.14.bb new file mode 100644 index 0000000000..5fae4553a0 --- /dev/null +++ b/recipes/apex/apex-nslu2_1.5.14.bb @@ -0,0 +1,63 @@ +DESCRIPTION = "APEX Boot Loader" +SECTION = "misc" +PRIORITY = "optional" +HOMEPAGE = "http://wiki.buici.com/twiki/bin/view/Main/ApexBootloader" +LICENSE = "GPL" +PR = "r2" + +SRC_URI = "ftp://ftp.buici.com/pub/apex/apex-${PV}.tar.gz \ + file://defconfig" +S = ${WORKDIR}/apex-${PV} + +CMDLINE_CONSOLE = "console=${@bb.data.getVar("KERNEL_CONSOLE",d,1) or "ttyS0"}" + +CMDLINE_ROOT ?= "root=/dev/mtdblock4 rootfstype=jffs2 rw" + +CMDLINE_DEBUG ?= "" + +EXTRA_OEMAKE_append = " CROSS_COMPILE=${CROSS_DIR}/bin/${HOST_PREFIX}" + +oe_runmake() { + oenote make ${PARALLEL_MAKE} CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} "$@" + make ${PARALLEL_MAKE} LDFLAGS= CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} "$@" || die "oe_runmake failed" +} + +# Set the correct CONFIG_USER_xxx_ENDIAN and CONFIG_CMDLINE at the head +# of the .config file and remove any settings in defconfig then append +# defconfig to .config +do_configure() { + rm -f ${S}/.config + . ${CONFIG_SITE} + if [ "x$ac_cv_c_bigendian" = "xyes" -o "x$ac_cv_c_littleendian" = "xno" ]; then + sed -e 's/.*CONFIG_USER_BIGENDIAN.*/CONFIG_USER_BIGENDIAN=y/' \ + -e 's/.*CONFIG_BIGENDIAN.*/CONFIG_BIGENDIAN=y/' \ + -e 's/.*CONFIG_TARGET_DESCRIPTION.*/CONFIG_TARGET_DESCRIPTION=\"OpenEmbedded NSLU2\/BE (8MiB Flash)\"/' \ + -e 's|CONFIG_ENV_DEFAULT_CMDLINE=|CONFIG_ENV_DEFAULT_CMDLINE=\"${CMDLINE_CONSOLE} ${CMDLINE_ROOT} ${CMDLINE_DEBUG}\"|' \ + -e 's|CONFIG_ENV_DEFAULT_CMDLINE_ALT=|CONFIG_ENV_DEFAULT_CMDLINE_ALT=\"${CMDLINE_CONSOLE} ${CMDLINE_ROOT} ${CMDLINE_DEBUG}\"|' \ + ${WORKDIR}/defconfig > ${S}/.config + elif [ "x$ac_cv_c_littleendian" = "xyes" -o "x$ac_cv_c_bigendian" = "xno" ]; then + sed -e 's/.*CONFIG_USER_LITTLEENDIAN.*/CONFIG_USER_LITTLEENDIAN=y/' \ + -e 's/.*CONFIG_LITTLEENDIAN.*/CONFIG_LITTLEENDIAN=y/' \ + -e 's/.*CONFIG_TARGET_DESCRIPTION.*/CONFIG_TARGET_DESCRIPTION=\"OpenEmbedded NSLU2\/LE (8MiB Flash)\"/' \ + -e 's|CONFIG_ENV_DEFAULT_CMDLINE=|CONFIG_ENV_DEFAULT_CMDLINE=\"${CMDLINE_CONSOLE} ${CMDLINE_ROOT} ${CMDLINE_DEBUG}\"|' \ + -e 's|CONFIG_ENV_DEFAULT_CMDLINE_ALT=|CONFIG_ENV_DEFAULT_CMDLINE_ALT=\"${CMDLINE_CONSOLE} ${CMDLINE_ROOT} ${CMDLINE_DEBUG}\"|' \ + ${WORKDIR}/defconfig > ${S}/.config + else + oefatal do_configure cannot determine endianess + fi + oe_runmake oldconfig +} + +DEPENDS += "devio-native" + +do_stage() { + install -d ${STAGING_LOADER_DIR} + . ${CONFIG_SITE} + if [ "x$ac_cv_c_bigendian" = "xyes" -o "x$ac_cv_c_littleendian" = "xno" ]; then + cp src/arch-arm/rom/apex.bin ${STAGING_LOADER_DIR}/apex-nslu2.bin + elif [ "x$ac_cv_c_littleendian" = "xyes" -o "x$ac_cv_c_bigendian" = "xno" ]; then + devio '<<'src/arch-arm/rom/apex.bin >${STAGING_LOADER_DIR}/apex-nslu2.bin 'xp $,4' + else + oefatal do_populate_staging cannot determine endianess + fi +} diff --git a/recipes/apex/files/find-apex-partition.patch b/recipes/apex/files/find-apex-partition.patch new file mode 100644 index 0000000000..3aa62a186a --- /dev/null +++ b/recipes/apex/files/find-apex-partition.patch @@ -0,0 +1,34 @@ +*** usr/link.cc.orig Sun Dec 23 20:31:49 2007 +--- usr/link.cc Sun Dec 23 20:32:46 2007 +*************** +*** 278,285 **** + fixed-up env_link structure, scanning for the environment variables + and their defaults, and opening the flash instance of the + environment. It first looks for the "Loader" partition. If there +! is none, it uses the first partition with the assumption that APEX +! may be the primary boot loader. + + */ + +--- 278,286 ---- + fixed-up env_link structure, scanning for the environment variables + and their defaults, and opening the flash instance of the + environment. It first looks for the "Loader" partition. If there +! is none, it then looks for the "apex" partition. If there is none, +! it uses the first partition with the assumption that APEX may be +! the primary boot loader. + + */ + +*************** +*** 289,294 **** +--- 290,298 ---- + MTDPartition mtd = MTDPartition::find ("Loader"); + + if (!mtd.is ()) ++ mtd = MTDPartition::find ("apex"); ++ ++ if (!mtd.is ()) + mtd = MTDPartition::first (); + + bool fFound = mtd.is () && open_apex (mtd); |