Tim Lee | 7e9914f | 2022-11-07 09:47:20 +0800 | [diff] [blame] | 1 | SUMMARY = "Primary bootloader for NPCM8XX (Arbel) devices" |
| 2 | DESCRIPTION = "Primary bootloader for NPCM8XX (Arbel) devices" |
| 3 | HOMEPAGE = "https://github.com/Nuvoton-Israel/npcm8xx-bootblock" |
| 4 | LICENSE = "GPL-2.0-only" |
Tim Lee | ee56bcd | 2023-02-02 11:10:41 +0800 | [diff] [blame] | 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263" |
Tim Lee | 7e9914f | 2022-11-07 09:47:20 +0800 | [diff] [blame] | 6 | |
Tim Lee | 6f918ad | 2024-05-23 10:10:24 +0800 | [diff] [blame] | 7 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
Tim Lee | 7e9914f | 2022-11-07 09:47:20 +0800 | [diff] [blame] | 8 | |
Tim Lee | ee56bcd | 2023-02-02 11:10:41 +0800 | [diff] [blame] | 9 | S = "${WORKDIR}/git" |
Tim Lee | 6f918ad | 2024-05-23 10:10:24 +0800 | [diff] [blame] | 10 | B = "${S}/Sources" |
| 11 | BB_BRANCH ?= "main" |
Tim Lee | 7e9914f | 2022-11-07 09:47:20 +0800 | [diff] [blame] | 12 | SRC_URI = " \ |
Tim Lee | 6f918ad | 2024-05-23 10:10:24 +0800 | [diff] [blame] | 13 | git://github.com/Nuvoton-Israel/npcm8xx-bootblock;branch=${BB_BRANCH};protocol=https" |
| 14 | |
| 15 | export CROSS_COMPILE="${TARGET_PREFIX}" |
| 16 | CFLAGS[unexport] = "1" |
| 17 | LDFLAGS[unexport] = "1" |
| 18 | AS[unexport] = "1" |
| 19 | LD[unexport] = "1" |
| 20 | do_configure[noexec] = "1" |
| 21 | |
| 22 | EXTRA_OEMAKE += "CROSS_COMPILER_INC=${STAGING_DIR_HOST}${includedir}" |
| 23 | |
| 24 | TIP = "${@'tip' if d.getVar("TIP_IMAGE") == 'True' else 'no_tip'}" |
| 25 | BOOTBLOCK = "arbel_a35_bootblock" |
| 26 | BOOTBLOCK .= "${@'_no_tip' if d.getVar("TIP_IMAGE") != 'True' else ''}" |
| 27 | |
| 28 | do_compile() { |
| 29 | oe_runmake "${BOOTBLOCK}" ENCLAVE="${TIP}" |
| 30 | } |
| 31 | do_compile[cleandirs] = "${B}/Images" |
Tim Lee | 7e9914f | 2022-11-07 09:47:20 +0800 | [diff] [blame] | 32 | |
Tim Lee | 7e9914f | 2022-11-07 09:47:20 +0800 | [diff] [blame] | 33 | inherit deploy |
Tim Lee | 6f918ad | 2024-05-23 10:10:24 +0800 | [diff] [blame] | 34 | do_deploy() { |
| 35 | install -d ${DEPLOYDIR} |
| 36 | install -m 644 "${B}/Images/${TIP}/${BOOTBLOCK}.bin" "${DEPLOYDIR}/${BOOTBLOCK}.bin" |
Tim Lee | 7e9914f | 2022-11-07 09:47:20 +0800 | [diff] [blame] | 37 | } |
| 38 | |
| 39 | addtask deploy before do_build after do_compile |