<clever> samueldr: oh!!!, sd emulation, on a pico
<samueldr> that was something I wanted to see
<samueldr> if it was enough to bit-bang
<samueldr> though the usb interface is 1.1
<samueldr> I'm thinking that a teensy with its faster usb might be a better idea
<samueldr> usb device and host at 480mbps
srk has quit [*.net *.split]
nicoo has quit [*.net *.split]
<clever> samueldr: i think its 2.0
<samueldr> clever: no
<samueldr> >> 1 × USB 1.1 controller and PHY, with host and device support
<clever> > RP2040 contains a USB 2.0 controller that can operate as either:
<{^_^}> error: syntax error, unexpected ':', expecting ')', at (string):471:64
<clever> the docs are a confusing mess in some areas
<samueldr> you don't say
<samueldr> the release announcement states USB 1.1
<samueldr> though here teensy is Cortex-M7
<clever> page 393, section 4.1
<samueldr> I wonder if any of it can be more helpful compared to M0+
<samueldr> basically, we'd need to check what SD requires, and which inexpensive dev boards can accomodate it through USB with a host
<samueldr> ah
<samueldr> but
<samueldr> clever:
<samueldr> it's also a usb 3.0
<samueldr> and 4.0
<clever> SD commands are 1 bit per clock, over a single wire (spi like)
<samueldr> at 12mbps :)
<clever> SD data is up to 4 bits per clock in SDR mode
<clever> 50mhz usually
<samueldr> clever: multiple modes of operation, but yeah
<clever> but you can issue a stall before the data begins to flow
<clever> 512 bytes per packet
<samueldr> it'd be even nicer if we could design something that worked across different such inexpensive development boards
<clever> so you need to deal with reading 4 bits at a 50mhz external clock (PIO should be capable), and pop it all into a 512 byte blob in ram
<clever> then you can ship that off to something else
<clever> the PIO includes a shift register, which can do things like shift 4 bits on a single opcode
<clever> and it can shove a whole 32bit value from the shifter, into a fifo
<samueldr> yeah... but should we be satisfied with the easiest/slowest SD card?
<clever> and the fifo can be tied into dma, to auto-fill a buffer in ram
<samueldr> or should we look to see if we can support the higher clock speeds?
<clever> 4bit 50mhz SDR is the limit for pi0-pi3
<clever> pi4 adds DDR, 4 bits on both the rising and falling edge
<samueldr> stop thinking solely about the pi :)
<samueldr> it's a dead platform ;)
<clever> one sec...
v0|d has quit [Remote host closed the connection]
<clever> where did they hide it...
<samueldr> clever: but you do understand that the "usb 2.0" PHY operates at 12mbps, right?
<clever> i think its a 2.0 capable controller, but a 1.1 phy stuck on it?
<clever> so it cant run at 2.0 speeds
<samueldr> since, as the usb IF said: once a new usb spec is out, all new devices are at that version
<samueldr> nah
<samueldr> it's a usb 3.2 device at full speed rates
<samueldr> AFAIUI
<clever> oh god, that mess, lol
<samueldr> usb is just dumb like that in naming
<clever> [root@system76:~]# cat /sys/kernel/debug/mmc0/ios
<clever> clock: 50000000 Hz
<samueldr> the version is not about the speed
<clever> timing spec: 2 (sd high-speed)
<clever> bus width: 2 (4 bits)
<clever> signal voltage: 0 (3.30 V)
<samueldr> so yeah, 12mbps, is it enough for SD?
<clever> my laptop's internal SD interface is also 4bit 50mhz SDR, same as the pi0-pi3
* clever does math
<samueldr> (and communication overhead)
<samueldr> because it'd probably require some kind of protocol to deal with the computer
<samueldr> not enough ram to shove 4+GB images
<clever> > (4 * 50000000)/8 / 1000/1000
<{^_^}> attempt to call something which is not a function but an integer, at (string):471:1
<clever> ~25mbyte/sec
<clever> not counting overhead and stalls
<samueldr> so 12mbps is a bit on the low side
<samueldr> :)
<clever> yeah, it looks like SD can move 200mbps
<samueldr> 480mbps is 60MB/s
<samueldr> so yeah, we'd need 480mbps to achieve full speed of the sd interface
<clever> yeah
<samueldr> and more to account for the protocol
<samueldr> well
<samueldr> more than 200mbps
<samueldr> since we need to carry bytes from the computer to the sd interface through the mcu
<clever> with 256kb of ram, thats enough to buffer 512 blocks of 512 bytes each
srk has joined #nixos-aarch64
<clever> but that usb link will be a major bottleneck
<samueldr> yeah
<samueldr> note that we also need RAM to run things :)
<clever> it has 264kb of ram total, but the spi flash is XIP
<samueldr> isn't 256kb only on-board RAM, isn't there more ram generally available on the impleementations?
<clever> there are 4 banks of 64kb of ram, and 2 banks of 4kb of ram
<samueldr> not sure how that ram differs
<clever> the 4*64kb can be accessed in either linear or raid0 modes
<clever> and concurrent access to different banks can happen, in the same clock cycle
<clever> the implementation stuff, is the spi flash with XIP support
<clever> up to 16mb
<samueldr> anyway, the usb speed is probably a non-starter :/
<clever> due to the limited write count, you should treat the spi as an external rom
tilpner_ has joined #nixos-aarch64
nicoo has joined #nixos-aarch64
tilpner has quit [Ping timeout: 240 seconds]
tilpner_ is now known as tilpner
h0m1 has quit [Quit: WeeChat 3.0]
h0m1 has joined #nixos-aarch64
srk has quit [Ping timeout: 268 seconds]
srk has joined #nixos-aarch64
orivej has joined #nixos-aarch64
h0m2 has joined #nixos-aarch64
h0m1 has quit [Ping timeout: 265 seconds]
srk has quit [Remote host closed the connection]
srk has joined #nixos-aarch64
rajivr has joined #nixos-aarch64
zarel has quit [Ping timeout: 240 seconds]
zarel has joined #nixos-aarch64
cole-h has quit [Ping timeout: 265 seconds]
Darkmatter66 has joined #nixos-aarch64
<colemickens> bbigras: I might be doing something wrong, but it hung for me: https://photos.app.goo.gl/ubcxKxgdRmbgD4Eb6
<colemickens> bbigras: that's u-boot trying to boot 5.10.9
<colemickens> I didn't update eeprom idk if that is related
<samueldr> colemickens: serial?
<samueldr> I don't know what p//bb used to say it worked
<samueldr> maybe it doesn't have GPU going yet
<samueldr> maybe we don't compile the right stuff in
<samueldr> colemickens: additionally, uboot 2021.01?
<samueldr> (I wouldn't assume it changes anything compared to 2020.10, but I don't actually know)
<samueldr> oh, hard disk... maybe that's another variable
<samueldr> I should test for myself
<samueldr> though, another day
<samueldr> the next release is only ~4 months away give or take
<colemickens> I hadn't considered the usb disk being a factor.
<samueldr> might not be, though maybe the initrd works, without the appropriate kernel module loaded in, and usb either?
<samueldr> basing the kernel module stuff on my experience with the pi3 and mainline
<samueldr> it _needs_ that kernel module to do modesetting and have the modesetting console
<samueldr> though I'm not really being useful, only shouting all doubts coming to mind :)
* colemickens nods
justanotheruser has quit [Ping timeout: 264 seconds]
<colemickens> does rpi foundation really not bother to have any sort of changelog for the "firmware" bits -_-
<colemickens> I could try bumping it but eh
<colemickens> might have to crack open it's little case and hook up a uart
<samueldr> colemickens: magic bit soup goes more or less magicy at start
<colemickens> I meant the other "firmware" https://github.com/raspberrypi/firmware/tree/master/boot
<colemickens> where the commit msg is about the kernel and touches every file /shrug
<samueldr> ah, right, the firmware, not the firmware
<samueldr> :x
<samueldr> colemickens: I think it's supposed to be among these updates https://downloads.raspberrypi.org/raspbian/release_notes.txt
<samueldr> but seems to often lack the details
<colemickens> almost the year anniversary of the last update too
<samueldr> right
<samueldr> it's not raspbian anymore
<samueldr> but still, not really any details
<colemickens> good enough, there's a commit to use
<colemickens> why can't they tag it?
<colemickens> oh well
<colemickens> thanks for the pointers
<samueldr> that would be too easy
<samueldr> why isn't it more open source?
zupo has joined #nixos-aarch64
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
superherointj has joined #nixos-aarch64
zupo has joined #nixos-aarch64
superherointj has quit [Client Quit]
superherointj has joined #nixos-aarch64
hexa- has quit [*.net *.split]
danielrf[m] has quit [*.net *.split]
yangm has quit [*.net *.split]
Ericson2314 has quit [*.net *.split]
jdnixx-M has quit [*.net *.split]
jdnixx-M has joined #nixos-aarch64
danielrf[m] has joined #nixos-aarch64
Ericson2314 has joined #nixos-aarch64
yangm has joined #nixos-aarch64
hexa- has joined #nixos-aarch64
yangm has quit [Ping timeout: 242 seconds]
Ericson2314 has quit [Ping timeout: 242 seconds]
craige[m] has quit [Ping timeout: 268 seconds]
submoo[m] has quit [Ping timeout: 240 seconds]
danielrf[m] has quit [Ping timeout: 258 seconds]
thefloweringash has quit [Ping timeout: 268 seconds]
mica[m] has quit [Ping timeout: 260 seconds]
puzzlewolf has quit [Ping timeout: 268 seconds]
Ox4A6F has quit [Ping timeout: 244 seconds]
hiroshi[m] has quit [Ping timeout: 244 seconds]
DavHau[m] has quit [Ping timeout: 246 seconds]
veleiro has quit [Ping timeout: 240 seconds]
manveru[m] has quit [Ping timeout: 240 seconds]
JJJollyjim has quit [Ping timeout: 240 seconds]
noneucat has quit [Ping timeout: 244 seconds]
leonardp has quit [Ping timeout: 244 seconds]
pinage404[m] has quit [Ping timeout: 244 seconds]
roberth has quit [Ping timeout: 244 seconds]
pachumicchu has quit [Ping timeout: 268 seconds]
LinuxHackerman has quit [Ping timeout: 268 seconds]
flo[m] has quit [Ping timeout: 268 seconds]
edrex has quit [Ping timeout: 240 seconds]
colemickens has quit [Ping timeout: 240 seconds]
fgaz has quit [Ping timeout: 240 seconds]
siraben has quit [Ping timeout: 240 seconds]
Dandellion has quit [Ping timeout: 240 seconds]
unclechu has quit [Ping timeout: 240 seconds]
bbigras has quit [Ping timeout: 240 seconds]
cornu has quit [Ping timeout: 246 seconds]
l-as has quit [Ping timeout: 260 seconds]
kloenk has quit [Ping timeout: 268 seconds]
Danct12[m] has quit [Ping timeout: 268 seconds]
Ke has quit [Ping timeout: 268 seconds]
hpfr has quit [Ping timeout: 268 seconds]
dtz has quit [Ping timeout: 268 seconds]
superherointj has quit [Quit: Leaving]
superherointj has joined #nixos-aarch64
superherointj has quit [Client Quit]
zarel has quit [Ping timeout: 265 seconds]
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
DavHau[m] has joined #nixos-aarch64
bbigras has joined #nixos-aarch64
manveru[m] has joined #nixos-aarch64
pinage404[m] has joined #nixos-aarch64
kloenk has joined #nixos-aarch64
LinuxHackerman has joined #nixos-aarch64
puzzlewolf has joined #nixos-aarch64
Danct12[m] has joined #nixos-aarch64
colemickens has joined #nixos-aarch64
edrex has joined #nixos-aarch64
Ox4A6F has joined #nixos-aarch64
hpfr has joined #nixos-aarch64
unclechu has joined #nixos-aarch64
Ericson2314 has joined #nixos-aarch64
danielrf[m] has joined #nixos-aarch64
dtz has joined #nixos-aarch64
Ke has joined #nixos-aarch64
leonardp has joined #nixos-aarch64
l-as has joined #nixos-aarch64
submoo[m] has joined #nixos-aarch64
flo[m] has joined #nixos-aarch64
siraben has joined #nixos-aarch64
JJJollyjim has joined #nixos-aarch64
mica[m] has joined #nixos-aarch64
roberth has joined #nixos-aarch64
fgaz has joined #nixos-aarch64
noneucat has joined #nixos-aarch64
thefloweringash has joined #nixos-aarch64
cornu has joined #nixos-aarch64
hiroshi[m] has joined #nixos-aarch64
Dandellion has joined #nixos-aarch64
yangm has joined #nixos-aarch64
veleiro has joined #nixos-aarch64
craige[m]1 has joined #nixos-aarch64
pachumicchu has joined #nixos-aarch64
mahogany has joined #nixos-aarch64
superherointj has joined #nixos-aarch64
superherointj has quit [Quit: Leaving]
zupo has joined #nixos-aarch64
zupo has quit [Client Quit]
zupo has joined #nixos-aarch64
zarel has joined #nixos-aarch64
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orivej has quit [Ping timeout: 265 seconds]
dev_mohe has joined #nixos-aarch64
<dev_mohe> Hi, when running `nix-build nixos -I nixos-config=nixos/modules/installer/cd-dvd/sd-image-raspberrypi4.nix -A config.system.build.sdImage --argstr system aarch64-linux` does anybody else also get `ErroSysError~executing '/nix/store/ksfgyji1gnn5lzjgb03knlz7kav1wj8i-bash-4.4-p23/bin/bash': No such file or directory` or knows how to fix it?
zupo has joined #nixos-aarch64
<pbb> dev_mohe: are you doing this on an aarch64 machine?
<dev_mohe> no, I'm using qemu emulation (binfmt)
<dev_mohe> on NixOS
<dev_mohe> x86_64
<pbb> sounds like it can not find the qemu binary
<pbb> can you do `ls -l /run/binfmt/aarch64-linux` ?
<pbb> does it exist?
<dev_mohe> ```ls -l /run/binfmt/aarch64-linux
<dev_mohe> -rwxr-xr-x 1 root root 103 Jan 22 14:38 /run/binfmt/aarch64-linux``` so yes
<pbb> and in /proc/sys/fs/binfmt_misc/aarch64-linux it is set as interpreter?
<dev_mohe> ```
<dev_mohe> cat /proc/sys/fs/binfmt_misc/aarch64-linux
<dev_mohe> enabled
<dev_mohe> interpreter /run/binfmt/aarch64-linux
<dev_mohe> flags:
<dev_mohe> offset 0
<dev_mohe> magic 7f454c460201010000000000000000000200b700
<dev_mohe> mask ffffffffffffff00ffffffffffff00fffeffffff
<dev_mohe> ``` seems like it
<pbb> ,paste
<{^_^}> Use a website such as [ https://gist.github.com/ https://hastebin.com/ http://sprunge.us/ https://paste.ee/ ] or similar services to share anything that's longer than a couple lines.
<pbb> but yes
<pbb> looks good
<pbb> I'm trying the same now
<pbb> I usually use `--system aarch64-linux` instead of argstr, let's see if that makes a difference
<pbb> I get: modprobe: FATAL: Module sun4i_drm not found in directory /nix/store/9n2rlgg5r808rd85jqmb0qkimm2q9v01-linux-5.4.79-1.20201201-modules/lib/modules/5.4.79
<pbb> D:
<pbb> I'll try building an sd-image-aarch64-new-kernel.nix instead
<dev_mohe> I should probably mention that I'm using flakes...
<pbb> oh, but the command you posted is not using flakes?
<dev_mohe> I use https://github.com/nrdxp/nixflk and I think it should handle both
<dev_mohe> but not sure
<dev_mohe> is there an alternative command for flakes because the wiki didn't help
<pbb> you posted a command to build an sd-image that works independently of nixflk or flakes
<pbb> dev_mohe: I can not reproduce your problem. Running `nix-build nixos -I nixos-config=nixos/modules/installer/cd-dvd/sd-image-aarch64-new-kernel.nix -A config.system.build.sdImage --argstr system aarch64-linux` in my nixpkgs master checkout works.
<pbb> what nixpkgs version/checkout are you using?
<dev_mohe> b91b91c03bdf6377f0e1bae9fba73f3715a33837 which should be current master
<dev_mohe> system: "x86_64-linux", multi-user?: yes, version: nix-env (Nix) 2.4pre20201205_a5d85d0, channels(root): "", channels(moritz): "", nixpkgs: /nix/store/15l3rwi1apxdh12dy2mrd1bhry2006r5-source shows empty channels so it should not be able to pick up a wrong version
<pbb> can you run a nix-collect-garbage and try again?
<dev_mohe> still the same. I already verified the store but no errors. I think it may have something to do with flakes or some strange config.
<pbb> As I said: The command you sent does _not_ use flakes in anyway
<dev_mohe> but then how should I use it instead? because it would make sense then that it doesn't work because i have no channels or so idk
<pbb> you're not using flakes and you're also not using channels and that's fine
<pbb> does /nix/store/ksfgyji1gnn5lzjgb03knlz7kav1wj8i-bash-4.4-p23/bin/bash exist?
<pbb> can you run it from a normal shell?
<dev_mohe> it exists and I can run it on the host machine
<pbb> are you using a nixUnstable or nixFlakes nix-daemon on the host?
<pbb> like: is `nix.package = pkgs.nixUnstable;` in your host config?
<dev_mohe> nix.package = pkgs.nixFlakes;
<pbb> okay, I'll try that and see if it gives me the same error
<dev_mohe> thanks a lot for helping btw.
<pbb> I'm curious what the problem is as well
<pbb> strange, it's the same with nixFlakes for me
<dev_mohe> like it doesnt work or it works?
<pbb> sd-image-raspberrypi4 fails but with a different error as yours, sd-image-aarch64-new-kernel works
<pbb> I'm pretty sure it's something with your binfmt setup
<pbb> maybe /run/binfmt isn't in your sandbox paths
<dev_mohe> I think I just set `boot.binfmt.emulatedSystems = [ "aarch64-linux" ];`
<pbb> what is nix.sandboxPaths on your host machen?
<pbb> *machine
<pbb> `nixos-option -I nixos-config=hosts/regolith/configuration.nix nix.sandboxPaths`
<pbb> but with your host config obviously
<pbb> for me it is set to `[ "/run/binfmt" "/nix/store/rhl4j0mpxcl9xrh0xi17xc8amzz0w0gf-qemu-5.1.0" ]`
<pbb> maybe your nix daemon wasn't restarted properly when you activated the binfmt thing?
<pbb> have you tried turning it off and on again?
<dev_mohe> `Value:
<dev_mohe> [
<dev_mohe>   "/run/binfmt"
<dev_mohe>   "/nix/store/rhl4j0mpxcl9xrh0xi17xc8amzz0w0gf-qemu-5.1.0"
<dev_mohe> ]`
<dev_mohe> will reboot, be right back
dev_mohe has quit [Quit: Connection closed]
dev_mohe has joined #nixos-aarch64
<dev_mohe> I'm back although I lost the chat history. Would there have been a way to keep it? (probably not using the web interface)
<pbb> yeah, not using the web interface
<pbb> I use quassel
<pbb> I run the quasselcore daemon on a server, it keeps connected and logs everything even when my desktops and laptops are off. Then I can connect from any computer using the quassel client.
<dev_mohe> how does nix find qemu?
<pbb> in doesn't. the kernel does.
<dev_mohe> ahh yeah, just check the sandbox qemu is the same as the binfmt one
<pbb> yes
<pbb> but it should be, because both are from your system configuration
<dev_mohe> I have some suspicions with the nixflk config - give me a moment
<pbb> it still doesn't work?
<dev_mohe> I found some interactiveShellInit settings in the flake template I'm using and I now get another error message (also disabled sandbox though)
<pbb> now try building sd-image-aarch64-new-kernel instead of sd-image-raspberrypi4 please
alpernebbi has joined #nixos-aarch64
<pbb> sd-image-raspberrypi4 broke with this I think: https://github.com/NixOS/nixpkgs/pull/78430
<pbb> but sd-image-aarch64-new-kernel can boot on the raspberry pi as well (using mainline kernel)
<{^_^}> #78430 (by puckipedia, 51 weeks ago, merged): nixos/stage-1: Do not allow missing kernel modules in initrd
<dev_mohe> https://gist.github.com/mohe2015/2ba5c283893df7e240c7a5585eb67d75 at least a different error message
<pbb> oh ouch
<dev_mohe> but this means that not a clean bash is used
<pbb> that is because you disabled the sadnbox i suppose
<pbb> *sandbox
<dev_mohe> I'm checking
<pbb> usually /usr/bin/env should not exist in the sandbox in the first place
<dev_mohe> dammit you were right
<pbb> so now? does it work?
<dev_mohe> no with the sandbox I get the original error again
<dev_mohe> `nix-build nixos -I nixos-config=nixos/modules/installer/cd-dvd/sd-image-aarch64-new-kernel.nix -A config.system.build.sdImage --system aarch64-linux -j 1` for this
<pbb> meh
<pbb> can you check if the correct sandbox paths are in /etc/nix/nix.conf?
<dev_mohe> `extra-sandbox-paths = /run/binfmt /nix/store/rhl4j0mpxcl9xrh0xi17xc8amzz0w0gf-qemu-5.1.0`
<dev_mohe> matches binfmt `exec -- /nix/store/rhl4j0mpxcl9xrh0xi17xc8amzz0w0gf-qemu-5.1.0/bin/qemu-aarch64 "$@"`
<pbb> yes that looks good
<pbb> hm. I'm out of ideas. you can download an sd-image-aarch64-new-kernel from hydra and boot it on your raspberry pi, but it's probably not what you want?
<dev_mohe> yeah I know thanks, but I would like to do some modifications and play with it.
<dev_mohe> still thanks a lot for your efforts
<pbb> You can also build an sd-image-aarch64-new-kernel on your raspberry pi afterwards
<dev_mohe> oh no :D
<pbb> with your modifications
<pbb> it shouldn't take so long
<dev_mohe> you're right, because of the binary cache, I forgot
<pbb> binfmt on a fast x86 is actually similar speed as native aarch64 on th raspberry pi 4
<dev_mohe> https://gist.github.com/mohe2015/06568e8c98ed103917ab9e7f424886e0 is the log if anybody has an idea. Although the location was somewhere else. I also thought it may be the pkgs.writeText or so but I don't know how that can break
<pbb> I'm pretty sure it's a problem with qemu not being available in the sandbox
<pbb> but not sure how to solve it. as a last resort you try to set `nix.package = pkgs.nix;` on your host system?
<dev_mohe> ok thx, I will try to find some more details about that. But it's not too important for me
<pbb> good luck! I gotta go
<dev_mohe> bye
<dev_mohe> thanks again
dev_mohe has left #nixos-aarch64 [#nixos-aarch64]
dev_mohe has joined #nixos-aarch64
dev_mohe has quit [Remote host closed the connection]
dev_mohe has joined #nixos-aarch64
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zupo has joined #nixos-aarch64
dev_mohe has quit [Quit: dev_mohe]
dev_mohe has joined #nixos-aarch64
dev_mohe has quit [Remote host closed the connection]
dev_mohe has joined #nixos-aarch64
justanotheruser has joined #nixos-aarch64
dev_mohe has quit [Remote host closed the connection]
dev_mohe has joined #nixos-aarch64
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zupo has joined #nixos-aarch64
dev_mohe has quit [Ping timeout: 260 seconds]
dev_mohe has joined #nixos-aarch64
dev_mohe has quit [Client Quit]
zupo_ has joined #nixos-aarch64
sarcasticadmin has quit [Read error: Connection reset by peer]
zupo has quit [Ping timeout: 265 seconds]
<LinuxHackerman> I've managed to build a firmware for the honeycomb in nix
<LinuxHackerman> not a working firmware. But a firmware nonetheless.
cole-h has joined #nixos-aarch64
<Ke> if it's bits that go the a mass storage device, who's going to notice
<Ke> not like anyone boots computers anyway
<Ke> how far off is it from working state?
<Ke> notginh on the screen?
<Ke> where screen is serial console obviously
<LinuxHackerman> yep nothing. But I just realised I was still using the non-working u-boot build soooooooo
<LinuxHackerman> (using the non-working u-boot build with extra steps, instead of combining the atf with the tianocore that I'd built)
<Ke> wrong boot source
<Ke> wrong boot source?
<LinuxHackerman> no, just adding a bl33 argument to the atf expression and then not using it in the atf expression :|
<Ke> yes I guess your previous comment elaborated
<LinuxHackerman> eeh still not working though. I think it's failing before that stage anyway, since I don't get anything from the BL2 stage
zupo_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rajivr has quit [Quit: Connection closed for inactivity]
<LinuxHackerman> it booted!!!! :D :D :D
<LinuxHackerman> Emil Karlson: will commit and push the ugly mess now
<Ke> nice
<LinuxHackerman> `nix-build release.nix -A lx2k.uefi --argstr system aarch64-linux`
<LinuxHackerman> (it won't currently cross-compile)
<LinuxHackerman> (also the RAM speed is hardcoded)
<LinuxHackerman> (to 2900MHz)
<Ke> I don't even have any non-aarch64 nixoses anyway
<LinuxHackerman> oh nice
<Ke> I maintain 4 x86 nixoses at work though
<LinuxHackerman> oh element and its conversion of the letter x into a multiplication sign…
Darkmatter66 has quit [Ping timeout: 265 seconds]
orivej has joined #nixos-aarch64
dev_mohe has joined #nixos-aarch64
orivej has quit [Ping timeout: 264 seconds]
pbb has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
<samueldr> neat! the peeps working on the somewhat-liberated modem firmware for the pinephone might soon have a replacement for yet another proprietary component
cole-h has quit [Ping timeout: 246 seconds]
alpernebbi has quit [Quit: alpernebbi]
<{^_^}> #110540 (by mohe2015, 41 seconds ago, open): Can't cross-compile aarch64 images on x86_64 with binfmt and flake master
pbb has joined #nixos-aarch64
<samueldr> sorry to be a nit picker, but it's not cross-compiling unless it comes from the champagne region, otherwise it's bubbling compilation
<samueldr> uh, unless it's using a cross-compiler* otherwise it's native compilation through qemu-user
<samueldr> it's important because it changes a lot of assumptions
<dev_mohe> oh yeah, better now?
<samueldr> sure :)
<samueldr> it's also about future users searching through issues; generally solutions for one don't apply for the other
<samueldr> dev_mohe: can you run `file /nix/store/fj18xk7dwk706mfki61klg69dg84gsim-bootstrap-tools/bin/bash`?
<dev_mohe> of course, I just forgot that it's not actually called like that. Thanks for teaching.
<samueldr> (sorry if you did earlier and I missed it)
<samueldr> because `No such file or directory` on running a binary tells me that it might not be using qemu through binfmt, but maybe the binary is somehow wrong in another manner?
<dev_mohe> `file /nix/store/fj18xk7dwk706mfki61klg69dg84gsim-bootstrap-tools/bin/bash
<dev_mohe> /nix/store/fj18xk7dwk706mfki61klg69dg84gsim-bootstrap-tools/bin/bash: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /nix/store/fj18xk7dwk706mfki61klg69dg84gsim-bootstrap-tools/lib/ld-linux-aarch64.so.1, for GNU/Linux 2.6.32, stripped`
<samueldr> alright, looks good~ ish
<samueldr> odd, busybox doesn't ship binaries for aarch64?
<samueldr> I would have asked you to use a static binary to check if binfmt was working
<samueldr> you could, though, try building `pkgsCross.aarch64-multiplatform.pkgsStatic.hello`, which in turn will give you a static hello binary
<dev_mohe> I can run the bash. strangely the shell looks like `\[\][\[\]root@nixos:~/nixpkgs]#\[\]` then
<samueldr> (cross-compiled this way)
<samueldr> right
<samueldr> then I wonder if it's the sandbox not being able to use the qemu
<samueldr> in fact, I would assume the `no such file or directory` *is* that
<samueldr> uh, in theory*
<dev_mohe> ./etc/nix/nix.conf contains `extra-sandbox-paths = /run/binfmt /nix/store/rhl4j0mpxcl9xrh0xi17xc8amzz0w0gf-qemu-5.1.0`
<dev_mohe> but the sandbox is more or less the only possibility left
<dev_mohe> especially as I get another error when running without the sandbox about sh. Although this may be because of some sandbox internals I don't know of
<samueldr> is the qemu path direct to the binary, or a wrapper?
<samueldr> that could be wrapping qemu from another path
<samueldr> I assume here that adding a nix store path to the sandbox does not bring in all dependencies intrinsically
<dev_mohe> `ls -l /nix/store/rhl4j0mpxcl9xrh0xi17xc8amzz0w0gf-qemu-5.1.0/bin/qemu-aarch64
<dev_mohe> -r-xr-xr-x 1 root root 6071408 Jan 1 1970 /nix/store/rhl4j0mpxcl9xrh0xi17xc8amzz0w0gf-qemu-5.1.0/bin/qemu-aarch64`
<dev_mohe> you mean this?
<samueldr> yeah, is it qemu's ELF or a wrapper script?
<dev_mohe> /nix/store/rhl4j0mpxcl9xrh0xi17xc8amzz0w0gf-qemu-5.1.0/bin/qemu-aarch64: ELF 64-bit LSB pie executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /nix/store/m0xa5bz7vw7p43wi0jppvvi3c9vgqvp7-glibc-2.32-25/lib/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, stripped`
<dev_mohe> `file /nix/store/rhl4j0mpxcl9xrh0xi17xc8amzz0w0gf-qemu-5.1.0/bin/qemu-aarch64
<samueldr> is that ld-linux interpreter available in the sandbox?
<samueldr> (I'm not up to date with the NixOS binfmt modules)
<samueldr> (which is what I tried using in the past before there was a NixOS module)
<clever> ldd sets some magic vars, which causes ld-linux.so to print libs instead of running main()
<clever> the arm ldd, winds up causing the x86 ld-linux.so for qemu to print the vars, and never actually run qemu's main()
<clever> so it never runs the arm ld-linux.so
<dev_mohe> sorry but I don't understand at all what this should tell me :D
<clever> you need a static build of qemu, for ldd to function properly
<dev_mohe> but how did people (including me) do this in the past then?
zupo has joined #nixos-aarch64
<samueldr> you'd need to compare changes from a known-good revision of Nixpkgs for your system build
<samueldr> (sorry, I really haven't been using binfmt from NixOS)
<dev_mohe> I did this ages ago and likely not with flakes. But as I have a reproducible example with a cloud-server I may just try some versions there.
<samueldr> maybe a package was built static beforehand, and now isn't
<samueldr> dev_mohe: I would hazard a bet that flakes isn't part of the issue
<samueldr> except maybe, but not really because of flakes, but maybe if you have an overlay from a flake that replaces qemu or something of the like
<dev_mohe> see the linked gist. it's vanilla and I don't think there is anything strange in there
jumper149 has joined #nixos-aarch64
<dev_mohe> also works on my local machine with a way more complex cofig
<colemickens> you know what that kind of looks like?
<colemickens> a mismatched arch thing, somehow you're pulling in another nixpkgs and not passing in the right system to it
<colemickens> so you're getting an x86_64 bash and then that results in the "not found" error
<samueldr> colemickens: here I was going on the assumption that the qemu binary being dynamic is what's wrong
zupo has quit [Client Quit]
zupo has joined #nixos-aarch64
Acou_Bass has joined #nixos-aarch64
<colemickens> maybe, I just sort of recognized this error and remember it popping up after adopting flakes and wanted to throw it out
<samueldr> right, not saying it can't be the issue
adisbladis has quit [Ping timeout: 256 seconds]
adisbladis has joined #nixos-aarch64
zupo has quit [Client Quit]
<colemickens> it looks like I 'mv' instead of 'git mv' in the past and lost the history, but I can see somewhere that I was importing a fetchFromGitHub'ed nixpkgs (rather than using flakes) deep inside my config, and had to add `system = pkgs.system` to the import to get it to do the "right thing" when I evaluated my config on x86_64.
ib07 has quit [Ping timeout: 256 seconds]
ib07 has joined #nixos-aarch64
zupo has joined #nixos-aarch64
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dev_mohe> I think this is the buggy one but I need to check again https://github.com/NixOS/nixpkgs/commit/08135a3caa45ed8d278099b60d64bdaf6987d5b9
zupo has joined #nixos-aarch64
<dev_mohe> confirmed. Any ideas on how to fix it?
<samueldr> dev_mohe: refer to the PR breaking the change in your issue and ping the author of that PR
<dev_mohe> I think I did, didn't I?
<samueldr> (I haven't checked)
<samueldr> then good :)
<dev_mohe> thanks again people for the efforts.
dev_mohe has quit [Quit: dev_mohe]
dev_mohe has joined #nixos-aarch64
heywoodlh has quit [Quit: ZNC 1.8.2 - https://znc.in]
zarel has quit [Ping timeout: 240 seconds]
heywoodlh has joined #nixos-aarch64
bdju has quit [Read error: Connection reset by peer]
bdju has joined #nixos-aarch64
dev_mohe has quit [Quit: dev_mohe]
{^_^} has quit [Remote host closed the connection]
{^_^} has joined #nixos-aarch64
Acou_Bass has quit [Ping timeout: 256 seconds]
Acou_Bass has joined #nixos-aarch64
<colemickens> I think I got the kernel to boot but it doesn't see usb storage to pivot to stage-2. I had fixed this with the old bootloader setup, seems like from Arch forums there might be another module or two to add to fix?
<colemickens> It also looks like there's another u-boot patch on master to help booting larger kernels on rpi3/4 that hasn't hit nixos-unstable(-small) yet. Though, like I said, I did actually see the kernel boot. (Updating the "firmware" [start.elf and friends] seemed to unlock that step)
<samueldr> colemickens: is that patch the one coming from p//bb? :)
<colemickens> oh had to look it up the get the acronym, :P yes.
<samueldr> that's their nickname here
<colemickens> aha
orivej has joined #nixos-aarch64
<samueldr> hm, can't find the patch on the patchwork
<samueldr> unless you mean on our master branch
<samueldr> (now I think that's what you meant)
<samueldr> as far as the driver to add, it should be trivial
<samueldr> if you know the name
<samueldr> just like that PR you're already aware of https://github.com/NixOS/nixpkgs/pull/110435
<{^_^}> #110435 (by superloach, 19 hours ago, open): nixos/modules: add "sdhci_pci" to availableKernelModules
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<colemickens> we have the raspberrypi loader too, but it didn't get updated for rpi4
h0m2 has quit [Quit: WeeChat 3.0]
h0m1 has joined #nixos-aarch64
tilpner has quit [Remote host closed the connection]
tilpner has joined #nixos-aarch64