fabianishere / udm-kernel-tools

Tools for bootstrapping custom kernels on the UniFi Dream Machine
GNU General Public License v2.0
330 stars 23 forks source link

Add build for 1.12.21 #70

Closed gatesry closed 2 years ago

gatesry commented 2 years ago

Testing this build out on your workflow. Had some issues with the initial build process, but not sure if that's a show stopper.

gatesry commented 2 years ago

Hello again!

So I attempted to update the kernel tool for the newest version. However, when following the Maintenance guide and running

debuild -uc -us -aarm64 --lintian-opts --profile debian

I get this

dh_auto_build --sourcedirectory=kexec-mod/user
        cd kexec-mod/user && make -j4 "INSTALL=install --strip-program=true" PKG_CONFIG=aarch64-linux-gnu-pkg-config CXX=aarch64-linux-gnu-g\+\+ CC=aarch64-linux-gnu-gcc
make[2]: Entering directory '/home/rgates/udm-kernel-tools/kexec-mod/user'
aarch64-linux-gnu-gcc -g -O2 -fdebug-prefix-map=/home/rgates/udm-kernel-tools=. -fstack-protector-strong -Wformat -Werror=format-security -shared -fpic -o redir.so redir.c
In file included from /usr/include/sys/ioctl.h:26,
                 from redir.c:5:
/usr/include/bits/ioctls.h:23:10: fatal error: asm/ioctls.h: No such file or directory
   23 | #include <asm/ioctls.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [Makefile:8: redir.so] Error 1
make[2]: Leaving directory '/home/rgates/udm-kernel-tools/kexec-mod/user'
dh_auto_build: error: cd kexec-mod/user && make -j4 "INSTALL=install --strip-program=true" PKG_CONFIG=aarch64-linux-gnu-pkg-config CXX=aarch64-linux-gnu-g\+\+ CC=aarch64-linux-gnu-gcc returned exit code 2
make[1]: *** [debian/rules:35: override_dh_auto_build] Error 25
make[1]: Leaving directory '/home/rgates/udm-kernel-tools'
make: *** [debian/rules:29: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
debuild: fatal error at line 1182:
dpkg-buildpackage -us -uc -ui -aarm64 failed

Which causes the package to probably not work correctly.

root@ubnt:/# apt install ./udm-kernel-tools_1.1.4_arm64.deb
Reading package lists... Error!
E: Sub-process Popen returned an error code (2)
E: Encountered a section with no Package: header
E: Problem with MergeList /udm-kernel-tools_1.1.4_arm64.deb
E: The package lists or status file could not be parsed or opened.
fabianishere commented 2 years ago

It is likely that you are missing some package that provides asm/ioctls.h, given that the CI build does succeed.

gatesry commented 2 years ago

I've tried building this on three different hosts. Ubuntu focal & jammy, and Debian. I think it has something to do with the gcc-aarch64-linux-gnu compiler, but I'm a little bit over my skies. Let me know if you have any suggestions.

fabianishere commented 2 years ago

Could you check whether you have installed linux-libc-dev-arm64-cross?

gatesry commented 2 years ago

Closing for now, as I messed up my fork. Will be re-forking and trying this again.

gatesry commented 2 years ago

@fabianishere - I was able to get the build working correctly on Ubuntu 18.04. However upon loading the correct FW config and pushing it to a GH runner, the .deb file is still not installing correctly on the UDMP. Could I forward you the config file for you to try building?

fabianishere commented 2 years ago

@gatesry What do you mean by not installing correctly? What error does it give?

gatesry commented 2 years ago

Upon running apt install on the generated deb file, I get the following

root@ubnt:/# apt install ./udm-kernel-tools_1.1.4_arm64.deb
Reading package lists... Error!
E: Sub-process Popen returned an error code (2)
E: Encountered a section with no Package: header
E: Problem with MergeList /udm-kernel-tools_1.1.4_arm64.deb
E: The package lists or status file could not be parsed or opened.

My source code is located here

fabianishere commented 2 years ago

Have you tried downloading the artifacts associated with your Github Actions build: https://github.com/gatesry/udm-kernel-tools/actions/runs/2368048220

gatesry commented 2 years ago

Correct, downloaded and unzipped the artifact, uploaded https://github.com/gatesry/udm-lab/blob/main/udm-kernel-tools_1.1.4_arm64.deb to my repo and wget it over to the UDM.