diff options
author | Max Krummenacher <max.krummenacher@toradex.com> | 2014-07-22 17:34:52 +0200 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2014-08-04 11:12:27 +0200 |
commit | e8c6775411487e9daca498e1167c4ad518ef15e5 (patch) | |
tree | e27598deb1042aeab9edde9fdbe6ba74b595f73d /recipes-bsp/u-boot/u-boot-toradex-fw-utils_git.bb | |
parent | 8635136e8251f4c2f241ce7372cf8037d955e012 (diff) |
colibri-t20: add configuration to u-boot-fw-utils
u-boot-fw-utils allows for U-Boot environmenmt access from Linux.
Add the needed configuration file for colibri_t20 with a postinst script
which choses the right NAND flash sector sizes from /proc/mtd
While at it, fix some whitespace issues.
Diffstat (limited to 'recipes-bsp/u-boot/u-boot-toradex-fw-utils_git.bb')
-rw-r--r-- | recipes-bsp/u-boot/u-boot-toradex-fw-utils_git.bb | 20 |
1 files changed, 15 insertions, 5 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 8063da3..5a15a58 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 @@ -16,6 +16,7 @@ FILESPATHPKG =. "git:" S="${WORKDIR}/git" SRC_URI_COLIBRI = "git://git.toradex.com/u-boot-toradex.git;protocol=git;branch=colibri" SRC_URI_COLIBRI += "file://u-boot-dont-build-standalone.patch" +SRC_URI_COLIBRI += "file://fw_env.config" # This revision is based on upstream "v2011.06" SRCREV_COLIBRI = "9d41458a8095fc58e355e3ecca6f96aa7d98d725" @@ -38,14 +39,23 @@ EXTRA_OEMAKE = 'HOSTCC="${CC}" HOSTSTRIP="true"' inherit uboot-config do_compile () { - oe_runmake ${UBOOT_MACHINE} - oe_runmake env + oe_runmake ${UBOOT_MACHINE} + oe_runmake env } do_install () { - install -d ${D}${base_sbindir} - install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_printenv - install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_setenv + install -d ${D}${base_sbindir} ${D}${sysconfdir} + install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_printenv + install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_setenv + install -m 644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/ +} + +pkg_postinst_${PN}_tegra2 () { + # can't do this offline + if [ "x$D" != "x" ]; then + exit 1 + fi + grep ENV /proc/mtd | awk '{print "/dev/" substr($1,0,4) " 0x00000000 0x00001000 0x" $3 " 1" >> "/etc/fw_env.config" }' } PACKAGE_ARCH = "${MACHINE_ARCH}" |