From e3079d8146203557e7314dec139e1359e17d0c43 Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Thu, 23 Jun 2016 00:30:56 +0200 Subject: u-boot: integrate apalis-tk1 Signed-off-by: Marcel Ziswiler Acked-by: Max Krummenacher --- recipes-bsp/u-boot/u-boot-toradex-fw-utils_git.bb | 26 +++++++++++++++++++++-- recipes-bsp/u-boot/u-boot-toradex_git.bb | 8 ++----- 2 files changed, 26 insertions(+), 8 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 548a674..f9b9f3d 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,13 +1,14 @@ SUMMARY = "U-boot bootloader fw_printenv/setenv utils" LICENSE = "GPLv2+" -LIC_FILES_CHKSUM_tegra = "file://Licenses/README;md5=c7383a594871c03da76b3707929d2919" +LIC_FILES_CHKSUM = "file://Licenses/README;md5=c7383a594871c03da76b3707929d2919" SECTION = "bootloader" PROVIDES = "u-boot-fw-utils" DEPENDS = "mtd-utils" -COMPATIBLE_MACHINE = "(apalis-t30|colibri-t20|colibri-t30)" +COMPATIBLE_MACHINE = "(apalis-t30|apalis-tk1|colibri-t20|colibri-t30)" DEFAULT_PREFERENCE_apalis-t30 = "1" +DEFAULT_PREFERENCE_apalis-tk1 = "1" DEFAULT_PREFERENCE_colibri-t20 = "1" DEFAULT_PREFERENCE_colibri-t30 = "1" @@ -21,8 +22,11 @@ SRC_URI = "git://git.toradex.com/u-boot-toradex.git;protocol=git;branch=${SRCBRA " SRC_URI_append_tegra3 = " file://fw_unlock_mmc.sh \ " +SRC_URI_append_tegra124 = " file://fw_unlock_mmc.sh \ +" PV_apalis-t30 = "${PR}+gitr${SRCREV}" +PV_apalis-tk1 = "${PR}+gitr${SRCREV}" PV_colibri-t20 = "${PR}+gitr${SRCREV}" PV_colibri-t30 = "${PR}+gitr${SRCREV}" @@ -53,6 +57,11 @@ do_install_append_tegra3() { install -m 0644 ${WORKDIR}/fw_unlock_mmc.sh ${D}${sysconfdir}/profile.d/fw_unlock_mmc.sh } +do_install_append_tegra124() { + install -d ${D}${sysconfdir}/profile.d/ + install -m 0644 ${WORKDIR}/fw_unlock_mmc.sh ${D}${sysconfdir}/profile.d/fw_unlock_mmc.sh +} + pkg_postinst_${PN}_colibri-t20 () { # can't do this offline if [ "x$D" != "x" ]; then @@ -74,4 +83,17 @@ pkg_postinst_${PN}_tegra3 () { printf "/dev/%s\t0x%X\t0x%X\n" $DISK $CONFIG_ENV_OFFSET $CONFIG_ENV_SIZE >> "/etc/fw_env.config" } +pkg_postinst_${PN}_tegra124 () { + # can't do this offline + if [ "x$D" != "x" ]; then + exit 1 + fi + # Environment in eMMC, before the configblock at the end of 1st "boot sector" + DISK="mmcblk0boot0" + DISK_SIZE=`cat /sys/block/$DISK/size` + CONFIG_ENV_SIZE=8192 # 0x2000 + CONFIG_ENV_OFFSET=`expr $DISK_SIZE \* 512 - $CONFIG_ENV_SIZE - 512` + 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 b7dfc9a..fb40691 100644 --- a/recipes-bsp/u-boot/u-boot-toradex_git.bb +++ b/recipes-bsp/u-boot/u-boot-toradex_git.bb @@ -6,9 +6,10 @@ DEPENDS += "dtc-native" LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://Licenses/README;md5=c7383a594871c03da76b3707929d2919" -COMPATIBLE_MACHINE = "(apalis-t30|colibri-t20|colibri-t30)" +COMPATIBLE_MACHINE = "(apalis-t30|apalis-tk1|colibri-t20|colibri-t30)" DEFAULT_PREFERENCE_apalis-t30 = "1" +DEFAULT_PREFERENCE_apalis-tk1 = "1" DEFAULT_PREFERENCE_colibri-t20 = "1" DEFAULT_PREFERENCE_colibri-t30 = "1" @@ -21,11 +22,6 @@ SRC_URI = "git://git.toradex.com/u-boot-toradex.git;protocol=git;branch=${SRCBRA PV = "${PR}+gitr${SRCREV}" -# apalis/colibri-t30: require u-boot-dtb-tegra.bin to be used -UBOOT_IMAGE_tegra3 = "u-boot-dtb-tegra-${MACHINE}-${PV}-${PR}.${UBOOT_SUFFIX}" -UBOOT_BINARY_tegra3 = "u-boot-dtb-tegra.${UBOOT_SUFFIX}" -UBOOT_SYMLINK_tegra3 = "u-boot-dtb-tegra-${MACHINE}.${UBOOT_SUFFIX}" - # require u-boot-dtb-tegra.bin to be used UBOOT_IMAGE = "u-boot-dtb-tegra-${MACHINE}-${PV}-${PR}.${UBOOT_SUFFIX}" UBOOT_BINARY = "u-boot-dtb-tegra.${UBOOT_SUFFIX}" -- cgit v1.2.3