samsung-a30: new device (MR 2886)
This commit is contained in:
parent
04839b3bf4
commit
56df39676d
6 changed files with 5383 additions and 0 deletions
33
device/testing/device-samsung-a30/APKBUILD
Normal file
33
device/testing/device-samsung-a30/APKBUILD
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
# Reference: <https://postmarketos.org/devicepkg>
|
||||||
|
pkgname=device-samsung-a30
|
||||||
|
pkgdesc="Samsung Galaxy A30"
|
||||||
|
pkgver=0.1
|
||||||
|
pkgrel=0
|
||||||
|
url="https://postmarketos.org"
|
||||||
|
license="MIT"
|
||||||
|
arch="aarch64"
|
||||||
|
options="!check !archcheck"
|
||||||
|
depends="linux-samsung-a30 mesa-dri-gallium mkbootimg postmarketos-base"
|
||||||
|
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="Samsung A30 nonfree firmware"
|
||||||
|
depends="firmware-samsung-a30"
|
||||||
|
mkdir "$subpkgdir"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
sha512sums="
|
||||||
|
c0264e1d0bcd28118baf3ae349d77ec26f3dbe67dfd3f9689cc0c8629fd2696490fa4a2cf8dfa7ab042d932e77bce925893c72a6b162587611e09b612d0bf14f deviceinfo
|
||||||
|
04445194a5245d08fcf1b425bff1d8dd6a8fdacafdc151223634299a35f1eb20fbd733979b58bcfd854e16fde02629c28453f840d6c9dc34fc15d4fcc8aa4302 initfs-hook.sh
|
||||||
|
"
|
37
device/testing/device-samsung-a30/deviceinfo
Normal file
37
device/testing/device-samsung-a30/deviceinfo
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
# 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 A30"
|
||||||
|
deviceinfo_manufacturer="Samsung"
|
||||||
|
deviceinfo_codename="samsung-a30"
|
||||||
|
deviceinfo_year="2019"
|
||||||
|
deviceinfo_arch="aarch64"
|
||||||
|
|
||||||
|
# Device related
|
||||||
|
deviceinfo_chassis="handset"
|
||||||
|
deviceinfo_keyboard="false"
|
||||||
|
deviceinfo_external_storage="true"
|
||||||
|
deviceinfo_screen_width="1080"
|
||||||
|
deviceinfo_screen_height="2340"
|
||||||
|
|
||||||
|
# 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_pagesize="2048"
|
||||||
|
deviceinfo_flash_offset_base="0x10000000"
|
||||||
|
deviceinfo_flash_offset_kernel="0x00008000"
|
||||||
|
deviceinfo_flash_offset_ramdisk="0xf0000000"
|
||||||
|
deviceinfo_flash_offset_second="0xf0000000"
|
||||||
|
deviceinfo_flash_offset_tags="0x00000100"
|
||||||
|
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-a30/initfs-hook.sh
Normal file
28
device/testing/device-samsung-a30/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"
|
59
device/testing/firmware-samsung-a30/APKBUILD
Normal file
59
device/testing/firmware-samsung-a30/APKBUILD
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
pkgname=firmware-samsung-a30
|
||||||
|
pkgver=1
|
||||||
|
pkgrel=0
|
||||||
|
pkgdesc="Firmware for the Samsung Galaxy A30"
|
||||||
|
url="https://github.com/Johnnyhandsome69/proprietary_vendor_a305"
|
||||||
|
arch="aarch64"
|
||||||
|
license="proprietary"
|
||||||
|
options="!check !archcheck !strip !spdx !tracedeps pmb:cross-native"
|
||||||
|
|
||||||
|
# Source
|
||||||
|
_commit="084c25e4ec61e4609b80ed20c1b38891e977dc9b"
|
||||||
|
_url="https://github.com/Johnnyhandsome69/proprietary_vendor_a305"
|
||||||
|
source="$pkgname-$_commit.tar.gz::$_url/archive/$_commit.tar.gz"
|
||||||
|
|
||||||
|
package() {
|
||||||
|
#VENDOR FILES
|
||||||
|
cd "$srcdir/proprietary_vendor_a305-$_commit/firmware/"
|
||||||
|
install -Dm644 APBargeIn_AUDIO_SLSI.bin \
|
||||||
|
"$pkgdir"/lib/firmware/postmarketos/APBargeIn_AUDIO_SLSI.bin
|
||||||
|
install -Dm644 AP_AUDIO_SLSI.bin \
|
||||||
|
"$pkgdir"/lib/firmware/postmarketos/AP_AUDIO_SLSI.bin
|
||||||
|
install -Dm644 calliope_dram.bin \
|
||||||
|
"$pkgdir"/lib/firmware/postmarketos/calliope_dram.bin
|
||||||
|
install -Dm644 calliope_sram.bin \
|
||||||
|
"$pkgdir"/lib/firmware/postmarketos/calliope_sram.bin
|
||||||
|
install -Dm644 fimc_is_lib.bin \
|
||||||
|
"$pkgdir"/lib/firmware/postmarketos/fimc_is_lib.bin
|
||||||
|
install -Dm644 fimc_is_rta.bin \
|
||||||
|
"$pkgdir"/lib/firmware/postmarketos/fimc_is_rta.bin
|
||||||
|
install -Dm644 mfc_fw.bin \
|
||||||
|
"$pkgdir"/lib/firmware/postmarketos/mfc_fw.bin
|
||||||
|
install -Dm644 setfile_2p6.bin \
|
||||||
|
"$pkgdir"/lib/firmware/postmarketos/setfile_2p6.bin
|
||||||
|
install -Dm644 setfile_3p8sp.bin \
|
||||||
|
"$pkgdir"/lib/firmware/postmarketos/setfile_3p8sp.bin
|
||||||
|
install -Dm644 setfile_5e9.bin \
|
||||||
|
"$pkgdir"/lib/firmware/postmarketos/setfile_5e9.bin
|
||||||
|
install -Dm644 setfile_imx471.bin \
|
||||||
|
"$pkgdir"/lib/firmware/postmarketos/setfile_imx471.bin
|
||||||
|
install -Dm644 Tfa9896.cnt \
|
||||||
|
"$pkgdir"/lib/firmware/postmarketos/Tfa9896.cnt
|
||||||
|
|
||||||
|
#WIFI FIRMWARE
|
||||||
|
cd "$srcdir/proprietary_vendor_a305-$_commit/etc/wifi/"
|
||||||
|
install -Dm644 mx \
|
||||||
|
"$pkgdir"/lib/firmware/postmarketos/mx140/mx
|
||||||
|
install -Dm644 mx140.bin \
|
||||||
|
"$pkgdir"/lib/firmware/postmarketos/mx140/mx140.bin
|
||||||
|
install -Dm644 mx140_bt.hcf \
|
||||||
|
"$pkgdir"/lib/firmware/postmarketos/mx140/mx140_bt.hcf
|
||||||
|
install -Dm644 mx140_wlan.hcf \
|
||||||
|
"$pkgdir"/lib/firmware/postmarketos/mx140/mx140_wlan.hcf
|
||||||
|
install -Dm644 mx140_wlan_t.hcf \
|
||||||
|
"$pkgdir"/lib/firmware/postmarketos/mx140/mx140_wlan_t.hcf
|
||||||
|
}
|
||||||
|
|
||||||
|
sha512sums="
|
||||||
|
5e8ef3c92142263d0b8f3ec4c622aecb35bc6829ac5c0bfd96db6e84744b1215d0cdc3b2229b74fdc34a046eb13b9154c1aa8d5ec538dfdb981f3f4294047cce firmware-samsung-a30-084c25e4ec61e4609b80ed20c1b38891e977dc9b.tar.gz
|
||||||
|
"
|
53
device/testing/linux-samsung-a30/APKBUILD
Normal file
53
device/testing/linux-samsung-a30/APKBUILD
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
# Reference: <https://postmarketos.org/vendorkernel>
|
||||||
|
# Kernel config based on: arch/arm64/configs/pmos-a30_defconfig
|
||||||
|
|
||||||
|
pkgname=linux-samsung-a30
|
||||||
|
pkgver=4.4.177
|
||||||
|
pkgrel=0
|
||||||
|
pkgdesc="Samsung Galaxy A30 kernel fork"
|
||||||
|
arch="aarch64"
|
||||||
|
_carch="arm64"
|
||||||
|
_flavor="samsung-a30"
|
||||||
|
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="android_kernel_samsung_a30"
|
||||||
|
_commit="7fd21f627e6ff52676e13c8fe9a8a31adcf09a72"
|
||||||
|
_config="config-$_flavor.$arch"
|
||||||
|
source="
|
||||||
|
$pkgname-$_commit.tar.gz::https://github.com/Johnnyhandsome69/$_repository/archive/$_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="
|
||||||
|
20a349f0dd358b6cd251e1835d20f556274811ffda97c28441058be15331f89ca6fd34de3c846f057017dee35f81e82a49ad68df68f7f1e340215fadd8ba8eab linux-samsung-a30-7fd21f627e6ff52676e13c8fe9a8a31adcf09a72.tar.gz
|
||||||
|
055aa7acedfa3b21ad69144efc75f445b48b7e31debb27ec10c6ebcd18b7c5979027ca86ff107b88ec447c315ad8ade76836d2349e47ded2bd3587b53e93fd16 config-samsung-a30.aarch64
|
||||||
|
"
|
5173
device/testing/linux-samsung-a30/config-samsung-a30.aarch64
Normal file
5173
device/testing/linux-samsung-a30/config-samsung-a30.aarch64
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue