diff options
author | Marcin Juszkiewicz <hrw@openedhand.com> | 2007-10-08 09:17:11 +0000 |
---|---|---|
committer | Marcin Juszkiewicz <hrw@openedhand.com> | 2007-10-08 09:17:11 +0000 |
commit | a68b4316239c67fc6e9cf12e562a6e2375754182 (patch) | |
tree | 6b16a8c5ac19d296a66f1dd4a5f2dda7d58851cd /meta/packages/linux/linux.inc | |
parent | c8587daecba885c0ba5438aaea66281aa998ac34 (diff) | |
download | poky-a68b4316239c67fc6e9cf12e562a6e2375754182.tar.gz |
linux 2.6.22: kernel for cm-x270 taken from OE
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2853 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/linux/linux.inc')
-rw-r--r-- | meta/packages/linux/linux.inc | 137 |
1 files changed, 137 insertions, 0 deletions
diff --git a/meta/packages/linux/linux.inc b/meta/packages/linux/linux.inc new file mode 100644 index 0000000000..41b0c13179 --- /dev/null +++ b/meta/packages/linux/linux.inc | |||
@@ -0,0 +1,137 @@ | |||
1 | DESCRIPTION = "Linux Kernel" | ||
2 | SECTION = "kernel" | ||
3 | LICENSE = "GPL" | ||
4 | |||
5 | inherit kernel | ||
6 | |||
7 | # These devices need mkimage to generate a kernel image | ||
8 | DEPENDS_append_kb9202 = " u-boot-mkimage-openmoko-native " | ||
9 | DEPENDS_append_at32stk1000 = " u-boot-mkimage-openmoko-native " | ||
10 | DEPENDS_append_atngw100 = " u-boot-mkimage-openmoko-native " | ||
11 | DEPENDS_append_at91sam9263ek = " u-boot-mkimage-openmoko-native " | ||
12 | DEPENDS_append_at91sam9261ek = " u-boot-mkimage-openmoko-native " | ||
13 | DEPENDS_append_at91sam9260ek = " u-boot-mkimage-openmoko-native " | ||
14 | DEPENDS_append_sarge-at91 = " u-boot-mkimage-openmoko-native " | ||
15 | DEPENDS_append_gumstix-connex = " u-boot-mkimage-openmoko-native " | ||
16 | DEPENDS_append_gumstix-verdex = " u-boot-mkimage-openmoko-native " | ||
17 | DEPENDS_append_fic-gta01 = " u-boot-mkimage-openmoko-native " | ||
18 | DEPENDS_append_fic-gta02 = " u-boot-mkimage-openmoko-native " | ||
19 | |||
20 | |||
21 | # Specify the commandline for your device | ||
22 | |||
23 | #boot from mmc | ||
24 | CMDLINE_at91sam9263ek = "mem=64M console=ttyS0,115200 root=/dev/mmcblk0p1 rootfstype=ext2 rootdelay=5" | ||
25 | #boot from nfs | ||
26 | #CMDLINE_at91sam9263ek = "mem=64M console=ttyS0,115200 root=301 root=/dev/nfs nfsroot=172.20.3.1:/data/at91 ip=172.20.0.5:::255.255.0.0" | ||
27 | |||
28 | do_configure_prepend() { | ||
29 | echo "" > ${S}/.config | ||
30 | |||
31 | # | ||
32 | # logo support, if you supply logo_linux_clut224.ppm in SRC_URI, then it's going to be used | ||
33 | # | ||
34 | if [ -e ${WORKDIR}/logo_linux_clut224.ppm ]; then | ||
35 | install -m 0644 ${WORKDIR}/logo_linux_clut224.ppm drivers/video/logo/logo_linux_clut224.ppm | ||
36 | echo "CONFIG_LOGO=y" >> ${S}/.config | ||
37 | echo "CONFIG_LOGO_LINUX_CLUT224=y" >> ${S}/.config | ||
38 | fi | ||
39 | |||
40 | # | ||
41 | # oabi / eabi support | ||
42 | # | ||
43 | if [ "${TARGET_OS}" = "linux-gnueabi" -o "${TARGET_OS}" = "linux-uclibcgnueabi" ]; then | ||
44 | echo "CONFIG_AEABI=y" >> ${S}/.config | ||
45 | echo "CONFIG_OABI_COMPAT=y" >> ${S}/.config | ||
46 | else | ||
47 | echo "# CONFIG_AEABI is not set" >> ${S}/.config | ||
48 | echo "# CONFIG_OABI_COMPAT is not set" >> ${S}/.config | ||
49 | fi | ||
50 | |||
51 | echo "CONFIG_CMDLINE=\"${CMDLINE}\"" >> ${S}/.config | ||
52 | |||
53 | sed -e '/CONFIG_AEABI/d' \ | ||
54 | -e '/CONFIG_OABI_COMPAT=/d' \ | ||
55 | -e '/CONFIG_CMDLINE=/d' \ | ||
56 | -e '/CONFIG_LOGO=/d' \ | ||
57 | -e '/CONFIG_LOGO_LINUX_CLUT224=/d' \ | ||
58 | < '${WORKDIR}/defconfig' >>'${S}/.config' | ||
59 | |||
60 | # | ||
61 | # root-over-nfs-over-usb-eth support. Limited, but should cover some cases. | ||
62 | # Enable this by setting a proper CMDLINE_NFSROOT_USB. | ||
63 | # | ||
64 | if [ ! -z "${CMDLINE_NFSROOT_USB}" ]; then | ||
65 | oenote "Configuring the kernel for root-over-nfs-over-usb-eth with CMDLINE ${CMDLINE_NFSROOT_USB}" | ||
66 | sed -e '/CONFIG_INET/d' \ | ||
67 | -e '/CONFIG_IP_PNP=/d' \ | ||
68 | -e '/CONFIG_USB_GADGET=/d' \ | ||
69 | -e '/CONFIG_USB_GADGET_SELECTED=/d' \ | ||
70 | -e '/CONFIG_USB_ETH=/d' \ | ||
71 | -e '/CONFIG_NFS_FS=/d' \ | ||
72 | -e '/CONFIG_ROOT_NFS=/d' \ | ||
73 | -e '/CONFIG_CMDLINE=/d' \ | ||
74 | -i ${S}/.config | ||
75 | echo "CONFIG_INET=y" >> ${S}/.config | ||
76 | echo "CONFIG_IP_PNP=y" >> ${S}/.config | ||
77 | echo "CONFIG_USB_GADGET=y" >> ${S}/.config | ||
78 | echo "CONFIG_USB_GADGET_SELECTED=y" >> ${S}/.config | ||
79 | echo "CONFIG_USB_ETH=y" >> ${S}/.config | ||
80 | echo "CONFIG_NFS_FS=y" >> ${S}/.config | ||
81 | echo "CONFIG_ROOT_NFS=y" >> ${S}/.config | ||
82 | echo "CONFIG_CMDLINE=\"${CMDLINE_NFSROOT_USB}\"" >> ${S}/.config | ||
83 | fi | ||
84 | yes '' | oe_runmake oldconfig | ||
85 | } | ||
86 | |||
87 | # Support checking the kernel size since some kernels need to reside in partitions | ||
88 | # with a fixed length or there is a limit in transferring the kernel to memory | ||
89 | do_sizecheck() { | ||
90 | if [ ! -z "${KERNEL_IMAGE_MAXSIZE}" ]; then | ||
91 | size=`ls -l arch/${ARCH}/boot/${KERNEL_IMAGETYPE} | awk '{ print $5}'` | ||
92 | if [ $size -ge ${KERNEL_IMAGE_MAXSIZE} ]; then | ||
93 | rm arch/${ARCH}/boot/${KERNEL_IMAGETYPE} | ||
94 | die "This kernel (size=$size) is too big for your device. Please reduce the size of the kernel by making more of it modular." | ||
95 | fi | ||
96 | fi | ||
97 | } | ||
98 | |||
99 | do_install_prepend() { | ||
100 | if test -e arch/${ARCH}/boot/Image ; then | ||
101 | ln -f arch/${ARCH}/boot/Image arch/${ARCH}/boot/uImage | ||
102 | fi | ||
103 | |||
104 | if test -e arch/${ARCH}/boot/images/uImage ; then | ||
105 | ln -f arch/${ARCH}/boot/images/uImage arch/${ARCH}/boot/uImage | ||
106 | fi | ||
107 | } | ||
108 | |||
109 | UBOOT_ENTRYPOINT ?= "20008000" | ||
110 | |||
111 | KERNEL_IMAGE_BASE_NAME = ${KERNEL_IMAGETYPE}-${PV}-${PR}-${MACHINE}-${DATETIME} | ||
112 | |||
113 | do_deploy() { | ||
114 | install -d ${DEPLOY_DIR_IMAGE} | ||
115 | install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_BASE_NAME}.bin | ||
116 | tar -cvzf ${DEPLOY_DIR_IMAGE}/modules-${KERNEL_RELEASE}-${PR}-${MACHINE}.tgz -C ${D} lib | ||
117 | |||
118 | if test "x${KERNEL_IMAGETYPE}" = "xuImage" ; then | ||
119 | if test -e arch/${ARCH}/boot/compressed/vmlinux ; then | ||
120 | ${OBJCOPY} -O binary -R .note -R .comment -S arch/${ARCH}/boot/compressed/vmlinux linux.bin | ||
121 | uboot-mkimage -A ${ARCH} -O linux -T kernel -C none -a ${UBOOT_ENTRYPOINT} -e ${UBOOT_ENTRYPOINT} -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin ${DEPLOY_DIR_IMAGE}/uImage-${PV}-${PR}-${MACHINE}-${DATETIME}.bin | ||
122 | rm -f linux.bin | ||
123 | else | ||
124 | ${OBJCOPY} -O binary -R .note -R .comment -S vmlinux linux.bin | ||
125 | rm -f linux.bin.gz | ||
126 | gzip -9 linux.bin | ||
127 | uboot-mkimage -A ${ARCH} -O linux -T kernel -C gzip -a ${UBOOT_ENTRYPOINT} -e ${UBOOT_ENTRYPOINT} -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin.gz ${DEPLOY_DIR_IMAGE}/uImage-${PV}-${PR}-${MACHINE}-${DATETIME}.bin | ||
128 | rm -f linux.bin.gz | ||
129 | fi | ||
130 | fi | ||
131 | } | ||
132 | |||
133 | do_deploy[dirs] = "${S}" | ||
134 | |||
135 | addtask sizecheck before do_install after do_compile | ||
136 | addtask deploy before do_package after do_install | ||
137 | |||