samsung-j1mini3g: new device (Samsung Galaxy J1 mini) (!533)

[ci:skip-build]: already built successfully in CI
This commit is contained in:
Dolphin von Chips 2019-07-30 19:41:58 +05:00 committed by Oliver Smith
parent c6896dd46a
commit 18d199c498
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
8 changed files with 3864 additions and 0 deletions

View file

@ -0,0 +1,26 @@
# Reference: <https://postmarketos.org/devicepkg>
pkgname="device-samsung-j1mini3g"
pkgdesc="Samsung Galaxy J1 mini"
pkgver=0.1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="armhf"
options="!check !archcheck"
depends="postmarketos-base linux-samsung-j1mini3g mkbootimg mesa-dri-swrast"
makedepends="devicepkg-dev"
source="deviceinfo
initfs-hook.sh
"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
}
sha512sums="b4f8b3f7381d98a3974551ee3b73734bbdbdba13663a279b42a5056bccb182f6f616e9d49c14b6a4526effea18fbf11596e2695781feca4f0be6af6859bc1253 deviceinfo
46c58ff11a1f6cecc3f450f462c9a2b01d2a651f933a796c8a9c2e72f5fba0a0fe876429b5e7dad2fbc64fb056150d56929cd932b39053bed64b389c825bac0d initfs-hook.sh"

View file

@ -0,0 +1,35 @@
# 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 J1 mini"
deviceinfo_manufacturer="Samsung"
deviceinfo_codename="samsung-j1mini3g"
deviceinfo_date="2016"
deviceinfo_dtb=""
deviceinfo_modules_initfs=""
deviceinfo_arch="armhf"
# Device related
deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
deviceinfo_screen_width="480"
deviceinfo_screen_height="800"
deviceinfo_dev_touchscreen="/dev/input/event2"
deviceinfo_dev_touchscreen_calibration=""
deviceinfo_dev_keyboard=""
# Bootloader related
deviceinfo_flash_method="heimdall-bootimg"
deviceinfo_kernel_cmdline="console=ttyS1,115200n8"
deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_qcdt="true"
deviceinfo_flash_offset_base="0x00000000"
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=""
deviceinfo_flash_heimdall_partition_system=""

View file

@ -0,0 +1,5 @@
#!/bin/sh
# enable display
echo 0 0 > /sys/class/graphics/fb0/pan
echo 0 0 > /sys/class/graphics/fb0/pan

View file

@ -0,0 +1,75 @@
# Reference: <https://postmarketos.org/vendorkernel>
# Kernel config based on: arch/arm/configs/lineage_j1mini3g_defconfig
pkgname="linux-samsung-j1mini3g"
pkgver=3.10.106
pkgrel=0
pkgdesc="Samsung Galaxy J1 mini kernel fork"
arch="armhf"
_carch="arm"
_flavor="samsung-j1mini3g"
url="https://kernel.org"
license="GPL-2.0-only"
options="!strip !check !tracedeps"
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev dtbtool"
# Compiler: latest GCC from Alpine
HOSTCC="${CC:-gcc}"
HOSTCC="${HOSTCC#${CROSS_COMPILE}}"
# Source
_repository="android_kernel_samsung_j1mini3g"
_commit="6a377f7c43a84b578df39300dcce9fb9cb387a21"
_config="config-${_flavor}.${arch}"
source="
$pkgname-$_commit.tar.gz::https://github.com/IKGapirov/${_repository}/archive/${_commit}.tar.gz
$_config
gcc7-give-up-on-ilog2-const-optimizations.patch
gcc8-fix-put-user.patch
fix-dts.patch
"
builddir="$srcdir/${_repository}-${_commit}"
prepare() {
default_prepare
downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC"
}
build() {
unset LDFLAGS
make ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
# Generate master DTB (deviceinfo_bootimg_qcdt)
dtbTool -s 2048 -p "scripts/dtc/" -o "arch/arm/boot/dt.img" "arch/arm/boot/"
}
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
# Master DTB (deviceinfo_bootimg_qcdt)
install -Dm644 "$builddir/arch/arm/boot/dt.img" \
"$pkgdir/boot/dt.img"
}
sha512sums="f1686df6ee6e1f24c6460295c830b67b2146ab5b34ead2291fa92c3f83ba12884db875b0c6e31ff305ff64a82636648ee237c13f09c99e158449457285352388 linux-samsung-j1mini3g-6a377f7c43a84b578df39300dcce9fb9cb387a21.tar.gz
6828c7c82b11f98bfc185b50c186922ca555026a2c648cfd460a5262f879e278f32aa467b8bdfdca2827d7f0c8fc9342a859b105fa76ea9345ff640b2064cd26 config-samsung-j1mini3g.armhf
77eba606a71eafb36c32e9c5fe5e77f5e4746caac292440d9fb720763d766074a964db1c12bc76fe583c5d1a5c864219c59941f5e53adad182dbc70bf2bc14a7 gcc7-give-up-on-ilog2-const-optimizations.patch
197d40a214ada87fcb2dfc0ae4911704b9a93354b75179cd6b4aadbb627a37ec262cf516921c84a8b1806809b70a7b440cdc8310a4a55fca5d2c0baa988e3967 gcc8-fix-put-user.patch
a4c04f8f0bd70ab8090faf08fe17592fe275a6be6d5a052f3dc3405062b8d11f08aba637d2ca5cecefcfecf64738a1e1704042ef747ecbef845579dba9b43b5d fix-dts.patch"

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,53 @@
This patch fixed 'No valid dts found' error.
diff --git a/arch/arm/boot/dts/sprd-scx20_j1mini3g_r00.dts b/arch/arm/boot/dts/sprd-scx20_j1mini3g_r00.dts
index e87c172f..38f95e69 100644
--- a/arch/arm/boot/dts/sprd-scx20_j1mini3g_r00.dts
+++ b/arch/arm/boot/dts/sprd-scx20_j1mini3g_r00.dts
@@ -33,7 +33,7 @@
/ {
model = "Spreadtrum SP8835EB board";
compatible = "sprd,sp8835eb";
- sprd,sc-id = <8830 0 0x20000>;
+ qcom,msm-id = <8830 0 0x20000>;
#address-cells = <1>;
#size-cells = <1>;
interrupt-parent = <&gic>;
diff --git a/arch/arm/boot/dts/sprd-scx20_j1mini3g_r01.dts b/arch/arm/boot/dts/sprd-scx20_j1mini3g_r01.dts
index 55a729d0..caff8fe9 100644
--- a/arch/arm/boot/dts/sprd-scx20_j1mini3g_r01.dts
+++ b/arch/arm/boot/dts/sprd-scx20_j1mini3g_r01.dts
@@ -33,7 +33,7 @@
/ {
model = "Spreadtrum SP8835EB board";
compatible = "sprd,sp8835eb";
- sprd,sc-id = <8830 1 0x20000>;
+ qcom,msm-id = <8830 1 0x20000>;
#address-cells = <1>;
#size-cells = <1>;
interrupt-parent = <&gic>;
diff --git a/arch/arm/boot/dts/sprd-scx20_j1mini3g_r02.dts b/arch/arm/boot/dts/sprd-scx20_j1mini3g_r02.dts
index 8d8ad48a..73c28dba 100644
--- a/arch/arm/boot/dts/sprd-scx20_j1mini3g_r02.dts
+++ b/arch/arm/boot/dts/sprd-scx20_j1mini3g_r02.dts
@@ -33,7 +33,7 @@
/ {
model = "Spreadtrum SP8835EB board";
compatible = "sprd,sp8835eb";
- sprd,sc-id = <8830 2 0x20000>;
+ qcom,msm-id = <8830 2 0x20000>;
#address-cells = <1>;
#size-cells = <1>;
interrupt-parent = <&gic>;
diff --git a/arch/arm/boot/dts/sprd-scx20_j1mini3g_r03.dts b/arch/arm/boot/dts/sprd-scx20_j1mini3g_r03.dts
index 9690db02..becf5503 100644
--- a/arch/arm/boot/dts/sprd-scx20_j1mini3g_r03.dts
+++ b/arch/arm/boot/dts/sprd-scx20_j1mini3g_r03.dts
@@ -33,7 +33,7 @@
/ {
model = "Spreadtrum SP8835EB board";
compatible = "sprd,sp8835eb";
- sprd,sc-id = <8830 3 0x20000>;
+ qcom,msm-id = <8830 3 0x20000>;
#address-cells = <1>;
#size-cells = <1>;
interrupt-parent = <&gic>;

View file

@ -0,0 +1 @@
../../.shared-patches/linux/gcc7-give-up-on-ilog2-const-optimizations.patch

View file

@ -0,0 +1 @@
../../.shared-patches/linux/gcc8-fix-put-user.patch