ryantrinkle has joined #nixos-aarch64
orivej has joined #nixos-aarch64
h0m1 has quit [Ping timeout: 276 seconds]
h0m1 has joined #nixos-aarch64
orivej has quit [Ping timeout: 265 seconds]
zupo has joined #nixos-aarch64
tilpner has quit [Quit: tilpner]
tilpner has joined #nixos-aarch64
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
t184256 has left #nixos-aarch64 ["Disconnected: Replaced by new connection"]
t184256 has joined #nixos-aarch64
zupo has joined #nixos-aarch64
nbp has quit [*.net *.split]
nbp has joined #nixos-aarch64
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zupo has joined #nixos-aarch64
orivej has joined #nixos-aarch64
chiefgoat has quit [Quit: ZNC 1.7.5 - https://znc.in]
chiefgoat has joined #nixos-aarch64
zupo has quit [Ping timeout: 265 seconds]
zupo has joined #nixos-aarch64
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zupo has joined #nixos-aarch64
orivej has quit [Ping timeout: 265 seconds]
bennofs has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
bennofs has joined #nixos-aarch64
bennofs has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
bennofs has joined #nixos-aarch64
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
grw has quit [*.net *.split]
samueldr has quit [*.net *.split]
Aleksejs has quit [*.net *.split]
Aleksejs has joined #nixos-aarch64
samueldr has joined #nixos-aarch64
grw has joined #nixos-aarch64
grw has quit [*.net *.split]
samueldr has quit [*.net *.split]
Aleksejs has quit [*.net *.split]
Aleksejs has joined #nixos-aarch64
samueldr has joined #nixos-aarch64
grw has joined #nixos-aarch64
ryantrinkle has quit [Ping timeout: 276 seconds]
orivej has joined #nixos-aarch64
ryantrinkle has joined #nixos-aarch64
<betaboon> samueldr: yeah i did. and i was thinking of using nix-shell as shebang xD but then i thought "hm maybe allow non nix users to use it as well XD
zupo has joined #nixos-aarch64
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pbb has joined #nixos-aarch64
pbb_ has quit [Ping timeout: 246 seconds]
pbb has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
pbb has joined #nixos-aarch64
pbb has quit [Client Quit]
pbb has joined #nixos-aarch64
<samueldr> I think that device exhibits the minimum requirements for boot partition; an older device that's not even aarch64 also has a 16MiB boot partition
<samueldr> so I think that's how much space a bootloader that kexecs needs to fit in
Thra11 has quit [Ping timeout: 250 seconds]
chiefgoat has quit [Quit: ZNC 1.7.5 - https://znc.in]
chiefgoat has joined #nixos-aarch64
zupo has joined #nixos-aarch64
<samueldr> I'm kinda surprised that android kernels ship with dmesg logging enabled... I had assumed it was hard to disable, but it isn't
ornxka has joined #nixos-aarch64
<ornxka> is there a slightly less painful way to cross-compile arm boot images from x86 machines than setting up a distributed/remote build
<samueldr> that's a trick question if I heard one :)
<ornxka> ideally also avoiding compiling through qemu
<samueldr> a remote builder doesn't do cross-compilation in the sense of cross-compilation :)
<ornxka> ah...
<samueldr> (neither does QEMU-based compilation)
<samueldr> those end up being native compilations
<samueldr> but the evaluation happened locally
<simpson> I was going to say that surely the QEMU-style cross-building that we normally do with Nix is not painful, just slow and resource-intensive.
<ornxka> is using qemu then the simplest way to build arm images from x86?
<samueldr> and at one point failed due to discrepancies with incomplete emulation of either syscalls or cpu
<samueldr> it might be the more complete way
<ornxka> im not sure what "complete" means in that context
<samueldr> that most things will build out of the box
<samueldr> here this is a configuration that, last verified in september, built with actual cross-compilation an sd image
<ornxka> ooh
<samueldr> it disables a few options that have issues with cross-compilation
<samueldr> there were new regressions in nixpkgs last month though
<samueldr> (IIRC all are have PR opened to fix)
<samueldr> though, using cross-compilation have drawbacks, where when/if you nixos-rebuild, the rebuild would be a native build, and you'd have no actual cache for those builds
<ornxka> hm
<samueldr> as the build "system" (as in x86_64-linux) changes, the builds are different due to the nature of now nix works
<samueldr> of how nix works*
<ornxka> i was thinking of setting up remote build after i had set up the image, and have it so that when i do eg nix-env blahblah on the arm system, it would cross-compile the package on the remote x86 system
<ornxka> is that possible?
<clever> samueldr: but if you set configuration.nix to want a cross-compile, via nixpkgs.crossSystem and nixpkgs.localSystem, it will farm the build out to an x86 machine
<clever> and reuse the cross-compiled products
<samueldr> clever: that's ornxka that wants to know that :)
<samueldr> an yeah, I thought there was a way, but wasn't sure
<samueldr> ornxka: is your target aarch64? if so, nixpkgs has a pretty well furnished cache
<samueldr> it would be working against the current for the standard use case to go with cross-compilation
<ornxka> its armv7 unfortunately
<samueldr> aw, I was checking, just in case
orivej has quit [Ping timeout: 240 seconds]
<clever> samueldr: dangit, lol
<clever> i trimmed my nails, and now i cant get the SD card out of an rpi3!
<samueldr> see? now you're forced to impleement an SD out of an FPGA
<clever> [ 0.000000] paging_init 1
<clever> [ 0.000000] paging_init 2
<clever> 1628 pr_info("paging_init 2\n");
<clever> 1630 pr_info("paging_init 3\n");
<clever> 1629 ->>>>>>>map_lowmem();
<clever> ok, so its hanging here
<samueldr> aarch64?
<clever> arm32 on rpi3
<samueldr> right, wasn't sure if it was 32 or 64 bit
<clever> its either locking up solid, or its unmapping the uart from its own address space
<samueldr> since IIRC aarch64 makes it harder by needing a trustzone implementation
<clever> i believe i figured out how to unlock aarch64 on the rpi3 open firmware
<clever> there was a #define nearby, to unlock it
<clever> which failed, because i was testing on an rpi2, lol
<clever> the rpi2 has a better uSD slot
<clever> arm32 and arm64 have entirely different ISA's
<clever> so the chainloader silently failing, indicates that it was expecting arm64 opcodes
<clever> [ 0.000000] for_each_memblock (ptrval) to (ptrval)
<clever> %p failed, and it crashed on the first iteration of the loop
<samueldr> clever: not sure if you've seen my notes about the minimal requirements for a "tertiary" bootloader using linux on android devices
<samueldr> but it's not going to be especially fun
<clever> ?
<samueldr> 16MiB to fit initrd + kernel(+dtb)
<clever> have you seen how small haskell-init was?
<samueldr> yeah, but it has to be useful in the end :)
<samueldr> I have to make some userspace optimisations next I believe
<samueldr> since systemd-udevd brings in a bunch of bytes
<clever> do you have working framebuffer?
<samueldr> yes
<samueldr> and it's among the "bloated" kernel built-ins
<samueldr> QUALCOMM!!!!!!!
<clever> whats the touchscreen and button input methods?
<samueldr> they're espeically good at making sure their kernels can't build with options toggeled off
<clever> /dev/event ?
<samueldr> clever: probably both working
<samueldr> touchscreen works in x11
<samueldr> using libinput iirc
<samueldr> so that's like all standard stuff
<samueldr> the main issue will be userspace implementation of a GUI in <8MiB
<clever> yeah
<samueldr> which *is* possible, after all, TWRP does it
<samueldr> qualcomm's drivers are full of unverified dependencies to other modules where irrelevant :(
<clever> ||| 1470 pr_info("c.3\n");
<clever> ||| 1471 ->>>>>>>->>>>>>>->>>>>>>/* This better cover the entire kernel */
<clever> this is where it fails, lol
<clever> [ 0.000000] for_each_memblock 1000 to 30000000
<clever> i think its mapping that whole range...
<clever> from 4kb to 768mb
<clever> the kernel is definitely in there
<clever> BCM2708ArmControl::start(): mapped peripherals VC 0x7E000000 to ARM 0x3F000000
<clever> but the uart start saround 1008mb
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<clever> ok, thats a problem
<clever> it was remapping ram before io, and cutting itself off, so i couldnt see any more debug
<clever> so i modified it to print all mappings, before applying any
<clever> its only mapping io, and nothing else
<clever> only mapping ram*
<clever> i think i need more DT entries, to map gpio
ryantrinkle has quit [Ping timeout: 245 seconds]
<clever> | 755 pr_info("foo\n");
<clever> | 757 pr_info("done\n");
<clever> | 756 ->>>>>>>BUG_ON(pmd_bad(*pmd));
<clever> [ 0.000000] foo
<clever> samueldr: ok, that is not where i expected an error.....
<samueldr> in the README?
<clever> samueldr: BUG_ON is just halting
<samueldr> maybe BUG_OFF is an appropriate response?
<clever> lol
<samueldr> neat
<clever> | 755 pr_info("foo %d\n", pmd_bad(*pmd));
<clever> [ 0.000000] foo 2
<clever> that seems to confirm it
<clever> but not what "it" is
<clever> include/asm-generic/page.h:} pmd_t;
<clever> 40 typedef struct {
<clever> 42 } pmd_t;
<clever> 41 ->>>>>>>unsigned long pmd[16];
<clever> arch/riscv/include/asm/pgtable.h:static inline int pmd_bad(pmd_t pmd)
<clever> arch/arm/include/asm/pgtable-2level.h:#define pmd_bad(pmd) (pmd_val(pmd) & 2)
<clever> arch/arm/include/asm/pgtable-3level.h:#define pmd_bad(pmd) (!(pmd_val(pmd) & 2))
<clever> in both cases, its selecting the 2 bit, so that explains why its 2 and not true
<clever> arch/arm/include/asm/pgtable-2level-types.h:typedef pmdval_t pmd_t;
<clever> 34 typedef struct { pmdval_t pmd; } pmd_t;
<clever> ah, on arm, its a diff type
<clever> 25 typedef u32 pmdval_t;
<clever> its just a 32bit int
<clever> so, if the 2 bit of this int, is set, then everything explodes in my face
<clever> > (0xe).toString(2)
<clever> '1110'
<{^_^}> attempt to call something which is not a function but an integer, at (string):271:2
<clever> [ 0.000000] pmd is 11c0e
<clever> yep, i can confirm the 2 bit is present
<clever> now to go backwards up the callchain...
<clever> alloc_init_pmd maybe?
njd has quit [Ping timeout: 276 seconds]
njd has joined #nixos-aarch64
orivej has joined #nixos-aarch64