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

libresoc: centralize existing packages, fix bitrot, and enable all test suites #168

Merged
merged 50 commits into from
Jun 10, 2024

Conversation

jleightcap
Copy link
Collaborator

@jleightcap jleightcap commented Apr 1, 2024

Libre-SOC

  • Collect prior work (thanks @L-as!)
  • Refactor all packages to most recent upstream releases
  • Enable test suites for main projects components

Packages

This PR packages up to Verilog synthesis.

verilog v

closes #11.

@L-as
Copy link
Member

L-as commented Apr 1, 2024

Glad to see the work revived

@jleightcap jleightcap marked this pull request as ready for review April 6, 2024 23:09
@jleightcap jleightcap force-pushed the jl/libresoc branch 6 times, most recently from 384f3c1 to efd3a34 Compare April 11, 2024 16:25
@jleightcap jleightcap changed the title libresoc: init libresoc: centralize existing packages, fix bitrot, and enable all test suites Apr 11, 2024
@albertchae
Copy link
Contributor

Still in the process of reviewing this, but I wonder if CI is failing because you made this PR from a fork similar to #163 . The error message isn't as clear though this time

pkgs/default.nix Outdated Show resolved Hide resolved
pkgs/default.nix Outdated Show resolved Hide resolved
@jleightcap
Copy link
Collaborator Author

Still in the process of reviewing this, but I wonder if CI is failing because you made this PR from a fork similar to #163 . The error message isn't as clear though this time

Yep, creating PR within this repo shows a meaningful failure: https://github.com/ngi-nix/ngipkgs/actions/runs/8652912908/job/23726892007
CI should produce that same error when ran from forks, like in this PR.

jleightcap and others added 25 commits June 10, 2024 21:02
Signed-off-by: Jack Leightcap <jack@leightcap.com>
Signed-off-by: Jack Leightcap <jack@leightcap.com>

pinmux fixup

Signed-off-by: Jack Leightcap <jack@leightcap.com>
Signed-off-by: Jack Leightcap <jack@leightcap.com>
Signed-off-by: Jack Leightcap <jack@leightcap.com>
Signed-off-by: Jack Leightcap <jack@leightcap.com>
Signed-off-by: Jack Leightcap <jack@leightcap.com>

fixup ieee754fpu

Signed-off-by: Jack Leightcap <jack@leightcap.com>
Signed-off-by: Jack Leightcap <jack@leightcap.com>
Signed-off-by: Jack Leightcap <jack@leightcap.com>
Signed-off-by: Jack Leightcap <jack@leightcap.com>
upstream does not include a handful of `__init__.py`, manually `touch`
them in the `prePatch` phase.

Signed-off-by: Jack Leightcap <jack@leightcap.com>
set $CC/$AS/etc environment variables, and any hard-coded references,
to refer to pkgsCross.powernv.buildPackages.gcc.
setup.py uses @git versioning, patch to refer these to the nix inputs.

Signed-off-by: Jack Leightcap <jack@leightcap.com>
upstream uses a .gitignore in an empty directory as a means to include
that empty directory in the resulting wheel. patch to do this
explicitly.

Signed-off-by: Jack Leightcap <jack@leightcap.com>
copy the `memmap` linker script into the expected location for test
suite.

Signed-off-by: Jack Leightcap <jack@leightcap.com>
see included postInstall comment for the solved chicken-and-egg problem
 with building.

Signed-off-by: Jack Leightcap <jack@leightcap.com>
Signed-off-by: Jack Leightcap <jack@leightcap.com>
Signed-off-by: Jack Leightcap <jack@leightcap.com>
Signed-off-by: Jack Leightcap <jack@leightcap.com>
Signed-off-by: Jack Leightcap <jack@leightcap.com>
Signed-off-by: Jack Leightcap <jack@leightcap.com>
Upstream Libre-SOC repos are sporadically returning 502/504

Also add some missing `rev`s which correspond to the FOD hash, i.e. HEAD
at date in `version`.

This worked for every mirror except ieee754fpu.
Currently the `rev` for this does not seem to match its FOD hash

libresoc: use fetchgit for ieee754fpu instead of fetchFromGitHub

This allows us to use the same hash across the original upstream repo
and the mirror.

libresoc: use `fetchgit` for mirrors of upstream

repos mirrored into github.com/Libre-SOC-mirrors from upstream cgit instance.
use `fetchgit` consistently for all these packages: although unidiomatic in
nixpkgs, `fetchgit` is generic compatible fetcher with the upstream Libre-SOC
repos.

see:
https://github.com/jleightcap/ngipkgs/pull/1#discussion_r1583119470

Signed-off-by: Jack Leightcap <jack@leightcap.com>

libresoc: document github mirrors and fetcher

Signed-off-by: Jack Leightcap <jack@leightcap.com>
Signed-off-by: Jack Leightcap <jack@leightcap.com>
Signed-off-by: Jack Leightcap <jack@leightcap.com>
@fricklerhandwerk fricklerhandwerk merged commit 3af73ed into ngi-nix:main Jun 10, 2024
75 checks passed
@fricklerhandwerk
Copy link
Collaborator

Awesome! Thank @jleightcap @albertchae @L-as @lorenzleutgeb @wegank for the great work!

@lorenzleutgeb lorenzleutgeb mentioned this pull request Jun 10, 2024
@jleightcap jleightcap deleted the jl/libresoc branch June 11, 2024 13:54
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.

Libre-SOC
7 participants