From 6ac736b23027af2a6e456d4829013749e7bc1cdd Mon Sep 17 00:00:00 2001 From: Newbyte Date: Sun, 26 Sep 2021 17:26:56 +0200 Subject: [PATCH] samsung-m3: new device (MR 2556) --- device/testing/device-samsung-m3/APKBUILD | 37 +++++++++++++++++++ .../device-samsung-m3.post-install | 7 ++++ device/testing/device-samsung-m3/deviceinfo | 36 ++++++++++++++++++ 3 files changed, 80 insertions(+) create mode 100644 device/testing/device-samsung-m3/APKBUILD create mode 100644 device/testing/device-samsung-m3/device-samsung-m3.post-install create mode 100644 device/testing/device-samsung-m3/deviceinfo diff --git a/device/testing/device-samsung-m3/APKBUILD b/device/testing/device-samsung-m3/APKBUILD new file mode 100644 index 000000000..beb0581b2 --- /dev/null +++ b/device/testing/device-samsung-m3/APKBUILD @@ -0,0 +1,37 @@ +# Reference: +pkgname=device-samsung-m3 +pkgdesc="Samsung Galaxy S III LTE" +pkgver=3 +pkgrel=0 +url="https://postmarketos.org" +license="MIT" +arch="armv7" +options="!check !archcheck" +depends=" + linux-postmarketos-exynos4 + mesa-dri-gallium + mkbootimg + postmarketos-base + " +makedepends="devicepkg-dev" +install="$pkgname.post-install" +subpackages="$pkgname-nonfree-firmware:nonfree_firmware" +source="deviceinfo" + +build() { + devicepkg_build $startdir $pkgname +} + +package() { + devicepkg_package $startdir $pkgname +} + +nonfree_firmware() { + pkgdesc="WiFi firmware" + depends="firmware-samsung-m0-mainline" + mkdir "$subpkgdir" +} + +sha512sums=" +d2ed2eedd223854766121058273a3a90b1672dbb95d0072b56100c01196cbe5ee96049c3b646b9b2f60af1254743ef4c4006e6275f407d582ec012e7bd383f71 deviceinfo +" diff --git a/device/testing/device-samsung-m3/device-samsung-m3.post-install b/device/testing/device-samsung-m3/device-samsung-m3.post-install new file mode 100644 index 000000000..19f768c2f --- /dev/null +++ b/device/testing/device-samsung-m3/device-samsung-m3.post-install @@ -0,0 +1,7 @@ +#!/bin/sh + +# Create mount point and /efs mount point in fstab +if [ -z "$(grep /efs /etc/fstab)" ]; then + mkdir -p /efs + echo "/dev/mmcblk0p1 /efs noauto ro 0 0" >> /etc/fstab +fi diff --git a/device/testing/device-samsung-m3/deviceinfo b/device/testing/device-samsung-m3/deviceinfo new file mode 100644 index 000000000..54be5a66b --- /dev/null +++ b/device/testing/device-samsung-m3/deviceinfo @@ -0,0 +1,36 @@ +# Reference: +# Please use double quotes only. You can source this file in shell scripts. + +deviceinfo_format_version="0" +deviceinfo_name="Samsung Galaxy S III LTE" +deviceinfo_manufacturer="Samsung" +deviceinfo_codename="samsung-m3" +deviceinfo_year="2012" +deviceinfo_append_dtb="true" +deviceinfo_dtb="exynos4412-i9305" +deviceinfo_arch="armv7" + +# Device related +deviceinfo_gpu_accelerated="true" +deviceinfo_chassis="handset" +deviceinfo_keyboard="false" +deviceinfo_external_storage="true" +deviceinfo_screen_width="720" +deviceinfo_screen_height="1280" + +# Bootloader related +deviceinfo_flash_method="heimdall-bootimg" +deviceinfo_kernel_cmdline_downstream="console=ttySAC2,115200 buildvariant=userdebug" +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" + +# Heimdall related +deviceinfo_flash_heimdall_partition_kernel="BOOT"