Skip to content
Snippets Groups Projects
Commit 10b23e80 authored by rendeko's avatar rendeko
Browse files

Adding device semc-anzu

parent ceda0976
No related branches found
No related tags found
1 merge request!346Adding device semc-anzu
# udev rules file
# All device names can be read from weston's logfile (/tmp/weston.log in postmarketOS)
# Touchscreen (use 'weston-calibrator' to calibrate)
SUBSYSTEM=="input", ATTRS{name}=="sec_touchscreen", \
ENV{ID_INPUT}="1", ENV{ID_INPUT_TOUCHSCREEN}="1" \
ENV{WL_CALIBRATION}="0.954174 0.016888 -2.626083 -0.006031 1.011271 14.175903"
pkgname=device-semc-anzu
pkgver=1
pkgrel=8
pkgdesc="Sony Ericcson"
url="https://github.com/postmarketOS"
arch="noarch"
license="MIT"
depends="linux-semc-anzu linux-firmware mkbootimg"
makedepends=""
install=""
subpackages=""
source="deviceinfo 90-android.rules"
options="!check"
build() {
return 0
}
package() {
install -D -m644 "$srcdir/deviceinfo" \
"$pkgdir/etc/deviceinfo"
install -D -m644 "$srcdir"/90-android.rules \
"$pkgdir"/etc/udev/rules.d/90-android.rules
}
sha512sums="10743e0ee33a6a43a2b64065e72fb9951826de4c30d0af9b0e62490b4abc3d6ac00eec424b6869e706c1629f983a952f76eb084fb1c7c1e84e808eec277d44b2 deviceinfo
8aead706ddb118a44de7d049f07d10a27e727d17724058d132e4ec4fa73fed29c9ccfe03f02aca459c922ec0fbba24e171fe3c76e33f7c5462631e3dd5506e36 90-android.rules"
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell scripts.
deviceinfo_format_version="0"
deviceinfo_name="Xperia Arc"
deviceinfo_manufacturer="Sony Ericsson"
deviceinfo_date=""
deviceinfo_keyboard="false"
deviceinfo_nonfree="????"
deviceinfo_dtb=""
deviceinfo_modules_initfs=""
deviceinfo_external_disk="true"
deviceinfo_external_disk_install="true"
deviceinfo_flash_methods="heimdall-isorec"
deviceinfo_arch="armhf"
# Splash screen
deviceinfo_screen_width="480"
deviceinfo_screen_height="800"
# Heimdall related
deviceinfo_flash_heimdall_partition_kernel="KERNEL"
deviceinfo_flash_heimdall_partition_initfs="RECOVERY"
deviceinfo_weston_core_modules="xwayland.so"
# Fastboot related
deviceinfo_generate_bootimg="true"
deviceinfo_flash_offset_kernel="0x00008000"
deviceinfo_flash_offset_ramdisk="0x01000000"
deviceinfo_flash_offset_second="0x00f00000"
deviceinfo_flash_offset_tags="0x00000100"
deviceinfo_flash_pagesize="131072"
#!/bin/sh
# set framebuffer resolution
cat /sys/class/graphics/fb0/modes > /sys/class/graphics/fb0/mode
# APKBUILD based on linux-lg-mako.
# Kernel config based on: arch/arm/configs/semc_anzu_defconfig
# Unsure if pkgrel is correct...
_vendor=semc
_flavor=semc-anzu
_hash="1495bfcf93f9e0e896331f29e1850387c31d6714"
_config="config-${_flavor}.armhf"
pkgname=linux-${_flavor}
pkgver=4.4.67
case $pkgver in
*.*.*) _kernver=${pkgver%.*};;
*.*) _kernver=$pkgver;;
esac
pkgrel=2
arch="armhf"
pkgdesc="AOSP based kernel for msm7x30 devices"
url="https://github.com/msm7x30/android_kernel_qcom_msm7x30"
depends="postmarketos-mkinitfs"
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev"
options="!strip !check !tracedeps"
install=
source="
$pkgname-$_hash.zip::https://github.com/msm7x30/android_kernel_qcom_msm7x30/archive/android-4.4.zip
$_config
compiler-gcc6.h
"
subpackages=""
license="GPL2"
_abi_release=${pkgver}
_carch="arm"
HOSTCC="${CC:-gcc}"
HOSTCC="${HOSTCC#${CROSS_COMPILE}}"
ksrcdir="$srcdir/android_kernel_qcom_msm7x30-android-4.4"
prepare() {
local _patch_failed=
cd "$ksrcdir"
# first apply patches in specified order
for i in $source; do
case $i in
*.patch)
msg "Applying $i..."
if ! patch -s -p1 -N -i "$srcdir"/$i; then
echo $i >>failed
_patch_failed=1
fi
;;
esac
done
if ! [ -z "$_patch_failed" ]; then
error "The following patches failed:"
cat failed
return 1
fi
# gcc6 support
cp -v "$srcdir/compiler-gcc6.h" "$ksrcdir/include/linux/"
mkdir -p "$srcdir"/build
cp "$srcdir"/$_config "$srcdir"/build/.config || return 1
make -C "$ksrcdir" O="$srcdir"/build ARCH="$_carch" HOSTCC="$HOSTCC" \
silentoldconfig
}
# this is so we can do: 'abuild menuconfig' to reconfigure kernel
menuconfig() {
cd "$srcdir"/build || return 1
make ARCH="$_carch" menuconfig
cp .config "$startdir"/$_config
}
build() {
cd "$srcdir"/build
unset LDFLAGS
make ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-Alpine" \
|| return 1
}
package() {
install -Dm644 "$srcdir/build/arch/arm/boot/zImage" \
"$pkgdir/boot/vmlinuz-$_flavor"
install -D "$srcdir/build/include/config/kernel.release" \
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
}
sha512sums="f3bca9f9f184e85ec353876d90bcafa3782ee55499132c9f434a9b3e682eaff6e55298bd428445ec5a25d986434db406d541e165ce66a867106035cf3a28075f linux-semc-anzu-1495bfcf93f9e0e896331f29e1850387c31d6714.zip
abc46c4a764e08cbf24c517b4087910138e349eb2c5b3496c0bd62f3057ed11368510846938cd675c85051c8955774f9120f42829bc81152c98374bb2261671f config-semc-anzu.armhf
d80980e9474c82ba0ef1a6903b434d8bd1b092c40367ba543e72d2c119301c8b2d05265740e4104ca1ac5d15f6c4aa49e8776cb44264a9a28dc551e0d1850dcc compiler-gcc6.h"
// 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 */
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment