ats
ats copied to clipboard
Building on Fedora 32 aarch64 - rockpro64
I recently installed Fedora 32 on my RockPro64 and wanted ats.
There are few issues getting this to work.
- packages
dnf install lua lua-devel lua-libs lua-luv lua-luv-devel -y
- include file location
- Either symlink to the system folder, or modify the Makefile
-
ln -s /usr/include/lua-5.3 /usr/include/lua5.3
-
IDIR := /usr/include/lua-5.3
-
- Makefile
- DEPS is just
lua
on F32 notlua5.3
- includes in the .c files ats.c debug.c
-#include <lua5.3/lauxlib.h>
-#include <lua5.3/lualib.h>
+#include <lua.h>
+#include <lauxlib.h>
+#include <lualib.h>
- Installation location of
ats.so
- modify LDIR in Makefile
-
LDIR := /usr/lib64/lua/5.3/
-
- PWM_CTL path is different than on debian/other systems.
-
/sys/devices/platform/pwm-fan/hwmon/hwmon2/pwm1
diff --git a/Makefile b/Makefile index e5cc94c..994329f 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,13 @@
Lua-dev Dependencies Related
-DEPS := lua5.3 +DEPS := lua ifeq ($(MAKECMDGOALS),) MAKECMDGOALS := all endif ifeq ($(MAKECMDGOALS), all)
Lua-dev header PATHs
-IDIR := /usr/include/lua5.3 +IDIR := /usr/include/lua-5.3 ifeq (,$(wildcard $(IDIR)/.)) $(error Lua Include Folder: $(IDIR), NOT Detected, ABORTING..) endif @@ -86,7 +86,7 @@ endif ifeq ($(MAKECMDGOALS),install) # Shared Library Module ifndef LDIR -LDIR := /usr/local/lib/lua/5.3 +LDIR := /usr/lib64/lua/5.3/ endif
ATS Binary
ifndef BINDIR diff --git a/src/ats.c b/src/ats.c index f568bc8..9d6710d 100644 --- a/src/ats.c +++ b/src/ats.c @@ -13,9 +13,9 @@ #include <math.h>
/* LuaC */ -#include <lua5.3/lua.h> -#include <lua5.3/lauxlib.h> -#include <lua5.3/lualib.h> +#include <lua.h> +#include <lauxlib.h> +#include <lualib.h>
#include "../include/debug.h" #include "../include/ats.h" diff --git a/src/debug.c b/src/debug.c index 60e1088..6bdd8c8 100644 --- a/src/debug.c +++ b/src/debug.c @@ -2,9 +2,9 @@ /* I/O */ #include <stdio.h>
-#include <lua5.3/lua.h> -#include <lua5.3/lauxlib.h> -#include <lua5.3/lualib.h> +#include <lua.h> +#include <lauxlib.h> +#include <lualib.h>
#include "../include/debug.h"
hello therevoman, yeah that is a problem indeed, to support different distros.. I had tested it on Debian at the time,
To solve that, I would need substitute directories names, and change the C header/source file.. its possible to do, I just need to find a simple way to do it, and have some time, to implement it so that in runtime everything will be parsed to the correct symbols for each distro supported..
Ya. I stopped using Fedora because it intentionally disables PCIe. If I come back around to it I'll help you with the work.