note to myself: in next build add wpa_supplicant and iwd
@antono @0x17 - or someone else with the NixOS image:
do you have 4G module? unfortunately I do not have one so - I can not test the script or service to turn on/off this module…
I also don’t have it - sorry
I have a module hovever its not easy to find the script for 4g modem. I’ll try to get it from oficial image.
please, include uconsole/module-4g.nix
to your configuration. (just committed)
i.e. add to your current config:
"${builtins.fetchGit {url = "https://github.com/robertjakub/oom-hardware.git";}}/uconsole/module-4g.nix"
and than you can run uconsole-4g-cm4
as root to enable/disable the 4G module.
Thanks for the code. I enabled 4g module and i can see the device via nmcli d
:
DEVICE TYPE STATE CONNECTION
lo loopback connected (externally) lo
cdc-wdm0 gsm unavailable --
I have no SIM at the moment so cannot test connection. Will update later.
Thanks Antono! So, mostly all things works on NixOS/CM4 ((-;
any hints what we can do next to make the support better and better? ((-;
There is one bug that happens sometimes. In GDM mouse movements are snapped tp vertival axis and horizontal movements are ignored. I guess this pproblem is not related to nixos but somwhere to GDM.
I think keyboard firmware flashing tools would be useful. Same true for modem flashing tools.
Hello. Today i decided to move nixos from EMMC to sdcard and faced the same issue as before: no wpa_supplicant in currently available image for wifi setup.
Are you going to publish fresher image with wpa supplicant or even better with network manager for quicker bootstrap? Maybe images with minimalistic configuration.nix?
I will release 25.05-git on Sunday. if there will be no red alerts in my area ;/
flash with nixos-sd-uconsole-25.05pre-git-1124-aarch64-linux.img.zst - Google Drive
changes:
- wpa_supplicant in image (start manually)
- upgrade to kernel 6.6.51
- switched to nixos-unstable (and kernel 6.6.51)
about minimalistic config - look at /etc/nixos ((-;
@johndoe thanks so much for putting this together and getting most functions to work on NixOS. I’m getting my uConsole this month and plan to install this image. Just several questions:
- would you say this is ready for production and to be used as a main OS? If not, any bugs that still need to be worked out? I’m happy to beta test
- I’m planning to get the upcoming RTLSDR/Lora/GPS module. Is there anything I need to do to ensure functionality?
- any plans to make NixOS compatible with the CM5 board?
Many thanks and looking forward to contributing to this thread
ad 1) imho just minor problems. working on the firmware flashing (bootloaders, keyboard, modem, etc). keep in mind, that uC is not officially supported - so, sometimes you will be forced to recompile the kernel or something else - it is based on “unstable” version…
for me - NixOS is my primary system for uConsole. I try to keep it as stable as I can.
there are some issues - but it’s more “application” issues than hardware support - i.e. sometimes the mouse is not working as excepted (mixed vertical and horizontal movements) - but it more “gnome” issue than hardware.
ad 2) IDK, I need more information and or the board… but if it is a USB module - it should work as excepted.
ad 3) as soon as I obtain the CM5 board ((-; but first, I need to settle some problems with rPI 5 support.
Thanks so much for the breakdown and your hard work. I’m looking forward to loading this as my main OS on the uConsole in that case. Instead of Gnome, I hope to use Sway or Hyprland (if the hardware supports it) and hopefully it’ll be ok. Will update this thread once I have it installed. I have a CM5 16GB on order but it may take a while for delivery, so will be using an older CM4 8GB in the meantime!
Hyprland is my choice ((-; You have to downgrade aquamarine to 0.4.4 to get the working graphics (or wait for the revert/fix in post 0.5.0).
my current settings:
hyprland.url = "github:hyprwm/Hyprland/v0.45.2";
hyprland.inputs.aquamarine.url = "github:hyprwm/aquamarine/v0.4.4";
hi @johndoe, thanks for all the effort. The 25.05 image works straight off the bat. I’m trying to build the SD image myself, but I’m running into an error. I created an issue in the oom-hardware repo
nix-build '<nixpkgs/nixos>' -A config.system.build.sdImage -I nixos-config=sd-image-uConsole.nix
building '/nix/store/8x577psrgajk8jj1dx7yn8wgn6abjj18-linux-config-6.6.51-stable_20241008-cpi.drv'...
Running phase: unpackPhase
unpacking source archive /nix/store/bxzl8g5ia2nk5lip340p8ain7v8inrbd-source
source root is source
Running phase: patchPhase
applying patch /nix/store/mnlqwys9dxznjcvq4w3s0435s9ql8qv8-bridge-stp-helper.patch
patching file net/bridge/br_private.h
Hunk #1 succeeded at 51 with fuzz 2 (offset 12 lines).
applying patch /nix/store/mbz5gln1q4swlzmqs2399br98qjif9kn-request-key-helper.patch
patching file security/keys/request_key.c
Hunk #1 succeeded at 117 (offset 3 lines).
applying patch /nix/store/0cywwdbjsvxc6ig69vga8q6n325x37gs-001-OCP8178-backlight-driver.patch
patching file drivers/video/backlight/Kconfig
patching file drivers/video/backlight/Makefile
patching file drivers/video/backlight/ocp8178_bl.c
applying patch /nix/store/mlvynhsghxhmrk574ip4i0b2n16xkcv6-002-drm-panel-add-clockwork-cwu50.patch
patching file drivers/gpu/drm/panel/Kconfig
patching file drivers/gpu/drm/panel/Makefile
patching file drivers/gpu/drm/panel/panel-clockwork-cwu50.c
applying patch /nix/store/rlkhv5fvpzhnk823v4arb8zb36awqfkc-003-axp20x-power.patch
patching file drivers/power/supply/axp20x_ac_power.c
patching file drivers/power/supply/axp20x_battery.c
applying patch /nix/store/2vyss7z548vshnmfin0fl543lh79r4xc-004-vc4_dsi-update.patch
patching file drivers/gpu/drm/vc4/vc4_dsi.c
Hunk #1 succeeded at 755 (offset 2 lines).
Hunk #2 succeeded at 783 (offset 2 lines).
applying patch /nix/store/wn4idvzwsdfgl0zv1wh738gz58pcg2bf-005-bcm2835-audio-staging.patch
patching file drivers/staging/vc04_services/bcm2835-audio/bcm2835.c
applying patch /nix/store/81p9z5kj3rqrlypvwv6aqh5gqj364fzv-007-drm-panel-cwu50-expose-dsi-error-status-to-userspace.patch
patching file drivers/gpu/drm/panel/panel-clockwork-cwu50.c
applying patch /nix/store/xacgwg8106j3jsk32n66xapzspjqfbci-008-driver-staging-add-uconsole-simple-amplifier-switch.patch
patching file drivers/staging/Kconfig
patching file drivers/staging/Makefile
patching file drivers/staging/uconsole/Kconfig
patching file drivers/staging/uconsole/Makefile
patching file drivers/staging/uconsole/simple-amplifier-switch.c
applying patch /nix/store/831w9jjwfspn3wc2h3mlks980v3zm2qz-6de0bb51929cd3ad4fa27b2a421a2af12e6468f5.patch
patching file drivers/gpu/drm/rp1/rp1-dpi/Kconfig
Reversed (or previously applied) patch detected! Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file drivers/gpu/drm/rp1/rp1-dpi/Kconfig.rej
patching file drivers/gpu/drm/rp1/rp1-dsi/Kconfig
Reversed (or previously applied) patch detected! Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file drivers/gpu/drm/rp1/rp1-dsi/Kconfig.rej
patching file drivers/gpu/drm/rp1/rp1-vec/Kconfig
Reversed (or previously applied) patch detected! Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file drivers/gpu/drm/rp1/rp1-vec/Kconfig.rej
error: builder for '/nix/store/8x577psrgajk8jj1dx7yn8wgn6abjj18-linux-config-6.6.51-stable_20241008-cpi.drv' failed with exit code 1;
last 10 log lines:
> patching file drivers/gpu/drm/rp1/rp1-dsi/Kconfig
> Reversed (or previously applied) patch detected! Assume -R? [n]
> Apply anyway? [n]
> Skipping patch.
> 1 out of 1 hunk ignored -- saving rejects to file drivers/gpu/drm/rp1/rp1-dsi/Kconfig.rej
> patching file drivers/gpu/drm/rp1/rp1-vec/Kconfig
> Reversed (or previously applied) patch detected! Assume -R? [n]
> Apply anyway? [n]
> Skipping patch.
> 1 out of 1 hunk ignored -- saving rejects to file drivers/gpu/drm/rp1/rp1-vec/Kconfig.rej
For full logs, run 'nix log /nix/store/8x577psrgajk8jj1dx7yn8wgn6abjj18-linux-config-6.6.51-stable_20241008-cpi.drv'.
error: 1 dependencies of derivation '/nix/store/5953f360dmyfhjsm4xp5amcvqgnb2hs6-linux-6.6.51-stable_20241008-cpi.drv' failed to build
error:
… while calling the 'derivationStrict' builtin
at /builtin/derivation.nix:9:12: (source not available)
… while evaluating derivation 'nixos-sd-uconsole-24.05pre-git-aarch64-linux.img'
whose name attribute is located at /nix/store/0vpk9v6rj551q42ym4h9qrdx9xxxhcsg-source/pkgs/stdenv/generic/make-derivation.nix:331:7
… while evaluating attribute 'buildCommand' of derivation 'nixos-sd-uconsole-24.05pre-git-aarch64-linux.img'
at /nix/store/0vpk9v6rj551q42ym4h9qrdx9xxxhcsg-source/nixos/modules/installer/sd-card/sd-image.nix:182:7:
181|
182| buildCommand = ''
| ^
183| mkdir -p $out/nix-support $out/sd-image
(stack trace truncated; use '--show-trace' to show the full trace)
error: 1 dependencies of derivation '/nix/store/i94pxb2xrzgxpcabcnd9gxmp85w85mq3-dtbs-filtered.drv' failed to build
Any ideas or pointers for troubleshooting this?
@jDmacD show me the output of
nix-info -m
are you trying to build the iso on 24.11 or on unstable? (and let’s discuss on GitHub, and we will post the solution here)
so, the issue was the stable vs unstable (there are some backported patches in stable linux-rpi kernel). solutions: upgrade the build machine to unstable or… I have to pin the linux-rpi unstable in uc/kernel.