01:16
h0m1 has quit [Ping timeout: 244 seconds]
01:18
h0m1 has joined #nixos-aarch64
02:27
knerten2 has joined #nixos-aarch64
02:30
matias_ is now known as cript0nauta
02:31
knerten1 has quit [Ping timeout: 256 seconds]
02:59
orivej has quit [Ping timeout: 256 seconds]
03:01
orivej has joined #nixos-aarch64
03:02
alp has quit [Remote host closed the connection]
03:25
<
ashkitten >
samueldr: btw do you have any idea where to look for kernel sources for the cosmo?
03:25
quinn has joined #nixos-aarch64
03:29
<
ashkitten >
this looks promising
03:31
mla has quit [Remote host closed the connection]
03:32
mla has joined #nixos-aarch64
03:39
<
samueldr >
ashkitten: no I don't and yeah you found probably what I would have sent you
03:39
<
samueldr >
the dguidipc I believe is the official source
03:39
<
samueldr >
which means that POO they, too, are not updating their kernel sources on time
03:40
<
samueldr >
ugh, kernel source without history
03:40
<
samueldr >
what a user-hostile thing
03:42
<
samueldr >
yeah, that gemian fork is likely not bad, probably good
03:43
<
samueldr >
notkit is involved with non-android-linu on android devices
03:43
<
samueldr >
non-android-linux*
03:49
orivej has quit [Ping timeout: 256 seconds]
03:52
<
ashkitten >
samueldr: should i name the device planet-cosmo?
03:53
<
samueldr >
planet- is the right prefix
03:53
<
samueldr >
(that's what postmarketOS uses for the gemini pda)
03:53
<
samueldr >
I don't know if it should be cosmo or cosmocommunicator
03:53
<
ashkitten >
does it affect much?
03:53
<
samueldr >
nothing really
03:54
<
ashkitten >
just gonna go with planet-cosmo for now, name = "Cosmo Communicator" manufacturer = "Planet Computers"
03:54
<
samueldr >
but AFAICT neither have named it!
03:54
<
samueldr >
ashkitten: sounds good
03:54
<
samueldr >
and at worst it's a trivial change
03:55
<
ashkitten >
hmm not sure about all the other stuff tbh
03:55
<
ashkitten >
the soc is mediatek... something
03:55
<
ashkitten >
screen is 1920x1080? i think?
03:55
<
samueldr >
it's always fun finding those facts :)
03:56
<
samueldr >
you have to unpackbootimg a boot.img
03:56
<
samueldr >
which could be TWRP, or stock boot.img
03:56
<
samueldr >
(or find the info elsewhere, but I don't know where really)
03:58
<
samueldr >
so, for the SoC
03:58
<
ashkitten >
2160x1080
03:58
<
samueldr >
>> The Cosmo is based on the powerful Mediatek P70
03:58
<
samueldr >
then I put Mediatek P70 on a search engine
03:58
<
samueldr >
and hope to find the MTxxyy name
03:59
<
samueldr >
doesn't look like it's trivially (first result) findable
03:59
<
samueldr >
though there's luck!
04:00
<
samueldr >
we can get the info out of the defconfig for the device
04:00
<
samueldr >
I know it's the defconfig since it's the only one that's been edited in that repo
04:00
<
samueldr >
so it looks like planet computers haven't even had their BSP customized to change the name from the default defconfig name
04:01
<
samueldr >
(or whoever does the software part for them?)
04:01
<
samueldr >
k71v1_64 looks like is a generic mediatek platform base according to an online search
04:02
<
samueldr >
weird though they're not on the same SoC
04:02
<
samueldr >
weird, I have no idea why the defconfig name is the same then
04:03
<
ashkitten >
they don't even change the usb vid/pid it looks like
04:03
<
ashkitten >
Bus 001 Device 020: ID 0e8d:201c MediaTek Inc.
04:03
<
samueldr >
VIDs/PIDs is a bit more complex AFAIUI
04:03
<
samueldr >
as in, maybe it's part of their contract so they don't have to buy their owns
04:04
<
samueldr >
and anyway getting their owns would mean they need their own driver variants without real need
04:04
<
samueldr >
(AFAIUI for windows... though I might be wrong?)
04:05
<
ashkitten >
so i've got a twrp.img
04:05
<
ashkitten >
what is unpackbootimg?
04:06
<
samueldr >
(my mice just died)
04:06
<
samueldr >
my mouse*
04:06
<
samueldr >
it's the inverse of mkbootimg ;)
04:06
<
samueldr >
it's a tool that unpacks boot imgs
04:06
<
samueldr >
it's a tool that's available if you nix-shell /path/to/mobile-nixos/shell.nix
04:06
<
samueldr >
it'll be in that shell
04:09
<
samueldr >
>> Remember that you can install TWRP only on the EMPTY_RECOVERY_BOOT_2 partition
04:12
<
ashkitten >
ugh, kernel/default.nix looks long
04:12
<
samueldr >
you started off of which device?
04:12
<
samueldr >
I can chunk the explanation in more abstract pieces
04:13
<
ashkitten >
xiaomi-begonia, i guess
04:13
<
samueldr >
since there's a thing in there that's unique for it that you will likely need
04:14
<
samueldr >
it patchelfs some bad binary garbage that you should ask planet computers to provide the GPL source of
04:14
* samueldr
adds to TODO list, to ask for it from xiaomi
04:16
<
samueldr >
the installTargets and postInstall are likely not needing any change
04:17
<
samueldr >
so really, what you'll have to change is (1) the source (2) the version [so it matches, the nixos kernel builder will fail otherwise] (3) the patches
04:17
<
ashkitten >
where is the kernel version?
04:17
<
samueldr >
out of (3) you're likely to need the mtkfb one, center-logo too, fix-bootloader-cmdline has already been done for you
04:17
<
samueldr >
in the Makefile
04:18
<
ashkitten >
right i see
04:18
<
samueldr >
though, you're left with figuring out a config file for the kernel
04:19
<
samueldr >
two weeks ago I would have said "uuuuh, try to extract it from a boot.img file, using binwalk and some ungodly amount of manual steps, and maybe it won't be there"
04:19
<
samueldr >
since then I figured out a better way
04:20
<
samueldr >
you can use `bin/kernel-normalize-config planet-cosmo` to generate it
04:21
<
samueldr >
(btw, all of this assumes nixpkgs-unstable, adjust NIX_PATH accordingly)
04:24
<
ashkitten >
$ bin/kernel-normalize-config planet-cosmo
04:24
<
ashkitten >
trace:
***********************************
04:24
<
ashkitten >
trace: * Evaluating device: planet-cosmo *
04:24
<
ashkitten >
trace:
***********************************
04:24
<
ashkitten >
error: The option `mobile.system.system' is used but not defined.
04:24
<
ashkitten >
(use '--show-trace' to show detailed location information)
04:24
<
ashkitten >
sh: line 1: /bin/nconf: No such file or directory
04:24
<
samueldr >
hmm, that's bad, it tries to continue if the eval fails :)
04:24
<
clever >
,locate bin nconf
04:25
<
samueldr >
clever: forget about it
04:25
<
samueldr >
it's in
*that* kernel
04:25
<
{^_^} >
Couldn't find in any packages
04:25
<
samueldr >
ashkitten: you'll need to add he mediatek entry in the hardware-mediatek.nix module
04:25
<
samueldr >
ashkitten: it should be relatively straight-forward
04:25
<
ashkitten >
did that
04:26
<
ashkitten >
it was complaining about that before, but i'm not sure what it's complaining about now
04:26
<
samueldr >
ashkitten: just validating, both the option and the config?
04:27
<
ashkitten >
right, not the config
04:27
<
samueldr >
it is unknown yet if you need the fb-refresher quirk, so you can add it for now and once you have something booting you can try without it
04:27
<
ashkitten >
think it needs fb-refresher?
04:27
<
ashkitten >
ah yeah
04:27
<
samueldr >
because in my (limited) experience with mediatek, you're at a coin toss situation
04:27
<
samueldr >
the older kernel for the x018d needed it, but not the newer one for the begonia
04:28
<
samueldr >
if you don't need it but have it active, it does nothing harmful other than banging the framebuffer a number of time per second
04:29
<
samueldr >
if you need it and don't have it, well, either no display at all or only the first frame
04:29
<
ashkitten >
i'm gonna go do some other stuff for a bit, i'll get back to this after
04:29
<
samueldr >
no worries
04:29
<
samueldr >
I'm likely not going to be there for much longer tonight
04:29
<
samueldr >
but anyway I see some open questions
04:29
<
samueldr >
like how to install it
04:30
<
samueldr >
you could install it using their custom os thingy
04:30
<
ashkitten >
i'm not sure whether or not fastboot boot/flash works
04:30
<
samueldr >
but it seems SOO inconvenient!
04:30
<
samueldr >
fastboot boot I'd bet on another coin toss
04:30
<
ashkitten >
i'll try it out when i do
04:30
<
samueldr >
begonia's doesn't actually boot
04:30
<
samueldr >
I don't recall for x018d
04:30
<
samueldr >
fastboot flash is more likely
04:31
<
samueldr >
and probably much more convenient
04:31
<
samueldr >
and you're likely able to flash onto those other partitions
04:31
<
samueldr >
which... I find it weird that they didn't just do a fastboot thing
04:32
<
samueldr >
hmm, I can see one reason: resizing the partition
04:35
<
samueldr >
ramdis, second, tags offsets don't match, but otherwise begonia's values are good
04:36
<
samueldr >
looks like the kernel commandline is okay to keep as-is, the verity option will not be needed
05:07
<
ashkitten >
samueldr: alright, i'm back
05:08
<
ashkitten >
looks like the rgb order patch doesn't work
05:08
<
ashkitten >
er, doesn't apply
05:08
<
samueldr >
look at the patch, it should be trivial to do the same on your tree :)
05:08
<
samueldr >
(or maybe the x018d variant applies)
05:09
<
samueldr >
unless mediatek somehow made the 4.4 kernel different for no reason, it literally changes an #if 0 to an #if 1
05:09
<
ashkitten >
looks like it's applied to drivers/misc/mediatek/video/mt6785/videox/mtkfb.c
05:10
<
samueldr >
(are you adept with git and git format-patch? that's how I produce those)
05:10
<
ashkitten >
so probably just a different file
05:10
<
ashkitten >
do i need the patch to just see if it boots?
05:10
<
samueldr >
you'll have the red and blue components swapped
05:10
<
samueldr >
that's it
05:10
<
ashkitten >
how do i build the boot image again?
05:11
<
samueldr >
nix-build --argstr device planet-cosmo -A build.android-bootimg # IIRC
05:11
<
samueldr >
(typing this off the cuff)
05:11
<
samueldr >
ensure it builds against nixpkgs-unstable :) won't work against 20.03
05:11
<
samueldr >
that's the #if that needs to be changed
05:12
<
ashkitten >
my nixpkgs is based on nixos-unstable
05:12
<
samueldr >
it literally says where in a pixel the colours are
05:12
<
ashkitten >
(a few weeks out of date i think)
05:12
<
ashkitten >
error: attribute 'targetPrefix' missing, at /home/ash/Projects/mobile-nixos/overlay/mruby-builder/mruby/default.nix:157:43
05:12
<
samueldr >
ooh, you might be in a bad place, depending if few fews or many fews
05:12
<
samueldr >
ooh. right...
05:12
<
samueldr >
*that* fix
05:12
<
samueldr >
-I nixpkgs=channel:nixos-unstable
05:13
<
ashkitten >
alright
05:13
<
samueldr >
I couldn't figure a way to make it compatible with that much older of a nixpkgs because that pkg-config change is... quite invasive
05:13
<
ashkitten >
i'll update my nixpkgs soon, it's just a bit of a hassle to do it often
05:13
<
ashkitten >
yeah np
05:13
<
samueldr >
I understand
05:14
<
ashkitten >
(i also still have a bunch of uncommitted changes to my nixos-config and i don't want to update my nixpkgs until those are committed)
05:14
<
ashkitten >
kernel is building
05:15
<
samueldr >
oh, hm, there's also something that's totally undocumented, and really in need to be
05:15
<
samueldr >
you're likely going to need to enable some kernel configs
05:17
<
samueldr >
if you use `bin/menuconfig planet-cosmo` it'll put you into nconfig, which is basically another menuconfig the kernel has
05:17
<
samueldr >
or if you prefer, though it's not user-friendly, you can edit the config.aarch64 file directly
05:17
<
samueldr >
note that removing an option does not disable it! note that =n is not the reverse of =y!
05:18
<
samueldr >
the reverse of =y is # CONFIG_X_Y_Z is not set
05:19
<
samueldr >
I usually `nvim -d ../other-device/kernel/config.aarch64 kernel/config.aarch64` and I'm sloppy :(
05:20
<
ashkitten >
do i need KERNEL_GZIP, etc?
05:21
<
samueldr >
I believe one of them is already in your config
05:21
<
samueldr >
probably GZIP
05:22
<
samueldr >
or maybe not?
05:22
<
samueldr >
enable GZIP but the others I guess are not required?
05:23
<
samueldr >
and even then I have two devices without GZPI enabled
05:23
* samueldr
makes it all up on the fly
05:25
<
ashkitten >
../drivers/input/touchscreen/mediatek/NT36xxx/nt36xxx_mp_ctrlram.c:1829:5: error: 'snprintf' size argument is too large; destination buffer has size 32, but size argument is 4096 [-Werror,-Wfortify-source]
05:25
<
ashkitten >
i have no idea how to debug kernel build errors
05:26
<
samueldr >
>> Linux version 4.4.146 (dguidi@supernova) (Android (4691093 based on r316199) clang version 6.0.2
05:26
<
samueldr >
using strings on their kernel I can see it's build using an older clang
05:26
<
samueldr >
I would try using either gcc6 ot gcc49 kernel builder
05:27
cole-h has quit [Quit: Goodbye]
05:28
<
samueldr >
it
*may* be necessary
05:28
<
ashkitten >
let's see how gcc6 goes
05:28
<
samueldr >
somehow those kernel "developers" can make it that a kernel successfully builds, but does not boot with a given compiler
05:29
<
ashkitten >
60% of the time it works every time
05:31
<
ashkitten >
no good with gcc6
05:31
<
ashkitten >
trying with your makefile patch thingy
05:35
<
ashkitten >
/nix/store/ypag3bh7y7i15xf24zihr343wi6x5i6g-bash-4.4-p23/bin/bash: ../tools/dct/DrvGen.py: /usr/bin/python: bad interpreter: No such file or directory
05:37
<
samueldr >
you'll need python2 (most likely) and to patchshebangs into tools
05:38
<
samueldr >
so it almost looks like a cross between x018d and begonia for mediatek quirks!
05:43
FRidh has joined #nixos-aarch64
05:44
stiell has quit [Ping timeout: 246 seconds]
05:46
<
ashkitten >
how can i list partitions with fastboot
05:46
<
samueldr >
maybe an unlisted oem getvar comman
05:46
<
samueldr >
command*
05:47
<
samueldr >
getvar partition-layout
05:47
<
samueldr >
fastboot oem getvar partition-layout
05:47
<
samueldr >
otherwise, they should matche the partname (as in gpt partname, not filesystem labels)
05:47
<
samueldr >
but I'm not sure about that
05:51
<
ashkitten >
i love how the install scripts just dd to a partition
05:52
<
samueldr >
it's basically what happens when fastboot flashes
05:53
<
ashkitten >
not sure how to discover the gpt partname though
05:53
<
samueldr >
if you can boot TWRP they are under /dev/block
05:53
<
samueldr >
it's not the usual udev scheme
05:53
<
samueldr >
TWRP should have adb enabled
05:54
<
ashkitten >
is that /dev/block/by-name?
05:54
<
samueldr >
I think yes
05:54
<
ashkitten >
from android:
05:54
<
ashkitten >
Cosmo_Communicator:/ $ ls /dev/block/by-name/
05:54
<
ashkitten >
EMPTY_NORMAL_BOOT_3 boot cam_vpu1 dtbo frp linux logo metadata nvram persist protect2 scp2 spmfw system userdata
05:54
<
ashkitten >
EMPTY_NORMAL_BOOT_4 boot_para cam_vpu2 expdb gz1 lk md1dsp nvcfg otp proinfo recovery sec1 sspm_1 tee1 vendor
05:54
<
ashkitten >
EMPTY_RECOVERY_BOOT_2 cache cam_vpu3 flashinfo gz2 lk2 md1img nvdata para protect1 scp1 seccfg sspm_2 tee2
05:54
<
ashkitten >
lots of partitions here
05:54
<
ashkitten >
but they look like they match the thingy
05:54
<
samueldr >
so it's likely fastboot flash EMPTY_NORMAL_BOOT_3
05:57
<
ashkitten >
i'm not sure where the $1 argument in the install sh comes from
05:59
stiell has joined #nixos-aarch64
06:01
FRidh has quit [Ping timeout: 240 seconds]
06:01
FRidh has joined #nixos-aarch64
06:02
<
samueldr >
from the built-in recovery
06:05
<
ashkitten >
doesn't seem to be working with fastboot
06:05
<
samueldr >
as in fastboot doesn't want to flash EMPTY_NORMAL_BOOT_3?
06:06
<
samueldr >
bummer if so, but you could still `dd` over adb I guess
06:06
<
ashkitten >
tried to flash twrp.img to EMPTY_RECOVERY_BOOT_2 and then boot into that from the selection, it just hangs and reboots
06:06
<
ashkitten >
yeah but i don't have root
06:06
<
ashkitten >
i'll do it tomorrow
06:06
<
samueldr >
if you have TWRP you have root :)
06:06
<
ashkitten >
when i have an sdcard
06:06
<
ashkitten >
so i can install twrp
06:06
<
samueldr >
another fine option
06:06
<
samueldr >
I see now
06:06
<
samueldr >
you haven't run TWRP yet
06:07
<
samueldr >
since you need the sd card for their installer thingamajig, right?
06:07
stiell has quit [Ping timeout: 246 seconds]
06:07
<
ashkitten >
and fastboot doesn't seem to be very functional on this device
06:07
<
samueldr >
it's been becoming less and less useful
06:07
<
samueldr >
across the board
06:07
<
ashkitten >
okay, i'll table this for tomorrow then
06:14
stiell has joined #nixos-aarch64
06:19
stiell has quit [Ping timeout: 256 seconds]
06:22
stiell has joined #nixos-aarch64
06:27
orivej has joined #nixos-aarch64
06:35
alp has joined #nixos-aarch64
07:13
orivej has quit [Ping timeout: 272 seconds]
07:13
orivej has joined #nixos-aarch64
07:19
alp has quit [Ping timeout: 244 seconds]
07:33
<
gmr >
what is the x018d? is that ashkitten 's device?
07:33
<
ashkitten >
no, some other mtk device
07:35
<
gmr >
* mt6771 ? er sorry i'm backreading blind(ly) - cool thanks i'm following now. i'm generally avoiding such devices (for reasons of santiy) anyways nowadays
07:51
alp has joined #nixos-aarch64
08:06
orivej has quit [Ping timeout: 264 seconds]
08:06
orivej has joined #nixos-aarch64
08:25
orivej has quit [Ping timeout: 264 seconds]
08:25
orivej has joined #nixos-aarch64
08:27
alp has quit [Remote host closed the connection]
08:28
alp_ has joined #nixos-aarch64
08:32
alp_ is now known as alp
08:58
alp has quit [Ping timeout: 246 seconds]
09:03
alp has joined #nixos-aarch64
09:23
knerten1 has joined #nixos-aarch64
09:24
alp has quit [Ping timeout: 272 seconds]
09:26
knerten2 has quit [Ping timeout: 264 seconds]
09:52
bennofs_ has joined #nixos-aarch64
09:52
orivej has quit [Ping timeout: 246 seconds]
09:52
orivej has joined #nixos-aarch64
09:55
bennofs has quit [Ping timeout: 246 seconds]
10:48
orivej has quit [Ping timeout: 272 seconds]
10:48
orivej_ has joined #nixos-aarch64
11:02
orivej_ has quit [Ping timeout: 265 seconds]
11:02
orivej has joined #nixos-aarch64
11:21
mvnetbiz_ has joined #nixos-aarch64
11:57
Thra11 has quit [Ping timeout: 256 seconds]
12:11
Thra11 has joined #nixos-aarch64
12:20
Thra11 has quit [Ping timeout: 240 seconds]
12:32
Thra11 has joined #nixos-aarch64
12:37
Thra11 has quit [Ping timeout: 260 seconds]
12:50
Thra11 has joined #nixos-aarch64
12:51
FRidh has quit [Ping timeout: 258 seconds]
12:51
FRidh has joined #nixos-aarch64
13:06
Thra11 has quit [Ping timeout: 256 seconds]
13:11
Thra11 has joined #nixos-aarch64
13:28
dongcarl has quit [Read error: Connection reset by peer]
13:29
dongcarl has joined #nixos-aarch64
13:33
alp has joined #nixos-aarch64
13:45
ryantrinkle has quit [Ping timeout: 264 seconds]
13:56
Thra11 has quit [Ping timeout: 240 seconds]
14:00
ryantrinkle has joined #nixos-aarch64
14:15
Thra11 has joined #nixos-aarch64
14:22
alp has quit [Ping timeout: 272 seconds]
14:30
orivej has quit [Ping timeout: 264 seconds]
14:30
orivej_ has joined #nixos-aarch64
14:40
alp has joined #nixos-aarch64
14:49
FRidh has quit [Quit: Konversation terminated!]
14:59
rsa has quit [Quit: leaving]
15:54
pinkieval has quit [Read error: Connection reset by peer]
15:54
pinkieval has joined #nixos-aarch64
15:58
alp has quit [Ping timeout: 272 seconds]
15:59
alp has joined #nixos-aarch64
16:20
alp has quit [Ping timeout: 272 seconds]
16:21
alp has joined #nixos-aarch64
17:01
ingenieroariel has joined #nixos-aarch64
17:01
ingenieroariel is now known as Guest56561
17:06
alp has quit [Ping timeout: 260 seconds]
17:06
ingenieroariel_ has joined #nixos-aarch64
17:06
ingenieroariel_ has quit [Client Quit]
17:07
ingenieroariel_ has joined #nixos-aarch64
17:07
ingenieroariel_ has quit [Client Quit]
17:08
ingenieroariel_ has joined #nixos-aarch64
17:12
cole-h has joined #nixos-aarch64
17:12
ingenieroariel_ has quit [Client Quit]
17:15
ingenieroariel_ has joined #nixos-aarch64
17:20
ingenieroariel_ has quit [Remote host closed the connection]
17:23
ingenieroariel_ has joined #nixos-aarch64
17:23
alp has joined #nixos-aarch64
17:26
ingenieroariel_ has quit [Client Quit]
17:26
ingenieroariel_ has joined #nixos-aarch64
17:35
ingenieroariel_ has quit [Remote host closed the connection]
17:38
DigitalKiwi has joined #nixos-aarch64
17:42
cole-h has quit [Quit: Goodbye]
17:54
kgtzy[m] has joined #nixos-aarch64
18:02
alp has quit [Ping timeout: 260 seconds]
18:12
<
ashkitten >
acquired microsd
18:19
orivej_ has quit [Ping timeout: 256 seconds]
18:20
orivej has joined #nixos-aarch64
18:31
<
ashkitten >
i dont see a way to use the keyboard with dvorak properly using their provided keymap
18:32
<
ashkitten >
they have a custom keyboard model in the linux system
18:32
<
ashkitten >
but idk how to make it actually do anything
18:33
<
ashkitten >
i'm sure it works for qwerty layout
18:33
<
ashkitten >
but the dvorak variant on top of that does bad things
18:33
<
ashkitten >
like the s key is -
18:37
<
ashkitten >
btw samueldr the twrp image straight up does not boot
18:38
<
ashkitten >
rooted android boots, gemian boots
18:39
<
ashkitten >
twrp has a green bar on the side and then reboots (presumably a panic)
18:44
<
ashkitten >
(and flashes with fastboot, huh)
18:44
<
samueldr >
wow, what a joke
18:45
<
ashkitten >
so i guess uh..
18:45
<
samueldr >
so I guess that means you can flash mobile nixos with fastboot?
18:45
<
ashkitten >
yeah, presumably
18:45
<
ashkitten >
and now i have twrp to grab a ramoops
18:46
<
samueldr >
that's going to be helpful :)
18:46
<
samueldr >
with xiaomi-begonia I never missed a ramoops
18:47
<
samueldr >
compared to I don't remember which qualcomm device, where ramoops sometimes weren't there
18:47
<
samueldr >
gmr: just in case, x018d is an asus phone, "ZenFone Max Plus (M1)" (a mouthful), which too uses a mediatek cpu
18:53
<
ashkitten >
woah i got a sad face screen
18:53
<
ashkitten >
it was blue
18:53
<
samueldr >
good news, it boots to the initrd!
18:53
<
samueldr >
R and B are swapped
18:53
<
samueldr >
some kind of purplish baby blue?
18:53
<
ashkitten >
looked light
18:54
<
samueldr >
most likely something failed at init, you're gonna have "init killed" as a panic reason in the ramoops I bet
18:54
<
ashkitten >
gonna need path to ramoops again
18:54
<
samueldr >
(though no init logs as it is because ugh, I had issues)
18:54
<
samueldr >
/sys/fs/pstore/... something in there
18:56
<
samueldr >
you can search for the string "Kernel panic"
18:56
<
samueldr >
generally there will be only one
18:56
<
samueldr >
[ 4.058774] -(3)[1:loader]Kernel panic - not syncing: Attempted to kill init! exitcode=0x00006300
18:57
<
samueldr >
0x6300 encodes the exit status of the thing that failed, too, but I forget how
18:58
<
ashkitten >
not sure what this is good for, for me
18:58
<
samueldr >
you might want to set CONFIG_PANIC_TIMEOUT to some value like 5, 10, 20
18:58
<
samueldr >
so you'd be able to read the error on the sad face
18:58
<
ashkitten >
oh cool
18:58
<
samueldr >
or 0 to wait forever
18:59
<
DigitalKiwi >
[nix-shell:~]$ which cabal
18:59
<
DigitalKiwi >
/nix/store/lzzm0ghp5k5qsw7kmgfv1304cbk6w8pm-cabal-install-3.2.0.0/bin/cabal[nix-shell:~]$ which ghc/nix/store/5xbnrdw7fy5ckay8l0sb7jb7gakyqqkp-ghc-8.8.3/bin/ghc
18:59
<
samueldr >
this is something I need to get into some useful guidelines
18:59
<
samueldr >
and harmonize between builds
18:59
<
DigitalKiwi >
hot off the presses! get it now on your local friendly community server
19:00
<
DigitalKiwi >
nix-shell -p ghc cabal-install -I nixpkgs=channel:nixos-unstable
19:00
<
DigitalKiwi >
it only took half a day to build
19:03
<
ashkitten >
gotta rebuild the entire kernel to change the panic timeout config ;-;
19:03
<
ashkitten >
i feel like that should be a kernel param thing
19:04
<
samueldr >
it might be
19:04
<
samueldr >
panic= [KNL] Kernel behaviour on panic: delay <timeout>
19:04
<
samueldr >
timeout > 0: seconds before rebooting
19:04
<
samueldr >
timeout < 0: reboot immediately
19:04
<
samueldr >
timeout = 0: wait forever
19:04
<
samueldr >
Format: <timeout>
19:04
<
samueldr >
(sorry for the long paste)
19:04
<
samueldr >
so... uh... it is
19:05
<
samueldr >
I guess the guidance could be 5 for fast~ish reboots on panic, in the kernel settings, and configurable for the build for development to 0
19:08
<
ashkitten >
oh right
19:09
<
ashkitten >
so the cosmo's screen is landscape
19:09
<
ashkitten >
(not actually according to the phone)
19:09
<
ashkitten >
but we should orient mobile-nixos to match that
19:10
<
ashkitten >
No such file or directory - open /sys/class/android_usb/android0/iProduct (Error: ENOENT)
19:10
<
ashkitten >
is what the sad phone screen says
19:10
<
ashkitten >
it still only shows for a second, even though i flashed the build with 20s panic timeout
19:11
<
ashkitten >
guessing that has to do with mobile.usb.mode
19:15
<
samueldr >
oh, hmm... maybe the one on the command line somehow doesn't apply?
19:15
<
samueldr >
or maybe mediatek has a custom path with bad changes
19:15
<
ashkitten >
samueldr: i did it in the kernel config lol
19:16
<
samueldr >
the phone adds to the kernel command line
19:16
<
samueldr >
how much can we bet that it adds a panic= value?
19:16
<
samueldr >
I don't remember if it appends or prepends
19:17
<
ashkitten >
lemme check twrp
19:17
<
ashkitten >
can get the actual cmdline from there
19:18
<
ashkitten >
no panic cmdline
19:18
<
samueldr >
at least you know it's the usb thing
19:18
<
ashkitten >
entire cmdline is this
19:18
<
ashkitten >
console=tty0 console=ttyS0,921600n1 vmalloc=496M slub_max_order=0 slub_debug=OFZPU androidboot.hardware=mt6771 firmware_class.path=/vendor/firmware loop.max_part=7 has_battery_removed=0 androidboot.verifiedbootstate=green androidboot.bootpartition=TWRP androidboot.verifiedbootstate=green androidboot.bootpartition=TWRP root=/dev/ram androidboot.veritymode=enforcing bootopt=64S3,32N2,64N2
19:18
<
ashkitten >
androidboot.selinux=permissive buildvariant=eng androidboot.meta_log_disable=0 androidboot.dtbo_idx=0 printk.disable_uart=1 bootprof.pl_t=5200 bootprof.lk_t=3576 bootprof.logo_t=2547 boot_reason=4 androidboot.serialno=ZSIRKFGU59OR9P6H androidboot.bootreason=kernel_panic gpt=1 usb2jtag_mode=0 mrdump_ddrsv=yes mrdump_cb=0x11e000,0x2000
19:18
<
ashkitten >
maybe that will be useful to reference
19:18
<
samueldr >
your serial number shows :/
19:19
<
samueldr >
(though AFAIK there is nothing bad in showing it)
19:19
<
samueldr >
(it's not like it was your IMEI)
19:19
<
ashkitten >
i forgot phones just have numbers that if leaked can be dangerous :/
19:20
<
ashkitten >
what an awful concept
19:21
<
ashkitten >
how do i figure out the correct mobile.usb.mode
19:22
<
samueldr >
since it can't do android_usb, it's gadgetfs
19:22
<
samueldr >
you could look under /sys for the right paths
19:22
<
samueldr >
(in TWRP)
19:23
<
ashkitten >
what paths am i looking for?
19:23
<
samueldr >
I don't recall :/
19:23
<
ashkitten >
also it doesn't look like CONFIG_USB_GADGETFS is enabled in the kernel
19:23
<
ashkitten >
not sure if that's actually relevant
19:24
<
samueldr >
yeah it should be
19:24
<
samueldr >
it's gadgetfs it's 99.99% sure
19:24
<
samueldr >
oh right
19:24
<
samueldr >
the mountpoint for configfs is variable
19:24
<
samueldr >
so it might not be where I set it
19:25
<
ashkitten >
so do i need to enable the kernel option?
19:26
<
samueldr >
oh, you said is
*doesn't look like* it's enabled
19:26
<
samueldr >
I misread you
19:27
<
samueldr >
CONFIG_USB_GADGETFS being unset is fine
19:27
<
samueldr >
CONFIG_USB_GADGET is the one that is important
19:28
<
samueldr >
(I had to check on other devices)
19:28
<
ashkitten >
anyway looks like there's no configfs mount in twrp at least
19:28
<
samueldr >
I wonder if there's another scheme in-between for mediatek devices
19:29
<
samueldr >
TWRP surely uses some kind of usb gadgetery
19:29
<
samueldr >
or else you couldn't adb into it
19:29
<
samueldr >
though maybe the configfs mount is implicit
19:30
<
ashkitten >
mobile nixos splash!
19:30
<
samueldr >
it's now likely stuck looking for NIXOS_SYSTEM
19:30
<
ashkitten >
i'll put that on the microsd
19:30
* samueldr
can't wait to dig himself out of the yak shave mountain
19:30
<
ashkitten >
since i don't need that anymore
19:31
<
samueldr >
you're gonna download the rootfs from hydra, right?
19:31
<
samueldr >
note that you most likely still need to get that patch goinf for RGBA/BGRA order :)
19:32
<
ashkitten >
i'll do that once i verify it boots
19:32
<
ashkitten >
i think i need to clean some stuff out of the kernel config as well
19:32
<
ashkitten >
android networking is enabled
19:33
<
ashkitten >
firefox, why did you think it was a good idea to open rootfs.zst as a text file in browser instead of downloading :/
19:34
<
samueldr >
see, I'm sloppy as heck too with that
19:34
<
samueldr >
that's why I need to make a tool that checks those
19:34
<
ashkitten >
hmmm wonder if i can use fastboot to flash the sdcard while it's in the device
19:36
<
samueldr >
I'd say unlikely
19:36
<
samueldr >
though, you have the source for it!
19:36
<
ashkitten >
yeah, heh
19:36
<
samueldr >
it's relatively unusual to have the source for it available
19:37
<
samueldr >
like, you have the downstream Qualcomm aboot or abl available, but not often the OEM's version
19:38
<
ashkitten >
*glances at free -h on twrp*
19:39
<
samueldr >
it's not "sd card vs. internal storage", but actually two different internal storage schemes
19:39
<
samueldr >
not specific to the device, but generic to fastboot
19:40
<
ashkitten >
i'm pushing the system image to a tmpfs on twrp because i have enough ram :p
19:42
<
ashkitten >
it didn't work?
19:42
<
ashkitten >
no space left on device...
19:43
<
ashkitten >
oh, tmpfs has a size limit by default
19:43
<
ashkitten >
meh, lemme use 90% of my ram with this system image
19:44
<
ashkitten >
would be smaller if i could decompress on the fly but twrp doesn't have a zstd binary
19:44
<
samueldr >
tmpfs defaults to ram/2
19:44
<
samueldr >
dd over adb
19:44
<
ashkitten >
can you?
19:44
<
ashkitten >
oh, duh
19:44
<
samueldr >
see the device-specific notes :)
19:44
<
samueldr >
you'd probably want to of= on the right device though
19:46
<
ashkitten >
that'd be /dev/mmcblk1
19:46
<
ashkitten >
/dev/block
19:47
<
samueldr >
maybe you want to do this on a partition?
19:47
<
samueldr >
though I guess linux doesn't really care
19:47
<
ashkitten >
sure, i guess
19:47
<
ashkitten >
i forgot it's not a full disk image
19:49
orivej has quit [Ping timeout: 258 seconds]
19:49
orivej has joined #nixos-aarch64
19:50
<
ashkitten >
the colors actually look correct, samueldr
19:51
<
ashkitten >
problem: looks like the display is not initialized correctly and there is a bar on the left side of the screen, not sure exactly what's coloring it
19:52
<
ashkitten >
and the touchscreen is initialized wrong
19:52
<
ashkitten >
the touchscreen doesn't match the display at all
19:52
<
samueldr >
might be that gemian's kernel does something
19:52
<
samueldr >
(for the colors)
19:52
<
ashkitten >
it's like it's rotated 90 degrees
19:53
<
samueldr >
that's "trivial" to fix, but there is no mechanism
19:53
<
samueldr >
that's not it
19:53
<
samueldr >
that's for the display
19:54
alp has joined #nixos-aarch64
19:54
<
ashkitten >
well, the display should be upright according to the keyboard
19:54
<
ashkitten >
it seems like the touchscreen is in the correct orientation
19:54
<
ashkitten >
but the display itself is not
19:54
<
samueldr >
weird, I thought I had something for that because of that chuwi device
19:55
<
samueldr >
but I only see a calibration thing
19:55
<
samueldr >
xinput --map-to-output DEVICE DISPLAYNAME
19:56
<
samueldr >
I don't know with a framebuffer driver like this one how it will act though
19:56
<
ashkitten >
hmm the screen also does not turn off when the lid is closed
19:56
<
ashkitten >
but we can look at that after
19:56
<
samueldr >
that's... something I haven't really looked at for any devices :)
19:56
<
samueldr >
nothing about suspend states or similar
20:00
<
ashkitten >
there's also some awful whine noise in nixos
20:00
<
ashkitten >
bit terrifying lol
20:00
<
samueldr >
so yeah, once you're on the desktop of that image, you're in uncharted territory for us both :)
20:01
<
ashkitten >
i'm glad i got it to boot to desktop, i need to start my day a bit so i'll be back to this in a while
20:01
<
samueldr >
no problems
20:03
<
ashkitten >
a hint i'd follow is treeki's twrp, since it seems to have correct display and no whine :p
20:03
<
samueldr >
oh, yeah, forgot ninji_ had a twrp
20:03
<
ashkitten >
that's the one i used :p
20:03
<
samueldr >
it's using a prebuilt kernel
20:04
<
ashkitten >
oh dear
20:04
* samueldr
checks for a config file
20:05
<
samueldr >
btw, once you have a kernel(.gz), ungzip it, and run binwalk -e
20:06
<
samueldr >
if it has a kernel config embedded (e.g. /proc/config.gz, or other IKCONFIG options) it will be extracted
20:06
<
samueldr >
D00730: Linux make config build file, ASCII text
20:12
<
ashkitten >
hoping that whine is not harmful, but honestly i bet it's just the display
20:12
<
samueldr >
could be the backlight for the display too
20:12
<
samueldr >
/sys/class/leds (iirc) there should be lcd-backlight
20:13
<
samueldr >
echo 20 | sudo tee /sys/class/leds/lcd-backlight/brightness
20:13
<
samueldr >
or something like that
20:13
<
ashkitten >
it was definitely at full power
20:15
<
samueldr >
most devices start at full power
20:15
<
samueldr >
did it change the whine?
20:15
<
ashkitten >
i haven't checked
20:15
<
ashkitten >
i was building the kernel with that config
20:15
alp has quit [Ping timeout: 244 seconds]
20:15
<
ashkitten >
it didn't like that
20:16
<
ashkitten >
dunno why
20:17
<
ashkitten >
ramoops doesn't seem to give me much useful
20:17
<
samueldr >
can you share it?
20:18
<
samueldr >
that's unlikely to be the oops from that boot as it panics at 3 seconds in
20:19
Thra11 has quit [Ping timeout: 258 seconds]
20:19
<
samueldr >
hmm... not good
20:20
<
samueldr >
OH, I completely forgot about mediatek uart cables until I remembered just now that fl*kli had one
20:23
<
samueldr >
oof, I'm a bit spooped by the use of a USB A to C adapter to do this
20:23
<
samueldr >
though anyone can figure out the proper type-c pinout using that
20:24
<
samueldr >
I'll try with the micro usb first, I hope I have the right adapters around
20:25
<
samueldr >
oh, I guess the micro to type-c adapters could do too
20:30
<
ashkitten >
oh weird, the whine isn't there now
20:30
<
ashkitten >
i didn't do anything
20:30
<
samueldr >
I didn't either
20:30
<
ashkitten >
i would hope so
20:30
<
samueldr >
maybe it's a couple circumstances that need to happen, and it happens even with other systems
20:33
<
ashkitten >
also still annoyed about the keyboard layout
20:34
<
ashkitten >
i can't use the built-in keyboard rn because of that
20:34
<
ashkitten >
even on gemian
20:35
<
samueldr >
I don't recall how I came to the conclusion before you got yours that they had done a goof
20:35
<
samueldr >
and made "their own layout"
20:35
<
ashkitten >
probably here
20:35
<
samueldr >
like, when configured as qwerty, is it qwerty as expected?
20:36
<
ashkitten >
sure but it doesn't match the keycaps
20:36
<
samueldr >
does it match the keycap location on the qwerty edition?
20:36
<
samueldr >
if so it's less worse than I thought
20:36
<
samueldr >
ah, less bad
20:36
<
samueldr >
(still not good)
20:36
<
ashkitten >
i honestly wish they'd made their own keyboard firmware though, and set the layout in that
20:37
<
samueldr >
I wonder, short of doing a udev remaping, what could be done
20:37
<
ashkitten >
because right now it just does not work
20:37
<
ashkitten >
honestly thinking about bugging them to see if i can get them to ship me qwerty keycaps, but they probably wouldn't
20:37
<
ashkitten >
and i'd probably have a hell of a time swapping them on anyway
20:37
julm has quit [Quit: reboot]
20:38
<
ashkitten >
this phone has so many problems :/
20:40
<
ashkitten >
maybe i can pull the custom layout from android or smth
20:42
julm has joined #nixos-aarch64
20:46
Thra11 has joined #nixos-aarch64
20:49
<
DigitalKiwi >
why's this happening
20:58
<
DigitalKiwi >
t184256: can i do a nix-collect-garbage on nix-on-droid or does it break it
20:58
<
DigitalKiwi >
t184256: i did something that broke it and i'm not sure if it was that or something else
21:02
<
t184256 >
DigitalKiwi: in theory, it should be fine
21:03
<
t184256 >
In practice, I've done that a dozen times and it was OK
21:04
<
samueldr >
DigitalKiwi: looks like it's something like sha256 = ""; which is not a good hash
21:04
<
samueldr >
though I don't grok what's going on in your case
21:16
<
DigitalKiwi >
samueldr: yeah but like how's it getting there from nixpkgs
21:16
<
DigitalKiwi >
and it works on other places :?
21:48
alp has joined #nixos-aarch64
22:29
cole-h has joined #nixos-aarch64
22:38
orivej has quit [Ping timeout: 258 seconds]
22:38
orivej has joined #nixos-aarch64
22:44
alunduil has quit [Ping timeout: 246 seconds]
22:44
chessai has quit [Ping timeout: 240 seconds]
22:44
TheNumb has quit [Ping timeout: 246 seconds]
22:45
chessai has joined #nixos-aarch64
22:45
alunduil has joined #nixos-aarch64
22:47
cstrahan has quit [Ping timeout: 244 seconds]
22:48
dsal has quit [Ping timeout: 260 seconds]
22:49
angerman has quit [Ping timeout: 244 seconds]
22:50
feepo has quit [Ping timeout: 244 seconds]
22:50
chessai has quit [Ping timeout: 244 seconds]
22:50
prusnak has quit [Ping timeout: 272 seconds]
22:50
pkral has quit [Ping timeout: 260 seconds]
22:50
taktoa[c] has quit [Ping timeout: 260 seconds]
22:51
alunduil has quit [Ping timeout: 272 seconds]
22:51
jackdk has quit [Ping timeout: 272 seconds]
22:51
elvishjerricco has quit [Ping timeout: 240 seconds]
22:51
davidtwco has quit [Ping timeout: 260 seconds]
22:52
NekomimiScience has quit [Ping timeout: 244 seconds]
22:52
c00w has quit [Ping timeout: 265 seconds]
22:53
claudiii_ has quit [Ping timeout: 272 seconds]
22:53
blackriversoftwa has quit [Ping timeout: 272 seconds]
23:14
tdeo has joined #nixos-aarch64