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

linux-stracciatella: update sources to RM1XX_5.4.70_v1.3.4 and add wireguard #742

Merged
merged 8 commits into from
Nov 28, 2023

Conversation

Etn40ff
Copy link

@Etn40ff Etn40ff commented Sep 23, 2023

Synced upstream to tag RM1XX_5.4.70_v1.3.4.

Usb network is now usb1.

It seems to work on RM2 2.15.1.1189 without keyboard folio; it needs testing with 3.x and on RM1

EDIT: now we build also wireguard as a module

@Eeems Eeems added the packages Add or improve packages of the repository label Sep 23, 2023
@Etn40ff Etn40ff changed the title linux-stracciatella: update sources to RM1XX_5.4.70_v1.3.4 linux-stracciatella: update sources to RM1XX_5.4.70_v1.3.4 and add wireguard Sep 27, 2023
@Etn40ff
Copy link
Author

Etn40ff commented Sep 27, 2023

I just tested wg using #743 and the Demo Server available at https://www.wireguard.com/quickstart/#demo-server. Everything seems in order.

@Eeems Eeems added this to the 2023-W39 Merge Window milestone Oct 3, 2023
@Eeems
Copy link
Member

Eeems commented Oct 27, 2023

It seems to work on RM2 2.15.1.1189 without keyboard folio; it needs testing with 3.x and on RM1

No testing is currently needed for 3.x as toltec doesn't yet support it. Everything will be tested for 3.x as part of adding support for it.

@Eeems
Copy link
Member

Eeems commented Nov 27, 2023

I've been trying to test this on my rM1, but I'm unable to due to the root partition not having enough space to extract the kernel. It looks like the kernelctl archive for this is 11MB while the stock one is 4MB.

Upon inspecting the kernel package it appears that every single one of the .ko files are larger than the stock ones. Some of the worst offenders are:

  • kernel/net/wireless/cfg80211.ko - stock: 362kB, stracciatella: 6MB
  • kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko - stock: 283kB, stracciatella: 4.7MB
  • kernel/drivers/input/touchscreen/cyttsp5.ko - stock: 81kB, stracciatella: 722.4kB
  • kernel/drivers/net/wireless/broadcom/brcm80211/brcmutil/brcmutil.ko - stock: 11kB, stracciatella: 204.6kB
  • kernel/drivers/input/touchscreen/cyttsp5_loader.ko - stock: 15kB, stracciatella: 196kB
  • kernel/drivers/input/touchscreen/cyttsp5_i2c.ko - stock: 7kB, stracciatella: 171.6kB
  • kernel/crypto/aes_generic.ko - stock: 29kB, stracciatella: 139.5kB

I've already gone through the exercise of moving systemd-journald logs off of the root partition and into the home partition, so I'm not really sure what else would be reasonable to remove.

@Eeems
Copy link
Member

Eeems commented Nov 27, 2023

Adding INSTALL_MOD_STRIP=1 to strip the debug symbols would probably reduce the size to something closer to what the stock one has.

@Eeems
Copy link
Member

Eeems commented Nov 27, 2023

It does not seem to be happy about finding the correct strip executable. It might make more sense to just strip the ko files as a manual step before compressing them.

@Etn40ff
Copy link
Author

Etn40ff commented Nov 27, 2023

On my machine I get a weird error:
strip: Unable to recognise the format of the input file `/tmp/toltec/build/package/linux-stracciatella/rm1/src/staging/lib/modules/5.4.70/kernel/crypto/aes_generic.ko'
Is it complaining because of cross compilation?

@Eeems
Copy link
Member

Eeems commented Nov 27, 2023

On my machine I get a weird error: strip: Unable to recognise the format of the input file `/tmp/toltec/build/package/linux-stracciatella/rm1/src/staging/lib/modules/5.4.70/kernel/crypto/aes_generic.ko' Is it complaining because of cross compilation?

Correct, it's trying to use the x64 strip to strip an arm binary. I have a pending change that may fix it, but github is having issues atm.

@Etn40ff
Copy link
Author

Etn40ff commented Nov 27, 2023

It is still failing on my laptop:

$ make linux-stracciatella
./scripts/package_build.py  "linux-stracciatella"
The build directory 'build/package/linux-stracciatella' for recipe 'linux-stracciatella' already exists.
Would you like to [c]ancel, [r]emove that directory, or [k]eep it (not recommended)? [C/r/k] r
[    INFO] toltec.builder: linux-stracciatella [rm1]: Fetching source files
[    INFO] toltec.builder: linux-stracciatella [rm1]: Preparing source files
[    INFO] toltec.builder: linux-stracciatella [rm1]: Building artifacts
[    INFO] toltec.builder: linux-stracciatella [rm1] (linux-stracciatella): Packaging build artifacts
[    INFO] toltec.builder: linux-stracciatella [rm1] (linux-stracciatella): Only showing up to 50 lines of context. Use --verbose for the full output.
[   ERROR] toltec.builder: linux-stracciatella [rm1] (linux-stracciatella): make[1]: arm-remarkable-linux-gnueabihf-gcc: No such file or directory
[   ERROR] toltec.builder: linux-stracciatella [rm1] (linux-stracciatella): /bin/sh: line 1: arm-remarkable-linux-gnueabihf-strip: command not found
[   ERROR] toltec.builder: linux-stracciatella [rm1] (linux-stracciatella): make[2]: *** [scripts/Makefile.modinst:33: crypto/aes_generic.ko] Error 127
[   ERROR] toltec.builder: linux-stracciatella [rm1] (linux-stracciatella): make[1]: *** [Makefile:1354: _modinst_] Error 2
[   ERROR] toltec.builder: linux-stracciatella [rm1] (linux-stracciatella): package() failed

The path seems to be wrong

@Etn40ff
Copy link
Author

Etn40ff commented Nov 28, 2023

Is it possible that package() is not run in the docker image? I ran find / -iname \*-gcc and got a listing of the gcc's I have on my system.

@Eeems
Copy link
Member

Eeems commented Nov 28, 2023

Is it possible that package() is not run in the docker image? I ran find / -iname \*-gcc and got a listing of the gcc's I have on my system.

Ah, yes. That is the case as documented here: https://github.com/toltec-dev/toltec/blob/stable/docs/package.md#package-function

Since this is the case, I would recommend moving the make install to the build() method to a folder inside the srcdir, and then just copying that over as part of package(). It's a little odd that make install is where the strip is done.

@Etn40ff
Copy link
Author

Etn40ff commented Nov 28, 2023

I just realized that the config file they provided for rm1 has CONFIG_DEBUG_INFO=y while it is not set for rm2. I guess that this is where the problem lies. Let me try to get rid of it

@Etn40ff
Copy link
Author

Etn40ff commented Nov 28, 2023

@Eeems Can you try now?

@Eeems
Copy link
Member

Eeems commented Nov 28, 2023

Good catch! This does reduce it to near the same size as the stock kernel and allows it to be activated with kernelctl. I'm running it now with nothing obviously wrong.

@Eeems Eeems merged commit 872034c into toltec-dev:testing Nov 28, 2023
3 checks passed
Eeems added a commit that referenced this pull request Dec 10, 2023
…reguard (#742)

* linux-stracciatella: update sources to RM1XX_5.4.70_v1.3.4

* Bump build image to v3.1

* Add wireguard module to linux-stracciatella

* Move wireguard config out of sources

* Remove debug symbols for rM1

---------

Co-authored-by: Nathaniel van Diepen <Eeems@users.noreply.github.com>
Eeems added a commit that referenced this pull request Dec 26, 2023
### New Packages
- `webinterface-onboot` 1.2.2-2 - (#770 #721)
  - Allows the usb web interface to start without the USB cable being connected.
- `webinterface-upload-button` - 1.0.1-1 (#771)
  - Adds an upload button to the usb web interface.
- `signature-rm` - 1.0.2-1 (#772)
  - Removes the `Sent from my reMarkable` signature from emails sent by the device.

### Updated Packages
- `linux-stracciatella` - 5.4.70-3 (#742)
  - Updated to RM1XX_5.4.70_v1.3.4 tag from upstream kernel.
  - Added wireguard module.
- `wireguard` - 1.0.20210219-4 (#743 #784)
  - Removed wireguard-tools and wg-quick from wireguard package. These packages are provided by entware already.
- `display` and `rm2fb-client` - 1:0.0.32-2 (#758 #721)
  - Add support for OS 3.3.2.1666
- `rmfm` - 1.5.1-1 (#766)
  - Fix issue where listing a directory with an invalid symlink would crash the application.
- `neofetch` - 1.1.0-1 (#769)
- `webinterface-wifi` - 2.0.0-2 (#768 #721)
- `micro` - 2.0.13-1 (#738)
- `koreader` - 2023.10-2 (#749 #721)
- `ddvk-hacks` - 39.01-2 (#720 #778)
  - Fix issue where `ddvk-hacks` wouldn't be reapplied when using `toltecctl reenable`.
- `draft` - 0.2.0-22 (#721)
- `erode`, `fret`, `oxide`, `rot`, `tarnish`, `decay`, `corrupt`, `anxiety`, `oxide-utils`, `inject_evdev`, and `liboxide` - 2.6-3 (#721)
- `reboot-guard` - 1.0.1-8 (#721)
- `rmfakecloud-proxy` - 0.0.3-4 (#721)
- `genie` - 0.1.6-3 (#721)
- `remux` - 0.2.4-2 (#721)
- `tailscale-systemd` - 0.0.0-2 (#721)
- `toltec-base` - 1.2-3 (#721)
- `xochitl` - 0.0.0-17 (#721)

### Tooling
- New `provides=()` field added for packages.
- Added `unit-exists` and `disable-unit` methods to install-lib

**Note:** This doesn't change what OS version that toltec supports, as full support still requires various packages to be updated, removed, or replaced. Along with proper testing of all packages in the repository, as well as the upgrade process. https://github.com/toltec-dev/toltec/milestone/7 contains the current list of issues and pull requests required for 3.x support.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages Add or improve packages of the repository
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants