mDuff has quit [Ping timeout: 258 seconds]
<DigitalKiwi> how do i use this serial cable?
<DigitalKiwi> i guess i could read a post
<DigitalKiwi> i have to figure out what pins to connect anyway
<samueldr> it really depends of the exact model
<samueldr> and then of what board
<samueldr> so yeah
<samueldr> the gist of it is you connct ground to gound, tx to rx, rx to tx, and then NOT connect the 5V cable
<DigitalKiwi> i have a rpi3b+ or rpi 3b currenly mucking around with the 3b
<DigitalKiwi> why are there 4 but only use 3
<DigitalKiwi> for other boards?
<samueldr> other uses
<samueldr> I *think* the pi can be powered through it correctly, but I'm not sure
<samueldr> but... sometimes RX and TX are not trivially labeled on the cable so you may end up connecting TX to TX and RX to RX... not a huge deal it just won't work as expected
<samueldr> swapping them will fix it
<clever> something ive been playing with here, and just got working nicely, auto reboot
<lovesegfault> I want an SBC with m.2
<clever> when i run this program, it pulls the DTR pin high, allowing the pi to run
<clever> when i ctrl+c, it pulls DTR low, causing the pi to get stuck in reset, until i next start it
<clever> https://www.sparkfun.com/products/9873 has a DTR pin on it, just jumper that to RUN (an unpopulated header), and your done
<samueldr> oh, interesting
<clever> and that then lets me streamline my development even further
<clever> make && uart-manager
<clever> compile, then execute
<clever> ctrl+c to stop executing
<clever> the netboot makes it as seamless as a local program
<DigitalKiwi> what do i do on the host? do i need any special software?
<DigitalKiwi> is host the right word
<DigitalKiwi> doesn't sound right
<DigitalKiwi> the debugger
<samueldr> host is fine I think
<clever> DigitalKiwi: just run any normal (or special) serial program, like minicom or screen (or what i just wrote, heh)
<samueldr> minicom, picocom, screen
<samueldr> I personally use picocom, but that's mostly because I'm used to it
<clever> i couldnt get minicom to twiddle DTR, so i wrote my own, heh
<DigitalKiwi> ok thanks that would have taken me a while to find
<clever> samueldr: do you happen to know how file transfer protocols work over serial? can the remote end request a file without interaction usually?
<clever> or must you actively send it
<samueldr> not at all, I wasn't using computers when it was more of a thing
<samueldr> first connection to "the information super highway" was through ADSL in like 1999 or 2000
<DigitalKiwi> it would help if i tried logging in with an existing user
<samueldr> definitely
<samueldr> you may also need to provide the right password
<DigitalKiwi> ikr
<lovesegfault> Hmmm
<DigitalKiwi> it should have my ssh key though
<lovesegfault> nmcli can't connect to wifi on my RPi3
<lovesegfault> keeps asking for a wifi password
<samueldr> no ssh key for serial
<lovesegfault> even when I provide it
<DigitalKiwi> oh i haven't gotten to the serial yet
<DigitalKiwi> i'd already popped the sd card in my laptop and checked shadow- and saw the only user was pi
<DigitalKiwi> it's been a while since i was on this one, obviously
<DigitalKiwi> if i connect the serial will it tell me when i trigger gpio
<DigitalKiwi> alternatively is there a way to see that
<samueldr> serial access only gives you "a console"
<samueldr> just like you would on your computer using CTRL+ALT+F2, it's mingetty
<samueldr> that launches the login thing
<DigitalKiwi> oh, right
<clever> [nix-shell:~/apps/rpi-open-firmware/firmware]$ make && scp build/bootcode.bin root@router.localnet:/tftproot/open-firmware/bootcode.bin && uart-manager
<clever> and its complete!
<clever> and ive borked something hard
<samueldr> your firmware is complete? :)
<samueldr> ah
<samueldr> complete it is then
<clever> the testing cycle is complete
<clever> i can now just run that 1 cmd, to build, and test it
<clever> ctrl+c to stop testing
<clever> zero changes, and now it boots this time
<clever> going to blame packet loss on the router, need to fix that NIC
<DigitalKiwi> ok my button turns it on
<DigitalKiwi> for some reason it's not turning it off so something's wrong with the software hmm
<DigitalKiwi> ty for help btw
<DigitalKiwi> clever:++
<DigitalKiwi> clever++
<{^_^}> clever's karma got increased to 309
<DigitalKiwi> samueldr:++
<DigitalKiwi> samueldr++
<{^_^}> samueldr's karma got increased to 150
<DigitalKiwi> sorry
<DigitalKiwi> well
<DigitalKiwi> that's something
wavirc22 has quit [Ping timeout: 240 seconds]
<samueldr> looks like the wrong baud rate
<DigitalKiwi> ha! that was it
<DigitalKiwi> neat
<DigitalKiwi> i got my power button and power led working!
<DigitalKiwi> does anyone else have an interest in getting this working or know what i could do to patch it https://github.com/jgarff/rpi_ws281x/blob/master/main.c
<DigitalKiwi> it tries to detect what hardware it's on and it looks for a file that doesn't exist on nixos
<DigitalKiwi> umm that repo not that file
<DigitalKiwi> is there a file on nixos like that
<DigitalKiwi> in addition/alternatively anyone want to rewrite/make haskell bindings to it
<DigitalKiwi> just kidding...unless?
<DigitalKiwi> i might get to it someday
h0m1 has quit [Ping timeout: 252 seconds]
h0m1 has joined #nixos-aarch64
lovesegfault has quit [Ping timeout: 265 seconds]
<thefloweringash> lovesegfault: the NanoPC-T4 has a full m2 slot
<thefloweringash> As does the Honeycomb LX2K, but that’s more of a computer than an SBC.
<samueldr> I'm looking forward for the upcoming revision
<thefloweringash> Which revision?
<samueldr> in a discussion about PCIe and ARM https://stuff.samueldr.com/screenshots/2020/01/20200117215418.png
<samueldr> john nettleton is a known person in ARM stuff AFAIK
<thefloweringash> What are the expected changes?
<samueldr> that's the only thing I know
<samueldr> but it was known that the early boards were going to be different than the final
<samueldr> but not how
<samueldr> so I'm looking forward about *knowing* about the coming revision, if it makes more sense :)
<thefloweringash> There’s a long list of errata on the SolidRun side, which they really should fix. Haven’t heard anything about the NXP side
<samueldr> haven't kept up to date really
<samueldr> still would like an ARM workstation at home
<samueldr> glad the laptop is more than passable
<thefloweringash> I hope this doesn’t mean running Linux on the pre production version will become difficult
<samueldr> well, it shouldn't, you have a static device tree describing the hardware and the kernel will load it to know how it's setup
<samueldr> right?
<samueldr> riiiiight?
<samueldr> (that's sarcasm)
<thefloweringash> Will arms ever work like this?
<samueldr> yes
<samueldr> they already do
<samueldr> except it's not a device tree
<samueldr> it's ACPI
<samueldr> :^)
<samueldr> those new ARM windows laptops
<samueldr> but it should be like that
<samueldr> I despise the decision of abusing the device trees to parameterize the hardware
<samueldr> like how the kernel has shifted putting quirks into the code into writing them into device trees
<samueldr> so now you can't just have a "one good description" of the hardware in your firmware
<samueldr> no, you have to load the device tree that shipped with your kernel!
<samueldr> imagine if you had to update your laptop's BIOS with each kernel upgrade!
<samueldr> madness
<thefloweringash> I’m going to assume this was necessary
<thefloweringash> How do you know which quirks to apply?
<thefloweringash> (If not tagged in the device tree)
<samueldr> they already have to do that for ACPI-based hardware on x86_64
<samueldr> there's a list of ways to do it "the right way"
<samueldr> they generally use the strings in the bios that identifies the laptop or hardware
<samueldr> so here it would be the main "compatible" string
<clever> of note, the rpi SD controller, has a funky bug when dealing with 16bit writes
<samueldr> like for the pbp, pine64,pinebook-prorockchip,rk3399
<samueldr> oh
<clever> if you write the top and bottom half of a 32bit register, as a pair of 16bit writes, the 2nd write is just discarded, if you do it too quickly
<samueldr> there's nulls in there
<clever> the nulls are a list
<clever> dtc doesnt parse it right when decompiling
<samueldr> pine64,pinebook-pro rockchip,rk3399
<samueldr> with pine64,pinebook-pro they have WAAAY more to work with than on many ACPI-based devices!
<clever> linux needs to specially handle the bug i mentioned, and defer a 16bit write, and batch 2 of them into a 32bit write
<samueldr> because there's some that just ships "has to be filled by O.E.M" strings
<samueldr> then they do other heurstics
<thefloweringash> I'm super on board with the hardware contributing its own description. Having the kernel be a big hardware database is not great, even without the linux specific parameters in the device trees
<samueldr> the kernel will always need to have a database, but it shouldn't be the one true source of truth
<samueldr> well, I say database, but it's more about mappings of what hardware is what and how to know it
<thefloweringash> but does it need to be so exhaustive in terms of having an entry for every model of computer ever
<samueldr> right, yeah
<samueldr> it doesn't
<samueldr> and furthermore, if the kernel needs to add to the device trees, they should be overlays!
<samueldr> dtbo!
<thefloweringash> you'd need some interface to augment the hardware description when connecting peripherals to the expansion busses, like spi displays
<samueldr> and the kernel should have a way to load them in the kernel rather than punt those to the bootloader stages!
<thefloweringash> yeah, that
<samueldr> here I was thinking about hacks that are "on the hardware"
<samueldr> not even the external stuff
<samueldr> since, you know
<samueldr> there's already a way to load dtbos at runtime!
<samueldr> that's a thin wrapper over the *existing* stuff in the kernel
<thefloweringash> oh, I saw the 96boards articile but didn't notice the configfs interface wasn't in mainline
<samueldr> hm?
<thefloweringash> I skimmed a little too hard. I didn't realise you needed an out of tree module
<samueldr> right
<samueldr> though it's quite minimal :)
<samueldr> I believe that one is *another* implementation
<samueldr> they are linking to another one
<samueldr> (though 404s)
<samueldr> >> For example, "Transactional Device Tree & Overlays" describes an interface using ConfigFS, but this has not been merged to the upstream at the time of writing (2016-04-04).
wavirc22 has joined #nixos-aarch64
<samueldr> I still have a big gap in groking device trees that hampers me when playing with stuff (though it's filling all the time)
<samueldr> but that dtbocfg stuff seemed to work on mainline with the rpi3
<samueldr> what didn't work is the display since all the things I was finding were for the foundation's kernel
<samueldr> ah
<samueldr> ANOTHER THING
<clever> have you seen the dtparam commands that the rpi uses some?
<samueldr> forking off the device trees
<clever> 181 dtparam audio=off
<samueldr> that's just so rude
<clever> 184 dtoverlay spi-gpio40-45
<clever> 193 dtparam -R spi-gpio40-45
<clever> 194 dtparam audio=on
<samueldr> now you have created "the mainline" and the "downstream" device trees
<samueldr> when you write an overlay you have to target one of those
<clever> i dont know exactly how this works, but this disables the audio port, then re-maps the audio pins to the spi controller
<clever> then undoes it
orivej has joined #nixos-aarch64
andi- has quit [Remote host closed the connection]
andi- has joined #nixos-aarch64
wavirc22 has quit [Read error: Connection reset by peer]
wavirc22 has joined #nixos-aarch64
ryantrinkle has quit [Ping timeout: 268 seconds]
zarel_ has joined #nixos-aarch64
zarel has quit [Ping timeout: 258 seconds]
wavirc22 has quit [Ping timeout: 268 seconds]
cap_sensitive has quit [Ping timeout: 268 seconds]
cap_sensitive has joined #nixos-aarch64
cap_sensitive has quit [Ping timeout: 268 seconds]
orivej has quit [Ping timeout: 268 seconds]
orivej has joined #nixos-aarch64
cap_sensitive has joined #nixos-aarch64
cap_sensitive has quit [Client Quit]
orivej has quit [Ping timeout: 272 seconds]
alunduil has quit []
alunduil has joined #nixos-aarch64
c00w has quit []
c00w has joined #nixos-aarch64
zupo has joined #nixos-aarch64
wavirc22 has joined #nixos-aarch64
zupo_ has joined #nixos-aarch64
zupo has quit [Ping timeout: 272 seconds]
zupo_ has quit [Ping timeout: 265 seconds]
bennofs has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
bennofs has joined #nixos-aarch64
wavirc22 has quit [Ping timeout: 268 seconds]
wavirc22 has joined #nixos-aarch64
h0m1 has quit [Quit: WeeChat 2.7]
h0m1 has joined #nixos-aarch64
orivej has joined #nixos-aarch64
mDuff has joined #nixos-aarch64
pbb_ has quit [Remote host closed the connection]
pbb has joined #nixos-aarch64
pbb has quit [Quit: No Ping reply in 180 seconds.]
mDuff has quit [Ping timeout: 260 seconds]
dongcarl has quit [Quit: The Lounge - https://thelounge.chat]
pbb has joined #nixos-aarch64
dongcarl has joined #nixos-aarch64
dongcarl has quit [Quit: The Lounge - https://thelounge.chat]
dongcarl has joined #nixos-aarch64
dongcarl has quit [Quit: The Lounge - https://thelounge.chat]
dongcarl has joined #nixos-aarch64
t184256 has left #nixos-aarch64 [#nixos-aarch64]
dongcarl has quit [Quit: The Lounge - https://thelounge.chat]
t184256 has joined #nixos-aarch64
dongcarl has joined #nixos-aarch64
zupo has joined #nixos-aarch64
dongcarl has quit [Quit: The Lounge - https://thelounge.chat]
dongcarl has joined #nixos-aarch64
dongcarl has quit [Quit: The Lounge - https://thelounge.chat]
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<samueldr> for (my) longstanding issue of mainline linux and eMMC speed, https://forum.armbian.com/topic/7552-roc-rk3399-pc-renegade-elite/page/5/?tab=comments#comment-92227
<samueldr> seems to affect another board
<samueldr> they have a less bodgey patch, which instead first tries at full speed rather than simply going at the lower speed
<samueldr> though rk3399 too
dongcarl has joined #nixos-aarch64
dongcarl has quit [Client Quit]
zupo has joined #nixos-aarch64
<sphalerite> samueldr: did I mention my workaround with repeatedly unbinding/rebinding the driver?
<samueldr> I think you did, but I didn't remember
<samueldr> and I don't remember if you shared code, sphalerite
<sphalerite> https://github.com/lheckemann/coreboot-gru-bob-nix/blob/1ee5fc9cbe09317e73c3ed53aa87bed7598dcc76/autoboot.sh#L21-L30 for posterity since I have a newer version lying around that I'm about to push
<samueldr> great, might try on dumo
<samueldr> hmm, once the new init is merged :)
<sphalerite> depending on how small it is, I might snarf it for my coreboot stuff as well ;)_
<samueldr> kernel+initrd have to fit in 16MiB for motorola-addison
<samueldr> IIRC the initrd is ~8MiB
<samueldr> though I still need to go trimming stuff
<samueldr> right now the big hog is systemd's udev, found out yesterday we have eudev
<samueldr> not sure if it will help since the initrd stuff already minimize deps
<samueldr> maybe it'll be easier to get through pkgsStatic or pkgsMusl than systemd
<samueldr> btw I intend to look into bundling it in the pinebook pro spi flash too :)
zarel_ has quit [Quit: ZNC 1.7.4 - https://znc.in]
<sphalerite> yeah I need to get it into 8MiB together with coreboot and the kernel, so it's another bit tighter
<samueldr> I haven't optimized it yet
<sphalerite> but since it's so hardware-specific I don't mind e.g. creating device nodes with mknod or using devtmpfs instead of udev and stuff like that
<samueldr> though the init itself is quite minimal, haven't verified with all the features, but at the moment it was a PoC the init + scripts in one static binary were about 900KiB
<sphalerite> that could still be workable
<samueldr> it likely would be worthwhile to add support for udev-less functionality
zarel has joined #nixos-aarch64
<samueldr> or maybe with busybox's?
<samueldr> ah, that's another bit that can be trimmed off, most of busybox
<samueldr> when I say "fits in 16MiB with the kernel" it also includes helpful things like adb or rndis+sshd
<samueldr> right now I'm still using the full blown busybox, rather than a minimal one
<clever> right now, i have a 14mb zImage, that includes both linux and a very basic initrd
<samueldr> MB or mb?
<clever> -rwxr-xr-x 1 clever users 14M Jan 18 14:59 arch/arm/boot/zImage
<samueldr> just making sure you're not flexing
<samueldr> ah, and the OEM kernel suuuuuucks... there's almost nothing that can be disabled
<clever> [LDR:read_file]: zImage: reading 14396664 bytes to 0x2000000 (allocated=0) ...
<clever> that fat
<samueldr> disable webcam stuff? there, adb fails
<clever> samueldr: oh, do you know the trick for tracking down kernel size?
<samueldr> there maye be multiple
<samueldr> but there's a neat one on one of those linux wikis
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<samueldr> that's how I figured out gains
<clever> [nix-shell:~/apps/rpi/linux/build]$ find -name built-in.a -print0 | xargs -0 ls -lShr
<clever> -rw-r--r-- 1 clever users 43K Dec 20 05:52 ./drivers/built-in.a
<clever> -rw-r--r-- 1 clever users 736K Jan 18 14:59 ./built-in.a
<samueldr> yep
<samueldr> I think it was something even "better" with one of those commands that knows about .a
<samueldr> but same idea
<clever> it looks like 99% of my fat, is the initrd
<clever> the loader currently doesnt support initrd's
<clever> nm can then print the contents of a .a
<clever> and show sizes for symbols
dongcarl has joined #nixos-aarch64
<samueldr> that must have been nm
<clever> fat_functions: a.out
<clever> avr-objdump -t a.out|sort -rk4|head -n15
<clever> avr-nm a.out -S --size-sort|tail
<clever> avr-size a.out
dongcarl has quit [Client Quit]
<clever> avr-size -t ${OBJECTS}
<clever> left-over code, from when the limit i had to deal with, was 16kb
<samueldr> I'm thinking I should better track the "bloat" in stage-1
<samueldr> (in mine)
<clever> same
<clever> -r--r--r-- 1 root root 9.3M Dec 31 1969 initrd/initrd
<clever> thats about 2/3rds the zImage
dongcarl has joined #nixos-aarch64
dongcarl has quit [Quit: The Lounge - https://thelounge.chat]
dongcarl has joined #nixos-aarch64