summaryrefslogtreecommitdiff
path: root/recipes-kernel/linux/linux-qoriq_4.1.bbappend
blob: 102703e440b71694d82890a7ecfdae25168f1909 (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
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

SRCREV = "df40dca3df785ec7f1cc7eb04812ab207499d65e"
SRC_URI = "git://source.sintecs.nl/scalys/linux-fsl-qoriq;protocol=http;branch=scalys file://fit_image_template.its"

python __anonymous () {
    d.appendVar("PACKAGES", " kernel-fitimage")
}

FILES_kernel-fitimage = "/boot/"

# Appending of simc-t10xx specific kernel configs to the used defconfig.
do_configure_prepend() {
         cat ${THISDIR}/../../../meta-scalys-ppc/recipes-kernel/linux/files/defconfig_append_t10xx >> ${KERNEL_DEFCONFIG}
}

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_package