1 ##############################################################
2 # kernel image parameters. It resides on a seperate flash partition
4 COMPATIBLE_HOST = "arm.*-linux"
5 COMPATIBLE_MACHINE = "om-gta01|om-gta02"
7 FILESPATHPKG .= ":linux-${PV}"
9 # add extra PR for linux-openmoko kernels
10 # because we expect OM/SHR patches to be updated quite often and don't want to
11 # force everybody using same linux recipe to upgrade
12 # make sure PR is set before appending to it
15 PR_append = "-oe${OM-PR}"
17 S = "${WORKDIR}/linux-${PV}"
19 DESCRIPTION_${PN} = "Linux kernel for the Openmoko Neo GSM Smartphones"
21 KERNEL_IMAGE_SYMLINK_NAME_om-gta01 = "uImage-GTA01.bin"
22 KERNEL_IMAGE_SYMLINK_NAME_om-gta02 = "uImage-GTA02.bin"
24 CMDLINE = "unused -- bootloader passes ATAG list"
26 # Do keep OABI compat for om-gta01 to keep the gllin binary working
27 ARM_KEEP_OABI_om-gta01 = "1"
29 # Make sure not to use thumb[-interworking]
30 ARM_INSTRUCTION_SET = "arm"
31 THUMB_INTERWORKING = "no"
33 ###############################################################
34 # module configs specific to this kernel
38 module_autoload_ohci-hcd = "ohci-hcd"
39 module_autoload_hci_usb = "hci_usb"
40 module_autoload_g_ether = "g_ether"
41 module_autoload_ppp_generic = "ppp_generic"
42 # snd modules module_autoload_snd-soc-neo1973-*-wm8753 are in machine.conf
44 module_autoload_s3cmci = "s3cmci"
46 ################################################################
47 # extra stuff we need for openmoko that is not in linux.inc
50 # symlink the latest uImage (should go to linux.inc IMO)
52 rm -f ${KERNEL_IMAGE_SYMLINK_NAME}.bin
53 ln -sf ${DEPLOY_DIR_IMAGE}/uImage-${PV}-${PR}-${MACHINE_ARCH}.bin ${DEPLOY_DIR_IMAGE}/uImage-${MACHINE_ARCH}-latest.bin
56 # opkg flash update service
57 RDEPENDS_kernel-image += "mtd-utils"
59 pkg_postinst_kernel-image () {
61 # Get the lastest root file system value of boot args
62 boot_arg=`cat /proc/cmdline |tr " " "\n"|grep "root=" |tail -n 1`
63 has_mtdblock=`echo $boot_arg |grep mtdblock`
64 has_ubi=`echo $boot_arg |grep ubi`
66 if test "x$D" != "x"; then
68 elif test "empty$has_mtdblock" != "empty" -o "empty$has_ubi" != "empty"; then
69 if [ -f ${sysconfdir}/default/flashkernel ] ; then
70 echo "Upgrading Kernel in Flash"
71 echo "DO NOT stop this process"
73 MTD_KERNEL_PARTITION=`cat /proc/mtd | grep kernel | cut -d':' -f1`
74 MTD_KERNEL_PARTITION=/dev/$MTD_KERNEL_PARTITION
76 if [ "x$MTD_KERNEL_PARTITION" = "x" ] ; then
80 if [ ! -f /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${KERNEL_VERSION} ] ; then
84 ${bindir}/flash_eraseall $MTD_KERNEL_PARTITION
85 ${bindir}/nandwrite -p $MTD_KERNEL_PARTITION /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${KERNEL_VERSION}
87 touch ${sysconfdir}/default/flashkernel
90 echo "You are not booting from NAND, don't flash kernel into mtdblock."