amazon-biscuit: new device (MR 4532)
This commit is contained in:
parent
0bbbd50adb
commit
aeedc86d67
12 changed files with 5621 additions and 0 deletions
36
device/testing/device-amazon-biscuit/APKBUILD
Normal file
36
device/testing/device-amazon-biscuit/APKBUILD
Normal file
|
@ -0,0 +1,36 @@
|
|||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname=device-amazon-biscuit
|
||||
pkgdesc="Amazon Echo Dot (2nd gen)"
|
||||
pkgver=0.1
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="armv7"
|
||||
options="!check !archcheck"
|
||||
depends="
|
||||
linux-amazon-biscuit
|
||||
mkbootimg
|
||||
postmarketos-base
|
||||
"
|
||||
makedepends="devicepkg-dev"
|
||||
source="
|
||||
deviceinfo
|
||||
led.start
|
||||
led.stop
|
||||
"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
}
|
||||
|
||||
package() {
|
||||
devicepkg_package $startdir $pkgname
|
||||
install -Dm755 "$srcdir"/led.start "$pkgdir"/etc/local.d/led.start
|
||||
install -Dm755 "$srcdir"/led.stop "$pkgdir"/etc/local.d/led.stop
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
6560b5bed8d350ce57f5acb23008bad82dfec3201987f3429989adf8af2096f34e815fec6704238cf9b780ed9e3bde7f8b040544a73d4fcda723bcf5cd496e48 deviceinfo
|
||||
a72f042f5afdb4d47d22c46906cee4d84a23584bc719bfec99678251a6e7784fdfb67c284ecafd11721f7c90783a93283957c43ad845a1ff586b0610234523a3 led.start
|
||||
d10a06899a48a090042047a9b4917604a0d408701f6e15fc559a5f8444d61f91a3b6c201cbdb227ae0f19d1dff3424e40c41e32e2e91f37b9a69f6e0bd67eb30 led.stop
|
||||
"
|
32
device/testing/device-amazon-biscuit/deviceinfo
Normal file
32
device/testing/device-amazon-biscuit/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="Amazon Echo Dot (2nd gen)"
|
||||
deviceinfo_manufacturer="Amazon"
|
||||
deviceinfo_codename="amazon-biscuit"
|
||||
deviceinfo_year="2016"
|
||||
deviceinfo_arch="armv7"
|
||||
|
||||
# Device related
|
||||
deviceinfo_chassis="embedded"
|
||||
deviceinfo_keyboard="false"
|
||||
deviceinfo_external_storage="false"
|
||||
deviceinfo_no_framebuffer="true"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="fastboot"
|
||||
deviceinfo_flash_fastboot_partition_system="userdata"
|
||||
deviceinfo_kernel_cmdline="bootopt=64S3,32N2,32N2 lowmemorykiller.minfree=1536,2048,4096,8192,16384,16384 lowmemorykiller.adj=0,100,200,300,900,906 rootwait buildvariant=user veritykeyid=id:f3530e18f64d11fc25eb2dd762979f078de990bf"
|
||||
deviceinfo_generate_bootimg="true"
|
||||
deviceinfo_bootimg_qcdt="false"
|
||||
deviceinfo_bootimg_mtk_label_kernel="KERNEL"
|
||||
deviceinfo_bootimg_dtb_second="false"
|
||||
deviceinfo_flash_pagesize="2048"
|
||||
deviceinfo_header_version="0"
|
||||
deviceinfo_flash_offset_base="0x40000000"
|
||||
deviceinfo_flash_offset_kernel="0x00008000"
|
||||
deviceinfo_flash_offset_ramdisk="0x04000000"
|
||||
deviceinfo_flash_offset_second="0x00f00000"
|
||||
deviceinfo_flash_offset_tags="0x08000000"
|
5
device/testing/device-amazon-biscuit/led.start
Normal file
5
device/testing/device-amazon-biscuit/led.start
Normal file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
# When device is finished booting, stop the default boot animation and replace it with a rainbow
|
||||
echo 0 > /sys/bus/i2c/devices/0-003f/boot_animation
|
||||
echo "0000ff0000ff4f00cf4f00cfff0000ff0000af2f00af2f00ffff00ffff0000ff0000ff00" > /sys/bus/i2c/devices/0-003f/frame
|
4
device/testing/device-amazon-biscuit/led.stop
Normal file
4
device/testing/device-amazon-biscuit/led.stop
Normal file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Run default boot animation again during shutdown
|
||||
echo 1 > /sys/bus/i2c/devices/0-003f/boot_animation
|
76
device/testing/linux-amazon-biscuit/APKBUILD
Normal file
76
device/testing/linux-amazon-biscuit/APKBUILD
Normal file
|
@ -0,0 +1,76 @@
|
|||
# Reference: <https://postmarketos.org/vendorkernel>
|
||||
# Kernel config based on: arch/arm/configs/biscuit_defconfig
|
||||
|
||||
pkgname=linux-amazon-biscuit
|
||||
pkgver=3.18.19
|
||||
pkgrel=0
|
||||
pkgdesc="Amazon Echo Dot (2nd gen) kernel fork"
|
||||
arch="armv7"
|
||||
_carch="arm"
|
||||
_flavor="amazon-biscuit"
|
||||
url="https://kernel.org"
|
||||
license="GPL-2.0-only"
|
||||
makedepends="
|
||||
bash
|
||||
bc
|
||||
bison
|
||||
devicepkg-dev
|
||||
findutils
|
||||
flex
|
||||
openssl-dev
|
||||
perl
|
||||
"
|
||||
|
||||
# Disable kconfig check because Amazon kernel doesn't allow VT or SYSVIPC to be
|
||||
# built without extensive patching
|
||||
options="
|
||||
!strip
|
||||
!check
|
||||
!tracedeps
|
||||
!pmb:kconfigcheck
|
||||
pmb:cross-native
|
||||
"
|
||||
|
||||
# Source
|
||||
_repository="amazon-biscuit-kernel"
|
||||
_commit="3923647bdeca8fdaeb943fb31234dbe361668d28"
|
||||
_config="config-$_flavor.$arch"
|
||||
source="
|
||||
$pkgname-$_commit.tar.gz::https://gitlab.com/echo-pmos/$_repository/-/archive/$_commit/amazon-biscuit-kernel-$_commit.tar.gz
|
||||
$_config
|
||||
gcc7-give-up-on-ilog2-const-optimizations.patch
|
||||
gcc8-fix-put-user.patch
|
||||
gcc10-extern_YYLOC_global_declaration.patch
|
||||
replace-missing-code-from-mainline.patch
|
||||
replace-solaris-style-directive.patch
|
||||
x509-certificate-list.patch
|
||||
"
|
||||
builddir="$srcdir/$_repository-$_commit"
|
||||
_outdir="out"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
. downstreamkernel_prepare
|
||||
}
|
||||
|
||||
build() {
|
||||
unset LDFLAGS
|
||||
make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" \
|
||||
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
|
||||
}
|
||||
|
||||
package() {
|
||||
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" \
|
||||
"$_flavor" "$_outdir"
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
f8b3b837a1e52c6d2018b0bdf05ef92118e78e0566ba6e13a7b1009b634b5cf5b0d0c8b2ad4793eed6003c0f5c788b079b9a9dbf1e403431110d5250e52b2ccf linux-amazon-biscuit-3923647bdeca8fdaeb943fb31234dbe361668d28.tar.gz
|
||||
479f093a1b63f8e702e6852d7e36e91345223d493bdcf27e32c5810a2cba470f5653aca9a5a2a8cbbe4f944758ac0567883f06050f3593247a7b8487900a1e2b config-amazon-biscuit.armv7
|
||||
77eba606a71eafb36c32e9c5fe5e77f5e4746caac292440d9fb720763d766074a964db1c12bc76fe583c5d1a5c864219c59941f5e53adad182dbc70bf2bc14a7 gcc7-give-up-on-ilog2-const-optimizations.patch
|
||||
197d40a214ada87fcb2dfc0ae4911704b9a93354b75179cd6b4aadbb627a37ec262cf516921c84a8b1806809b70a7b440cdc8310a4a55fca5d2c0baa988e3967 gcc8-fix-put-user.patch
|
||||
f0a0591e0008fa5465f479677112b81ef3dac88c26e0aa358bb504abdb920d3682613dfc51183130b5a22772ad85b1cc7a1155104b33dbba748d8e074fc2876a gcc10-extern_YYLOC_global_declaration.patch
|
||||
9ae0f1ca06c6084c0577578721968cd4b154d9cb9fb82af3b30732dd4ca2e857cae58c285d0f529e0b2c827f1cc2a12426698065e2d0aab1b23e2208fee70bc5 replace-missing-code-from-mainline.patch
|
||||
a4196e0184b3bb1bc8d0cf4fae931dab623bb9cd02732758bb8ac1d0588682960f58d4dba8ccebb1377e853ca5c135d2a700750228d54ac95a33d1cd44533bca replace-solaris-style-directive.patch
|
||||
756bfc37c903085bec2e016f146cfc795da5495d8b095124a83f9d92931882ca63c5a1c418016dbcd19a18357c1e783dc7547bb115bb186751615ce9268007f2 x509-certificate-list.patch
|
||||
"
|
4010
device/testing/linux-amazon-biscuit/config-amazon-biscuit.armv7
Normal file
4010
device/testing/linux-amazon-biscuit/config-amazon-biscuit.armv7
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,27 @@
|
|||
Based on https://lkml.org/lkml/2020/4/1/1206. In original patch, YYLOC declaration was removed.
|
||||
However, using original patch, which removes yylloc declaration on 3.18.14 kernel version results in 'yylloc not declared' error.
|
||||
See part of the original description below:
|
||||
|
||||
gcc 10 will default to -fno-common, which causes this error at link
|
||||
time:
|
||||
|
||||
(.text+0x0): multiple definition of `yylloc'; dtc-lexer.lex.o (symbol from plugin):(.text+0x0): first defined here
|
||||
|
||||
This is because both dtc-lexer as well as dtc-parser define the same
|
||||
global symbol yyloc. Before with -fcommon those were merged into one
|
||||
defintion. The proper solution would be to to mark this as "extern",
|
||||
---
|
||||
|
||||
diff --git a/scripts/dtc/dtc-lexer.lex.c_shipped b/scripts/dtc/dtc-lexer.lex.c_shipped
|
||||
index 2d30f41..d0eb405 100644
|
||||
--- a/scripts/dtc/dtc-lexer.lex.c_shipped
|
||||
+++ b/scripts/dtc/dtc-lexer.lex.c_shipped
|
||||
@@ -637,7 +637,7 @@ char *yytext;
|
||||
#include "srcpos.h"
|
||||
#include "dtc-parser.tab.h"
|
||||
|
||||
-YYLTYPE yylloc;
|
||||
+extern YYLTYPE yylloc;
|
||||
|
||||
/* CAUTION: this will stop working if we ever use yyless() or yyunput() */
|
||||
#define YY_USER_ACTION \
|
|
@ -0,0 +1 @@
|
|||
../../.shared-patches/linux/gcc7-give-up-on-ilog2-const-optimizations.patch
|
1
device/testing/linux-amazon-biscuit/gcc8-fix-put-user.patch
Symbolic link
1
device/testing/linux-amazon-biscuit/gcc8-fix-put-user.patch
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../.shared-patches/linux/gcc8-fix-put-user.patch
|
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,46 @@
|
|||
From 790756c7e0229dedc83bf058ac69633045b1000e Mon Sep 17 00:00:00 2001
|
||||
From: Nick Desaulniers <ndesaulniers@google.com>
|
||||
Date: Mon, 4 Nov 2019 19:31:45 +0100
|
||||
Subject: [PATCH] ARM: 8933/1: replace Sun/Solaris style flag on section directive
|
||||
|
||||
It looks like a section directive was using "Solaris style" to declare
|
||||
the section flags. Replace this with the GNU style so that Clang's
|
||||
integrated assembler can assemble this directive.
|
||||
---
|
||||
|
||||
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
|
||||
index 3f25fac..a5606a0 100644
|
||||
--- a/arch/arm/boot/compressed/head.S
|
||||
+++ b/arch/arm/boot/compressed/head.S
|
||||
@@ -109,7 +109,7 @@
|
||||
#endif
|
||||
.endm
|
||||
|
||||
- .section ".start", #alloc, #execinstr
|
||||
+ .section ".start", "ax"
|
||||
/*
|
||||
* sort out different calling conventions
|
||||
*/
|
||||
diff --git a/arch/arm/boot/compressed/piggy.gzip.S b/arch/arm/boot/compressed/piggy.gzip.S
|
||||
index a68adf9..7de824f 100644
|
||||
--- a/arch/arm/boot/compressed/piggy.gzip.S
|
||||
+++ b/arch/arm/boot/compressed/piggy.gzip.S
|
||||
@@ -1,4 +1,4 @@
|
||||
- .section .piggydata,#alloc
|
||||
+ .section .piggydata,"a"
|
||||
.globl input_data
|
||||
input_data:
|
||||
.incbin "arch/arm/boot/compressed/piggy.gzip"
|
||||
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
|
||||
index 22ac2a6..68744e1 100644
|
||||
--- a/arch/arm/mm/proc-v7.S
|
||||
+++ b/arch/arm/mm/proc-v7.S
|
||||
@@ -462,7 +462,7 @@ __v7_setup_stack:
|
||||
string cpu_elf_name, "v7"
|
||||
.align
|
||||
|
||||
- .section ".proc.info.init", #alloc, #execinstr
|
||||
+ .section ".proc.info.init", "ax"
|
||||
|
||||
/*
|
||||
* Standard v7 proc info content
|
|
@ -0,0 +1,24 @@
|
|||
Replace broken custom cert list script with mainline 3.18.19 version
|
||||
---
|
||||
|
||||
diff --git a/kernel/Makefile b/kernel/Makefile
|
||||
index 9f8b0d8..a61e4a7 100644
|
||||
--- a/kernel/Makefile
|
||||
+++ b/kernel/Makefile
|
||||
@@ -144,12 +144,12 @@ endif
|
||||
|
||||
kernel/system_certificates.o: $(obj)/x509_certificate_list
|
||||
|
||||
-quiet_cmd_extract_certs = EXTRACT_CERTS $(patsubst "%",%,$(2))
|
||||
- cmd_extract_certs = scripts/extract-cert $(2) $@ || ( rm $@; exit 1)
|
||||
+quiet_cmd_x509certs = CERTS $@
|
||||
+ cmd_x509certs = cat $(X509_CERTIFICATES) /dev/null >$@ $(foreach X509,$(X509_CERTIFICATES),; echo " - Including cert $(X509)")
|
||||
|
||||
targets += $(obj)/x509_certificate_list
|
||||
-$(obj)/x509_certificate_list: scripts/extract-cert $(X509_CERTIFICATES) $(obj)/.x509.list FORCE
|
||||
- $(call if_changed,extract_certs,verity-keys)
|
||||
+$(obj)/x509_certificate_list: $(X509_CERTIFICATES) $(obj)/.x509.list
|
||||
+ $(call if_changed,x509certs)
|
||||
|
||||
targets += $(obj)/.x509.list
|
||||
$(obj)/.x509.list:
|
Loading…
Reference in a new issue