Merge bk://openembedded@openembedded.bkbits.net/packages
[openembedded.git] / linux / opensimpad_2.4.25-vrs2-pxa1-jpm1.oe
1 DESCRIPTION = "Linux kernel for the SIEMENS SIMpad family of devices."
2 MAINTAINER = "Michael 'Mickey' Lauer <mickey@Vanille.de>"
3 LICENSE = "GPL"
4 KV = "${@oe.data.getVar('PV',d,True).split('-')[0]}"
5 VRSV = "${@oe.data.getVar('PV',d,True).split('-')[1]}"
6 PXAV = "${@oe.data.getVar('PV',d,True).split('-')[2]}"
7 JPMV = "${@oe.data.getVar('PV',d,True).split('-')[3]}"
8 PR = "r5"
9
10 FILESDIR = "${@os.path.dirname(oe.data.getVar('FILE',d,1))}/opensimpad-${PV}"
11
12 SRC_URI = "ftp://ftp.kernel.org/pub/linux/kernel/v2.4/linux-${KV}.tar.bz2 \
13            file://${KV}-${VRSV}.patch;patch=1 \
14            file://${KV}-${VRSV}-${PXAV}.patch;patch=1 \
15            file://${KV}-${VRSV}-${PXAV}-${JPMV}.patch;patch=1 \
16            file://sound-volume-reversed.patch;patch=1 \
17            file://disable-pcmcia-probe.patch;patch=1 \
18            file://mkdep.patch;patch=1 \
19            file://defconfig-${MACHINE} \
20            ftp://ftp.xs4all.nl/pub/crypto/freeswan/kernpatch/freeswan-2.06.k2.4.patch.gz;patch=1 \
21            file://mipv6-1.1-v2.4.25.patch;patch=1"
22
23 # apply this when we have a patch that allows building with gcc 3.x:
24 # SRC_URI_append = file://gcc-3.3.patch;patch=1
25 # SRC_URI_append = file://machtune-args.patch;patch=1
26
27 S = "${WORKDIR}/linux-${KV}"
28
29 inherit kernel
30
31 KERNEL_CCSUFFIX = "-3.3.3"
32 COMPATIBLE_HOST = "arm.*-linux"
33
34 SIMPAD_MEM     = ${@oe.data.getVar("SIMPAD_MEMORY_SIZE",d,1)  or "32"}
35 SIMPAD_RD      = ${@oe.data.getVar("SIMPAD_RAMDISK_SIZE",d,1) or "32"}
36 export CMDLINE = ${@oe.data.getVar("SIMPAD_CMDLINE",d,1) or  "mtdparts=sa1100:512k(boot),1m(kernel),-(root) console=ttySA root=1f02 noinitrd jffs2_orphaned_inodes=delete rootfstype=jffs2 "}
37 EXTRA_OEMAKE = ""
38
39 do_configure() {
40         install -m 0644 ${WORKDIR}/defconfig-${MACHINE} ${S}/.config || die "No default configuration for ${MACHINE} available."
41               
42         mem=${SIMPAD_MEM}
43         rd=${SIMPAD_RD}
44         mempos=`echo "obase=16; $mem * 1024 * 1024" | bc`
45         rdsize=`echo "$rd * 1024" | bc`
46         total=`expr $mem + $rd`
47         addr=`echo "obase=16; ibase=16; C000000 + $mempos" | bc`
48         if [ "$rd" == "0" ]
49         then
50                 echo "# CONFIG_MTD_MTDRAM_SA1100 is not set" >> ${S}/.config
51         else
52                 echo "CONFIG_MTD_MTDRAM_SA1100=y"           >> ${S}/.config
53                 echo "CONFIG_MTDRAM_TOTAL_SIZE=$rdsize"     >> ${S}/.config
54                 echo "CONFIG_MTDRAM_ERASE_SIZE=1"           >> ${S}/.config
55                 echo "CONFIG_MTDRAM_ABS_POS=$addr"          >> ${S}/.config
56         fi
57         echo "CONFIG_CMDLINE=\"${CMDLINE} mem=${mem}M\"" >> ${S}/.config
58         oe_runmake oldconfig
59 }
60