Skip to content
Snippets Groups Projects
Commit abc41c6a authored by Andreas Kemnade's avatar Andreas Kemnade
Browse files

device-kobo-clara: split out downstream build as unmaintained

Near-mainline kernel is feature-complete since quite some time, so lets
use that as a default also to simplify boot process, since downstream kernel
depends on various blobs loaded into memory by the bootloader.
Get rid of quirks required in boot process for mainline kernels
also by using a near-mainline u-boot.
Keep Downstream kernel to be able to optimize/compare EPD operation
parent 937c1a87
No related branches found
No related tags found
No related merge requests found
Showing
with 144 additions and 61 deletions
# Maintainer: Andreas Kemnade <andreas@kemnade.info>
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-kobo-clara
pkgdesc="Kobo Clara HD"
pkgver=0.7
pkgrel=3
pkgrel=4
url="https://postmarketos.org"
license="MIT"
arch="armv7"
options="!check !archcheck"
depends="
linux-kobo-clara-mainline
kobo-epdc-extractor
perl
postmarketos-base
......@@ -15,16 +17,11 @@ depends="
u-boot-tools
"
makedepends="devicepkg-dev"
subpackages="
$pkgname-kernel-downstream:kernel_downstream
$pkgname-kernel-mainline:kernel_mainline
$pkgname-nonfree-firmware:nonfree_firmware
"
source="
deviceinfo
modules-initfs.mainline
uboot-script-downstream.cmd
uboot-script-mainline.cmd
modules-initfs
uboot-script.cmd
"
build() {
......@@ -33,37 +30,13 @@ build() {
package() {
devicepkg_package $startdir $pkgname
}
kernel_downstream() {
pkgdesc="Downstream kernel"
depends="linux-kobo-clara"
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
mkimage -A arm -O linux -T script -n postmarketOS \
-d "$srcdir"/uboot-script-downstream.cmd "$srcdir/boot-downstream.scr"
install -Dm644 "$srcdir/boot-downstream.scr" "$subpkgdir/boot/boot.scr"
}
kernel_mainline() {
pkgdesc="Close to mainline kernel"
depends="linux-kobo-clara-mainline"
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
mkimage -A arm -O linux -T script -n postmarketOS \
-d "$srcdir/uboot-script-mainline.cmd" "$srcdir/boot-mainline.scr"
install -Dm644 "$srcdir/boot-mainline.scr" "$subpkgdir/boot/boot.scr"
}
nonfree_firmware() {
pkgdesc="Kobo Clara HD firmware"
depends="firmware-kobo-clara"
mkdir "$subpkgdir"
-d "$srcdir/uboot-script.cmd" "$srcdir/boot.scr"
install -Dm644 "$srcdir/boot.scr" "$pkgdir/boot/boot.scr"
}
sha512sums="
bdc2528bd09f164870a368caf0b06a6c816b883536c3033384060bcf480ddf987daf38db4b523406e1e591f9cea86c9bb97276d88ebc3b05e2ae6bb53adb4ba8 deviceinfo
5d53ee902538e53c4fe79eaef8e3800b9d3f73ec70d2a9887ddb11a6715ca76ce17128e3c02c2b6f2f575fb86f15c2415c24466d4b1a031f7a346d0db186dcb1 modules-initfs.mainline
4bfc2714a2670efc451860bd97d36ba12559e00aed41afdde1ac3e01b41458390358ac7f6bc96a6dee6be6a34f534da52d845b02df0566b25f4868774ef69b1d uboot-script-downstream.cmd
9f624e90df6bc6acbd6db03d4319a778443b270e5756a2bc78002df8da19d23a3ea652f3d8da15257552a7381646b83553f794d24f6ef31479d3a16af9ae5e0b uboot-script-mainline.cmd
c1eb7552f3163a6a48b699a6c99010914b75fd84b36b1d1a4ffb83d19cc1bbc3355bbe9b1a568ea2a6c2d0e4a87c4a22b7330c454c215b8f8b1edb2b2bac170d deviceinfo
5d53ee902538e53c4fe79eaef8e3800b9d3f73ec70d2a9887ddb11a6715ca76ce17128e3c02c2b6f2f575fb86f15c2415c24466d4b1a031f7a346d0db186dcb1 modules-initfs
7bd9c0aa73b67520b8563b9d4453acafa29adcfed1575d96aea3b0d2e2023cbe9cd7d252b97786efb920a6f05e17a913079353ba481428f16c97d82b42051a2c uboot-script.cmd
"
......@@ -8,8 +8,7 @@ deviceinfo_manufacturer="Kobo"
deviceinfo_codename="kobo-clara"
deviceinfo_year="2018"
deviceinfo_arch="armv7"
deviceinfo_dtb_downstream="imx6sll-e60k02"
deviceinfo_dtb_mainline="imx6sll-kobo-clarahd"
deviceinfo_dtb="imx6sll-kobo-clarahd"
# Device related
deviceinfo_chassis="tablet"
......@@ -26,5 +25,4 @@ deviceinfo_generate_legacy_uboot_initfs="true"
deviceinfo_no_framebuffer="true"
deviceinfo_sd_embed_firmware_step_size="512"
deviceinfo_sd_embed_firmware_downstream="u-boot/kobo-clara/u-boot.imx:2,firmware/kobo-clara/hwcfg+header.bin:1023,firmware/kobo-clara/ntxfw-E60K00+header.bin:1029,u-boot/kobo-clara/u-boot-env.bin:1536"
deviceinfo_sd_embed_firmware_mainline="u-boot/kobo-clara/u-boot.imx:2,firmware/kobo-clara/hwcfg+header.bin:1023,u-boot/kobo-clara/u-boot-env.bin:1536"
deviceinfo_sd_embed_firmware="u-boot/kobo-clara/u-boot.imx:2,u-boot/kobo-clara/u-boot-env.bin:1536"
setenv bootargs console=ttymxc0,115200
# This must be called first, otherwise bootz does not work correctly.
# The actual kernel is loaded over this below.
load_ntxkernel
echo Loading kernel
load mmc 0:1 0x80800000 vmlinuz
......
# Maintainer: Andreas Kemnade <andreas@kemnade.info>
# Reference: <https://postmarketos.org/devicepkg>
pkgname=u-boot-kobo-clara
pkgver=2016.03
pkgver=2020.10
pkgrel=0
pkgdesc="U-Boot for Kobo Clara HD"
arch="armv7"
_carch="arm"
license="GPL-2.0"
url="https://github.com/pmsourcedump/kobo_clara_uboot"
options="!check"
url="https://github.com/akemnade/u-boot-fslc"
makedepends="$depends_dev bc dtc bison flex"
options="!check !tracedeps pmb:cross-native"
_repository="kobo_clara_uboot"
_commit="5af329fef886e21b777426d7bf5c6162e2317de7"
_repository="u-boot-fslc"
_commit="fcf25705fc8b57cb22c81b2d352e9a06269911be"
source="
$pkgname-$_commit.tar.gz::https://github.com/pmsourcedump/$_repository/archive/$_commit.tar.gz
$pkgname-$_commit.tar.gz::https://github.com/akemnade/$_repository/archive/$_commit.tar.gz
u-boot-env.txt
"
builddir="$srcdir/$_repository-$_commit"
build() {
make ARCH="$_carch" mx6sll_ntx_lpddr2_512m_config
make ARCH="$_carch" mx6sllclarahd_defconfig
make ARCH="$_carch"
tools/mkenvimage -p 0 -s 8192 -o u-boot-env.bin "$srcdir/u-boot-env.txt"
}
package() {
install -D -m644 "$builddir/u-boot.bin" "$pkgdir/usr/share/u-boot/kobo-clara/u-boot.bin"
install -D -m644 "$builddir/u-boot.imx" "$pkgdir/usr/share/u-boot/kobo-clara/u-boot.imx"
install -D -m644 "$builddir/u-boot-dtb.imx" "$pkgdir/usr/share/u-boot/kobo-clara/u-boot.imx"
install -D -m644 "$builddir/u-boot-env.bin" "$pkgdir/usr/share/u-boot/kobo-clara/u-boot-env.bin"
}
sha512sums="
1712f5a922b44a8b80e49e00969f0948cd62864adedfb419d9d2f6ccf765b432f8632787f7c6d1502ec0aa6afb7b27bf4193733c2345ff4a0378b43b5b10643a u-boot-kobo-clara-5af329fef886e21b777426d7bf5c6162e2317de7.tar.gz
43c006f8198ac61e5c73dd4a2d583c5ab1da76b76492be9bee385096bdf33e3a42c8058707e8c2f61342faae152ba57f5046909d9ed403f74589d6604f77eb0d u-boot-env.txt
6a9c3f5d2ad806ab9529f0c8fc19213098aae620c5bf34e5cc273453bf007266a674489deff18ffa82e8826280192dbc443b024a3f878836021ae6c062be4189 u-boot-kobo-clara-fcf25705fc8b57cb22c81b2d352e9a06269911be.tar.gz
ca8237a86da93dfea62355cfbb8dbe4104c2f3aea71b4c36d5418e6aef6ead32e9d23e4731b8ff64b4a73ca563b0323087384de10d4946afd657dce4cc7c6fee u-boot-env.txt
"
# Load actual boot script from the boot partition
bootcmd=load mmc 0:1 0x80800000 boot.scr ; source
bootcmd=load mmc 0:1 0x80800000 boot.scr ; source 0x80800000
# Unmaintained: Downstream port, maybe useful for EPDC performance improvement
# needs special userspace to show up anything
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-kobo-clara-downstream
pkgdesc="Kobo Clara HD downstream"
pkgver=0.1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="armv7"
options="!check !archcheck"
depends="
postmarketos-base
u-boot-kobo-clara-downstream
u-boot-tools
linux-kobo-clara-downstream
"
makedepends="devicepkg-dev"
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
source="
deviceinfo
uboot-script-downstream.cmd
"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
mkimage -A arm -O linux -T script -n postmarketOS \
-d "$srcdir"/uboot-script-downstream.cmd "$srcdir/boot-downstream.scr"
install -Dm644 "$srcdir/boot-downstream.scr" "$pkgdir/boot/boot.scr"
}
nonfree_firmware() {
pkgdesc="Kobo Clara HD firmware"
depends="firmware-kobo-clara-downstream"
mkdir "$subpkgdir"
}
sha512sums="
84b9e5385b7fd77af6891b31d7e95ec424645f741d54168d3d38f6f703071d622829d9f7cf5a29136bf6eb9ec5b2a50a05efe76ddc3e047bb4a69e197fbfde24 deviceinfo
4bfc2714a2670efc451860bd97d36ba12559e00aed41afdde1ac3e01b41458390358ac7f6bc96a6dee6be6a34f534da52d845b02df0566b25f4868774ef69b1d uboot-script-downstream.cmd
"
# 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 HD"
deviceinfo_manufacturer="Kobo"
deviceinfo_codename="kobo-clara-downstream"
deviceinfo_year="2018"
deviceinfo_arch="armv7"
deviceinfo_dtb="imx6sll-e60k02"
# 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_generate_legacy_uboot_initfs="true"
deviceinfo_no_framebuffer="true"
deviceinfo_sd_embed_firmware_step_size="512"
deviceinfo_sd_embed_firmware="u-boot/kobo-clara/u-boot.imx:2,firmware/kobo-clara/hwcfg+header.bin:1023,firmware/kobo-clara/ntxfw-E60K00+header.bin:1029,u-boot/kobo-clara/u-boot-env.bin:1536"
pkgname=firmware-kobo-clara
# Unmaintained: not needed by mainline kernel, describes only the hardware
pkgname=firmware-kobo-clara-downstream
pkgver=4.26.16704
pkgrel=0
pkgrel=1
pkgdesc="Kobo Clara firmware"
url="https://wiki.mobileread.com/wiki/Kobo_Firmware_Releases"
arch="armv7"
......
# Unmaintained: Mainline kernel is mature, only interesting for EPDC optimization
# Reference: <https://postmarketos.org/vendorkernel>
# Kernel config based on: arch/arm/configs/imx_v7_kobo_defconfig
pkgname=linux-kobo-clara
pkgname=linux-kobo-clara-downstream
pkgver=4.1.15
pkgrel=4
pkgdesc="Kobo Clara HD kernel fork"
......
# Unmaintained: does weird things, not needed for mainline kernels
# Reference: <https://postmarketos.org/devicepkg>
pkgname=u-boot-kobo-clara-downstream
pkgver=2016.03
pkgrel=0
pkgdesc="U-Boot for Kobo Clara HD"
arch="armv7"
_carch="arm"
license="GPL-2.0"
url="https://github.com/pmsourcedump/kobo_clara_uboot"
options="!check"
_repository="kobo_clara_uboot"
_commit="5af329fef886e21b777426d7bf5c6162e2317de7"
source="
$pkgname-$_commit.tar.gz::https://github.com/pmsourcedump/$_repository/archive/$_commit.tar.gz
u-boot-env.txt
"
builddir="$srcdir/$_repository-$_commit"
build() {
make ARCH="$_carch" mx6sll_ntx_lpddr2_512m_config
make ARCH="$_carch"
tools/mkenvimage -p 0 -s 8192 -o u-boot-env.bin "$srcdir/u-boot-env.txt"
}
package() {
install -D -m644 "$builddir/u-boot.bin" "$pkgdir/usr/share/u-boot/kobo-clara/u-boot.bin"
install -D -m644 "$builddir/u-boot.imx" "$pkgdir/usr/share/u-boot/kobo-clara/u-boot.imx"
install -D -m644 "$builddir/u-boot-env.bin" "$pkgdir/usr/share/u-boot/kobo-clara/u-boot-env.bin"
}
sha512sums="
1712f5a922b44a8b80e49e00969f0948cd62864adedfb419d9d2f6ccf765b432f8632787f7c6d1502ec0aa6afb7b27bf4193733c2345ff4a0378b43b5b10643a u-boot-kobo-clara-5af329fef886e21b777426d7bf5c6162e2317de7.tar.gz
43c006f8198ac61e5c73dd4a2d583c5ab1da76b76492be9bee385096bdf33e3a42c8058707e8c2f61342faae152ba57f5046909d9ed403f74589d6604f77eb0d u-boot-env.txt
"
# Load actual boot script from the boot partition
bootcmd=load mmc 0:1 0x80800000 boot.scr ; source
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment