blob: 5948d3cec9562d645b4b5a2ec7e9e0adc239bcf0 [file] [log] [blame]
Tim Lee7e9914f2022-11-07 09:47:20 +08001SUMMARY = "Primary bootloader for NPCM8XX (Arbel) devices"
2DESCRIPTION = "Primary bootloader for NPCM8XX (Arbel) devices"
3HOMEPAGE = "https://github.com/Nuvoton-Israel/npcm8xx-bootblock"
4LICENSE = "GPL-2.0-only"
Tim Leeee56bcd2023-02-02 11:10:41 +08005LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263"
Tim Lee7e9914f2022-11-07 09:47:20 +08006
Tim Lee6f918ad2024-05-23 10:10:24 +08007PACKAGE_ARCH = "${MACHINE_ARCH}"
Tim Lee7e9914f2022-11-07 09:47:20 +08008
Tim Leeee56bcd2023-02-02 11:10:41 +08009S = "${WORKDIR}/git"
Tim Lee6f918ad2024-05-23 10:10:24 +080010B = "${S}/Sources"
11BB_BRANCH ?= "main"
Tim Lee7e9914f2022-11-07 09:47:20 +080012SRC_URI = " \
Tim Lee6f918ad2024-05-23 10:10:24 +080013 git://github.com/Nuvoton-Israel/npcm8xx-bootblock;branch=${BB_BRANCH};protocol=https"
14
15export CROSS_COMPILE="${TARGET_PREFIX}"
16CFLAGS[unexport] = "1"
17LDFLAGS[unexport] = "1"
18AS[unexport] = "1"
19LD[unexport] = "1"
20do_configure[noexec] = "1"
21
22EXTRA_OEMAKE += "CROSS_COMPILER_INC=${STAGING_DIR_HOST}${includedir}"
23
24TIP = "${@'tip' if d.getVar("TIP_IMAGE") == 'True' else 'no_tip'}"
25BOOTBLOCK = "arbel_a35_bootblock"
26BOOTBLOCK .= "${@'_no_tip' if d.getVar("TIP_IMAGE") != 'True' else ''}"
27
28do_compile() {
29 oe_runmake "${BOOTBLOCK}" ENCLAVE="${TIP}"
30}
31do_compile[cleandirs] = "${B}/Images"
Tim Lee7e9914f2022-11-07 09:47:20 +080032
Tim Lee7e9914f2022-11-07 09:47:20 +080033inherit deploy
Tim Lee6f918ad2024-05-23 10:10:24 +080034do_deploy() {
35 install -d ${DEPLOYDIR}
36 install -m 644 "${B}/Images/${TIP}/${BOOTBLOCK}.bin" "${DEPLOYDIR}/${BOOTBLOCK}.bin"
Tim Lee7e9914f2022-11-07 09:47:20 +080037}
38
39addtask deploy before do_build after do_compile