samsung-j6lte: new device (MR 4658)

[ci:skip-build]: Already built successfully in CI.
This commit is contained in:
Mohd Bilal 2023-12-27 18:58:13 +05:30 committed by Stefan Hansson
parent d8b97a440f
commit 7a68a913e1
No known key found for this signature in database
GPG key ID: 8A700086A9FE41FD
12 changed files with 5079 additions and 0 deletions

View file

@ -0,0 +1,39 @@
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-samsung-j6lte
pkgdesc="Samsung Galaxy J6 (2018)"
pkgver=0.1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="
linux-samsung-j6lte
mkbootimg
postmarketos-base
postmarketos-base-downstream
msm-fb-refresher
"
makedepends="devicepkg-dev"
source="
deviceinfo
"
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
}
nonfree_firmware() {
pkgdesc="$pkgdesc (WiFi firmware)"
depends="firmware-samsung-j6lte"
mkdir "$subpkgdir"
}
sha512sums="
b3fcc96472c669531d5ca805b1fe201b9721c63e19412fd881f1944e34aa5e302cdac88f543aac209602a951497f8782fe1a38922480e0d2940e9bc1265be7c0 deviceinfo
"

View file

@ -0,0 +1,32 @@
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell
# scripts.
deviceinfo_format_version="0"
deviceinfo_name="Samsung Galaxy J6"
deviceinfo_manufacturer="Samsung"
deviceinfo_codename="samsung-j6lte"
deviceinfo_year="2018"
deviceinfo_arch="aarch64"
# Device related
deviceinfo_chassis="handset"
deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
deviceinfo_screen_width="720"
deviceinfo_screen_height="1480"
# Bootloader related
deviceinfo_flash_method="heimdall-bootimg"
deviceinfo_kernel_cmdline="androidboot.selinux=permissive androidboot.selinux=permissive"
deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_qcdt="true"
deviceinfo_bootimg_dtb_second="false"
deviceinfo_flash_pagesize="2048"
deviceinfo_flash_offset_base="0x10000000"
deviceinfo_flash_offset_kernel="0x00008000"
deviceinfo_flash_offset_ramdisk="0x01000000"
deviceinfo_flash_offset_second="0x00f00000"
deviceinfo_flash_offset_tags="0x00000100"
deviceinfo_flash_heimdall_partition_kernel="BOOT"
deviceinfo_flash_heimdall_partition_system="SYSTEM"

View file

@ -0,0 +1,37 @@
pkgname=firmware-samsung-j6lte
pkgver=1
pkgrel=0
pkgdesc="Firmware files for Samsung Galaxy J6 (2018)"
url="https://github.com/samsungexynos7870/android_vendor_samsung_j6lte"
arch="aarch64"
license="proprietary"
options="!strip !check !archcheck !spdx !tracedeps pmb:cross-native"
# Source
_commit="0ace47cab223eb50ef39a2725f3974ed43918b29"
builddir="$srcdir/android_vendor_samsung_j6lte-$_commit"
_raw_wifi_path="$url/raw/$_commit/proprietary/vendor/etc/wifi"
_install_wifi_path="/lib/firmware/postmarketos/wifi/"
source="
bcmdhd_apsta.bin_36::$_raw_wifi_path/bcmdhd_apsta.bin_36
bcmdhd_clm.blob::$_raw_wifi_path/bcmdhd_clm.blob
bcmdhd_mfg.bin_36::$_raw_wifi_path/bcmdhd_mfg.bin_36
bcmdhd_sta.bin_36::$_raw_wifi_path/bcmdhd_sta.bin_36
nvram.txt_36::$_raw_wifi_path/nvram.txt_36
"
package() {
install -Dm644 "$srcdir/bcmdhd_apsta.bin_36" "$pkgdir$_install_wifi_path/bcmdhd_apsta.bin_36"
install -Dm644 "$srcdir/bcmdhd_clm.blob" "$pkgdir$_install_wifi_path/bcmdhd_clm.blob"
install -Dm644 "$srcdir/bcmdhd_mfg.bin_36" "$pkgdir$_install_wifi_path/bcmdhd_mfg.bin_36"
install -Dm644 "$srcdir/bcmdhd_sta.bin_36" "$pkgdir$_install_wifi_path/bcmdhd_sta.bin_36"
install -Dm644 "$srcdir/nvram.txt_36" "$pkgdir$_install_wifi_path/nvram.txt_36"
}
sha512sums="
678c30e5e64ba216fca0e0121eb9b2f6ad22f6e10c19138b3fa4af52bbce91f0a22886e7282062a44a4ded79bb675893556c5a193e56a8bd9979a0b0a679f008 bcmdhd_apsta.bin_36
e2d1ca4f6a5f3649c1ab0fc9a7dca34077d5a4c5ea8465c3da92845141145e5f19d06c1bcb5f7d683bdce6c15675f41506bb9fbff0076ec58defa27114b2ad52 bcmdhd_clm.blob
fbe0c453088efc5318fc80cdd6b6b9855ea21ce6619ca7f40fdf007d0dd9c8f4f821fe9356dd3492506223bfdb67eb6821347a2d0b420e06a8fadaf9166a947c bcmdhd_mfg.bin_36
706cb7f4eda0bba5069cb3635033a34d7155a4e60dc2fd1d5a724c387da77865d5a960f1c8b08546e1715470fe71bebbad29404207c62cdbfd3bbbdce26fa60d bcmdhd_sta.bin_36
6ff097c0895d39c576ec70b1e5a6ba37dddef1e2f9a5f22f077033d08c9c94dd62c4e482210105d38f639b45564b54b5919f52af3eecd6961af1fb2eb600fa5f nvram.txt_36
"

View file

@ -0,0 +1,13 @@
diff --git a/drivers/video/fbdev/exynos/decon_7870/decon-int_drv.c b/drivers/video/fbdev/exynos/decon_7870/decon-int_drv.c
index 15e7e22b..29f1dc49 100644
--- a/drivers/video/fbdev/exynos/decon_7870/decon-int_drv.c
+++ b/drivers/video/fbdev/exynos/decon_7870/decon-int_drv.c
@@ -335,7 +335,7 @@ static u32 wincon(u32 bits_per_pixel, u32 transp_length)
case 32:
if (transp_length > 0) {
data |= WINCON_BLD_PIX;
- data |= WINCON_BPPMODE_ABGR8888;
+ data |= WINCON_BPPMODE_ARGB8888;
} else {
data |= WINCON_BPPMODE_XRGB8888;
}

View file

@ -0,0 +1,12 @@
diff --git a/Makefile b/Makefile
index 235d3264..611421c1 100644
--- a/Makefile
+++ b/Makefile
@@ -249,7 +249,6 @@ SUBARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \
# Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile
export KBUILD_BUILDHOST := $(SUBARCH)
ARCH ?=arm64
-CROSS_COMPILE ?=../PLATFORM/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-
# Architecture as present in compile.h
UTS_MACHINE := $(ARCH)

View file

@ -0,0 +1,109 @@
# Reference: <https://postmarketos.org/vendorkernel>
pkgname=linux-samsung-j6lte
pkgver=3.18.14
pkgrel=0
pkgdesc="Samsung Galaxy J6 kernel fork"
arch="aarch64"
_carch="arm64"
_flavor="samsung-j6lte"
url="https://kernel.org"
license="GPL-2.0-only"
options="!strip !check !tracedeps pmb:cross-native"
makedepends="
bash
bc
bison
devicepkg-dev
dtbtool-exynos
findutils
flex
gcc4
openssl-dev
perl
"
if [ "${CC:0:5}" != "gcc4-" ]; then
CC="gcc4-$CC"
HOSTCC="gcc4-gcc"
CROSS_COMPILE="gcc4-$CROSS_COMPILE"
fi
# Source
_repository="j6lte"
_commit="03b26fe4bd3726b2940df395716ffc316cdff5ac"
_config="config-$_flavor.$arch"
source="
$pkgname-$_commit.tar.gz::https://github.com/YJPrakash/$_repository/archive/$_commit.tar.gz
$_config
gcc10-extern_YYLOC_global_declaration.patch
replace-Sun-Solaris-style-flag-on-section-xz-supplementation.patch
replace-Sun-Solaris-style-flag-on-section.patch
03-fix-Makefile-path.patch
arm64-dts-Add-dtbs_install-make-target.patch
02-fix-video-argb-setting.patch
firmware-paths-fix.patch
"
builddir="$srcdir/$_repository-$_commit"
_outdir="out"
prepare() {
export ANDROID_MAJOR_VERSION=o
default_prepare
. downstreamkernel_prepare
}
build() {
unset LDFLAGS
export ANDROID_MAJOR_VERSION=o
mkdir -p "$_outdir/init/"
mkdir -p "$_outdir/firmware/"
cp init/vmm.elf "$_outdir/init/vmm.elf"
cp firmware/gnss_firmware.bin "$_outdir/firmware/gnss_firmware.bin"
cp -r firmware/tsp_stm "$_outdir/firmware/"
cp -r firmware/tsp_zinitix "$_outdir/firmware/"
make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
# Master DTB (deviceinfo_bootimg_qcdt)
dtbTool-exynos -o "$_outdir/arch/$_carch/boot"/dt.img \
"$_outdir/arch/$_carch/boot/dts/exynos7870-j6lte_cis_ser_00.dtb" \
"$_outdir/arch/$_carch/boot/dts/exynos7870-j6lte_cis_ser_02.dtb"
}
package() {
export ANDROID_MAJOR_VERSION=o
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" \
"$_flavor" "$_outdir"
mkdir -p "$pkgdir"/boot
make modules_install dtbs_install \
O="$_outdir" \
ARCH="$_carch" \
INSTALL_PATH="$pkgdir"/boot \
INSTALL_MOD_PATH="$pkgdir" \
INSTALL_MOD_STRIP=1 \
INSTALL_DTBS_PATH="$pkgdir"/boot/dtbs
rm -f "$pkgdir"/lib/modules/*/build "$pkgdir"/lib/modules/*/source
install -D "$_outdir"/include/config/kernel.release \
"$pkgdir"/usr/share/kernel/$_flavor/kernel.release
install -Dm644 "$_outdir/arch/$_carch/boot"/dt.img \
"$pkgdir"/boot/dt.img
}
sha512sums="
44719f2fead8c8419cb0ff2595c5325ade53b8639e13f0fa59d599e4470cf911fd2c442af2fef3529c8875a62d2469ecbfc5ef52ac4c61e1495ff335afea9412 linux-samsung-j6lte-03b26fe4bd3726b2940df395716ffc316cdff5ac.tar.gz
bb230864207ff6788a0db645d62035b51de10c0ed8057f1b61c79e46453f7bbb143c45b2bc879e936b4be0b801d5437d52316bddfc17f11a2d9d12c397a25bb9 config-samsung-j6lte.aarch64
2b48f1bf0e3f70703d2cdafc47d5e615cc7c56c70bec56b2e3297d3fa4a7a1321d649a8679614553dde8fe52ff1051dae38d5990e3744c9ca986d92187dcdbeb gcc10-extern_YYLOC_global_declaration.patch
a6b6c781dd23f9a45a1605456d8c9af3ec6b5c389acd2b5d4c32280dcb59118996d794165bea2005dbdd9415297e5060bcac7579f908f7d65406a862b743fed5 replace-Sun-Solaris-style-flag-on-section-xz-supplementation.patch
7114216a2c7bf59ae208d7744b9b0b98ac6f2d833f778b228c80cbb4a0f8b0cefc9da9f6944b0ff494f64d4e89b29cb4d0e296190764e5a84cd6fa2c7ff047e6 replace-Sun-Solaris-style-flag-on-section.patch
08d278ab861e99f09fae27e79ae0af4a919ef0584fe168c4585a2467175d757341ac062a1fad29035f5f9ff14d61bef2f7ac69433751b02b10cbbbb9e5a51abd 03-fix-Makefile-path.patch
8455103d13d579f6eb9b1c6b83b91e73618960bd857d33a90df506a5ccc093a7dccb5361c0d4178caea388592f2968eebe331b597c8004225ed87b8e835c562f arm64-dts-Add-dtbs_install-make-target.patch
5bd204239a5daff9f990757178398707ae5ec64f823ed9ec72a8d50ebe6d5f0a3cc9743e0d775094da4b3a7566f1ccceb56f39f3b0234d08ca05e537d86271ec 02-fix-video-argb-setting.patch
d42c2c81538a101c9263925743d91b9bc0b915988ab37a53bf8111993a30c94f5f6c80bd220fec5964a4cfb448cf8e5e876f365a4c5eccdbf4150a22a844bea3 firmware-paths-fix.patch
"

View file

@ -0,0 +1,43 @@
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
index 857ae112..856486d2 100755
--- a/arch/arm64/Makefile
+++ b/arch/arm64/Makefile
@@ -76,8 +76,9 @@ zinstall install: vmlinux
%.dtb: scripts
$(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@
-dtbs: scripts
- $(Q)$(MAKE) $(build)=$(boot)/dts dtbs
+PHONY += dtbs dtbs_install
+dtbs dtbs_install: prepare scripts
+ $(Q)$(MAKE) $(build)=$(boot)/dts $@
Image.gz-dtb: vmlinux scripts dtbs
$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
@@ -94,6 +95,7 @@ define archhelp
echo '* Image.gz - Compressed kernel image (arch/$(ARCH)/boot/Image.gz)'
echo ' Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)'
echo '* dtbs - Build device tree blobs for enabled boards'
+ echo ' dtbs_install - Install dtbs to $(INSTALL_DTBS_PATH)'
echo ' install - Install uncompressed kernel'
echo ' zinstall - Install compressed kernel'
echo ' Install using (your) ~/bin/installkernel or'
diff --git a/arch/arm64/boot/dts/Makefile b/arch/arm64/boot/dts/Makefile
index 9370074e..c972daa2 100755
--- a/arch/arm64/boot/dts/Makefile
+++ b/arch/arm64/boot/dts/Makefile
@@ -7,7 +7,7 @@ dtb-$(CONFIG_SOC_EXYNOS8890) += exynos8890-evt1-smdk8890.dtb
# Device specific DTBs
dtb-$(CONFIG_DTB_J6LTE) += exynos7870-j6lte_cis_ser_00.dtb exynos7870-j6lte_cis_ser_02.dtb
-targets += dtbs
+targets += dtbs dtbs_install
DTB_NAMES := $(subst $\",,$(CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE_NAMES))
ifneq ($(DTB_NAMES),)
@@ -20,3 +20,5 @@ targets += $(DTB_LIST)
dtbs: $(addprefix $(obj)/, $(DTB_LIST))
clean-files := dts/*.dtb *.dtb
+
+dtbs_install: $(addsuffix _dtbinst_, $(dtb-y))

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,13 @@
diff --git a/drivers/net/wireless/bcmdhd_1_77/dhd.h b/drivers/net/wireless/bcmdhd_1_77/dhd.h
index ca9a9d5c..4a5a1441 100755
--- a/drivers/net/wireless/bcmdhd_1_77/dhd.h
+++ b/drivers/net/wireless/bcmdhd_1_77/dhd.h
@@ -299,7 +299,7 @@ enum dhd_op_flags {
#if defined(CUSTOMER_HW4) && defined(PLATFORM_SLP)
#define CONFIG_BCMDHD_CLM_PATH "/lib/firmware/bcmdhd_clm.blob"
#else
-#define CONFIG_BCMDHD_CLM_PATH "/etc/wifi/bcmdhd_clm.blob"
+#define CONFIG_BCMDHD_CLM_PATH "/lib/firmware/postmarketos/wifi/bcmdhd_clm.blob"
#endif /* CUSTOMER_HW4 && PLATFORM_SLP */
#endif /* CONFIG_BCMDHD_CLM_PATH */
#define WL_CCODE_NULL_COUNTRY "#n"

View file

@ -0,0 +1 @@
../../.shared-patches/linux/gcc10-extern_YYLOC_global_declaration.patch

View file

@ -0,0 +1,12 @@
This patch is the supplementation of linux3.4-ARM-8933-1-replace-Sun-Solaris-style-flag-on-section.patch.
diff --git a/arch/arm/boot/compressed/piggy.xzkern.S b/arch/arm/boot/compressed/piggy.xzkern.S
index d7e69cffbc0a..cfea81ae8f4b 100644
--- a/arch/arm/boot/compressed/piggy.xzkern.S
+++ b/arch/arm/boot/compressed/piggy.xzkern.S
@@ -1,4 +1,4 @@
- .section .piggydata,#alloc
+ .section .piggydata, "a"
.globl input_data
input_data:
.incbin "arch/arm/boot/compressed/piggy.xzkern"

View file

@ -0,0 +1,75 @@
diff --git a/arch/arm/boot/bootp/init.S b/arch/arm/boot/bootp/init.S
index 78b50807..868eeeaa 100644
--- a/arch/arm/boot/bootp/init.S
+++ b/arch/arm/boot/bootp/init.S
@@ -16,7 +16,7 @@
* size immediately following the kernel, we could build this into
* a binary blob, and concatenate the zImage using the cat command.
*/
- .section .start,#alloc,#execinstr
+ .section .start, "ax"
.type _start, #function
.globl _start
diff --git a/arch/arm/boot/compressed/big-endian.S b/arch/arm/boot/compressed/big-endian.S
index 25ab26f1..f22428e2 100644
--- a/arch/arm/boot/compressed/big-endian.S
+++ b/arch/arm/boot/compressed/big-endian.S
@@ -5,7 +5,7 @@
* Author: Nicolas Pitre
*/
- .section ".start", #alloc, #execinstr
+ .section ".start", "ax"
mrc p15, 0, r0, c1, c0, 0 @ read control reg
orr r0, r0, #(1 << 7) @ enable big endian mode
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
index d2e45951..290a13ed 100644
--- a/arch/arm/boot/compressed/head.S
+++ b/arch/arm/boot/compressed/head.S
@@ -109,7 +109,7 @@
#endif
.endm
- .section ".start", #alloc, #execinstr
+ .section ".start", "ax"
/*
* sort out different calling conventions
*/
diff --git a/arch/arm/boot/compressed/piggy.lzma.S b/arch/arm/boot/compressed/piggy.lzma.S
index d7e69cff..cfea81ae 100644
--- a/arch/arm/boot/compressed/piggy.lzma.S
+++ b/arch/arm/boot/compressed/piggy.lzma.S
@@ -1,4 +1,4 @@
- .section .piggydata,#alloc
+ .section .piggydata, "a"
.globl input_data
input_data:
.incbin "arch/arm/boot/compressed/piggy.lzma"
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
index 22ac2a6f..68744e1c 100644
--- a/arch/arm/mm/proc-v7.S
+++ b/arch/arm/mm/proc-v7.S
@@ -462,7 +462,7 @@ __v7_setup_stack:
string cpu_elf_name, "v7"
.align
- .section ".proc.info.init", #alloc, #execinstr
+ .section ".proc.info.init", "ax"
/*
* Standard v7 proc info content
diff --git a/arch/arm64/mm/proc.S b/arch/arm64/mm/proc.S
index 302353d9..22f35fb5 100644
--- a/arch/arm64/mm/proc.S
+++ b/arch/arm64/mm/proc.S
@@ -186,7 +186,7 @@ ENTRY(cpu_do_switch_mm)
ret
ENDPROC(cpu_do_switch_mm)
- .section ".text.init", #alloc, #execinstr
+ .section ".text.init", "ax"
/*
* __cpu_setup