1 # Maintainer: Dieghen89 <dieghen89@gmail.com>
4 if [ $SPLITTED = "y" ] ; then
6 pkgname=('kernel-hpmini' 'kernel-hpmini-headers')
8 pkgname="kernel-hpmini"
13 _kernver="$pkgver-hpmini"
16 url=('http://www.kernel.org/')
18 source=("http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.36.tar.bz2"
20 md5sums=('61f3739a73afb6914cb007f37fb09b62'
21 'f5c7063383e1b7f0997caa0a848b7e62')
25 mv ${srcdir}/linux-$pkgver ${srcdir}/linux-$_kernver
26 cd ${srcdir}/linux-$_kernver
29 cp ../config-hpmini ./.config
33 # use menuconfig, if you want to change the configuration
36 # yes "" | make config
42 package_kernel-hpmini() {
43 pkgdesc="Static kernel with KMS for hpminis with Intel Atom N270/N280/N450 such as eeepc with the add-on of external firmware (broadcom-wl, stk11xx) - Old kernel26-901 - Only Intel graphic card - Give more power to your hpmini!"
44 depends=('coreutils' 'module-init-tools')
47 install=kernel-hpmini.install
49 cd ${srcdir}/linux-$_kernver
51 mkdir -p $pkgdir/{lib/modules,boot}
52 make INSTALL_MOD_PATH=$pkgdir modules_install
54 # remove the junk symlinks
55 rm -r $pkgdir/lib/modules/$_kernver/{source,build}
58 install -D -m644 ${srcdir}/linux-$_kernver/System.map $pkgdir/boot/System.map-hpmini
59 install -D -m644 ${srcdir}/linux-$_kernver/arch/x86/boot/bzImage ${pkgdir}/boot/vmlinuz-hpmini
60 install -D -m644 ${srcdir}/linux-$_kernver/.config $pkgdir/boot/kconfig-hpmini
62 # set correct depmod command for install
63 sed -i -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" $startdir/$pkgname.install
66 package_kernel-hpmini-headers() {
68 if [ $SPLITTED = "y" ] ; then
69 pkgdesc="Header files and scripts for building modules for kernel-hpmini"
71 cd ${srcdir}/linux-$_kernver
72 mkdir -p ${pkgdir}/lib/modules/${_kernver}
73 cd ${pkgdir}/lib/modules/${_kernver}
74 ln -sf ../../../usr/src/linux-${_kernver} build
75 cd ${srcdir}/linux-$_kernver
76 install -D -m644 Makefile \
77 ${pkgdir}/usr/src/linux-${_kernver}/Makefile
78 install -D -m644 kernel/Makefile \
79 ${pkgdir}/usr/src/linux-${_kernver}/kernel/Makefile
80 install -D -m644 .config \
81 ${pkgdir}/usr/src/linux-${_kernver}/.config
82 mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include
84 for i in acpi asm-generic config generated linux math-emu media net pcmcia scsi sound trace video; do
85 cp -a include/$i ${pkgdir}/usr/src/linux-${_kernver}/include/
88 # copy arch includes for external modules
89 mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/arch/x86
90 cp -a arch/x86/include ${pkgdir}/usr/src/linux-${_kernver}/arch/x86/
92 # copy files necessary for later builds, like nvidia and vmware
93 cp Module.symvers ${pkgdir}/usr/src/linux-${_kernver}
94 cp -a scripts ${pkgdir}/usr/src/linux-${_kernver}
95 # fix permissions on scripts dir
96 chmod og-w -R ${pkgdir}/usr/src/linux-${_kernver}/scripts
97 mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/.tmp_versions
99 mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/kernel
101 cp arch/$KARCH/Makefile ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/
102 cp arch/$KARCH/Makefile_32.cpu ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/
103 # add headers for lirc package
104 mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video
105 cp drivers/media/video/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/
106 for i in bt8xx cpia2 cx25840 cx88 em28xx et61x251 pwc saa7134 sn9c102 usbvideo; do
107 mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/$i
108 cp -a drivers/media/video/$i/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/$i
111 # add docbook makefile
112 install -D -m644 Documentation/DocBook/Makefile \
113 ${pkgdir}/usr/src/linux-${_kernver}/Documentation/DocBook/Makefile
115 mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/md
116 cp drivers/md/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/md
118 mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include/linux
119 cp include/linux/inotify.h ${pkgdir}/usr/src/linux-${_kernver}/include/linux/
120 # add wireless headers
121 mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/net/mac80211/
122 cp net/mac80211/*.h ${pkgdir}/usr/src/linux-${_kernver}/net/mac80211/
124 # add dvb headers for external modules
125 mkdir -p $pkgdir/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-core
126 cp drivers/media/dvb/dvb-core/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-core/
127 mkdir -p $pkgdir/usr/src/linux-${_kernver}/include/config/dvb
128 cp include/config/dvb/*.h $pkgdir/usr/src/linux-${_kernver}/include/config/dvb
129 mkdir -p $pkgdir/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/
130 cp drivers/media/dvb/frontends/lgdt330x.h $pkgdir/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/
131 cp drivers/media/video/msp3400-driver.h $pkgdir/usr/src/linux-${_kernver}/drivers/media/dvb/frontends
133 # add xfs and shmem for aufs building
134 mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/fs/xfs
135 mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/mm
136 cp fs/xfs/xfs_sb.h ${pkgdir}/usr/src/linux-${_kernver}/fs/xfs/xfs_sb.h
137 # add headers vor virtualbox
139 # http://bugs.archlinux.org/task/14568
140 cp -a include/drm $pkgdir/usr/src/linux-${_kernver}/include/
141 # add headers for broadcom wl
143 # http://bugs.archlinux.org/task/14568
144 cp -a include/trace $pkgdir/usr/src/linux-${_kernver}/include/
145 # copy in Kconfig files
146 for i in `find . -name "Kconfig*"`; do
147 mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/`echo $i | sed 's|/Kconfig.*||'`
148 cp $i ${pkgdir}/usr/src/linux-${_kernver}/$i
151 chown -R root.root ${pkgdir}/usr/src/linux-${_kernver}
152 find ${pkgdir}/usr/src/linux-${_kernver} -type d -exec chmod 755 {} \;
153 # remove unneeded architectures
154 rm -rf ${pkgdir}/usr/src/linux-${_kernver}/arch/{alpha,arm,arm26,avr32,blackfin,cris,frv,h8300,ia64,m32r,m68k,m68knommu,mips,microblaze,mn10300,parisc,powerpc,ppc,s390,sh,sh64,sparc,sparc64,um,v850,xtensa}