From a6584e312d7d6c78e4ee93afaecfb9f609b99196 Mon Sep 17 00:00:00 2001 From: NiLuJe Date: Sat, 28 Sep 2024 21:15:11 +0200 Subject: [PATCH] Add kobov4 & kobov5 targets kobov4 exists solely because there's a dedicated TC for it, but we don't distribute binaries for it (it doesn't differ enough from kobo, and experience has taught us that this kind of split was not a great idea (e.g., kindle5 vs. kindlepw2)). kobov5 targets a massively updated userland, and requires further changes, including to the delivery mechanism, so it very much warrants a dedicated package (re: #12401) --- frontend/device/kobo/device.lua | 6 ++++++ kodev | 4 +++- make/kobo.mk | 4 ++-- make/kobov4.mk | 1 + make/kobov5.mk | 1 + 5 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 make/kobov4.mk create mode 100644 make/kobov5.mk diff --git a/frontend/device/kobo/device.lua b/frontend/device/kobo/device.lua index 701fd500a..2ab36fce4 100644 --- a/frontend/device/kobo/device.lua +++ b/frontend/device/kobo/device.lua @@ -978,6 +978,12 @@ function Kobo:init() self:toggleKeyRepeat(false) end + -- Switch to the proper packages on FW 5.x + -- NOTE: We don't distribute kobov4 binaries, the omission is on purpose. + if util.fileExists("/usr/bin/hwdetect.sh") then + self.ota_model = "kobov5" + end + -- Finally, Let Generic properly setup the standard stuff. -- (Of particular import, this needs to come *after* we've set our input hooks, so that the viewport translation runs last). Generic.init(self) diff --git a/kodev b/kodev index 571bf5b0a..80602c2a3 100755 --- a/kodev +++ b/kodev @@ -141,6 +141,8 @@ TARGET: kindlepw2 With compiler optimizations for Kindle models >= Paperwhite 2 kindle-legacy Needed only for Kindle2/3/DXG kobo + kobov4 Compatible with Mk.7+ Kobo devices on FW 4.x + kobov5 Compatible with all Kobo & Tolino devices on FW 5.x linux macos MacOS app bundle pocketbook @@ -174,7 +176,7 @@ function setup_target() { ;; cervantes) ;; kindle | kindlehf | kindlepw2 | kindle-legacy) ;; - kobo) ;; + kobo | kobov4 | kobov5) ;; pocketbook) ;; remarkable) ;; sony-prstux) ;; diff --git a/make/kobo.mk b/make/kobo.mk index 2965f9500..2bce8f0f1 100644 --- a/make/kobo.mk +++ b/make/kobo.mk @@ -1,6 +1,6 @@ KOBO_DIR = $(PLATFORM_DIR)/kobo -KOBO_PACKAGE = koreader-kobo$(KODEDUG_SUFFIX)-$(VERSION).zip -KOBO_PACKAGE_OTA = koreader-kobo$(KODEDUG_SUFFIX)-$(VERSION).targz +KOBO_PACKAGE = koreader-$(DIST)$(KODEDUG_SUFFIX)-$(VERSION).zip +KOBO_PACKAGE_OTA = koreader-$(DIST)$(KODEDUG_SUFFIX)-$(VERSION).targz update: all # ensure that the binaries were built for ARM diff --git a/make/kobov4.mk b/make/kobov4.mk new file mode 100644 index 000000000..bb2656ddd --- /dev/null +++ b/make/kobov4.mk @@ -0,0 +1 @@ +include make/kobo.mk diff --git a/make/kobov5.mk b/make/kobov5.mk new file mode 100644 index 000000000..bb2656ddd --- /dev/null +++ b/make/kobov5.mk @@ -0,0 +1 @@ +include make/kobo.mk