diff options
Diffstat (limited to 'main/linux-rpi/APKBUILD')
-rw-r--r-- | main/linux-rpi/APKBUILD | 77 |
1 files changed, 27 insertions, 50 deletions
diff --git a/main/linux-rpi/APKBUILD b/main/linux-rpi/APKBUILD index 4516b6bbfd..fa328e97e4 100644 --- a/main/linux-rpi/APKBUILD +++ b/main/linux-rpi/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=linux-rpi -pkgver=4.4.47 +pkgver=4.9.24 case $pkgver in *.*.*) _kernver=${pkgver%.*};; *.*) _kernver=${pkgver};; @@ -18,10 +18,8 @@ install= # rpi-cirrus-4.4.y https://github.com/HiassofT/rpi-linux/tree/cirrus-4.4.y source="https://kernel.org/pub/linux/kernel/v4.x/linux-$_kernver.tar.xz https://kernel.org/pub/linux/kernel/v4.x/patch-$pkgver.xz - http://dev.alpinelinux.org/~tteras/rpi/linux-4.4.y-rpi-20161115.patch - http://dev.alpinelinux.org/~tteras/rpi/rpi-cirrus-4.4.y-20160909.patch + https://dev.alpinelinux.org/~clandmeter/patches/linux-4.9.y-rpi-201704120.patch gpio-mcp23s08-pullups.patch - rotary-encoder-fix.patch issue-4973.patch config-rpi.armhf @@ -37,7 +35,7 @@ for _i in $source; do _f=${_f#config-} _flavors="$_flavors ${_f}" [ "linux-$_f" != "$pkgname" ] && subpackages="$subpackages linux-${_f}" - subpackages="$subpackages linux-${_f}-dev:_${_f}_dev" + subpackages="$subpackages linux-${_f}-dev:_dev" ;; esac done @@ -141,8 +139,14 @@ package() { _package rpi "$pkgdir" } +# subflavors install in $subpkgdir +rpi2() { + _package rpi2 "$subpkgdir" +} + _dev() { - local _abi_release=${pkgver}-${pkgrel}-$1 + local _flavor=$(echo $subpkgname | sed -E 's/(^linux-|-dev$)//g') + local _abi_release=${pkgver}-${pkgrel}-$_flavor # copy the only the parts that we really need for build 3rd party # kernel modules and install those as /usr/src/linux-headers, # simlar to what ubuntu does @@ -150,38 +154,37 @@ _dev() { # this way you dont need to install the 300-400 kernel sources to # build a tiny kernel module # - pkgdesc="Headers and script for third party modules for $1 grsec kernel" + pkgdesc="Headers and script for third party modules for $_flavor kernel" depends="gmp-dev bash" local dir="$subpkgdir"/usr/src/linux-headers-${_abi_release} # first we import config, run prepare to set up for building # external modules, and create the scripts mkdir -p "$dir" - cp "$srcdir"/config-$1.${CARCH} "$dir"/.config + cp "$srcdir"/config-$_flavor.${CARCH} "$dir"/.config make -j1 -C "$srcdir"/linux-$_kernver O="$dir" HOSTCC="${CC:-gcc}" \ silentoldconfig prepare modules_prepare scripts - # remove the stuff that poits to real sources. we want 3rd party + # remove the stuff that points to real sources. we want 3rd party # modules to believe this is the soruces rm "$dir"/Makefile "$dir"/source # copy the needed stuff from real sources # # this is taken from ubuntu kernel build script - # http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-jaunty.git;a=blob;f=debian/rules.d/3-binary-indep.mk;hb=HEAD + # http://kernel.ubuntu.com/git/ubuntu/ubuntu-zesty.git/tree/debian/rules.d/3-binary-indep.mk cd "$srcdir"/linux-$_kernver - find . -path './include/*' -prune -o -path './scripts/*' -prune \ - -o -type f \( -name 'Makefile*' -o -name 'Kconfig*' \ - -o -name 'Kbuild*' -o -name '*.sh' -o -name '*.pl' \ - -o -name '*.lds' \) | cpio -pdm "$dir" - cp -a drivers/media/dvb/dvb-core/*.h "$dir"/drivers/media/dvb/dvb-core - cp -a drivers/media/video/*.h "$dir"/drivers/media/video - cp -a drivers/media/dvb/frontends/*.h "$dir"/drivers/media/dvb/frontends - cp -a scripts include "$dir" + find . -path './include/*' -prune \ + -o -path './scripts/*' -prune -o -type f \ + \( -name 'Makefile*' -o -name 'Kconfig*' -o -name 'Kbuild*' -o \ + -name '*.sh' -o -name '*.pl' -o -name '*.lds' \) \ + -print | cpio -pdm "$dir" || return 1 + + cp -a scripts include "$dir" || return 1 find $(find arch -name include -type d -print) -type f \ | cpio -pdm "$dir" - install -Dm644 "$srcdir"/build-$1/Module.symvers \ + install -Dm644 "$srcdir"/build-$_flavor/Module.symvers \ "$dir"/Module.symvers mkdir -p "$subpkgdir"/lib/modules/${_abi_release} @@ -189,38 +192,12 @@ _dev() { "$subpkgdir"/lib/modules/${_abi_release}/build } -for _f in $_flavors; do - [ "linux-$_f" != "$pkgname" ] && eval "${_f}() { _package "$_f" "$subpkgdir"; }" - eval "_${_f}_dev() { _dev $_f; }" -done -md5sums="9a78fa2eb6c68ca5a40ed5af08142599 linux-4.4.tar.xz -4140c092d355a837ccab1707c8ad0d33 patch-4.4.47.xz -478a76b0c9aa31575c67dabbef88609a linux-4.4.y-rpi-20161115.patch -0ef4cc8955f879dccf859932c86963e7 rpi-cirrus-4.4.y-20160909.patch -b66e8aa4991ca5c2ccd61559ed7e6491 gpio-mcp23s08-pullups.patch -5508d2b3e5967bd57f92f551d90b3e54 rotary-encoder-fix.patch -29281b74d2cef6965fa4ab6d826a2aa4 issue-4973.patch -1e8797d614a89984954523245ccbd237 config-rpi.armhf -c188e45c15e82c57f0a624b415c73c46 config-rpi2.armhf -75b8762d58dd87cb35c2b605390bedd5 markdt" -sha256sums="401d7c8fef594999a460d10c72c5a94e9c2e1022f16795ec51746b0d165418b2 linux-4.4.tar.xz -21fd72caa322800b4668b4464d6ac4d8d66faa0056e08a5925d5911dab438c18 patch-4.4.47.xz -359d44c515f581319994a0824b2522ac1290e17b2b317956bdb329c15eb22697 linux-4.4.y-rpi-20161115.patch -5235b8c8a81dceb8fa525f45edfdd31876f72ca6207d43d3c72b2c6d0ed194e5 rpi-cirrus-4.4.y-20160909.patch -b389a556bbd98053881b43deef1adf20640f980557c5f37cfd7ece2daeecbda9 gpio-mcp23s08-pullups.patch -ab6740577fe8c1d71d2c716720ebbbf9a750985963d6938093b4ca9194b6e871 rotary-encoder-fix.patch -3a16e927ce53a8c56e7f1dd86fe8ad08b1c06466f5206c521a7e2de1e4796d6c issue-4973.patch -86825369de54822d49aa4ea2f23822f6c29ba00baf8f41f6b983c8cc4ccfc765 config-rpi.armhf -3f2b9916a143816f747f3c8fd1a117fba297df756258304215ae24da37860a09 config-rpi2.armhf -4be04884838cef5dd2672f6f39633139165725c4c315b925bf2287c9df4ca003 markdt" -sha512sums="13c8459933a8b80608e226a1398e3d1848352ace84bcfb7e6a4a33cb230bbe1ab719d4b58e067283df91ce5311be6d2d595fc8c19e2ae6ecc652499415614b3e linux-4.4.tar.xz -f52936ab1dc91314a3cede35f9116332ce999b6442bdb575eda68dd2e57cd96517abc18b3bb05a2492e6cd13f849a09cece13463dfaa2d81ad390f8127b62813 patch-4.4.47.xz -1f9616e89424ae2d4c6b402242ed05971f055a699493d3814ab26bb8723876e5e8c7723ce5509233f080615746a2b674a6ac43e6866677c7234efb7efc2b7fbb linux-4.4.y-rpi-20161115.patch -a00d5172b9075d36e72a1f80071221f39257eeb448a9692d22c6480c7d242de60520e1829eb06314706379c95b8b52b4e131a24415e61a6a5ee0afb2ed818331 rpi-cirrus-4.4.y-20160909.patch +sha512sums="bf67ff812cc3cb7e5059e82cc5db0d9a7c5637f7ed9a42e4730c715bf7047c81ed3a571225f92a33ef0b6d65f35595bc32d773356646df2627da55e9bc7f1f1a linux-4.9.tar.xz +c5619f95e6f838175491c1f8ba1fe13b37200984dfd241af3fcbb063de4d3b18948ffc0fda7bb594a92f0ec3332d35a2a255e830a7e1d68a5ecb8da57a8bd44b patch-4.9.24.xz +1586b4c549285bb3015e99288c08cbbad719c7b40156fdb4ab7849a07363d2cc29045ae0037f0873994d3c36812be2ed2ee530c6fbfce5a86e6ebf83480d0db2 linux-4.9.y-rpi-201704120.patch 36724ba56cb8fdf3a3d347cffb67ae1cc3d7b1052d526b6b5134ebf6baae9f9724b586c97833453dc7697ab24699426f0749af78b6a80be36967a80033a0cf40 gpio-mcp23s08-pullups.patch -3a711e2cdb6c0ecaceb3755437d38626dec8403e8aa167a6e16f64d8a8b7cc5bdc7e04aa7c05938719ebc90e319ec4124ee2151a7855e7838ee143b62d140ad0 rotary-encoder-fix.patch 501c91bf2538a18102da59bbccc3097f9c3c90079acc0e946ff075074160c09b8a66934e5ce5470e170f0e4f93d114709a95230367426d0bb7ea02c4bdf4cc9b issue-4973.patch -1c543ca5d08df99c1249fe8beb69b42eb3c985cd36b568cc6b0fa5b56951f702c790e6d2c2e51e46173179eb6cb39ee13fa8314a7277a55589bd9ccdd826c88f config-rpi.armhf -3fe9eb7090e9e2794c36e057796e88bf9c138cc0cd2e3fd7a8e466f683ff9c38102dec8ed0cfb9e0b17a999490212ec14762d549ebc1ca7179d7efa86fec50d7 config-rpi2.armhf +af5a881ffa2575f35a85e932601a05e2080c9cd62e3e899d3e12a1d70da93b90784e3d9e6e406a98b3571e3cf92945cd0efaed0022b3b0a8530c8e45afed555a config-rpi.armhf +1f4c7ce90c7753f5fafa9887512ddbdfcdbeed454aeca23acb00576aca4efc1091a9df143d2a1a3311056fb0a983c4662a54343e67aa1c101b40295c1610929e config-rpi2.armhf a8e7f434c325c9dd7a9109efecad408e42a50ecd1391cb0c7d1d7de79609caee007486c8a6538231c74bdc5d7b84cbca053958e1b239bc0507e6d3598ace383a markdt" |