summaryrefslogtreecommitdiff
path: root/recipes-kernel/linux/linux_3.12.70.bb
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/linux/linux_3.12.70.bb')
-rw-r--r--recipes-kernel/linux/linux_3.12.70.bb33
1 files changed, 33 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux_3.12.70.bb b/recipes-kernel/linux/linux_3.12.70.bb
index 87e5fbe..7d64f36 100644
--- a/recipes-kernel/linux/linux_3.12.70.bb
+++ b/recipes-kernel/linux/linux_3.12.70.bb
@@ -59,3 +59,36 @@ DTB_APPEND_mtcap = "mtcap"
do_rm_work() {
echo "skipping"
}
+
+
+pkg_preinst_kernel-image-uimage() {
+ set -x
+ mkdir -m 0755 /var/volatile/boot 2>/dev/null || true
+ ls /boot || true
+ ls -l /boot | true
+ rm -rf /boot
+ ln -sf /var/volatile/boot /boot 2>/dev/null || true
+}
+
+pkg_prerm_kernel-image-uimage() {
+ rm -rf /var/volatile/boot || true
+ rm -rf /boot || true
+}
+
+PACKAGES =+ "kernel-image-uimage-inst"
+RDEPENDS_kernel-image-uimage-inst += "kernel-image-uimage-${PV}"
+ALLOW_EMPTY_kernel-image-uimage-inst = "1"
+
+pkg_postinst_kernel-image-uimage-inst() {
+ # Only installs all the kernel on the device (D is defined in bitbake)
+ if [[ -z "$D" ]] ; then
+ logger -s -p user.info -t opkg "Upgrading kernel ${PV} -- poweroff will create an unbootable device"
+ set -x
+ kernel_mtd="/dev/$(cat /proc/mtd | grep '\"uImage\"' | cut -d : -f 1)"
+ flash_erase ${kernel_mtd} 0 0
+ if nandwrite -p ${kernel_mtd} /boot/uImage-${PV} ; then
+ echo 'Kernel image update is successful'
+ fi
+ set +x
+ fi
+}