Skip to content

Commit

Permalink
Merge pull request #651 from avs-sas/sas/master/u-boot
Browse files Browse the repository at this point in the history
meta-qcom: initial u-boot support
  • Loading branch information
lumag authored Sep 20, 2024
2 parents 1f53a82 + 6d7ec5a commit 46d8b33
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 0 deletions.
6 changes: 6 additions & 0 deletions conf/machine/qcom-armv8a.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ MACHINE_FEATURES = "usbhost usbgadget alsa screen wifi bluetooth ext2"
# UFS partitions in 820/845/RB5 setup with 4096 logical sector size
EXTRA_IMAGECMD:ext4 += " -b 4096 "

PREFERRED_PROVIDER_virtual/bootloader ??= "u-boot-qcom"

UBOOT_CONFIG ??= "qcs6490-rb3gen2 sdm845-db845c"
UBOOT_CONFIG[qcs6490-rb3gen2] = "qcm6490_defconfig"
UBOOT_CONFIG[sdm845-db845c] = "qcom_defconfig"

PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"

# Support for dragonboard{410, 820, 845}c, rb5
Expand Down
12 changes: 12 additions & 0 deletions recipes-bsp/u-boot/u-boot-qcom-common_2024.10.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
LICENSE = "GPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://Licenses/README;md5=2ca5f2c35c8cc335f0a19756634782f1"

DEPENDS += "flex-native bison-native"

SRC_URI = "git://git.codelinaro.org/linaro/qcomlt/u-boot.git;branch=${SRCBRANCH};protocol=https"

SRCREV = "bea334ce7578d4cb645cf22d423ec11271feecfe"
SRCBRANCH = "caleb/rbx-integration"

S = "${WORKDIR}/git"
B = "${WORKDIR}/build"
37 changes: 37 additions & 0 deletions recipes-bsp/u-boot/u-boot-qcom_git.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
SUMMARY = "U-Boot bootloader with support for Qualcom Computer on Modules"
HOMEPAGE = "https://git.codelinaro.org/linaro/qcomlt/u-boot"
SECTION = "bootloaders"

DESCRIPTION = "U-Boot based on mainline U-Boot used by Qualcomm BSP in \
order to provide support for some backported features and fixes, or because it \
was submitted for revision and it takes some time to become part of a stable \
version, or because it is not applicable for upstreaming."

BASEPV = "2024.10"
PV = "${BASEPV}+git${SRCPV}"

require recipes-bsp/u-boot/u-boot.inc
require u-boot-qcom-common_${BASEPV}.inc

DEPENDS += " \
xxd-native \
dtc-native \
qtestsign-native\
"

PROVIDES += "u-boot"

B = "${WORKDIR}/build"

PACKAGE_ARCH = "${MACHINE_ARCH}"
COMPATIBLE_MACHINE = "(qcom-armv8a)"

do_compile:append() {
export CRYPTOGRAPHY_OPENSSL_NO_LEGACY=1
qtestsign -v6 aboot -o ${B}/qcm6490_defconfig/u-boot.mbn ${B}/qcm6490_defconfig/u-boot.elf
}

do_deploy:append() {
cp -r ${B}/qcm6490_defconfig/u-boot.mbn ${DEPLOYDIR}/u-boot-qcs6490-rb3gen2.mbn
cp -r ${B}/qcm6490_defconfig/u-boot.elf ${DEPLOYDIR}/u-boot-qcs6490-rb3gen2.elf
}
32 changes: 32 additions & 0 deletions recipes-devtools/qtestsign/qtestsign_git.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
SUMMARY = "qtestsign is a simple tool to sign ELF Qualcomm firmware images"
HOMEPAGE = "https://github.com/msm8916-mainline/qtestsign"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"

SRC_URI = "git://github.com/msm8916-mainline/qtestsign.git;branch=main;protocol=https"
SRCREV = "ce6ba20f4ead008e5b522a81179c98dd48ccf06e"

INHIBIT_DEFAULT_DEPS = "1"

S = "${WORKDIR}/git"

inherit python3native

do_install() {
install -d ${D}${bindir}
install -d ${D}${PYTHON_SITEPACKAGES_DIR}/qtestsign

cd ${S}
cp -r * ${D}${PYTHON_SITEPACKAGES_DIR}/qtestsign

rm ${D}${PYTHON_SITEPACKAGES_DIR}/qtestsign/README.md
rm ${D}${PYTHON_SITEPACKAGES_DIR}/qtestsign/COPYING
rm ${D}${PYTHON_SITEPACKAGES_DIR}/qtestsign/requirements.txt

ln -sr ${D}${PYTHON_SITEPACKAGES_DIR}/qtestsign/qtestsign.py ${D}${bindir}/qtestsign
}

FILES:${PN} += "${PYTHON_SITEPACKAGES_DIR}/qtestsign"
RDEPENDS:${PN} = "python3 python3-cryptography"

BBCLASSEXTEND = "native nativesdk"

0 comments on commit 46d8b33

Please sign in to comment.