blob: b972e24afec9426f45d3c6fba8a078027bf6a698 (
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
|
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI = "\
git://git.scalys.com/linux-fsl-qoriq;branch=scalys \
file://fit_image_template.its \
"
SRCREV = "0247864d78189c1ca73dfba348eeddcfeb618a35"
python __anonymous () {
d.appendVar("PACKAGES", " kernel-fitimage")
}
FILES_kernel-fitimage = "/boot/"
do_kernel_fitimage() {
cd ${B}
for i in ${KERNEL_FIT_IMAGES}; do
cp ${WORKDIR}/fit_image_template.its ${i}.its
sed -i "s/DTB_PLACEHOLDER/${i}/g" ${i}.its
uboot-mkimage -f ${i}.its ${B}/arch/${ARCH}/boot/${i}.itb
# Assemble the name for the fitImage
ITB_NAME=`echo ${KERNEL_IMAGE_BASE_NAME} | sed "s/${MACHINE}/${i}/g" | sed "s/uImage-/fitImage/g"`
ITB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${i}/g"`
install -d ${DEPLOYDIR}
install -m 0644 ${B}/arch/${ARCH}/boot/${i}.itb ${DEPLOYDIR}/${ITB_NAME}.itb
# create a symlink for the last generated fit image
cd ${DEPLOYDIR}
ln -sf ${ITB_NAME}.itb fitImage.itb
cd -
# Make the FIT image available on the target RFS
install -d ${D}/boot
install -m 0644 ${B}/arch/${ARCH}/boot/${i}.itb ${D}/boot/${ITB_NAME}.itb
# create a symlink for the last generated fit image
cd ${D}/boot/
ln -sf ${ITB_NAME}.itb fitImage.itb
cd -
done
}
# The install stage generates the DTB needed for the FIT image (linux-dtb.inc)
addtask do_kernel_fitimage after do_install before do_deploy
|