New device: infocus-flatfish (#1251)
It boots and display/touchscreen partially work (the framebuffer only fills a part of the screen).
This commit is contained in:
parent
0685ccaee7
commit
5ef2c055a2
8 changed files with 3099 additions and 0 deletions
22
device/device-infocus-flatfish/APKBUILD
Normal file
22
device/device-infocus-flatfish/APKBUILD
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname="device-infocus-flatfish"
|
||||
pkgdesc="InFocus New Tab F1"
|
||||
pkgver=0.1
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="noarch"
|
||||
options="!check"
|
||||
depends="linux-infocus-flatfish mkbootimg mesa-dri-swrast"
|
||||
makedepends="devicepkg-dev"
|
||||
source="deviceinfo"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
}
|
||||
|
||||
package() {
|
||||
devicepkg_package $startdir $pkgname
|
||||
}
|
||||
|
||||
sha512sums="2fe08cf2a3b7b6340e5ae81085c5e9a60cc4c4291e1f6fbea3e24c63cf78e0328bd4701429541297afc66c5ddae7fb05d83b7d42c2900bb2cb2866d5f8201906 deviceinfo"
|
32
device/device-infocus-flatfish/deviceinfo
Normal file
32
device/device-infocus-flatfish/deviceinfo
Normal file
|
@ -0,0 +1,32 @@
|
|||
# Reference: <https://postmarketos.org/deviceinfo>
|
||||
# Please use double quotes only. You can source this file in shell scripts.
|
||||
|
||||
deviceinfo_format_version="0"
|
||||
deviceinfo_name="InFocus New Tab F1"
|
||||
deviceinfo_manufacturer="InFocus"
|
||||
deviceinfo_date=""
|
||||
deviceinfo_dtb=""
|
||||
deviceinfo_modules_initfs=""
|
||||
deviceinfo_external_disk_install="false"
|
||||
deviceinfo_arch="armhf"
|
||||
|
||||
# Device related
|
||||
deviceinfo_keyboard="false"
|
||||
deviceinfo_external_disk="true"
|
||||
deviceinfo_screen_width="1280"
|
||||
deviceinfo_screen_height="800"
|
||||
deviceinfo_dev_touchscreen="/dev/input/event2"
|
||||
deviceinfo_dev_touchscreen_calibration=""
|
||||
deviceinfo_dev_keyboard=""
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="fastboot"
|
||||
deviceinfo_kernel_cmdline="console=ttyS0,115200 rw init=/init androidboot.hardware=flatfish ion_reserve=256M loglevel=7"
|
||||
deviceinfo_generate_bootimg="true"
|
||||
deviceinfo_bootimg_qcdt="false"
|
||||
deviceinfo_flash_offset_base="0x40000000"
|
||||
deviceinfo_flash_offset_kernel="0x00008000"
|
||||
deviceinfo_flash_offset_ramdisk="0x01000000"
|
||||
deviceinfo_flash_offset_second="0x00f00000"
|
||||
deviceinfo_flash_offset_tags="0x00000100"
|
||||
deviceinfo_flash_pagesize="2048"
|
45
device/linux-infocus-flatfish/01_timeconst_fix.patch
Normal file
45
device/linux-infocus-flatfish/01_timeconst_fix.patch
Normal file
|
@ -0,0 +1,45 @@
|
|||
From 63a3f603413ffe82ad775f2d62a5afff87fd94a0 Mon Sep 17 00:00:00 2001
|
||||
From: "H. Peter Anvin" <hpa@linux.intel.com>
|
||||
Date: Thu, 7 Feb 2013 17:14:08 -0800
|
||||
Subject: [PATCH] timeconst.pl: Eliminate Perl warning
|
||||
|
||||
defined(@array) is deprecated in Perl and gives off a warning.
|
||||
Restructure the code to remove that warning.
|
||||
|
||||
[ hpa: it would be interesting to revert to the timeconst.bc script.
|
||||
It appears that the failures reported by akpm during testing of
|
||||
that script was due to a known broken version of make, not a problem
|
||||
with bc. The Makefile rules could probably be restructured to avoid
|
||||
the make bug, or it is probably old enough that it doesn't matter. ]
|
||||
|
||||
Reported-by: Andi Kleen <ak@linux.intel.com>
|
||||
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
||||
Cc: Andrew Morton <akpm@linux-foundation.org>
|
||||
Cc: <stable@vger.kernel.org>
|
||||
Signed-off-by: Gustavo Zacarias <gustavo.zacarias@free-electrons.com>
|
||||
---
|
||||
Patch status: upstream
|
||||
|
||||
kernel/timeconst.pl | 6 ++----
|
||||
1 file changed, 2 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/kernel/timeconst.pl b/kernel/timeconst.pl
|
||||
index eb51d76..3f42652 100644
|
||||
--- a/kernel/timeconst.pl
|
||||
+++ b/kernel/timeconst.pl
|
||||
@@ -369,10 +369,8 @@ if ($hz eq '--can') {
|
||||
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;
|
||||
--
|
||||
2.4.10
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
This fixes compilation with ANDROID_PARANOID_NETWORK disabled. Without this
|
||||
patch, compilation breaks with:
|
||||
|
||||
/home/pmos/build/src/android_kernel_samsung_latona-7b8d73dd32e6cd21107f9a963a32a5ed237a6e78/security/commoncap.c:
|
||||
In function 'cap_capable':
|
||||
/home/pmos/build/src/android_kernel_samsung_latona-7b8d73dd32e6cd21107f9a963a32a5ed237a6e78/security/commoncap.c:91:40:
|
||||
error: 'AID_NET_RAW' undeclared (first use in this function)
|
||||
if (cap == CAP_NET_RAW && in_egroup_p(AID_NET_RAW))
|
||||
^~~~~~~~~~~
|
||||
/home/pmos/build/src/android_kernel_samsung_latona-7b8d73dd32e6cd21107f9a963a32a5ed237a6e78/security/commoncap.c:91:40:
|
||||
note: each undeclared identifier is reported only once for each function it
|
||||
appears in
|
||||
/home/pmos/build/src/android_kernel_samsung_latona-7b8d73dd32e6cd21107f9a963a32a5ed237a6e78/security/commoncap.c:93:42:
|
||||
error: 'AID_NET_ADMIN' undeclared (first use in this function)
|
||||
if (cap == CAP_NET_ADMIN && in_egroup_p(AID_NET_ADMIN))
|
||||
---
|
||||
From e9a85c71afa38ee304e71c86ca7d74ed4658318c Mon Sep 17 00:00:00 2001
|
||||
From: Tushar Behera <tushar.behera@linaro.org>
|
||||
Date: Mon, 26 Mar 2012 16:54:15 +0530
|
||||
Subject: [PATCH] security: Add proper checks for Android specific capability
|
||||
checks
|
||||
|
||||
Commit b641072 ("security: Add AID_NET_RAW and AID_NET_ADMIN capability
|
||||
check in cap_capable().") introduces additional checks for AID_NET_xxx
|
||||
macros. Since the header file including those macros are conditionally
|
||||
included, the checks should also be conditionally executed.
|
||||
|
||||
Change-Id: Iaec5208d5b95a46b1ac3f2db8449c661e803fa5b
|
||||
Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
|
||||
Signed-off-by: Andrey Konovalov <andrey.konovalov@linaro.org>
|
||||
---
|
||||
security/commoncap.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/security/commoncap.c b/security/commoncap.c
|
||||
index 897af00e477..0051ac2d058 100644
|
||||
--- a/security/commoncap.c
|
||||
+++ b/security/commoncap.c
|
||||
@@ -80,10 +80,12 @@ int cap_netlink_send(struct sock *sk, struct sk_buff *skb)
|
||||
int cap_capable(const struct cred *cred, struct user_namespace *targ_ns,
|
||||
int cap, int audit)
|
||||
{
|
||||
+#ifdef CONFIG_ANDROID_PARANOID_NETWORK
|
||||
if (cap == CAP_NET_RAW && in_egroup_p(AID_NET_RAW))
|
||||
return 0;
|
||||
if (cap == CAP_NET_ADMIN && in_egroup_p(AID_NET_ADMIN))
|
||||
return 0;
|
||||
+#endif
|
||||
|
||||
for (;;) {
|
||||
/* The creator of the user namespace has all caps. */
|
21
device/linux-infocus-flatfish/03_fix_pm_build.patch
Normal file
21
device/linux-infocus-flatfish/03_fix_pm_build.patch
Normal file
|
@ -0,0 +1,21 @@
|
|||
gen_check_code crashes so we need to use the old cp method.
|
||||
---
|
||||
diff --git a/arch/arm/mach-sun6i/pm/standby/Makefile b/arch/arm/mach-sun6i/pm/standby/Makefile
|
||||
index d7208dd9bfc..aefac0d5741 100755
|
||||
--- a/arch/arm/mach-sun6i/pm/standby/Makefile
|
||||
+++ b/arch/arm/mach-sun6i/pm/standby/Makefile
|
||||
@@ -134,8 +134,7 @@ resume1:
|
||||
|
||||
rm -rf *.o ../*.o
|
||||
|
||||
- #cp resume1.bin ./super/resume/resume1.code
|
||||
- ./gen_check_code ./resume1.bin ./super/resume/resume1.code
|
||||
+ cp resume1.bin ./super/resume/resume1.code
|
||||
|
||||
@echo ----------------------------------------
|
||||
@echo well done!
|
||||
@@ -143,4 +142,3 @@ resume1:
|
||||
|
||||
clean:
|
||||
-rm *.o *.map *.lst *.bin *.elf *.exe dram/*.o
|
||||
-
|
102
device/linux-infocus-flatfish/APKBUILD
Normal file
102
device/linux-infocus-flatfish/APKBUILD
Normal file
|
@ -0,0 +1,102 @@
|
|||
# Kernel config based on: arch/arm/configs/sun6ismp_fiber_defconfig
|
||||
|
||||
pkgname="linux-infocus-flatfish"
|
||||
pkgver=3.3.0
|
||||
pkgrel=0
|
||||
pkgdesc="InFocus New Tab F1 kernel fork"
|
||||
arch="armhf"
|
||||
_carch="arm"
|
||||
_flavor="infocus-flatfish"
|
||||
url="https://kernel.org"
|
||||
license="GPL2"
|
||||
options="!strip !check !tracedeps"
|
||||
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev"
|
||||
HOSTCC="${CC:-gcc}"
|
||||
HOSTCC="${HOSTCC#${CROSS_COMPILE}}"
|
||||
|
||||
# Source
|
||||
_repository="kernel_flatfish"
|
||||
_commit="b7e13780ed3ba80a5539a74d8704281cd6d3f5e6"
|
||||
_config="config-${_flavor}.${arch}"
|
||||
source="
|
||||
$pkgname-$_commit.tar.gz::https://github.com/mozilla-b2g/${_repository}/archive/${_commit}.tar.gz
|
||||
$_config
|
||||
compiler-gcc6.h
|
||||
01_timeconst_fix.patch
|
||||
02_fix_paranoid_network_disabled.patch
|
||||
03_fix_pm_build.patch
|
||||
"
|
||||
builddir="$srcdir/${_repository}-${_commit}"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
|
||||
# gcc6 support
|
||||
cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/"
|
||||
|
||||
# Remove -Werror from all makefiles
|
||||
local i
|
||||
local makefiles="$(find . -type f -name Makefile)
|
||||
$(find . -type f -name Kbuild)"
|
||||
for i in $makefiles; do
|
||||
sed -i 's/-Werror-/-W/g' "$i"
|
||||
sed -i 's/-Werror//g' "$i"
|
||||
done
|
||||
|
||||
# Prepare kernel config ('yes ""' for kernels lacking olddefconfig)
|
||||
cp "$srcdir"/$_config "$builddir"/.config
|
||||
yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig
|
||||
}
|
||||
|
||||
menuconfig() {
|
||||
cd "$builddir"
|
||||
make ARCH="$_carch" menuconfig
|
||||
cp .config "$startdir"/$_config
|
||||
}
|
||||
|
||||
build() {
|
||||
unset LDFLAGS
|
||||
|
||||
# The standby code needs to be built separately
|
||||
make ARCH="$_carch" CC="${CC:-gcc}" \
|
||||
KDIR=$builddir \
|
||||
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS" \
|
||||
-C $builddir/arch/arm/mach-sun6i/pm/standby
|
||||
|
||||
cd $builddir
|
||||
make ARCH="$_carch" CC="${CC:-gcc}" \
|
||||
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
|
||||
}
|
||||
|
||||
package() {
|
||||
# kernel.release
|
||||
install -D "$builddir/include/config/kernel.release" \
|
||||
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
|
||||
|
||||
# zImage (find the right one)
|
||||
cd "$builddir/arch/$_carch/boot"
|
||||
_target="$pkgdir/boot/vmlinuz-$_flavor"
|
||||
for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do
|
||||
[ -e "$_zimg" ] || continue
|
||||
msg "zImage found: $_zimg"
|
||||
install -Dm644 "$_zimg" "$_target"
|
||||
break
|
||||
done
|
||||
if ! [ -e "$_target" ]; then
|
||||
error "Could not find zImage in $PWD!"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# External modules install
|
||||
cd "$builddir"
|
||||
make ARCH="$_carch" CC="${CC:-gcc}" \
|
||||
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS" \
|
||||
INSTALL_MOD_PATH="$pkgdir" modules_install
|
||||
}
|
||||
|
||||
sha512sums="9dad1d0226803566727cc34c44ec9240768a3e4e89f9a02dad0f9bf2f9ee6aecd17892c12d7b9f30e4bc522d67d06d4089d79f800de594c052760ad110d694d9 linux-infocus-flatfish-b7e13780ed3ba80a5539a74d8704281cd6d3f5e6.tar.gz
|
||||
5749219232d11c4b07b14414df828b5ad517208c8f11c90db19c38ccc1ca49546dc17158f67de5f991a343d59ddade4066ac52b8ff36d2326a2749829d34bb6e config-infocus-flatfish.armhf
|
||||
d80980e9474c82ba0ef1a6903b434d8bd1b092c40367ba543e72d2c119301c8b2d05265740e4104ca1ac5d15f6c4aa49e8776cb44264a9a28dc551e0d1850dcc compiler-gcc6.h
|
||||
a2bb98fb8d988bbb659cae00fbaca360828300e9b98b90aed5ee0dd839c3f740696df4094a9021b813cbada06820d115aabed581a47cdd2c947e8d853c20b145 01_timeconst_fix.patch
|
||||
df62e03666313bb03d9a455eac875f170a55d378b6e56b847c1c6ff1ce5cfafcfdf1d7605754ca3c684840ea00357f9ec4c6621f6ff77377132a484b9258f6f7 02_fix_paranoid_network_disabled.patch
|
||||
06463b3f376650f7a8bf15cad9d6b619656ed80603c4988c6454e650a4ab99062dd47c19099a3cd5d6e0f6f291476eada2e79fe2231082bc2fd4edad84f809fd 03_fix_pm_build.patch"
|
69
device/linux-infocus-flatfish/compiler-gcc6.h
Normal file
69
device/linux-infocus-flatfish/compiler-gcc6.h
Normal file
|
@ -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 */
|
||||
|
2757
device/linux-infocus-flatfish/config-infocus-flatfish.armhf
Normal file
2757
device/linux-infocus-flatfish/config-infocus-flatfish.armhf
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue