sony-honami: modernize, use latest gcc (!885)
This commit is contained in:
parent
0929b2d00a
commit
b52b745ae0
7 changed files with 36 additions and 108 deletions
|
@ -2,16 +2,21 @@
|
|||
# Contributor: Rares
|
||||
pkgname="device-sony-honami"
|
||||
pkgdesc="Sony Xperia Z1"
|
||||
pkgver=1.1
|
||||
pkgrel=2
|
||||
pkgver=1.2
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="armv7"
|
||||
options="!check !archcheck"
|
||||
depends="postmarketos-base linux-sony-honami msm-fb-refresher mkbootimg mesa-dri-swrast"
|
||||
makedepends="devicepkg-dev"
|
||||
source="deviceinfo 90-android-touch-dev.rules"
|
||||
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
|
||||
subpackages="
|
||||
$pkgname-nonfree-firmware:nonfree_firmware
|
||||
"
|
||||
source="
|
||||
deviceinfo
|
||||
90-android-touch-dev.rules
|
||||
"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
|
@ -29,5 +34,6 @@ nonfree_firmware() {
|
|||
mkdir "$subpkgdir"
|
||||
}
|
||||
|
||||
sha512sums="04de5d33633b6f07b1ef5e6b1e73cccd4c1e7d449213d067df30c928e6c41c5d7658e3c0892a1668cb298f67ba4b2b9b5b54a34c6b24e846f88f212c5e2563c6 deviceinfo
|
||||
|
||||
sha512sums="0c402981348f1877d3f77e2ea99bbdee60ffa1edbcdb73aea927404b5e298b76a2183da4b0e1d84318177036f2f0d85153d2f3a60d1f16ffd6ae12f4ff2527f7 deviceinfo
|
||||
1651ac9eda3c97fafe55abe0f0ae429e04f73edcbf2c56aa3259f81837f7adde348bcb385daed05c30cfc61415455a459a917ed3acccbfd9b7a1caa32a851d40 90-android-touch-dev.rules"
|
||||
|
|
|
@ -5,6 +5,9 @@ deviceinfo_format_version="0"
|
|||
deviceinfo_name="Sony Xperia Z1"
|
||||
deviceinfo_manufacturer="Sony"
|
||||
deviceinfo_codename="sony-honami"
|
||||
deviceinfo_date=""
|
||||
deviceinfo_dtb=""
|
||||
deviceinfo_modules_initfs=""
|
||||
deviceinfo_arch="armv7"
|
||||
|
||||
# Device related
|
||||
|
@ -13,11 +16,15 @@ deviceinfo_external_storage="true"
|
|||
deviceinfo_screen_width="1080"
|
||||
deviceinfo_screen_height="1920"
|
||||
deviceinfo_dev_touchscreen="/dev/input/event4"
|
||||
deviceinfo_dev_touchscreen_calibration=""
|
||||
deviceinfo_dev_keyboard=""
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="fastboot"
|
||||
deviceinfo_kernel_cmdline="console=ttyHSL0,115200,n8 vmalloc=300M msm_rtb.filter=0x3F ehci-hcd.park=3 dwc3.maximum_speed=high dwc3_msm.prop_chg_detect=Y coherent_pool=8M sched_enable_power_aware=1 user_debug=31 androidboot.hardware=honami buildvariant=userdebug"
|
||||
deviceinfo_generate_bootimg="true"
|
||||
deviceinfo_bootimg_qcdt="false"
|
||||
deviceinfo_bootimg_dtb_second="false"
|
||||
deviceinfo_flash_offset_base="0x00000000"
|
||||
deviceinfo_flash_offset_kernel="0x00008000"
|
||||
deviceinfo_flash_offset_ramdisk="0x02000000"
|
||||
|
|
|
@ -1,52 +1,37 @@
|
|||
# Reference: <https://postmarketos.org/vendorkernel>
|
||||
# Kernel config based on: arch/arm/configs/aosp_rhine_honami_defconfig
|
||||
|
||||
pkgname="linux-sony-honami"
|
||||
pkgver=3.10.84
|
||||
pkgrel=3
|
||||
pkgrel=4
|
||||
pkgdesc="Sony Xperia Z1 kernel fork"
|
||||
arch="armv7"
|
||||
_carch="arm"
|
||||
_flavor="sony-honami"
|
||||
url="https://github.com/sonyxperiadev/kernel"
|
||||
license="GPL2"
|
||||
license="GPL-2.0-only"
|
||||
options="!strip !check !tracedeps"
|
||||
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev gcc6"
|
||||
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev"
|
||||
|
||||
# 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 <https://postmarketos.org/vendorkernel> for instructions.
|
||||
if [ "${CC:0:5}" != "gcc6-" ]; then
|
||||
CC="gcc6-$CC"
|
||||
HOSTCC="gcc6-gcc"
|
||||
CROSS_COMPILE="gcc6-$CROSS_COMPILE"
|
||||
fi
|
||||
# Compiler: latest GCC from Alpine
|
||||
HOSTCC="${CC:-gcc}"
|
||||
HOSTCC="${HOSTCC#${CROSS_COMPILE}}"
|
||||
|
||||
# Source
|
||||
_repository="kernel"
|
||||
_commit="d78970c1afd9fad52cb4402c7bcb9701e8a06d41"
|
||||
_config="config-${_flavor}.${arch}"
|
||||
_config="config-$_flavor.$arch"
|
||||
source="
|
||||
$pkgname-$_commit.tar.gz::https://github.com/sonyxperiadev/${_repository}/archive/${_commit}.tar.gz
|
||||
$pkgname-$_commit.tar.gz::https://github.com/sonyxperiadev/$_repository/archive/$_commit.tar.gz
|
||||
$_config
|
||||
compiler-gcc6.h
|
||||
gcc7-give-up-on-ilog2-const-optimizations.patch
|
||||
gcc8-fix-put-user.patch
|
||||
"
|
||||
builddir="$srcdir/${_repository}-${_commit}"
|
||||
builddir="$srcdir/$_repository-$_commit"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
|
||||
# gcc6 support
|
||||
cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/"
|
||||
|
||||
# Remove -Werror from all makefiles
|
||||
find . -type f -name Makefile -print0 | \
|
||||
xargs -0 sed -i 's/-Werror-/-W/g'
|
||||
find . -type f -name Makefile -print0 | \
|
||||
xargs -0 sed -i 's/-Werror//g'
|
||||
|
||||
# Prepare kernel config ('yes ""' for kernels lacking olddefconfig)
|
||||
cp "$srcdir"/$_config "$builddir"/.config
|
||||
yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig
|
||||
downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC"
|
||||
}
|
||||
|
||||
build() {
|
||||
|
@ -76,5 +61,6 @@ package() {
|
|||
}
|
||||
|
||||
sha512sums="b76641c07489712d393f1d318b0d4138e5c7126d4b78cfc23bcde07911cba185d3872e886f69197bd3912e8b4c646b74fb6992dee0ce3829d2995531ac4f257e linux-sony-honami-d78970c1afd9fad52cb4402c7bcb9701e8a06d41.tar.gz
|
||||
7b7a6c62e4de1de680d8792c80369618ef6c4a5ae9459dd224b1c1f5b403dd3d4eccec41ef6c69f34d870788b63be2cbcd6d935c8f5f3f9e51fcad0147697396 config-sony-honami.armv7
|
||||
d80980e9474c82ba0ef1a6903b434d8bd1b092c40367ba543e72d2c119301c8b2d05265740e4104ca1ac5d15f6c4aa49e8776cb44264a9a28dc551e0d1850dcc compiler-gcc6.h"
|
||||
05e1a9509009f43cc76b957de7b8d072508c0b48c06ca5912f61aac3dfbabd9625dc7490a0af6f54fdf043dcb60faa1a262d6c3d2f1974783ea0067f020b5cd8 config-sony-honami.armv7
|
||||
77eba606a71eafb36c32e9c5fe5e77f5e4746caac292440d9fb720763d766074a964db1c12bc76fe583c5d1a5c864219c59941f5e53adad182dbc70bf2bc14a7 gcc7-give-up-on-ilog2-const-optimizations.patch
|
||||
197d40a214ada87fcb2dfc0ae4911704b9a93354b75179cd6b4aadbb627a37ec262cf516921c84a8b1806809b70a7b440cdc8310a4a55fca5d2c0baa988e3967 gcc8-fix-put-user.patch"
|
||||
|
|
|
@ -1,69 +0,0 @@
|
|||
// SOURCE:
|
||||
// https://github.com/NextThingCo/CHIP-u-boot/issues/10#issuecomment-287515505
|
||||
|
||||
#ifndef __LINUX_COMPILER_H
|
||||
#error "Please don't include <linux/compiler-gcc6.h> directly, include <linux/compiler.h> instead."
|
||||
#endif
|
||||
|
||||
#define __used __attribute__((__used__))
|
||||
#define __must_check __attribute__((warn_unused_result))
|
||||
#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
|
||||
|
||||
/* Mark functions as cold. gcc will assume any path leading to a call
|
||||
to them will be unlikely. This means a lot of manual unlikely()s
|
||||
are unnecessary now for any paths leading to the usual suspects
|
||||
like BUG(), printk(), panic() etc. [but let's keep them for now for
|
||||
older compilers]
|
||||
|
||||
Early snapshots of gcc 4.3 don't support this and we can't detect this
|
||||
in the preprocessor, but we can live with this because they're unreleased.
|
||||
Maketime probing would be overkill here.
|
||||
|
||||
gcc also has a __attribute__((__hot__)) to move hot functions into
|
||||
a special section, but I don't see any sense in this right now in
|
||||
the kernel context */
|
||||
#define __cold __attribute__((__cold__))
|
||||
|
||||
#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
|
||||
|
||||
#ifndef __CHECKER__
|
||||
# define __compiletime_warning(message) __attribute__((warning(message)))
|
||||
# define __compiletime_error(message) __attribute__((error(message)))
|
||||
#endif /* __CHECKER__ */
|
||||
|
||||
/*
|
||||
* Mark a position in code as unreachable. This can be used to
|
||||
* suppress control flow warnings after asm blocks that transfer
|
||||
* control elsewhere.
|
||||
*
|
||||
* Early snapshots of gcc 4.5 don't support this and we can't detect
|
||||
* this in the preprocessor, but we can live with this because they're
|
||||
* unreleased. Really, we need to have autoconf for the kernel.
|
||||
*/
|
||||
#define unreachable() __builtin_unreachable()
|
||||
|
||||
/* Mark a function definition as prohibited from being cloned. */
|
||||
#define __noclone __attribute__((__noclone__))
|
||||
|
||||
/*
|
||||
* Tell the optimizer that something else uses this function or variable.
|
||||
*/
|
||||
#define __visible __attribute__((externally_visible))
|
||||
|
||||
/*
|
||||
* GCC 'asm goto' miscompiles certain code sequences:
|
||||
*
|
||||
* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670
|
||||
*
|
||||
* Work it around via a compiler barrier quirk suggested by Jakub Jelinek.
|
||||
*
|
||||
* (asm goto is automatically volatile - the naming reflects this.)
|
||||
*/
|
||||
#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
|
||||
|
||||
#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP
|
||||
#define __HAVE_BUILTIN_BSWAP32__
|
||||
#define __HAVE_BUILTIN_BSWAP64__
|
||||
#define __HAVE_BUILTIN_BSWAP16__
|
||||
#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */
|
||||
|
|
@ -2456,8 +2456,6 @@ CONFIG_DVB_TUNER_DIB0090=y
|
|||
#
|
||||
# CONFIG_DRM is not set
|
||||
# CONFIG_MSM_KGSL is not set
|
||||
# CONFIG_MSM_KGSL_CFF_DUMP is not set
|
||||
CONFIG_MSM_ADRENO_DEFAULT_GOVERNOR="msm-adreno-tz"
|
||||
CONFIG_MSM_ADRENO_USES_OLD_FIRMWARE=y
|
||||
# CONFIG_VGASTATE is not set
|
||||
# CONFIG_VIDEO_OUTPUT_CONTROL is not set
|
||||
|
@ -3282,10 +3280,8 @@ CONFIG_DEVFREQ_GOV_PERFORMANCE=y
|
|||
CONFIG_DEVFREQ_GOV_POWERSAVE=y
|
||||
CONFIG_DEVFREQ_GOV_USERSPACE=y
|
||||
CONFIG_DEVFREQ_GOV_CPUFREQ=y
|
||||
CONFIG_DEVFREQ_GOV_MSM_ADRENO_TZ=y
|
||||
# CONFIG_MSM_BIMC_BWMON is not set
|
||||
# CONFIG_MSMCCI_HWMON is not set
|
||||
CONFIG_DEVFREQ_GOV_MSM_GPUBW_MON=y
|
||||
CONFIG_DEVFREQ_GOV_MSM_BW_HWMON=y
|
||||
CONFIG_DEVFREQ_GOV_MSM_CACHE_HWMON=y
|
||||
# CONFIG_DEVFREQ_GOV_SPDM_HYP is not set
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
../../.shared-patches/linux/gcc7-give-up-on-ilog2-const-optimizations.patch
|
1
device/linux-sony-honami/gcc8-fix-put-user.patch
Symbolic link
1
device/linux-sony-honami/gcc8-fix-put-user.patch
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../.shared-patches/linux/gcc8-fix-put-user.patch
|
Loading…
Reference in a new issue