blob: 841fe16a36121b5d753082ab4e103307a00ea0f8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
|
require recipes-bsp/ti-linux-fw/ti-linux-fw.inc
DEPENDS = "openssl-native u-boot-mkimage-native dtc-native virtual/bootloader"
DEPENDS_remove_am65xx-evm-k3r5 = " virtual/bootloader"
DEPENDS_remove_am65xx-hs-evm-k3r5 = " virtual/bootloader"
DEPENDS_remove_am65xx-hs-evm-k3r5-sr2 = " virtual/bootloader"
DEPENDS_remove_j7-evm-k3r5 = " virtual/bootloader"
DEPENDS_remove_j7-hs-evm-k3r5 = " virtual/bootloader"
DEPENDS_remove_j7-hs-evm-k3r5-sr1-1 = " virtual/bootloader"
CLEANBROKEN = "1"
PR = "${INC_PR}.2"
# Loaded by R5F core
COMPATIBLE_MACHINE = "k3r5"
COMPATIBLE_MACHINE_aarch64 = "null"
PACKAGE_ARCH = "${MACHINE_ARCH}"
TI_SECURE_DEV_PKG ?= ""
export TI_SECURE_DEV_PKG
SYSFW_SOC ?= "unknown"
SYSFW_SUFFIX ?= "unknown"
SYSFW_CONFIG ?= "unknown"
SYSFW_PREFIX = "sci"
SYSFW_PREFIX_j7-evm-k3r5 = "fs"
SYSFW_PREFIX_j7-hs-evm-k3r5 = "fs"
SYSFW_PREFIX_j7-hs-evm-k3r5-sr1-1 = "fs"
SYSFW_PREFIX_j7200-evm-k3r5 = "fs"
SYSFW_PREFIX_j7200-hs-evm-k3r5 = "fs"
SYSFW_PREFIX_j721s2-evm-k3r5 = "fs"
SYSFW_PREFIX_j721s2-hs-evm-k3r5 = "fs"
SYSFW_PREFIX_am62xx-evm-k3r5 = "fs"
SYSFW_TISCI = "${S}/ti-sysfw/ti-${SYSFW_PREFIX}-firmware-${SYSFW_SOC}-*.bin"
SYSFW_TIBOOT3 = "tiboot3-${SYSFW_SOC}-${SYSFW_SUFFIX}-${SYSFW_CONFIG}.bin"
SYSFW_TIBOOT3_SYMLINK ?= "tiboot3.bin"
SYSFW_BINARY = "sysfw-${SYSFW_SOC}-${SYSFW_CONFIG}.itb"
SYSFW_VBINARY = "sysfw-${PV}-${SYSFW_SOC}-${SYSFW_CONFIG}.itb"
SYSFW_IMAGE = "sysfw-${SYSFW_SOC}-${SYSFW_CONFIG}.itb"
SYSFW_SYMLINK ?= "sysfw.itb"
CFLAGS[unexport] = "1"
LDFLAGS[unexport] = "1"
AS[unexport] = "1"
LD[unexport] = "1"
do_configure[noexec] = "1"
EXTRA_OEMAKE = "\
CROSS_COMPILE=${TARGET_PREFIX} SOC=${SYSFW_SOC} SOC_TYPE=${SYSFW_SUFFIX} \
CONFIG=${SYSFW_CONFIG} SYSFW_DIR="${S}/ti-sysfw" \
SBL="${STAGING_DIR_HOST}/boot/u-boot-spl.bin" \
"
EXTRA_OEMAKE_remove_am65xx-evm-k3r5 = " SBL="${STAGING_DIR_HOST}/boot/u-boot-spl.bin""
EXTRA_OEMAKE_remove_am65xx-hs-evm-k3r5 = " SBL="${STAGING_DIR_HOST}/boot/u-boot-spl.bin""
EXTRA_OEMAKE_remove_am65xx-hs-evm-k3r5-sr2 = " SBL="${STAGING_DIR_HOST}/boot/u-boot-spl.bin""
EXTRA_OEMAKE_remove_j7-evm-k3r5 = " SBL="${STAGING_DIR_HOST}/boot/u-boot-spl.bin""
EXTRA_OEMAKE_remove_j7-hs-evm-k3r5 = " SBL="${STAGING_DIR_HOST}/boot/u-boot-spl.bin""
EXTRA_OEMAKE_remove_j7-hs-evm-k3r5-sr1-1 = " SBL="${STAGING_DIR_HOST}/boot/u-boot-spl.bin""
do_compile() {
cd ${WORKDIR}/imggen/
oe_runmake
}
do_install() {
install -d ${D}/boot
if [ -f "${WORKDIR}/imggen/${SYSFW_BINARY}" ]; then
install -m 644 ${WORKDIR}/imggen/${SYSFW_BINARY} ${D}/boot/${SYSFW_VBINARY}
ln -sf ${SYSFW_VBINARY} ${D}/boot/${SYSFW_IMAGE}
if [ ! -z "${SYSFW_SYMLINK}" ]; then
ln -sf ${SYSFW_VBINARY} ${D}/boot/${SYSFW_SYMLINK}
fi
fi
if [ -f "${WORKDIR}/imggen/${SYSFW_TIBOOT3}" ]; then
install -m 644 ${WORKDIR}/imggen/${SYSFW_TIBOOT3} ${D}/boot/${SYSFW_TIBOOT3}
if [ ! -z "${SYSFW_TIBOOT3_SYMLINK}" ]; then
ln -sf ${SYSFW_TIBOOT3} ${D}/boot/${SYSFW_TIBOOT3_SYMLINK}
fi
fi
}
FILES_${PN} = "/boot"
inherit deploy
do_deploy () {
install -d ${DEPLOYDIR}
if [ -f "${WORKDIR}/imggen/${SYSFW_BINARY}" ]; then
install -m 644 ${WORKDIR}/imggen/${SYSFW_BINARY} ${DEPLOYDIR}/${SYSFW_VBINARY}
ln -sf ${SYSFW_VBINARY} ${DEPLOYDIR}/${SYSFW_IMAGE}
if [ ! -z "${SYSFW_SYMLINK}" ]; then
ln -sf ${SYSFW_VBINARY} ${DEPLOYDIR}/${SYSFW_SYMLINK}
install -m 644 ${SYSFW_TISCI} ${DEPLOYDIR}/
fi
fi
if [ -f "${WORKDIR}/imggen/${SYSFW_TIBOOT3}" ]; then
install -m 644 ${WORKDIR}/imggen/${SYSFW_TIBOOT3} ${DEPLOYDIR}/${SYSFW_TIBOOT3}
if [ ! -z "${SYSFW_TIBOOT3_SYMLINK}" ]; then
ln -sf ${SYSFW_TIBOOT3} ${DEPLOYDIR}/${SYSFW_TIBOOT3_SYMLINK}
install -m 644 ${SYSFW_TISCI} ${DEPLOYDIR}/
fi
fi
}
addtask deploy before do_build after do_compile
|