1 ##############################################################
2 # kernel image parameters. It resides on a seperate flash partition
4 KERNEL_IMAGETYPE = "uImage"
5 UBOOT_ENTRYPOINT = "30008000"
7 COMPATIBLE_HOST = "arm.*-linux"
8 COMPATIBLE_MACHINE = "om-gta01|om-gta02|om-3d7k"
10 KERNEL_IMAGE_SYMLINK_NAME_om-gta01 = "uImage-GTA01.bin"
11 KERNEL_IMAGE_SYMLINK_NAME_om-gta01 = "uImage-GTA02.bin"
12 KERNEL_IMAGE_SYMLINK_NAME_om-gta01 = "uImage-OM3D7K.bin"
14 CMDLINE = "unused -- bootloader passes ATAG list"
16 ###############################################################
17 # module configs specific to this kernel
21 module_autoload_ohci-hcd = "ohci-hcd"
22 module_autoload_hci_usb = "hci_usb"
23 module_autoload_g_ether = "g_ether"
25 module_autoload_snd-soc-neo1973-wm8753 = "snd-soc-neo1973-wm8753"
27 module_autoload_snd-soc-neo1973-gta02-wm8753 = "snd-soc-neo1973-gta02-wm8753"
29 module_autoload_snd-soc-neo1973-gta02-wm8753 = ""
31 module_autoload_s3cmci = "s3cmci"
33 ################################################################
34 # extra stuff we need for openmoko that is not in linux.inc
37 # fix deconfig if we're on GTA01
38 do_configure_prepend() {
39 install -m 0644 ${WORKDIR}/defconfig-oe ${WORKDIR}/defconfig
40 if [ ${MACHINE} == "om-gta01" ]; then
41 echo -n "fixing up configuration for Openmoko GTA01..."
42 sed -i -e s,CONFIG_S3C_LOWLEVEL_UART_PORT=2,CONFIG_S3C_LOWLEVEL_UART_PORT=0, ${WORKDIR}/defconfig
43 sed -i -e s,CONFIG_DEBUG_S3C_UART=2,CONFIG_DEBUG_S3C_UART=0, ${WORKDIR}/defconfig
46 if [ ${MACHINE} == "om-gta02" ]; then
47 echo -n "fixing up configuration for Openmoko GTA02..."
52 # symlink the latest uImage (should go to linux.inc IMO)
54 rm -f ${KERNEL_IMAGE_SYMLINK_NAME}.bin
55 ln -sf ${DEPLOY_DIR_IMAGE}/uImage-${PV}-${PR}-${MACHINE_ARCH}.bin ${DEPLOY_DIR_IMAGE}/uImage-${MACHINE_ARCH}-latest.bin
58 # opkg flash update service
59 RDEPENDS_kernel-image += "mtd-utils"
61 pkg_postinst_kernel-image () {
63 # Get the lastest root file system value of boot args
64 boot_arg=`cat /proc/cmdline |tr " " "\n"|grep "root=" |tail -n 1`
65 has_mtdblock=`echo $boot_arg |grep mtdblock`
67 if test "x$D" != "x"; then
69 elif test "empty$has_mtdblock" != "empty"; then
70 if [ -f ${sysconfdir}/default/flashkernel ] ; then
71 echo "Upgrading Kernel in Flash"
72 echo "DO NOT stop this process"
74 MTD_KERNEL_PARTITION=`cat /proc/mtd | grep kernel | cut -d':' -f1`
75 MTD_KERNEL_PARTITION=/dev/$MTD_KERNEL_PARTITION
77 if [ "x$MTD_KERNEL_PARTITION" = "x" ] ; then
81 if [ ! -f /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${KERNEL_VERSION} ] ; then
85 ${bindir}/flash_eraseall $MTD_KERNEL_PARTITION
86 ${bindir}/nandwrite -p $MTD_KERNEL_PARTITION /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${KERNEL_VERSION}
88 touch ${sysconfdir}/default/flashkernel
91 echo "You are not booting from NAND, don't flash kernel into mtdblock."