<commit_before>SUMMARY = "Create scr files used by U-Boot to boot into different bootmodes."
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
SRC_URI ="\
       file://gen_bs.sh \
           "
inherit deploy

S = "${WORKDIR}"

DEPENDS = "u-boot-mkimage-native"

do_compile() {
    ${S}/gen_bs.sh
	mkimage -T script -C none -n 'Top Level Bootscript' -d top_level_bootscript boot.scr
	mkimage -T script -C none -n 'Default Bootscript' -d default_bootscript default.scr
	mkimage -T script -C none -n 'Safemode Bootscript' -d safemode_bootscript safemode.scr
	mkimage -T script -C none -n 'Restore Mode Bootscript' -d restore_bootscript restore.scr
	mkimage -T script -C none -n 'BW Migration Bootscript' -d bw_migrate_bootscript bw-migrate.scr
}

SYSROOT_PREPROCESS_FUNCS += "bootscript_preprocess"

bootscript_preprocess(){
	install -d ${SYSROOT_DESTDIR}/boot
	install -m 0644 boot.scr ${SYSROOT_DESTDIR}/boot/boot.scr
	install -m 0644 default.scr ${SYSROOT_DESTDIR}/boot/default.scr
	install -m 0644 safemode.scr ${SYSROOT_DESTDIR}/boot/safemode.scr
	install -m 0644 restore.scr ${SYSROOT_DESTDIR}/boot/restore.scr
	install -m 0644 bw-migrate.scr ${SYSROOT_DESTDIR}/boot/bw-migrate.scr
}

FILES_${PN} = " restore.scr default.src boot.scr safemode.scr bw-migrate.scr"<commit_msg>zynq-bootscripts: fix recipe<commit_after>SUMMARY = "Create scr files used by U-Boot to boot into different bootmodes."
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"

SRC_URI ="\
	file://gen_bs.sh \
"

S = "${WORKDIR}"

DEPENDS = "u-boot-mkimage-native"

do_compile() {
	${S}/gen_bs.sh
	mkimage -T script -C none -n 'Top Level Bootscript' -d top_level_bootscript boot.scr
	mkimage -T script -C none -n 'Default Bootscript' -d default_bootscript default.scr
	mkimage -T script -C none -n 'Safemode Bootscript' -d safemode_bootscript safemode.scr
	mkimage -T script -C none -n 'Restore Mode Bootscript' -d restore_bootscript restore.scr
	mkimage -T script -C none -n 'BW Migration Bootscript' -d bw_migrate_bootscript bw-migrate.scr
}

do_install() {
	install -d ${D}/boot
	install -m 0644 boot.scr ${D}/boot/boot.scr
	install -m 0644 default.scr ${D}/boot/default.scr
	install -m 0644 safemode.scr ${D}/boot/safemode.scr
	install -m 0644 restore.scr ${D}/boot/restore.scr
	install -m 0644 bw-migrate.scr ${D}/boot/bw-migrate.scr
}

SYSROOT_PREPROCESS_FUNCS += "bootscript_preprocess"

bootscript_preprocess () {
	install -d ${SYSROOT_DESTDIR}/boot
	install -m 0644 ${D}/boot/boot.scr ${SYSROOT_DESTDIR}/boot
	install -m 0644 ${D}/boot/default.scr ${SYSROOT_DESTDIR}/boot
	install -m 0644 ${D}/boot/safemode.scr ${SYSROOT_DESTDIR}/boot
	install -m 0644 ${D}/boot/restore.scr ${SYSROOT_DESTDIR}/boot
	install -m 0644 ${D}/boot/bw-migrate.scr ${SYSROOT_DESTDIR}/boot
}

FILES_${PN} = "/boot/*"
{'fraction_non_alphanumeric': 0.1353433835845896, 'fraction_numerical': 0.034170854271356785, 'mean_word_length': 4.409420289855072, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4816464', 'n_tokens_mistral': 1220, 'n_tokens_neox': 1148, 'n_words': 270}