conf/machine/include: add kexecboot.inc
[openembedded.git] / conf / machine / include / zaurus-2.6.inc
1 # Zaurus specific configuration for kernel 2.6
2 # Additionally, clamshell specific stuff in zaurus-clamshell.inc
3
4 TARGET_ARCH = "arm"
5 PACKAGE_EXTRA_ARCHS = "armv4 armv4t armv5e armv5te"
6 PACKAGE_EXTRA_ARCHS_collie = ""
7
8 MACHINE_KERNEL_VERSION = "2.6"
9
10 ERASEBLOCKSIZE = "0x4000"
11 ERASEBLOCKSIZE_akita = "0x20000"
12
13 EXTRA_IMAGECMD_jffs2 = "--little-endian --eraseblock=${ERASEBLOCKSIZE} --pad --faketime -n" 
14 IMAGE_CMD_jffs2 = "mkfs.jffs2 -x lzo --root=${IMAGE_ROOTFS} --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 ${EXTRA_IMAGECMD}"
15 EXTRA_IMAGEDEPENDS += "zaurus-updater"
16
17 SERIAL_CONSOLE = "115200 ttyS0"
18 SERIAL_CONSOLE_collie = "115200 ttySA0"
19
20 PREFERRED_PROVIDER_virtual/kernel = "linux-rp"
21 PREFERRED_PROVIDER_virtual/xserver = "xserver-kdrive"
22 PREFERRED_PROVIDER_virtual/xserver_c7x0 = "xserver-kdrive-imageon"
23
24 PCMCIA_MANAGER ?= "pcmciautils"
25
26 MACHINE_FEATURES = "kernel26 apm alsa pcmcia irda usbgadget keyboard touchscreen screen vfat"
27 MACHINE_FEATURES_append_tosa  = " usbhost wifi "
28 MACHINE_FEATURES_append_akita = " usbhost "
29 MACHINE_FEATURES_append_spitz = " usbhost ext2 "
30
31 MACHINE_EXTRA_RDEPENDS = "zaurusd"
32 MACHINE_EXTRA_RRECOMMENDS_c7x0   = "kernel-module-snd-soc-corgi kernel-module-pxa2xx-cs kernel-module-pcmcia"
33 MACHINE_EXTRA_RRECOMMENDS_akita  = "kernel-module-snd-soc-spitz kernel-module-pxa2xx-cs kernel-module-pcmcia"
34 MACHINE_EXTRA_RRECOMMENDS_spitz  = "kernel-module-snd-soc-spitz"
35 MACHINE_EXTRA_RRECOMMENDS_poodle = "kernel-module-snd-soc-poodle kernel-module-pxa2xx-cs kernel-module-pcmcia"
36 MACHINE_EXTRA_RRECOMMENDS_collie = "kernel-module-locomo-spi kernel-module-sa1100-cs kernel-module-mmc-block \
37         kernel-module-collie-ts kernel-module-leds-locomo kernel-module-locomokbd kernel-module-mmc-spi \
38         kernel-module-power"
39
40 GUI_MACHINE_CLASS = "bigscreen"
41 GUI_MACHINE_CLASS_collie = "smallscreen"
42 GUI_MACHINE_CLASS_poodle = "smallscreen"
43
44 KERNEL_IMAGE_MAXSIZE = "1294336"
45 KERNEL_IMAGE_MAXSIZE_collie = "1048576"
46
47 MACHINE_POSTPROCESS_COMMAND = "zaurus_make_installkit"
48
49 zaurus_make_installkit () {
50     cd ${DEPLOY_DIR_IMAGE}
51     rm -rf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}-installkit/         
52     mkdir ${IMAGE_NAME}-installkit/
53
54     # Get the latest kernel using the zImage-<machine>.bin symlink
55     if [ "${@base_contains('MACHINE_FEATURES', 'kexecboot', 'true', 'false',d)}" ]; then
56             [ -f "zImage-kexecboot-${MACHINE}.bin" ] && cp zImage-kexecboot-${MACHINE}.bin ${IMAGE_NAME}-installkit/zImage
57             # we need also tgz for mmc or cf cards
58             cp ${IMAGE_NAME}.rootfs.tar.gz ${IMAGE_NAME}-installkit/image.tgz
59     else
60             cp zImage-${MACHINE}.bin ${IMAGE_NAME}-installkit/zImage
61     fi
62
63     if [ "${MACHINE}" = "spitz" ]; then
64         cp gnu-tar ${IMAGE_NAME}-installkit/
65         cp ${IMAGE_NAME}.rootfs.tar.gz ${IMAGE_NAME}-installkit/hdimage1.tgz
66     else
67         [ -f ${IMAGE_NAME}.rootfs.jffs2 ] && cp ${IMAGE_NAME}.rootfs.jffs2 ${IMAGE_NAME}-installkit/initrd.bin
68     fi
69
70     # All zaurus machines except collie need updater.sh
71     if [ "${MACHINE}" != "collie" ]; then
72         cp updater.sh.${MACHINE} ${IMAGE_NAME}-installkit/updater.sh
73     fi
74  
75     tar czf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}-installkit.tgz ${IMAGE_NAME}-installkit/
76     md5sum ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}-installkit.tgz > ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}-installkit.tgz.md5
77     rm -rf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}-installkit/     
78 }
79
80 # Don't include kernels in standard images for Zaurus machines
81 RDEPENDS_kernel-base = ""
82
83 KERNEL_IMAGETYPE ?= "zImage"