Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a kobov5 target #1943

Merged
merged 6 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 43 additions & 2 deletions Makefile.defs
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ else ifeq ($(TARGET), kindle)
#Use the generic linaro TC for debugging
CHOST?=arm-linux-gnueabi
endif
GLIBC_VERSION_MAX = 2.12
else ifeq ($(TARGET), kindlepw2)
KINDLE=1
HAS_KINDLEPW2_TC:=$(shell command -v arm-kindlepw2-linux-gnueabi-gcc 2> /dev/null)
Expand All @@ -145,6 +146,7 @@ else ifeq ($(TARGET), kindlehf)
else
CHOST?=arm-linux-gnueabihf
endif
GLIBC_VERSION_MAX = 2.20
else ifeq ($(TARGET), kindle-legacy)
KINDLE=1
CHOST?=arm-kindle-linux-gnueabi
Expand All @@ -160,6 +162,26 @@ else ifeq ($(TARGET), kobo)
endif
USE_LJ_WPACLIENT=1
GLIBC_VERSION_MAX = 2.15
else ifeq ($(TARGET), kobov4)
KOBO=1
HAS_KOBOV4_TC:=$(shell command -v arm-kobov4-linux-gnueabihf-gcc 2> /dev/null)
ifdef HAS_KOBOV4_TC
CHOST?=arm-kobov4-linux-gnueabihf
else
CHOST?=arm-linux-gnueabihf
endif
USE_LJ_WPACLIENT=1
GLIBC_VERSION_MAX = 2.19
else ifeq ($(TARGET), kobov5)
KOBO=1
HAS_KOBOV5_TC:=$(shell command -v arm-kobov5-linux-gnueabihf-gcc 2> /dev/null)
ifdef HAS_KOBOV5_TC
CHOST?=arm-kobov5-linux-gnueabihf
else
CHOST?=arm-linux-gnueabihf
endif
USE_LJ_WPACLIENT=1
GLIBC_VERSION_MAX = 2.35
else ifeq ($(TARGET), ubuntu-touch)
CHOST?=arm-linux-gnueabihf
SDL=1
Expand Down Expand Up @@ -423,8 +445,12 @@ ARMV7_GENERIC_ARCH:=-march=armv7-a -mtune=generic-armv7-a -mfpu=vfpv3 -mthumb
ARM64_GENERIC_ARCH:=-march=armv8-a
# Cortex A8 (K4, Kindle Touch, PW1, Kobos since the Touch)
ARMV7_A8_ARCH:=-march=armv7-a -mtune=cortex-a8 -mfpu=neon -mthumb
# Cortex A9 (Kindle PW2)
# Cortex A9 (e.g., Kindle PW2)
ARMV7_A9_ARCH:=-march=armv7-a -mtune=cortex-a9 -mfpu=neon -mthumb
# Cortex A7 (e.g., Kobo Sage & Elipsa)
ARMV7_A7_ARCH:=-march=armv7-a -mtune=cortex-a7 -mfpu=neon -mthumb
# Cortex A53 (MTK SoCs on an armv7 software stack)
ARMV7_A53_ARCH:=-march=armv7-a -mtune=cortex-a53 -mfpu=neon -mthumb
# Mirror the NDK's armeabi-v7a APP_ABI (cf. #201)
ifeq ($(ANDROID_ARCH), arm)
ANDROID_ARM_ARCH:=-march=armv7-a -mfpu=vfpv3-d16
Expand Down Expand Up @@ -456,6 +482,20 @@ ifeq ($(TARGET), kobo)
COMPAT_CFLAGS:=$(UBUNTU_COMPAT_CFLAGS)
COMPAT_CXXFLAGS:=$(UBUNTU_COMPAT_CFLAGS)
endif
else ifeq ($(TARGET), kobov4)
ARM_ARCH:=$(ARMV7_A9_ARCH)
ARM_ARCH+=-mfloat-abi=hard
ifeq ($(TARGET_MACHINE), arm-linux-gnueabihf)
COMPAT_CFLAGS:=$(UBUNTU_COMPAT_CFLAGS)
COMPAT_CXXFLAGS:=$(UBUNTU_COMPAT_CFLAGS)
endif
else ifeq ($(TARGET), kobov5)
ARM_ARCH:=$(ARMV7_A53_ARCH)
ARM_ARCH+=-mfloat-abi=hard
ifeq ($(TARGET_MACHINE), arm-linux-gnueabihf)
COMPAT_CFLAGS:=$(UBUNTU_COMPAT_CFLAGS)
COMPAT_CXXFLAGS:=$(UBUNTU_COMPAT_CFLAGS)
endif
else ifeq ($(TARGET), ubuntu-touch)
ARM_ARCH:=$(ARMV7_A8_ARCH)
ARM_ARCH+=-mfloat-abi=hard
Expand Down Expand Up @@ -489,7 +529,8 @@ else ifeq ($(TARGET), kindlepw2)
COMPAT_CXXFLAGS:=$(UBUNTU_COMPAT_CFLAGS)
endif
else ifeq ($(TARGET), kindlehf)
ARM_ARCH:=$(ARMV7_A9_ARCH)
# We bias towards in-order CPUs (e.g., A53)
ARM_ARCH:=$(ARMV7_A7_ARCH)
ARM_ARCH+=-mfloat-abi=hard
ifeq ($(TARGET_MACHINE), arm-linux-gnueabihf)
COMPAT_CFLAGS:=$(UBUNTU_COMPAT_CFLAGS)
Expand Down
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,17 @@ Follow these steps:
* automatically fetch thirdparty sources with Makefile:
* make sure you have `patch`, `wget`, `unzip`, `git` and `svn` installed
* run `make fetchthirdparty`.
* run `make TARGET=kindlehf` For kindle models running fw >= 5.16.3 (Paperwhite 4 and later)
* run `make TARGET=kindlehf` For kindle models running FW >= 5.16.3 (Paperwhite 4 and later)

* run `make TARGET=kindlepw2` For Kindle models >= Paperwhite 2.
* or run `make TARGET=kindlepw2` For Kindle models >= Paperwhite 2.

* run `make TARGET=kindle` For Kindle models >= Kindle 4 < Paperwhite 2.
* or run `make TARGET=kindle` For Kindle models >= Kindle 4 < Paperwhite 2.

* run `make TARGET=kindle-legacy` for Kindle DXG/2/3 devices.
* or run `make TARGET=kindle-legacy` for Kindle DXG/2/3 devices.

* or run `make TARGET=kobov5` for Kobo/Tolino devices runing FW >= 5.x

* or run `make TARGET=kobov4` for Mk.7 & up Kobo devices running FW 4.x

* or run `make TARGET=kobo` for Kobo devices.

Expand Down
2 changes: 1 addition & 1 deletion thirdparty/fbink/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ else()
endif()

external_project(
DOWNLOAD GIT 48ba071e41803bd3924d6156dedb10e467c4bdf1
DOWNLOAD GIT 21cce1029a6f4de2048e98d7bf2fff81c3852e60
https://github.com/NiLuJe/FBInk.git
BUILD_COMMAND ${BUILD_CMD}
INSTALL_COMMAND ${INSTALL_CMD}
Expand Down
2 changes: 1 addition & 1 deletion thirdparty/kobo-usbms/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ endif()
append_install_commands(INSTALL_CMD ${CMAKE_BUILD_TYPE}/KoboUSBMS.tar.gz DESTINATION data)

external_project(
DOWNLOAD GIT cf994cca555eac242121b32ff57fe863e6249661
DOWNLOAD GIT 3c14b5421968ecd688715ff258d43197817d29a1
https://github.com/koreader/KoboUSBMS.git
BUILD_COMMAND ${BUILD_CMD}
INSTALL_COMMAND ${INSTALL_CMD}
Expand Down
2 changes: 1 addition & 1 deletion thirdparty/luajit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ endif()
append_tree_install_commands(INSTALL_CMD src/jit jit)

external_project(
DOWNLOAD GIT f725e44cda8f359869bf8f92ce71787ddca45618
DOWNLOAD GIT 87ae18af97fd4de790bb6c476b212e047689cc93
https://github.com/LuaJIT/LuaJIT
PATCH_FILES ${PATCH_FILES}
PATCH_COMMAND ${PATCH_CMD}
Expand Down