meta-nuvoton: npcm8xx-bootblock: update to 0.4.8

Changelog:

version 0.4.8 - May 21th 2024
=============
- Set cntfrq_el0 should be after calling serial_printf_init.
- Makefile: move object code to independent path.

version 0.4.7 - May 7th 2024
=============
- Fix DDP\SDP type print.
- Cleanup code for upstream.
- Fix print of reset type for TIP reset case.
- Bug fix: when using dlls_trim_clk override from header option INCR bit
  value is set to bit 7 instead of 6. Fixed to 6.
- Add mode non-ECC ranges (8 total).
- Fix build on Linux (change "Apps" folder to "apps").
- Upgrade compiler and compile by default with dwarf-3 (allow debugging
  with Lauterbach, for GDB switch to -ggdb).
- Compile optimization for speed.
- Fix Coverity issues.
- Cleanup makefile.
- Add bit (over scratchpad bits): INTCR2.HOST_INIT  (bit 11). This bit
  indicates host is initialized by bootblock. After host is set bit is set
  to prevent re-init.
- Bug fix: cntfrq_el0 was set back to 25000000 after warm boot, regardless
  of CPU frequency.

Signed-off-by: Tim Lee <timlee660101@gmail.com>
Change-Id: I5e0f51ce8e3ab55ec4caa244ebcd03cb0e1374ed
diff --git a/meta-nuvoton/recipes-bsp/images/npcm8xx-bootblock.inc b/meta-nuvoton/recipes-bsp/images/npcm8xx-bootblock.inc
index 71e2225..5948d3c 100644
--- a/meta-nuvoton/recipes-bsp/images/npcm8xx-bootblock.inc
+++ b/meta-nuvoton/recipes-bsp/images/npcm8xx-bootblock.inc
@@ -4,25 +4,36 @@
 LICENSE = "GPL-2.0-only"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 
-BB_TIP = "arbel_a35_bootblock.bin"
-BB_NO_TIP = "arbel_a35_bootblock_no_tip.bin"
-
-OUTPUT_BB_TIP_BIN    = "Images/tip"
-OUTPUT_BB_NO_TIP_BIN = "Images/no_tip"
+PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 S = "${WORKDIR}/git"
-
+B = "${S}/Sources"
+BB_BRANCH ?= "main"
 SRC_URI = " \
-    git://github.com/Nuvoton-Israel/npcm8xx-bootblock;branch=main;protocol=https"
+    git://github.com/Nuvoton-Israel/npcm8xx-bootblock;branch=${BB_BRANCH};protocol=https"
+
+export CROSS_COMPILE="${TARGET_PREFIX}"
+CFLAGS[unexport] = "1"
+LDFLAGS[unexport] = "1"
+AS[unexport] = "1"
+LD[unexport] = "1"
+do_configure[noexec] = "1"
+
+EXTRA_OEMAKE += "CROSS_COMPILER_INC=${STAGING_DIR_HOST}${includedir}"
+
+TIP = "${@'tip' if d.getVar("TIP_IMAGE") == 'True' else 'no_tip'}"
+BOOTBLOCK = "arbel_a35_bootblock"
+BOOTBLOCK .= "${@'_no_tip' if d.getVar("TIP_IMAGE") != 'True' else ''}"
+
+do_compile() {
+    oe_runmake "${BOOTBLOCK}" ENCLAVE="${TIP}"
+}
+do_compile[cleandirs] = "${B}/Images"
 
 inherit deploy
-
-do_deploy () {
-    if [ "${TIP_IMAGE}" = "True" ] ; then
-        install -D -m 644 ${OUTPUT_BB_TIP_BIN}/${BB_TIP} ${DEPLOYDIR}/${BB_TIP}
-    else
-        install -D -m 644 ${OUTPUT_BB_NO_TIP_BIN}/${BB_NO_TIP} ${DEPLOYDIR}/${BB_NO_TIP}
-    fi
+do_deploy() {
+    install -d ${DEPLOYDIR}
+    install -m 644 "${B}/Images/${TIP}/${BOOTBLOCK}.bin" "${DEPLOYDIR}/${BOOTBLOCK}.bin"
 }
 
 addtask deploy before do_build after do_compile
diff --git a/meta-nuvoton/recipes-bsp/images/npcm8xx-bootblock_0.4.6.bb b/meta-nuvoton/recipes-bsp/images/npcm8xx-bootblock_0.4.6.bb
deleted file mode 100644
index 61de133..0000000
--- a/meta-nuvoton/recipes-bsp/images/npcm8xx-bootblock_0.4.6.bb
+++ /dev/null
@@ -1,3 +0,0 @@
-SRCREV = "b45a45bce6e557af49b43492904579edb5f084a3"
-
-require npcm8xx-bootblock.inc
diff --git a/meta-nuvoton/recipes-bsp/images/npcm8xx-bootblock_0.4.8.bb b/meta-nuvoton/recipes-bsp/images/npcm8xx-bootblock_0.4.8.bb
new file mode 100644
index 0000000..17a94be
--- /dev/null
+++ b/meta-nuvoton/recipes-bsp/images/npcm8xx-bootblock_0.4.8.bb
@@ -0,0 +1,3 @@
+SRCREV = "e18737d17d4cf5e7768598a291a7ef2b8a07a776"
+
+require npcm8xx-bootblock.inc