-
Notifications
You must be signed in to change notification settings - Fork 104
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
generic linux package #1504
generic linux package #1504
Conversation
@pazos Was this ready to be merged? It looks sane enough to me. Also pinging @benoit-pierre |
Makefile.defs
Outdated
ifeq ($(LINUX_ARCH), arm) | ||
CHOST?=arm-linux-gnueabihf | ||
export LINUX_CROSS=1 | ||
else ifeq ($(LINUX_ARCH), arm64) | ||
CHOST?=aarch64-linux-gnu | ||
export LINUX_CROSS=1 | ||
else | ||
export LINUX=1 | ||
export EMULATE_READER=1 | ||
endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DEBIAN_CROSS
was never used anywhere, and neither is LINUX_CROSS
, so I'd would get rid of it.
Additionally, I would not export LINUX
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps it once was in koreader/koreader#9351? But it doesn't seem to be now in any case, so +1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 to remove the CROSS
thingies.
The LINUX
thingy is used in front to differenciate between "releases" and emulator builds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but there's still no need to export to the environment for it to be available in the front Makefile
(AFAIK the only user).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I didn't know. Based on that I guess we don't need to export MACOS
either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You still need to set it, just not with the export
keyword (which adds the variable to the environment):
ifeq ($(LINUX_ARCH), arm)
CHOST?=arm-linux-gnueabihf
else ifeq ($(LINUX_ARCH), arm64)
CHOST?=aarch64-linux-gnu
else
LINUX=1
export EMULATE_READER=1
endif
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And you're right, MACOS
does not need to be exported either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You still need to set it, just not with the
export
keyword (which adds the variable to the environment):ifeq ($(LINUX_ARCH), arm) CHOST?=arm-linux-gnueabihf else ifeq ($(LINUX_ARCH), arm64) CHOST?=aarch64-linux-gnu else LINUX=1 export EMULATE_READER=1 endif
lol 😄
Now everything makes sense again :)
Fix for turbo LUA files permissions: thirdparty/turbo/CMakeLists.txt | 3 +++
1 file changed, 3 insertions(+)
diff --git i/thirdparty/turbo/CMakeLists.txt w/thirdparty/turbo/CMakeLists.txt
index c99f07d5..61e4f48d 100644
--- i/thirdparty/turbo/CMakeLists.txt
+++ w/thirdparty/turbo/CMakeLists.txt
@@ -10,6 +10,9 @@ assert_var_defined(LDFLAGS)
ep_get_source_dir(SOURCE_DIR)
+# Some of the LUA files are executables for no good reason.
+list(APPEND PATCH_CMD COMMAND chmod a-x turbo/platform.lua turbo/socket_ffi.lua turbo/syscall.lua)
+
set(BUILD_CMD ${KO_MAKE_RECURSIVE} "CC=${CC}" "CFLAGS=${CFLAGS}" "LDFLAGS=${LDFLAGS}" all)
# Drop duplicate cdefs, make sure turbo find its libtffi_wrap library, and pull in upstream fixes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, any remaining comments @benoit-pierre ?
LGTM. |
Relates to #9268 Requires koreader/koreader-base#1504 Usage: - `kodev release linux` for native package (same arch as host) - `LINUX_ARCH=arm release linux` for armhf on a x86_64 host. - `LINUX_ARCH=arm64 release linux` for arm64 on a x86_64 host. It produces a `koreader-linux-$ARCH-$VERSION.tar.xz` archive, where $ARCH follows `uname -m` convention {x86_64, armv7l, aarch64} To generate the debian package from the generic archive the following command is required `./platform/linux/do_debian_package.sh path_to.tar.xz`
remove soft-float arm32 variant
use
LINUX_ARCH
for cross compilation (supported arearm
andarm64
)if
LINUX_ARCH
is notarm
orarm64
we assume native compilation. It should work fine on all of the supported targets but only was tested against a 64 bit host.This change is![Reviewable](https://camo.githubusercontent.com/23b05f5fb48215c989e92cc44cf6512512d083132bd3daf689867c8d9d386888/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)