summaryrefslogtreecommitdiff
path: root/recipes-bsp
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2014-10-31 17:34:14 +0100
committerMax Krummenacher <max.oss.09@gmail.com>2014-10-31 20:55:02 +0100
commitc5fece80a36784d555a0699253767954e3e6b177 (patch)
tree64cbea438e85f18db0e4442dc6ae788c90bd63ec /recipes-bsp
parent51afa8c8701e2a91af69ae6888c6248953fa37e3 (diff)
apalis/colibri_t30: introduce fw_printenv/setenv
Diffstat (limited to 'recipes-bsp')
-rw-r--r--recipes-bsp/u-boot/u-boot-toradex-fw-utils_git.bb46
-rw-r--r--recipes-bsp/u-boot/u-boot-toradex_git.bb5
2 files changed, 37 insertions, 14 deletions
diff --git a/recipes-bsp/u-boot/u-boot-toradex-fw-utils_git.bb b/recipes-bsp/u-boot/u-boot-toradex-fw-utils_git.bb
index 2c237be..47df9b7 100644
--- a/recipes-bsp/u-boot/u-boot-toradex-fw-utils_git.bb
+++ b/recipes-bsp/u-boot/u-boot-toradex-fw-utils_git.bb
@@ -1,7 +1,8 @@
DESCRIPTION = "U-boot bootloader fw_printenv/setenv utils"
LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb \
+LIC_FILES_CHKSUM_colibri-t20 = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb \
file://README;beginline=1;endline=22;md5=5ba4218ac89af7846802d0348df3fb90"
+LIC_FILES_CHKSUM_tegra3 = "file://Licenses/README;md5=c7383a594871c03da76b3707929d2919"
SECTION = "bootloader"
PROVIDES = "u-boot-fw-utils"
DEPENDS = "mtd-utils"
@@ -14,26 +15,34 @@ DEFAULT_PREFERENCE_apalis-t30 = "1"
FILESPATHPKG =. "git:"
S="${WORKDIR}/git"
-SRC_URI_COLIBRI = "git://git.toradex.com/u-boot-toradex.git;protocol=git;branch=colibri"
-SRC_URI_COLIBRI += "file://fw_env.config"
+SRC_URI_T20 = "git://git.toradex.com/u-boot-toradex.git;protocol=git;branch=colibri"
+SRC_URI_T20 += "file://fw_env.config"
+SRC_URI_T30 = "git://git.toradex.com/u-boot-toradex.git;protocol=git;branch=2014.10-toradex"
+SRC_URI_T30 += "file://fw_env.config"
# This revision is based on upstream "v2011.06"
-SRCREV_COLIBRI = "278ca22a59e3df4dd1e1494e8920a01c172118af"
+SRCREV_T20 = "278ca22a59e3df4dd1e1494e8920a01c172118af"
+# This revision is based on upstream "v2014.10"
+SRCREV_T30 = "7031ed747021815dd8303d8a70b8c070ba709c56"
PV_colibri-t20 = "${PR}+gitr${SRCREV}"
PV_colibri-t30 = "${PR}+gitr${SRCREV}"
PV_apalis-t30 = "${PR}+gitr${SRCREV}"
-SRC_URI_colibri-t20 = "${SRC_URI_COLIBRI}"
-SRC_URI_colibri-t30 = "${SRC_URI_COLIBRI}"
-SRC_URI_apalis-t30 = "${SRC_URI_COLIBRI}"
+SRC_URI_colibri-t20 = "${SRC_URI_T20}"
+SRC_URI_colibri-t30 = "${SRC_URI_T30}"
+SRC_URI_apalis-t30 = "${SRC_URI_T30}"
-SRCREV_colibri-t20 = "${SRCREV_COLIBRI}"
-SRCREV_colibri-t30 = "${SRCREV_COLIBRI}"
-SRCREV_apalis-t30 = "${SRCREV_COLIBRI}"
+SRCREV_colibri-t20 = "${SRCREV_T20}"
+SRCREV_colibri-t30 = "${SRCREV_T30}"
+SRCREV_apalis-t30 = "${SRCREV_T30}"
S = "${WORKDIR}/git"
-EXTRA_OEMAKE = 'HOSTCC="${CC}" HOSTSTRIP="true"'
+#actually this depend on the upstream U-Boot version and not on the machine
+EXTRA_OEMAKE_tegra3 = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}"'
+EXTRA_OEMAKE_tegra2 = 'HOSTCC="${CC}" HOSTSTRIP="true"'
+
+INSANE_SKIP_${PN} = "already-stripped"
inherit uboot-config
@@ -49,7 +58,7 @@ do_install () {
install -m 644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/
}
-pkg_postinst_${PN}_tegra2 () {
+pkg_postinst_${PN}_colibri-t20 () {
# can't do this offline
if [ "x$D" != "x" ]; then
exit 1
@@ -57,4 +66,17 @@ pkg_postinst_${PN}_tegra2 () {
grep ENV /proc/mtd | awk '{print "/dev/" substr($1,0,4) " 0x00000000 0x00001000 0x" $3 " 1" >> "/etc/fw_env.config" }'
}
+pkg_postinst_${PN}_tegra3 () {
+ # can't do this offline
+ if [ "x$D" != "x" ]; then
+ exit 1
+ fi
+ # Environment in eMMC, at the end of 2nd "boot sector"
+ DISK="mmcblk0boot1"
+ DISK_SIZE=`cat /sys/block/$DISK/size`
+ CONFIG_ENV_SIZE=8192 # 0x2000
+ CONFIG_ENV_OFFSET=`expr $DISK_SIZE \* 512 - $CONFIG_ENV_SIZE`
+ printf "/dev/%s\t0x%X\t0x%X\n" $DISK $CONFIG_ENV_OFFSET $CONFIG_ENV_SIZE >> "/etc/fw_env.config"
+}
+
PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/recipes-bsp/u-boot/u-boot-toradex_git.bb b/recipes-bsp/u-boot/u-boot-toradex_git.bb
index 4651b85..1ad6049 100644
--- a/recipes-bsp/u-boot/u-boot-toradex_git.bb
+++ b/recipes-bsp/u-boot/u-boot-toradex_git.bb
@@ -18,9 +18,10 @@ FILESPATHPKG =. "git:"
S="${WORKDIR}/git"
SRC_URI_T20 = "git://git.toradex.com/u-boot-toradex.git;protocol=git;branch=colibri"
SRC_URI_T30 = "git://git.toradex.com/u-boot-toradex.git;protocol=git;branch=2014.10-toradex"
-# This revision is based on upstream "v2014.10"
+# This revision is based on upstream "v2011.06"
SRCREV_T20 = "278ca22a59e3df4dd1e1494e8920a01c172118af"
-SRCREV_T30 = "67c3a4aee6c0af124ce779aed1be70c7a92d0916"
+# This revision is based on upstream "v2014.10"
+SRCREV_T30 = "7031ed747021815dd8303d8a70b8c070ba709c56"
PV_colibri-t20 = "${PR}+gitr${SRCREV}"
PV_colibri-t30 = "${PR}+gitr${SRCREV}"