samsung-n1awifi: new device (Samsung Galaxy Note 10.1 2014) (MR 2135)
[ci:skip-build] Already built on CI in MR
This commit is contained in:
parent
22cee921f7
commit
7ec5f99ee6
11 changed files with 4031 additions and 0 deletions
35
device/testing/device-samsung-n1awifi/APKBUILD
Normal file
35
device/testing/device-samsung-n1awifi/APKBUILD
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
# Reference: <https://postmarketos.org/devicepkg>
|
||||||
|
pkgname=device-samsung-n1awifi
|
||||||
|
pkgdesc="Samsung Galaxy Note 10.1 (2014 edition)"
|
||||||
|
pkgver=0.1
|
||||||
|
pkgrel=0
|
||||||
|
url="https://postmarketos.org"
|
||||||
|
license="MIT"
|
||||||
|
arch="armv7"
|
||||||
|
options="!check !archcheck"
|
||||||
|
depends="
|
||||||
|
linux-samsung-n1awifi
|
||||||
|
mesa-dri-gallium
|
||||||
|
mkbootimg
|
||||||
|
postmarketos-base
|
||||||
|
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="Non-free firmware for the Samsung Galaxy Note 10.1 (2014 edition)"
|
||||||
|
depends="firmware-samsung-n1awifi"
|
||||||
|
mkdir "$subpkgdir"
|
||||||
|
}
|
||||||
|
|
||||||
|
sha512sums="d59e7aad584a07fa01b12e3b7e8ccc86e1d807f0f7e4c73ea5ef26bfcf531c471354839735b0b2b1665cef7dad5305dc36bf2a62f05ee440fdbb4342ce778d7c deviceinfo"
|
33
device/testing/device-samsung-n1awifi/deviceinfo
Normal file
33
device/testing/device-samsung-n1awifi/deviceinfo
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
# 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 Note 10.1 (2014 edition)"
|
||||||
|
deviceinfo_manufacturer="Samsung"
|
||||||
|
deviceinfo_codename="samsung-n1awifi"
|
||||||
|
deviceinfo_year="2013"
|
||||||
|
deviceinfo_arch="armv7"
|
||||||
|
|
||||||
|
# Device related
|
||||||
|
deviceinfo_chassis="tablet"
|
||||||
|
deviceinfo_keyboard="false"
|
||||||
|
deviceinfo_external_storage="false"
|
||||||
|
deviceinfo_screen_width="2560"
|
||||||
|
deviceinfo_screen_height="1600"
|
||||||
|
|
||||||
|
# Bootloader related
|
||||||
|
deviceinfo_flash_method="heimdall-bootimg"
|
||||||
|
deviceinfo_kernel_cmdline="buildvariant=userdebug"
|
||||||
|
deviceinfo_generate_bootimg="true"
|
||||||
|
deviceinfo_bootimg_qcdt="false"
|
||||||
|
deviceinfo_bootimg_mtk_mkimage="false"
|
||||||
|
deviceinfo_bootimg_dtb_second="false"
|
||||||
|
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_pagesize="2048"
|
||||||
|
deviceinfo_flash_heimdall_partition_kernel="BOOT"
|
||||||
|
deviceinfo_flash_heimdall_partition_system="SYSTEM"
|
43
device/testing/firmware-samsung-n1awifi/APKBUILD
Normal file
43
device/testing/firmware-samsung-n1awifi/APKBUILD
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
pkgname=firmware-samsung-n1awifi
|
||||||
|
pkgver=1
|
||||||
|
pkgrel=0
|
||||||
|
pkgdesc="Firmware for Samsung n1awifi"
|
||||||
|
url="https://github.com/exynos5420/android_vendor_samsung_n1a-common"
|
||||||
|
arch="armv7"
|
||||||
|
license="proprietary"
|
||||||
|
options="!check !strip !archcheck !spdx"
|
||||||
|
|
||||||
|
# Source
|
||||||
|
_n1awifi_commit="d5f5bda50338eaea89d31e95afd7be5080485c41"
|
||||||
|
_n1awifi_url="https://github.com/exynos5420/android_vendor_samsung_n1a-common/raw/$_n1awifi_commit"
|
||||||
|
|
||||||
|
_n1awifi_wifi_files="
|
||||||
|
bcmdhd_apsta.bin
|
||||||
|
bcmdhd_ibss.bin
|
||||||
|
bcmdhd_mfg.bin
|
||||||
|
bcmdhd_sta.bin
|
||||||
|
cred.conf
|
||||||
|
nvram_mfg.txt
|
||||||
|
nvram_net.txt
|
||||||
|
"
|
||||||
|
|
||||||
|
|
||||||
|
for _i in $_n1awifi_wifi_files; do
|
||||||
|
source="$source $pkgname-$_n1awifi_commit-$_i::$_n1awifi_url/proprietary/etc/wifi/$_i";
|
||||||
|
done
|
||||||
|
|
||||||
|
package() {
|
||||||
|
# Wifi
|
||||||
|
local file
|
||||||
|
for file in $_n1awifi_wifi_files; do
|
||||||
|
install -Dm644 "$srcdir/$pkgname-$_n1awifi_commit-$file" \
|
||||||
|
"$pkgdir/lib/firmware/postmarketos/$file"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
sha512sums="f0adb03c36e5524c2aca1ec871861d7bc126302028455e0a4eca5b841261e3d50803eba2f82738483de21c6703b2c896e65930c09a6a16d3de61a63ca035844a firmware-samsung-n1awifi-d5f5bda50338eaea89d31e95afd7be5080485c41-bcmdhd_apsta.bin
|
||||||
|
9993d27fef9f62c43b8a4a75a9c2658022a39a40e65065329519fe8274114a1667d2a4f87ffca43bd043897e5ecaac293ef4929e449d0e8e7f5c3f07f5602536 firmware-samsung-n1awifi-d5f5bda50338eaea89d31e95afd7be5080485c41-bcmdhd_ibss.bin
|
||||||
|
bff2e27222f3fea8fd0c9eef3b7f474531a8a1d22cc5742e8a20bade7ab8c6407ec2773e3d7a5346b54d8389e54d101fb4cdf049c35040b3806325a607346758 firmware-samsung-n1awifi-d5f5bda50338eaea89d31e95afd7be5080485c41-bcmdhd_mfg.bin
|
||||||
|
b9344478874f94af33052e76116f2c24b577c4c8178a3c7fc8eb9bb6a1d8c3f497443a88cf1b94256ef3e17806541d7271784505ac16de2b322ccb5ddcec54d3 firmware-samsung-n1awifi-d5f5bda50338eaea89d31e95afd7be5080485c41-bcmdhd_sta.bin
|
||||||
|
16ee43800bf7c05f550a14036ef1d648999568996854c72c1ef3965a8fd18eabfda284266fa2e2a0fee8c5fec01fd9a7e22b11b6723797742b5a6260e0b44096 firmware-samsung-n1awifi-d5f5bda50338eaea89d31e95afd7be5080485c41-cred.conf
|
||||||
|
83b6d11dd5544d1a130a74464b0f30c7f5807ef586c26d2a216961e335bd0bedfaa725198f912f226fb267ca5742487938a8fc948cbc71f84682cd447d064ea0 firmware-samsung-n1awifi-d5f5bda50338eaea89d31e95afd7be5080485c41-nvram_mfg.txt
|
||||||
|
1b94536a1dca06195787999e5788178e6eced88779911bd24418d77f07dccce3ffcd2a182c14f231b6a8ca7723f2b0fcf6c45cdd1d7d20966cce1bd7e98c3c40 firmware-samsung-n1awifi-d5f5bda50338eaea89d31e95afd7be5080485c41-nvram_net.txt"
|
|
@ -0,0 +1,59 @@
|
||||||
|
commit 611c7138d2812827c3a62940576bf62c61cd8515
|
||||||
|
Author: Henrik Grimler <henrik@grimler.se>
|
||||||
|
Date: Fri Nov 27 18:01:34 2020 +0100
|
||||||
|
|
||||||
|
Fix so that FIMC IS can be disabled
|
||||||
|
|
||||||
|
* mach-exynos: don't set EXYNOS5_{DEV,SETUP}_FIMC_IS for universal5420
|
||||||
|
|
||||||
|
* board-universal5420-media: add ifdef guard to fix compilation error
|
||||||
|
|
||||||
|
* pm_domains: always init exynos54xx_pd_isp to prevent null pointer dereference
|
||||||
|
|
||||||
|
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
|
||||||
|
index 2aed1a4dfbac..9667d665363d 100644
|
||||||
|
--- a/arch/arm/mach-exynos/Kconfig
|
||||||
|
+++ b/arch/arm/mach-exynos/Kconfig
|
||||||
|
@@ -883,8 +883,6 @@ config MACH_UNIVERSAL5420
|
||||||
|
select EXYNOS5_SETUP_HSI2C4
|
||||||
|
select EXYNOS5_SETUP_HSI2C5
|
||||||
|
select EXYNOS5_SETUP_HSI2C6
|
||||||
|
- select EXYNOS5_DEV_FIMC_IS
|
||||||
|
- select EXYNOS5_SETUP_FIMC_IS
|
||||||
|
help
|
||||||
|
Machine support for Universal board based on EXYNOS5420
|
||||||
|
endif
|
||||||
|
diff --git a/arch/arm/mach-exynos/board-universal5420-media.c b/arch/arm/mach-exynos/board-universal5420-media.c
|
||||||
|
index 91677b04f9e8..4e461819fa68 100644
|
||||||
|
--- a/arch/arm/mach-exynos/board-universal5420-media.c
|
||||||
|
+++ b/arch/arm/mach-exynos/board-universal5420-media.c
|
||||||
|
@@ -1166,6 +1166,7 @@ void __init exynos5_universal5420_media_init(void)
|
||||||
|
sizeof(s5p_mipi_csis1_default_data), &s5p_device_mipi_csis1);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#ifdef CONFIG_VISION_MODE
|
||||||
|
#ifdef CONFIG_VIDEO_EXYNOS_FIMC_LITE
|
||||||
|
#if !defined(CONFIG_V1A) && !defined(CONFIG_V2A)
|
||||||
|
s3c_i2c1_set_platdata(NULL);
|
||||||
|
@@ -1178,6 +1179,7 @@ void __init exynos5_universal5420_media_init(void)
|
||||||
|
s3c_set_platdata(&exynos_flite2_default_data,
|
||||||
|
sizeof(exynos_flite2_default_data), &exynos_device_flite2);
|
||||||
|
#endif
|
||||||
|
+#endif /* CONFIG_VISION_MODE */
|
||||||
|
|
||||||
|
/* camera */
|
||||||
|
#ifdef CONFIG_VIDEO_EXYNOS5_FIMC_IS
|
||||||
|
diff --git a/arch/arm/mach-exynos/pm_domains5.c b/arch/arm/mach-exynos/pm_domains5.c
|
||||||
|
index 3220333bed94..2599bb756958 100644
|
||||||
|
--- a/arch/arm/mach-exynos/pm_domains5.c
|
||||||
|
+++ b/arch/arm/mach-exynos/pm_domains5.c
|
||||||
|
@@ -1224,8 +1224,8 @@ static int exynos5420_pm_domain_init(void)
|
||||||
|
exynos_pm_add_clk(&exynos5420_spd_mscl1, NULL, "mscl");
|
||||||
|
exynos_pm_add_clk(&exynos5420_spd_mscl2, NULL, "mscl");
|
||||||
|
#endif
|
||||||
|
-#ifdef CONFIG_EXYNOS5_DEV_FIMC_IS
|
||||||
|
exynos_pm_powerdomain_init(&exynos54xx_pd_isp);
|
||||||
|
+#ifdef CONFIG_EXYNOS5_DEV_FIMC_IS
|
||||||
|
exynos_pm_add_platdev(&exynos54xx_pd_isp, &exynos5_device_fimc_is);
|
||||||
|
exynos_pm_add_platdev(&exynos54xx_pd_isp, &s3c64xx_device_spi3);
|
||||||
|
exynos_pm_add_clk(&exynos54xx_pd_isp, &exynos5_device_fimc_is.dev, "gscl_wrap0");
|
|
@ -0,0 +1,25 @@
|
||||||
|
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
|
||||||
|
index 2be46cb9357..a77e015eb77 100644
|
||||||
|
--- a/kernel/hrtimer.c
|
||||||
|
+++ b/kernel/hrtimer.c
|
||||||
|
@@ -87,9 +87,6 @@ DEFINE_PER_CPU(struct hrtimer_cpu_base, hrtimer_bases) =
|
||||||
|
};
|
||||||
|
|
||||||
|
static const int hrtimer_clock_to_base_table[MAX_CLOCKS] = {
|
||||||
|
- /* Make sure we catch unsupported clockids */
|
||||||
|
- [0 ... MAX_CLOCKS - 1] = HRTIMER_MAX_CLOCK_BASES,
|
||||||
|
-
|
||||||
|
[CLOCK_REALTIME] = HRTIMER_BASE_REALTIME,
|
||||||
|
[CLOCK_MONOTONIC] = HRTIMER_BASE_MONOTONIC,
|
||||||
|
[CLOCK_BOOTTIME] = HRTIMER_BASE_BOOTTIME,
|
||||||
|
@@ -97,9 +94,7 @@ static const int hrtimer_clock_to_base_table[MAX_CLOCKS] = {
|
||||||
|
|
||||||
|
static inline int hrtimer_clockid_to_base(clockid_t clock_id)
|
||||||
|
{
|
||||||
|
- int base = hrtimer_clock_to_base_table[clock_id];
|
||||||
|
- BUG_ON(base == HRTIMER_MAX_CLOCK_BASES);
|
||||||
|
- return base;
|
||||||
|
+ return hrtimer_clock_to_base_table[clock_id];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
diff --git a/drivers/usb/gadget/u_ether.c b/drivers/usb/gadget/u_ether.c
|
||||||
|
index 934b8bacfeeb..f41d23c5f5cb 100644
|
||||||
|
--- a/drivers/usb/gadget/u_ether.c
|
||||||
|
+++ b/drivers/usb/gadget/u_ether.c
|
||||||
|
@@ -1224,8 +1224,17 @@ int gether_setup_name(struct usb_gadget *g, u8 ethaddr[ETH_ALEN],
|
||||||
|
dev_warn(&g->dev,
|
||||||
|
"using random %s ethernet address\n", "self");
|
||||||
|
#ifdef CONFIG_USB_ANDROID_SAMSUNG_COMPOSITE
|
||||||
|
+ if ((ethaddr[0] == 0x00) && (ethaddr[1] == 0x00) &&
|
||||||
|
+ (ethaddr[2] == 0x00) && (ethaddr[3] == 0x00) &&
|
||||||
|
+ (ethaddr[4] == 0x00) && (ethaddr[5] == 0x00)) {
|
||||||
|
+ printk(KERN_DEBUG "%s: no unique host MAC was set, generate random\n", __func__);
|
||||||
|
+ /* we can use random_ether_addr() from include/linux/etherdevice.h */
|
||||||
|
+ random_ether_addr(ethaddr);
|
||||||
|
+ } else {
|
||||||
|
+ printk(KERN_DEBUG "%s: set unique host mac\n", __func__);
|
||||||
|
+ }
|
||||||
|
memcpy(dev->host_mac, ethaddr, ETH_ALEN);
|
||||||
|
- printk(KERN_DEBUG "usb: set unique host mac\n");
|
||||||
|
+
|
||||||
|
#else
|
||||||
|
if (get_ether_addr(host_addr, dev->host_mac))
|
||||||
|
dev_warn(&g->dev,
|
64
device/testing/linux-samsung-n1awifi/APKBUILD
Normal file
64
device/testing/linux-samsung-n1awifi/APKBUILD
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
# Reference: <https://postmarketos.org/vendorkernel>
|
||||||
|
# Kernel config based on: arch/arm/configs/lineageos_n1awifi_defconfig
|
||||||
|
|
||||||
|
pkgname=linux-samsung-n1awifi
|
||||||
|
pkgver=3.4.113
|
||||||
|
pkgrel=0
|
||||||
|
pkgdesc="Samsung Galaxy Note 10.1 (2014 Edition) kernel fork"
|
||||||
|
arch="armv7"
|
||||||
|
_carch="arm"
|
||||||
|
_flavor="samsung-n1awifi"
|
||||||
|
url="https://kernel.org"
|
||||||
|
license="GPL-2.0-only"
|
||||||
|
options="!strip !check !tracedeps pmb:cross-native"
|
||||||
|
makedepends="
|
||||||
|
bash
|
||||||
|
bc
|
||||||
|
bison
|
||||||
|
devicepkg-dev
|
||||||
|
flex
|
||||||
|
openssl-dev
|
||||||
|
perl
|
||||||
|
xz
|
||||||
|
"
|
||||||
|
|
||||||
|
# Source
|
||||||
|
_repository="android_kernel_samsung_exynos5420"
|
||||||
|
_commit="c1a203cee565eb20a9b5bc2daf1c1b650a420fe5"
|
||||||
|
_config="config-$_flavor.$arch"
|
||||||
|
source="
|
||||||
|
$pkgname-$_commit.tar.gz::https://github.com/exynos5420/$_repository/archive/$_commit.tar.gz
|
||||||
|
$_config
|
||||||
|
gcc7-give-up-on-ilog2-const-optimizations.patch
|
||||||
|
gcc8-fix-put-user.patch
|
||||||
|
gcc10-extern_YYLOC_global_declaration.patch
|
||||||
|
01-fix-FIMC-IS-disabling.patch
|
||||||
|
02-revert-hrtimer-crash.patch
|
||||||
|
03-usb_gadget-set-random-rndis-host-MAC-address-to-prev.patch
|
||||||
|
"
|
||||||
|
builddir="$srcdir/$_repository-$_commit"
|
||||||
|
_outdir="out"
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
default_prepare
|
||||||
|
. downstreamkernel_prepare
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
unset LDFLAGS
|
||||||
|
make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" \
|
||||||
|
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" "$_outdir"
|
||||||
|
}
|
||||||
|
|
||||||
|
sha512sums="38bb1af78097f32ec594d3c7dd393c1fe449c4c892b567b1558a999143049e1bc2fa7375ecd54477be97066534e0dd875c01453e4658b4ae3f91e346e0b3b6ea linux-samsung-n1awifi-c1a203cee565eb20a9b5bc2daf1c1b650a420fe5.tar.gz
|
||||||
|
4358a8abe109815f79b661024dfba8d431a3deef9d8346d4c3c64d51a4d5efbf10169ad278cab9357afe5bfba1b12278043968d50cb43b8c2109cb6b630058cc config-samsung-n1awifi.armv7
|
||||||
|
77eba606a71eafb36c32e9c5fe5e77f5e4746caac292440d9fb720763d766074a964db1c12bc76fe583c5d1a5c864219c59941f5e53adad182dbc70bf2bc14a7 gcc7-give-up-on-ilog2-const-optimizations.patch
|
||||||
|
197d40a214ada87fcb2dfc0ae4911704b9a93354b75179cd6b4aadbb627a37ec262cf516921c84a8b1806809b70a7b440cdc8310a4a55fca5d2c0baa988e3967 gcc8-fix-put-user.patch
|
||||||
|
2b48f1bf0e3f70703d2cdafc47d5e615cc7c56c70bec56b2e3297d3fa4a7a1321d649a8679614553dde8fe52ff1051dae38d5990e3744c9ca986d92187dcdbeb gcc10-extern_YYLOC_global_declaration.patch
|
||||||
|
00c86b897193340ce4e8184e622d830d16efe9a5c10c12357e5f6ab98193a28f69c0006bdfe0d3429f1136a9820b8f8ff262d07b0314e40f4c7b664013e0b8a6 01-fix-FIMC-IS-disabling.patch
|
||||||
|
14e9341140e6fcc899c435c7572cacfbbef3c5a9b455106cfc648985211daf64ff5955ea9b9b7706b459401d9b60c6bb5857396e913adc07c01b3557c49a98d8 02-revert-hrtimer-crash.patch
|
||||||
|
5fad0940e90da71277b70b6e72fbb75fcc5e12625e65f827ae896d448628b252b3312539f9c184b26ffe5ca3b343a56b388ea6addb7fe446c7d1ae2aefb4b51e 03-usb_gadget-set-random-rndis-host-MAC-address-to-prev.patch"
|
3746
device/testing/linux-samsung-n1awifi/config-samsung-n1awifi.armv7
Normal file
3746
device/testing/linux-samsung-n1awifi/config-samsung-n1awifi.armv7
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1 @@
|
||||||
|
../../.shared-patches/linux/gcc10-extern_YYLOC_global_declaration.patch
|
|
@ -0,0 +1 @@
|
||||||
|
../../.shared-patches/linux/gcc7-give-up-on-ilog2-const-optimizations.patch
|
1
device/testing/linux-samsung-n1awifi/gcc8-fix-put-user.patch
Symbolic link
1
device/testing/linux-samsung-n1awifi/gcc8-fix-put-user.patch
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../../.shared-patches/linux/gcc8-fix-put-user.patch
|
Loading…
Reference in a new issue