00:58
<
colemickens >
I'm gonna cry, if I'm reading this right
00:59
<
samueldr >
sounds plausible to be a fix for usb booting
00:59
<
colemickens >
I guess it gives me one or two more things to try!
00:59
<
samueldr >
you never tried SD, no?
01:00
<
colemickens >
no, I've read that mmc is not working well with mainline kernel yet
01:00
<
colemickens >
but take that with the grain of salt that all potentially dated cargo culted info is, you know
01:01
<
colemickens >
( I do know that rpi4uefi somehow disables it, I think, the the kernel spams mmc errors when I was getting it booted via uboot->grub that many others online also report)
01:01
<
samueldr >
neat, I now have DRM rendering on SDM845 (razer-cheryl2) tested to work
01:01
<
samueldr >
(with the mobile nixos gui stuff)
01:02
<
samueldr >
albeit the drawing can be seen refreshing... slowly enough
01:02
<
samueldr >
like 1/4th of a second to redraw
01:02
<
colemickens >
(the nixos installer media booting sshd now is a huge, huge help in iterating.)
01:02
<
samueldr >
but it's a good start, compared to not having anything at all drawn
01:02
monk has left #nixos-aarch64 ["Error from remote client"]
01:03
<
samueldr >
this also tells me that it's extremely likely the eDP output of the razer phone 2 just works
01:03
<
samueldr >
I'll have to do some wayland testing
01:04
<
samueldr >
hopefully
*actually* doing double-buffering rendering will help with speed
01:04
<
samueldr >
I think the main issue is that 144hz is too much for the 1440p panel
01:05
<
samueldr >
well, for the dumb way rendering works
01:05
<
samueldr >
though... it wasn't that bad with fbdev
01:05
<
samueldr >
oh right, it never ran at 144hz either
01:06
<
samueldr >
nope, recovery (which runs at 60hz) is the same
01:06
<
samueldr >
anyway, I prefer a slow-to-render UI than no UI at all
01:11
<
colemickens >
it seems like that's probably not yet applied. I'll have to add that to my patches
01:13
<
samueldr >
I feel many interfaces fail their users
01:13
<
colemickens >
can't tell if that was pulled in?
01:13
<
samueldr >
I'll tell you what I do
01:13
<
samueldr >
tig drivers/pci/controller/pcie-brcmstb.c
01:13
<
colemickens >
I can even get to the thread view and all, but like... boy it's nice when github tells me what branches commits and in, etc
01:13
<
colemickens >
good point good point
01:14
<
samueldr >
patchwork is another way to look for more info
01:14
<
samueldr >
*when* it's in a patchwork instance
01:14
<
samueldr >
for the kernel it's a toss-up if it's on a patchwork or not
01:14
<
samueldr >
in this instance it is
01:14
<
samueldr >
the kernel's patchwork is split per list AFAIUI
01:15
<
colemickens >
how did you even find that though
01:15
<
samueldr >
50% getting used to it
01:15
<
samueldr >
50% google
01:15
<
samueldr >
it didn't find it
01:15
<
samueldr >
because obviously it won't
01:15
<
samueldr >
the search is too specific
01:15
<
samueldr >
but SOMEHOW
01:15
<
samueldr >
the first result is what I want, kind of
01:15
<
samueldr >
it found me the right patchwork instance
01:16
<
samueldr >
the hard part
01:16
<
samueldr >
at the top, "Show patches with"
01:16
<
samueldr >
change State to "any", and Archived to "Both"
01:16
<
samueldr >
search by string
01:17
monk has joined #nixos-aarch64
01:17
<
samueldr >
that gives me all the revisions known to the patchwork instance
01:17
<
samueldr >
then click on the patch column, since it's been accepted the Series column becomes almost useless
01:17
<
samueldr >
(it resets State and Archived)
01:17
<
samueldr >
here anyway it's a lone patch, not part of a series, so it's less of an issue
01:18
<
samueldr >
pro-tip: the `mbox` link can be `git am`'d
01:18
<
samueldr >
series too
01:18
<
samueldr >
diff cannot since it's strictly the diff, without the required metadata to am
01:18
<
samueldr >
colemickens: does that help? ;)
01:19
<
colemickens >
uuuuhhh I think
01:19
* colemickens
bookmarks this in the irc logs
01:19
<
samueldr >
,permalink
01:20
<
samueldr >
basically, AFAIUI patchwork is another interface on top of mailing lists, but ONLY contains patches
01:20
<
samueldr >
it's in my opinion the better way to casually browse patches for Linux and U-Boot
01:21
<
samueldr >
especially since it handles series being revised as [vX]
01:25
<
samueldr >
(contains patches and their replies, obviously)
01:30
monk has left #nixos-aarch64 ["Error from remote client"]
01:33
rajivr has joined #nixos-aarch64
01:51
monk has joined #nixos-aarch64
01:59
orivej has quit [Ping timeout: 265 seconds]
02:12
h0m1 has quit [Ping timeout: 260 seconds]
02:13
h0m1 has joined #nixos-aarch64
02:27
matthewcroughan has joined #nixos-aarch64
02:27
<
matthewcroughan >
Heyo :D
02:32
monk has left #nixos-aarch64 ["Error from remote client"]
02:42
<
matthewcroughan >
samueldr: damn, so I followed the wiki but the board won't boot.
02:43
<
samueldr >
matthewcroughan: you have the armv7l orange pi pc I presume, right?
02:43
<
samueldr >
have you used an armv7l sd image or an aarch64 image?
02:43
<
matthewcroughan >
Flashed generic aarch64 and then flashed uboot with dd as specified
02:43
<
matthewcroughan >
Aarch64
02:43
<
samueldr >
the orange pi pc is armv7l
02:43
<
samueldr >
they have boards named in annoyingly confusing ways
02:43
<
samueldr >
so maybe it's not an orange pi pc
02:44
<
matthewcroughan >
It's the orange pi 3
02:44
<
samueldr >
alright, Allwinner H6, right?
02:44
<
samueldr >
you'll need the proper u-boot
02:44
<
samueldr >
they are
*not* cross-compatible through different boards
02:45
<
matthewcroughan >
Yeah I was just about to link that
02:45
<
samueldr >
do you have a serial cable to help debug? it really helps
02:45
<
matthewcroughan >
That is correct
02:45
<
matthewcroughan >
samueldr: not at the moment, no
02:45
<
samueldr >
so yeah, the Allwinner H6
*is* aarch64
02:45
<
matthewcroughan >
But it doesn't even power on, nothing I could debug.
02:45
<
samueldr >
that's what you think ;)
02:45
<
samueldr >
it might be throwing some early messages
02:46
<
samueldr >
though maybe not if you used the wrong u-boot
02:46
<
matthewcroughan >
I'm interested. Let me go grab what I think is a USB to serial.
02:46
<
samueldr >
which u-boot did you install to it?
02:46
<
matthewcroughan >
The one specified in the wiki.
02:46
<
samueldr >
there is no wiki page for the orange pi 3
02:46
<
matthewcroughan >
Moving back to my pc, will specify in 20 seconds.
02:47
<
samueldr >
so basically what you may have done is similar to taking the bios of Thinkpad x230 and shoving it on a thinkpad x250 ;)
02:47
<
samueldr >
(with much probably less catastrophical failures)
02:48
<
matthewcroughan >
I flashed `uboot-orangepi_pc_defconfig-2017.11.nixpkgs.20171211.1545c3163bc6cf3cd0e81fee73dbf9baf29e5b0b.u-boot-sunxi-with-spl.bin`
02:48
<
samueldr >
yeah, completely wrong machine, not event the same cpu architecture :)
02:48
<
matthewcroughan >
samueldr: I like thinkpads. I appreciate that analogy more than you know :D
02:48
<
samueldr >
nerds are easy to please ;)
02:49
<
matthewcroughan >
Instructions unclear, flirted on IRC.
02:49
<
samueldr >
hmm... it doesn't look like upstream uboot has support for the orange pi 3 yet
02:49
<
samueldr >
ugh, that won't load
02:49
<
samueldr >
there's too many
02:49
<
samueldr >
but if you press `T` you get into a lazy fuzzy search
02:49
<
samueldr >
type orangepidefconfig
02:50
<
samueldr >
there's no orange pi 3 defconfig AFAICT
02:50
<
samueldr >
to the mailing list!
02:50
<
matthewcroughan >
You have destroyed my Thinkpad X230T.
02:50
<
matthewcroughan >
It is gone.
02:51
<
matthewcroughan >
All I have is this IRC client to reach you by, Firefox is now a zombie process. Thanks Gitlab.
02:51
<
samueldr >
the good news is that it seems it's coming
02:51
<
matthewcroughan >
samueldr: Really? So what is it that Armbian uses?
02:51
<
samueldr >
matthewcroughan: they often use the vendor forks
02:52
* samueldr
checks their build system
02:52
<
samueldr >
it's not the worst, but it's not the best
02:53
<
matthewcroughan >
The speed at which you're traversing these repos makes me feel like upgrading to a Thinkpad T480 would improve my productivity.
02:53
<
samueldr >
looks like they vendor'd a patch to add it to
_a_ u-boot
02:53
<
matthewcroughan >
Github doesn't load that fast here :D
02:53
<
samueldr >
matthewcroughan: hah, it's also because I already know where to go
02:53
<
samueldr >
it is unclear if it should be applied to mainline u-boot or not
02:54
<
matthewcroughan >
So, there is a defconfig here. So all I have to do is compile this u-boot and flash it in the right sectors?
02:54
<
samueldr >
and it is unclear if other patches are needed
02:54
monk has joined #nixos-aarch64
02:55
<
samueldr >
matthewcroughan: I would go applying that series of patch from u-boot on top of mainline u-boot instead of digging through armbian
02:55
<
samueldr >
tip: the series link to the top right makes a one-file patch
02:56
<
matthewcroughan >
so, I clone the latest u-boot and apply the patch?
02:56
<
matthewcroughan >
sweet
02:56
<
samueldr >
that should put the commits appropriately in the history even
02:57
<
matthewcroughan >
I'm beginning to like bootloaders.
02:57
<
samueldr >
we won't accept such a patch in Nixpkgs, but considering it's fresh from this month, it's probably going to be part of the next u-boot update
02:57
<
samueldr >
~2020.04 I guess
02:58
<
matthewcroughan >
samueldr: failed patch :p
02:58
<
matthewcroughan >
Patch failed at 0001 sunxi: board: extract creating a unique sid into a helper function
02:59
<
samueldr >
might need some manual editing love I guess, or try on top of the 2020.01 tag
02:59
<
samueldr >
2021.01 **
03:00
<
matthewcroughan >
error: patch failed: arch/arm/dts/Makefile:605
03:01
<
matthewcroughan >
it only adds one line to Makefile, hmm
03:01
<
matthewcroughan >
but it adds it in the middle of the list, instead of at the bottom, durr
03:01
<
samueldr >
they might very well have standards to follow
03:02
<
samueldr >
and `git am` is bad at applying patches
03:02
<
samueldr >
2/1747 +S
03:02
<
matthewcroughan >
I used git apply to deduce that, I know am is bad :D
03:02
<
samueldr >
try git am --show-current-patch | patch -p1
03:02
<
samueldr >
when in a failed patch
03:02
<
samueldr >
then git am --continue
03:02
<
matthewcroughan >
Hunk #1 succeeded at 605 with fuzz 1.
03:02
<
matthewcroughan >
patching file configs/orangepi_3_defconfig
03:02
<
matthewcroughan >
patching file board/sunxi/MAINTAINERS
03:02
<
matthewcroughan >
patching file arch/arm/dts/sun50i-h6-orangepi-3.dts
03:02
<
samueldr >
(assuming things were fine)
03:03
<
matthewcroughan >
it only errors out on that Makefile
03:03
<
matthewcroughan >
so can I continue and then add it manually?
03:03
<
samueldr >
or add it manually, stage the change, then --continue
03:04
<
samueldr >
and presto, it's part of your commit
03:07
<
matthewcroughan >
samueldr: seems to apply cleanly, actually
03:07
<
matthewcroughan >
it's a lie
03:07
<
matthewcroughan >
IDK why it claimed to fail, it wrote the file successfully.
03:07
<
samueldr >
I stopped assuming git's behaviour makes sense
03:07
<
matthewcroughan >
well, assuming that worked, how compile? :D
03:08
<
samueldr >
customize the u-boot derivation
03:08
<
matthewcroughan >
so, make menuconfig?
03:08
<
samueldr >
src can be changed
03:09
<
matthewcroughan >
so build uboot from nixpkgs, using a custom src?
03:09
<
samueldr >
start from ubootOrangePiZeroPlus2H5
03:09
<
samueldr >
change the defconfig name
03:09
<
samueldr >
and the attribute name
03:09
<
samueldr >
and nothing else really
03:09
<
matthewcroughan >
feels good being able to fork u-boot just for this lmfao
03:09
<
samueldr >
ain't open source great?
03:09
<
matthewcroughan >
No, it's bait
03:11
<
clever >
i'm a bit surprised as how open the new RP2040 from rpi is
03:11
<
clever >
i wasnt expecting to even see bootrom source
03:11
<
matthewcroughan >
yeah but RiscV is coming to eat everyone, so who cares? :D
03:12
<
clever >
matthewcroughan: riscV is eating more then you want...
03:12
monk has left #nixos-aarch64 ["Error from remote client"]
03:12
<
clever >
matthewcroughan: throwing takedown notices to anybody trying to host the docs
03:12
<
samueldr >
clever: there's a retraction
03:12
<
matthewcroughan >
These are the two stories from today that excited me.
03:13
<
matthewcroughan >
clever: how embarassing
03:13
<
clever >
samueldr: still feels off, that they are so confused about their own docs, to have done that in the first place
03:14
<
matthewcroughan >
It won't matter for the same reason Elastic Search can't really stop Amazon from strip mining them.
03:14
<
samueldr >
just saying that things evolved :)
03:14
<
samueldr >
and it's important to continue with the less "fun" parts when outrage happens
03:14
<
samueldr >
the follow-ups
03:15
<
simpson >
It's a sign of times ahead. What one would want is a vendor who cannot wait to give us the datasheets.
03:15
<
clever >
samueldr: and twitter's UI makes that somewhat difficult
03:15
<
samueldr >
if I wasn't already following her, I wouldn't have known I guess
03:16
<
clever >
i am following, and didnt see the follow-up
03:16
<
samueldr >
84 RTs vs 9 RTs
03:16
<
samueldr >
oh right, following with not-an-official-client
03:16
<
clever >
the snr ratio is horid
03:16
<
clever >
i can get a notification on my phone, then it will vanish in the middle of reading it
03:17
<
clever >
and then i can spend an hour scrolling thru the feed on the website, and not find the same tweet
03:18
<
samueldr >
no opinion clever
03:18
<
samueldr >
I don't know enough about embedded development
03:18
<
clever >
the only real problem i have so far, is that i cant use the proper pkgsCross stdenv
03:18
<
clever >
it winds up trying to build host tools with the cross gcc
03:18
<
clever >
i must use a host stdenv, and jam a cross gcc into buildInputs
03:21
<
matthewcroughan >
Cool, so now I've got this
03:21
<
matthewcroughan >
can i now just use `nix-builld` with some overrides?
03:22
<
samueldr >
that's my assumption
03:23
<
matthewcroughan >
how do you do overrides in nix-build? O.o
03:23
<
matthewcroughan >
so it'll probably be like `nix-build '<nixpkgs>' -A u-boot`
03:24
<
clever >
matthewcroughan: --arg passes arguments to the `<nixpkgs> {}` area
03:24
<
clever >
so you can do `--arg config '{ packageOverrides = ...; }'`
03:24
<
clever >
or you can do `--arg overlays '[ (self: super: {}) ]'`
03:25
<
clever >
you can also do: nix-build -E 'with import <nixpkgs> {}; u-boot.overrideAttrs (old: {})'
03:25
<
matthewcroughan >
packageOverrides?
03:25
<
clever >
or both at once, nix-build -E 'with import <nixpkgs> { config or overlays =; }; u-boot'
03:25
<
matthewcroughan >
I'm not understanding what packageOverrides is
03:25
<
matthewcroughan >
I understand u-boot.overrideAttrs
03:25
<
clever >
the old config.nix way of doing overrides
03:26
<
clever >
before overlays came around
03:26
monk has joined #nixos-aarch64
03:27
<
samueldr >
matthewcroughan: note that u-boot provides a "builder" function
03:27
<
samueldr >
so it will not be as trivial
03:27
<
samueldr >
maybe first try just forking and dirtily editing the derivation
03:27
<
samueldr >
to confirm you're not twisting it into overrides all for naught
03:31
<
matthewcroughan >
samueldr: so something like this? nix-build -E 'with import <nixpkgs> {}; u-boot.overrideAttrs {old: { src = builtins.fetchGit { url = "
https://github.com/MatthewCroughan/u-boot " ref = "v2021.01-orangepi3"}; }}
03:32
<
samueldr >
> pkgs.u-boot
03:32
<
{^_^} >
attribute 'u-boot' missing, at (string):471:1
03:32
<
samueldr >
u-boot is not a package :)
03:32
<
matthewcroughan >
what is it?
03:32
<
matthewcroughan >
it's pkgs.misc/uboot
03:32
<
samueldr >
it exposes multiple attributes, which are all built through helper functions
03:32
<
matthewcroughan >
sure is a pkg
03:33
<
matthewcroughan >
then why is it in pkgs?
03:33
<
samueldr >
because it's multiple packages
03:33
<
samueldr >
one per platform
03:33
<
samueldr >
> pkgs.buildUBoot
03:33
<
samueldr >
you can, though, override buildUBoot I believe
03:33
<
matthewcroughan >
so, at this point I'm better off making a local clone of nixpkgs
03:34
<
samueldr >
[22:27:42] <samueldr> maybe first try just forking and dirtily editing the derivation
03:34
<
matthewcroughan >
because the overrides will get sillyh
03:34
<
matthewcroughan >
sorry :D
03:34
<
samueldr >
[22:27:55] <samueldr> to confirm you're not twisting it into overrides all for naught
03:34
<
samueldr >
I even predicted the sillyness :)
03:34
<
matthewcroughan >
sure, I'm just not lingofied enough to understand the jargon
03:34
<
matthewcroughan >
I will be though
03:34
<
samueldr >
sorry, not sayng I told you so, just saying I knew what you were going to get yourself into
03:35
<
samueldr >
when I hack around on u-boot I always end-up doing modifications to a nixpkgs checkout, much easier
03:35
<
matthewcroughan >
Right well I'm going to get a tea
03:35
<
matthewcroughan >
at 3:30AM
03:35
<
matthewcroughan >
and when the Tea is done, nixpkgs will still be cloning
03:36
<
samueldr >
make worktrees from a central git clone :)
03:36
<
samueldr >
man git-worktree
03:36
<
samueldr >
worktrees are also why I have a 8.4GiB .git folder for linux
03:36
<
samueldr >
40 different remotes
03:36
<
matthewcroughan >
I'm not sure I follow what the use case is?
03:37
<
matthewcroughan >
so you just have one git repo, and every repo you ever want to do anything with is just part of this megarepo?
03:37
<
samueldr >
the .git folder is shared, so you can checkout multiple branches at different locations
03:37
<
clever >
samueldr: my rpi/firmware .git is huge, but thats more because they keep pushing binaries, lol
03:37
<
clever >
samueldr: they also tried to delete the history, but github still had it, so i was able to recover it
03:37
<
samueldr >
yeah, linux is cheating less so with mainly source code
03:38
<
samueldr >
in other news, DRM drawing on SDM845 now goes fast!
03:38
<
clever >
the firmware repo has massive changes on every commit, because binary doesnt diff well
03:47
<
matthewcroughan >
Got back from making tea
03:47
<
matthewcroughan >
resolving deltas :D
03:49
<
matthewcroughan >
samueldr: how would worktrees help me btw?
03:49
<
matthewcroughan >
The cloning time would still be massive
03:49
<
samueldr >
assuming you already had a nixpkgs checkout
03:49
<
matthewcroughan >
ah ok
03:49
<
matthewcroughan >
so every machine you have just has this same worktree config?
03:49
<
samueldr >
no need to re-clone multiple times
03:49
<
samueldr >
nah, I make a worktree for "long lived" feature branches I work on
03:50
<
samueldr >
think of it as a checkout, but in another directory
03:50
<
samueldr >
so you can still play with the repo on the main branch or similar
03:57
<
matthewcroughan >
samueldr: there's no device tree file for the orange pi 3
03:57
<
samueldr >
in mainline linux?
03:57
<
matthewcroughan >
in u-boot in the arch/arm/dts
03:57
<
samueldr >
tried with the "new-kernel" image?
03:57
<
samueldr >
that should have been part of the patchset you applied
03:59
<
matthewcroughan >
ah, guess simply because it fails at the stage of modifying the makefile, it fails.
03:59
<
matthewcroughan >
didn't realise that's how patch failure worked, since I don't really ever fix failures.
04:00
<
matthewcroughan >
yeah lol, the whole patch fails because of its position in a list.
04:02
Church- has joined #nixos-aarch64
04:02
<
Church- >
sphalerite: So I saw you had some success getting nixos running on the helios64?
04:02
<
matthewcroughan >
error: patch failed: board/sunxi/board.c:789
04:03
<
matthewcroughan >
god damnit
04:03
<
samueldr >
matthewcroughan: I believe it was
04:03
<
samueldr >
sorry :/
04:08
<
matthewcroughan >
samueldr: do we know what the commit hash was when this patch was pushed?
04:08
<
matthewcroughan >
wtf
04:08
<
matthewcroughan >
w t f
04:08
<
samueldr >
if a patch doesn't apply, it's to the author to fix (except when trivial)
04:09
<
samueldr >
but we maybe can figure out
04:09
<
samueldr >
see, github is a snitch
04:09
<
samueldr >
your branch
04:09
<
samueldr >
see how it recognized a specific author?
04:09
<
matthewcroughan >
yeah
04:10
<
samueldr >
two even (?)
04:10
<
samueldr >
sometimes you can look at their profile and see their fork of the project
04:11
<
samueldr >
sometimes you can get their WIP branch that way
04:11
<
samueldr >
but doesn't look like it's the case here
04:11
<
matthewcroughan >
branchmageddon
04:11
<
samueldr >
another thing to look at is the date the patch was posted to the patchwork
04:11
<
samueldr >
it can't have come from after
04:11
<
matthewcroughan >
yeah I was going to try and rollback the git to that date
04:12
<
samueldr >
also try on top of the 2021.01 tag (if that wasn't what you did)
04:12
<
samueldr >
oh right
04:12
<
samueldr >
that's what you did
04:12
<
matthewcroughan >
yeah, I just didn't realise I'd have to apply after fixing, only to find an error in boards.c
04:13
* samueldr
tries to apply to take a look
04:13
monk has left #nixos-aarch64 ["Error from remote client"]
04:13
<
samueldr >
I finished what I was doing so I have a few minutes I'll spare to see
04:16
<
matthewcroughan >
samueldr: I went back to c8f2a060a1 which is the result of `git rev-list -1 --before="Jan 10 2021" master`
04:16
<
matthewcroughan >
same conflicts
04:16
<
matthewcroughan >
git reset --hard HEAD~1 until clean merge? :D
04:17
<
samueldr >
it was a trivial fix AFAICT
04:17
<
samueldr >
(sorry, trivial if you're already used to these kind of badly applying patches)
04:18
<
matthewcroughan >
hah
04:18
<
matthewcroughan >
yes, and I am not used to it
04:18
<
matthewcroughan >
thanks for the patience
04:19
<
samueldr >
at the moment it hasn't taken much of my involvement, and your patient and nice enough
04:20
<
matthewcroughan >
so the resultant uBoot upstream nixpkg change would look like this right?
04:20
<
matthewcroughan >
for ` ubootOrangePi3`
04:20
<
samueldr >
look for an aarch64 board
04:20
<
matthewcroughan >
produces a different filesToInstall ?
04:21
<
matthewcroughan >
oh
04:21
<
samueldr >
though it does produce only that one file
04:21
<
matthewcroughan >
great, so how would I express that I want to build u-boot for that one board?
04:21
<
matthewcroughan >
nix-build -A ubootOrangePiPc ?
04:22
<
samueldr >
you'll need to add it to all-packages.nix
04:22
<
matthewcroughan >
sorry, `nix-build -A ubootOrangePi3`
04:22
<
samueldr >
and use the proper name
04:22
<
samueldr >
just search for ubootOrangePiPc in all-packages.nix and I guess it should be self-evident how to add your board
04:23
<
matthewcroughan >
alright, done that, so my cmd should now work if I pass `-I ./nixpkgs` for my local nixpkgs?
04:25
<
samueldr >
or rather `nix-build -A ...` at the root of the nixpkgs checkout
04:28
<
samueldr >
it won't
04:28
<
samueldr >
nix-build -A pkgsCross.aarch64-multiplatform.ubootOrangePi3
04:29
<
samueldr >
(assuming you build from an x86_64 platform)
04:29
<
matthewcroughan >
yeah I am
04:30
<
matthewcroughan >
I love Nix so much.
04:30
<
matthewcroughan >
I can't believe cross compiling is made this easy with Nix.
04:30
<
samueldr >
sure, you had to edit nixpkgs a bit
04:30
<
samueldr >
but that's also 90% of the work for making the actual change
04:30
<
matthewcroughan >
yeah, totally
04:30
<
samueldr >
once u-boot supports the board upstream
04:30
<
matthewcroughan >
very easy to get into
04:31
<
matthewcroughan >
I've been using arch for 3 years and wouldn't even know how to get started being a package maintainer
04:31
<
samueldr >
things like this Mobile NixOS only works that well because Nix, Nixpkgs and NixOS is a force multiplier
04:33
<
samueldr >
a finished build cannot be in a weird state
04:33
<
matthewcroughan >
Well thanks so far for helping me out with this. Hopefully if this process is this painless for other boards, I can help with board support.
04:33
<
samueldr >
so it's really easy to trust a build
04:33
<
samueldr >
when a board is already in u-boot mainline, it's literally just the tail end of what you did
04:33
<
samueldr >
obviously we only want to expose u-boot builds that have been tested and known to work
04:34
<
matthewcroughan >
uh oh
04:34
<
matthewcroughan >
fatal error: sun50i-h6-cpu-opp.dtsi: No such file or directory
04:34
monk has joined #nixos-aarch64
04:34
<
matthewcroughan >
Using your git as a src of course
04:35
<
samueldr >
>> Becasue of that, this series should be applied on top of:
04:35
<
matthewcroughan >
Ah, yes, nix.
04:35
<
matthewcroughan >
I.e "Nothing".
04:35
<
samueldr >
I covered that earlier with cole//mickens, idiosyncracy with patchwork
04:36
<
samueldr >
click the round - next to "Action Required" and "No"
04:36
<
matthewcroughan >
He blocked me for being annoying as hell early on :P
04:36
<
samueldr >
so that's why things didn't apply cleanly
04:37
<
matthewcroughan >
okay, so we need to apply this, as well as the patch from dhweg?
04:37
<
samueldr >
maybe even v3
04:38
<
samueldr >
but yeah, basically it is needed too
04:38
<
samueldr >
it helps sometimes to read the patch notes ;)
04:38
<
matthewcroughan >
v2 as well?>
04:38
<
matthewcroughan >
so two patches?
04:38
<
samueldr >
two patch
_sets_
04:38
<
samueldr >
here it's 5 patches total :)
04:38
<
matthewcroughan >
so the series, of both?
04:40
<
samueldr >
both series
04:43
<
matthewcroughan >
just tried applying on my own, hopefully did it right
04:43
<
matthewcroughan >
git push --set-upstream origin v2021.01-orangepi3
04:43
<
matthewcroughan >
crap
04:48
monk has left #nixos-aarch64 ["Error from remote client"]
05:07
monk has joined #nixos-aarch64
05:08
<
samueldr >
use fetchFromGitHub with github sources
05:08
<
matthewcroughan >
samueldr: why overcomplicate tit thought?
05:08
<
matthewcroughan >
I was never able to figure fetchFromGitHub properly
05:08
<
samueldr >
I don't know what fetchGit does in this case, I'm not using it generally
05:09
<
samueldr >
maybe what you do is fine
05:09
<
samueldr >
I would simply have used fetchFromGitHub
05:09
<
matthewcroughan >
that's not a builtin
05:09
<
samueldr >
four main params: owner, repo, rev, sha256
05:09
<
matthewcroughan >
so there are no docs I can see here about it
05:09
<
samueldr >
github.com/owner/repo and then rev is something like a revision hash or a tag name
05:09
<
matthewcroughan >
but where's the doc though?
05:09
<
samueldr >
yeah, it's part of Nixpkgs
05:10
<
matthewcroughan >
doesn't matter anyway, I got the u-boot bin
05:10
<
matthewcroughan >
time to test it
05:10
<
matthewcroughan >
what I did worked
05:15
<
matthewcroughan >
samueldr: seems again that the pi doesn't get to bootload anything
05:15
<
matthewcroughan >
No power led
05:15
<
samueldr >
I cannot say more at that point :)
05:15
<
samueldr >
but serial would be the better way to check
05:15
<
matthewcroughan >
Damnit
05:16
<
samueldr >
on many inexpensive boards the leds are all software controlled
05:16
<
samueldr >
and it may be that u-boot doesn't set them up
05:16
<
samueldr >
e.g. I know the pinephone and pinebook both needed work to make the LEDs light up
05:17
<
matthewcroughan >
yeah and it is noted that hdmi doesn't even work in some cases on the opi-pc
05:17
<
matthewcroughan >
so I guess I won't know until I get serial working
05:17
<
matthewcroughan >
does the installer image have serial out?
05:17
<
samueldr >
just checking, the BL31 line is also in tour buildUboot call, right?
05:18
<
samueldr >
it might not, but you'll have u-boot output on serial telling you more
05:18
<
samueldr >
at least you'll know whether u-boot fails or linux fails
05:18
<
matthewcroughan >
I do not have the BL31 line samueldr
05:18
<
samueldr >
that's needed
05:19
<
samueldr >
start from a complete allwinner-based aarch64 u-boot buildLinux call
05:19
<
samueldr >
(e.g. the orangepi whatever h5)
05:19
<
samueldr >
that's because BL31 is the trustzone implementation... and not to bore you with details I don't exactly know to the full extent... it's needed for u-boot to work
05:20
<
matthewcroughan >
didn't realise that was mandatory
05:20
monk has left #nixos-aarch64 ["Error from remote client"]
05:22
<
matthewcroughan >
samueldr: just making sure. The procedure is: 1. Flash the `nixos-sd-image-20.09.2671.fe08be60cb8-aarch64-linux.img` 2. Flash uboot in the correct sector.
05:27
<
matthewcroughan >
samueldr: why is there so much perl
05:32
orivej has joined #nixos-aarch64
05:38
cole-h has quit [Ping timeout: 256 seconds]
05:41
<
matthewcroughan >
sorry if you got that thrice, bouncer acting up
05:42
<
matthewcroughan >
flashing and trying, just giving you my last_will
05:42
<
matthewcroughan >
going to bed will report on things later :D
05:44
<
matthewcroughan >
Nope, didn't work either. Oh well.
05:45
<
matthewcroughan >
Was worth a try and learned a lot!
07:26
<
sphalerite >
Church-: yep, not with a mainline kernel yet though
07:35
tilpner has quit [Remote host closed the connection]
07:36
tilpner has joined #nixos-aarch64
08:54
tilpner has quit [Quit: tilpner]
09:13
<
Ke >
so do people have working helios64s now
09:24
<
sphalerite >
I've sold mine to a colleague, but yes it's working
09:24
tilpner has joined #nixos-aarch64
11:20
alpernebbi has joined #nixos-aarch64
11:52
zupo has joined #nixos-aarch64
11:54
zupo_ has joined #nixos-aarch64
11:58
zupo has quit [Ping timeout: 265 seconds]
11:59
<
Church- >
sphalerite: How non mainline are we talking?
12:54
<
sphalerite >
Church-: quite a lot of patches, but on top of 5.9
13:25
orivej has quit [Ping timeout: 265 seconds]
13:37
dev_mohe has joined #nixos-aarch64
13:44
dev_mohe has quit [Quit: dev_mohe]
14:15
zupo_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
14:20
bdju has quit [Ping timeout: 240 seconds]
14:20
Acou_Bass has joined #nixos-aarch64
14:21
bdju has joined #nixos-aarch64
14:41
orivej has joined #nixos-aarch64
14:51
cole-h has joined #nixos-aarch64
15:38
<
Church- >
Oh okay cool.
15:39
<
Church- >
Know if zfs works? Had to build a dkms myself on armbian
15:40
<
sphalerite >
Yep, works no problem
15:42
<
Church- >
Cool. So what's the process for actually building the image?
15:42
<
Church- >
Haven't done that before
15:45
<
sphalerite >
oh right, that's assuming you have aarch64 building available
15:46
<
sphalerite >
be it by running directly on aarch64 hardware, by having an aarch64 remote builder, or via qemu-user
16:27
<
matthewcroughan >
Alright, I'm awake again :Dsam
16:27
<
matthewcroughan >
wow, my fingers are cold
16:27
<
matthewcroughan >
samueldr: meant to tag you! :)
16:27
<
matthewcroughan >
I'm gonna get the serial out now and see how u-boot is doing (or not) on the pi.
16:41
alpernebbi has quit [Quit: alpernebbi]
17:06
orivej_ has joined #nixos-aarch64
17:06
orivej has quit [Ping timeout: 272 seconds]
17:09
rajivr has quit [Quit: Connection closed for inactivity]
17:38
Darkmatter66 has joined #nixos-aarch64
17:54
Mic92 has joined #nixos-aarch64
17:54
<
matthewcroughan >
OMG Mic92 o/
17:56
<
matthewcroughan >
Mic92: my intention is to make a PR to your repo
17:58
<
Mic92 >
There firmware works a bit like MBR
17:58
<
Mic92 >
So like BIOS bootloader
18:00
<
Mic92 >
the reason is that there offset is smaller than what you can use as the smalles LBA if I remember correctly
18:01
<
matthewcroughan >
I need to get it working before I even attempt to look at your stuff :P
18:01
<
matthewcroughan >
for some reason this u-boot doesn't work
18:02
<
Mic92 >
matthewcroughan: ok. good luck with that.
18:03
monk has joined #nixos-aarch64
18:03
<
Mic92 >
It's a bit annoying that every arm board needs its own u-boot.
18:37
<
matthewcroughan >
Mic92: yeah, sad
18:37
<
matthewcroughan >
sync
18:42
<
matthewcroughan >
lmao I ran sync here instead of on my terminal
18:42
<
matthewcroughan >
ffs
18:44
Darkmatter66 has quit [Ping timeout: 246 seconds]
19:01
zupo has joined #nixos-aarch64
19:27
justanotheruser has quit [Ping timeout: 260 seconds]
19:29
<
makefu >
better sync than be sorry! I am also one of these guys which run sync after everything 'just to be sure'
19:32
<
mgdm >
my boss in my first job alwasy ran it twice because he didn't trust it
20:22
zupo_ has joined #nixos-aarch64
20:24
zupo has quit [Ping timeout: 256 seconds]
20:47
<
samueldr >
might even play nice with u-boot's own fastboot implementation
21:25
* colemickens
feels like that's a fun sentence
21:25
<
colemickens >
"u-boot's fastboot impl" joy
21:41
<
samueldr >
it worked well when I was able to use it
22:00
jumper149 has joined #nixos-aarch64
22:09
<
matthewcroughan >
samueldr: what does uboot/fastboot have to do with eachother?
22:09
<
matthewcroughan >
a javascript bootloader?
22:10
<
samueldr >
that could be like asking what does windows and firefox have to do with eachother?
22:10
<
samueldr >
fastboot is a protocol used to do some maintenance with hardware, in a way
22:10
<
samueldr >
commonly used to flash operating systems on android phones
22:11
<
samueldr >
fastboot.js is an implementation of the "computer side" of fastboot, in javascript for WebUSB
22:11
<
samueldr >
u-boot can be put in a mode where it exposes the fastboot protocol to, mainly, flash operating system images
22:17
<
matthewcroughan >
samueldr: fascinating
22:19
<
LinuxHackerman >
mgdm: have you seen people writing `sync; sync; sync` before?
22:20
<
matthewcroughan >
LinuxHackerman: yeah I do that a lot
22:20
<
mgdm >
LinuxHackerman: I have not seen it to that level yet, no, only twice
22:20
<
matthewcroughan >
I contracted it from a friend.
22:20
<
matthewcroughan >
sync
22:20
<
matthewcroughan >
ah crap, wrong windo
22:20
<
LinuxHackerman >
Apparently that tradition started on a system where the sync command didn't actually work right
22:21
<
LinuxHackerman >
So you'd type sync, then after it finished, type sync again, then again a third time
22:22
<
LinuxHackerman >
the key being that the time spent typing sync again would allow the system enough time to actually flush the caches
22:22
<
LinuxHackerman >
sync;sync;sync therefore completely defeats the point :D
22:22
<
LinuxHackerman >
and also just one sync should work correctly on a modern system so…
22:23
<
LinuxHackerman >
also, cool to see you here :D are you still in Glasgow?
22:23
<
mgdm >
this was ~15y ago when I encountered it being written twice
22:24
<
LinuxHackerman >
Got around to trying nixos yet? ;)
22:24
<
mgdm >
I've got 3 of them now :D including an AWS graviton2 that I joined this channel when I couldn't get it to start
22:24
<
LinuxHackerman >
ooooh
22:25
<
mgdm >
(it works fine now)
22:27
<
mgdm >
you're in Berlin, iirc...?
22:27
<
LinuxHackerman >
Munich
22:27
<
LinuxHackerman >
Are you feeling the brexit much? I hear some vegetables and stuff aren't available anymore
22:28
<
mgdm >
not noticed much difference here tbh
22:28
<
mgdm >
aside from a deep and abiding loathing for those who caused it, but that was there before
22:28
<
LinuxHackerman >
hah
22:29
<
mgdm >
a lot of the trouble seems to be UK companies exporting things to the EU, many of those companies are run by people who voted to leave, and who are now going to go out of business
22:37
alex_giusi_tiri has joined #nixos-aarch64
22:46
pbb has joined #nixos-aarch64
22:54
zupo_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
22:57
veleiro` has joined #nixos-aarch64
23:25
<
matthewcroughan >
samueldr: Linux localhost 3.10.65 #1 SMP PREEMPT Wed Jan 9 13:47:51 CST 2019 armv8l
23:25
<
matthewcroughan >
that's what I get from the orange pi on its default non-armbian reference linux 3.10 on the emmc
23:26
<
samueldr >
vendors generally use trashy "BSP" kernel source trees from the SoC makers
23:27
<
matthewcroughan >
armbian boots and says Linux orangepi3 5.10.4-sunxi64 #20.11.7 SMP Tue Jan 5 23:28:09 CET 2021 aarch64 GNU/Linux for uname -a
23:27
<
matthewcroughan >
serial is a lot faster woo
23:27
<
matthewcroughan >
my nixos aarch64 image + dd of u-boot seems not to work.
23:28
<
matthewcroughan >
maybe I can get the u-boot binary from armbian and use it, then figure out the patching later/
23:28
<
samueldr >
if you don't have u-boot output from the image, it serves no purpose to look at the kernel version
23:28
<
matthewcroughan >
I do have u-boot output from armbian
23:28
<
samueldr >
I meant on your image that doesn't work
23:28
<
matthewcroughan >
I have u-boot output from armbian
*and* whatever is pre-installed on the emmc
23:29
<
matthewcroughan >
samueldr: yeah, I don't get anything at all, it's odd
23:29
<
samueldr >
can you share the complete changes you made to your nixpkgs checkout?
23:30
<
matthewcroughan >
samueldr: Linux orangepi3 5.10.4-sunxi64 #20.11.7 SMP Tue Jan 5 23:28:09 CET 2021 aarch64 GNU/Linux
23:30
<
matthewcroughan >
whoops wrong paste
23:31
<
samueldr >
at a glance that u-boot build looks fine
23:31
<
samueldr >
no idea at this point
23:31
<
samueldr >
but yeah you might be able to use armbian's u-boot
23:31
<
samueldr >
except I think they mess with the default u-boot boot strings
23:31
<
samueldr >
so it could end up not working
23:31
<
samueldr >
but still worth a try I guess
23:32
<
matthewcroughan >
samueldr: any idea where I would siphen that?
23:32
<
samueldr >
not at all
23:32
<
samueldr >
I'm not an armbian dev, nor an armbian user
23:33
<
matthewcroughan >
samueldr: maybe we've got the wrong offset for the h6 cpu?
23:33
<
samueldr >
unlikely, but something to check
23:33
<
matthewcroughan >
I'm assuming all sunxi are alike.
23:35
<
matthewcroughan >
samueldr: the filename that comes out of `nix-build` is not `uboot-<devicename>-defconfig` etc
23:35
<
matthewcroughan >
it's just `u-boot-sunxi-with-spl.bin`
23:35
<
samueldr >
and it's okay
23:36
<
samueldr >
that was a secondary step
23:36
<
samueldr >
since all build products are named the same
23:36
<
matthewcroughan >
should I be able to blank the SD card and flash u-boot, and see something out of serial? Even without an OS ?
23:36
<
samueldr >
not that these haven't seen any kind of update since late 2018 and shouldn't be relied on
23:39
<
matthewcroughan >
samueldr: OMG, I got an output from U-Boot on its own.
23:39
<
matthewcroughan >
OH.. wait, it fell back to EMMC. Got too excited.
23:41
srk has quit [Ping timeout: 268 seconds]
23:43
srk has joined #nixos-aarch64