samsung-a20: new device (Galaxy A20) (MR 1880)
This commit is contained in:
parent
962a64697d
commit
c5692dfc71
6 changed files with 5363 additions and 0 deletions
30
device/testing/device-samsung-a20/APKBUILD
Normal file
30
device/testing/device-samsung-a20/APKBUILD
Normal file
|
@ -0,0 +1,30 @@
|
|||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname=device-samsung-a20
|
||||
pkgdesc="Samsung Galaxy A20"
|
||||
pkgver=0.1
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
options="!check !archcheck"
|
||||
depends="postmarketos-base linux-samsung-a20 mkbootimg mesa-dri-gallium"
|
||||
makedepends="devicepkg-dev"
|
||||
source="deviceinfo initfs-hook.sh"
|
||||
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
}
|
||||
|
||||
package() {
|
||||
devicepkg_package $startdir $pkgname
|
||||
}
|
||||
|
||||
nonfree_firmware() {
|
||||
pkgdesc="Non-free firmware for the Samsung Galaxy A20"
|
||||
depends="firmware-samsung-a20"
|
||||
mkdir "$subpkgdir"
|
||||
}
|
||||
|
||||
sha512sums="46cfa2dedbe093729f027cc9441d331bcb92688442f296e78b13556edee26fc14c433a58018134a7466fb0828fa0f204b22d1d50794ffc4d3b6cce57f441ef8c deviceinfo
|
||||
d5c8f7ed89a842da83109e899ba55802cf07518bea057c8f0a70d942e4a17ce87bb470741a99369bc095c0005c529047437a1833294ba903a93eb4f6822a4611 initfs-hook.sh"
|
39
device/testing/device-samsung-a20/deviceinfo
Normal file
39
device/testing/device-samsung-a20/deviceinfo
Normal file
|
@ -0,0 +1,39 @@
|
|||
# Reference: <https://postmarketos.org/deviceinfo>
|
||||
# Please use double quotes only. You can source this file in shell
|
||||
# scripts.
|
||||
|
||||
deviceinfo_format_version="0"
|
||||
deviceinfo_name="Samsung Galaxy A20"
|
||||
deviceinfo_manufacturer="Samsung"
|
||||
deviceinfo_codename="samsung-a20"
|
||||
deviceinfo_year="2019"
|
||||
deviceinfo_dtb=""
|
||||
deviceinfo_modules_initfs=""
|
||||
deviceinfo_arch="aarch64"
|
||||
|
||||
# Device related
|
||||
deviceinfo_chassis="handset"
|
||||
deviceinfo_keyboard="false"
|
||||
deviceinfo_external_storage="true"
|
||||
deviceinfo_screen_width="720"
|
||||
deviceinfo_screen_height="1560"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="heimdall-bootimg"
|
||||
deviceinfo_kernel_cmdline="androidboot.selinux=permissive androidboot.selinux=permissive"
|
||||
deviceinfo_generate_bootimg="true"
|
||||
deviceinfo_bootimg_qcdt="false"
|
||||
deviceinfo_bootimg_mtk_mkimage="false"
|
||||
deviceinfo_bootimg_dtb_second="false"
|
||||
deviceinfo_flash_offset_base="0x10000000"
|
||||
deviceinfo_flash_offset_kernel="0x00008000"
|
||||
deviceinfo_flash_offset_ramdisk="0x01000000"
|
||||
deviceinfo_flash_offset_second="0x00f00000"
|
||||
deviceinfo_flash_offset_tags="0x00000100"
|
||||
deviceinfo_flash_pagesize="2048"
|
||||
deviceinfo_flash_heimdall_partition_kernel="boot"
|
||||
deviceinfo_flash_heimdall_partition_system="system"
|
||||
|
||||
# USB related
|
||||
deviceinfo_usb_idVendor="0x04e8" # Samsung Electronics Co., Ltd
|
||||
deviceinfo_usb_idProduct="0x6860" # Galaxy (MTP)
|
28
device/testing/device-samsung-a20/initfs-hook.sh
Normal file
28
device/testing/device-samsung-a20/initfs-hook.sh
Normal file
|
@ -0,0 +1,28 @@
|
|||
#!/bin/sh
|
||||
|
||||
# This is a trimmed down version of setup_usb_network_configfs from
|
||||
# pmOS's init_functions.sh
|
||||
|
||||
# See: https://www.kernel.org/doc/Documentation/usb/gadget_configfs.txt
|
||||
CONFIGFS=/config/usb_gadget
|
||||
SYS=/sys/class/android_usb/android0
|
||||
|
||||
# Create an usb gadet configuration
|
||||
mkdir $CONFIGFS/g1 || echo "initfs-hook: Couldn't create $CONFIGFS/g1"
|
||||
|
||||
# Create rndis function.
|
||||
mkdir $CONFIGFS/g1/functions/rndis.usb0 \
|
||||
|| echo "initfs-hook: Couldn't create $CONFIGFS/g1/functions/rndis.usb0"
|
||||
|
||||
# Create configuration instance for the gadget
|
||||
mkdir $CONFIGFS/g1/configs/c.1 \
|
||||
|| echo "initfs-hook: Couldn't create $CONFIGFS/g1/configs/c.1"
|
||||
|
||||
# Link the rndis instance to the configuration
|
||||
ln -s $CONFIGFS/g1/functions/rndis.usb0 $CONFIGFS/g1/configs/c.1 \
|
||||
|| echo "initfs-hook: Couldn't symlink rndis.usb0"
|
||||
|
||||
echo "0" >"$SYS/enable"
|
||||
echo "$(ls /sys/class/udc)" > $CONFIGFS/g1/UDC || echo " Couldn't write UDC"
|
||||
echo "rndis" >"$SYS/functions"
|
||||
echo "1" >"$SYS/enable"
|
51
device/testing/firmware-samsung-a20/APKBUILD
Normal file
51
device/testing/firmware-samsung-a20/APKBUILD
Normal file
|
@ -0,0 +1,51 @@
|
|||
pkgname=firmware-samsung-a20
|
||||
pkgver=1
|
||||
pkgrel=0
|
||||
pkgdesc="Firmware for the Samsung Galaxy A20"
|
||||
url="https://gitlab.com/arpio/proprietary_vendor_a205"
|
||||
arch="noarch"
|
||||
license="proprietary"
|
||||
options="!check !archcheck !strip !spdx"
|
||||
|
||||
# Source
|
||||
_commit="06b2a884c0c0ebf244995d31895d396b30a40170"
|
||||
|
||||
_vendor_files="
|
||||
APBargeIn_AUDIO_SLSI.bin
|
||||
AP_AUDIO_SLSI.bin
|
||||
Tfa9896.cnt
|
||||
calliope_dram.bin
|
||||
calliope_sram.bin
|
||||
fimc_is_lib.bin
|
||||
fimc_is_rta.bin
|
||||
mfc_fw.bin
|
||||
setfile_3l6.bin
|
||||
setfile_4ha_front.bin
|
||||
setfile_imx258.bin
|
||||
setfile_sr556.bin
|
||||
"
|
||||
|
||||
for _file in $_vendor_files; do
|
||||
source="$source $pkgname-$_commit-$_file::$url/-/raw/master/firmware/$_file"
|
||||
done
|
||||
|
||||
package() {
|
||||
local file
|
||||
for file in $_vendor_files; do
|
||||
install -Dm644 "$srcdir/$pkgname-$_commit-$file" \
|
||||
"$pkgdir/lib/firmware/postmarketos/$file"
|
||||
done
|
||||
}
|
||||
|
||||
sha512sums="49805625aa39c7eee135de4cf2ae16e2665589a86f777fc2703d8f21f0a96d6e07ce9cc36fb20eeaa6dd09a76850236e27d2b6869cb08c31ab8b772714e7b6c1 firmware-samsung-a20-06b2a884c0c0ebf244995d31895d396b30a40170-APBargeIn_AUDIO_SLSI.bin
|
||||
f11246d886b4adb16d3c41bd9750a4183301e594bc163b0790c010ce381447c18f180a57c82dbc2c74d2f841fec3e8ea39bb8acd85f45d1b3b0f897541efd485 firmware-samsung-a20-06b2a884c0c0ebf244995d31895d396b30a40170-AP_AUDIO_SLSI.bin
|
||||
134594d5041554ede2508dc47aa1043e55965f34b40a5d1b76c537b8adbb5886539b1ffd484d3d177e475a11c47ca621c90f15e578e329ddbb84f368e84fbdf9 firmware-samsung-a20-06b2a884c0c0ebf244995d31895d396b30a40170-Tfa9896.cnt
|
||||
088435ff7e7dfb2510d7428ff73c5eb2d42a204ec73c93c602bd98816a483406c2955917fb1e91809188eaafa0c2b21f612ca4f48bbd909f501f7aeb5aeb5f96 firmware-samsung-a20-06b2a884c0c0ebf244995d31895d396b30a40170-calliope_dram.bin
|
||||
ea37791306b295d2c234052501194c5c98d9d713617f1e28379c2d09b394d2cc3213bae1e5d850eec38e8565a32af4dcaa319fcb29b16b9322fa9cc6db442eff firmware-samsung-a20-06b2a884c0c0ebf244995d31895d396b30a40170-calliope_sram.bin
|
||||
8ca1b33c7d36aefb51a9c4b5187edff0d72c20d56b6885a34062cb2ebe94511e8459da8997cd91fd5bbbd1da3176c4119215de7e1bb59c3c49f1ae6d73b76d18 firmware-samsung-a20-06b2a884c0c0ebf244995d31895d396b30a40170-fimc_is_lib.bin
|
||||
665cb23f245f43f557deb68c8b43cbd8459ff0bf8f2c4bb7fd56079790c5b4650e67382c4f8d4e731bf52ac8abe6a924c6ef122bac0e57b0000503651f7d14b4 firmware-samsung-a20-06b2a884c0c0ebf244995d31895d396b30a40170-fimc_is_rta.bin
|
||||
7b99132e5b33caeadc438a7a5f5e1dc0674a7fabd3f213fe2c88a1e215320fe74fc57a783eff22c15ce171f2a5e047d9364b6e3eee6b70c95954b0cb0f2a46fb firmware-samsung-a20-06b2a884c0c0ebf244995d31895d396b30a40170-mfc_fw.bin
|
||||
166b4876d49685ab1d34b492029c97b3000c43b1c6f83cd7a443f20453223dbeff19ffb3ba914b7eb63525b2308a01875609561ad52c103153bf023f245c63f6 firmware-samsung-a20-06b2a884c0c0ebf244995d31895d396b30a40170-setfile_3l6.bin
|
||||
8e3fe313851a397b6927ef838f7fd765e1afb34f63913ec45a314d2db88909106f5f32045fb95cdabc51c23d4499645ab7c14a98d24371d24d912250680974c2 firmware-samsung-a20-06b2a884c0c0ebf244995d31895d396b30a40170-setfile_4ha_front.bin
|
||||
3a3b3e36cdc104d7e27d93d9307615171646e30f0e1651867262573559dfc7ee256f7fc40e2ac1fe599bf94a47025dadb86b48ec6366ce78dae4c101cdc52770 firmware-samsung-a20-06b2a884c0c0ebf244995d31895d396b30a40170-setfile_imx258.bin
|
||||
0f195297a84aa88fe3ffd9f342faeaaeae7fb0baea9530d2858a1509a11c77e11d254c13efb2d182803280958a12885e5d3d64cb20bb763ae1712abbe966f11d firmware-samsung-a20-06b2a884c0c0ebf244995d31895d396b30a40170-setfile_sr556.bin"
|
50
device/testing/linux-samsung-a20/APKBUILD
Normal file
50
device/testing/linux-samsung-a20/APKBUILD
Normal file
|
@ -0,0 +1,50 @@
|
|||
# Reference: <https://postmarketos.org/vendorkernel>
|
||||
# Kernel config based on: arch/arm64/configs/pmos-a20_defconfig
|
||||
|
||||
pkgname=linux-samsung-a20
|
||||
pkgver=4.4.250
|
||||
pkgrel=0
|
||||
pkgdesc="Samsung Galaxy A20 kernel fork"
|
||||
arch="aarch64"
|
||||
_carch="arm64"
|
||||
_flavor="samsung-a20"
|
||||
url="https://kernel.org"
|
||||
license="GPL-2.0-only"
|
||||
options="!strip !check !tracedeps pmb:cross-native"
|
||||
makedepends="bash bc bison devicepkg-dev flex openssl-dev perl gcc6"
|
||||
|
||||
# Compiler: GCC 6 (doesn't boot when compiled with newer versions)
|
||||
if [ "${CC:0:5}" != "gcc6-" ]; then
|
||||
CC="gcc6-$CC"
|
||||
HOSTCC="gcc6-gcc"
|
||||
CROSS_COMPILE="gcc6-$CROSS_COMPILE"
|
||||
fi
|
||||
|
||||
# Source
|
||||
_repository="kernel_samsung_a20"
|
||||
_commit="ce4a8678bd0e160c910d406463b6df4f6a5be813"
|
||||
_config="config-$_flavor.$arch"
|
||||
source="
|
||||
$pkgname-$_commit.tar.gz::https://gitlab.com/arpio/$_repository/-/archive/$_commit/$_repository-$_commit.tar.gz
|
||||
$_config
|
||||
"
|
||||
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="eea2e47941da0594b992bb5c2544c3337753d398d2b137128fccf5d4683f20200266127a3ff353371a44fb8a79199b8e95dcd5d2f609dae53ad39c092b4de79a linux-samsung-a20-ce4a8678bd0e160c910d406463b6df4f6a5be813.tar.gz
|
||||
2faed6872ca022cf753778f4741098ec1824af529c7f1ff023a34555b2f2182e8fd1fd348797d95101163456f5e081357b24e520c85cfae0ec32dae4147f9d7d config-samsung-a20.aarch64"
|
5165
device/testing/linux-samsung-a20/config-samsung-a20.aarch64
Normal file
5165
device/testing/linux-samsung-a20/config-samsung-a20.aarch64
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue