diff --git a/device/testing/device-semc-smultron/APKBUILD b/device/testing/device-semc-smultron/APKBUILD index ca4f75bd2..76ae21272 100644 --- a/device/testing/device-semc-smultron/APKBUILD +++ b/device/testing/device-semc-smultron/APKBUILD @@ -1,12 +1,12 @@ # Reference: -# Contributor: Michael Orishich +# Contributor: Michael Orishich pkgname=device-semc-smultron pkgdesc="Xperia mini" pkgver=0.1 -pkgrel=7 +pkgrel=8 url="https://postmarketos.org" license="MIT" -arch="armhf" +arch="armv7" options="!check !archcheck" depends="postmarketos-base linux-semc-smultron mkbootimg mesa-dri-swrast msm-fb-refresher" makedepends="devicepkg-dev" @@ -24,6 +24,6 @@ package() { devicepkg_package $startdir $pkgname } -sha512sums="ee6f4d8ea53443369459a929609be7925ee0a016a3a6f67d518d53e78edb1237e36c42e7835de32b850336867cb94a201553c3c066d652ed4dc0c781dbef6354 deviceinfo +sha512sums="9a8469b07562505865a856f3aceb6242c0c67af66edbaffb93614bb43f07866b663a2803b4f97cecd55968a76f2c3b00aea87b4b78adbefda9cbc4cac84e9cc1 deviceinfo 246889c74e09d2aeeaea62313f101727f07f9972fb15252cbf1d2e3c07aa850a85a25cc291407d8e560edb49e8bfbdb04eb09c412ed4c366f0b4bbcfbdcbcbb9 fb.modes 80c247fa375fe88b354d299fc3802e9717d3a0c93d6c768ee2a39f4bea8deb573bcdf64a4d22bc6e1c2eef0acf26ac36f41a5cc73dd748908d26de11bb26cf6f directfbrc" diff --git a/device/testing/device-semc-smultron/deviceinfo b/device/testing/device-semc-smultron/deviceinfo index 245842ba4..3601a6604 100644 --- a/device/testing/device-semc-smultron/deviceinfo +++ b/device/testing/device-semc-smultron/deviceinfo @@ -6,9 +6,8 @@ deviceinfo_name="Sony Ericsson Xperia mini" deviceinfo_manufacturer="Sony Ericsson" deviceinfo_codename="semc-smultron" deviceinfo_year="2011" -deviceinfo_dtb="" deviceinfo_modules_initfs="" -deviceinfo_arch="armhf" +deviceinfo_arch="armv7" # Device related deviceinfo_keyboard="false" @@ -27,5 +26,5 @@ 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_pagesize="8192" diff --git a/device/testing/linux-semc-smultron/02_gpu-msm-fix-gcc5-compile.patch b/device/testing/linux-semc-smultron/02_gpu-msm-fix-gcc5-compile.patch deleted file mode 100644 index 91b17cd76..000000000 --- a/device/testing/linux-semc-smultron/02_gpu-msm-fix-gcc5-compile.patch +++ /dev/null @@ -1,33 +0,0 @@ -source: -https://github.com/ShinySide/HispAsian_Lollipop_G6/commit/b7756b6fc4bb728722b14d2dfdbaf1dc843812e9 - -* These need to be static to avoid these errors: - -drivers/built-in.o: In function `.LANCHOR1': -msm_iommu_sec.c:(.data+0x9298): undefined reference to `kgsl_iommu_sync_lock' -msm_iommu_sec.c:(.data+0x929c): undefined reference to `kgsl_iommu_sync_unlock' -Makefile:877: recipe for target '.tmp_vmlinux1' failed -make: *** [.tmp_vmlinux1] Error 1 - -Signed-off-by: Chet Kener - ---- a/drivers/gpu/msm/kgsl_iommu.c -+++ b/drivers/gpu/msm/kgsl_iommu.c -@@ -1010,7 +1010,7 @@ static int kgsl_iommu_init_sync_lock(struct kgsl_mmu *mmu) - * - * Return - int - number of commands. - */ --inline unsigned int kgsl_iommu_sync_lock(struct kgsl_mmu *mmu, -+static inline unsigned int kgsl_iommu_sync_lock(struct kgsl_mmu *mmu, - unsigned int *cmds) - { - struct kgsl_device *device = mmu->device; -@@ -1080,7 +1080,7 @@ inline unsigned int kgsl_iommu_sync_lock(struct kgsl_mmu *mmu, - * - * Return - int - number of commands. - */ --inline unsigned int kgsl_iommu_sync_unlock(struct kgsl_mmu *mmu, -+static inline unsigned int kgsl_iommu_sync_unlock(struct kgsl_mmu *mmu, - unsigned int *cmds) - { - struct kgsl_device *device = mmu->device; diff --git a/device/testing/linux-semc-smultron/APKBUILD b/device/testing/linux-semc-smultron/APKBUILD index 567234bfc..9747c9684 100644 --- a/device/testing/linux-semc-smultron/APKBUILD +++ b/device/testing/linux-semc-smultron/APKBUILD @@ -1,25 +1,16 @@ +# Reference: # Kernel config based on: arch/arm/configs/lx_smultron_defconfig - pkgname=linux-semc-smultron pkgver=3.4.0 -pkgrel=2 -pkgdesc="Xperia mini kernel fork" -arch="armhf" +pkgrel=3 +pkgdesc="Sony Ericsson Xperia mini kernel fork" +arch="armv7" _carch="arm" _flavor="semc-smultron" url="https://kernel.org" -license="GPL2" +license="GPL-2.0-only" options="!strip !check !tracedeps pmb:cross-native" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev xz gcc6" - -# Compiler: this kernel was only tested with GCC6. Feel free to make a merge -# request if you find out that it is booting working with newer GCCs as -# well. See for instructions. -if [ "${CC:0:5}" != "gcc6-" ]; then - CC="gcc6-$CC" - HOSTCC="gcc6-gcc" - CROSS_COMPILE="gcc6-$CROSS_COMPILE" -fi +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev xz" # Source _repository="android_kernel_semc_msm7x30" @@ -28,9 +19,11 @@ _config="config-$_flavor.$arch" source=" $pkgname-$_commit.tar.gz::https://github.com/LegacyXperia/$_repository/archive/$_commit.tar.gz $_config - compiler-gcc6.h - 01_msm-fix-perf_trace_counters.patch - 02_gpu-msm-fix-gcc5-compile.patch + gcc7-give-up-on-ilog2-const-optimizations.patch + gcc8-fix-put-user.patch + kernel-use-the-gnu89-standard-explicitly.patch + fix-perf_trace_counters.patch + fix-proc-file-handling.patch " builddir="$srcdir/$_repository-$_commit" @@ -46,11 +39,13 @@ build() { } package() { - downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" "$_outdir" } sha512sums="234e8973236e6056c60a312340ef4ccb7598adc43bd1f0c2ca0e89d03f4e16ecfdd5ad4658d76993c7bae24242a7e134a9ed2fda662dfe229b61f3a88ea6c2f0 linux-semc-smultron-9c6f07f81e2c0bcb2bef75fa9716cc30f8942286.tar.gz -170e9ff569175ab31f124ac7571875c091d315717c96b5a5eacb00b1f62763388807821ecf69fc3c7e10485f8dfec1befcf63fd6b07e3f9fb1752c80b4b4ccb0 config-semc-smultron.armhf -d80980e9474c82ba0ef1a6903b434d8bd1b092c40367ba543e72d2c119301c8b2d05265740e4104ca1ac5d15f6c4aa49e8776cb44264a9a28dc551e0d1850dcc compiler-gcc6.h -f85ced49ee2f2461adea68dac0a10452aa809a7d41d869092d94eb085344919a9a385dec0c48011f4601ca4f441700f7fe49075c7eca4fb2d66b01f7d413ccb7 01_msm-fix-perf_trace_counters.patch -7be03a9e78b7ac330a54b1f00509caa0621a95c0c55901878ad757f9dd69cc05ba2c8b5ea987063ae1224f92c4d090d515fa5d369e7755181a4871b0d0f82881 02_gpu-msm-fix-gcc5-compile.patch" +bc1dc607300242938e75a88d80d104ba5fb12eb49b9e576cf2df5139c133245c10d0002d9545c73ace4092f1f6c64397dd6f8452316ff32e1adeebef8571d7bf config-semc-smultron.armv7 +77eba606a71eafb36c32e9c5fe5e77f5e4746caac292440d9fb720763d766074a964db1c12bc76fe583c5d1a5c864219c59941f5e53adad182dbc70bf2bc14a7 gcc7-give-up-on-ilog2-const-optimizations.patch +197d40a214ada87fcb2dfc0ae4911704b9a93354b75179cd6b4aadbb627a37ec262cf516921c84a8b1806809b70a7b440cdc8310a4a55fca5d2c0baa988e3967 gcc8-fix-put-user.patch +ad0182a483791fc88e058838bc331b2f04a75ba291e763767babdb815efadfc3b4fda97e69e2e3f00a426cabea088e35297a92bd287592597d1e309be68ee92c kernel-use-the-gnu89-standard-explicitly.patch +f85ced49ee2f2461adea68dac0a10452aa809a7d41d869092d94eb085344919a9a385dec0c48011f4601ca4f441700f7fe49075c7eca4fb2d66b01f7d413ccb7 fix-perf_trace_counters.patch +93f7870b2063d4ddb1f35dc4de4b213d83e0f54f59511b3050e880763f2374b3816ac0c879de76fe8a0b61d62c1753c5dda7326961164a8fcbfc8a9232309569 fix-proc-file-handling.patch" diff --git a/device/testing/linux-semc-smultron/config-semc-smultron.armhf b/device/testing/linux-semc-smultron/config-semc-smultron.armv7 similarity index 99% rename from device/testing/linux-semc-smultron/config-semc-smultron.armhf rename to device/testing/linux-semc-smultron/config-semc-smultron.armv7 index 2f4eae79b..df5411f40 100644 --- a/device/testing/linux-semc-smultron/config-semc-smultron.armhf +++ b/device/testing/linux-semc-smultron/config-semc-smultron.armv7 @@ -2497,7 +2497,7 @@ CONFIG_MSM_VIDC_VDEC=y # CONFIG_MSM_VIDC_CONTENT_PROTECTION is not set CONFIG_FB_MSM=y # CONFIG_FB_MSM_BACKLIGHT is not set -CONFIG_FB_MSM_LOGO=y +# CONFIG_FB_MSM_LOGO is not set # CONFIG_FB_MSM_HDPI is not set CONFIG_FB_MSM_LCDC_HW=y CONFIG_FB_MSM_TRIPLE_BUFFER=y @@ -2644,9 +2644,9 @@ CONFIG_FB_MSM_MDDI_HITACHI_HVGA=y # CONFIG_FB_MSM_TVOUT_PAL_M is not set # CONFIG_FB_MSM_TVOUT_PAL_N is not set CONFIG_FB_MSM_TVOUT_NONE=y -# CONFIG_FB_MSM_DEFAULT_DEPTH_RGB565 is not set +CONFIG_FB_MSM_DEFAULT_DEPTH_RGB565=y # CONFIG_FB_MSM_DEFAULT_DEPTH_ARGB8888 is not set -CONFIG_FB_MSM_DEFAULT_DEPTH_RGBA8888=y +# CONFIG_FB_MSM_DEFAULT_DEPTH_RGBA8888 is not set # CONFIG_FB_MSM_EBI2_EPSON_S1D_QVGA_PANEL is not set # CONFIG_FB_MSM_EBI2_PANEL_DETECT is not set # CONFIG_EXYNOS_VIDEO is not set @@ -3550,7 +3550,6 @@ CONFIG_CRYPTO_RNG2=y CONFIG_CRYPTO_PCOMP2=y CONFIG_CRYPTO_MANAGER=y CONFIG_CRYPTO_MANAGER2=y -CONFIG_CRYPTO_ABLK_HELPER=y # CONFIG_CRYPTO_USER is not set CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y # CONFIG_CRYPTO_GF128MUL is not set @@ -3611,7 +3610,7 @@ CONFIG_CRYPTO_SHA256=y # CONFIG_CRYPTO_AES=y CONFIG_CRYPTO_AES_ARM=y -CONFIG_CRYPTO_AES_ARM_BS=y +# CONFIG_CRYPTO_AES_ARM_BS is not set # CONFIG_CRYPTO_ANUBIS is not set CONFIG_CRYPTO_ARC4=y # CONFIG_CRYPTO_BLOWFISH is not set diff --git a/device/testing/linux-semc-smultron/01_msm-fix-perf_trace_counters.patch b/device/testing/linux-semc-smultron/fix-perf_trace_counters.patch similarity index 100% rename from device/testing/linux-semc-smultron/01_msm-fix-perf_trace_counters.patch rename to device/testing/linux-semc-smultron/fix-perf_trace_counters.patch diff --git a/device/testing/linux-semc-smultron/fix-proc-file-handling.patch b/device/testing/linux-semc-smultron/fix-proc-file-handling.patch new file mode 100644 index 000000000..6a253d260 --- /dev/null +++ b/device/testing/linux-semc-smultron/fix-proc-file-handling.patch @@ -0,0 +1,81 @@ +From 25437b2a54dd619a96e268ecaf303b089aa785e4 Mon Sep 17 00:00:00 2001 +From: Linus Torvalds +Date: Mon, 4 Jun 2012 11:00:45 -0700 +Subject: [PATCH] vfs: Fix /proc//fdinfo/ file handling + +commit 0640113be25d283e0ff77a9f041e1242182387f0 upstream. + +Cyrill Gorcunov reports that I broke the fdinfo files with commit +30a08bf2d31d ("proc: move fd symlink i_mode calculations into +tid_fd_revalidate()"), and he's quite right. + +The tid_fd_revalidate() function is not just used for the /fd +symlinks, it's also used for the /fdinfo/ files, and the +permission model for those are different. + +So do the dynamic symlink permission handling just for symlinks, making +the fdinfo files once more appear as the proper regular files they are. + +Of course, Al Viro argued (probably correctly) that we shouldn't do the +symlink permission games at all, and make the symlinks always just be +the normal 'lrwxrwxrwx'. That would have avoided this issue too, but +since somebody noticed that the permissions had changed (which was the +reason for that original commit 30a08bf2d31d in the first place), people +do apparently use this feature. + +[ Basically, you can use the symlink permission data as a cheap "fdinfo" + replacement, since you see whether the file is open for reading and/or + writing by just looking at st_mode of the symlink. So the feature + does make sense, even if the pain it has caused means we probably + shouldn't have done it to begin with. ] + +Change-Id: I6499a97dc8993b3dd6b4df5af2724990ee91fd3b +Reported-and-tested-by: Cyrill Gorcunov +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman +--- + fs/proc/base.c | 17 ++++++++++------- + 1 file changed, 10 insertions(+), 7 deletions(-) + +diff --git a/fs/proc/base.c b/fs/proc/base.c +index 2f198dad12c5..c8cb15dcca08 100644 +--- a/fs/proc/base.c ++++ b/fs/proc/base.c +@@ -1838,7 +1838,7 @@ static int tid_fd_revalidate(struct dentry *dentry, struct nameidata *nd) + rcu_read_lock(); + file = fcheck_files(files, fd); + if (file) { +- unsigned i_mode, f_mode = file->f_mode; ++ unsigned f_mode = file->f_mode; + + rcu_read_unlock(); + put_files_struct(files); +@@ -1854,12 +1854,14 @@ static int tid_fd_revalidate(struct dentry *dentry, struct nameidata *nd) + inode->i_gid = 0; + } + +- i_mode = S_IFLNK; +- if (f_mode & FMODE_READ) +- i_mode |= S_IRUSR | S_IXUSR; +- if (f_mode & FMODE_WRITE) +- i_mode |= S_IWUSR | S_IXUSR; +- inode->i_mode = i_mode; ++ if (S_ISLNK(inode->i_mode)) { ++ unsigned i_mode = S_IFLNK; ++ if (f_mode & FMODE_READ) ++ i_mode |= S_IRUSR | S_IXUSR; ++ if (f_mode & FMODE_WRITE) ++ i_mode |= S_IWUSR | S_IXUSR; ++ inode->i_mode = i_mode; ++ } + + security_task_to_inode(task, inode); + put_task_struct(task); +@@ -1894,6 +1896,7 @@ static struct dentry *proc_fd_instantiate(struct inode *dir, + ei = PROC_I(inode); + ei->fd = fd; + ++ inode->i_mode = S_IFLNK; + inode->i_op = &proc_pid_link_inode_operations; + inode->i_size = 64; + ei->op.proc_get_link = proc_fd_link; diff --git a/device/testing/linux-semc-smultron/gcc7-give-up-on-ilog2-const-optimizations.patch b/device/testing/linux-semc-smultron/gcc7-give-up-on-ilog2-const-optimizations.patch new file mode 120000 index 000000000..da3d1ed41 --- /dev/null +++ b/device/testing/linux-semc-smultron/gcc7-give-up-on-ilog2-const-optimizations.patch @@ -0,0 +1 @@ +../../.shared-patches/linux/gcc7-give-up-on-ilog2-const-optimizations.patch \ No newline at end of file diff --git a/device/testing/linux-semc-smultron/gcc8-fix-put-user.patch b/device/testing/linux-semc-smultron/gcc8-fix-put-user.patch new file mode 120000 index 000000000..1d40b2674 --- /dev/null +++ b/device/testing/linux-semc-smultron/gcc8-fix-put-user.patch @@ -0,0 +1 @@ +../../.shared-patches/linux/gcc8-fix-put-user.patch \ No newline at end of file diff --git a/device/testing/linux-semc-smultron/kernel-use-the-gnu89-standard-explicitly.patch b/device/testing/linux-semc-smultron/kernel-use-the-gnu89-standard-explicitly.patch new file mode 120000 index 000000000..a5f4de276 --- /dev/null +++ b/device/testing/linux-semc-smultron/kernel-use-the-gnu89-standard-explicitly.patch @@ -0,0 +1 @@ +../../.shared-patches/linux/kernel-use-the-gnu89-standard-explicitly.patch \ No newline at end of file