orivej has quit [Ping timeout: 245 seconds]
wildtrees has quit [Quit: Leaving]
ryantrinkle has joined #nixos-aarch64
pbb has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
pbb has joined #nixos-aarch64
orivej has joined #nixos-aarch64
ryantrinkle has quit [Ping timeout: 245 seconds]
orivej has quit [Ping timeout: 258 seconds]
ryantrinkle has joined #nixos-aarch64
ryantrinkle has quit [Ping timeout: 245 seconds]
FRidh has joined #nixos-aarch64
Thra11 has joined #nixos-aarch64
<Thra11> samueldr, clever: I am having trouble building python2.7-setuptools with aarch64 building for armv6l: "ImportError: No module named _ctypes"
<Ashy> ran a comparison phoronix test run compared to michael's rpi 4 run: https://openbenchmarking.org/result/1907137-KH-1907127HV48
<Ashy> the rockpro64 armbian bionic is my numbers
<Ashy> still havent got around to getting nixos running properly on this thing yet
<FRidh> Thra11: is that using cross or not?
orivej has joined #nixos-aarch64
<Thra11> FRidh: no. just with armv6l-linux in extra-platforms
<Thra11> (I was replying to some things said on Thursday)
Thra11 has quit [Ping timeout: 258 seconds]
Thra11 has joined #nixos-aarch64
ryantrinkle has joined #nixos-aarch64
<gchristensen> my CM1 flash tool arrived
<clever> gchristensen: CM1?
<gchristensen> compute module 1
<clever> gchristensen: it needs a special flash tool?
<gchristensen> yeah
<gchristensen> :)
<gchristensen> no easy headers on it
<clever> last i heard, the CM will just boot into usb gadget mode
<clever> and then a piece of custom software on linux can shove over a mass-storage driver
<clever> causing the entire CM1 to emulate a mass-storage device
<gchristensen> yeah exactly
<gchristensen> the flash tool gets you access to the right pins, and a USB header
<clever> so you just need to connect the usb pins of the CM1 to a micro-usb jack
<clever> ah
<clever> for when your host board lacks those i guess
<gchristensen> it does :)
<clever> ah
<clever> i recently also discovered this
<clever> it combines several of the past thigns ive looked into
<clever> a lot of pcie extenders, abuse usb 3.0 cables, because its a cheap source of differential wiring
<clever> and in the rpi4 case, you have the pcie and usb3.0 pins right beside eachother, where the usb controller went!
<clever> so if you just hot-wire the pcie bus to the usb3.0 bus, you can plug one of those extenders in
<gchristensen> s I guess the challenge for me now is to make a root disk image to copy over
<clever> i belive the CM1 boots identically to all the other pi's
<clever> and you force usb boot by grounding a certain pin on the SD card, so it fails to find bootcode.bin
orivej has quit [Ping timeout: 268 seconds]
<clever> page 7
<clever> EMMC_DISABLE_N
<clever> i think its a digital switch, that disconnects the SD_CLK line
<gchristensen> I don't have an SD card :)
<clever> causing all SD card access to fail, so it falls back
<clever> the SD_CLK goes to the eMMC chip
<gchristensen> ah
<clever> eMMC is just an SD card in a surfacemount package
<gchristensen> I thought eMMC was a higher quality medium?
<clever> that too
<clever> but its basically the identical protocol and pinout
<gchristensen> oh cool
<clever> page 8 shows the CM3 (lite)
<clever> the lite version just omits the eMMC, and both route the SD bus to the 200 pin connector
<gchristensen> I think we can't cross compile nixos yet, right?
<clever> aarch64.nixos.community
<gchristensen> armv6
<clever> ah right, CM1 might be the 6 only chip...
<gchristensen> yeah :)
<clever> aarch64 can run v6 opcodes
<clever> you just have to fix the purity bugs
<gchristensen> "just" :P
<{^_^}> #56285 (by cleverca22, 19 weeks ago, open): python ctypes extension fails to build due to purity issues
<clever> this will likely be the biggest blocker
<clever> https://github.com/NixOS/nixpkgs/issues/56290 may block systemd building
<{^_^}> #56290 (by cleverca22, 19 weeks ago, open): kexec-tools arch purity problem
<clever> it switches the CLK from the eMMC between the main cpu, and just a solid 1.8v
<clever> and a pullup ties the control line to 3.3v
<clever> so shorting EMMC_DISABLE_N to gnd will tie the CLK to 1.8v, and cause all eMMC activity to fail
<clever> and the boot rom will then fallback to usb gadget booting
<clever> in theory, this lets you push any bootcode.bin file over
<clever> i think the official bootcode.bin does support loading start.elf from usb too, but havent confirmed that
<clever> there is also an msg/bootcode.bin, that turns the pi into a msd
<gchristensen> yeah, I'm there now
<clever> and the last piece of the puzzle
<clever> exactly what the boot rom does at every step, and all the optional things
<clever> We reply to PC with VID: 0a5c PID: 0x2763 (Pi 1 or Pi 2) or 0x2764 (Pi 3)
<clever> gchristensen: you should see it in lsusb once its ready to boot, even if the software is missing
<Thra11> clever: I was wondering whether as a workaround for the python ctypes issue, we could have some sort of flag which says, 'do not build this package on a machine which is running armv6l/armv7l on aarch64'.
<clever> Thra11: for kexec, it tries to use 64bit opcodes with a 32bit gcc, and fails hard
<clever> Thra11: the real pain point with python, is that it auto-detects failure, and then silently disables ctypes support
<clever> and then setuptools fails, because python lacks ctypes support
<clever> both can likely be fixed with the right configure flags, to stop auto-detection
<Thra11> clever: Is there a way to explicitly enable ctypes, so that the failure fails the build?
<clever> ive not looked at the python configure to see if thats possible
<clever> you could also just test for ctypes in post-install, so the build fails anyways
<clever> a second related problem, is building v6 code on a v7 cpu
<clever> the gcc is capable of both, so a "v6 only" gcc can still generate "v7 only" code
<clever> so it doesnt fail at all, and just winds up creating v7 binaries
<clever> this is a setup hook that will cause builds to fail when that occurs
<FRidh> still need to look deeper into python's _sysconfigdata*.py and how to generate it correctly
<FRidh> using it in cross also does not function yet
<gchristensen> I'm going to just install rasbian and then install nix from there
orivej has joined #nixos-aarch64
FRidh has quit [Quit: Konversation terminated!]
orivej has quit [Ping timeout: 268 seconds]
t184256 has left #nixos-aarch64 [#nixos-aarch64]
t184256 has joined #nixos-aarch64
t184256 has left #nixos-aarch64 ["Disconnected: Replaced by new connection"]
t184256 has joined #nixos-aarch64
t184256 has left #nixos-aarch64 [#nixos-aarch64]
t184256 has joined #nixos-aarch64
wildtrees has joined #nixos-aarch64
ryantrinkle has quit [Ping timeout: 246 seconds]
<gchristensen> so nixos is booting and DHCPs
<gchristensen> but the console doesn't work
<gchristensen> I mounted the image's sda1 and edited extlinux/extlinux.conf, adding console=ttyS0,115200n8 to the APPEND line and no dice -- console output ends at Starting kernel ...
<gchristensen> oh is rpi ttyS1 ...
<gchristensen> I think it is..
<gchristensen> append: systemConfig=/nix/store/1g9zww1pjx5djrwpn7yqsf71l5ifjvsg-nixos-system-nixos-19.03.git.ca2ba44cab4 init=/nix/store/1g9zww1pjx5djrwpn7yqsf71l5ifjvsg-nixos-system-nixos-19.03.git.ca2ba44cab4/init loglevel=7 console=ttyS1,115200n8
<gchristensen> is unhappy as well. hrm
<gchristensen> any ideas? :)
<gchristensen> I have few debugging tools available, I can what is coming out the console, and I have an oscilloscope
orivej has joined #nixos-aarch64
<DigitalKiwi> how come nixos uses a different bootloader on arm than x86?
<gchristensen> ARM boots differently :)
<clever> gchristensen: the rpi also has some funny bussiness going on with the bluetooth stealing one of the serial ports
<clever> and you have to configure device tree overlays properly to choose which one
<gchristensen> :/
<gchristensen> fwiw this is using the armv6 image from Dezgeg
<gchristensen> oh this doesn't have bluetooth
<clever> gchristensen: also, its not ttyS0 but ttyAMA0 i think
<gchristensen> I can't keep this stuff straight :P
<gchristensen> let's give ama0 a go!
<clever> linux also supports console= being , seperated
<clever> it will print to every port you list, and the last one is the input
<clever> so you can try all of them at once
<gchristensen> ours doesn't
<gchristensen> wahoo!
<gchristensen> ttyAMA0 worked!
ryantrinkle has joined #nixos-aarch64
<clever> gchristensen: progress!
<gchristensen> ok trying again after a brief Ben Eater break
<gchristensen> "why the hell is it taking so long to generate an SSH key"
<gchristensen> oops.. to start SSH*
<gchristensen> answer: because it isgenerating an SSH key
<gchristensen> building '/nix/store/z1q0jbrsqpypk1f9yy2sv4y3vsyg9vpm-gnum4-1.4.18.drv' on 'ssh://root@rpi1-0'...
wildtrees has quit [Quit: Leaving]