<hurricos> schmars: only if you edit them in the base-build, right? b/c 80_mount_root occurs after 10_indicate_preinit
<hurricos> RE: editing /etc/board.json or /etc/board.d/
Forst has quit [Ping timeout: 480 seconds]
thejoker8814 has quit [Quit: Ping timeout (120 seconds)]
thejoker8814 has joined #openwrt-devel
cmonroe has quit [Ping timeout: 480 seconds]
tSYS has quit [Quit: *squeak*]
tSYS has joined #openwrt-devel
cmonroe has joined #openwrt-devel
tidalf has quit [Remote host closed the connection]
tidalf has joined #openwrt-devel
gch981213 has joined #openwrt-devel
hanetzer1 has quit [Quit: WeeChat 4.2.1]
goliath has joined #openwrt-devel
aiyion has quit [Ping timeout: 480 seconds]
mcbridematt is now known as Guest2668
mcbridematt has joined #openwrt-devel
aiyion has joined #openwrt-devel
Guest2668 has quit [Ping timeout: 480 seconds]
vincejv has quit [Ping timeout: 480 seconds]
rua has quit [Quit: Leaving.]
rua has joined #openwrt-devel
vincejv has joined #openwrt-devel
robimarko has joined #openwrt-devel
<owrt-images-builds> Build [#19](https://buildbot.openwrt.org/images/#/builders/195/builds/19) of `openwrt-22.03_mvebu/cortexa53` completed successfully.
rsalvaterra has joined #openwrt-devel
<rsalvaterra> So, I was looking for a way to disable the switch (swconfig) leds on my aging TL-WDR3600…
<rsalvaterra> … and according to this ancient commit, they should be exported in sysfs, no? https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=0056ac55afa1a9fe2bd327f5f4ee2140760669f9
<rsalvaterra> (In the /sys/class/leds/tp-link subdir.)
<rsalvaterra> However, that subdir isn't created, I only have the GPIO-connected leds available to control.
<rsalvaterra> Does anyone know if this is a regression, or working as intended (and I missed something)?
<darkxst> sysfs support for gpio/led's is likely removed in recent kernels
<robimarko> rsalvaterra: they are not exposed in UCI?
<rsalvaterra> robimarko: I'm not exactly 1st dan in UCI-fu. How do I see that?
<robimarko> Usually they are registed as netdev LED-s
<robimarko> Though its been ages since I touched anything swconfig based
<rsalvaterra> Not according to pepe2k, in this old forum post (#15, no permalink)… https://forum.archive.openwrt.org/viewtopic.php?id=48317
<rsalvaterra> Heh. I had my WDR3600 with qca8k DSA, but I was having serious issues (switch ports taking *ages* to come up, about 5 minutes each).
<robimarko> 5 minutes screams duplicate MAC-s aka roaming
<rsalvaterra> Oh?
<robimarko> As that is the default timeout for FDB entries
<rsalvaterra> Interesting. I had DSA working stable before (2020's), but sometime in 2022 (the last image I had built for the WDR3600) had this issue.
<rsalvaterra> However, as it wasn't a production device anymore, I just shelved it. Now I dusted off again because I needed a smart switch. :P
<robimarko> Enabling assisted_learning_on_cpu_port for qca8k should help
<robimarko> As the switch has HW learning but like on MT7350 it doesnt work in all cases
<robimarko> Especially when it learns of a WLAN client MAC on another device and then you roam it
<rsalvaterra> I wasn't using Wi-Fi at all, in my case, though.
<robimarko> Thats just an example, if it learns the same MAC twice you will get this issue
<rsalvaterra> I also read somewhere about endianness issues with qca8k (and WDR3600 is big-endian).
<robimarko> That was only issue with the statistics reading via ethernet packets
<robimarko> And has been fixed, MDIO never had those issues
<rsalvaterra> There was also a regression in routing speeds, but that didn't matter so much to me.
<rsalvaterra> I'd rather take the hit for the convenience of the DSA configuration. :)
goetz has quit [Quit: goetz]
goetz has joined #openwrt-devel
<rsalvaterra> I wonder if ath79 should be split in DSA and non-DSA targets… Painful, yes, but…
<f00b4r0> rsalvaterra: i have multiple WDR3600 running 21.02 and 23.05 and LEDs are controllable
<f00b4r0> via sysfs
<rsalvaterra> f00b4r0: The *switch* leds?
<f00b4r0> hmm, i'd have to check to be sure
<f00b4r0> good point
<rsalvaterra> I have seven controllable leds, but they're the GPIO-connected ones (ath9k-phy0, green:qss, green:system, green:usb1, green:usb2, green:wlan2g and green:wlan5g).
<f00b4r0> ah yes I think you're right
<f00b4r0> sorry
<rsalvaterra> f00b4r0: Just to make sure, do you have a tp-link subdir in /sys/class/leds?
<f00b4r0> lemme check
<f00b4r0> nope, same as you listed
<rsalvaterra> The switch leds should theoretically be in this elusive tp-link subdirectory.
<robimarko> Dont you have to register those LED-s via 01_leds and ucidef_set_led_switch?
<rsalvaterra> I didn't dig any deeper yet, I just expected this to be working out of the box. Principle of least surprise, and all that… :)
<Ansuel> are you sure you have the flag enabled?
<Ansuel> on swconfig they were configurable
<rsalvaterra> Hm. Which flag?
<Ansuel> swconfig-leds ?
<rsalvaterra> I don't know if I have that flag. Where can I see that?
goliath has quit [Quit: SIGSEGV]
<stintel> since my last flash on qoriq, uclient-fetch segfaults when called by ddns-scripts: https://gist.github.com/stintel/9b8c5ca40c5f4a44f5109f9386bf665a
<stintel> anyone else seen similar crashes? there's been a bunch of changes to uclient-fetch recently
<nbd> stintel: i'd suggest putting ulimit -c unlimited in the script calling uclient-fetch
<nbd> and grabbing a coredump
<nbd> i'll help you look into the crash cause if you get me a proper backtrace
<stintel> could be something ppc related, on one of my devices netifd appeared to have crashed also, unfortunately I was not at home and other logs overwrote any useful log info
<stintel> hmmm looks like ddns-scripts don't use procd
<rsalvaterra> stintel: What's your ddns provider?
<stintel> myself
<stintel> (a php script)
<nbd> stintel: you can edit the script from ddns-scripts and put the ulimit line just above the uclient-fetch call
<nbd> no need to put it in the init script
<rsalvaterra> stintel: I use freedns, but I wrote a trivial ad-hoc script in /etc/udhcpc.user.d. That way I only make a request when my address effectively changes.
<stintel> hah
<stintel> apparently it already writes core files
<stintel> of course I have no symbols
<stintel> how would I go about running that core file through gdbserver?
<stintel> ynezz: that's for running the command interactively, not for core files ?
<ynezz> it doesn't matter
<ynezz> it sets the sysroot to the right path so gdb can resolve the symbols
<stintel> but how do I tell gdbserver to pass the core file to remote gdb ?
<ynezz> ./scripts/remote-gdb core-file-here ./build_dir/target-*/busybox-*/busybox
<ynezz> Usage: ./scripts/remote-gdb <corefile|host:port> <executable>
<stintel> ah, I don't need gdbserver at all
<stintel> thanks
<stintel> unfortunately nothing useful
<ynezz> warning: .dynamic section for "libustream-ssl.so" is not at the expected address (wrong library or version mismatch?)
<nbd> stintel: the backtrace is absolutely useful
<nbd> it points to the right place
<nbd> uclient-fetch.c:606
<nbd> meaning ssl_ops->context_set_require_validation is NULL
<nbd> i'll take a look
<stintel> cool, thanks
<stintel> tried to rebuild to fix that warning but apparently my toolchain is fucked again
<stintel> /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /home/stijn/Development/OpenWrt/openwrt/staging_dir/tool
<nbd> now the nasty bit is that i don't see any way that context_set_require_validation can be NULL
<nbd> for me the two most likely candidates are:
<nbd> 1) ABI issue, something that should have been rebuilt didn't get rebuilt
<stintel> so if it's 1 it might be fixed after make dirclean
<nbd> 2) ldso issue, some relocation didn't get processed, so a function symbol in ustream-ssl was not resolved
<nbd> 3) some other toolchain issue
<nbd> yes
<stintel> I don't know what happened but I'm hitting that kind of toolchain issues almost every time I try to build OpenWrt
goliath has joined #openwrt-devel
<stintel> which also suggests some things are not rebuilt properly
<robimarko> Depends on how often you rebuild tools and toolchain
<robimarko> Cause, after tool changes often everything needs to be rebuilt
goetz has quit [Quit: goetz]
goetz has joined #openwrt-devel
<stintel> Error relocating /usr/bin/wget: uclient_new_ssl_context: symbol not found
<stintel> I have this on another device
<stintel> and now nmap doesn't build anymore
<robimarko> stintel: I would say your toolchain is broken
<stintel> robimarko: I just did make dirclean
<robimarko> Then its a PPC thing
<robimarko> Cause nmap builds fine for ARM64
<stintel> nbd: fyi the uclient-fetch segfault is fixed after make dirclean
<nbd> cool
rsalvaterra has quit []
<Ansuel> nbd watching that video... me when i start investigating a problem with something qcom related...
rsalvaterra has joined #openwrt-devel
madwoota has quit [Ping timeout: 480 seconds]
bfields has joined #openwrt-devel
madwoota has joined #openwrt-devel
cmonroe has quit [Ping timeout: 480 seconds]
cmonroe has joined #openwrt-devel
rz has quit [Remote host closed the connection]
rz has joined #openwrt-devel
goliath has quit [Quit: SIGSEGV]
<Ansuel> sad me i wanted to experiment with ucode stringbuilder but json lib decided sprintbuf is private :((((
<Ansuel> jow any idea?
<Ansuel> (current solution is to locally allocate char buffer and then ucv_string_new_length)
<Ansuel> I wanted to use ucv_stringbuf_printf but it's not possible
bbezak has quit [Remote host closed the connection]
bbezak has joined #openwrt-devel
<Ansuel> nbd ping?
rmilecki has quit [Quit: Konversation terminated!]
rmilecki has joined #openwrt-devel
rmilecki has quit []
rmilecki has joined #openwrt-devel
goliath has joined #openwrt-devel
Mangix has quit [Read error: Connection reset by peer]
Mangix has joined #openwrt-devel
zorun has quit [Ping timeout: 480 seconds]
<Mangix> robimarko: false
<Ansuel> !!! bold statement!
<Mangix> I'm referring to qca8k being fixed for big endian
<Ansuel> what is wrong with it?
<Ansuel> still slow?
<Mangix> I haven't tested recently, but I bet it still has the issue where all ports become unusable except for one
<Mangix> lan1 that is
<Mangix> or was it lan2
<Mangix> Ansuel: speed is faster with qca8k last I remember.
<Ansuel> yes the mgmt eth needs to be bisected but that is doable if that's the only problem
<Mangix> it's the only issue IIRC
<Mangix> Ansuel: did you write and merge a commit allowing netifd to disable GRO?
<Ansuel> yes
<Ansuel> if i'm not wrong
<Mangix> ok so GRO can be disabled without patching the driver. cool.
<Ansuel> just uci config
bfields has quit [Ping timeout: 480 seconds]
<Ansuel> jow nbd anyone that is familiar with hostpad and/or ucode?
<Ansuel> having a problem with hostapd.uc not writing entry to uci
<Ansuel> i guess it's acl problem ?
<Ansuel> I can workaround with ubus but i guess it would be stupid since there is the uci module in ucode
<robimarko> Ansuel: The statistics via eth packets?
<Ansuel> mh?
<robimarko> Regarding qca8k big endian being broken
<Ansuel> there are probably some problem with how the management packet is composed
<Ansuel> probably with the bigger one
cmonroe has quit [Quit: Textual IRC Client: www.textualapp.com]
PaulFertser has quit [Ping timeout: 480 seconds]
robimarko has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
PaulFertser has joined #openwrt-devel
cmonroe has joined #openwrt-devel
<Ansuel> well rip i'm stuck... think i will commit the WIP and hope for help :(
Tapper has joined #openwrt-devel
<jow> Ansuel: ?
<Ansuel> !!!!
<Ansuel> i'm having some problem with ucode and hostapd.uc
<Ansuel> cursor().set is giving me I/0 error
<Ansuel> let me give you a pastebin so you can get it quickly what i'm doing
<jow> hostapd runs as non-root, so you likely won't be able to interact with uci files
<jow> at least when assuming the default 0600 permissions
<Ansuel> ugh i hoped it was acl problem and not permission... any idea how to handle that?
<Ansuel> hostapd should call an ubus service that runs as root i guess???
<Ansuel> but what would be the correct way to do it
<jow> maybe you had this discussion already, but writing state data into /etc/config/ is a no-go imho
<jow> the natural place to store that would be something like /var/run/
<Ansuel> this data needs to be restored on reboot
<Ansuel> or wpad restart
<jow> why can't a user just add it to /etc/config/wireless then?
<Ansuel> hostapd generates a per-device psk when WPS push button succeeds. this pks needs to be saved in uci file
<jow> well programmatically writing uci is destructive
<jow> it will nuke user comments, it will reformat the file, it might commit intentionally uncommitted changes or apply an incomplete set of changes in the middle of a user session
<jow> it feels wrong. Such kind of state info should go to /var/run/ or -if it needs to persist- somewhere else in /etc
<jow> but it should be outside of /etc/config/wireless
<Ansuel> /etc/hostapd maybe?
<jow> yeah, something like that. Or named after the function, /etc/wps/...
<Ansuel> my idea was to also expose these per device psk in luci... would it be ideal to have the config in uci format
<Ansuel> ?
<jow> probably more hassle than what its worth
<Ansuel> or i think i will just provide an helper in ubus to dump them
<jow> just write hostapd's native format
<jow> then you can simply cat it into the generated config, along with the other entries generated from config wifi-station uci sections
<Ansuel> mhhh ok
<Ansuel> thanks for the hint
<jow> upside is also that you can simply do an rm -f /etc/wps.conf && wifi up
<jow> to clear out any kind of automatic wps associations
<jow> wrt. luci, you can maybe use luci-app-upnp as role model
<jow> it also works with the miniupnpd lease file directly
<jow> btw, sprintfbuf() is not private afair
<jow> I use it all the time
<Ansuel> i had compilation error
<jow> you might need to explicitly link -ljson-c
<Ansuel> oh that is probably missing maybe
gch981213 has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
<Ansuel> maybe that can be improved in ucode
<Ansuel> i guess the problem is in the fact that #define ucv_stringbuf_printf(buf, fmt, ...) sprintbuf(buf, fmt, __VA_ARGS__)
<jow> yeah, can probably change that to actual functions
<Ansuel> maybe adding a wrapper instead of a direct define might improve and skip having to -ljson-c
<jow> here's an example of some external module usingthe stringbuf: https://github.com/openwrt/luci/blob/master/contrib/package/ucode-mod-html/src/html.c (ctrl-f uc_stringbuf_t)
<Ansuel> yep i all got the logic it's similar to blobbuf string builder
<jow> and another remark, you can substitute popen(sprintf("logger AAAAAAA %s", ctx.error()), 'r');
<jow> with system(['logger', 'AAAAAAA', ctx.error()])
<jow> has the added benefit of avoiding shell injection
<jow> and bypassing /bin/sh entirely
<Ansuel> f.write(sprintf("wps=1 %s %s\n", mac_addr, key));
<Ansuel> easy enough... lets see how it works
<jow> if you don't need any fancy printf formats (such as conversion to number of padding) then template strings might be more concise:
<jow> f.write(`wps=1 ${mac_addr} ${key}\n`)
<owrt-images-builds> Build [#209](https://buildbot.openwrt.org/images/#/builders/4/builds/209) of `master_mvebu/cortexa53` completed successfully.
<Ansuel> ok i think with this last thing, the feature is ready nice
<Ansuel> at the end i decided for /etc/hostapd/hostapd-phy2-ap0.wps_psk (etc/hostapd network permission) and hostapd creates the file as soon as an entry is created
<Ansuel> seems easier to handle than having to parse the file everytime for each phy
<Ansuel> nbd converted to ucode as requested https://github.com/openwrt/openwrt/pull/15155 hope you can take a look when you have time
tidalf has quit [Quit: Textual IRC Client: www.textualapp.com]
Tapper has quit [Quit: Tapper]
goliath has quit [Quit: SIGSEGV]