-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathlinux-hp-tenderloin_git.bb
50 lines (37 loc) · 1.68 KB
/
linux-hp-tenderloin_git.bb
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
require recipes-kernel/linux/linux.inc
DESCRIPTION = "Linux kernel for HP Touchpad"
# Mark archs/machines that this kernel supports
COMPATIBLE_MACHINE = "tenderloin"
SRC_URI = " \
git://github.com/shr-distribution/linux.git;branch=tenderloin/3.4/cm-12.1 \
"
S = "${WORKDIR}/git"
do_configure_prepend() {
cp -v -f ${S}/arch/arm/configs/tenderloin_android_defconfig ${WORKDIR}/defconfig
}
SRCREV = "a15c40737fbcb0a7915958263fd6552c80dc8fe0"
do_deploy[depends] += "initramfs-android-image:do_image_complete"
DEPENDS += "u-boot-mkimage-native"
KERNEL_OUTPUT ?= "${KERNEL_OUTPUT_DIR}/${KERNEL_IMAGETYPE}"
KV = "3.4.106"
PV = "${KV}+gitr${SRCPV}"
# for bumping PR bump MACHINE_KERNEL_PR in the machine config
inherit machine_kernel_pr
INITRAMFS_NAME = "initramfs-android-image-${MACHINE}${IMAGE_NAME_SUFFIX}.cpio.gz"
INITRAMFS_UIMAGE = "initramfs-android-image-${MACHINE}${IMAGE_NAME_SUFFIX}.uImage"
do_deploy_append() {
if [ ! -e ${DEPLOY_DIR_IMAGE}/${INITRAMFS_NAME} ] ; then
bbfatal "Required initramfs image ${DEPLOY_DIR_IMAGE}/${INITRAMFS_NAME} is not available!"
fi
cp ${DEPLOYDIR}/${KERNEL_IMAGETYPE} ${B}/${KERNEL_OUTPUT}.orig
# pack initramfs as uboot image
echo "pack initramfs as uboot image..."
uboot-mkimage -A arm -O Linux -T ramdisk -n 'HP Touchpad boot initrd' -C none \
-e 0 -a 0 -d ${DEPLOY_DIR_IMAGE}/${INITRAMFS_NAME} \
${B}/${INITRAMFS_UIMAGE}
# now pack kernel and initramfs together
echo "now pack kernel and initramfs together..."
uboot-mkimage -A arm -O Linux -T multi -n 'HP Touchpad boot' -C none \
-e 0 -a 0 -d ${B}/${KERNEL_OUTPUT}.orig:${B}/${INITRAMFS_UIMAGE} \
${DEPLOYDIR}/${KERNEL_IMAGETYPE}
}