kobo-clara2e: new device (MR 5202)

For now, limited support without graphics. Graphics
support would need messing and detecting board variants.

especially since Rev B seems to need a vcom setting per batch.

[ci:skip-build]: already built successfully in CI
This commit is contained in:
Andreas Kemnade 2024-06-04 19:27:44 +02:00 committed by Pablo Correa Gómez
parent c5ca6732a0
commit e0382da4f7
No known key found for this signature in database
GPG key ID: 7A342565FF635F79
5 changed files with 115 additions and 0 deletions

View file

@ -0,0 +1,39 @@
# Maintainer: Andreas Kemnade <andreas@kemnade.info>
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-kobo-clara2e
pkgdesc="Kobo Clara 2E"
pkgver=1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="armv7"
options="!check !archcheck"
depends="
linux-postmarketos-imx-ereader
kobo-epdc-extractor
postmarketos-base
u-boot-kobo-clara2e
"
_pmb_recommends="
linux-firmware-mrvl
linux-firmware-nxp
"
makedepends="devicepkg-dev"
source="
deviceinfo
modules-initfs
"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
}
sha512sums="
57a6c9fbf96f3adeb64462a859226fa846a0b1344667cf1b143f79e0c736b18be6be16d26856b48a77a819c7beb6fd6255fcceb57b1010a870aef369e2a21f10 deviceinfo
90da9f4f7833af6286c7dad81c5601bb2e35f814f501d02d9e37a80f35c453ae8b8a5c49ed36fcb5b35eef1d81280679a82ef80a60b4bca373a33b0b8f881511 modules-initfs
"

View file

@ -0,0 +1,29 @@
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell
# scripts.
deviceinfo_format_version="0"
deviceinfo_name="Kobo Clara 2E"
deviceinfo_manufacturer="Kobo"
deviceinfo_codename="kobo-clara2e"
deviceinfo_year="2022"
deviceinfo_arch="armv7"
deviceinfo_dtb="imx6sll-kobo-clara2e-a"
deviceinfo_kernel_cmdline="console=ttymxc0,115200"
deviceinfo_generate_extlinux_config="true"
# Device related
deviceinfo_chassis="tablet"
deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
deviceinfo_screen_width="1072"
deviceinfo_screen_height="1448"
# Bootloader related
deviceinfo_flash_method="none"
deviceinfo_boot_part_start="49152"
deviceinfo_getty="ttymxc0;115200"
deviceinfo_no_framebuffer="true"
deviceinfo_sd_embed_firmware_step_size="512"
deviceinfo_sd_embed_firmware="u-boot/kobo-clara2e/u-boot.imx:2"

View file

@ -0,0 +1 @@
mxc_epdc_drm

View file

@ -0,0 +1,40 @@
# Maintainer: Andreas Kemnade <andreas@kemnade.info>
# Reference: <https://postmarketos.org/devicepkg>
pkgname=u-boot-kobo-clara2e
pkgver=2023.10
pkgrel=0
pkgdesc="U-Boot for Kobo Clara 2E"
arch="armv7"
_carch="arm"
license="GPL-2.0"
url="https://github.com/akemnade/u-boot-fslc"
makedepends="bash bc dtc bison flex openssl-dev"
options="!check !tracedeps pmb:cross-native"
install="$pkgname.post-upgrade"
_repository="u-boot-fslc"
_commit="1f55e1ef7b1ac1e0cdb1375e787f287c33599220"
source="
$pkgname-$_commit.tar.gz::https://github.com/akemnade/$_repository/archive/$_commit.tar.gz
"
builddir="$srcdir/$_repository-$_commit"
build() {
make ARCH="$_carch" mx6sllclara2e_defconfig
scripts/config --set-str BOOTCOMMAND "run detect_clara2erev ; run distro_bootcmd ; fastboot 0"
scripts/config -e ENV_IS_IN_EXT4
scripts/config -d ENV_IS_IN_MMC
scripts/config --set-str ENV_EXT4_INTERFACE "mmc"
scripts/config --set-str ENV_EXT4_DEVICE_AND_PART "0:1"
scripts/config --set-str ENV_EXT4_FILE "/uboot.env"
make ARCH="$_carch"
}
package() {
install -Dm644 "$builddir/u-boot-dtb.imx" "$pkgdir/usr/share/u-boot/kobo-clara2e/u-boot.imx"
}
sha512sums="
23247e23a0fc6991d23c88724b2c85840aa5dd99c0e48aa7f1aeeba0f45fb049f9801fca06df3136d47a8c708e93f1eb761a005d4f6016e09a29f603ecca40f9 u-boot-kobo-clara2e-1f55e1ef7b1ac1e0cdb1375e787f287c33599220.tar.gz
"

View file

@ -0,0 +1,6 @@
#!/bin/sh
DEV=`mount | sed -n -E 's:.*(/dev/mmcblk[0-9])p[0-9] on /boot .*:\1:p'`
if [ -n "$DEV" ] ; then
dd if=/usr/share/u-boot/kobo-clara2e/u-boot.imx bs=512 seek=2 of="$DEV"
fi