-
-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
stdenv: bootstrap riscv64 (Step 2) #147942
stdenv: bootstrap riscv64 (Step 2) #147942
Conversation
Bootstrap files are from https://hydra.nixos.org/build/159891432 and https://hydra.nixos.org/build/159891436
Haven't tested, but I think the |
RiscV has an individual STARTFILE_PREFIX_SPEC macro which also need to be patched.
It should be fixed now. For test: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to confirm that I was able to bootstrap stdenv using the bootstrap tools built by Hydra (tree). Let's get this uploaded to tarballs.nixos.org
🚀
bootstrap-files URLs
{ # https://hydra.nixos.org/build/159891432 # https://cache.nixos.org/2k7r16bgfglv4ygrkmprk611my6n62x7.narinfo busybox = import <nix/fetchurl.nix> { name = "busybox"; url = "https://cache.nixos.org/nar/0vs8nzcvmcvi80bi5grzl3vbv97qxxx2yc01rfmlv48zqzp2y90s.nar.xz"; sha256 = "sha256-b2GRL5S8TvKH0f9IqVIe0WvQfY2Ox3XkcfMsZNNGWD0="; unpack = true; executable = true; }; # https://hydra.nixos.org/build/159891436 # https://cache.nixos.org/g9vs803cwl3mx5w2fk0sdfmf977vyp9p.narinfo bootstrapTools = import <nix/fetchurl.nix> { name = "bootstrap-tools.tar.xz"; url = "https://cache.nixos.org/nar/0j6rz95gzdissszgn51y50syzh84p8hdhkqdr0sx2s4swrwsgahz.nar.xz"; sha256 = "sha256-YTZMmHm/Z91IXHzZuMkN/rACorn+cu9IVBNAsDNp6jg="; unpack = true; }; }
Oh, I now recalled that @lovesegfault can also upload tarballs. (Graham tends to be busy, understandably.) |
@lovesegfault: so can you upload these two files? I think the PR text describes this well. (Perhaps you thought I was just confirming the ability to do so.) |
I can, just need another day or so, I've been traveling and my availability has been spotty. Everything going well I should get home tomorrow :) |
@lovesegfault: ping |
I'm working on this, I'm away from home and don't have access to my normal computer, where I kept WIP script to upload tarballs. I now need to re-learn how to do it. Hopefully documenting it well this time, I think I left some breadcrumbs on Matrix with instructions which I'm chasing after. |
Alright, I've recovered the knowledge. I need:
$ sha256sum /nix/store/9h4d7s313wv3gkfwi493yr1wvdsz9lf2-stdenv-bootstrap-tools/on-server/*
6fae5d5db226ea8eace94f2d0221a947a48c7ef7e7fd515c6604c705eb49662b /nix/store/9h4d7s313wv3gkfwi493yr1wvdsz9lf2-stdenv-bootstrap-tools/on-server/bootstrap-tools.cpio.bz2
78df72595b11e55ab198a6508cd9fa6702baee33e9631d6f0614cf08052f88f3 /nix/store/9h4d7s313wv3gkfwi493yr1wvdsz9lf2-stdenv-bootstrap-tools/on-server/bzip2
467a81602423f7f8e73b59b5ae080235795aebbbcb19a4fb81c9706153615394 /nix/store/9h4d7s313wv3gkfwi493yr1wvdsz9lf2-stdenv-bootstrap-tools/on-server/cpio
6f9673b2e44bfa524068965da0ee5520f2c27f02f7dc3585ffe828356fb46eb1 /nix/store/9h4d7s313wv3gkfwi493yr1wvdsz9lf2-stdenv-bootstrap-tools/on-server/mkdir
865d209fe8fb0fb457983f0208bb5febe87990b800a378ecf5f1a1cd5574b65b /nix/store/9h4d7s313wv3gkfwi493yr1wvdsz9lf2-stdenv-bootstrap-tools/on-server/sh (I use this last bit to double check that the intended thing is being uploaded) |
Notes:
|
@oxalica Done, let me know if it's working AOK: $ aws s3 cp --recursive --acl public-read /nix/store/9qk7md1d9qjan0c4dzs201ic3v9yj08v-stdenv-bootstrap-tools-riscv64-unknown-linux-gnu/on-server/ s3://nixpkgs-tarballs/stdenv-linux/riscv64/9bd3cf0063b80428bd85a286205adab4b6ffcbd6
upload: ../../../../nix/store/9qk7md1d9qjan0c4dzs201ic3v9yj08v-stdenv-bootstrap-tools-riscv64-unknown-linux-gnu/on-server/busybox to s3://nixpkgs-tarballs/stdenv-linux/riscv64/9bd3cf0063b80428bd85a286205adab4b6ffcbd6/busybox
upload: ../../../../nix/store/9qk7md1d9qjan0c4dzs201ic3v9yj08v-stdenv-bootstrap-tools-riscv64-unknown-linux-gnu/on-server/bootstrap-tools.tar.xz to s3://nixpkgs-tarballs/stdenv-linux/riscv64/9bd3cf0063b80428bd85a286205adab4b6ffcbd6/bootstrap-tools.tar.xz
$ aws s3 ls s3://nixpkgs-tarballs/stdenv-linux/riscv64/
PRE 9bd3cf0063b80428bd85a286205adab4b6ffcbd6/
$ aws s3 ls s3://nixpkgs-tarballs/stdenv-linux/riscv64/9bd3cf0063b80428bd85a286205adab4b6ffcbd6/
2021-12-23 17:12:51 19850552 bootstrap-tools.tar.xz
2021-12-23 17:12:51 601696 busybox
$ aws s3 cp --recursive s3://nixpkgs-tarballs/stdenv-linux/riscv64/9bd3cf0063b80428bd85a286205adab4b6ffcbd6 ./
download: s3://nixpkgs-tarballs/stdenv-linux/riscv64/9bd3cf0063b80428bd85a286205adab4b6ffcbd6/busybox to ./busybox
download: s3://nixpkgs-tarballs/stdenv-linux/riscv64/9bd3cf0063b80428bd85a286205adab4b6ffcbd6/bootstrap-tools.tar.xz to ./bootstrap-tools.tar.xz
$ sha256sum ./bootstrap-tools.tar.xz ./busybox
5466b19288e980125fc62ebb864d09908ffe0bc50cebe52cfee89acff14d5b9f ./bootstrap-tools.tar.xz
cdbd841abd2364270c5abb5b2e35154760d7ff47d9ac0878dd1b83ace9c575c7 ./busybox
$ sha256sum /nix/store/9qk7md1d9qjan0c4dzs201ic3v9yj08v-stdenv-bootstrap-tools-riscv64-unknown-linux-gnu/on-server/*
5466b19288e980125fc62ebb864d09908ffe0bc50cebe52cfee89acff14d5b9f /nix/store/9qk7md1d9qjan0c4dzs201ic3v9yj08v-stdenv-bootstrap-tools-riscv64-unknown-linux-gnu/on-server/bootstrap-tools.tar.xz
cdbd841abd2364270c5abb5b2e35154760d7ff47d9ac0878dd1b83ace9c575c7 /nix/store/9qk7md1d9qjan0c4dzs201ic3v9yj08v-stdenv-bootstrap-tools-riscv64-unknown-linux-gnu/on-server/busybox |
The two FOD URLs are alive now, and hashes are expected. I tested building them on a new machine and it can correctly fetch it. |
Same as in gcc{10,11} (NixOS#147942).
Same as in gcc{10,11} (NixOS#147942).
Same as in gcc{10,11} (#147942).
Motivation for this change
Follows #115406
Related: #101651
Add bootstrap files from https://hydra.nixos.org/build/159891432 and https://hydra.nixos.org/build/159891436
Currently the two URLs starting with
http://tarballs.nixos.org
are dangling. They should be uploaded before this PR being merged. @grahamcTest steps:
riscv64-linux
on your building machine. And apply the binfmt-QEMU patch nixos/binfmt: Add QEMU wrapper to preserve argv[0] #143060. It's required to pass allcoreutils
tests.riscv64-linux
stdenv.nix-build . -A stdenv --argstr system riscv64-linux
stdenv
. Or optionally, try to re-bootstrap bootstrap files to confirm the newstdenv
is fully functional. Note that this would take a long time since QEMU is far slower than cross compilation.Things done
I built the new
stdenv
successfully.Note that currently some basic packages including
nix
andsystemd
won't evaluate due to the usage of outdatedboost
, it would be fixed by #138309 (still instaging
).nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes