From bd2ae650f7e82c118c0ca25e1062fad54088bf24 Mon Sep 17 00:00:00 2001 From: Luca Weiss Date: Mon, 16 Jun 2025 18:57:12 +0200 Subject: [PATCH] linux-amazon-mustang: change to undead sources and fix build Change source URL and add a patch to fix the build. Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6675 --- .../downstream/linux-amazon-mustang/APKBUILD | 12 ++++--- .../fix-assembly-flags.patch | 36 +++++++++++++++++++ 2 files changed, 44 insertions(+), 4 deletions(-) create mode 100644 device/downstream/linux-amazon-mustang/fix-assembly-flags.patch diff --git a/device/downstream/linux-amazon-mustang/APKBUILD b/device/downstream/linux-amazon-mustang/APKBUILD index 1f45ca9c3..3282e84c3 100644 --- a/device/downstream/linux-amazon-mustang/APKBUILD +++ b/device/downstream/linux-amazon-mustang/APKBUILD @@ -3,7 +3,7 @@ pkgname=linux-amazon-mustang pkgver=4.9.77 -pkgrel=4 +pkgrel=5 pkgdesc="Amazon Fire 7 (2019) kernel fork" arch="armv7" _carch="arm" @@ -25,10 +25,11 @@ _repository="android_kernel_amazon_mustang" _commit="42d97d6450e8ba87315543081a765b0f0a1da358" _config="config-$_flavor.$arch" source=" - $pkgname-$_commit.tar.gz::https://github.com/ggow/$_repository/archive/$_commit.tar.gz + $pkgname-$_commit.tar.gz::https://github.com/mt8163/$_repository/archive/$_commit.tar.gz $_config pinctrl-mtk-common.patch linux4.2-gcc10-extern_YYLOC_global_declaration.patch + fix-assembly-flags.patch " builddir="$srcdir/$_repository-$_commit" _outdir="out" @@ -48,7 +49,10 @@ package() { downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" "$_outdir" } -sha512sums="af94e53334bf7ad4541d8813eb8ef6902a352d9ee0951193a3031189d2c232b1cc1fe00a263958b617cea2af7761a56c4144db702d47cde0aed4e8c268d23f0c linux-amazon-mustang-42d97d6450e8ba87315543081a765b0f0a1da358.tar.gz +sha512sums=" +af94e53334bf7ad4541d8813eb8ef6902a352d9ee0951193a3031189d2c232b1cc1fe00a263958b617cea2af7761a56c4144db702d47cde0aed4e8c268d23f0c linux-amazon-mustang-42d97d6450e8ba87315543081a765b0f0a1da358.tar.gz 86f562b329a62595fbbe52b6061ff346f04e9e669aae29acbe141897cb508a089312ad5654ab6b5faebc5b84df455c5e49acdf2d823c9824d0f3ea82d9aa5af9 config-amazon-mustang.armv7 f1ce4270766e992bc2c03821cf2e62c60d987adb7f448d5ae7430f6eba4d0d6718f337c9f0d7e4db4097f5f49d5b49e653fcb6a1ee50fa8d07b625bb04a87484 pinctrl-mtk-common.patch -eaf2e61fcb508cdd239b8fed209d2a09ecac77287f6b46d003918fdf1c6fa2ee63f7390f3ff7c49029b8ed6cbcdd81c7e9a4b1ece9f5060b6fc84e322bd47f41 linux4.2-gcc10-extern_YYLOC_global_declaration.patch" +eaf2e61fcb508cdd239b8fed209d2a09ecac77287f6b46d003918fdf1c6fa2ee63f7390f3ff7c49029b8ed6cbcdd81c7e9a4b1ece9f5060b6fc84e322bd47f41 linux4.2-gcc10-extern_YYLOC_global_declaration.patch +2ad68b59236714e5cdb7152174ace8c3b67ee3a891a98d44eb7936a966a8244c013d5a72653e498955807646a6e2b98274f6efd092d71926717b1333b041b98d fix-assembly-flags.patch +" diff --git a/device/downstream/linux-amazon-mustang/fix-assembly-flags.patch b/device/downstream/linux-amazon-mustang/fix-assembly-flags.patch new file mode 100644 index 000000000..4972884e4 --- /dev/null +++ b/device/downstream/linux-amazon-mustang/fix-assembly-flags.patch @@ -0,0 +1,36 @@ +diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S +index 51fc9fb6..14bbcfe9 100644 +--- a/arch/arm/boot/compressed/head.S ++++ b/arch/arm/boot/compressed/head.S +@@ -114,7 +114,7 @@ + #endif + .endm + +- .section ".start", #alloc, #execinstr ++ .section ".start", "ax" + /* + * sort out different calling conventions + */ +diff --git a/arch/arm/boot/compressed/piggy.S b/arch/arm/boot/compressed/piggy.S +index f7208849..74274a3b 100644 +--- a/arch/arm/boot/compressed/piggy.S ++++ b/arch/arm/boot/compressed/piggy.S +@@ -1,4 +1,4 @@ +- .section .piggydata,#alloc ++ .section .piggydata,"a" + .globl input_data + input_data: + .incbin "arch/arm/boot/compressed/piggy_data" +diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S +index d00d52c9..ba729e65 100644 +--- a/arch/arm/mm/proc-v7.S ++++ b/arch/arm/mm/proc-v7.S +@@ -557,7 +557,7 @@ __v7_setup_stack: + string cpu_elf_name, "v7" + .align + +- .section ".proc.info.init", #alloc ++ .section ".proc.info.init", "ax" + + /* + * Standard v7 proc info content