alunduil has quit [Read error: Connection reset by peer]
alunduil has joined #nixos-aarch64
pkral has joined #nixos-aarch64
jackdk_ has quit [Remote host closed the connection]
ryantrinkle has quit [Ping timeout: 240 seconds]
c00w has joined #nixos-aarch64
NekomimiScience has quit [Ping timeout: 252 seconds]
jackdk has quit [Ping timeout: 272 seconds]
angerman has quit [Ping timeout: 252 seconds]
c00w has quit [Ping timeout: 265 seconds]
elvishjerricco has quit [Ping timeout: 260 seconds]
alunduil has quit [Ping timeout: 272 seconds]
cstrahan____ has quit [Ping timeout: 272 seconds]
davidtwco has quit [Ping timeout: 260 seconds]
pkral has quit [Ping timeout: 272 seconds]
chessai has quit [Ping timeout: 272 seconds]
lirzhv has quit [Ping timeout: 260 seconds]
rajivr___ has quit [Ping timeout: 260 seconds]
feepo has quit [Ping timeout: 260 seconds]
lovesegfault has quit [Quit: WeeChat 2.7]
davidtwco has joined #nixos-aarch64
davidtwco has quit [Ping timeout: 245 seconds]
chessai has joined #nixos-aarch64
pkral has joined #nixos-aarch64
cstrahan____ has joined #nixos-aarch64
chessai has quit [Ping timeout: 272 seconds]
pkral has quit [Ping timeout: 260 seconds]
cstrahan____ has quit [Ping timeout: 260 seconds]
h0m1 has quit [Ping timeout: 245 seconds]
h0m1 has joined #nixos-aarch64
ryantrinkle has joined #nixos-aarch64
cap_sensitive has joined #nixos-aarch64
<cap_sensitive> Hi. I'm trying to enable the w1-gpio-pullup module on a rpi4 with linux_rpi4 and rpi foundation's bootloader. I'm trying to integrate this pull request into my /etc/nixos config: https://github.com/NixOS/nixpkgs/pull/67989
<{^_^}> #67989 (by kwohlfahrt, 19 weeks ago, open): nixos/hardware.deviceTree: Allow use of dtmerge
<cap_sensitive> My configuration looks like this: https://gist.github.com/capsensitive/84c0e63627cf15fe41e167b274a38ad1
<cap_sensitive> When I do nixos-rebuild switch, I got the following error: error: syntax error, unexpected $undefined, at /nix/store/wsfcfqcjfgsnndjhv5pd5rw6bvsr2hpq-linux-4.19.75-1.20190925/dtbs/overlays/w1-gpio-pullup.dtbo:1:1
<cap_sensitive> Does it mean that I can't use the device tree that comes from the linux_rpi4 package? I've tried to use the example here: https://github.com/NixOS/nixpkgs/issues/67792#issuecomment-542347947
<cap_sensitive> But neither deviceTree.raspberryPiDtbs nor deviceTree.raspberryPiOverlays is defined
c00w has joined #nixos-aarch64
c00w has quit [Ping timeout: 245 seconds]
c00w has joined #nixos-aarch64
c00w has quit [Ping timeout: 240 seconds]
angerman has joined #nixos-aarch64
angerman has quit [Ping timeout: 246 seconds]
angerman has joined #nixos-aarch64
alunduil has joined #nixos-aarch64
c00w has joined #nixos-aarch64
cstrahan____ has joined #nixos-aarch64
lirzhv has joined #nixos-aarch64
NekomimiScience has joined #nixos-aarch64
pkral has joined #nixos-aarch64
feepo has joined #nixos-aarch64
jackdk has joined #nixos-aarch64
ToxicFrog` has quit [Ping timeout: 240 seconds]
elvishjerricco has joined #nixos-aarch64
chessai has joined #nixos-aarch64
davidtwco has joined #nixos-aarch64
ToxicFrog` has joined #nixos-aarch64
orivej has quit [Ping timeout: 272 seconds]
v0|d has quit [Read error: Connection reset by peer]
t184256 has left #nixos-aarch64 ["Error from remote client"]
18VAALRCL has joined #nixos-aarch64
17WAALH8B has joined #nixos-aarch64
t184256 has joined #nixos-aarch64
orivej has joined #nixos-aarch64
teevorian has joined #nixos-aarch64
sven_ has joined #nixos-aarch64
17WAALH8B has quit [Ping timeout: 258 seconds]
18VAALRCL has quit [Ping timeout: 268 seconds]
rajivr___ has joined #nixos-aarch64
<clever> cap_sensitive: i think the problem, is that the overlays on line 4, isnt device tree overlays, its nix overlays
<clever> cap_sensitive: so nix imported that file, and is trying to parse it as nix
<clever> cap_sensitive: though, the help says otherwise...
<cap_sensitive> Well, I think that overlay should be an attribute of the deviceTree?
<clever> cap_sensitive: what does the error say with --show-trace?
<cap_sensitive> In the last line, I was using w1-gpio-pullup, but even if I switch to w1-gpio, the error message is basically the same
<clever> cap_sensitive: that stack trace implies you put a dtbo into the imports list
<clever> cap_sensitive: can you gist the entire /etc/nixos/modules/device-tree.nix file?
<cap_sensitive> Yeah
<cap_sensitive> I think this one is stolen directly from that pull request
teevorian_ has joined #nixos-aarch64
<clever> while evaluating the attribute 'assertion' at /etc/nixos/modules/device-tree.nix:94:9:
<clever> while evaluating anonymous function at /etc/nixos/modules/device-tree.nix:94:53, called from /etc/nixos/modules/device-tree.nix:94:48:
<clever> cap_sensitive: ah, so nixos is trying to read the assertions, which resulted in line 94 being eval'd
<clever> (o: length o.params == 0) is the expr at column 53
<cap_sensitive> clever: I see. Now everything makes sense I think
<cap_sensitive> clever: The dtc is still not supported yet!
<cap_sensitive> Not dtc, the module with parameter
<clever> builder = mkOption {
<clever> type = types.enum (attrNames builders);
<clever> ah, it can only be dtc or dtmerge
teevorian has quit [Ping timeout: 260 seconds]
sven_ has quit [Ping timeout: 268 seconds]
<cap_sensitive> but dtc should be avaliable?
<clever> yeah
<clever> cap_sensitive: oh
<clever> its a submodule
<clever> type = types.listOf overlayType;
<clever> overlayType = types.submodule {
<clever> overlay = mkOption {
<clever> cap_sensitive: you want hardware.deviceTree.overlays = [ { overlay = "that path; } ];
<cap_sensitive> AH
<clever> nixos is expecting a list of modules in overlays
<clever> and if it encounters a file when it wanted a module, it import's that file
<clever> hence, the error about it parsing dtbo as nix
<cap_sensitive> It builds!
<cap_sensitive> clever: And the w1-gpio module works! THANK you so much
<clever> cap_sensitive: last time i messed with one-wire on the rpi (before device-tree support was added), it had trouble driving things over an reasonable cable length
<cap_sensitive> I spend the whole night looking for alternatives (found a w1-gpio-cl module that requires manual configuration but it works), but this solution is so nice
<clever> an AVR running at 5v can drive long cables with zero trouble
orivej has quit [Ping timeout: 268 seconds]
<cap_sensitive> clever: I'm planning to use long-wires (O(1m)). Currently I'm using the 3.3V power. If I switch to the on-board 5V, I should have no trouble running the long wires?
<clever> the rpi can only output 3.3v on the gpio lines
<cap_sensitive> But physical pin 2 is a 5 V output?
<clever> the gpio pins will be damaged if you apply 5v to them
<clever> and the problem i had, was how fast the one-wire data line returns to high
<cap_sensitive> OK. Then I have a problem
<clever> changing the pull-up resistor may help
<cap_sensitive> Noted
<clever> i didnt measure things with a scope to confirm things when i had issues
<cap_sensitive> Yeah we have plenty scopes. We'll measure it if we have problems
<clever> i remember the datasheets being pretty clear on the required rise times
<clever> should be easy to whack a smaller pullup in, to fix things
<cap_sensitive> clever: Thanks!
<clever> though, fall-times might become an issue if its too strong
<clever> i think each gpio is limited to 16mA
<clever> and depending on the capacitance of the entire cable length, you may not be able to suck energy out of it fast enough to pull it low
<DigitalKiwi> i use that for my LED strips
<clever> but is it bi-directional?
<DigitalKiwi> idk
<cap_sensitive> clever: Thanks
<clever> i dont think it is
<clever> so the rpi wouldnt be able to receive anything from the one-wire network
<DigitalKiwi> You can also use it to connect 5V logic out to 3V logic in, that's when you want to power the 74AHCT125 with 3V, it can safely read 5V logic on the input pins.
<DigitalKiwi> is that what you want
<clever> but one-wire is doing both directions on a single pin
<clever> so you need something that understands one-wire, and can change the direction on the fly
<makefu> i never had any issues with directly connecting 3.3v output of an esp8266 to a 5v logic of an ws2812
<clever> makefu: some 5v chips are designed to accept a 3.3v signal as high still
<clever> makefu: and some chips that run at 3.3v can accept 5v on their inputs (avr can, rpi will smoke)
<makefu> yep totally right, that is the power of hardware electronics stuff. it may work even if out of spec
<makefu> just wanted to say that i never used a level shifter for attaching an uC to led stripes :)
<DigitalKiwi> haven't tried without actually heh
<DigitalKiwi> 6 meters of those
<DigitalKiwi> if it doesn't need it that'd save a few dollars
<cap_sensitive> So what's the schematic for this? 5V -> converter -> thermistors -> 1 wire to pi?
<makefu> the cool thing with the ws2812b is that only the first LED will see the out-of-spec output level of the uC. after that the level will be 5v again
<cap_sensitive> And somehow the converter knows 1-wire and won't smoke the pi?
* DigitalKiwi is not good with the leccy
<DigitalKiwi> that chip did help me find a bug in kicad though lol
<DigitalKiwi> searching for dip 14 almost guaranteed a segfault
<DigitalKiwi> makefu: if the first chip is a few feet away from the pi will that be a problem
<DigitalKiwi> like...5 feet
<makefu> DigitalKiwi: that is definitly the case. i had issues like that and what i did was essentially adding a 'step-up' led right next to the esp
<makefu> of course it depends on how the leds are build, you can read that in the comments :)
<DigitalKiwi> i already have all the circuits built so i'll probably just leave it for this one lol
<clever> i was just thinking, about what my custom firmware could do in cases like this
<clever> in theory, you could create a custom VPU driver, that will convert a bitmap in ram, into a WS2812B output
<clever> and then from the linux/arm side, all you do is update the bitmap in ram
<clever> you just configure a width/height for the array, and then you have a plain image in ram
<clever> the VPU core's are basically unused, so you can shunt all of the processing off to them
<DigitalKiwi> to paint or cut wood :<
<DigitalKiwi> any elixir fans i made some elixir stickers
<DigitalKiwi> now in the middle of 36+2 agdaboi i had to make some sparkling nixos/haskell and they were out (only had done the background) and got glitter on everything ;_;
<DigitalKiwi> the wood is for my nixos lambdas so this is ontopic
<DigitalKiwi> that have a raspberry pi so double ontopic
<clever> Fatal VPU Exception: Misaligned
<clever> wooo, first time getting that one!
teevorian_ has quit [Quit: teevorian_]
ryantrinkle has quit [Ping timeout: 265 seconds]
mDuff has joined #nixos-aarch64
mDuff has quit [Ping timeout: 268 seconds]
h0m1 has quit [Quit: WeeChat 2.7]
h0m1 has joined #nixos-aarch64
ryantrinkle has joined #nixos-aarch64
ryantrinkle has quit [Ping timeout: 265 seconds]
mDuff has joined #nixos-aarch64
ryantrinkle has joined #nixos-aarch64
<thefloweringash> I tested running a simple vm on the c2.large.arm, it seems to work. (exact script I ran here https://gist.github.com/thefloweringash/21d3415356e6a11ec298bba8e88986de)
<thefloweringash> cpus seems to cap out at 16, probably due to `
<thefloweringash> didn't do any builds, going to head off for the night, but things look pretty positive
<samueldr> amazing
<gchristensen> oh cool
<gchristensen> I was just going to check in about if it was a good time to provision that server
<samueldr> I'm thinking it would be okay if the VMs are limited, and that we just run more of them on one host
<samueldr> not sure if there's a drawback to that though
<sphalerite> ah, nice! I hope builds work, last time I tried there were some… issues
<sphalerite> you'll very probably need to enable haveged in the VM or add a virtio random source via qemu (not sure of the exact details of how to do that), otherwise you'll get some very odd-looking hangs as things wait for entropy
<gchristensen> samueldr: can you tell me what makes you think that would be the right way (many small VMs)? to clarify -- I'm not saying I disagree in an underhanded way
<samueldr> not really sure, but I was thinking about if there are limitations we can't easily work through
<samueldr> like the number of CPUs
<gchristensen> ah, cool
<samueldr> though IIRC the number of CPUs can be fixed
pbb has quit [Ping timeout: 272 seconds]
pbb has joined #nixos-aarch64
pbb_ has joined #nixos-aarch64
pbb has quit [Ping timeout: 272 seconds]
orivej has joined #nixos-aarch64
t184256 has left #nixos-aarch64 ["Disconnected: Replaced by new connection"]
t184256 has joined #nixos-aarch64
orivej has quit [Ping timeout: 268 seconds]
mDuff has quit [Ping timeout: 268 seconds]
lovesegfault has joined #nixos-aarch64
<samueldr> I took a peek at the build-vm-script, it needs native build, I guess we're a step removed from working
* samueldr tries with nixpkgs.crossSystem set
lovesegfault has quit [Ping timeout: 258 seconds]
<samueldr> things are weird, will report back after the build
<samueldr> though cross-compiling doesn't start on aarch64, while it starts on x86_64
<samueldr> oops
<samueldr> I was building the qemu for armv7l, and not the system, while the system was still wanting to build native
<samueldr> (now fixed, I think)
<clever> samueldr: my hydra is also building armv7 now, on an rpi4 with a 32bit kernel
lovesegfault has joined #nixos-aarch64
<samueldr> okay... a bit of a detour, the cross-built vm, on x86_64-linux, boots on aarch64-linux, using impure qemu from PATH
<samueldr> having issues getting qemu to build for aarch64 through cross, looking into it
<samueldr> but anyway the better path would be to do the cross-compilation on aarch64 itself
<samueldr> okay, not stepping into that rabbit hole for now, python3 cross stuff
<clever> stdenv is done, and its on to openssl and cursing, lol
<samueldr> pretty sure I have the cross-compilation tweaks figured out for native aarch64 cross-compilation to armv7l
<samueldr> (this gets confusing quickly)
<samueldr> waiting on the community builder now :)
<samueldr> if this works it's self-bootstrapping in a trustable fashion as long as you trust your aarch64 system
<clever> nice
ryantrinkle has quit [Ping timeout: 268 seconds]
mDuff has joined #nixos-aarch64
<lovesegfault> clever: How can I build something like this for aarch64-linux?
<lovesegfault> in this example I want `bohr` to be built for aarch64
<lovesegfault> I have a builder, etc; I just don't know how to encode it in there
<lovesegfault> For building the system it was easy: https://gist.github.com/7892ceae560161bd0880972dc8930f63
<clever> lovesegfault: when you import <nixpkgs>, it also accepts a system= arg
<lovesegfault> clever: so I should import `<nixpkgs>` before importing `<home-manager>`?
<clever> one min...
<clever> lovesegfault: what does the first line of <home-manager/home-manager/home-manager.nix> say?
<lovesegfault> let me go look
<lovesegfault> Aaaaaaah
<lovesegfault> I see
<lovesegfault> I can pass `pkgs` to it :D
<clever> pkgs = import <nixpkgs> { system =
<clever> done!
<lovesegfault> clever: Thanks you :)
<samueldr> built and booted on the community machine
<samueldr> [root@nixos:~]# uname -a
<samueldr> Linux nixos 5.4.11 #1-NixOS SMP Sun Jan 12 11:21:53 UTC 2020 armv7l GNU/Linux
lovesegfault has quit [Quit: WeeChat 2.7]