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

Update build environment #54

Open
7 of 8 tasks
Jalle19 opened this issue Feb 14, 2023 · 15 comments
Open
7 of 8 tasks

Update build environment #54

Jalle19 opened this issue Feb 14, 2023 · 15 comments
Assignees

Comments

@Jalle19
Copy link
Owner

Jalle19 commented Feb 14, 2023

The STLinux 2.4 devkit is no longer available (archive.stlinux.com), so the base Docker image this project uses (https://github.com/Jalle19/docker-centos7-stlinux24) can no longer be built. This is a liability.

Things needed:

  • New base Docker image (debian:stretch-slim for now)
  • Make kernel compile with newer GCC
  • Make libssl-dev usable when cross-compiling (missing <openssl/opensslconf.h>)
  • Update nano and mtd-utils so they compile with newer toolchain
  • (optional) compile zlib
  • Port tools/do_min_fs.py to Python 3
  • Port tools/do_min_fs.py to work with a Debian-based build system
  • Update minisatip to at least v1.2.51 (first commit that doesn't depend on libssl-dev when compiled with DISABLE_DVBCA)
@estimadarocha
Copy link

Any solution?

@Jalle19
Copy link
Owner Author

Jalle19 commented Feb 14, 2023

I'm working on it

@Jalle19
Copy link
Owner Author

Jalle19 commented Feb 14, 2023

Building with GCC 10 (the default cross-compiler for SH4 available in Debian Bullseye) fails, so that will need updating as well:

Failed: -Wl,--start-group  -lm  -Wl,--end-group
Output of:
/usr/bin/sh4-linux-gnu-gcc -Wall -Wshadow -Wwrite-strings -Wundef -Wstrict-prototypes -Wunused -Wunused-parameter -Wunused-function -Wunused-value -Wmissing-prototypes -Wmissing-declarations -Wno-format-security -Wdeclaration-after-statement -Wold-style-definition -fno-builtin-strlen -finline-limit=0 -fomit-frame-pointer -ffunction-sections -fdata-sections -fno-guess-branch-probability -funsigned-char -static-libgcc -falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1 -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-builtin-printf -Os -o busybox_unstripped -Wl,--sort-common -Wl,--sort-section,alignment -Wl,--gc-sections -Wl,--start-group applets/built-in.o archival/lib.a archival/libarchive/lib.a console-tools/lib.a coreutils/lib.a coreutils/libcoreutils/lib.a debianutils/lib.a e2fsprogs/lib.a editors/lib.a findutils/lib.a init/lib.a libbb/lib.a libpwdgrp/lib.a loginutils/lib.a mailutils/lib.a miscutils/lib.a modutils/lib.a networking/lib.a networking/libiproute/lib.a networking/udhcp/lib.a printutils/lib.a procps/lib.a runit/lib.a selinux/lib.a shell/lib.a sysklogd/lib.a util-linux/lib.a util-linux/volume_id/lib.a archival/built-in.o archival/libarchive/built-in.o console-tools/built-in.o coreutils/built-in.o coreutils/libcoreutils/built-in.o debianutils/built-in.o e2fsprogs/built-in.o editors/built-in.o findutils/built-in.o init/built-in.o libbb/built-in.o libpwdgrp/built-in.o loginutils/built-in.o mailutils/built-in.o miscutils/built-in.o modutils/built-in.o networking/built-in.o networking/libiproute/built-in.o networking/udhcp/built-in.o printutils/built-in.o procps/built-in.o runit/built-in.o selinux/built-in.o shell/built-in.o sysklogd/built-in.o util-linux/built-in.o util-linux/volume_id/built-in.o -Wl,--end-group -Wl,--start-group -lm -Wl,--end-group
==========
/usr/lib/gcc-cross/sh4-linux-gnu/10/../../../../sh4-linux-gnu/bin/ld: debianutils/lib.a(mktemp.o): in function `mktemp_main':
mktemp.c:(.text.mktemp_main+0xdc): warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'
/usr/lib/gcc-cross/sh4-linux-gnu/10/../../../../sh4-linux-gnu/bin/ld: util-linux/lib.a(rdate.o): in function `rdate_main':
rdate.c:(.text.rdate_main+0x120): undefined reference to `stime'
/usr/lib/gcc-cross/sh4-linux-gnu/10/../../../../sh4-linux-gnu/bin/ld: coreutils/lib.a(date.o): in function `date_main':
date.c:(.text.date_main+0x2d4): undefined reference to `stime'
collect2: error: ld returned 1 exit status
Note: if build needs additional libraries, put them in CONFIG_EXTRA_LDLIBS.
Example: CONFIG_EXTRA_LDLIBS="pthread dl tirpc audit pam"
make[1]: *** [Makefile:717: busybox_unstripped] Error 1
make[1]: Leaving directory '/build/apps/busybox-1.26.2'
make: *** [Makefile:348: apps/busybox-1.26.2/busybox] Error 2
make: *** [Makefile:97: docker-release] Error 2

@Jalle19
Copy link
Owner Author

Jalle19 commented Feb 17, 2023

Made some progress today after being stuck on a Debian bug for a few days. Seems like cross-compilation only works in Stretch, not newer versions. That's still years fresher than the STLinux 2.4 disitribution though.

Some packages need updates in order to compile, but so far no major blockers.

@estimadarocha
Copy link

So will we have a new kernel???

@Jalle19
Copy link
Owner Author

Jalle19 commented Feb 18, 2023

No

@Jalle19 Jalle19 self-assigned this Feb 18, 2023
@Jalle19
Copy link
Owner Author

Jalle19 commented Feb 19, 2023

Got everything to build, but can't assemble the final root filesystem since we don't have the various SH4 compiled .rpm packages available anymore...

It seems like the only sane option is to completely rewrite the build system with Buildroot, however that's no easy task either.

@estimadarocha
Copy link

@Jalle19 you discovered why the last versiosn were not working and you had to revert to v1.2.12?

@Jalle19
Copy link
Owner Author

Jalle19 commented Apr 17, 2023

Not really, I wanted to get a new official build out without worrying about minisatip. Let me know if there's a newer version that definitively works!

@estimadarocha
Copy link

the last time i tested at least for me when trying to pull pids = all it was a subscription error it was 8191 and not 8192! but i think @catalinii solve it.

@Jalle19
Copy link
Owner Author

Jalle19 commented May 31, 2023

Will need to make a custom Docker image that has the SH4 toolchain and at least libssl (needed for oscam), zlib (needed for Dropbear) and ncurses (needed for nano). After that it should be possible to drastically simplify do_min_fs.py and be able to move off the current build environment conpletely.

I dabbled with buildroot and got the kernel and base image built, but it was quite the hassle and too unfamiliar for now.

@Jalle19
Copy link
Owner Author

Jalle19 commented Jun 29, 2023

Getting the kernel to compile with GCC 8 turned out to be quite the chore. The bundled version in this repository just wouldn't compile no matter what, but the latest upstream 2.6.32.71 version compiled nicely after some obligatory patches.

@Jalle19
Copy link
Owner Author

Jalle19 commented Jul 4, 2024

Some progress made in https://github.com/Jalle19/satip-axe/tree/external-kernel, will need to set up serial access to one of my devices so I can debug the image and get it to run.

@estimadarocha
Copy link

@Jalle19 any plans for new release??

@Jalle19
Copy link
Owner Author

Jalle19 commented Aug 10, 2024

Not at the moment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants