toltec icon indicating copy to clipboard operation
toltec copied to clipboard

Bootstrap does not work on 3.6.0.1865 due to segmentation fault

Open ghost opened this issue 2 years ago • 15 comments

To Reproduce Steps to reproduce the behaviour:

  1. SSH into Remarkable 2
  2. Run Toltec installation command: wget http://toltec-dev.org/bootstrap echo "04a28483286f88c5c7f39e352afb62adc57f6162a29fd7e124d832205bb0980e bootstrap" | sha256sum -c && bash bootstrap
  3. Get the following error: INFO: Fetching secure wget INFO: Bootstrapping Opkg bootstrap: line 119: 400 Segmentation fault wget --no-verbose "$entware_remote/opkg" --output-document "$opkg_path" ERROR: Could not fetch opkg, make sure you have a stable Wi-Fi connection

Expected behaviour A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Device information (please complete the following information):

  • Device: Remarkable 2
  • OS version: 5.4.70-v1.3.4-rm11x

Additional context

The Wifi-connection of the RM2 is perfectly working, I was able to download Bootstrap.

ghost avatar Aug 28 '23 04:08 ghost

What is your OS version? You have only listed the kernel version. You can find your OS version in the settings menu.

Eeems avatar Aug 28 '23 07:08 Eeems

Version 3.6.0.1865

ghost avatar Aug 28 '23 15:08 ghost

Toltec does not support this version, please read the warning right before the installation instructions: https://toltec-dev.org/#install-toltec

You can find more information about why here: https://remarkable.guide/faqs.html#can-i-install-toltec-before-my-os-version-is-supported

Eeems avatar Aug 28 '23 15:08 Eeems

I've downgrade my Remarkable version and was able to install Toltec. Is it possible for me to install genie and iago and then remove toltec and upgrade again?

ghost avatar Aug 28 '23 19:08 ghost

I've downgrade my Remarkable version and was able to install Toltec. Is it possible for me to install genie and iago and then remove toltec and upgrade again?

You can downgrade/upgrade whenever you want. Uninstalling toltec will remove anything you installed with toltec.

Eeems avatar Aug 28 '23 19:08 Eeems

I see the exact same error on the reMarkable 1 with software version 3.6.0.1865.

dev-zero avatar Sep 02 '23 08:09 dev-zero

I see the exact same error on the reMarkable 1 with software version 3.6.0.1865.

Please read this message: https://github.com/toltec-dev/toltec/issues/731#issuecomment-1695923153

Eeems avatar Sep 02 '23 17:09 Eeems

@Eeems yes, I've noticed afterwards that the warning

⚠️ Warning: Toltec does not support OS builds newer than 2.15.1.1189.
You will soft-brick your device if you install before support is released.
See [remarkable2-recovery](https://github.com/ddvk/remarkable2-recovery) for information on how to recover your device if you have done this.

not only applies to the rM2 as one could understand from the last line, but is actually independent of the hardware.

dev-zero avatar Sep 07 '23 10:09 dev-zero

It clearly states

⚠️ Warning: Toltec does not support OS builds newer than 2.15.1.1189.

Specifying that toltec does not support it.

Jayy001 avatar Sep 13 '23 19:09 Jayy001

I've changed the link to be more generic in https://github.com/toltec-dev/web/commit/ae2a2df6e64aa27fd83c6438742d680c74d80701

Eeems avatar Sep 13 '23 21:09 Eeems

https://github.com/toltec-dev/toolchain/pull/27 will be needed to resolve this, which will probably require dropping support for older OS versions, or maintaining two different repositories for the different OS versions.

Eeems avatar Sep 13 '23 21:09 Eeems

I don't think this is a toolchain issue necessarily. The bootstrap wget is build with the oldest toolchain, so glibc being backwards compatible, it should just work. Looking at the crash, glibc has some issue with NSS:

--2023-11-07 21:55:51--  http://google.com/
Resolving google.com... 

Program received signal SIGSEGV, Segmentation fault.
0xb6b12a28 in __nss_readline () from /lib/libc.so.6

Looking online, it seems glibc uses dlopen to implement some of the NSS functions.

When I patch the bootsrap script to use a musl libc wget (from https://github.com/Azathothas/Static-Binaries/tree/main/wget), it finishes without issue. Installing some simple stuff like htop (entware) and 7zip (toltec) seems to work.

Also, not statically linking glibc into the bootstrap wget fixes the crash: https://github.com/toltec-dev/bootstrap/pull/2

timower avatar Nov 07 '23 22:11 timower

Installing some simple stuff like htop (entware) and 7zip (toltec) seems to work.

These run off of the entware libraries, so they would continue to work when OS library changes happen. I would expect there to be issues with packages in the toltec repositories.

Eeems avatar Nov 07 '23 23:11 Eeems

Installing some simple stuff like htop (entware) and 7zip (toltec) seems to work.

These run off of the entware libraries, so they would continue to work when OS library changes happen. I would expect there to be issues with packages in the toltec repositories.

Ah, I choose 7zip as it's packaged by toltec, but evtest also works. Of course there can be differences in stuff like Qt, but solving the bootstrap issue would be nice.

timower avatar Nov 08 '23 07:11 timower

The 7zip package is just using a prebuilt binary, so I assume it's mostly static compiled. evtest is using the toltec build system, so it would be using the OS libraries if it's linked against any. You are right, the Qt related items are more likely to be the problem though.

Eeems avatar Nov 08 '23 16:11 Eeems