diff options
Diffstat (limited to 'meta-extras/packages/linux/linux-openmoko.inc')
-rw-r--r-- | meta-extras/packages/linux/linux-openmoko.inc | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/meta-extras/packages/linux/linux-openmoko.inc b/meta-extras/packages/linux/linux-openmoko.inc new file mode 100644 index 0000000000..a0bf48e609 --- /dev/null +++ b/meta-extras/packages/linux/linux-openmoko.inc | |||
@@ -0,0 +1,25 @@ | |||
1 | RDEPENDS_kernel-image += "mtd-utils" | ||
2 | |||
3 | pkg_postinst_kernel-image () { | ||
4 | if test "x$D" != "x"; then | ||
5 | exit 1 | ||
6 | else | ||
7 | if [ -f ${sysconfdir}/default/flashkernel ] ; then | ||
8 | echo "Upgrading Kernel in Flash" | ||
9 | echo "DO NOT stop this process" | ||
10 | |||
11 | MTD_KERNEL_PARTITION=`cat /proc/mtd | grep kernel | cut -d':' -f1` | ||
12 | MTD_KERNEL_PARTITION=/dev/$MTD_KERNEL_PARTITION | ||
13 | |||
14 | if [ "x$MTD_KERNEL_PARTITION" = "x" ] ; then | ||
15 | exit 1 | ||
16 | fi | ||
17 | |||
18 | ${bindir}/flash_eraseall $MTD_KERNEL_PARTITION | ||
19 | ${bindir}/nandwrite -p $MTD_KERNEL_PARTITION /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${KERNEL_VERSION} | ||
20 | else | ||
21 | touch ${sysconfdir}/default/flashkernel | ||
22 | fi | ||
23 | fi | ||
24 | } | ||
25 | |||