summaryrefslogtreecommitdiff
path: root/recipes-bsp
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2012-06-03 23:52:07 +0200
committerMax Krummenacher <max.krummenacher@toradex.com>2012-06-03 23:52:07 +0200
commit608f39d17b0ca68d92a7dd161a83641876b3065c (patch)
treebf359c6c0bc21ae6d5ab205be842255432b0ee63 /recipes-bsp
parentdff3446ed548fcfcf8909ac83045dec7cf0e0e2e (diff)
u-boot base from meta instead of a copy from meta-ti
fix u-boot to no longer fail at runtime, (write beyond array)
Diffstat (limited to 'recipes-bsp')
-rw-r--r--recipes-bsp/u-boot/files/board_stackcorruption_workaround.patch67
-rw-r--r--recipes-bsp/u-boot/files/bootaddr.patch (renamed from recipes-bsp/u-boot/u-boot-git/bootaddr.patch)0
-rw-r--r--recipes-bsp/u-boot/files/colibri_t30.patch (renamed from recipes-bsp/u-boot/u-boot-git/colibri_t30.patch)0
-rw-r--r--recipes-bsp/u-boot/files/remove-overlay.patch (renamed from recipes-bsp/u-boot/u-boot-git/remove-overlay.patch)0
-rw-r--r--recipes-bsp/u-boot/files/remove-unused.patch (renamed from recipes-bsp/u-boot/u-boot-git/remove-unused.patch)0
-rw-r--r--recipes-bsp/u-boot/files/tegra2-nand-warning.patch (renamed from recipes-bsp/u-boot/u-boot-git/tegra2-nand-warning.patch)0
-rw-r--r--recipes-bsp/u-boot/files/u-boot-board-unused.patch (renamed from recipes-bsp/u-boot/u-boot-git/u-boot-board-unused.patch)0
-rw-r--r--recipes-bsp/u-boot/files/u-boot-userspacetools.patch (renamed from recipes-bsp/u-boot/u-boot-git/u-boot-userspacetools.patch)0
-rw-r--r--recipes-bsp/u-boot/files/u-boot-warning.patch (renamed from recipes-bsp/u-boot/u-boot-git/u-boot-warning.patch)0
-rw-r--r--recipes-bsp/u-boot/files/u-boot_ap20warning.patch (renamed from recipes-bsp/u-boot/u-boot-git/u-boot_ap20warning.patch)0
-rw-r--r--recipes-bsp/u-boot/u-boot.inc68
-rw-r--r--recipes-bsp/u-boot/u-boot_2011.06.bbappend (renamed from recipes-bsp/u-boot/u-boot_git.bbappend)28
-rw-r--r--recipes-bsp/u-boot/u-boot_git.bb61
13 files changed, 78 insertions, 146 deletions
diff --git a/recipes-bsp/u-boot/files/board_stackcorruption_workaround.patch b/recipes-bsp/u-boot/files/board_stackcorruption_workaround.patch
new file mode 100644
index 0000000..c2258e9
--- /dev/null
+++ b/recipes-bsp/u-boot/files/board_stackcorruption_workaround.patch
@@ -0,0 +1,67 @@
+--- git/board/toradex/common/board.c 2012-06-02 21:16:34.000000000 +0200
++++ git/board/toradex/common/board.c 2012-06-03 19:04:03.000000000 +0200
+@@ -263,9 +271,7 @@
+ };
+
+ #ifdef BOARD_LATE_INIT
+-#ifdef CONFIG_TRDX_CFG_BLOCK_OFFSET
+-static unsigned char *config_block;
+-#endif
++static unsigned char *config_block = NULL;
+ #endif
+
+ #ifdef CONFIG_HW_WATCHDOG
+@@ -504,7 +510,8 @@
+ #ifdef BOARD_LATE_INIT
+ int board_late_init(void)
+ {
+- char env_str[64];
++ char env_str[256 ];
++
+ #ifdef CONFIG_TRDX_CFG_BLOCK_OFFSET
+ int do_saveenv = 0;
+ char *addr_str, *end;
+@@ -517,6 +524,9 @@
+ unsigned char toradex_oui[3] = { 0x00, 0x14, 0x2d };
+ int valid = 0;
+
++ unsigned int offset;
++ int ret;
++
+ /* Allocate RAM area for config block */
+ config_block = malloc(size);
+ if (!config_block) {
+@@ -525,9 +535,6 @@
+ }
+
+ for (i = 0; i < 2; i++) {
+- unsigned int offset;
+- int ret;
+-
+ if (i == 0)
+ offset = CONFIG_TRDX_CFG_BLOCK_OFFSET;
+ else
+@@ -699,6 +706,10 @@
+ unsigned short major = 0, minor = 0, release = 0;
+ size_t size = 4096;
+
++ if(config_block == NULL) {
++ return 0;
++ }
++
+ /* Parse revision information in config block */
+ for (i = 0; i < (size - 8); i++) {
+ if (config_block[i] == 0x02 && config_block[i+1] == 0x40 &&
+@@ -731,6 +742,12 @@
+ unsigned int serial = 0;
+ unsigned int serial_offset = 11;
+
++ if(config_block == NULL) {
++ serialnr->low = 0;
++ serialnr->high = 0;
++ return;
++ }
++
+ /* Get MAC address from config block */
+ memcpy(&serial, config_block + serial_offset, 3);
+ serial = ntohl(serial);
diff --git a/recipes-bsp/u-boot/u-boot-git/bootaddr.patch b/recipes-bsp/u-boot/files/bootaddr.patch
index d452b61..d452b61 100644
--- a/recipes-bsp/u-boot/u-boot-git/bootaddr.patch
+++ b/recipes-bsp/u-boot/files/bootaddr.patch
diff --git a/recipes-bsp/u-boot/u-boot-git/colibri_t30.patch b/recipes-bsp/u-boot/files/colibri_t30.patch
index 485a28f..485a28f 100644
--- a/recipes-bsp/u-boot/u-boot-git/colibri_t30.patch
+++ b/recipes-bsp/u-boot/files/colibri_t30.patch
diff --git a/recipes-bsp/u-boot/u-boot-git/remove-overlay.patch b/recipes-bsp/u-boot/files/remove-overlay.patch
index dfd9ba3..dfd9ba3 100644
--- a/recipes-bsp/u-boot/u-boot-git/remove-overlay.patch
+++ b/recipes-bsp/u-boot/files/remove-overlay.patch
diff --git a/recipes-bsp/u-boot/u-boot-git/remove-unused.patch b/recipes-bsp/u-boot/files/remove-unused.patch
index 92e933f..92e933f 100644
--- a/recipes-bsp/u-boot/u-boot-git/remove-unused.patch
+++ b/recipes-bsp/u-boot/files/remove-unused.patch
diff --git a/recipes-bsp/u-boot/u-boot-git/tegra2-nand-warning.patch b/recipes-bsp/u-boot/files/tegra2-nand-warning.patch
index ad039ca..ad039ca 100644
--- a/recipes-bsp/u-boot/u-boot-git/tegra2-nand-warning.patch
+++ b/recipes-bsp/u-boot/files/tegra2-nand-warning.patch
diff --git a/recipes-bsp/u-boot/u-boot-git/u-boot-board-unused.patch b/recipes-bsp/u-boot/files/u-boot-board-unused.patch
index 98a33a9..98a33a9 100644
--- a/recipes-bsp/u-boot/u-boot-git/u-boot-board-unused.patch
+++ b/recipes-bsp/u-boot/files/u-boot-board-unused.patch
diff --git a/recipes-bsp/u-boot/u-boot-git/u-boot-userspacetools.patch b/recipes-bsp/u-boot/files/u-boot-userspacetools.patch
index 6e7a3e9..6e7a3e9 100644
--- a/recipes-bsp/u-boot/u-boot-git/u-boot-userspacetools.patch
+++ b/recipes-bsp/u-boot/files/u-boot-userspacetools.patch
diff --git a/recipes-bsp/u-boot/u-boot-git/u-boot-warning.patch b/recipes-bsp/u-boot/files/u-boot-warning.patch
index 2552464..2552464 100644
--- a/recipes-bsp/u-boot/u-boot-git/u-boot-warning.patch
+++ b/recipes-bsp/u-boot/files/u-boot-warning.patch
diff --git a/recipes-bsp/u-boot/u-boot-git/u-boot_ap20warning.patch b/recipes-bsp/u-boot/files/u-boot_ap20warning.patch
index d99fc12..d99fc12 100644
--- a/recipes-bsp/u-boot/u-boot-git/u-boot_ap20warning.patch
+++ b/recipes-bsp/u-boot/files/u-boot_ap20warning.patch
diff --git a/recipes-bsp/u-boot/u-boot.inc b/recipes-bsp/u-boot/u-boot.inc
deleted file mode 100644
index 720f995..0000000
--- a/recipes-bsp/u-boot/u-boot.inc
+++ /dev/null
@@ -1,68 +0,0 @@
-DESCRIPTION = "U-Boot - the Universal Boot Loader"
-HOMEPAGE = "http://www.denx.de/wiki/U-Boot/WebHome"
-SECTION = "bootloaders"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=4c6cde5df68eff615d36789dc18edd3b"
-
-PROVIDES = "virtual/bootloader"
-
-DEPENDS = "mtd-utils"
-
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-PARALLEL_MAKE=""
-
-EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}"
-
-UBOOT_MACHINE ?= "${MACHINE}_config"
-UBOOT_BINARY ?= "u-boot.bin"
-UBOOT_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.bin"
-UBOOT_SYMLINK ?= "u-boot-${MACHINE}.bin"
-UBOOT_MAKE_TARGET ?= "all"
-
-do_configure () {
- oe_runmake ${UBOOT_MACHINE}
-}
-
-do_compile () {
- unset LDFLAGS
- unset CFLAGS
- unset CPPFLAGS
- oe_runmake ${UBOOT_MAKE_TARGET}
-}
-
-do_install () {
- install -d ${D}/boot
- install ${S}/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE}
- ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY}
-
- if [ -e ${WORKDIR}/fw_env.config ] ; then
- install -d ${D}${sysconfdir}
- install -m 644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config
- fi
-
-}
-
-FILES_${PN} = "/boot ${sysconfdir}"
-# no gnu_hash in uboot.bin, by design, so skip QA
-INSANE_SKIP_${PN} = "1"
-
-inherit deploy
-
-addtask deploy before do_package after do_compile
-
-do_deploy () {
- install -d ${DEPLOY_DIR_IMAGE}
- install ${S}/${UBOOT_BINARY} ${DEPLOY_DIR_IMAGE}/${UBOOT_IMAGE}
-
- cd ${DEPLOY_DIR_IMAGE}
- rm -f ${UBOOT_BINARY} ${UBOOT_SYMLINK}
- ln -sf ${UBOOT_IMAGE} ${UBOOT_SYMLINK}
- ln -sf ${UBOOT_IMAGE} ${UBOOT_BINARY}
-
- if [ -e ${S}/MLO ] ; then
- install ${S}/MLO ${DEPLOY_DIR_IMAGE}/MLO-${MACHINE}-${PV}
- rm -f ${DEPLOY_DIR_IMAGE}/MLO-${MACHINE} ${DEPLOY_DIR_IMAGE}/MLO
- ln -sf MLO-${MACHINE}-${PV} ${DEPLOY_DIR_IMAGE}/MLO-${MACHINE}
- ln -sf MLO-${MACHINE}-${PV} ${DEPLOY_DIR_IMAGE}/MLO
- fi
-}
diff --git a/recipes-bsp/u-boot/u-boot_git.bbappend b/recipes-bsp/u-boot/u-boot_2011.06.bbappend
index 27ce04a..995c772 100644
--- a/recipes-bsp/u-boot/u-boot_git.bbappend
+++ b/recipes-bsp/u-boot/u-boot_2011.06.bbappend
@@ -1,12 +1,13 @@
-# Extends the core U-Boot GIT recipe
+# Extends the core u-boot recipe
# to take the u-boot sources including the colibri stuff from our git repository
PR ="r1"
DEPENDS += "dtc-native"
-FILESEXTRAPATHS_prepend := "${THISDIR}/u-boot-git:"
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
# Also overwries the license checksum to suit the updated text file in our U-Boot snapshot.
-LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb"
+#LIC_FILES_CHKSUM_colibri-t20 = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb"
+#LIC_FILES_CHKSUM_colibri-t30 = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb"
COMPATIBLE_MACHINE_colibri-t20 = "colibri-t20"
COMPATIBLE_MACHINE_colibri-t30 = "colibri-t30"
@@ -23,13 +24,9 @@ S="${WORKDIR}/git"
SRC_URI_COLIBRI = "git://gitorious.org/colibri-t20-embedded-linux-bsp/colibri_t20-u-boot.git;protocol=git;branch=master \
file://u-boot-warning.patch \
file://u-boot-board-unused.patch \
+ file://board_stackcorruption_workaround.patch \
"
-# file://remove-unused.patch \
-# file://u-boot_ap20warning.patch \
-# file://colibri_t30.patch \
-# file://bootaddr.patch \
-#"
SRCREV_colibri-t20 = "63c37d9e1d3ea97391576384d237728c44b5e33b"
SRCREV_colibri-t30 = "63c37d9e1d3ea97391576384d237728c44b5e33b"
@@ -46,13 +43,18 @@ SRC_URI_colibri-t20 = "${SRC_URI_COLIBRI} "
SRC_URI_colibri-t30 = "${SRC_URI_COLIBRI} "
#compile with -O2 not -Os as with gcc 4.5 the code does not work
+# override the solution passed in from u-boot.inc as we want to set additional flags
+EXTRA_OEMAKE_colibri-t20 = "CROSS_COMPILE=${TARGET_PREFIX}"
+EXTRA_OEMAKE_colibri-t30 = "CROSS_COMPILE=${TARGET_PREFIX}"
do_configure_append() {
# sed -i -e 's/-Os/-O2 -fno-ipa-sra -fno-caller-saves -fno-schedule-insns/' ${S}/config.mk
sed -i -e 's/-Os/-O2 -fno-ipa-sra -fno-caller-saves -fno-schedule-insns -mno-unaligned-access/' ${S}/config.mk
}
-
#build additionally a u-boot binary which uses/stores its environment on an T20 external sd or mmc card
+SPL_BINARY_colibri-t20 = "u-boot-hsmmc.bin"
+SPL_IMAGE_colibri-t20 = "u-boot-hsmmc-${MACHINE}-${PV}-${PR}.${UBOOT_SUFFIX}"
+SPL_SYMLINK_colibri-t20 = "u-boot-hsmmc-${MACHINE}.${UBOOT_SUFFIX}"
do_compile_append_colibri-t20() {
mv u-boot.bin u-boot-nand.bin
oe_runmake colibri_t20_sdboot_config
@@ -60,11 +62,3 @@ do_compile_append_colibri-t20() {
mv u-boot.bin u-boot-hsmmc.bin
mv u-boot-nand.bin u-boot.bin
}
-
-UBOOT_IMAGE ?= "u-boot-hsmmc-${MACHINE}-${PV}-${PR}.bin"
-do_deploy_append_colibri-t20 () {
- install ${S}/u-boot-hsmmc.bin ${DEPLOY_DIR_IMAGE}/u-boot-hsmmc-${MACHINE}-${PV}-${PR}.bin
- package_stagefile_shell ${DEPLOY_DIR_IMAGE}/u-boot-hsmmc-${MACHINE}-${PV}-${PR}.bin
- ln -sf u-boot-hsmmc-${MACHINE}-${PV}-${PR}.bin ${DEPLOY_DIR_IMAGE}/u-boot-hsmmc.bin
- package_stagefile_shell ${DEPLOY_DIR_IMAGE}/u-boot-hsmmc.bin
-}
diff --git a/recipes-bsp/u-boot/u-boot_git.bb b/recipes-bsp/u-boot/u-boot_git.bb
deleted file mode 100644
index 2b32ab8..0000000
--- a/recipes-bsp/u-boot/u-boot_git.bb
+++ /dev/null
@@ -1,61 +0,0 @@
-require u-boot.inc
-PR ="r68"
-
-DEFAULT_PREFERENCE = "-1"
-DEFAULT_PREFERENCE_ti814x = "-1"
-DEFAULT_PREFERENCE_ti816x = "-1"
-
-FILESPATHPKG =. "u-boot-git:"
-
-# ~ TI PSP v2009.11_OMAPPSP_03.00.01.06 (+ couple of commits)
-SRC_URI_omap3evm = "git://arago-project.org/git/projects/u-boot-omap3.git;protocol=git \
- file://0001-omap3evm-Change-default-console-serial-port-from.patch \
-"
-SRCREV_${PN}_omap3evm = "c0a8fb217fdca7888d89f9a3dee74a4cec865620"
-PV_omap3evm = "2009.11+${PR}+gitr${SRCREV}"
-
-# ~ TI PSP v2009.11_OMAPPSP_03.00.01.06 (+ couple of commits)
-SRC_URI_pn-${PN}_am3517-evm = "git://arago-project.org/git/projects/u-boot-omap3.git;protocol=git"
-SRCREV_pn-${PN}_am3517-evm = "c0a8fb217fdca7888d89f9a3dee74a4cec865620"
-PV_pn-${PN}_am3517-evm = "2009.11+${PR}+gitr${SRCREV}"
-
-# ~ TI PSP v2009.11_OMAPPSP_03.00.01.06 (+ couple of commits)
-SRC_URI_am37x-evm = "git://arago-project.org/git/projects/u-boot-omap3.git;protocol=git \
- file://0001-omap3evm-Change-default-console-serial-port-from.patch \
-"
-SRCREV_pn-${PN}_am37x-evm = "c0a8fb217fdca7888d89f9a3dee74a4cec865620"
-PV_am37x-evm = "2009.11+${PR}+gitr${SRCREV}"
-
-SRC_URI_omap3-touchbook = "git://gitorious.org/u-boot-omap3/mainline.git;branch=omap3-dev;protocol=git \
- file://fw_env.config \
- file://dss2.patch \
- file://600mhz.patch \
- file://new-pinmux.patch \
- file://spi3.patch \
- file://spi4.patch \
- file://headphone.patch \
- file://power.patch \
- file://ai-logo.patch \
- file://mmcinit.patch \
- file://touchbook-config.patch \
- file://dont-inline-weak-symbols.patch \
-"
-SRCREV_pn-${PN}_omap3-touchbook = "d363f9cb0918a1b6b92e2e20d01543d0c4f53274"
-PV_omap3-touchbook = "2009.05+${PR}+gitr${SRCREV}"
-
-# OMAPL1 omapl137/omapl138 - PSP 3.20.0.11
-
-SRC_URI_omapl138 = "git://arago-project.org/git/projects/u-boot-omapl1.git;protocol=http"
-SRCREV_pn-${PN}_omapl138 = "5f16b8551b125f16cd8d58f278cb25b94272fd9f"
-PV_omapl138 = "2009.11+${PR}+gitr${SRCREV}"
-
-# hawkboard - master branch (hawk still .07beta)
-SRC_URI_hawkboard = "git://arago-project.org/git/people/sekhar/u-boot-omapl1.git;protocol=git;branch=master"
-SRC_URI_hawkboard += "file://dont-inline-weak-symbols2.patch"
-SRCREV_pn-${PN}_hawkboard = "0d291f2f255e6d66a78b3dc2445362a96ae39a57"
-PV_hawkboard = "2009.08+gitr${SRCREV}"
-
-
-S = "${WORKDIR}/git"
-
-RRECOMMENDS_${PN}_omap3-touchbook = "u-boot-fw-utils"