device-odroid-hc2: switch to linux-edge (MR 3378)

ODROID HC2 is based upon the Samsung Exynos 5422 and can run full
mainline. Switch to linux-edge from Alpine to enable this and drop
the close-to-mainline fork for this device. The close-to-mainline
fork was already linux-edge for a while but with a separate KConfig.
These KConfig changes are now integrated in linux-edge of Alpine.

U-boot script was updated to handle vmlinuz-edge as well since
Alpine's linux-edge does not generate a vmlinuz file, but vmlinuz-edge.
Probably to allow installing linux-lts as well.

initcall_blacklist=exynos_drm_init was added to the kernel cmdline
because upstream wants to set CONFIG_DRM_EXYNOS=y instead of module.
The DRM subsystem of Exynos5 in the kernel seems to be broken for this
device. There's also no use for it since this device does not have video
out. See https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/38094
This commit is contained in:
Dylan Van Assche 2022-08-21 14:01:56 +02:00 committed by Newbyte
parent fb3b854976
commit 7d72743b1f
No known key found for this signature in database
GPG key ID: 5873C171C9429CFA
5 changed files with 16 additions and 6092 deletions

View file

@ -3,13 +3,13 @@
pkgname=device-odroid-hc2 pkgname=device-odroid-hc2
pkgdesc="ODROID HC2" pkgdesc="ODROID HC2"
pkgver=0.6 pkgver=0.7
pkgrel=0 pkgrel=0
url="https://postmarketos.org" url="https://postmarketos.org"
license="MIT" license="MIT"
arch="armv7" arch="armv7"
options="!check !archcheck" options="!check !archcheck"
depends="linux-odroid-hc2 depends="linux-edge
postmarketos-base postmarketos-base
u-boot-odroid u-boot-odroid
u-boot-tools u-boot-tools
@ -50,11 +50,11 @@ tools() {
depends="rsync e2fsprogs-extra" depends="rsync e2fsprogs-extra"
mkdir "$subpkgdir" mkdir "$subpkgdir"
install -Dm744 "$srcdir"/install-rootfs-hdd.sh \ install -Dm744 "$srcdir"/install-rootfs-hdd.sh \
"$pkgdir"/usr/bin/install-rootfs-hdd "$subpkgdir"/usr/bin/install-rootfs-hdd
} }
sha512sums=" sha512sums="
d02702884d47c2c6b98f1ec194fc3a11b2c6559d416c112d41ddecfbbd84f0706adfc72e13e9943f130e548d987aa7d151f4f416443d15b7dff2375d4d067144 deviceinfo 6c4be5c1d2ba17b6ab5e093a5bd649d35af5cb4e3412ddad4073ca48900bbb4e7d25233f043dc661c66df5a7b6790502f19477e2c3cab711ec4968514494314d deviceinfo
06239b979ad78cadc1bc764b8c6a2ce57c7f2a44456ba918e83ea7ae2846c983ec6cb8eea708540e7c4f3abe2a1ff942b8c8ae5e6d68dbc65a8f5c34942af49e uboot-script.cmd f3e7a39d53c072f4ae68fcca241f88b05939052ff1c9bd8d45b47d2b336f3c239689857051ff3c7a96caefd5c10d2e34d9b921c62f993f80faca2999eb7beab8 uboot-script.cmd
669a0561251f287f072c9c1fc37d89b49a47fc4a4e5134c9e6681750ae960e5827043166136b7d5b9ad52c931b060bdcb6d0b5335c2e9fdb4eefd82f131ded93 install-rootfs-hdd.sh 669a0561251f287f072c9c1fc37d89b49a47fc4a4e5134c9e6681750ae960e5827043166136b7d5b9ad52c931b060bdcb6d0b5335c2e9fdb4eefd82f131ded93 install-rootfs-hdd.sh
" "

View file

@ -14,7 +14,7 @@ deviceinfo_no_framebuffer="true"
deviceinfo_generate_legacy_uboot_initfs="true" deviceinfo_generate_legacy_uboot_initfs="true"
deviceinfo_getty="ttySAC2;115200" deviceinfo_getty="ttySAC2;115200"
deviceinfo_disable_dhcpd="true" deviceinfo_disable_dhcpd="true"
deviceinfo_modules_initfs="uas usb-storage scsi_mod sd_mod t10_pi" deviceinfo_modules_initfs="libata uas usb-storage scsi_mod sd_mod t10_pi dwc2 dwc3 dwc3-exynos ehci-hcd ehci-exynos ohci_hcd ohci-exynos configfs phy-exynos5-usbdrd phy-exynos-usb2 udc-core dw_mmc dw_mmc-exynos r8152 xhci-hcd xhci-plat-hcd s2mps11 clk-s2mps11 rtc-s5m sec-core sec-irq"
# Device related # Device related
deviceinfo_gpu_accelerated="true" deviceinfo_gpu_accelerated="true"

View file

@ -8,10 +8,17 @@ setenv dtb_file "exynos5422-odroidhc1.dtb"
printenv printenv
echo Setting bootargs echo Setting bootargs
setenv bootargs init=/init.sh rw console=tty0 console=ttySAC2,115200 panic=10 consoleblank=0 loglevel=9 cma=256M PMOS_NO_OUTPUT_REDIRECT PMOS_FORCE_PARTITION_RESIZE setenv bootargs init=/init.sh rw console=tty0 console=ttySAC2,115200 panic=10 consoleblank=0 loglevel=9 cma=256M initcall_blacklist=exynos_drm_init PMOS_NO_OUTPUT_REDIRECT PMOS_FORCE_PARTITION_RESIZE
echo Loading Kernel if test -e mmc ${mmcbootdev}:${mmcbootpart} ${kernel_image}; then
load mmc ${mmcbootdev}:${mmcbootpart} ${kernel_addr_r} ${kernel_image} echo Loading Kernel: vmlinuz
load mmc ${mmcbootdev}:${mmcbootpart} ${kernel_addr_r} ${kernel_image};
fi
if test -e mmc ${mmcbootdev}:${mmcbootpart} ${kernel_image}-edge; then
echo Loading Kernel: vmlinuz-edge
load mmc ${mmcbootdev}:${mmcbootpart} ${kernel_addr_r} ${kernel_image}-edge
fi
echo Loading Initramfs echo Loading Initramfs
load mmc ${mmcbootdev}:${mmcbootpart} ${initrd_addr_r} ${initrd_image} load mmc ${mmcbootdev}:${mmcbootpart} ${initrd_addr_r} ${initrd_image}

View file

@ -1,77 +0,0 @@
# Reference: <https://postmarketos.org/vendorkernel>
# Kernel config based on: arch/arm/configs/odroidxu4_defconfig
# Maintainer: Dylan Van Assche <me@dylanvanassche.be>
pkgname=linux-odroid-hc2
pkgver=5.18.1
pkgrel=0
pkgdesc="ODROID XU3/XU4/HC1/HC2/MC1 kernel fork"
arch="armv7"
_carch="arm"
_flavor="odroid-hc2"
url="https://kernel.org"
license="GPL-2.0-only"
options="!strip !check !tracedeps pmb:cross-native pmb:kconfigcheck-nftables"
makedepends="
bison
devicepkg-dev
findutils
flex
gmp-dev
installkernel
mpc1-dev
mpfr-dev
openssl-dev
perl
rsync
xz
linux-headers
"
# Source
_config="config-$_flavor.$arch"
_pkgname="linux"
source="
$_pkgname-$pkgver.tar.xz::https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-$pkgver.tar.xz
$_config
"
subpackages="$pkgname-dev"
builddir="$srcdir/$_pkgname-$pkgver"
prepare() {
default_prepare
REPLACE_GCCH=0 \
. downstreamkernel_prepare
}
build() {
unset LDFLAGS
make ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
}
package() {
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" "$_outdir"
make modules_install dtbs_install \
ARCH="$_carch" \
INSTALL_MOD_STRIP=1 \
INSTALL_MOD_PATH="$pkgdir" \
INSTALL_DTBS_PATH="$pkgdir/usr/share/dtb"
}
dev() {
provides="linux-headers"
replaces="linux-headers"
cd $builddir
# https://github.com/torvalds/linux/blob/master/Documentation/kbuild/headers_install.rst
make -j1 headers_install \
ARCH="$_carch" \
INSTALL_HDR_PATH="$subpkgdir"/usr
}
sha512sums="
1d3f676403b7f21c6790cac568e9655f95012c250a7d0f35cb8223c8a36ce561b414a25cd85be6892607facb617247d4983f4be426388dd6c6817991a6da928d linux-5.18.1.tar.xz
22d641b681dffd5348076e8dc095d3a1b402bc496e05156356d0be7a77b8e7a270a66dedc1d6197320806740508589d359ea7335859972f4cadd9ebf1d81212d config-odroid-hc2.armv7
"

File diff suppressed because it is too large Load diff