huawei-kiwi: rework to use mainline kernel (MR 1826)
[ci:skip-build]: already built successfully in CI
This commit is contained in:
parent
ea96c354c0
commit
53fc41e7d0
7 changed files with 3997 additions and 2429 deletions
|
@ -1,13 +1,13 @@
|
|||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname=device-huawei-kiwi
|
||||
pkgdesc="Huawei Honor 5X"
|
||||
pkgver=0.1
|
||||
pkgver=1
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
options="!check !archcheck"
|
||||
depends="postmarketos-base linux-huawei-kiwi mkbootimg mesa-dri-gallium msm-fb-refresher"
|
||||
depends="postmarketos-base mkbootimg linux-huawei-kiwi soc-qcom-msm8916"
|
||||
makedepends="devicepkg-dev"
|
||||
source="deviceinfo"
|
||||
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
|
||||
|
@ -26,4 +26,4 @@ package() {
|
|||
devicepkg_package $startdir $pkgname
|
||||
}
|
||||
|
||||
sha512sums="2d0ee66a7125f40b82be6ce748d37f791fc65b02c38af056756b6e6ddbdc21e3d5d9127521e0844fa2a305451dcf7b0d356c4c1118d7667f95b3d9967cedf758 deviceinfo"
|
||||
sha512sums="b5b7cd938f471f5cbd8f4c8c8d0cbc8d49928933fc9ccaf768aa982857a86fb23684f97cc95f687cbc358d098759b08405d505c0624f10d82888a156409ba2e8 deviceinfo"
|
||||
|
|
|
@ -6,6 +6,9 @@ deviceinfo_name="Huawei Honor 5X"
|
|||
deviceinfo_manufacturer="Huawei"
|
||||
deviceinfo_codename="huawei-kiwi"
|
||||
deviceinfo_year="2015"
|
||||
deviceinfo_dtb="qcom/msm8939-huawei-kiwi"
|
||||
deviceinfo_append_dtb="true"
|
||||
deviceinfo_modules_initfs=""
|
||||
deviceinfo_arch="aarch64"
|
||||
|
||||
# Device related
|
||||
|
@ -14,17 +17,19 @@ deviceinfo_keyboard="false"
|
|||
deviceinfo_external_storage="true"
|
||||
deviceinfo_screen_width="1080"
|
||||
deviceinfo_screen_height="1920"
|
||||
deviceinfo_getty="ttyMSM0;115200"
|
||||
|
||||
# MSM DRM cannot take over the framebuffer from the bootloader at the moment
|
||||
deviceinfo_no_framebuffer="true"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="fastboot"
|
||||
deviceinfo_kernel_cmdline="androidboot.hardware=qcom ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci lpm_levels.sleep_disabled=1 buildvariant=userdebug"
|
||||
deviceinfo_kernel_cmdline="earlycon console=ttyMSM0,115200 PMOS_NO_OUTPUT_REDIRECT"
|
||||
deviceinfo_generate_bootimg="true"
|
||||
deviceinfo_bootimg_qcdt="true"
|
||||
deviceinfo_bootimg_dtb_second="false"
|
||||
deviceinfo_flash_offset_base="0x80000000"
|
||||
deviceinfo_flash_offset_kernel="0x00008000"
|
||||
deviceinfo_flash_offset_kernel="0x00080000"
|
||||
deviceinfo_flash_offset_ramdisk="0x02000000"
|
||||
deviceinfo_flash_offset_second="0x00f00000"
|
||||
deviceinfo_flash_offset_tags="0x00000100"
|
||||
deviceinfo_flash_offset_tags="0x01e00000"
|
||||
deviceinfo_flash_pagesize="2048"
|
||||
deviceinfo_flash_sparse="true"
|
||||
|
|
|
@ -1,63 +1,50 @@
|
|||
# Reference: <https://postmarketos.org/vendorkernel>
|
||||
# Kernel config based on: arch/arm64/configs/kiwi-64_defconfig
|
||||
# Kernel config based on: arch/arm64/configs/msm8939_defconfig
|
||||
|
||||
pkgname=linux-huawei-kiwi
|
||||
pkgver=3.10.108
|
||||
pkgver=5.9_rc7
|
||||
pkgrel=0
|
||||
pkgdesc="Huawei Honor 5X kernel fork"
|
||||
arch="aarch64"
|
||||
_carch="arm64"
|
||||
_flavor="huawei-kiwi"
|
||||
url="https://kernel.org"
|
||||
url="https://git.sr.ht/~bo41/msm8939-mainline-linux"
|
||||
license="GPL-2.0-only"
|
||||
options="!strip !check !tracedeps pmb:cross-native"
|
||||
makedepends="bash bc bison devicepkg-dev flex openssl-dev perl dtbtool gcc6"
|
||||
makedepends="bash bc bison devicepkg-dev installkernel flex openssl-dev perl"
|
||||
|
||||
# Compiler: GCC 6 (doesn't boot when compiled with newer versions)
|
||||
if [ "${CC:0:5}" != "gcc6-" ]; then
|
||||
CC="gcc6-$CC"
|
||||
HOSTCC="gcc6-gcc"
|
||||
CROSS_COMPILE="gcc6-$CROSS_COMPILE"
|
||||
fi
|
||||
|
||||
# Source
|
||||
_repository="android_kernel_huawei_kiwi"
|
||||
_commit="6e870147270171fb00496ac229ffa5eb86a496d1"
|
||||
_repository="msm8939-mainline-linux"
|
||||
_commit="cf997bbb83ffb33f40d3707419e0141bb668dbbc"
|
||||
_config="config-$_flavor.$arch"
|
||||
source="
|
||||
$pkgname-$_commit.tar.gz::https://github.com/LineageOS/$_repository/archive/$_commit.tar.gz
|
||||
$pkgname-$_commit.tar.gz::$url/archive/$_commit.tar.gz
|
||||
$_config
|
||||
gcc8-fix-put-user.patch
|
||||
gcc10-extern_YYLOC_global_declaration.patch
|
||||
wlan_nv_template_builtin.patch
|
||||
"
|
||||
builddir="$srcdir/$_repository-$_commit"
|
||||
_outdir="out"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
. downstreamkernel_prepare
|
||||
cp "$srcdir/config-$_flavor.$CARCH" .config
|
||||
}
|
||||
|
||||
build() {
|
||||
unset LDFLAGS
|
||||
make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" \
|
||||
make ARCH="$_carch" CC="${CC:-gcc}" \
|
||||
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
|
||||
|
||||
# Generate master DTB (deviceinfo_bootimg_qcdt)
|
||||
dtbTool -p scripts/dtc/ -o "$_outdir/arch/$_carch/boot/dt.img" "$_outdir/arch/$_carch/boot/"
|
||||
}
|
||||
|
||||
package() {
|
||||
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" "$_outdir"
|
||||
mkdir -p "$pkgdir"/boot
|
||||
make zinstall modules_install dtbs_install \
|
||||
ARCH="$_carch" \
|
||||
INSTALL_PATH="$pkgdir"/boot \
|
||||
INSTALL_MOD_PATH="$pkgdir" \
|
||||
INSTALL_DTBS_PATH="$pkgdir"/usr/share/dtb
|
||||
rm -f "$pkgdir"/lib/modules/*/build "$pkgdir"/lib/modules/*/source
|
||||
|
||||
# Master DTB (deviceinfo_bootimg_qcdt)
|
||||
install -Dm644 "$_outdir/arch/$_carch/boot/dt.img" \
|
||||
"$pkgdir/boot/dt.img"
|
||||
install -D "$builddir"/include/config/kernel.release \
|
||||
"$pkgdir"/usr/share/kernel/$_flavor/kernel.release
|
||||
}
|
||||
|
||||
sha512sums="2d98bae9a04d7d55f11bab18acd43fd23411b33a19942769def24da7273664368f6f81883f1bfb93b77614acb62bece8131a5b7a42f0ddbf3f7e2276a762b989 linux-huawei-kiwi-6e870147270171fb00496ac229ffa5eb86a496d1.tar.gz
|
||||
2f8ec631c27ec8cee7f47591ae70ce76fad824269bcc0f0b0de921f00bf031e4d8f990aebb378665f2c7a2ca4a1ce06d09fdc7486be573e992bf24e1d5a50f45 config-huawei-kiwi.aarch64
|
||||
197d40a214ada87fcb2dfc0ae4911704b9a93354b75179cd6b4aadbb627a37ec262cf516921c84a8b1806809b70a7b440cdc8310a4a55fca5d2c0baa988e3967 gcc8-fix-put-user.patch
|
||||
2b48f1bf0e3f70703d2cdafc47d5e615cc7c56c70bec56b2e3297d3fa4a7a1321d649a8679614553dde8fe52ff1051dae38d5990e3744c9ca986d92187dcdbeb gcc10-extern_YYLOC_global_declaration.patch
|
||||
edebf62a38a558369eb914475bc341d1fedc1c0bbeb2989172f9f99a2bc57c231a995176702335cd754701449b145e0231c1f2860d9ea93e84f52916a64d8d98 wlan_nv_template_builtin.patch"
|
||||
sha512sums="d0126c017b5253039800c6e743e7e8c178e6745c76f15078fee025dcd9584cfd888c1cc2acac5d8718f2635e0db30c4e2867124a818eb77b64da5cc4d866d0ba linux-huawei-kiwi-cf997bbb83ffb33f40d3707419e0141bb668dbbc.tar.gz
|
||||
89fb4b215a3e6144b6c3ccd57af694f561c91bfa3c4c93093cb15fc57717b81720d68f9c0298c66eb9efe2173b71a5c7ccbbb812387bc2af63f010fec2918a52 config-huawei-kiwi.aarch64"
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1 +0,0 @@
|
|||
../../.shared-patches/linux/gcc10-extern_YYLOC_global_declaration.patch
|
|
@ -1 +0,0 @@
|
|||
../../.shared-patches/linux/gcc8-fix-put-user.patch
|
|
@ -1,21 +0,0 @@
|
|||
/home/pmos/build/src/android_kernel_huawei_kiwi-6e870147270171fb00496ac229ffa5eb86a496d1/drivers/staging/prima/CORE/VOSS/src/wlan_nv_template_builtin.c:590:10: error: initializer element is not computable at load time
|
||||
590 | (((char *)&(nvDefaults.tables.hwCalValues.calData.psSlpTimeOvrHdxLNA5G) +
|
||||
| ^
|
||||
/home/pmos/build/src/android_kernel_huawei_kiwi-6e870147270171fb00496ac229ffa5eb86a496d1/drivers/staging/prima/CORE/VOSS/src/wlan_nv_template_builtin.c:590:10: note: (near initialization for 'NvTablesBuiltIn[4][3].offset')
|
||||
|
||||
diff --git a/drivers/staging/prima/CORE/VOSS/src/wlan_nv_template_builtin.c b/drivers/staging/prima/CORE/VOSS/src/wlan_nv_template_builtin.c
|
||||
index 14c6eadf524..e26b697f793 100644
|
||||
--- a/drivers/staging/prima/CORE/VOSS/src/wlan_nv_template_builtin.c
|
||||
+++ b/drivers/staging/prima/CORE/VOSS/src/wlan_nv_template_builtin.c
|
||||
@@ -587,9 +587,8 @@ _NV_TEMPLATE_TABLE NvTablesBuiltIn[/*TABLES_MAX*/][TABLE_ENTRIES_MAX] = {
|
||||
((char *)&(nvDefaults.tables.hwCalValues.calData.psSlpTimeOvrHdxLNA5G) -
|
||||
(char *)&nvDefaults.tables.hwCalValues.calData),"psSlpTimeOvrHdxLNA5G"},
|
||||
{"ed",_ID_U8,SINGULAR,0,0,0,
|
||||
- (((char *)&(nvDefaults.tables.hwCalValues.calData.psSlpTimeOvrHdxLNA5G) +
|
||||
- sizeof(uint16)) - (char *)&nvDefaults.tables.hwCalValues.calData),
|
||||
- "nv_TxBBFSel9MHz"},
|
||||
+ ((char *)&(nvDefaults.tables.hwCalValues.calData.psSlpTimeOvrHdxLNA5G) -
|
||||
+ (char *)&nvDefaults.tables.hwCalValues.calData),"nv_TxBBFSel9MHz"},
|
||||
{"ee",_ID_U8,SINGULAR,0,0,0,
|
||||
((char *)&(nvDefaults.tables.hwCalValues.calData.hwParam2) -
|
||||
(char *)&nvDefaults.tables.hwCalValues.calData),"hwParam2"},
|
Loading…
Reference in a new issue