summaryrefslogtreecommitdiffstats
path: root/meta-oe/classes/kernel.bbclass
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2012-03-29 06:59:12 +0200
committerKoen Kooi <koen@dominion.thruhere.net>2012-03-29 16:14:38 +0200
commitd110784db8e78f9b1aa877e3e9228792d34f4583 (patch)
tree61a0f45781e3a4c3120c2bef33b13c5695171ce0 /meta-oe/classes/kernel.bbclass
parent4e9eb3306881b218aae2cb00139a4eef3e5053b5 (diff)
downloadmeta-openembedded-d110784db8e78f9b1aa877e3e9228792d34f4583.tar.gz
kernel.bbclass: unify white spaces
* indentation was with spaces and tabs, unify to use tabs instead of spaces, because "python populate_packages" expects tabs (or 8 spaces) and we're doing populate_packages_preppend here Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/classes/kernel.bbclass')
-rw-r--r--meta-oe/classes/kernel.bbclass78
1 files changed, 39 insertions, 39 deletions
diff --git a/meta-oe/classes/kernel.bbclass b/meta-oe/classes/kernel.bbclass
index 1ef8e2a50..cfcd5e969 100644
--- a/meta-oe/classes/kernel.bbclass
+++ b/meta-oe/classes/kernel.bbclass
@@ -11,20 +11,20 @@ INITRAMFS_IMAGE ?= ""
11INITRAMFS_TASK ?= "" 11INITRAMFS_TASK ?= ""
12 12
13python __anonymous () { 13python __anonymous () {
14 kerneltype = d.getVar('KERNEL_IMAGETYPE', True) or '' 14 kerneltype = d.getVar('KERNEL_IMAGETYPE', True) or ''
15 if kerneltype == 'uImage': 15 if kerneltype == 'uImage':
16 depends = d.getVar("DEPENDS", True) 16 depends = d.getVar("DEPENDS", True)
17 depends = "%s u-boot-mkimage-native" % depends 17 depends = "%s u-boot-mkimage-native" % depends
18 d.setVar("DEPENDS", depends) 18 d.setVar("DEPENDS", depends)
19 19
20 image = d.getVar('INITRAMFS_IMAGE', True) 20 image = d.getVar('INITRAMFS_IMAGE', True)
21 if image: 21 if image:
22 d.setVar('INITRAMFS_TASK', '${INITRAMFS_IMAGE}:do_rootfs') 22 d.setVar('INITRAMFS_TASK', '${INITRAMFS_IMAGE}:do_rootfs')
23 23
24 machine_kernel_pr = d.getVar('MACHINE_KERNEL_PR', True) 24 machine_kernel_pr = d.getVar('MACHINE_KERNEL_PR', True)
25 25
26 if machine_kernel_pr: 26 if machine_kernel_pr:
27 d.setVar('PR', machine_kernel_pr) 27 d.setVar('PR', machine_kernel_pr)
28} 28}
29 29
30inherit kernel-arch deploy 30inherit kernel-arch deploy
@@ -96,7 +96,7 @@ kernel_do_compile() {
96do_compile_kernelmodules() { 96do_compile_kernelmodules() {
97 unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE 97 unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
98 if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then 98 if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
99 oe_runmake ${PARALLEL_MAKE} modules CC="${KERNEL_CC}" LD="${KERNEL_LD}" 99 oe_runmake ${PARALLEL_MAKE} modules CC="${KERNEL_CC}" LD="${KERNEL_LD}"
100 else 100 else
101 bbnote "no modules to compile" 101 bbnote "no modules to compile"
102 fi 102 fi
@@ -120,7 +120,7 @@ kernel_do_install() {
120 120
121 # 121 #
122 # Install various kernel output (zImage, map file, config, module support files) 122 # Install various kernel output (zImage, map file, config, module support files)
123 # 123 #
124 install -d ${D}/${KERNEL_IMAGEDEST} 124 install -d ${D}/${KERNEL_IMAGEDEST}
125 install -d ${D}/boot 125 install -d ${D}/boot
126 install -m 0644 ${KERNEL_OUTPUT} ${D}/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${KERNEL_VERSION} 126 install -m 0644 ${KERNEL_OUTPUT} ${D}/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${KERNEL_VERSION}
@@ -193,7 +193,7 @@ kernel_do_install() {
193 bin_files="arch/powerpc/boot/addnote arch/powerpc/boot/hack-coff \ 193 bin_files="arch/powerpc/boot/addnote arch/powerpc/boot/hack-coff \
194 arch/powerpc/boot/mktree" 194 arch/powerpc/boot/mktree"
195 for entry in $bin_files; do 195 for entry in $bin_files; do
196 rm -f $kerneldir/$entry 196 rm -f $kerneldir/$entry
197 done 197 done
198} 198}
199 199
@@ -391,10 +391,10 @@ python populate_packages_prepend () {
391 return deps 391 return deps
392 392
393 def get_dependencies(file, pattern, format): 393 def get_dependencies(file, pattern, format):
394 # file no longer includes PKGD 394 # file no longer includes PKGD
395 file = file.replace(d.getVar('PKGD', True) or '', '', 1) 395 file = file.replace(d.getVar('PKGD', True) or '', '', 1)
396 # instead is prefixed with /lib/modules/${KERNEL_VERSION} 396 # instead is prefixed with /lib/modules/${KERNEL_VERSION}
397 file = file.replace("/lib/modules/%s/" % d.getVar('KERNEL_VERSION', True) or '', '', 1) 397 file = file.replace("/lib/modules/%s/" % d.getVar('KERNEL_VERSION', True) or '', '', 1)
398 398
399 if module_deps.has_key(file): 399 if module_deps.has_key(file):
400 import re 400 import re
@@ -498,34 +498,34 @@ python populate_packages_prepend () {
498do_sizecheck() { 498do_sizecheck() {
499 if [ ! -z "${KERNEL_IMAGE_MAXSIZE}" ]; then 499 if [ ! -z "${KERNEL_IMAGE_MAXSIZE}" ]; then
500 size=`ls -l ${KERNEL_OUTPUT} | awk '{ print $5}'` 500 size=`ls -l ${KERNEL_OUTPUT} | awk '{ print $5}'`
501 if [ $size -ge ${KERNEL_IMAGE_MAXSIZE} ]; then 501 if [ $size -ge ${KERNEL_IMAGE_MAXSIZE} ]; then
502 rm ${KERNEL_OUTPUT} 502 rm ${KERNEL_OUTPUT}
503 die "This kernel (size=$size > ${KERNEL_IMAGE_MAXSIZE}) is too big for your device. Please reduce the size of the kernel by making more of it modular." 503 die "This kernel (size=$size > ${KERNEL_IMAGE_MAXSIZE}) is too big for your device. Please reduce the size of the kernel by making more of it modular."
504 fi 504 fi
505 fi 505 fi
506} 506}
507 507
508addtask sizecheck before do_install after do_compile 508addtask sizecheck before do_install after do_compile
509 509
510do_uboot_mkimage() { 510do_uboot_mkimage() {
511 if test "x${KERNEL_IMAGETYPE}" = "xuImage" ; then 511 if test "x${KERNEL_IMAGETYPE}" = "xuImage" ; then
512 ENTRYPOINT=${UBOOT_ENTRYPOINT} 512 ENTRYPOINT=${UBOOT_ENTRYPOINT}
513 if test -n "${UBOOT_ENTRYSYMBOL}"; then 513 if test -n "${UBOOT_ENTRYSYMBOL}"; then
514 ENTRYPOINT=`${HOST_PREFIX}nm ${S}/vmlinux | \ 514 ENTRYPOINT=`${HOST_PREFIX}nm ${S}/vmlinux | \
515 awk '$3=="${UBOOT_ENTRYSYMBOL}" {print $1}'` 515 awk '$3=="${UBOOT_ENTRYSYMBOL}" {print $1}'`
516 fi 516 fi
517 if test -e arch/${ARCH}/boot/compressed/vmlinux ; then 517 if test -e arch/${ARCH}/boot/compressed/vmlinux ; then
518 ${OBJCOPY} -O binary -R .note -R .comment -S arch/${ARCH}/boot/compressed/vmlinux linux.bin 518 ${OBJCOPY} -O binary -R .note -R .comment -S arch/${ARCH}/boot/compressed/vmlinux linux.bin
519 uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C none -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin arch/${ARCH}/boot/uImage 519 uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C none -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin arch/${ARCH}/boot/uImage
520 rm -f linux.bin 520 rm -f linux.bin
521 else 521 else
522 ${OBJCOPY} -O binary -R .note -R .comment -S vmlinux linux.bin 522 ${OBJCOPY} -O binary -R .note -R .comment -S vmlinux linux.bin
523 rm -f linux.bin.gz 523 rm -f linux.bin.gz
524 gzip -9 linux.bin 524 gzip -9 linux.bin
525 uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C gzip -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin.gz arch/${ARCH}/boot/uImage 525 uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C gzip -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin.gz arch/${ARCH}/boot/uImage
526 rm -f linux.bin.gz 526 rm -f linux.bin.gz
527 fi 527 fi
528 fi 528 fi
529} 529}
530 530
531addtask uboot_mkimage before do_install after do_compile 531addtask uboot_mkimage before do_install after do_compile