Add linien-server package #36
Loading…
Reference in New Issue
No description provided.
Delete Branch "fsagbuya/nix-servo:linien-server"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
linien-server
packagelinien-server
in qemu -> other PR@ -20,2 +19,4 @@
./pr-29.patch
./pr-30.patch
./network.patch
./linien-server.patch
If you need a patch to add a package to the SD image then something is wrong. Add a parameter to the image builder or something.
Also the packages should be exported by the flake. You should not need to build the image to access them.
@ -175,6 +176,7 @@
url = "https://download.qemu.org/qemu-${version}.tar.xz";
hash = "sha256-Q8wXaAQQVYb3T5A5jzTp+FeH3/QA07ZA2B93efviZbs=";
};
patches = builtins.filter (x: (x.name or "") != "9d5b42beb6978dc6219d5dc029c9d453c6b8d503.diff") oldAttrs.patches;
What?
That patch is causing error due to nix flake update, need to remove.
Add a code comment and explain in detail what is going on.
Do we still need to use the old qemu version anyway?
qemu
8.2.0
does not build before, however I just checked that they updated to8.2.1
. Will check if the issue has been fixed, otherwise will just add code comments here.@ -0,0 +7,4 @@
});
customKernelPackages = crosspkgs.linuxPackagesFor customKernel;
+
+ pyrp3 = pkgs.python3Packages.buildPythonPackage rec {
You need to use the linien fork and it also does not use myhdl.
Should we also use the elhep linien fork to build the gateware?
Obviously yes, original linien is for red pitaya.
Or just apply elhep's fast-servo support patches against original linien here.
That sounds good. Will just apply the patch then and build the gateware from that.
Add the linien-server packageto WIP: Add the linien-server packageb672a095c3
to1a3a750cea
Just copy the migen and misoc derivations. ARTIQ is a large package, no need to bloat this one with a dependency when you're only using 20 lines of code from it.
1a3a750cea
tof5bf776510
WIP: Add the linien-server packageto Add support for fast-servo linien portFrom reading the file name, it is unclear to what "add-source.patch" applies to.
@ -19,3 +21,4 @@
./pr-28.patch
./pr-29.patch
./pr-30.patch
./network.patch
?
@ -26,0 +62,4 @@
fontconfig
];
vivadoEnv = pkgs.buildFHSEnv {
not needed, remove
@ -26,0 +69,4 @@
vivado = pkgs.buildFHSEnv {
name = "vivado";
targetPkgs = vivadoDeps;
inline
@ -26,0 +91,4 @@
]);
postPatch = ''
substituteInPlace setup.py \
--replace "\"pyrp3>=1.1.0,<2.0;platform_machine=='armv7l'\"," ""
As far as I can tell this is a required dependency. Removing it does not solve the problem.
@ -175,9 +265,33 @@
url = "https://download.qemu.org/qemu-${version}.tar.xz";
hash = "sha256-Q8wXaAQQVYb3T5A5jzTp+FeH3/QA07ZA2B93efviZbs=";
};
# temporary fix to build qemu with recent nixpkgs
Did you confirm that you can't just use the latest QEMU?
Latest qemu can be use now, however some packages break with the update. Specifically the kernel. Will solve this in the next PR
@ -178,3 +270,4 @@
});
board-package-set = { board }: let
# gateware only builds fast-servo for now
"for now"?
What else? We're not going to run linien on zc706.
Will update the script to be only exclusive for fast-servo.
Split gateware and linien-server into two PRs.
@ -0,0 +26,4 @@
- cmd = f"bootgen -image {build_name}.bif -arch zynq -process_bitstream bin -w on".split(" ")
- subprocess.run(cmd)
+ # cmd = f"bootgen -image {build_name}.bif -arch zynq -process_bitstream bin -w on".split(" ")
Doesn't make sense to comment out lines in a patch. Just remove them.
(Unless the justification is you want the code to be exactly like elhep/linien upstream)
f5bf776510
to89becc9873
Add support for fast-servo linien portto Add linien-server package@ -23,3 +23,3 @@
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b0d36bd0a420ecee3bc916c91886caca87c894e9",
"rev": "6fd7935607b68a96949b51ff08f12109e99ffd1f",
Why is this update part of this PR?
Updated to fetch the fix for
scipy
dependency build and also to fetch the pinned rpyc4 version.@ -25,0 +26,4 @@
pname = "pyrp3";
version = "1.2.0";
pyproject = true;
src = pkgs.python3Packages.fetchPypi {
I already told you that you need to use the linien fork.
89becc9873
to568500f0e1
568500f0e1
tof84ae926ca
@ -73,2 +110,4 @@
extraModules = [
"${patched-not-os}/zynq_image.nix"
({ config, pkgs, ... }: {
environment.systemPackages = [ linien-server ];
We only want it on fast-servo. It won't work on zc706.
Maybe don't do the not-os integration for now? It's not done for the gateware anyway. Could be two separate PRs.
Add linien-server packageto WIP: Add linien-server package@ -71,0 +80,4 @@
};
nativeBuildInputs = with pkgs.python3Packages; [ setuptools wheel setuptools-scm ];
propagatedBuildInputs = with pkgs.python3Packages; [
myhdl
Looks wrong.
It seems the myhdl dependency has not been dropped in any version in the linien fork.
Ah okay. It's used only for intbv in a few places (which could be replaced with simple bitwise arithmetic) and also in the original (non-linien) one. Looks like physicist code syndrome strikes again.
Will implement as suggested.
f84ae926ca
to9a5924ee81
WIP: Add linien-server packageto Add linien-server packageSubmit the bitwise patch upstream and keep myhdl here for now, one thing at a time.
9a5924ee81
to2f729643e1
Submitted a PR upstream https://github.com/linien-org/pyrp3/pull/12.
@ -419,3 +456,3 @@
IMGDIR=$(mktemp -d /tmp/not-os-qemu-XXXXXX)
BASE=$(realpath $(dirname $0))
qemu-img create -F raw -f qcow2 -b $BASE/sd-image.img $IMGDIR/sd-overlay.qcow2 512M
qemu-img create -F raw -f qcow2 -b $BASE/sd-image.img $IMGDIR/sd-overlay.qcow2 2G
Since we are not including linien-server in the SD image yet, I think this should not be in this PR?
Ah yes, thanks for noticing. Will omit this part for this PR.
Hmm, the new sd-image now after the latest update from
linux 6.1
tolinux 6.6
have increased in size.Previously it is around
391M
https://nixbld.m-labs.hk/build/157718. Will check for what have changed and resolve this on the next PR.2f729643e1
to3618a1f17d