Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/dev/mmcblk0boot0 0x1ff000 0x1000
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/dev/mmcblk0boot0 0x1ff000 0x1000
2 changes: 2 additions & 0 deletions recipes-bsp/u-boot/u-boot-fw-utils-karo_git.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
require u-boot-karo-common_git.inc
require u-boot-fw-utils-karo_git.inc
38 changes: 38 additions & 0 deletions recipes-bsp/u-boot/u-boot-fw-utils-karo_git.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
PROVIDES += "u-boot-fw-utils"
RPROVIDES_${PN} += "u-boot-fw-utils"

SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities"
DEPENDS += "mtd-utils"

INSANE_SKIP_${PN} = "already-stripped"
EXTRA_OEMAKE_class-target = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" V=1'
EXTRA_OEMAKE_class-cross = 'HOSTCC="${CC} ${CFLAGS} ${LDFLAGS}" V=1'

inherit uboot-config

FILESEXTRAPATHS_prepend := "${THISDIR}/${BP}:"

SRC_URI_append="file://fw_env.config"

do_compile () {
oe_runmake ${UBOOT_MACHINE}
oe_runmake envtools
}

do_install () {
install -d ${D}${base_sbindir}
install -d ${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 0644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config
}

do_install_class-cross () {
install -d ${D}${bindir_cross}
install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_printenv
install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_setenv
}

SYSROOT_DIRS_append_class-cross = " ${bindir_cross}"

BBCLASSEXTEND = "cross"
Original file line number Diff line number Diff line change
@@ -1,8 +1,31 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:${THISDIR}/${PN}/patches:"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM_mx6 = "file://Licenses/README;md5=0507cd7da8e7ad6d6701926ec9b84c95"
LIC_FILES_CHKSUM_stm32mp1 = "file://Licenses/README;md5=30503fd321432fc713238f582193b78e"

SRC_URI_append = " \
file://karo.bmp;subdir=git/tools/logos \
"
DEPENDS_append = " bc-native"
DEPENDS_append_stm32mp1 = " bison-native"

SRCBRANCH_mx6 = "master"
SRC_URI_mx6 = "git://github.com/karo-electronics/karo-tx-uboot.git;protocol=https;branch=${SRCBRANCH}"
SRCREV_mx6 = "c0b7b18e33d4fc17af2544de50816d539412d6e0"

SRCBRANCH_stm32mp1 = "master"
SRC_URI_stm32mp1 = "git://git.denx.de/u-boot.git;protocol=git;branch=${SRCBRANCH}"
SRCREV_stm32mp1 = "e0718b3ab754860bd47677e6b4fc5b70da42c4ab"

S = "${WORKDIR}/git"

# append git hash to u-boot name
SCMVERSION ??= "y"
LOCALVERSION ??= "+karo"

PACKAGE_ARCH = "${MACHINE_ARCH}"

COMPATIBLE_MACHINE_tx6 = "(tx6[qsu]-.*)"
COMPATIBLE_MACHINE_txul = "(txul-.*)"
COMPATIBLE_MACHINE_stm32mp1 = "(txmp-.*|qsmp-.*)"

FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:${THISDIR}/u-boot-karo-common/patches:"

SRC_URI_append_mx6 = " \
file://0001-dont-use-soft-float.patch \
Expand Down
33 changes: 6 additions & 27 deletions recipes-bsp/u-boot/u-boot-karo_git.bb
Original file line number Diff line number Diff line change
@@ -1,29 +1,9 @@
require recipes-bsp/u-boot/u-boot.inc
require u-boot-karo-common_git.inc
require u-boot-karo_git.inc

DESCRIPTION = "U-Boot for Ka-Ro electronics TX Computer-On-Modules."
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM_mx6 = "file://Licenses/README;md5=0507cd7da8e7ad6d6701926ec9b84c95"
LIC_FILES_CHKSUM_stm32mp1 = "file://Licenses/README;md5=30503fd321432fc713238f582193b78e"

PROVIDES += "u-boot"

DEPENDS_append = " bc-native"
DEPENDS_append_stm32mp1 = " bison-native"

SRCBRANCH_mx6 = "master"
SRC_URI_mx6 = "git://github.com/karo-electronics/karo-tx-uboot.git;protocol=https;branch=${SRCBRANCH}"
SRCREV_mx6 = "c0b7b18e33d4fc17af2544de50816d539412d6e0"

SRCBRANCH_stm32mp1 = "master"
SRC_URI_stm32mp1 = "git://git.denx.de/u-boot.git;protocol=git;branch=${SRCBRANCH}"
SRCREV_stm32mp1 = "e0718b3ab754860bd47677e6b4fc5b70da42c4ab"

S = "${WORKDIR}/git"

# append git hash to u-boot name
SCMVERSION ??= "y"
LOCALVERSION ??= "+karo"

UBOOT_LOCALVERSION = "${LOCALVERSION}"

do_compile_prepend() {
Expand Down Expand Up @@ -74,10 +54,9 @@ INSANE_SKIP_${PN} += "ldflags"
# (uboot no need -fPIC option : remove check)
INSANE_SKIP_${PN} += "textrel"

PACKAGE_ARCH = "${MACHINE_ARCH}"

COMPATIBLE_MACHINE_tx6 = "(tx6[qsu]-.*)"
COMPATIBLE_MACHINE_txul = "(txul-.*)"
COMPATIBLE_MACHINE_stm32mp1 = "(txmp-.*|qsmp-.*)"

UBOOT_NAME = "u-boot-${MACHINE}.bin"

SRC_URI_append = " \
file://karo.bmp;subdir=git/tools/logos \
"
1 change: 1 addition & 0 deletions recipes-bsp/u-boot/u-boot-karo_git.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require recipes-bsp/u-boot/u-boot.inc
2 changes: 2 additions & 0 deletions recipes-bsp/u-boot/u-boot-tools-karo_git.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
require u-boot-karo-common_git.inc
require u-boot-tools-karo_git.inc
65 changes: 65 additions & 0 deletions recipes-bsp/u-boot/u-boot-tools-karo_git.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
SUMMARY = "U-Boot bootloader tools"
DEPENDS += "openssl"

PROVIDES = "u-boot-tools ${MLPREFIX}u-boot-mkimage ${MLPREFIX}u-boot-mkenvimage"
PROVIDES_class-native = "u-boot-mkimage-native u-boot-mkenvimage-native"

PACKAGES += "${PN}-mkimage ${PN}-mkenvimage"

# Required for backward compatibility with "u-boot-mkimage-xxx.bb"
RPROVIDES_${PN}-mkimage = "u-boot-mkimage"
RREPLACES_${PN}-mkimage = "u-boot-mkimage"
RCONFLICTS_${PN}-mkimage = "u-boot-mkimage"

EXTRA_OEMAKE_class-target = 'CROSS_COMPILE="${TARGET_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1'
EXTRA_OEMAKE_class-native = 'CC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1'
EXTRA_OEMAKE_class-nativesdk = 'CROSS_COMPILE="${HOST_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1'

SED_CONFIG_EFI = '-e "s/CONFIG_EFI_LOADER=.*/# CONFIG_EFI_LOADER is not set/"'
SED_CONFIG_EFI_x86 = ''
SED_CONFIG_EFI_x86-64 = ''
SED_CONFIG_EFI_arm = ''
SED_CONFIG_EFI_armeb = ''
SED_CONFIG_EFI_aarch64 = ''

do_compile () {
oe_runmake sandbox_defconfig

# Disable CONFIG_CMD_LICENSE, license.h is not used by tools and
# generating it requires bin2header tool, which for target build
# is built with target tools and thus cannot be executed on host.
sed -i -e "s/CONFIG_CMD_LICENSE=.*/# CONFIG_CMD_LICENSE is not set/" ${SED_CONFIG_EFI} .config

oe_runmake cross_tools NO_SDL=1
}

do_install () {
install -d ${D}${bindir}

# mkimage
install -m 0755 tools/mkimage ${D}${bindir}/uboot-mkimage
ln -sf uboot-mkimage ${D}${bindir}/mkimage

# mkenvimage
install -m 0755 tools/mkenvimage ${D}${bindir}/uboot-mkenvimage
ln -sf uboot-mkenvimage ${D}${bindir}/mkenvimage

# dumpimage
install -m 0755 tools/dumpimage ${D}${bindir}/uboot-dumpimage
ln -sf uboot-dumpimage ${D}${bindir}/dumpimage

# fit_check_sign
install -m 0755 tools/fit_check_sign ${D}${bindir}/uboot-fit_check_sign
ln -sf uboot-fit_check_sign ${D}${bindir}/fit_check_sign
}

ALLOW_EMPTY_${PN} = "1"
FILES_${PN} = ""
FILES_${PN}-mkimage = "${bindir}/uboot-mkimage ${bindir}/mkimage ${bindir}/uboot-dumpimage ${bindir}/dumpimage ${bindir}/uboot-fit_check_sign ${bindir}/fit_check_sign"
FILES_${PN}-mkenvimage = "${bindir}/uboot-mkenvimage ${bindir}/mkenvimage"

RDEPENDS_${PN}-mkimage += "dtc"
RDEPENDS_${PN} += "${PN}-mkimage ${PN}-mkenvimage"
RDEPENDS_${PN}_class-native = ""

BBCLASSEXTEND = "native nativesdk"