fpletz has joined #nixos-aarch64
fpletz has joined #nixos-aarch64
fpletz has quit [Changing host]
ryantrinkle has quit [Ping timeout: 260 seconds]
fpletz has joined #nixos-aarch64
fpletz has joined #nixos-aarch64
fpletz has quit [Changing host]
pbb has quit [Ping timeout: 260 seconds]
pbb has joined #nixos-aarch64
ryantrinkle has joined #nixos-aarch64
h0m1 has quit [Ping timeout: 260 seconds]
pbb has quit [Quit: No Ping reply in 180 seconds.]
h0m1 has joined #nixos-aarch64
pbb has joined #nixos-aarch64
<DigitalKiwi> am not having good results
pbb_ has joined #nixos-aarch64
pbb has quit [Ping timeout: 252 seconds]
pbb_ has quit [Ping timeout: 252 seconds]
pbb has joined #nixos-aarch64
<thefloweringash> DigitalKiwi: different from the normal cross results?
<DigitalKiwi> idk this is all new to me
<DigitalKiwi> as in the last time i tried it i had even worse results lol
<thefloweringash> if you're on master/nixos-unstable beware of #76972
<{^_^}> https://github.com/NixOS/nixpkgs/pull/76972 (by thefloweringash, 1 day ago, open): glibc: fix cross compilation build failure
pbb has quit [Ping timeout: 252 seconds]
pbb has joined #nixos-aarch64
pbb has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
pbb has joined #nixos-aarch64
pbb has quit [Ping timeout: 252 seconds]
pbb has joined #nixos-aarch64
pbb has quit [Excess Flood]
pbb has joined #nixos-aarch64
pbb has quit [Client Quit]
pbb has joined #nixos-aarch64
pbb has quit [Client Quit]
pbb has joined #nixos-aarch64
wacke has joined #nixos-aarch64
wacke has quit [Ping timeout: 240 seconds]
THFKA4 has quit [Ping timeout: 252 seconds]
THFKA4 has joined #nixos-aarch64
asheshambasta has joined #nixos-aarch64
t184256 has left #nixos-aarch64 ["Error from remote client"]
t184256 has joined #nixos-aarch64
asheshambasta has quit [Read error: Connection reset by peer]
lovesegfault has quit [Quit: WeeChat 2.7]
orivej has joined #nixos-aarch64
pbb has quit [Quit: No Ping reply in 210 seconds.]
pbb has joined #nixos-aarch64
pbb has quit [Read error: Connection reset by peer]
pbb has joined #nixos-aarch64
fadenb has joined #nixos-aarch64
<fadenb> samueldr: I used your code to build the image, wrote it to sd and booted
<fadenb> it worked until my SD card died 2 minutes later :P
<fadenb> on a different card it is booting fine and even after 10 minutes still ok
<fadenb> I do not see a wireless interface, is this a known issue? (it looks like the privacy switch is in enabled mode)
ryantrinkle has quit [Ping timeout: 268 seconds]
ryantrinkle has joined #nixos-aarch64
Smith[m] has joined #nixos-aarch64
pbb has quit [Quit: No Ping reply in 180 seconds.]
pbb has joined #nixos-aarch64
pbb has quit [Quit: No Ping reply in 180 seconds.]
pbb has joined #nixos-aarch64
wacke has joined #nixos-aarch64
<Raito_Bezarius> For some reason, samueldr it seems like it didn't work by mkForcing ["multi-user.target"] for the RPi
<Raito_Bezarius> (regarding autostarting the SSH server and wpa_supplicant)
FRidh has joined #nixos-aarch64
wacke has quit [Quit: Lost terminal]
<samueldr> fadenb: known, forgotten about
<samueldr> fadenb: I just need to figure out which card it is, and get the driver for it, likely trivial
<samueldr> there's also issues suspending (or resuming most likely) and rebooting
<samueldr> what I did with mine is: write to SD, boot, poweroff, put in computer, copy the image into the sd card, boot from it, burn to eMMC, poweroff. remove SD card, then boot
<samueldr> though I should figure out an appropriate way to switch the UUID
<samueldr> alternatively nixos-install'ing into the eMMC should work, but you have to deal with u-boot yourself
<samueldr> the first nixos-rebuild took a while, I think 3~4 hours to rebuild the kernel with native compilation
<samueldr> (since I went the cross-compilation way to get a fully trustable build)
<fadenb> I might have some time tomorrow to do some research. I'll try to get networking working if it is just missing a module
<samueldr> it's likely "identify the module, copy the usual out of tree module thing"
orivej has quit [Ping timeout: 260 seconds]
orivej has joined #nixos-aarch64
<samueldr> it might not need a driver
<Raito_Bezarius> well i tried to debug the hard way the thing
<Raito_Bezarius> so I wired my phone as an USB keyboard
<Raito_Bezarius> and I typed through my laptop through SSH :D
<Raito_Bezarius> and it seems like wpa supplicant didn't start
<Raito_Bezarius> should wpa_supplicant service be multi-user.target or networking.target?
<Raito_Bezarius> i tried to look here what's the default https://search.nix.gsc.io/?q=wpa_supplicant&i=nope&files=&repos=
h0m1 has quit [Quit: WeeChat 2.7]
h0m1 has joined #nixos-aarch64
<samueldr> only the firmware was required, fadenb
<samueldr> oh, I don't think I documented a thing well enough, but the pinebook_pro.nix file can be included in your own configuration
<samueldr> using this it should be trivial to just pull the repo to get updated support
<fadenb> you are to fast for me. You figured it out before I even had the chance to turn on the device. Awesome!
<samueldr> I had the device doing nothing for a while, it's time I do some catch-up work :)
<samueldr> `light` can be used to control the backlight
<samueldr> I'm currently using my usual shared nixos configuration
<samueldr> I should check the firmware upgrade thing
FRidh has quit [Quit: Konversation terminated!]
<samueldr> works perfectly
<samueldr> just saying, on aarch64 the browser situation is that firefox is already working, chromium can be fixed, it was at one point
<samueldr> firefox though works well enough with the specs of the pinebook pro
<samueldr> (I haven't tested video)
<pbb> I just built the pinebook pro image with cross-compilation, but it doesn't seem to contain u-boot like the installation instructions say. It just boots into the other OS from emmc.
<samueldr> $ nix log ./result
<samueldr> it should have `dd` commands at the end
<samueldr> but I think I have overlooked that one thing: the default u-boot will run unless it's been removed
<pbb> ah yeah
<pbb> "The eMMC has to be zeroed (in the relevant sectors) or else the RK3399 will use the eMMC as a boot device first."
<samueldr> yeah
<pbb> yeah it contains u-boot I just expected it to look different
<samueldr> yeah, u-boot is in that image
<pbb> then I guess I'll wipe the internal u-boot and hope that it boots then
<samueldr> if it's wiped, it's safe
<samueldr> if it's corrupted, it's annoying
<samueldr> if the SoC detects a valid header, but it's not a valid firmware/program, it will still try to load it from eMMC
<samueldr> the fix is to open the device, toggle the eMMC switch, boot the SD card, while booted, toggle it back on it should be safe from previous interaction on IRC
<Raito_Bezarius> when installing nixos on rpi, should I do a nixos-generate-config to generate the hardware config or not?
<samueldr> up to you, just like on x86_64
<Raito_Bezarius> it generates some filesystem / with the default UUID XXXXXX-YYYYYY should I keep it?
<samueldr> that's the actual UUID on the drive
<Raito_Bezarius> oh alright
<samueldr> you may prefer using a label
<samueldr> the uuid is obviously static for reproducible builds
<Raito_Bezarius> well, for the first install, for some reason, I tried a nixos-rebuild switch (apparently it's prefered to nixos-install) and it didn't reboot because it didn't detect the BOOT label
<Raito_Bezarius> so unsure of what I am doing wrong
<samueldr> I usually nixos-rebuild booot with the aarch64 sd image
<Raito_Bezarius> or I should not use nixos-rebuild switch then?
<Raito_Bezarius> s/or/oh
<samueldr> oh, shoot, the docs on the wiki are a bit outdated for that
<Raito_Bezarius> no problem, I can even edit them!
<Raito_Bezarius> (if I have the rights for haha)
<samueldr> if you're using the usual setup, the BOOT partition doesn't exist anymore
<samueldr> since 19.09
<samueldr> it's an "opaque" FIRMWARE partition that you shouldn't care to mount
<samueldr> it contains u-boot
<Raito_Bezarius> yes it's FIRMWARE now
<Raito_Bezarius> I have seen it in emergency
<Raito_Bezarius> but was not sure what to do
<samueldr> mounting it is not useful, and it should not be mounted to /boot
<Raito_Bezarius> so I guess I should disable /boot (?)
<samueldr> yeah, no need for a mount point there anymore
<Raito_Bezarius> Alright
<samueldr> I'll edit the wiki right now
<Raito_Bezarius> Nice!
<samueldr> done
<samueldr> pbb: is it working out for you?
<pbb> still figuring out how to wipe the internal u-boot
<samueldr> ah :)
<pbb> on which of the block devices is it installed?
<samueldr> figure out which device / is mounted from
<samueldr> something like /dev/mmcblkX
<pbb> yeah but mmcblk1boot0, mmcblk1boot1 or mmcblk1rpmb?
<samueldr> not boot, not rpmb
<samueldr> those are special things not used by this platform part of the eMMC spec
<pbb> I wiped /dev/mmcblk1, but it still boots the internal system
<samueldr> do you have an SD card in there?
<pbb> no
<samueldr> what's the command you used to wipe the eMMC?
<pbb> samueldr: dd if=/dev/zero of=/dev/mmcblk1 bs=1M count=4
<samueldr> not sure 4M is enough for the RK SoC
* samueldr digs for notes
<samueldr> hmm, though it looks like it should have cleared the idbloader at 0x40×512
<fadenb> I just zeroed the first 512M which seemed to have worked
<samueldr> I think it's because the default u-boot is compatible enough to continue
<samueldr> oh, M
<samueldr> I read 512 bytes lol
<fadenb> ah, small difference ;)
<samueldr> oh, the SPL could be loading the eMMC, pbb
<samueldr> anyway, I haven't tested, but it's possible the downstream u-boot shipped on the pbp can load the sd image, not entirely sure
<samueldr> oh, no, it won't, the kernel is too big
<samueldr> we're applying l*psided98's patch
<pbb> Okay, it has booted
<samueldr> great, hopefully everything should go swimmingly from there
<samueldr> though, maybe overlooked in the docs is how I installed by copying the image into the filesystem on the sd card, and just dd'ing the image on the eMMC
<samueldr> since otherwise you have to deal with partitioning and installing u-boot on eMMC yourself
<samueldr> (until we get u-boot in SPI)
<samueldr> oh, looks like Thra11 did some work too https://github.com/Thra11/nixpkgs-overlays-rk3399
<pbb> so the nix-channel binary in the path was referencing an x86 bash
<pbb> x)
<pbb> I did nix-shell -p nix to fix that
<pbb> and now rebuilding
<pbb> is it ok to use the configuration.nix from the repo as nixos-config for the first rebuild, or how did you do that?
<samueldr> I used nixos-generate-config, and imported the pinebook_por.
<samueldr> I used nixos-generate-config, and imported the pinebook_pro.nix file from the repo**
<samueldr> (with a full checkout)
<samueldr> the configuration.nix would also include sd image generation stuff, though I guess it would be fine in the ennd
<samueldr> ah, the annoying bits along the way would be installation-device and the other profiles
ryantrinkle has quit [Ping timeout: 260 seconds]
<pbb> samueldr: I now included both the generated hardware-configuration.nix and pinebook_pro.nix. Hope this works fine.
<samueldr> pinebook_pro.nix only deals with generic specifics to the pbp
<pbb> do I need to enable a bootloader?
<samueldr> ooh, yes you do
<pbb> which one?
<samueldr> (the last line disables my custom grub porcelain)
<pbb> ah
<pbb> thanks
<samueldr> this page is relevant https://nixos.wiki/wiki/NixOS_on_ARM
<samueldr> the sd image is basically that sd imag
<pbb> I will install using nixos-install, using the generated image only as a live install system, but I will set up the target sd card using the image too
<pbb> (the sd card I first used is too small, but it already has downloaded everything)
<samueldr> you'll need to put a gap for u-boot on the eMMC
<samueldr> and then install the eMMC manually
<pbb> oh I didn't plan to install to the emmc
<samueldr> that's no fun then
<samueldr> :)
<samueldr> still, need leave a gap and install u-boot on the media
<samueldr> though I'm not sure how much slack to leave in front
<pbb> how much is left free in the generated image?
<samueldr> 30 MiB which is likely extremely overkill
<pbb> ok I will just use that
<samueldr> it should need 8.8MiB free, so 10MiB is good
<samueldr> (to check I basically did the `dd` step in a new file)
<pbb> the generated image has just one big root partition, is that the way to go then?
<samueldr> that's up to you if you're partitionning as you want
<pbb> ok
<samueldr> u-boot is limited in which filesystems it can read
<samueldr> so if you e.g. want to use ZFS or encryption, you'd need to setup a separate boot partition
<pbb> ok, and it will just scan for a partition it can read? or does the kernel need to be on the first one?
<samueldr> good question
<samueldr> oh, looks like I missed a detail in that description
<samueldr> it will look for partitions marked with the archaic "bootable" flag
<pbb> okay
orivej has quit [Ping timeout: 265 seconds]