samsung-a6lte: WIP mainline support (MR 3925)
Currently display (simplefb), touchscreen, eMMC & SD card are working. [ci:skip-build]: already built successfully in CI
This commit is contained in:
parent
82c02ea325
commit
22a8c4a06a
|
@ -1,7 +1,7 @@
|
|||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname=device-samsung-a6lte
|
||||
pkgdesc="Samsung Galaxy A6 2018"
|
||||
pkgver=0.3
|
||||
pkgver=0.4
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
|
@ -9,11 +9,8 @@ arch="aarch64"
|
|||
options="!check !archcheck"
|
||||
depends="
|
||||
alsa-utils
|
||||
linux-samsung-a6lte
|
||||
mkbootimg
|
||||
msm-fb-refresher
|
||||
pipewire
|
||||
pipewire-pulse
|
||||
postmarketos-base
|
||||
samsungipcd
|
||||
util-linux
|
||||
|
@ -38,9 +35,14 @@ source="
|
|||
usr-share-alsa-ucm2-conf.d-Universal7870-I-VoiceCall.conf
|
||||
usr-share-pipewire-media-session.d-alsa-monitor.conf
|
||||
"
|
||||
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
|
||||
subpackages="
|
||||
$pkgname-kernel-downstream:kernel_downstream
|
||||
$pkgname-kernel-mainline:kernel_mainline
|
||||
$pkgname-nonfree-firmware:nonfree_firmware
|
||||
"
|
||||
|
||||
# pulseaudio does not seem to work on this device. Will use pipewire-pulse instead.
|
||||
# (For downstream kernel, mainline does not have audio yet and I'd like to run Phosh)
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
|
@ -60,6 +62,18 @@ package() {
|
|||
install -Dm644 usr-share-pipewire-media-session.d-alsa-monitor.conf "$pkgdir"/usr/share/pipewire/media-session.d/alsa-monitor.conf
|
||||
}
|
||||
|
||||
kernel_downstream() {
|
||||
pkgdesc="Working: display, touchscreen, wifi, audio, cellular"
|
||||
depends="linux-samsung-a6lte pipewire pipewire-pulse"
|
||||
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
|
||||
}
|
||||
|
||||
kernel_mainline() {
|
||||
pkgdesc="Close-to-mainline WIP (display and touchscreen works)"
|
||||
depends="linux-postmarketos-exynos7870"
|
||||
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
|
||||
}
|
||||
|
||||
nonfree_firmware() {
|
||||
pkgdesc="Wifi firmware"
|
||||
depends="firmware-samsung-a6lte"
|
||||
|
|
83
device/testing/linux-postmarketos-exynos7870/APKBUILD
Normal file
83
device/testing/linux-postmarketos-exynos7870/APKBUILD
Normal file
|
@ -0,0 +1,83 @@
|
|||
# Kernel config based on defconfig
|
||||
|
||||
pkgname=linux-postmarketos-exynos7870
|
||||
pkgver=6.2.1
|
||||
pkgrel=0
|
||||
pkgdesc="Close-to-mainline kernel for Samsung Galaxy A6 2018"
|
||||
arch="aarch64"
|
||||
_carch="arm64"
|
||||
_flavor="exynos7870"
|
||||
url="https://kernel.org"
|
||||
license="GPL-2.0-only"
|
||||
options="!strip !check !tracedeps pmb:cross-native"
|
||||
makedepends="
|
||||
bash
|
||||
bc
|
||||
bison
|
||||
dtbtool-exynos
|
||||
flex
|
||||
openssl-dev
|
||||
perl
|
||||
"
|
||||
|
||||
_patches_repo="https://gitlab.com/sleirsgoevy/a6lte-mainline"
|
||||
_patches_repo_commit="58a5a02739abf77adf62902c141d0383f7de7172"
|
||||
_config="config-$_flavor.aarch64"
|
||||
# Source
|
||||
source="
|
||||
linux-$pkgver.tar.gz::https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-$pkgver.tar.gz
|
||||
$_config
|
||||
patches-$_patches_repo_commit.tar.gz::$_patches_repo/-/archive/master/a6lte-mainline-$_patches_repo_commit.tar.gz
|
||||
"
|
||||
builddir="$srcdir/linux-$pkgver"
|
||||
_outdir="."
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
for i in "$srcdir"/a6lte-mainline-*/patches/*; do
|
||||
patch -p1 < "$i"
|
||||
done
|
||||
cp "$srcdir"/$_config .config
|
||||
}
|
||||
|
||||
build() {
|
||||
unset LDFLAGS
|
||||
make ARCH="$_carch" CC="${CC:-gcc}" \
|
||||
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
|
||||
|
||||
# Build out-of-tree devicetrees
|
||||
for i in "$srcdir/"a6lte-mainline-*/*.dts; do
|
||||
scripts/dtc/dtc "$i" -o "$_outdir/arch/$_carch/boot/dts/$(basename -s .dts "$i").dtb"
|
||||
done
|
||||
|
||||
# Master DTB (deviceinfo_bootimg_qcdt)
|
||||
dtbTool-exynos -o "$_outdir/arch/$_carch/boot"/dt.img \
|
||||
$(find "$_outdir/arch/$_carch/boot/dts/" -name 'exynos7870-*.dtb')
|
||||
}
|
||||
|
||||
package() {
|
||||
mkdir -p "$pkgdir/boot" "$pkgdir/lib/modules"
|
||||
|
||||
# The bootloader does not support zipped kernels
|
||||
make install modules_install \
|
||||
ARCH="$_carch" \
|
||||
INSTALL_PATH="$pkgdir"/boot \
|
||||
INSTALL_MOD_PATH="$pkgdir" \
|
||||
INSTALL_MOD_STRIP=1
|
||||
rm -f "$pkgdir"/lib/modules/*/build "$pkgdir"/lib/modules/*/source
|
||||
|
||||
install -D include/config/kernel.release \
|
||||
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
|
||||
|
||||
# Install dt.img
|
||||
install -Dm066 "$_outdir/arch/$_carch/boot/"dt.img "$pkgdir/boot/dt.img"
|
||||
|
||||
# Rename /boot/vmlinux-... to make postmarketos-mkinitfs happy
|
||||
mv "$pkgdir/boot/vmlinux-$pkgver" "$pkgdir/boot/vmlinuz-$pkgver"
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
d7e11f86b5daf09b9764fc710e3b49e2a2b5b4cd1c74ca3f009d396337f8c20cd3969d1c334bdf0e992acdd1d5c650474a11dddf473f3846e86c1a1649085ce4 linux-6.2.1.tar.gz
|
||||
4407a2606acc3a35019a45ed1c371543765ee89c865b80ba65791eff191f1401fd49cc7cfade385ffbb19b9dc9b7fb7d78751e796653be3c15b779db99d336a5 config-exynos7870.aarch64
|
||||
1819881ee8de1b2fc04dfb288bf131ad5998f6cf40d27ae523049a30b01a8edfd26df6970186b725a7ace03bf9bab28bbc26876b4932931259059d63df088de9 patches-58a5a02739abf77adf62902c141d0383f7de7172.tar.gz
|
||||
"
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user