1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-16 11:43:21 +03:00

samsung-a5y17lte: use updated kernel

This fork is the one used by TWRP, is much more up-to-date with source
releases from the OEM, compared to the LineageOS fork.
This commit is contained in:
Samuel Dionne-Riel 2021-01-09 04:19:05 -05:00
parent 5e6f7cc23c
commit 8698680fe1
3 changed files with 72 additions and 96 deletions

View File

@ -1,74 +0,0 @@
From f116062840defac45702026e42165352c978ea52 Mon Sep 17 00:00:00 2001
From: Samuel Dionne-Riel <samuel@dionne-riel.com>
Date: Wed, 18 Nov 2020 23:39:18 -0500
Subject: [PATCH] af_inet: only enable knox stuff with paranoid networking
---
net/ipv4/af_inet.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index 79c35a5b276..664f2f44655 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -420,6 +420,7 @@ out_rcu_unlock:
goto out;
}
+#ifdef CONFIG_ANDROID_PARANOID_NETWORK
/* START_OF_KNOX_NPA */
/** The function is used to check if the ncm feature is enabled or not;
* if enabled then collect the socket meta-data information;
@@ -431,6 +432,7 @@ static void knox_collect_metadata(struct socket *sock)
}
}
/* END_OF_KNOX_NPA */
+#endif
/*
* The peer socket should always be NULL (or else). When we call this
@@ -463,9 +465,11 @@ int inet_release(struct socket *sock)
if (sock_flag(sk, SOCK_LINGER) &&
!(current->flags & PF_EXITING))
timeout = sk->sk_lingertime;
+#ifdef CONFIG_ANDROID_PARANOID_NETWORK
/* START_OF_KNOX_NPA */
knox_collect_metadata(sock);
/* END_OF_KNOX_NPA */
+#endif
sock->sk = NULL;
sk->sk_prot->close(sk, timeout);
}
@@ -807,6 +811,7 @@ int inet_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg,
err = sk->sk_prot->sendmsg(iocb, sk, msg, size);
+#ifdef CONFIG_ANDROID_PARANOID_NETWORK
if (err >= 0) {
if(sock->knox_sent + err > ULLONG_MAX) {
sock->knox_sent = ULLONG_MAX;
@@ -814,6 +819,7 @@ int inet_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg,
sock->knox_sent = sock->knox_sent + err;
}
}
+#endif
return err;
}
EXPORT_SYMBOL(inet_sendmsg);
@@ -849,11 +855,13 @@ int inet_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg,
flags & ~MSG_DONTWAIT, &addr_len);
if (err >= 0) {
msg->msg_namelen = addr_len;
+#ifdef CONFIG_ANDROID_PARANOID_NETWORK
if(sock->knox_recv + err > ULLONG_MAX) {
sock->knox_recv = ULLONG_MAX;
} else {
sock->knox_recv = sock->knox_recv + err;
}
+#endif
}
return err;
}
--
2.28.0

View File

@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm64 3.18.14 Kernel Configuration
# Linux/arm64 3.18.91 Kernel Configuration
#
CONFIG_ARM64=y
CONFIG_64BIT=y
@ -24,11 +24,13 @@ CONFIG_HAVE_GENERIC_RCU_GUP=y
CONFIG_ARCH_DMA_ADDR_T_64BIT=y
CONFIG_NEED_DMA_MAP_STATE=y
CONFIG_NEED_SG_DMA_LENGTH=y
CONFIG_SMP=y
CONFIG_SWIOTLB=y
CONFIG_IOMMU_HELPER=y
CONFIG_KERNEL_MODE_NEON=y
CONFIG_FIX_EARLYCON_MEM=y
CONFIG_GENERIC_BUG=y
CONFIG_PGTABLE_LEVELS=3
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
CONFIG_IRQ_WORK=y
CONFIG_BUILDTIME_EXTABLE_SORT=y
@ -87,6 +89,7 @@ CONFIG_HIGH_RES_TIMERS=y
#
CONFIG_TICK_CPU_ACCOUNTING=y
# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set
# CONFIG_SCHED_WALT is not set
# CONFIG_BSD_PROCESS_ACCT is not set
# CONFIG_TASKSTATS is not set
@ -133,6 +136,7 @@ CONFIG_USER_NS=y
# CONFIG_PID_NS is not set
CONFIG_NET_NS=y
# CONFIG_SCHED_AUTOGROUP is not set
# CONFIG_SCHED_TUNE is not set
# CONFIG_SYSFS_DEPRECATED is not set
# CONFIG_RELAY is not set
CONFIG_BLK_DEV_INITRD=y
@ -285,6 +289,13 @@ CONFIG_MUTEX_SPIN_ON_OWNER=y
CONFIG_RWSEM_SPIN_ON_OWNER=y
CONFIG_FREEZER=y
#
# SAMSUNG EXYNOS SoCs Support
#
# CONFIG_MACH_EXYNOS7880_NONE is not set
CONFIG_MACH_EXYNOS7880_A5Y17LTE_EUR_OPEN=y
# CONFIG_MACH_EXYNOS7880_A7Y17LTE_EUR_OPEN is not set
#
# Platform selection
#
@ -333,9 +344,7 @@ CONFIG_ARM64_4K_PAGES=y
CONFIG_ARM64_VA_BITS_39=y
# CONFIG_ARM64_VA_BITS_48 is not set
CONFIG_ARM64_VA_BITS=39
CONFIG_ARM64_PGTABLE_LEVELS=3
# CONFIG_CPU_BIG_ENDIAN is not set
CONFIG_SMP=y
# CONFIG_SCHED_MC is not set
# CONFIG_SCHED_SMT is not set
# CONFIG_DISABLE_CPU_SCHED_DOMAIN_BALANCE is not set
@ -400,14 +409,24 @@ CONFIG_TIGHT_PGDAT_BALANCE=y
CONFIG_GENERIC_EARLY_IOREMAP=y
CONFIG_MMAP_READAROUND_LIMIT=16
CONFIG_BALANCE_ANON_FILE_RECLAIM=y
# CONFIG_LARGE_DIRTY_BUFFER is not set
CONFIG_MAX_DIRTY_THRESH_PAGES=0
CONFIG_SECCOMP=y
CONFIG_KEXEC=y
# CONFIG_XEN is not set
CONFIG_FORCE_MAX_ZONEORDER=11
# CONFIG_UNMAP_KERNEL_AT_EL0 is not set
CONFIG_ARMV8_DEPRECATED=y
CONFIG_SWP_EMULATION=y
CONFIG_CP15_BARRIER_EMULATION=y
CONFIG_SETEND_EMULATION=y
# CONFIG_ARM64_SW_TTBR0_PAN is not set
#
# ARMv8.1 architectural features
#
CONFIG_ARM64_PAN=y
CONFIG_ARM64_UAO=y
#
# Boot options
@ -417,6 +436,7 @@ CONFIG_CMDLINE_DROP_DANGEROUS_ANDROID_OPTIONS=y
# CONFIG_EFI is not set
# CONFIG_TIMA is not set
CONFIG_TIMA_LKMAUTH=y
# CONFIG_UH_RKP is not set
# CONFIG_TIMA_TEST_INFRA is not set
# CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE is not set
@ -495,12 +515,18 @@ CONFIG_CPU_FREQ_STAT=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHED is not set
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
CONFIG_CPU_FREQ_GOV_USERSPACE=y
# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set
CONFIG_CPU_FREQ_GOV_INTERACTIVE=y
# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
# CONFIG_CPU_FREQ_GOV_SCHED is not set
#
# CPU frequency scaling drivers
#
# CONFIG_CPUFREQ_DT is not set
#
@ -508,6 +534,7 @@ CONFIG_CPU_FREQ_GOV_INTERACTIVE=y
#
CONFIG_ARM_EXYNOS_MP_CPUFREQ=y
# CONFIG_ARM_KIRKWOOD_CPUFREQ is not set
CONFIG_ARM64_ERRATUM_843419=y
CONFIG_NET=y
CONFIG_COMPAT_NETLINK_MESSAGES=y
@ -918,7 +945,6 @@ CONFIG_NET_SCH_FIFO=y
# CONFIG_BATMAN_ADV is not set
# CONFIG_OPENVSWITCH is not set
# CONFIG_VSOCKETS is not set
# CONFIG_NETLINK_MMAP is not set
# CONFIG_NETLINK_DIAG is not set
# CONFIG_NET_MPLS_GSO is not set
# CONFIG_HSR is not set
@ -1025,7 +1051,6 @@ CONFIG_ALLOW_DEV_COREDUMP=y
# CONFIG_DEBUG_DEVRES is not set
# CONFIG_SYS_HYPERVISOR is not set
# CONFIG_GENERIC_CPU_DEVICES is not set
CONFIG_HAVE_CPU_AUTOPROBE=y
CONFIG_GENERIC_CPU_AUTOPROBE=y
CONFIG_SOC_BUS=y
CONFIG_REGMAP=y
@ -1068,6 +1093,10 @@ CONFIG_OF_IRQ=y
CONFIG_OF_NET=y
CONFIG_OF_MDIO=y
CONFIG_OF_RESERVED_MEM=y
CONFIG_EXYNOS_DTBTOOL=y
CONFIG_EXYNOS_DTBH_PLATFORM_CODE=0x50a6
CONFIG_EXYNOS_DTBH_SUBTYPE_CODE=0x217584da
CONFIG_EXYNOS_DTBH_PAGE_SIZE=2048
# CONFIG_PARPORT is not set
CONFIG_BLK_DEV=y
# CONFIG_BLK_DEV_NULL_BLK is not set
@ -1113,8 +1142,8 @@ CONFIG_BLK_DEV_RAM_SIZE=8192
# CONFIG_USB_SWITCH_FSA9480 is not set
# CONFIG_LATTICE_ECP3_CONFIG is not set
# CONFIG_SRAM is not set
# CONFIG_UID_SYS_STATS is not set
# CONFIG_MEMORY_STATE_TIME is not set
CONFIG_EXYNOS_POWEROFF=y
# CONFIG_C2PORT is not set
#
@ -1176,6 +1205,7 @@ CONFIG_UMTS_MODEM_SS310AP=y
# CONFIG_DEBUG_PKTLOG is not set
# CONFIG_LINK_CONTROL_MSG_IOSM is not set
CONFIG_CP_SECURE_BOOT=y
CONFIG_KLAT=y
#
# Samsung Modem Interface Driver for Memory-type Interface
@ -1255,7 +1285,6 @@ CONFIG_MD=y
CONFIG_BLK_DEV_DM_BUILTIN=y
CONFIG_BLK_DEV_DM=y
# CONFIG_DM_DEBUG is not set
CONFIG_DM_BUFIO=y
CONFIG_DM_CRYPT=y
# CONFIG_DM_SNAPSHOT is not set
# CONFIG_DM_THIN_PROVISIONING is not set
@ -1268,8 +1297,8 @@ CONFIG_DM_CRYPT=y
# CONFIG_DM_DELAY is not set
# CONFIG_DM_UEVENT is not set
# CONFIG_DM_FLAKEY is not set
CONFIG_DM_VERITY=y
# CONFIG_DM_VERITY_FEC is not set
# CONFIG_DM_VERITY is not set
# CONFIG_DM_VERITY_HASH_PREFETCH_MIN_SIZE_128 is not set
# CONFIG_DM_SWITCH is not set
# CONFIG_DM_LOG_WRITES is not set
# CONFIG_TARGET_CORE is not set
@ -1444,6 +1473,11 @@ CONFIG_WCNSS_MEM_PRE_ALLOC=y
# CONFIG_WL_TI is not set
# CONFIG_MWIFIEX is not set
#
# Qualcomm Atheros CLD WLAN module
#
# CONFIG_QCA_CLD_WLAN is not set
#
# Enable WiMAX (Networking options) to see the WiMAX drivers
#
@ -2426,6 +2460,7 @@ CONFIG_EXYNOS_VPP=y
CONFIG_EXYNOS_DECON_7880=y
CONFIG_EXYNOS7880_DISPLAY_TE_IRQ_GPIO=y
# CONFIG_EXYNOS7880_DISPLAY_TE_IRQ_GIC is not set
# CONFIG_LOGGING_BIGDATA_BUG is not set
CONFIG_EXYNOS_DECON7880_LCD=y
CONFIG_EXYNOS_DECON_LCD_SYSFS=y
CONFIG_PANEL_AID_DIMMING=y
@ -2661,6 +2696,7 @@ CONFIG_HID_LCPOWER=y
# CONFIG_HID_LENOVO is not set
CONFIG_HID_LOGITECH=y
CONFIG_HID_LOGITECH_DJ=y
# CONFIG_HID_LOGITECH_HIDPP is not set
CONFIG_LOGITECH_FF=y
CONFIG_LOGIRUMBLEPAD2_FF=y
CONFIG_LOGIG940_FF=y
@ -2923,7 +2959,6 @@ CONFIG_USB_SERIAL_PL2303=y
# CONFIG_USB_PHY is not set
CONFIG_USB_OTG_WAKELOCK=y
# CONFIG_NOP_USB_XCEIV is not set
CONFIG_DUAL_ROLE_USB_INTF=y
# CONFIG_USB_GPIO_VBUS is not set
# CONFIG_USB_ISP1301 is not set
# CONFIG_USB_ULPI is not set
@ -2977,11 +3012,17 @@ CONFIG_USB_NCM_SUPPORT_MTU_CHANGE=y
# CONFIG_USB_G_DBGP is not set
# CONFIG_USB_G_WEBCAM is not set
#
# USB Power Delivery and Type-C drivers
#
CONFIG_TYPEC=y
#
# USB PD configs
#
CONFIG_USE_CCIC=y
CONFIG_CCIC_S2MU004=y
# CONFIG_CCIC_VDM is not set
# CONFIG_CCIC_S2MM005 is not set
CONFIG_CCIC_NOTIFIER=y
# CONFIG_CCIC_ALTERNATE_MODE is not set
@ -3003,6 +3044,7 @@ CONFIG_MMC_BLOCK_MINORS=8
CONFIG_MMC_BLOCK_BOUNCE=y
# CONFIG_SDIO_UART is not set
# CONFIG_MMC_TEST is not set
# CONFIG_MMC_SIMULATE_MAX_SPEED is not set
#
# MMC/SD/SDIO Host Controller Drivers
@ -3290,7 +3332,6 @@ CONFIG_STAGING=y
#
# CONFIG_IIO_PERIODIC_RTC_TRIGGER is not set
# CONFIG_IIO_SIMPLE_DUMMY is not set
# CONFIG_BCM_WIMAX is not set
# CONFIG_FT1000 is not set
#
@ -3342,8 +3383,6 @@ CONFIG_ION_EXYNOS_SIZE_SECTBL=0
CONFIG_ION_EXYNOS_SIZE_G2D_WFD=0
CONFIG_ION_EXYNOS_SIZE_VIDEO=0
CONFIG_ION_EXYNOS_SIZE_MFC_NFWVIDEO=0
# CONFIG_FIQ_DEBUGGER is not set
# CONFIG_FIQ_WATCHDOG is not set
# CONFIG_USB_WPAN_HCD is not set
# CONFIG_WIMAX_GDM72XX is not set
# CONFIG_LTE_GDM724X is not set
@ -3398,6 +3437,7 @@ CONFIG_SEC_NAD_MANUAL_PARAM_READTIME=10
# CONFIG_SEC_DUMP_SUMMARY is not set
# CONFIG_KFAULT_AUTO_SUMMARY is not set
CONFIG_VNSWAP=y
# CONFIG_GOLDFISH is not set
#
# SOC (System On Chip) specific Drivers
@ -3715,6 +3755,7 @@ CONFIG_CHARGER_S2MU004=y
# CONFIG_WIRELESS_CHARGER_P9220 is not set
CONFIG_BATTERY_NOTIFIER=y
# CONFIG_XADC_SHARE_BATT_WITH_USB_THM is not set
# CONFIG_S2MU004_MODE_CHANGE_BY_TOPOFF is not set
# CONFIG_RESET_CONTROLLER is not set
# CONFIG_FMC is not set
@ -3872,6 +3913,7 @@ CONFIG_FS_MBCACHE=y
# CONFIG_NILFS2_FS is not set
# CONFIG_FS_POSIX_ACL is not set
CONFIG_FILE_LOCKING=y
# CONFIG_FS_ENCRYPTION is not set
CONFIG_FSNOTIFY=y
CONFIG_DNOTIFY=y
CONFIG_INOTIFY_USER=y
@ -3920,10 +3962,6 @@ CONFIG_SDFAT_DEBUG=y
CONFIG_SDFAT_DBG_MSG=y
# CONFIG_SDFAT_DBG_BUGON is not set
CONFIG_SDFAT_STATISTICS=y
CONFIG_EXFAT_FS=y
CONFIG_EXFAT_VIRTUAL_XATTR=y
CONFIG_EXFAT_VIRTUAL_XATTR_SELINUX_LABEL="u:object_r:sdcard_external:s0"
CONFIG_EXFAT_SUPPORT_STLOG=y
# CONFIG_NTFS_FS is not set
#
@ -3933,7 +3971,9 @@ CONFIG_PROC_FS=y
# CONFIG_PROC_KCORE is not set
CONFIG_PROC_SYSCTL=y
CONFIG_PROC_PAGE_MONITOR=y
CONFIG_PROC_FSLOG=y
CONFIG_PROC_STLOG=y
CONFIG_PROC_DLOG=y
CONFIG_KERNFS=y
CONFIG_SYSFS=y
CONFIG_TMPFS=y
@ -4104,6 +4144,7 @@ CONFIG_PANIC_ON_OOPS=y
CONFIG_PANIC_ON_OOPS_VALUE=1
CONFIG_PANIC_TIMEOUT=1
# CONFIG_SCHED_DEBUG is not set
# CONFIG_PANIC_ON_RT_THROTTLING is not set
# CONFIG_SCHEDSTATS is not set
# CONFIG_SCHED_STACK_END_CHECK is not set
# CONFIG_TIMER_STATS is not set
@ -4190,6 +4231,12 @@ CONFIG_HAVE_ARCH_KGDB=y
CONFIG_TEXT_OFFSET_OVERRIDE=y
CONFIG_TEXT_OFFSET=0x1000
# CONFIG_DEBUG_SET_MODULE_RONX is not set
# CONFIG_DEBUG_RODATA is not set
#
# Samsung Rooting Restriction Feature
#
# CONFIG_SEC_RESTRICT_ROOTING is not set
#
# Security options
@ -4227,6 +4274,9 @@ CONFIG_INTEGRITY=y
CONFIG_INTEGRITY_AUDIT=y
# CONFIG_IMA is not set
# CONFIG_EVM is not set
# CONFIG_SECURITY_DEFEX is not set
# CONFIG_DEFEX_KERNEL_ONLY is not set
# CONFIG_SECURITY_DSMS is not set
CONFIG_DEFAULT_SECURITY_SELINUX=y
# CONFIG_DEFAULT_SECURITY_DAC is not set
CONFIG_DEFAULT_SECURITY="selinux"
@ -4303,6 +4353,7 @@ CONFIG_CRYPTO_MD5=y
CONFIG_CRYPTO_SHA1=y
CONFIG_CRYPTO_SHA256=y
# CONFIG_CRYPTO_SHA512 is not set
# CONFIG_CRYPTO_SHA256_ARM is not set
# CONFIG_CRYPTO_TGR192 is not set
# CONFIG_CRYPTO_WP512 is not set

View File

@ -6,18 +6,17 @@
mobile-nixos.kernel-builder-gcc49 {
configfile = ./config.aarch64;
version = "3.18.14";
version = "3.18.91";
src = fetchFromGitHub {
owner = "LineageOS";
owner = "corsicanu";
repo = "android_kernel_samsung_universal7880";
rev = "a33b847e713a40d42c5733c9139412bed9ec8f2c";
sha256 = "05qzr7agan5hhmk52dm5shmn117wcvhy7dpnak4dz2fgm74inhvj";
rev = "890ed9b1e36c2ea6cac7be9e624e8b1709e601dd"; # android-9.0
sha256 = "1ka9xpncinzd66kfgcybh0i35s34hcqkidg9sxvsjd5irdm80rgv";
};
patches = [
./90_dtbs-install.patch
./0001-af_inet-only-enable-knox-stuff-with-paranoid-network.patch
./0003-arch-arm64-Add-config-option-to-fix-bootloader-cmdli.patch
./0001-mobile-nixos-exynos-decon_7880-Adds-and-sets-ARGB-as.patch
./0001-mobile-nixos-exynos-decon_7880-Force-unblank-on-prob.patch