diff options
-rw-r--r-- | main/linux-rpi/APKBUILD | 35 | ||||
-rw-r--r-- | main/linux-rpi/config-rpi.armhf | 2 | ||||
-rw-r--r-- | main/linux-rpi/config-rpi2.armhf | 2 | ||||
-rwxr-xr-x | main/linux-rpi/markdt | 55 |
4 files changed, 80 insertions, 14 deletions
diff --git a/main/linux-rpi/APKBUILD b/main/linux-rpi/APKBUILD index c71626cf55..f9d1856ebf 100644 --- a/main/linux-rpi/APKBUILD +++ b/main/linux-rpi/APKBUILD @@ -16,11 +16,12 @@ options="!strip" install= source="http://ftp.kernel.org/pub/linux/kernel/v3.x/linux-$_kernver.tar.xz http://ftp.kernel.org/pub/linux/kernel/v3.x/patch-$pkgver.xz - http://dev.alpinelinux.org/~tteras/linux-3.18.y-rpi-20150413.patch + http://dev.alpinelinux.org/~tteras/linux-3.18.y-rpi-20150420.patch aslr-pie.patch config-rpi.armhf config-rpi2.armhf + markdt " subpackages="$pkgname-dev" _flavors= @@ -107,9 +108,12 @@ _package() { case "$CARCH" in arm*) local _dtbdir="$_outdir"/usr/lib/linux-${_abi_release} - mkdir -p "$_dtbdir" + mkdir -p "$_dtbdir" "$_dtbdir"/overlays for i in arch/arm/boot/dts/*.dtb ; do - install -m644 "$i" "$_dtbdir" + case "$i" in + *-overlay.dtb) install -m644 "$i" "$_dtbdir/overlays" ;; + *.dtb) install -m644 "$i" "$_dtbdir" ;; + esac done _install=zinstall @@ -124,6 +128,10 @@ _package() { INSTALL_PATH="$_outdir"/boot \ || return 1 + # tell rpi bootloader we are device tree capable + "$srcdir"/markdt "$_outdir"/boot/vmlinuz-$_buildflavor \ + || return 1 + rm -f "$_outdir"/lib/modules/${_abi_release}/build \ "$_outdir"/lib/modules/${_abi_release}/source rm -rf "$_outdir"/lib/firmware @@ -193,19 +201,22 @@ dev() { md5sums="9e854df51ca3fef8bfe566dbd7b89241 linux-3.18.tar.xz ac5c93edbc9385793ccc33f4ced85950 patch-3.18.11.xz -d046388e58921b2a21591acb86452d6a linux-3.18.y-rpi-20150413.patch +5b6f84850feedc7d6f84120f693f751d linux-3.18.y-rpi-20150420.patch f901100a661ec62aac12000872d0276c aslr-pie.patch -ad95c7987e94f789bb67c447d2c86a8e config-rpi.armhf -95bb00ed50492ac97860861632cf3140 config-rpi2.armhf" +57ef6f9ba3266bf377ba27230f08b00c config-rpi.armhf +7b583bfaf92952f81eec132bc4a48ae7 config-rpi2.armhf +1f3dda659442fa7e2afc62bffeceb129 markdt" sha256sums="becc413cc9e6d7f5cc52a3ce66d65c3725bc1d1cc1001f4ce6c32b69eb188cbd linux-3.18.tar.xz e4c44f887f507b2470a5c2f1c286a38fec6e84c4d433c929981abab7b83f80d5 patch-3.18.11.xz -c2ec44791aa2c14de2c4827e69174f6ea4e10272f304895853252a021714faf9 linux-3.18.y-rpi-20150413.patch +9ffda4b8cf2f144de565c7b38fd37ab72ec463c82d972f7bc7aea221810c2ef6 linux-3.18.y-rpi-20150420.patch 07e9b089c0d5d57e91256ff6e8fe373519c8bd4ae4cba4eb4a2edad3e2cc9a8e aslr-pie.patch -871e627deb9e0c0c0b0cfbf44952d849b01b4a4c413b3af7371ade3b21544484 config-rpi.armhf -0090c28a04150204c4ed4864519012b0267f4ae4ef2626250bf5c8a5a2031ca4 config-rpi2.armhf" +26bc6f915c28b5a0cfb37428a557a3af6bc44ded1c6e221ea62fd00b0b504e4f config-rpi.armhf +01ea7a15ec608f387dab5ce4e7f7136132eeb36b02ab6a7dbeafbd865ce71b42 config-rpi2.armhf +289a7509bc294295b65680c7fff0b2ec07cf359ea8a57cef00267396885f9b54 markdt" sha512sums="2f0b72466e9bc538a675738aa416573d41bbbd7e3e2ffd5b5b127afde609ebc278cec5a3c37e73479607e957c13f1b4ed9782a3795e0dcc2cf8e550228594009 linux-3.18.tar.xz cc4ac5d341ca4e9d71ef1ba45a839b18947e3e7ffdc7f7efe2c211c95483518a1983bc3637edd607e0631f14c1cc9bfb9164926261d2cf5c2bb2eb91206f43b9 patch-3.18.11.xz -7493bffc80921dc4a5a5472008500fd742703744d3798d0e886b64f5a67be5690ee422f188b95dcf4534249b1fedd439a5eb0a80f9572f7c3c931eb69bc36037 linux-3.18.y-rpi-20150413.patch +c55434312a1ee155f424a1df9ec049ce92319a4ff84ab42d806748a24131c8a17c522a51fa4d227c1abee804c39ecddb32e552f88a71e04350ca9c67b9ed9f53 linux-3.18.y-rpi-20150420.patch 35055eea7fce660a200cf6f56490a88f1601b4ea95d2364191ad0d890633e8811f2753b5816dad9640384a764b147a4a80b95f39e3bd7a66a15fd5b3ec0c794a aslr-pie.patch -b867dbe86d6b84b078821f6df039a4f241ee8e80871a1cef629f33542d5a0c722cdec5e9606d294775e83b19ec288f4b23f76ae5800ae5db71ae70bd5ec93207 config-rpi.armhf -a96a725632cf7b1ef1800a15f7fd21379ab0b75d49d3ac6f83f0efb15a9a0542798b302fe06a0c6b6543b1ecf2ebcf3357d7a8a52f546d7dea6fddd209b85678 config-rpi2.armhf" +36cbecbdcf66c24c32e2a219fcbb3ae8fcac47544ecdea4dae4ba899702ccb88db4cb0fd8c5c8c340efc56405062888574ce42b0ee5ef83db0ac1c676b60014a config-rpi.armhf +608fdbc4574d808e38539ac7c322e04499200f10f336dbaf42b43a7a0e832d0b00c3dbc1f87a8a7f063d4874c15709db39ac21a568c1f8c689ba121a690a6786 config-rpi2.armhf +89601aa0e4f77fb07fb1d58c6a9394c8683bc7dfc905ca6612d607ef4188637662d295fa3d5640e3e0a4cd08c98c10511a4f3cea41e7568167b12d0a6c813e8b markdt" diff --git a/main/linux-rpi/config-rpi.armhf b/main/linux-rpi/config-rpi.armhf index 1c93083a52..d377c2af8d 100644 --- a/main/linux-rpi/config-rpi.armhf +++ b/main/linux-rpi/config-rpi.armhf @@ -541,7 +541,7 @@ CONFIG_NET=y # # Networking options # -CONFIG_PACKET=y +CONFIG_PACKET=m # CONFIG_PACKET_DIAG is not set CONFIG_UNIX=y # CONFIG_UNIX_DIAG is not set diff --git a/main/linux-rpi/config-rpi2.armhf b/main/linux-rpi/config-rpi2.armhf index e7fc26ed6e..2d421e9e71 100644 --- a/main/linux-rpi/config-rpi2.armhf +++ b/main/linux-rpi/config-rpi2.armhf @@ -593,7 +593,7 @@ CONFIG_NET=y # # Networking options # -CONFIG_PACKET=y +CONFIG_PACKET=m # CONFIG_PACKET_DIAG is not set CONFIG_UNIX=y # CONFIG_UNIX_DIAG is not set diff --git a/main/linux-rpi/markdt b/main/linux-rpi/markdt new file mode 100755 index 0000000000..36b1ca6bc7 --- /dev/null +++ b/main/linux-rpi/markdt @@ -0,0 +1,55 @@ +#!/usr/bin/env perl + +# ---------------------------------------------------------------------- +# markdt by Timo Teräs +# based on mkknlimg by Phil Elwell for Raspberry Pi +# based on extract-ikconfig Dick Streefland +# +# (c) 2009,2010 Dick Streefland <dick@streefland.net> +# (c) 2014,2015 Raspberry Pi (Trading) Limited <info@raspberrypi.org> +# (c) 2015 Timo Teräs <timo.teras@iki.fi> +# +# Licensed under the terms of the GNU General Public License. +# ---------------------------------------------------------------------- + +use strict; +use integer; + +usage() if (@ARGV != 1); + +my $out_file = $ARGV[0]; +my $trailer_magic = 'RPTL'; +my $trailer; +my $dtok = 1; +my $ofh; +my $total_len = 0; + +sub pack_trailer +{ + my ($atoms) = @_; + my $trailer = pack('VV', 0, 0); + for (my $i = $#$atoms; $i>=0; $i--) + { + my $atom = $atoms->[$i]; + $trailer .= pack('a*x!4Va4', $atom->[1], length($atom->[1]), $atom->[0]); + } + return $trailer; +} + +# Construct the trailer +my @atoms; +push @atoms, [ $trailer_magic, pack('V', 0) ]; +push @atoms, [ 'DTOK', pack('V', $dtok) ]; + +$trailer = pack_trailer(\@atoms); +$atoms[0]->[1] = pack('V', length($trailer)); +$trailer = pack_trailer(\@atoms); + +# Write the trailer aligned to 4-byte boundary +die "* Failed to open '$out_file' for append\n" if (!open($ofh, '>>', $out_file)); +$total_len = tell($ofh); +syswrite($ofh, "\x000\x000\x000", (-$total_len & 0x3)); +syswrite($ofh, $trailer); +close($ofh); +exit(0); + |