<clever>
gcc can output the result of running the preprocessor
<clever>
but then -I has to be right, and maybe -D
<samueldr>
the things a well placed nerdsnipe can do :)
<clever>
main.c:(.text+0x1208): undefined reference to `HMAC_sha512_update'
<clever>
that one should exist...
<clever>
yeah, the static inline confused it
<clever>
main.c:(.text+0x3d2): undefined reference to `cryptonite_sha512_init'
<clever>
progress!
<clever>
and llvm segfaults
<samueldr>
progress!
<clever>
2. Running pass 'AVR DAG->DAG Instruction Selection' on function '@cryptonite_sha512_update'
drakonis has joined #nixos-chat
<clever>
region `text' overflowed by 190216 bytes
<clever>
samueldr: ok, now what, lol!!
<samueldr>
computers can't handle more than a couple lines of text
<samueldr>
(yes, I know region 'text' doesn't mean strictly text :))
<clever>
best device i'm testing is 32kb of flash
<clever>
it overflowed by 190kb
<clever>
s/testing/targetting/
<samueldr>
making hardware crypto things like you briefly touched upon the other day?
<samueldr>
neat!
<clever>
yeah
<samueldr>
don't remember if they were HSM or the other one kind I don't remember the name
<clever>
/nix/store/001yi03pr6dzw2wijbcmkgzr39f3fqpn-avr-binutils-2.31.1/bin/avr-ld: section .data LMA wraps around address space
<clever>
samueldr: most HSM's dont seem flexible enough to implement this
<clever>
so i'm just throwing it at an AVR, lol
<samueldr>
I mean, the principle you wanted to explore using
<clever>
ok, so i have it sorta compiling
<clever>
now to try and clean it up...
<samueldr>
:/ hitting weird things with the .config thing like the kernel ones, but with u-boot
<samueldr>
where unset options (# CONFIG_XYZ is not set) prevail when they are overriden by appending new options to the .config file, with warnings, and I'm not sure if my expectations were wrong
<samueldr>
but I expected that to be a comment and the last set option to not fail to set with a warning?
* samueldr
might need to dig more into that another day
<clever>
main.c:44:21: warning: left shift count >= width of type [-Wshift-count-overflow] return (index & (1 << 31));
<infinisil>
It finally finished building everything, and this is the result..
<infinisil>
Goddamnit this time was so wasted
jtojnar has quit [Remote host closed the connection]
<ar>
i've been on gentoo for 15 years
<ar>
switched my laptop during 35c3
<etu>
ar: Nice :)
<etu>
I think there's quite many people in nixos that has a gentoo history
<srhb>
etu: Yeah! It's pretty funny.
endformationage has quit [Ping timeout: 258 seconds]
<joepie91>
ar: were you at the install party? or did you switch it at a different time during 35c3?
<ar>
joepie91: no, i wasn't at the install party. i was the weird guy who wanted (and succeeded) to install nixos from a running gentoo in a separate zfs fs
__monty__ has joined #nixos-chat
<joepie91>
ar: ah, I might have missed that :P
<joepie91>
glad to have you here though!
<sphalerite>
nh2: oh yeah of course it already exists :p
<sphalerite>
nh2: none that supports nixos generation selection AFAIK though ;)
<sphalerite>
nh2: flokli was also working on getting support for systemd-boot's boot menu entry format into linuxboot or systemboot or one of those things iirc
<sphalerite>
that's completely different from what I thought x)
<flokli>
current spec only mentions efi stubs with their signature stuff, because there didn't seem to be some standard across the linuxboot community
<flokli>
once some standard exists, linuxboot should support it, same as sd-boot :-)
<jD91mZM2>
Completely unrelated to anything: Woah direnv is awesome
Jackneill has quit [Ping timeout: 245 seconds]
Jackneill has joined #nixos-chat
jasongrossman has quit [Ping timeout: 258 seconds]
<__monty__>
direnv and nix-shell is a great combo. Have you checked out lorri?
waleee has joined #nixos-chat
<jD91mZM2>
__monty__: I have not, but I will now
<jD91mZM2>
Ok that's cool. nix-shell+linux is linux on steriods. direnv+nix-shell is nix-shell on steriods. lorri+direnv+nix-shell is direnv on steriods.
pie_ has quit [Ping timeout: 258 seconds]
<jD91mZM2>
s/steriods/steroids/g you saw nothing
<ar>
when does it all change into hulk?
<jD91mZM2>
Whenever it gets angry
<jD91mZM2>
So avoid those segfaults at any cost
jasongrossman has joined #nixos-chat
Synthetica has joined #nixos-chat
pie_ has joined #nixos-chat
pie___ has joined #nixos-chat
pie_ has quit [Ping timeout: 244 seconds]
<pie___>
whatcha doin<clever> dear god, there is a constant table that is 24kb!!
pasukon has quit [Ping timeout: 252 seconds]
pasukon has joined #nixos-chat
<pie___>
joepie91, i might have gotten my wine pre-prototype stuff to work, not sure
<pie___>
i seem to have written some really brokenass scripts at the last ccc
jtojnar has joined #nixos-chat
pie_ has joined #nixos-chat
pie___ has quit [Ping timeout: 276 seconds]
<nh2>
> having to add a kexec binary in just feels like cheating
<nh2>
clever samueldr: Until I get significant free time, and want to implement a libc-free backend for GHC on Linux that generates syscalls directly, like Go does :D
<nh2>
> and ghc isnt go-crazy, and lets libc help out
<{^_^}>
error: syntax error, unexpected IN, expecting ')', at (string):252:30
<{^_^}>
error: syntax error, unexpected ',', expecting ')', at (string):252:22
<gchristensen>
O.o
<gchristensen>
haha
<nh2>
sphalerite samueldr clever: I'm trying to decide which one to choose. kexec-loader is interesting because it apparently can detect GRUB. So I think that would mean it can show NixOS's normal generation selection list?
<gchristensen>
if kexec is wrong I don't want to be right
pie_ has quit [Remote host closed the connection]
pie___ has joined #nixos-chat
jasongrossman has quit [Quit: ERC (IRC client for Emacs 26.2)]
jasongrossman has joined #nixos-chat
pie___ has quit [Remote host closed the connection]
pie___ has joined #nixos-chat
drakonis has joined #nixos-chat
pie_ has joined #nixos-chat
pie___ has quit [Ping timeout: 250 seconds]
drakonis has quit [Quit: WeeChat 2.4]
endformationage has joined #nixos-chat
waleee has quit [Quit: WeeChat 2.4]
jtojnar has quit [Read error: Connection reset by peer]
jtojnar_ has joined #nixos-chat
jtojnar_ is now known as jtojnar
Synthetica has quit [Quit: Connection closed for inactivity]
pie___ has joined #nixos-chat
pie_ has quit [Ping timeout: 245 seconds]
hedning_ has quit [Quit: hedning_]
<pie___>
joepie91, for your consideration, shitty wine WIP and I gotta run https://file.io/4ulNmi
<pie___>
(found some ranodm file host to dump a zip...=
<joepie91>
pie___: 404
<pie___>
doh
<joepie91>
pie___: try transfer.sh?
<pie___>
oh looks like its a one time link
<pie___>
didnt transfer.sh go down
<joepie91>
nop
<joepie91>
was taken over
<joepie91>
running now, though a bit less reliably than before
<infinisil>
"{"success":false,"error":429,"message":"Too Many Requests"}"
<infinisil>
For the last file.io link
<samueldr>
haven't looked at it much, yet, but there is a fork of the OSS version of synergy that's being maintained, for anyone using synergy daily https://github.com/debauchee/barrier
jasongrossman has quit [Ping timeout: 250 seconds]
drakonis has joined #nixos-chat
<nh2>
samueldr sphalerite clever: I think I'm making some progress with PlopKexec. Do you know how I can generate a `grub.cfg` with Nix? I've seen `boot.loader.grub.device = "nodev"`, but that still does it only once the system is running, and I want to build a grub.cfg already into my SD card image created with nix-build
<clever>
nh2: you must run install-bootloader, inside qemu, with the disk image mounted
<clever>
nh2: or modify install-grub.sh to support running outside of a vm
<clever>
nixos-install just runs it under a chroot
<clever>
maybe proot could work?
<samueldr>
I think most of our bootloader infra is not generic to be usable without an installed system; e.g. the iso installer image doesn't use a single generator in pair with the system ones
<nh2>
maybe I should write the initial grub.cfg by hand
<clever>
nh2: yeah, thats what the ISO's do
<samueldr>
it'd probably be much easier to get you up and running
<nh2>
samueldr: the plopkexec "source code" is a 120 MB tarball, looks like they have no source dist
<nh2>
(plain source dist without prebuilt images)
travelion has joined #nixos-chat
avn has joined #nixos-chat
<gchristensen>
hey everyone, I'm going to be hosting regular Nix ecosystem office hours starting next week. It'll be a video call where anyone can drop in and chat about the Nix ecosystem: cool PRs, problems, improvements, how to help each other to improve Nix. If you're interested, please tell me when you're available over at https://doodle.com/poll/aq9iytabi3k7z9da#calendar -- thank you!
drakonis has quit [Ping timeout: 246 seconds]
pie_ has joined #nixos-chat
<clever>
2019-04-24 16:37:26 < bauen1> grub really only needs a good bootloader now ...
<clever>
2019-04-24 16:38:16 < clever> bauen1: that reminds me, ive been thinking of writting a linux "distro" that presents a bootloader menu over ssh, and kexec's into the chosen target
<clever>
2019-04-24 16:38:25 < clever> what if i just write a grub module that adds an ssh terminal?
<clever>
nh2: ^^^
<samueldr>
grub won't have as many network drivers available as a real linux :)
<clever>
samueldr: just write more!
<samueldr>
no!
<pie__>
lol
<pie__>
cursed
<sphalerite>
nh2: anything wrong with having the initramfs mount the target system and just reading the nixos generations from it? Do you need something that can detect other distros or something?
<sphalerite>
nh2: because nixos system generations are pretty simple to kexec
<clever>
ls -lh /nix/var/nix/profiles/system/{kernel,initrd,kernel-params}
<clever>
repeat for each n in system-<n>-link
<clever>
sphalerite: main thing that wont cover is "/nix/var/nix/profiles/system-42-link/bin/switch-to-configuration boot"
<clever>
which updates the bootloader, but not the main system symlink
<nh2>
sphalerite: there's no /var or /nix/var in my system tarball
<sphalerite>
clever: uuh, are you sure?
<nh2>
uh I mean clever
<nh2>
sphalerite: also I'm using PlopKexec unmodified right now, it would be cool to be able to continue to do that. The manual `menuentry` 3-liner seems to work well
<clever>
nh2: those symlinks can be generated by the make tarball function
<sphalerite>
nh2: then you use the system path rather than a profile, since you know what it is
<sphalerite>
ah ok
<sphalerite>
eh
<sphalerite>
idk
<nh2>
clever sphalerite: ah but then I'm already doing something very similar I think. I'll try to complete what I have and will then post in a moment, so you can check if it can be cleaned up somehow
<sphalerite>
I suppose it's quite a different use case from mine as well
<nh2>
sphalerite: PlopKexec seems pretty cool so far, it also detects partitions on the fly as you plug in the SD card or USB stick
<nh2>
after I get it working I just have to find a clean way to build it from source to package it in nix
<nh2>
Step 1: Run `nix-build myscript.nix` to create an .img file that can be dd'd onto an SD card or USB, in the format that Chromebooks will boot from. With a flag to select whether root FS should contain NixOS or Ubuntu.
<nh2>
sphalerite: my use case is that I want to offer chromebook users the following experience:
<sphalerite>
nh2: yeah, fair enough.
<sphalerite>
nh2: are you aware of thefloweringash's work on nixos on chromebooks?
<sphalerite>
nh2: it has some aarch64-specific stuff that's probably irrelevant to you, but it can build ready-to-boot SD images
<samueldr>
I did touch about it, but AFAIUI that chromebook doesn't exactly use depthcharge, but something acting mostly like it
<nh2>
sphalerite: yes, I may be able to reuse the partitioning part of it, but I'm not that far yet; right now I'm using a pre-formatted SD card and am working on the contents of 2 of the partitions
<sphalerite>
oh ok. Never mind me :)
<nh2>
sphalerite: the direct link you providedis useful though
<nh2>
sphalerite: a key goal for me is that I make the kernel partition (caryring PlopExec currently) so that it can boot any normal Linux distro that's in the root partition; that's why I currently (well, since you guys told me yesterday) like PlopKexec, because it can read grub menus
<sphalerite>
ah right
<sphalerite>
yeah, sorry, I'm just throwing in things that seem vaguely related without knowing the context >.<
<nh2>
I *think* it can even recognise Ubuntu/Debian and so on install CDs/USBs and boot them, so that as soon as it's on the SSD or SD, one can install a distro of choice the normal way
<nh2>
sphalerite: no, keep doing it, I'm making a 50 KB document with all the important links and notes about the topic
<sphalerite>
nh2: huh, without any further kernel commandline args?
<sphalerite>
nh2: minor nit: initrd and kernel probably shouldn't be in /bin :p
<gchristensen>
lol.
<nh2>
yeah that needs some cleanup :D
<nh2>
sphalerite: it currently dies at `switch_root: can't execut '/init': No such file or directory`, so I probably have to set `init` as well, or figure out why it isn't working
<nh2>
sphalerite: thanks, that should work. I'm not quite sure though why it doesn't work without it, the kernel should search for the init in `/bin/init`, where I have a symlink (put perhaps here it's the NixOS initramfs's /init that manually invokes switch_root, and does not have such detection?)
<gchristensen>
I find the Nix ecosystem to be really, really cool
<lassulus>
is there some way to filter PRs with merge conflicts? or do we need to label them all? does the label get removed when there is no longer a conflict?
<gchristensen>
ofborg will automatically apply and remove merge-conflict labels when an evaluation happens
<gchristensen>
however, an ancient PR which is not recently evaluated may conflict and not receive the label since it hasn't been evaluated recently
<lassulus>
ok, so it's not a problem if I label ancient PRs with merge conflicts
<lassulus>
is there a label for stalled PRs?
<gchristensen>
I don't know
<samueldr>
maybe we should add one
<samueldr>
I knwo that with backports, the "needs port to stable" label has been helpful, even when the backport was already done
<joepie91>
[23:09] <gchristensen> I find the Nix ecosystem to be really, really cool
<samueldr>
I prefer finding "stale labels" for "needs port to stable" than not having them; the main issue with stale PRs label might be how to make the labels go away :/
<nh2>
pie_: that's what happens when you track the progress of the entire free software world in one repo
<joepie91>
gchristensen: I can add my most practical times, but I should note that I'm currently in a 'commitment freeze' :)
<samueldr>
e.g. if joepie91 here, without repo access updated their stale PR, without write access it's not possible to remove the label
<nh2>
I think it's a nice sense of progress
<joepie91>
(I'm spinning too many plates, so I need to neatly stack a few ones before taking on new commitments)
<joepie91>
(currently working on one of them :P)
<joepie91>
gchristensen: still useful to add my votes in that case?
<pie_>
nh2, not sure we're at entire yet though maybe one day :p
<nh2>
why does .toplevel and the system version evaluate to 19.03pre-git even when I built it from a commit on the release-19.03 branch?
<nh2>
samueldr: what on a "normal" NixOS system makes the "-pre" thing go away? I'm quite sure I've seen some systems on people's laptops that don't haveit
<samueldr>
I don't remember how it goes, but that's the "last option" if it cannot get the git revision in another way, IIRC