Add device Samsung Galaxy Note 2 (N7100) (#293)
This commit is contained in:
parent
0188dd91a6
commit
0f00759fde
|
@ -0,0 +1,8 @@
|
||||||
|
# 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"
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
pkgname=device-samsung-n7100
|
||||||
|
pkgver=1
|
||||||
|
pkgrel=6
|
||||||
|
pkgdesc="Samsung Galaxy Note II (GSM)"
|
||||||
|
url="https://github.com/postmarketOS"
|
||||||
|
arch="noarch"
|
||||||
|
license="MIT"
|
||||||
|
depends="linux-samsung-n7100 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="ded19fe4a4c15fbe8d3b10749f13fd1d845de623da3026c0f22e5721e23cc257f93d58fa943336651f23f35f94995cd5a0cb56ca1f5e4dfab1a20f8097c5a413 deviceinfo
|
||||||
|
8aead706ddb118a44de7d049f07d10a27e727d17724058d132e4ec4fa73fed29c9ccfe03f02aca459c922ec0fbba24e171fe3c76e33f7c5462631e3dd5506e36 90-android.rules"
|
|
@ -0,0 +1,27 @@
|
||||||
|
# Reference: <https://postmarketos.org/deviceinfo>
|
||||||
|
# Please use double quotes only. You can source this file in shell scripts.
|
||||||
|
|
||||||
|
deviceinfo_format_version="0"
|
||||||
|
deviceinfo_name="Galaxy Note II"
|
||||||
|
deviceinfo_manufacturer="Samsung"
|
||||||
|
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-bootimg"
|
||||||
|
deviceinfo_arch="armhf"
|
||||||
|
deviceinfo_generate_bootimg="true"
|
||||||
|
|
||||||
|
deviceinfo_flash_offset_kernel="0x00008000"
|
||||||
|
deviceinfo_flash_offset_ramdisk="0x11000000"
|
||||||
|
deviceinfo_flash_offset_second="0x00f00000"
|
||||||
|
deviceinfo_flash_offset_tags="0x00000100"
|
||||||
|
deviceinfo_flash_cmdline=""
|
||||||
|
deviceinfo_flash_pagesize="2048"
|
||||||
|
|
||||||
|
# Heimdall related
|
||||||
|
deviceinfo_flash_heimdall_partition_kernel="BOOT"
|
||||||
|
deviceinfo_weston_core_modules="xwayland.so"
|
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# set framebuffer resolution
|
||||||
|
cat /sys/class/graphics/fb0/modes > /sys/class/graphics/fb0/mode
|
|
@ -0,0 +1,115 @@
|
||||||
|
# APKBUILD based on linux-vanilla aport. Changes:
|
||||||
|
# - disabled module installation
|
||||||
|
# - add !check !tracedeps
|
||||||
|
# - package: just install zimage and kernel.release, because the kernel config
|
||||||
|
# does not generate modules or dtb files
|
||||||
|
# - do not create -dev subpackage (makes no sense without module support)
|
||||||
|
#
|
||||||
|
# Kernel config based on: arch/arm/configs/cyanogenmod_n7100_defconfig
|
||||||
|
# Changes:
|
||||||
|
# - enable devtmpfs (needed for udev -> touch support in weston)
|
||||||
|
# Patches:
|
||||||
|
# extdsp_inline.patch: Fix for extern and inline errors on compile
|
||||||
|
# fimc_lite.patch: Fix for inline error
|
||||||
|
# timeconst_fix.patch: Removed condition for depricated feature in Perl (bug present in Linux 3.9 and under)
|
||||||
|
|
||||||
|
|
||||||
|
_vendor=samsung
|
||||||
|
_flavor=samsung-n7100
|
||||||
|
_hash="5790cd7defee9cb6f9b392af4e3569e51230917a"
|
||||||
|
_config="config-${_flavor}.armhf"
|
||||||
|
|
||||||
|
pkgname=linux-${_flavor}
|
||||||
|
pkgver=3.0.64
|
||||||
|
case $pkgver in
|
||||||
|
*.*.*) _kernver=${pkgver%.*};;
|
||||||
|
*.*) _kernver=$pkgver;;
|
||||||
|
esac
|
||||||
|
pkgrel=3
|
||||||
|
arch="armhf"
|
||||||
|
pkgdesc="Samsung Galaxy Note II (GSM) Kernel from ParanoidNote"
|
||||||
|
url="https://github.com/bigbiff/android_kernel_samsung_smdk4412"
|
||||||
|
depends="postmarketos-mkinitfs"
|
||||||
|
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev"
|
||||||
|
options="!strip !check !tracedeps"
|
||||||
|
install=
|
||||||
|
source="
|
||||||
|
$pkgname-$_hash.tar.gz::https://github.com/bigbiff/android_kernel_samsung_smdk4412/archive/${_hash}.tar.gz
|
||||||
|
$_config
|
||||||
|
compiler-gcc6.h
|
||||||
|
timeconst_fix.patch
|
||||||
|
fimc_lite.patch
|
||||||
|
extdsp_inline.patch
|
||||||
|
"
|
||||||
|
subpackages=""
|
||||||
|
license="GPL2"
|
||||||
|
|
||||||
|
_abi_release=${pkgver}
|
||||||
|
_carch="arm"
|
||||||
|
HOSTCC="${CC:-gcc}"
|
||||||
|
HOSTCC="${HOSTCC#${CROSS_COMPILE}}"
|
||||||
|
|
||||||
|
ksrcdir="$srcdir/android_kernel_samsung_smdk4412-${_hash}"
|
||||||
|
|
||||||
|
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 -k -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="98aa9aa7c6e832919e270eece68619921ea8eb0419ed9201d3e07fa3543f032077e82100837005bcc052d69a45380888b465bec4e88fddfba3e868aa4971fa5a linux-samsung-n7100-5790cd7defee9cb6f9b392af4e3569e51230917a.tar.gz
|
||||||
|
cfb7b61cca9333b728155d411e99b62709454d44d5f7cdb595e36e6abb5f7b1a40103901ceb094565b793a0979545abcefaf709cb6251a20d4559a75bdab8170 config-samsung-n7100.armhf
|
||||||
|
d80980e9474c82ba0ef1a6903b434d8bd1b092c40367ba543e72d2c119301c8b2d05265740e4104ca1ac5d15f6c4aa49e8776cb44264a9a28dc551e0d1850dcc compiler-gcc6.h
|
||||||
|
7191d532df8f6a8bf64b5b5bcaa7343c8d1b844c891a67fc6d29f421903ddd46c3e779a6f5a5833a6a8f635d1582f5224fa795b3912b8b211a90ee561ad31469 timeconst_fix.patch
|
||||||
|
fe682960d8d8534e14712a4d2bf9e41abed34ec3a29dcaace0fc1115cda08f6bc4c83cd130413d92cda2091be711e3ded91767c30f080a6d9cf7952f068f052c fimc_lite.patch
|
||||||
|
54b345e988b20078260c859d047fc67eec4de0a82cc4c7a19537dac3a797cfc7adbcd41f2af51814d7a6b5d93c5825078381aa7207b5db0cc2b671e495682140 extdsp_inline.patch"
|
|
@ -0,0 +1,69 @@
|
||||||
|
// 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 */
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,26 @@
|
||||||
|
diff --git a/drivers/video/samsung_extdisp/s3cfb_extdsp.h b/drivers/video/samsung_extdisp/s3cfb_extdsp.h
|
||||||
|
index 99f134c..11f4f37 100644
|
||||||
|
--- a/drivers/video/samsung_extdisp/s3cfb_extdsp.h
|
||||||
|
+++ b/drivers/video/samsung_extdisp/s3cfb_extdsp.h
|
||||||
|
@@ -151,7 +151,7 @@ struct s3cfb_extdsp_user_window {
|
||||||
|
#define S3CFB_EXTDSP_GET_FREE_BUFFER _IOW('F', 329, unsigned int)
|
||||||
|
|
||||||
|
extern struct fb_ops s3cfb_extdsp_ops;
|
||||||
|
-extern inline struct s3cfb_extdsp_global *get_extdsp_global(int id);
|
||||||
|
+extern struct s3cfb_extdsp_global *get_extdsp_global(int id);
|
||||||
|
|
||||||
|
/* S3CFB_EXTDSP */
|
||||||
|
extern int s3cfb_extdsp_enable_window(struct s3cfb_extdsp_global *fbdev, int id);
|
||||||
|
diff --git a/drivers/video/samsung_extdisp/s3cfb_extdsp_main.c b/drivers/video/samsung_extdisp/s3cfb_extdsp_main.c
|
||||||
|
index 4f9f2b2..dacd94d 100644
|
||||||
|
--- a/drivers/video/samsung_extdisp/s3cfb_extdsp_main.c
|
||||||
|
+++ b/drivers/video/samsung_extdisp/s3cfb_extdsp_main.c
|
||||||
|
@@ -43,7 +43,7 @@
|
||||||
|
|
||||||
|
struct s3cfb_extdsp_extdsp_desc *fbextdsp;
|
||||||
|
|
||||||
|
-inline struct s3cfb_extdsp_global *get_extdsp_global(int id)
|
||||||
|
+struct s3cfb_extdsp_global *get_extdsp_global(int id)
|
||||||
|
{
|
||||||
|
struct s3cfb_extdsp_global *fbdev;
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
diff --git a/drivers/media/video/exynos/fimc-lite/fimc-lite-core.h b/drivers/media/video/exynos/fimc-lite/fimc-lite-core.h
|
||||||
|
index 2c46c8b..a8a0a2e 100644
|
||||||
|
--- a/drivers/media/video/exynos/fimc-lite/fimc-lite-core.h
|
||||||
|
+++ b/drivers/media/video/exynos/fimc-lite/fimc-lite-core.h
|
||||||
|
@@ -295,7 +295,7 @@ static inline void user_to_drv(struct v4l2_ctrl *ctrl, s32 value)
|
||||||
|
ctrl->cur.val = ctrl->val = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
-inline struct flite_fmt const *find_flite_format(struct v4l2_mbus_framefmt *mf);
|
||||||
|
+struct flite_fmt const *find_flite_format(struct v4l2_mbus_framefmt *mf);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Add buf to the capture active buffers queue.
|
|
@ -0,0 +1,17 @@
|
||||||
|
diff --git a/kernel/timeconst.pl b/kernel/timeconst.pl
|
||||||
|
index eb51d76e058a4..3f42652a6a374 100644
|
||||||
|
--- a/kernel/timeconst.pl
|
||||||
|
+++ b/kernel/timeconst.pl
|
||||||
|
@@ -369,10 +369,8 @@ (@)
|
||||||
|
die "Usage: $0 HZ\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
- @val = @{$canned_values{$hz}};
|
||||||
|
- if (!defined(@val)) {
|
||||||
|
- @val = compute_values($hz);
|
||||||
|
- }
|
||||||
|
+ $cv = $canned_values{$hz};
|
||||||
|
+ @val = defined($cv) ? @$cv : compute_values($hz);
|
||||||
|
output($hz, @val);
|
||||||
|
}
|
||||||
|
exit 0;
|
Loading…
Reference in New Issue