1 DESCRIPTION = "Linux kernel for Dreambox DM7025"
8 DEPENDS = "zlib-native zlib"
10 # note, the rX in the filename is *NOT* the packet revision - it's the patch revision.
11 SRC_URI += "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${PV}.tar.bz2 \
12 file://dm7025_defconfig \
13 http://sources.dreamboxupdate.com/download/kernel-patches/linuxmips-${KV}-dream-r6.patch.bz2;patch=1;pnum=1 \
14 http://sources.dreamboxupdate.com/download/kernel-patches/linux-${KV}-update_dvbapi-r1.patch.bz2;patch=1;pnum=1 \
15 http://sources.dreamboxupdate.com/download/kernel-patches/linux-2.6.12-dvb-multipid-r4.patch.bz2;patch=1;pnum=1 \
16 http://sources.dreamboxupdate.com/download/kernel-patches/linux-2.6.12-dvb-core-fix-several-locking-problems.patch.bz2;patch=1;pnum=1 \
17 http://sources.dreamboxupdate.com/download/kernel-patches/linux-2.6.12-dvbapi-pilot-rolloff-extension-r0.patch.bz2;patch=1;pnum=1 \
18 http://sources.dreamboxupdate.com/download/kernel-patches/linux-2.6.12-update-wireless.patch.bz2;patch=1;pnum=1 \
19 file://linux-2.6-trailing-whitespaces-in-params.patch;patch=1 \
20 file://linuxmips-2.6.12-gcc433-compile-fix.patch;patch=1;pnum=1 \
21 file://linuxmips-2.6.12-gcc44-compile-fixes.patch;patch=1;pnum=1 \
22 file://linuxmips-2.6.12-revert-fadvise-fix.patch;patch=1;pnum=1 \
23 file://linuxmips-2.6.12-add-cpu-feature-overrides.patch;patch=1;pnum=1 \
24 http://www.kernel.org/pub/linux/kernel/people/rml/inotify/v2.6/0.23/inotify-0.23-rml-2.6.12-15.patch;patch=1;pnum=1 \
26 http://squashfs-lzma.org/dl/sqlzma3.2-r2b.tar.bz2 \
27 http://dreamboxupdate.com/download/kernel-patches/sqlzma2k-3.2-r2-2.6.12.6.patch.bz2 \
28 http://dreamboxupdate.com/download/patches/fix_lzma_squashfs_makefiles_for_oe-r3.patch.bz2 \
29 ${SOURCEFORGE_MIRROR}/squashfs/squashfs3.2-r2.tar.gz \
30 ${SOURCEFORGE_MIRROR}/sevenzip/lzma443.tar.bz2 \
31 file://${WORKDIR}/squashfs-lzma/kernel-patches/linux-2.6.12/squashfs3.2-patch;pnum=1;patch=1 \
32 file://linux-2.6.12-dvb-core-fix-frontend-shutdown-timeout.patch;patch=1;pnum=1 \
35 S = "${WORKDIR}/linux-${PV}"
39 FILES_kernel-image = "/boot/vmlinux.gz /boot/autoexec.bat"
42 KERNEL_IMAGETYPE = "vmlinux"
43 KERNEL_OUTPUT = "vmlinux"
44 KERNEL_OBJECT_SUFFIX = "ko"
46 addtask munge after do_unpack before do_patch
49 if [ -d ${WORKDIR}/squashfs3.2-r2 ]; then
50 mv ${WORKDIR}/squashfs3.2-r2/* ${WORKDIR}
51 rm -R ${WORKDIR}/squashfs3.2-r2
52 for i in sqlzma1-443.patch sqlzma2u-3.2-r2.patch fix_lzma_squashfs_makefiles_for_oe-r3.patch; do
54 patch -d ${WORKDIR} -p1 < ${WORKDIR}/$i
59 install -d ${WORKDIR}/squashfs-lzma
60 for i in `find -maxdepth 1 | grep -v linux | xargs`;
68 "./dm7025_defconfig");;
69 *)mv $i ${WORKDIR}/squashfs-lzma;;
75 do_compile_prepend () {
76 if [ -f ${S}/.patched ];
78 patch -R -d ${S} -p1 < ${WORKDIR}/squashfs-lzma/sqlzma2k-3.2-r2-2.6.12.6.patch
83 do_compile_append () {
84 patch -d ${S} -p1 < ${WORKDIR}/squashfs-lzma/sqlzma2k-3.2-r2-2.6.12.6.patch
86 oe_runmake -C ${WORKDIR}/squashfs-lzma KDir=${S} BUILD_CC="${CC}" BUILD_CXX="${CXX}" BUILD_LD="${LD}" BUILD_AR="${AR}" BUILD_LDFLAGS="${TARGET_LDFLAGS}" BUILD_CFLAGS="${TARGET_CFLAGS}" BUILD_CXXFLAGS="${TARGET_CXXFLAGS}"
87 for i in mksquashfs unsquashfs;
89 mv ${WORKDIR}/squashfs-lzma/squashfs-tools/$i ${WORKDIR}/squashfs-lzma/squashfs-tools/$i-${ARCH}
91 oe_runmake -C ${WORKDIR}/squashfs-lzma KDir=${S} clean
92 oe_runmake -C ${WORKDIR}/squashfs-lzma KDir=${S}
93 patch -R -d ${S} -p1 < ${WORKDIR}/squashfs-lzma/sqlzma2k-3.2-r2-2.6.12.6.patch
97 do_configure_prepend () {
98 if [ "${@bb.data.getVar('DISTRO_VERSION', d, 1)}" == "1.4.0" ];
100 cat ${WORKDIR}/dm7025_defconfig | grep -v "CONFIG_CMDLINE" > ${S}/.config
101 echo "CONFIG_CMDLINE=\"console=null root=/dev/mtdblock3 rootfstype=jffs2 rw\"" >> ${S}/.config
103 oe_machinstall -m 0644 ${WORKDIR}/dm7025_defconfig ${S}/.config
108 do_install_append () {
110 install -m 0755 vmlinux ${D}/boot/vmlinux
111 echo "/flash/bootlogo.elf" > ${D}/boot/autoexec.bat
112 gzip ${D}/boot/vmlinux
113 echo "/flash/vmlinux.gz" >> ${D}/boot/autoexec.bat
114 for i in sqlzma.ko unlzma.ko;
116 install -m 0644 ${WORKDIR}/squashfs-lzma/C/7zip/Compress/LZMA_C/kmod/$i ${D}/lib/modules/2.6.12.6/kernel/fs/squashfs
118 install -d ${D}/usr/bin
119 for i in mksquashfs unsquashfs;
121 install ${WORKDIR}/squashfs-lzma/squashfs-tools/$i-${ARCH} ${D}/usr/bin/$i
125 PACKAGES_append = " unsquashfs mksquashfs"
126 FILES_mksquashfs = "/usr/bin/mksquashfs"
127 FILES_unsquashfs = "/usr/bin/unsquashfs"
130 install ${WORKDIR}/squashfs-lzma/C/7zip/Compress/LZMA_Alone/lzma ${STAGING_BINDIR_NATIVE}
131 install ${WORKDIR}/squashfs-lzma/C/7zip/Compress/LZMA_C/lzmadec ${STAGING_BINDIR_NATIVE}
132 install ${WORKDIR}/squashfs-lzma/squashfs-tools/mksquashfs ${STAGING_BINDIR_NATIVE}
133 install ${WORKDIR}/squashfs-lzma/squashfs-tools/unsquashfs ${STAGING_BINDIR_NATIVE}
136 pkg_preinst_kernel-image () {
137 [ -z "$D" ] && mountpoint -q /boot && mount -o rw,remount /boot
141 pkg_postinst_kernel-image () {
142 [ -z "$D" ] && mountpoint -q /boot && mount -o ro,remount /boot
146 pkg_prerm_kernel-image () {
147 [ -z "$D" ] && mountpoint -q /boot && mount -o rw,remount /boot
151 pkg_postrm_kernel-image () {
152 [ -z "$D" ] && mountpoint -q /boot && mount -o ro,remount /boot