summaryrefslogtreecommitdiff
path: root/libre/linux-libre
diff options
context:
space:
mode:
authorDavid P <megver83@parabola.nu>2018-12-13 10:38:23 -0300
committerDavid P <megver83@parabola.nu>2018-12-13 10:38:23 -0300
commit6390b11811b4e2a0a955db7174b78a9a6dedb09e (patch)
tree35d212eae6c9beaf501c25aa27ed061059f48071 /libre/linux-libre
parent77cc83336529ffbe75c033399c6d98b3f6670a85 (diff)
downloadabslibre-6390b11811b4e2a0a955db7174b78a9a6dedb09e.tar.gz
abslibre-6390b11811b4e2a0a955db7174b78a9a6dedb09e.tar.bz2
abslibre-6390b11811b4e2a0a955db7174b78a9a6dedb09e.zip
upgpkg: libre/linux-libre 4.19.8_gnu-1
And add linux-libre-chromebook (thanks for testing it CBotulinum!) Signed-off-by: David P <megver83@parabola.nu>
Diffstat (limited to 'libre/linux-libre')
-rw-r--r--libre/linux-libre/PKGBUILD47
-rw-r--r--libre/linux-libre/kernel.its217
-rw-r--r--libre/linux-libre/kernel.keyblockbin0 -> 1208 bytes
-rw-r--r--libre/linux-libre/kernel_data_key.vbprivkbin0 -> 1199 bytes
-rw-r--r--libre/linux-libre/linux-chromebook.install25
5 files changed, 285 insertions, 4 deletions
diff --git a/libre/linux-libre/PKGBUILD b/libre/linux-libre/PKGBUILD
index c2f2a48e3..f9529edd7 100644
--- a/libre/linux-libre/PKGBUILD
+++ b/libre/linux-libre/PKGBUILD
@@ -12,7 +12,7 @@
pkgbase=linux-libre # Build stock kernel
#pkgbase=linux-libre-custom # Build kernel with a different name
_srcbasever=4.19-gnu
-_srcver=4.19.5-gnu
+_srcver=4.19.8-gnu
_replacesarchkernel=('linux%') # '%' gets replaced with _kernelname
_replacesoldkernels=() # '%' gets replaced with _kernelname
@@ -22,11 +22,12 @@ _srcname=linux-${_srcbasever%-*}
_archpkgver=${_srcver%-*}
pkgver=${_srcver//-/_}
pkgrel=1
-rcnrel=armv7-x9
+rcnrel=armv7-x11
arch=(i686 x86_64 armv7h)
url="https://linux-libre.fsfla.org/"
license=(GPL2)
makedepends=(xmlto kmod inetutils bc libelf python-sphinx graphviz)
+makedepends_armv7h=(uboot-tools vboot-utils dtc) # for linux-libre-chromebook
options=('!strip')
source=(
"https://linux-libre.fsfla.org/pub/linux-libre/releases/$_srcbasever/linux-libre-$_srcbasever.tar.xz"{,.sign}
@@ -40,6 +41,8 @@ source=(
'60-linux.hook' '90-linux.hook'
# standard config files for mkinitcpio ramdisk
'linux.preset'
+ # files for signing Chromebooks kernels
+ 'kernel.its' 'kernel.keyblock' 'kernel_data_key.vbprivk'
# armv7h patches
"https://repo.parabola.nu/other/rcn-libre/patches/${_srcver%-*}/rcn-libre-${_srcver%-*}-$rcnrel.patch"{,.sig}
'0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch'
@@ -62,7 +65,7 @@ validpgpkeys=(
)
sha512sums=('5bc800b3beff43a8c15bd5515f4e0babe2beb5fa600491b7b37110e22d9b739d293f1e38753ed681be289c51390e0e64b3e60ce0db0a3bfe1f94ee5c014579a3'
'SKIP'
- 'dbb9b21c9c89e199ea6e719287f3ef1b7c07dfbda55108216499dfd1f981d80777dde191132417502772a25615511e9ae58a3f7efcf2f023d6a41d734a3099a9'
+ 'd4de40e6fc7523e9314b89b29cd91af5d9cbbd57bece239e990c5f738ade9ceb53e7cedac30ecbf45009abfb0088a874b6570897dffd52c90e4f39743edd9b0f'
'SKIP'
'13cb5bc42542e7b8bb104d5f68253f6609e463b6799800418af33eb0272cc269aaa36163c3e6f0aacbdaaa1d05e2827a4a7c4a08a029238439ed08b89c564bb3'
'SKIP'
@@ -76,7 +79,10 @@ sha512sums=('5bc800b3beff43a8c15bd5515f4e0babe2beb5fa600491b7b37110e22d9b739d293
'7ad5be75ee422dda3b80edd2eb614d8a9181e2c8228cd68b3881e2fb95953bf2dea6cbe7900ce1013c9de89b2802574b7b24869fc5d7a95d3cc3112c4d27063a'
'2718b58dbbb15063bacb2bde6489e5b3c59afac4c0e0435b97fe720d42c711b6bcba926f67a8687878bd51373c9cf3adb1915a11666d79ccb220bf36e0788ab7'
'2dc6b0ba8f7dbf19d2446c5c5f1823587de89f4e28e9595937dd51a87755099656f2acec50e3e2546ea633ad1bfd1c722e0c2b91eef1d609103d8abdc0a7cbaf'
- 'fa32060ea7a44b94ce8ddc0c204a2ef1ec58551dfa20f94cd0237218c605e23783ff5aa0d2f802c40e58cef1502f0a770e34ac3302c40b5fba46d71ea9f75529'
+ '167bc73c6c1c63931806238905dc44c7d87c5a5c0f6293159f2133dfe717fb44081018d810675716d1605ec7dff5e8333b87b19e09e2de21d0448e447437873b'
+ 'bb6718984a7357c9b00c37e4788480e5b8b75018c172ecc1441bc3fc5d2d42444eb5d8c7f9d2e3a7d6fed6d03acb565e3c0559486e494c40a7fe6bd0570c9ede'
+ '143dea30c6da00e504c99984a98a0eb2411f558fcdd9dfa7f607d6c14e9e7dffff9cb00121d9317044b07e3e210808286598c785ee854084b993ec9cb14d8232'
+ '8e0485049f64c0532e933e864266b043a087b3c91e2eb564cc692ccd5c25f36f902fed4fae1c4b4b896cfab99b8e239e55965c914674dd360dd6ae847c94768a'
'SKIP'
'60aa432465eb3ac10f565799d3dfecea21aaf08e83909c1161d9359e932626edbd1353e712d616c3d785c65a0f699e9c45df35bd9e86365c25399c6b2d45b9e4'
'86809feb5ae2759b449ec0cb7a6b3fb457874ed82a72dfda00607e8819c804a0714b5d6a17cbbba44996a36872224af42d1b85f1b3932f43bccb419041d25dc7'
@@ -376,7 +382,40 @@ _package-docs() {
chmod -Rc u=rwX,go=rX "$pkgdir"
}
+_package-chromebook() {
+ pkgdesc="The ${pkgbase^} kernel and modules - Chromebooks"
+ depends=('linux-libre')
+ provides=("${_replacesarchkernel[@]/%/-armv7-chromebook=${_archpkgver}}")
+ conflicts=("${_replacesarchkernel[@]/%/-armv7-chromebook}" "${_replacesoldkernels[@]/%/-armv7-chromebook}")
+ replaces=("${_replacesarchkernel[@]/%/-armv7-chromebook}" "${_replacesoldkernels[@]/%/-armv7-chromebook}")
+ install=linux-chromebook.install
+
+ cd $_srcname
+
+ msg2 "Setting options for device tree compiler..."
+ cp ../kernel.its .
+ mkimage -D "-I dts -O dtb -p 2048" -f kernel.its kernel.itb
+ dd if=/dev/zero of=bootloader.bin bs=512 count=1
+ echo 'console=tty0 init=/sbin/init root=PARTUUID=%U/PARTNROFF=1 rootwait rw noinitrd' > cmdline
+
+ msg2 "Signing kernel image..."
+ vbutil_kernel \
+ --pack vmlinux.kpart \
+ --version 1 \
+ --vmlinuz kernel.itb \
+ --arch arm \
+ --keyblock ../kernel.keyblock \
+ --signprivate ../kernel_data_key.vbprivk \
+ --config cmdline \
+ --bootloader bootloader.bin
+
+ msg2 "Installing kernel sign..."
+ mkdir -p "$pkgdir/boot"
+ cp vmlinux.kpart "$pkgdir/boot"
+}
+
pkgname=("$pkgbase" "$pkgbase-headers" "$pkgbase-docs")
+[[ $CARCH = armv7h ]] && pkgname+=("$pkgbase-chromebook")
for _p in "${pkgname[@]}"; do
eval "package_$_p() {
$(declare -f "_package${_p#$pkgbase}")
diff --git a/libre/linux-libre/kernel.its b/libre/linux-libre/kernel.its
new file mode 100644
index 000000000..66114a49e
--- /dev/null
+++ b/libre/linux-libre/kernel.its
@@ -0,0 +1,217 @@
+/dts-v1/;
+
+/ {
+ description = "Chrome OS kernel image with one or more FDT blobs";
+ #address-cells = <1>;
+ images {
+ kernel@1 {
+ description = "kernel";
+ data = /incbin/("arch/arm/boot/zImage");
+ type = "kernel_noload";
+ arch = "arm";
+ os = "linux";
+ compression = "none";
+ load = <0>;
+ entry = <0>;
+ };
+ fdt@1 {
+ description = "exynos5250-snow.dtb";
+ data = /incbin/("arch/arm/boot/dts/exynos5250-snow.dtb");
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ hash@1 {
+ algo = "sha1";
+ };
+ };
+ fdt@2 {
+ description = "exynos5250-snow-rev5.dtb";
+ data = /incbin/("arch/arm/boot/dts/exynos5250-snow-rev5.dtb");
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ hash@1 {
+ algo = "sha1";
+ };
+ };
+ fdt@3 {
+ description = "exynos5250-spring.dtb";
+ data = /incbin/("arch/arm/boot/dts/exynos5250-spring.dtb");
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ hash@1 {
+ algo = "sha1";
+ };
+ };
+ fdt@4 {
+ description = "exynos5800-peach-pi.dtb";
+ data = /incbin/("arch/arm/boot/dts/exynos5800-peach-pi.dtb");
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ hash@1{
+ algo = "sha1";
+ };
+ };
+ fdt@5 {
+ description = "exynos5420-peach-pit.dtb";
+ data = /incbin/("arch/arm/boot/dts/exynos5420-peach-pit.dtb");
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ hash@1 {
+ algo = "sha1";
+ };
+ };
+ fdt@6 {
+ description = "rk3288-veyron-brain.dtb";
+ data = /incbin/("arch/arm/boot/dts/rk3288-veyron-brain.dtb");
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ hash@1 {
+ algo = "sha1";
+ };
+ };
+ fdt@7 {
+ description = "rk3288-veyron-jaq.dtb";
+ data = /incbin/("arch/arm/boot/dts/rk3288-veyron-jaq.dtb");
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ hash@1 {
+ algo = "sha1";
+ };
+ };
+ fdt@8 {
+ description = "rk3288-veyron-jerry.dtb";
+ data = /incbin/("arch/arm/boot/dts/rk3288-veyron-jerry.dtb");
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ hash@1 {
+ algo = "sha1";
+ };
+ };
+ fdt@9 {
+ description = "rk3288-veyron-mickey.dtb";
+ data = /incbin/("arch/arm/boot/dts/rk3288-veyron-mickey.dtb");
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ hash@1 {
+ algo = "sha1";
+ };
+ };
+ fdt@10 {
+ description = "rk3288-veyron-minnie.dtb";
+ data = /incbin/("arch/arm/boot/dts/rk3288-veyron-minnie.dtb");
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ hash@1 {
+ algo = "sha1";
+ };
+ };
+ fdt@11 {
+ description = "rk3288-veyron-pinky.dtb";
+ data = /incbin/("arch/arm/boot/dts/rk3288-veyron-pinky.dtb");
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ hash@1{
+ algo = "sha1";
+ };
+ };
+ fdt@12 {
+ description = "rk3288-veyron-speedy.dtb";
+ data = /incbin/("arch/arm/boot/dts/rk3288-veyron-speedy.dtb");
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ hash@1 {
+ algo = "sha1";
+ };
+ };
+ fdt@13 {
+ description = "tegra124-nyan-big.dtb";
+ data = /incbin/("arch/arm/boot/dts/tegra124-nyan-big.dtb");
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ hash@1 {
+ algo = "sha1";
+ };
+ };
+ fdt@14 {
+ description = "tegra124-nyan-blaze.dtb";
+ data = /incbin/("arch/arm/boot/dts/tegra124-nyan-blaze.dtb");
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ hash@1 {
+ algo = "sha1";
+ };
+ };
+ };
+ configurations {
+ default = "conf@1";
+ conf@1 {
+ kernel = "kernel@1";
+ fdt = "fdt@1";
+ };
+ conf@2 {
+ kernel = "kernel@1";
+ fdt = "fdt@2";
+ };
+ conf@3 {
+ kernel = "kernel@1";
+ fdt = "fdt@3";
+ };
+ conf@4 {
+ kernel = "kernel@1";
+ fdt = "fdt@4";
+ };
+ conf@5 {
+ kernel = "kernel@1";
+ fdt = "fdt@5";
+ };
+ conf@6 {
+ kernel = "kernel@1";
+ fdt = "fdt@6";
+ };
+ conf@7 {
+ kernel = "kernel@1";
+ fdt = "fdt@7";
+ };
+ conf@8 {
+ kernel = "kernel@1";
+ fdt = "fdt@8";
+ };
+ conf@9 {
+ kernel = "kernel@1";
+ fdt = "fdt@9";
+ };
+ conf@10 {
+ kernel = "kernel@1";
+ fdt = "fdt@10";
+ };
+ conf@11 {
+ kernel = "kernel@1";
+ fdt = "fdt@11";
+ };
+ conf@12 {
+ kernel = "kernel@1";
+ fdt = "fdt@12";
+ };
+ conf@13 {
+ kernel = "kernel@1";
+ fdt = "fdt@13";
+ };
+ conf@14 {
+ kernel = "kernel@1";
+ fdt = "fdt@14";
+ };
+ };
+};
diff --git a/libre/linux-libre/kernel.keyblock b/libre/linux-libre/kernel.keyblock
new file mode 100644
index 000000000..9740be4e6
--- /dev/null
+++ b/libre/linux-libre/kernel.keyblock
Binary files differ
diff --git a/libre/linux-libre/kernel_data_key.vbprivk b/libre/linux-libre/kernel_data_key.vbprivk
new file mode 100644
index 000000000..8d392fb29
--- /dev/null
+++ b/libre/linux-libre/kernel_data_key.vbprivk
Binary files differ
diff --git a/libre/linux-libre/linux-chromebook.install b/libre/linux-libre/linux-chromebook.install
new file mode 100644
index 000000000..02e08464d
--- /dev/null
+++ b/libre/linux-libre/linux-chromebook.install
@@ -0,0 +1,25 @@
+flash_kernel() {
+ major=$(mountpoint -d / | cut -f 1 -d ':')
+ minor=$(mountpoint -d / | cut -f 2 -d ':')
+ device=$(cat /proc/partitions | awk {'if ($1 == "'${major}'" && $2 == "'${minor}'") print $4 '})
+ device="/dev/${device/%2/1}"
+
+ echo "A new kernel version needs to be flashed onto ${device}."
+ echo "Do you want to do this now? [y|N]"
+ read -r shouldwe
+ if [[ $shouldwe =~ ^([yY][eE][sS]|[yY])$ ]]; then
+ dd if=/boot/vmlinux.kpart of=${device}
+ sync
+ else
+ echo "You can do this later by running:"
+ echo "# dd if=/boot/vmlinux.kpart of=${device}"
+ fi
+}
+
+post_install () {
+ flash_kernel
+}
+
+post_upgrade() {
+ flash_kernel
+}