aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-petitboot_4.0.bb
blob: 8742dde1af75113b4d8bc2e29ed648e7db69b65c (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
# Copyright (C) 2015 Romain Perier
# Released under the MIT license (see COPYING.MIT for the terms)

inherit kernel
require recipes-kernel/linux/linux-yocto.inc

SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git;nobranch=1 \
	file://0001-ARM-dts-rockchip-enable-gmac-on-rk3288-firefly.patch \
	file://defconfig"

SRCREV = "39a8804455fb23f09157341d3ba7db6d7ae6ee76"
# Override this variable in order to don't pass --noallconfig to configme,
# which restarts configuration from scratch most of the time
KCONFIG_MODE = " "
LINUX_VERSION = "4.0"
# Override local version in order to use the one generated by linux build system
# And not "yocto-standard"
LINUX_VERSION_EXTENSION = ""
PR = "r1"
PV = "${LINUX_VERSION}"

PROVIDES = "${PN}"
DEPENDS += "rkflashtool-native"

# Include only supported boards for now
COMPATIBLE_MACHINE = "(rk3188-radxarock|rk3066a-marsboard|rk3288-firefly)"

# Build the devicetree blob in kernel_do_compile
KERNEL_ALT_IMAGETYPE = "${KERNEL_DEVICETREE}"
# The resulting image to be deployed in DEPLOY_IMAGE_DIR
KERNEL_OUTPUT = "${B}/arch/${ARCH}/boot/${KERNEL_IMAGETYPE}-dtb"

KERNEL_IMAGE_BASE_NAME = "RK3XPetitbootLoader-${PV}-${MACHINE}"
KERNEL_IMAGE_SYMLINK_NAME = "RK3XPetitbootLoader-${MACHINE}"

INITRAMFS_IMAGE = "petitboot-initramfs-image"
INITRAMFS_TASK = "${INITRAMFS_IMAGE}:do_rootfs"

do_compile_append() {
    cat ${B}/arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${B}/arch/${ARCH}/boot/dts/${KERNEL_ALT_IMAGETYPE} > ${KERNEL_OUTPUT}
}

do_deploy_append() {
    rkcrc -k ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.img
    mv ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.img ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
}