<artturin> samueldr i found a another person with the issue by searching in the PinePhone matrix server
<artturin> he's on fedora
<artturin> which is a "underdeveloped" pinephone distro too
<samueldr> have you updated the modem firmware?
<samueldr> though I'm not sure it would change anything
<artturin> nope im trying to solve this without having to update it
<artturin> so we dont have to force people to update it
<samueldr> though at some point updating is bound to be required
<artturin> the fedora guy updated it on his braveheart edition and it didn't change anything
<artturin> he got a braveheart and some other ce
<samueldr> especially given the extremely good progress they're making on the "more open" firmware
<artturin> yep the firmware update has big benefits
<artturin> less power usage and heat
<artturin> mobile-nixos
<artturin> maalis 15 06:41:16 LeoPinePhone kernel: 1c28c00.serial: ttyS2 at MMIO 0x1c28c00 (irq = 42, base_baud = 1500000) is a 16550A
<artturin> mobian
<artturin> Nov 19 23:35:50 mobian kernel: 1c28c00.serial: ttyS2 at MMIO 0x1c28c00 (irq = 34, base_baud = 1500000) is a U6_16550A
<artturin> 16550A vs U6_16550A
<artturin> for both serial serial1: tty port ttyS2 registered
<artturin> nvm not both
<artturin> only nixos has that message
<artturin> yet no /dev/ttyS2
<samueldr> ah, so you checked that on mobian it acts as you expected?
<samueldr> then carry on, I assumed you were assuming
<artturin> i checked mobian and manjaro
<artturin> both work correctly
torbuntu has joined #nixos-aarch64
<artturin> tor.sh is the guy on fedora
<torbuntu> I'm the guy 😂
<artturin> hmm
<artturin> * We distinguish between 16550A and U6 16550A by counting
<artturin> * how many bytes are in the FIFO.
<artturin> nixos dw-apb-uart 1c28400.serial: failed to request DMA
<artturin> 1c28c00.serial: ttyS2 at MMIO 0x1c28c00 (irq = 42, base_baud = 1500000) is a 16550A
<artturin> serial serial1: tty port ttyS2 registered
<artturin> mobian does not have failed to request DMA
<artturin> im using the manjaro kernel config on nixos btw
rajivr has joined #nixos-aarch64
<artturin> samueldr: should i close this https://github.com/NixOS/mobile-nixos/pull/333
<{^_^}> mobile-nixos#333 (by Artturin, 4 days ago, open): pine64-pinephone: comment how to enable console output during boot
<samueldr> I'm not sure
<artturin> its just a comment so there shouldn't be a issue in merging it
<artturin> if the cmdline args are reworked in the future it can just be remove
<samueldr> I guess what could be done for now is add this detail to the pinephone readme
<samueldr> but what's causing me pause is that it's not a pinephone detail
<samueldr> it's just linux :/
<samueldr> (I haven't taken time to think about any of that yet)
<samueldr> I prefer having the PR open as a reminder
<artturin> i thought it was a simple pr so i did it in the master branch of my fork and now i want to make a branch for the audio fix
<samueldr> oh, never work on master directly ;)
<samueldr> always open a topic branch!
<artturin> yep :/
<samueldr> but I see why you're asking: because github is quite unergonomic with that issue
<samueldr> you cannot re-use the same branch name for another PR
edcragg2 has joined #nixos-aarch64
adisbladi has joined #nixos-aarch64
Gaelan_ has joined #nixos-aarch64
aforemny_ has joined #nixos-aarch64
sigtrm has joined #nixos-aarch64
<artturin> i'll test the audio fix by "simulating" a fresh boot by deleting asound.state by using my computer and then booting
shad has joined #nixos-aarch64
bdju_ has joined #nixos-aarch64
globin has joined #nixos-aarch64
luigy_ has joined #nixos-aarch64
aforemny has quit [*.net *.split]
aleph- has quit [*.net *.split]
ajs124 has quit [*.net *.split]
edcragg has quit [*.net *.split]
bdju has quit [*.net *.split]
globin_ has quit [*.net *.split]
luigy has quit [*.net *.split]
Gaelan has quit [*.net *.split]
adisbladis has quit [*.net *.split]
shad_ has quit [*.net *.split]
sigtrm_ has quit [*.net *.split]
edcragg2 is now known as edcragg
aleph- has joined #nixos-aarch64
ajs124 has joined #nixos-aarch64
justanotheruser has joined #nixos-aarch64
<artturin> works
<{^_^}> mobile-nixos#337 (by Artturin, 24 seconds ago, open): pine64-pinephone: add alsa ucm config files to make the audio work
bdju_ has quit [Quit: Reconnecting]
bdju has joined #nixos-aarch64
patagonicus5 has joined #nixos-aarch64
patagonicus has quit [Ping timeout: 264 seconds]
patagonicus5 is now known as patagonicus
h0m1 has quit [Ping timeout: 260 seconds]
h0m1 has joined #nixos-aarch64
<artturin> updated the gist with the mobian info
<zhaofeng> Kernel source code with some binary executable, hmm: https://github.com/deadman96385/android_kernel_lenovo_mt8167s/blob/smart-clock/scripts/mkimage
<zhaofeng> The Makefile calls it the `PRIVATE_MKIMAGE_TOOL`. I see u-boot's mkimage has functionality to generate MTK boot images with special boot headers, but not sure whether those are the same thing
<samueldr> zhaofeng: I believe none of the binaries will be required
<samueldr> with my two mediatek devices I was able to just use other binaries
<samueldr> but yes
<samueldr> it's bad, and probably not compliant with the GPL
<samueldr> (unless you already tried building the kernel and it failed with mkimage)
<samueldr> if you did, try doing the same trick with mkimage from ubootTools
<samueldr> ,locate bin mkimage
<{^_^}> Found in packages: ubootTools
<samueldr> turns out the trick with dtc_overlay helped postmarketOS users too!
<zhaofeng> It failed trying to execute the binary, which is enabled by `CONFIG_MTK_DTBO_FEATURE`
<samueldr> oh
<samueldr> try that trick!
<samueldr> haven't had a mediatek device with dtbo shenanigans yet
bdju has quit [Read error: Connection reset by peer]
bdju has joined #nixos-aarch64
<zhaofeng> I don't think that's actually necesary, since the kernel in the boot.img dump looks like a normal zImage with appended dtb
<samueldr> probably not required
<samueldr> BUT
<samueldr> there's still the dtbo partition that exists
<samueldr> and that will cause issues if it's like qualcomm devices
<samueldr> those dtbo will get overlaid on the kernel dtb
<samueldr> which is fine if it's from a compatible revision
<samueldr> but if your kernel "upgrades" to an incompatible one, it might not work anymore
<samueldr> with qualcomm kernels there is an option to "APPEND" the dtbo during the kernel build time
<samueldr> might not be qualcomm specific
<samueldr> CONFIG_BUILD_ARM64_DT_OVERLAY is it IIRC
<samueldr> it *may* be appropriate to `fastboot erase dtbo` when using that
<samueldr> something I don't know for sure
monk has left #nixos-aarch64 ["Error from remote client"]
<zhaofeng> Cool, let me give that a try.
<zhaofeng> So that's why erasing the dtbo partition was necessary on my OnePlus 6, hmm
<samueldr> possibly!
<samueldr> it's something I don't yet grok
<samueldr> I know the vague outline of the issues
monk has joined #nixos-aarch64
<samueldr> but I haven't taken the time to investigate and test
<samueldr> I would have to take a device with dtbo partition, install an old android release, including its dtbo partition, then try a newer android kernel
<samueldr> *and* the reverse situation
<samueldr> and that wouldn't prove anything except if I have a bad result
<samueldr> the theory here is that you could have a common boot image with basic dtb for a bunch of devices
<samueldr> with the per-device bits in the dtbo partition
<samueldr> artturin: I see one common difference
<samueldr> kernel 5.11 in nixos only!
<samueldr> all others are on 5.10
s1341_ has joined #nixos-aarch64
<artturin> added manjaro which is at 5.11
s1341_ has joined #nixos-aarch64
s1341_ has joined #nixos-aarch64
s1341_ has quit [Changing host]
<samueldr> artturin: missing its /proc/tty/driver/serial
justanotheruser has quit [Ping timeout: 260 seconds]
<zhaofeng> samueldr: For the other mediatek devices, do you need to enable some special configs to get framebuffer console?
<samueldr> assume OEM vendor kernel trees can't enable the framebuffer console
<samueldr> because maybe you won't be able to
<zhaofeng> The kernel _seems_ to boot, but I can't see anything on screen (FRAMEBUFFER_CONSOLE is enabled). I can't easily take the device apart to get a serial line :/
<samueldr> zhaofeng: if it "hangs" it's a sign the kernel is running
<artturin> manjaro serial added
<samueldr> you can look in /sys/fs/pstore in e.g. TWRP to find the previous kernel boot dmesg
<samueldr> which is not as good as a serial interface, but what I use on all my devices without serial access
<samueldr> zhaofeng: a trick is to force the init to quit
<samueldr> prepend `exit 22` or some other value
<samueldr> then that should in theory cause a kind of bootloop
<samueldr> it should at least panic the kernel
<zhaofeng> Well, first I need to port twrp to this thing 😛
<samueldr> then you can look at the pstore path under TWRP and confirm what it says there
<samueldr> or any ROM I guess
<samueldr> as long as you can read the files
<samueldr> but already
<samueldr> even without TWRP or such
<samueldr> you can try that
<samueldr> a bootloop will tell you it was likely running
<samueldr> (when "hanging")
<samueldr> since git.rip is rip...
<samueldr> I can't check
<samueldr> but there's two main modes for android gadget mode
* zhaofeng can't even see it bootlooping, as the entire boot process before the Android splash doesn't have any display output
<zhaofeng> (in fastboot mode the screen is powered off)
<samueldr> oh!
<samueldr> odd
<samueldr> looks like it's not "android_usb"
<samueldr> so I would hazard a guess on mainling gadgetfs
<samueldr> IF the defconfig mt8167s_som_*defconfig are the right files
<samueldr> NO
<samueldr> I'm wrong
<samueldr> it probably is android_usb
<samueldr> it uses CONFIG_USB_G_ANDROID
<samueldr> so mobile.usb.mode = "android_usb";
<samueldr> and appropriate idVendor/idProduct
<zhaofeng> And it will enable the ethernet gadget mode?
<samueldr> not by itself, but will allow use of gadget mode
<samueldr> you can use adb
<samueldr> (which I personally like)
<samueldr> or yes, rndis
<zhaofeng> Oh, there's adbd in stage1?
<samueldr> yes!
<samueldr> I think I'm the only non-android distro (except ubports maybe) to have adb working
<samueldr> in theory it should work on the pinephone once usb gadget mode works
<samueldr> since it worked on other fun devices!
<samueldr> so yeah, to know which mode to enable, check in your kernel config for CONFIG_USB_G_ANDROID
<samueldr> if it's CONFIG_USB_G_ANDROID=y, then android_usb
<samueldr> otherwise gadgetfs
<samueldr> obviously, any usb gadget is only useful if things boot enough for the initrd to work!
<zhaofeng> Let me try in a bit (getting distracted). I can theoretically root the Android ROM, but it will be pretty awkward to use as it's Android Things :/
<zhaofeng> (it's the Lenovo Smart Clock)
<samueldr> I figured from the branch name
<samueldr> looks like a "fun" project to hack on
<samueldr> (especially given the lack of feedback early on)
<zhaofeng> It would be pretty cool to get NixOS there, and maybe I can slap Mycroft on there to actually use it as a smart clock with a voice assistant
<samueldr> effectively
<zhaofeng> The lack of visual indicator is indeed pretty annoying, though
<samueldr> any LEDs on the device?
<zhaofeng> Nope :/
<samueldr> aww
<samueldr> those are also useful, on devices with LEDs you can force the kernel to enable them earlier than initrd
<samueldr> so you can get a feeling of whether it is even booting the kernel or not
<samueldr> zhaofeng: any factory image links?
<samueldr> found it, probably
<zhaofeng> yes that one
<samueldr> and yes, right after found that
<samueldr> I wonder if it's only a matter of enabling the backlight
<zhaofeng> Hmm, possibly
<zhaofeng> Would be nice if it's only a matter of flipping it to 1 :P
<samueldr> looking at the kernel driver to see
<samueldr> hm, too many overloaded use of the term "data" to be sure
<samueldr> zhaofeng: that's what's in the kernel, if you didn't extract it yourself already https://gist.github.com/4643006d6264ffe41f294385f98ecf01
<zhaofeng> hmm
<samueldr> DRM is good here
<zhaofeng> Should I just try starting X?
<samueldr> the GUI for the splash speaks DRM
<samueldr> so X wouldn't help any more
<samueldr> (THIS is why the android dump project is invaluable... so much information can be gathered!!)
<zhaofeng> 🤨
<samueldr> oh, that config for GADGETFS may not be required
<samueldr> yeah no, red herring
<samueldr> I have strong confidence it's mobile.usb.mode = "gadgetfs"; from reading the kernel config
<samueldr> doesn't look like their config has the prerequisites for the misc. rndis drivers to show up in the kernel config
<samueldr> zhaofeng: (I haven't seen any of your attempts) also check modules are built-in
<samueldr> e.g. =y, not =m
<zhaofeng> Still stuck in something else, but let me quickly push my changes somewhere
<samueldr> if you were wondering
<samueldr> quirks.fb-refresher.enable is not required anymore for the splash thing to work
<samueldr> if the concept is still required
<zhaofeng> Yeah, I wasn't sure what that was for, and then I checked the package
<zhaofeng> I call it "google-mt8167s" as I believe all the Android Things platforms are generic (the base ROM images are supplied by Google), but I may be wrong
<samueldr> it could be the issue here, depending on how the dtbo stuff is going
<samueldr> nothing jumps to me
<samueldr> I would try setting up gadgetfs
orivej has joined #nixos-aarch64
<samueldr> oops
<samueldr> I forgot to select the "gadgetfs functions"
<samueldr> then `mobile.adbd.enable = true` should work
<samueldr> otherwise, you'd have to get the ramoops
<zhaofeng> Nice, need to try adbd in an hour or so
<zhaofeng> ramoops would be pretty hard to get without a working recovery or rooted android :/
<zhaofeng> If you are interested, I can drop ship you a device from ebay :)
<zhaofeng> The worst thing that can happen is that you are stuck with a locked-down smartclock haha
<samueldr> that is an interesting proposal
<samueldr> if you end up doing no progress, think about it again I guess
pavan has joined #nixos-aarch64
<pavan> I am going to calculate unique count but it parsing only 500 rows , which i have more than 600+ count
<pavan> In grafana
<artturin> samueldr: the issue might be because all the kernel modules are built in
<artturin> so theres races or smth
<artturin> something gets to something first
<artturin> so im building the kernel with =m's on the device now
<artturin> using my raspi 4 as a distributed builder
monk has left #nixos-aarch64 ["Error from remote client"]
monk has joined #nixos-aarch64
fooker has quit [Ping timeout: 260 seconds]
aforemny_ is now known as aforemny
cole-h has quit [Ping timeout: 264 seconds]
orivej has quit [Ping timeout: 246 seconds]
fooker has joined #nixos-aarch64
evils has quit [Ping timeout: 245 seconds]
<s1341_> is it possible to have a nix-shell derivation which includes both an fhs (for the host) and crossSystem (for cross-compiling)?
zupo has joined #nixos-aarch64
pavan has quit [Ping timeout: 264 seconds]
grw1 has quit [Quit: WeeChat 1.4]
andoriyu has quit [Ping timeout: 276 seconds]
orivej has joined #nixos-aarch64
andoriyu has joined #nixos-aarch64
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zupo has joined #nixos-aarch64
aforemny is now known as aforemny_
aforemny_ is now known as aforemny
claudiii has quit [Quit: Connection closed for inactivity]
patagonicus6 has joined #nixos-aarch64
patagonicus has quit [Ping timeout: 246 seconds]
patagonicus6 is now known as patagonicus
patagonicus6 has joined #nixos-aarch64
patagonicus has quit [Ping timeout: 245 seconds]
zupo has quit [Ping timeout: 260 seconds]
zupo has joined #nixos-aarch64
patagonicus69 has joined #nixos-aarch64
patagonicus6 has quit [Ping timeout: 264 seconds]
patagonicus69 is now known as patagonicus6
monk has left #nixos-aarch64 ["Error from remote client"]
monk has joined #nixos-aarch64
patagonicus6 is now known as patagonicus
patagonicus has quit [Quit: The Lounge - https://thelounge.chat]
patagonicus has joined #nixos-aarch64
dev_mohe has joined #nixos-aarch64
misuzu has quit [Remote host closed the connection]
misuzu has joined #nixos-aarch64
dev_mohe has quit [Quit: dev_mohe]
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cole-h has joined #nixos-aarch64
superherointj has joined #nixos-aarch64
<superherointj> In my RockPro64, If I use U-boot latest (from hydra), I get: "Flattened Device Tree blbo at 01f00000/nBooting using the fdt blob at 0x1f00000"
<superherointj> *blob
<superherointj> I'd like to understand this better. Am I using an invalid u-boot version? Should U-boot and NixOS be at sync? How do I know which u-boot version I should use?
<superherointj> I'm trying to understand why it happens, I wish I could use latest u-boot and nixos. But I haven't been able to.
<superherointj> samueldr, do you understand why this happens?
<Ke> you mean the address is wrong or it's not booting past that?
<Ke> btw. I built u-boot using sources from nadia for pbp and it failed to boot while u-boot from same sources compiled on archlinux does boot
<superherointj> Idk Ke. Still trying to figure it out.
<Ke> yes, I think this is similar to what I had
<Ke> unless I messed up the sources, it's either the config or the build environment
<Ke> I would also be interested, if this can be resolved, sadly don't have resources to help right now
justanotheruser has joined #nixos-aarch64
<superherointj> I'll let you know if I happen to make any advance.
<Ke> anyway, at least you have some unreliable proof that it's not about sources being bad
<veleiro> https://www.clockworkpi.com/devterm looks like it uses the same chip at the CM3 or the CM3 itself
<veleiro> but whats that A06 with the A53 + A72?
h0m1 has quit [Quit: WeeChat 3.1]
h0m1 has joined #nixos-aarch64
pavan has joined #nixos-aarch64
<cepheus> From what I can tell, they're separate boards that are meant to be pin-compatible with the CM3, by the looks?
<cepheus> as in the CM3 option they offer is just an unmodified CM3 and the other boards are ones they've designed to be drop in replacements using the same interface the CM3 does
<cepheus> as for what actual CPU that is, from a cursory search the A06 is probably http://opensource.rock-chips.com/images/d/d7/Rockchip_RK3399_Datasheet_V2.1-20200323.pdf based on matching core counts, GPU block and max frequency
<cepheus> there even appear to be RPI direct competitor SBCs using that SoC, so it seems like a fairly reasonable guess
<Ke> though I think amlogic and nxp had something similar
<Ke> maybe nxp uses vivante though
<cepheus> NXP doesn't appear to licence Mali at all, amlogic licences some mali GPUs but apparently not the t860 (if you believe wikipedia)
<cepheus> mediatek makes two SoCs with the t860 but both are 4+4
<Ke> rk3399 is very popular now for a reason
<samueldr> superherointj: fresh u-boot or existing u-boot install from a previous image?
<samueldr> oh, latest u-boot from nixos
<samueldr> so I guess fresh u-boot
<samueldr> I don't have a rockpro, so it's not really possible for me to say
<samueldr> artturin: it's plausible that there could be a race. If there is, it is extremely unfortunate and the drivers should be fixed
<samueldr> but, we probably want to start making the pine64-flavoured kernel modular to make a common build for the pinetab
<samueldr> since there's no modem in the pinetab, it would end up circumventing the issue
<samueldr> veleiro/cepheus: there are different clockworkpi boards, and they all use different CPUs, IIRC there is as you said the RK3399 one for A-06XX
<samueldr> and I believe the A04* were most likely sunxi
<samueldr> but the lack of actual details for things "shipping in 2021" is concerning
<cepheus> To be fair, I wouldn't want to commit to shipping anything electronic in 2021 either :p
<samueldr> being vague in the actual specs of the boards is the kind of things vendors selling phones with extremely inexpensive or fake specs do
<samueldr> "eight core CPU!"
<samueldr> * the cheapest we could find
pavan has quit [Ping timeout: 264 seconds]
<samueldr> when you're buying a still unpopular SBC or embedded device, it's a bad idea to go for one you cannot know the actual specs
<samueldr> since you'll be unable to do research beforehand to make sure things will work
<cepheus> yeah
<cepheus> it's not a PC where you can just slap any old silicon in there and pretty much call it a day after all
<samueldr> but it should be!
<cepheus> ofc
<samueldr> but OEMs generally stop after putting whatever silliness the SoC vendor gave them as a "BSP"
* samueldr sighs
<samueldr> the SoC vendor is *also* part of the issue obviously
rajivr has quit [Quit: Connection closed for inactivity]
<cepheus> you can't even realistically call any two SoCs userspace compatible unless they use the same GPU given the extremely variable feature support and quality of drivers
<cepheus> (if you care about the GPU, anyway)
<samueldr> hm?
<samueldr> I don't follow
<cepheus> was just kind of getting at GPUs and their implementations on SoC frequently have enough quirks or other issues that it can be difficult to assure that intensive 3d applications would work correctly without the actual hardware to hand in a way which is less true of the ISA side of things
<cepheus> just waffling a bit really
evils has joined #nixos-aarch64
justanotheruser has quit [Quit: WeeChat 2.9]
zupo has joined #nixos-aarch64
konubinix has joined #nixos-aarch64
justanotheruser has joined #nixos-aarch64
justanotheruser has quit [Quit: WeeChat 2.9]
justanotheruser has joined #nixos-aarch64
superherointj has quit [Quit: Leaving]
Thra11 has joined #nixos-aarch64
patagonicus9 has joined #nixos-aarch64
cole-h_ has joined #nixos-aarch64
zupo_ has joined #nixos-aarch64
zupo has quit [*.net *.split]
cole-h has quit [*.net *.split]
patagonicus has quit [*.net *.split]
patagonicus9 is now known as patagonicus
Thra11 has quit [Quit: WeeChat 3.1]
zupo_ has quit [Ping timeout: 265 seconds]
<samueldr> since I've been seeing these terms a lot with mobile nixos adjacent searches
<samueldr> pretty much what I had assumed, but it's good to have confirmation
<samueldr> in other news, I now have a fastbootd-capable device!