lopsided98 has quit [Ping timeout: 240 seconds]
lopsided98 has joined #nixos-aarch64
lopsided98 has quit [Read error: Connection reset by peer]
lopsided98 has joined #nixos-aarch64
orivej has quit [Ping timeout: 245 seconds]
{^_^} has quit [Read error: Connection reset by peer]
{^_^} has joined #nixos-aarch64
Ericson2314 has quit [Ping timeout: 250 seconds]
orivej has joined #nixos-aarch64
<andi-> cross-compiling images for a RPi3 is probably not fun if feasible at all? :/ I am having a case at work where I'd like to produce an image with some bundled software but no native hardware to build it on..
<sphalerite> andi-: images I don't think so, but you could take an existing image and just dump some extra cross-compiled stuff in it
<andi-> mhm
<andi-> I might just write the nix expressions and build on the box.. it is just a bunch of python. Probably not worth the time. Having the expressions is the most value of the whole exercise..
lopsided98 has quit [Ping timeout: 252 seconds]
lopsided98 has joined #nixos-aarch64
jtojnar has quit [Ping timeout: 252 seconds]
jtojnar has joined #nixos-aarch64
<samueldr> andi-: elvishjerricco managed to do it https://github.com/ElvishJerricco/cross-nixos-aarch64
<samueldr> the more users that do it, the less risks it breaks or becomes painful
<andi-> elvishjerricco: good work!, thanks samueldr! :)
<andi-> elvishjerricco: have you tried to upstream those fixes?
lopsided98 has quit [Ping timeout: 264 seconds]
lopsided98 has joined #nixos-aarch64
orivej has quit [Ping timeout: 252 seconds]
orivej has joined #nixos-aarch64
orivej has quit [Ping timeout: 246 seconds]
orivej has joined #nixos-aarch64
<elvishjerricco> andi-: Most of it turned out being droppable. But I upstreamed almost everything else. The only other thing is this: https://github.com/ElvishJerricco/nixpkgs/commit/cc093102b4c5030abe6afecc4ef84c5e31765874
<elvishjerricco> That commit probably *shouldn't* be upstreamed, since it reverts otherwise good work. But right now, that perl script can't be cross compiled
<elvishjerricco> The real answer is that we should be migrating away from perl and replacing that script with another language that can be easily cross compiled.
orivej has quit [Ping timeout: 252 seconds]
<andi-> the probel being that the perl dbus bindings don't build on aarch64?
<andi-> elvishjerricco: ^
<elvishjerricco> andi-: There was more than one perl dependency that wouldn't cross compile.
<andi-> :/
<andi-> ok
<elvishjerricco> Can't remember off hand which ones, but the commit being reverted ultimately added a lot of dependencies to the script, many of which did not cross compile
Thra11 has joined #nixos-aarch64
Thra11 has quit [Quit: WeeChat 1.4]
lopsided98 has quit [Ping timeout: 250 seconds]
lopsided98 has joined #nixos-aarch64
orivej has joined #nixos-aarch64
Ericson2314 has joined #nixos-aarch64
Ericson2314 has quit [Ping timeout: 240 seconds]
samrose_ has joined #nixos-aarch64
samrose_ has quit [Quit: Page closed]
<samrose> Dezgeg and samueldr how were you compiling ARM trusted firmware for the pine64?
<samueldr> added it to nixpkgs
<samrose> samueldr: what tool chain did you use for that one?
<samueldr> on aarch64 native
<samueldr> I have no idea about other toolchains, sorry
<samueldr> (the instructions I said I wrote yesterday were only for u-boot, on an armv7l platform lacking ATF)
<samrose> samueldr: so this one needs to run in an existing nixos installation running on an ARM64 device
<samueldr> or any aarch64 distro, where you could install nix
<samueldr> [16:20:15] <sphalerite> samrose: or you could bootstrap it from a non-nixos linux distro on your bananapi
<samueldr> [16:33:35] <Dezgeg> samrose: as an alternative to qemu, AFAIK if you have some existing distro for the board you could install the standalone nix with the usual curl https://nixos.org/nix/install | sh and use that to build u-boot
<samrose> aha ok!
<samrose> I actually got that working
<samrose> today
<samueldr> oh, then you're in business
<samrose> so I have nix running on an ubuntu machine on the bananapi
<samrose> m64
<samueldr> it may not be much help, but now you can do as you would on nixos for adding the necessary bits for your board :)
<samueldr> checking commits around the u-boot and arm-trusted-firmware files could help see what's needed
<samrose> supposedly this "bl31" is what I would need for the bpi m64
<samueldr> most likely
<samrose> but with 'bananapi_m64_defconfig' and that should work I wonder
<samrose> (well I will be trying it)
<samueldr> depending on upstream support
<samrose> I actually don't know how to confirm upstream support but there was a clue here https://openedev.amarulasolutions.com/display/ODWIKI/Bananapi+M64
<samueldr> you can see how others compile u-boot mainline for the bananapi for more information (e.g. the defconfig name, or the need for BL* files)
<samueldr> but as the bananapi seems like a pine a64-lts, it's entirely probably this is all you need
<samrose> and then there was this that also seemed like it indicated mainline uboot http://linux-sunxi.org/Sinovoip_Banana_Pi_M64#Mainline_U-Boot
<samrose> *support
<samueldr> and yeah, your guide confirms
<samrose> samueldr: so this https://github.com/NixOS/nixpkgs/blob/master/pkgs/misc/uboot/default.nix is installing these files right onto the same running machine?
<samueldr> nope, only produces the binary bits
<samueldr> you can use the steps on the wiki with those files
<samueldr> and the generic steps for dd-ing the image
<samrose> samueldr: oh the install on arm steps
<samueldr> those https://nixos.wiki/wiki/NixOS_on_ARM#Installation_steps + the board-specific part
<samrose> so I basically need to dd if=my.bin of=/dev/sdX bs=1024 seek=8 and then sudo dd if=sd-image-aarch64-linux.img of=/dev/sdX onto the sd card and then it should boot nixos
<Dezgeg> yes but other way around
<samrose> Dezgeg: ok I should copy the image first
<samrose> thank you Dezgeg samueldr
<samueldr> thank you, and do send a PR :)
<samueldr> (the thanks was in advance for the PR)
<samrose> samueldr: sure thing
<samrose> if ever wanted to try and build my own sd-image-aarch64-linux.img Dezgeg do you have something around that could give an example of how you achieve that?
<samrose> samueldr: sure thing I will pr
<samueldr> samrose: second line is the command used
<samrose> samueldr: thanks, sorry I had not connected that with what you shared yesterday
<samueldr> no worries
<samueldr> if you had asked a third time, THEN I would have had to use force :)
<samrose> samueldr: is that tied to the rpi3
<samueldr> shouldn't be
<samueldr> it will have the rpi3 stuff in the boot FAT32 partition
<samrose> oh wait I see
<samueldr> but it's just dead code
<samueldr> (if not used on a rpi3)
<samrose> this is why the second step is dd if=my.bin of=/dev/sdX bs=1024 seek=8
<samueldr> yes
<samueldr> the image is built with a blank space before the first partition to allow "embedding" u-boot in
<samrose> my skull is very thick, but it gets through eventually :-D
<samrose> ok, cool, it's pretty awesome that this is all in nix expressions
<samrose> samueldr: thanks also for doing the pine64 work, as it will likely have saved me quite a bit of work for this
<samueldr> you're welcome, most of it is piggy-backed on work from Dezgeg or asking questions
<samrose> we are using this as the basis for https://holo.host/
<samrose> (for the "nano" bpi m64 version. we also have a x86_64 hardware version)
lopsided98 has quit [Ping timeout: 240 seconds]
lopsided98 has joined #nixos-aarch64
orivej_ has joined #nixos-aarch64
orivej has quit [Read error: Connection reset by peer]
jtojnar has quit [Remote host closed the connection]
jtojnar has joined #nixos-aarch64
jtojnar has quit [Quit: jtojnar]
jtojnar has joined #nixos-aarch64
<samrose> samueldr: how are you usually running this expression?: https://github.com/NixOS/nixpkgs/blob/master/pkgs/misc/uboot/default.nix
<samueldr> samrose: they all end up being top-level attributes
<samueldr> so, nix-build -A ubootPine64
<samueldr> (on aarch64)
<samueldr> you will need to add yours to the pkgs/top-level/all-packages.nix
<samueldr> around line 14644 I guess
<samueldr> (though use your favourite editor's find functionality to find it)
lopsided98 has quit [Quit: Disconnected]
lopsided98 has joined #nixos-aarch64
lopsided98 has quit [Ping timeout: 240 seconds]