kobo-nia: new device (MR 5062)

This only support revision A, but nothing dangerous is expected
if run on revision C.
This commit is contained in:
Andreas Kemnade 2023-05-09 21:28:34 +02:00 committed by Anton Bambura
parent 4889ea583d
commit c44ba04184
No known key found for this signature in database
GPG key ID: 1441EAFE8D7F4C2D
5 changed files with 112 additions and 0 deletions

View file

@ -0,0 +1,33 @@
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-kobo-nia
pkgdesc="Kobo Nia"
pkgver=1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="armv7"
options="!check !archcheck"
depends="
linux-kobo-clara-mainline
kobo-epdc-extractor
postmarketos-base
u-boot-kobo-nia
"
makedepends="devicepkg-dev"
source="
deviceinfo
modules-initfs
"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
}
sha512sums="
2b9fc664aca8686e215ffde3deeca3b2d9d167d9d0fd9109333fae7ae3a1beb6759bed6d2bb3d9aa822ac50477505158db710317e756ecd7295356f622972d19 deviceinfo
4f38f2805647406ff8114833aed585048f1d1412844c645b7fc9813acba7d4149db400ec942d293aee8f090f8369c295bad4d418c28563a33b41340102ff0263 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 Nia"
deviceinfo_manufacturer="Kobo"
deviceinfo_codename="kobo-nia"
deviceinfo_year="2020"
deviceinfo_arch="armv7"
deviceinfo_dtb="imx6ull-kobo-nia"
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="1024"
deviceinfo_screen_height="758"
# 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-nia/u-boot.imx:2"

View file

@ -0,0 +1,4 @@
sy7636-core
sy7636-regulator
sy7636-hwmon
mxc_epdc_drm

View file

@ -0,0 +1,40 @@
# Reference: <https://postmarketos.org/devicepkg>
pkgname=u-boot-kobo-nia
pkgver=2023.10
pkgrel=0
pkgdesc="U-Boot for Kobo Nia"
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="4518da106aae1a8ce97d8ca41c248b79fcec63ed"
source="
$pkgname-$_commit.tar.gz::https://github.com/akemnade/$_repository/archive/$_commit.tar.gz
"
builddir="$srcdir/$_repository-$_commit"
build() {
make ARCH="$_carch" mx6ullnia_defconfig
make ARCH="$_carch" DEVICE_TREE=imx6ull-kobo-nia
scripts/config --set-str BOOTCOMMAND "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-nia/u-boot.imx"
}
sha512sums="
664c2780aad4ae86e411fe71a8d0e0cf98ca7ef98c3daed9e20b4e88e930bb3f0ca2073052d0481338505c29e7641c0fa54efb320398acf7f659c57193fcd7e7 u-boot-kobo-nia-4518da106aae1a8ce97d8ca41c248b79fcec63ed.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-nia/u-boot.imx bs=512 seek=2 of="$DEV"
fi