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

Add Odroid M1 #1269

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft

Add Odroid M1 #1269

wants to merge 7 commits into from

Conversation

KhashayarDanesh
Copy link

Description of changes

I've added the Odroid M1 to nixos-hardware.

Things done
  • Tested the changes in your own NixOS Configuration.
  • Tested the changes end-to-end by using your fork of nixos-hardware and
    importing it via <nixos-hardware> or Flake input.
  • Ran the tests and it went well.
  • Added the new device to the flake.nix file and readme as well.

# Use kernel >6.6 The devicetree is missing from kernel versions older than this.
boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.6") (lib.mkDefault pkgs.linuxPackages_latest);
# Stop ZFS breaking the build
boot.supportedFilesystems = lib.mkForce ["btrfs" "cifs" "f2fs" "jfs" "ntfs" "reiserfs" "vfat" "xfs"];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be potentially dangerous if other module try to add something. Why is it needed for linuxPackages_latest? Nothing should add zfs by default.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it'd be necessary for linuxPackages_latest, I'll do some tests and remove boot.supportedFilesystems.

Copy link
Author

@KhashayarDanesh KhashayarDanesh Dec 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing the boot.supportedFilesystems line breaks the boot flow and unfortunately I haven't figured out why yet. So I've put it back for the time being.


# I'm not completely sure if some of these could be omitted,
# but want to make sure disk access works
boot.initrd.availableKernelModules = [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you run nixos-generate-config and see what modules it emits?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will try and get back to you.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran nixos-generate-config and the generated list of available kernel modules remains empty. Here's the code I use to build my SD Image: https://github.com/KhashayarDanesh/nixos-on-odroid-m1

@KhashayarDanesh KhashayarDanesh marked this pull request as draft December 7, 2024 12:39
@KhashayarDanesh
Copy link
Author

KhashayarDanesh commented Dec 7, 2024

@Mic92 Do you have any general tips/suggestions for this change except for addressing the items that came up and the things mentioned in the contribution guide? I'm a bit of a newbie and would appreciate all of the suggestion and direction I can get :)

@Mic92
Copy link
Member

Mic92 commented Dec 15, 2024

@Mic92 Do you have any general tips/suggestions for this change except for addressing the items that came up and the things mentioned in the contribution guide? I'm a bit of a newbie and would appreciate all of the suggestion and direction I can get :)

Rest looks fine.

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

Successfully merging this pull request may close these issues.

2 participants