aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/linux/linux-jlime-ben-nanonote_2.6.36.bb
blob: 3df3f633501ed9e5f63e0f5c56e4cb392e1eac60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
DESCRIPTION = "Linux 2.6.36 kernel for the Ben Nanonote"
SECTION = "kernel"
LICENSE = "GPLv2"

DEPENDS += "u-boot-mkimage-native"

SRCREV = "${AUTOREV}"

DEFAULT_PREFERENCE_ben-nanonote = "1"
COMPATIBLE_MACHINE = "ben-nanonote"

KERNEL_IMAGETYPE = "vmlinux.bin"

SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kristoffer/linux-hpc.git;protocol=git;branch=v2.6.36-hpc \
	   file://logo_linux_clut224.tar.gz \
	   file://modifier-keys.patch \
	   file://config-ben-nanonote \
	   file://jz4740-udc.patch"

S = "${WORKDIR}/git"

inherit kernel

FILES_kernel-image = "/boot/uImage*"

do_configure_prepend() {
	install -m 0644 ${WORKDIR}/config-ben-nanonote ${S}/.config
	mv -f ${WORKDIR}/logo_linux_clut224.ppm ${S}/drivers/video/logo
}

do_install_append() {
	cd ${S}
	kernel_entry=`nm vmlinux | grep " kernel_entry" | cut -d' ' -f1`

	cd ${S}/arch/mips/boot
	rm -f vmlinux.bin.gz
	gzip -c9 vmlinux.bin > vmlinux.bin.gz

	mkimage -A mips -O linux -T kernel -C gzip -a 0x80010000 -e 0x${kernel_entry} \
	-n 'MIPS' -d vmlinux.bin.gz uImage-${KERNEL_VERSION}

	install -m 0644 uImage-${KERNEL_VERSION} ${D}/boot
}

pkg_postinst_kernel() {
	cd /${KERNEL_IMAGEDEST}; update-alternatives --install /${KERNEL_IMAGEDEST}/uImage uImage uImage-${KERNEL_VERSION} ${KERNEL_PRIORITY} || true
}

pkg_postrm_kernel() {
	cd /${KERNEL_IMAGEDEST}; update-alternatives --remove uImage uImage-${KERNEL_VERSION} || true
}