<lipnitsk>
or we can just wait for a few breakages and till morning in the EU ;)
<aparcar[m]1>
lipnitsk: tell me how to break it and if the patch unbreks it I'll merge it :)
<lipnitsk>
build mt7621
<lipnitsk>
ramips
<lipnitsk>
package/kernel/linux will fail
<lipnitsk>
ensure your .config has CONFIG_PACKAGE_kmod-hsdma-mtk=m or y
<lipnitsk>
aparcar: but it might fail even without that, not 100% sure.
<aparcar[m]1>
will do
_whitelogger has joined #openwrt-devel
Tapper has joined #openwrt-devel
rmilecki has joined #openwrt-devel
Festivenari has joined #openwrt-devel
<Festivenari>
russell--: I have some very good news
<Festivenari>
I have the boot log; used another router
<Festivenari>
let me dump it onto pastebin
jlsalvador1 has joined #openwrt-devel
<Festivenari>
>Parallel flash device: name AM29DL800B, id 0x22cb, size 8192KB
<Festivenari>
interesting
jlsalvador has quit [Ping timeout: 245 seconds]
<Festivenari>
So basically for anyone wondering, I'm trying to port OpenWRT to router that has the BCM96368 SoC (my current problem is that the flash layout is seemingly different; when I came here yesterday, I needed the boot log). The bootlog for this router is here: https://pastebin.com/raw/YCr7FtAR
<Festivenari>
Also, let me dump the binwalk stuff for the original and OpenWRT firmware that the image builder has generated
<Festivenari>
I've read through the docs, but I'm confused on this
jlsalvador1 is now known as jlsalvador
valku has quit [Quit: valku]
zkrx has quit [Ping timeout: 260 seconds]
zkrx has joined #openwrt-devel
<plntyk>
Festivenari, if its broadcom - many patches/work on that target is done by rmilecki
<rmilecki>
Festivenari: i don't actually do BCM96368, it's a different family
<Festivenari>
rmilecki: well... hmm
<plntyk>
ah the many flavours
<rmilecki>
Festivenari: noltari may know more about it
Festivenari_ has joined #openwrt-devel
<rmilecki>
Festivenari: i may make sume guesses based on my recent BCM4908 experience
<Festivenari_>
and my internet dropped out for a sec...
<Festivenari_>
*connection
<rmilecki>
Festivenari: or not... sqfs on beginning of firmware file?
<rmilecki>
weird
<rmilecki>
Festivenari_: well, you have to start with extracting squashfs partition from original firmware, see what's there
<Festivenari_>
rmilecki: yeah, I have using the firmware-mod-kit
<rmilecki>
then you have to make sure you generate firmware with such a squashfs as well
Festivenari has quit [Ping timeout: 258 seconds]
nitroshift has joined #openwrt-devel
<Festivenari_>
rmilecki: hmm... I checked /proc/cpuinfo and the "cpu model" is a BCM6368
<rmilecki>
ok, so? :)
<Festivenari_>
rmilecki: well, my main issue is that the image that OpenWRT's image builder is generating seems to have the wrong order of partitions (something else? I added the device and dts file in)
<Festivenari_>
I can dump the dts file/device config info if needed
<rmilecki>
Festivenari_: well, debug it
<rmilecki>
Festivenari_: dump partitions of original firmware, see what's in there
<rmilecki>
then do the same for OpenWrt firmware
<rmilecki>
compare
<Festivenari_>
rmilecki: hmm...
<Festivenari_>
rmilecki: oh, yeah, does the CFE board ID matter? I just noticed they're different...
<Festivenari_>
I've mostly stuck to arduino stuff, so yeah, going from microcontrollers to this is interesting...
<rmilecki>
Festivenari_: i would expect CFE to refuse to flash image with unexpected board id
<Festivenari_>
rmilecki: how would I go about using dd to overwrite the squashfs partition in the stock firmware image with the other squashfs partition from the OpenWRT firmware though?
<rmilecki>
Festivenari_: don't know, I didn't try such things, not to mention, I don't work with bcm63xx
<Festivenari_>
ah, hmm
<rmilecki>
Festivenari_: remember you'll also need to recalculate checksum
<PaulFertser>
Festivenari_: don't forget that just overwriting squashfs is likely not going to work if you keep the vendor's kernel, it would be missing its modules and probably some other assumptions would be broken.
<PaulFertser>
Festivenari_: the safest way would be to get initramfs images booting.
<Festivenari_>
PaulFertser: ah, I see
<PaulFertser>
Festivenari_: if you haven't already tried using full initramfs, do it, CFE might just work for that.
<Festivenari_>
PaulFertser: yeah, kind of glad another router works for accessing the serial interface
<mangix>
lipnitsk: i don't have merge access
<lipnitsk>
np, aparcar said he'd do it. Or someone else will, eventually..
opal has quit [Ping timeout: 268 seconds]
<aparcar[m]1>
I'm on it
opal has joined #openwrt-devel
<Festivenari_>
PaulFertser: yeah, seems like with the router serial method, I'm unable to write to the serial console
<Festivenari_>
I can see what's happening, but no keyboard events go through
jlsalvador has quit [Remote host closed the connection]
jlsalvador has joined #openwrt-devel
noltari has quit [Quit: Bye ~ Happy Hacking!]
jlsalvador has quit [Remote host closed the connection]
jlsalvador has joined #openwrt-devel
Acinonyx_ is now known as Acinonyx
jlsalvador has quit [Remote host closed the connection]
noltari has joined #openwrt-devel
jlsalvador has joined #openwrt-devel
jlsalvador has quit [Remote host closed the connection]
<lipnitsk>
mangix: you mean a comment on the concept or help with any issues?
<mangix>
concept
<lipnitsk>
I have never used ninja, but if it's widely used and stable - why not? Also can't comment much on uclibc++, but again, I'm all for getting rid of unmaintained crappy code (if that's what it is)
<lipnitsk>
if the bloat is not bad with libstdc++
<lipnitsk>
are we like the tree-wide change cowboys?
<mangix>
pretty much
<lipnitsk>
I'm all for being pragmatic and reducing the load on the maintainers with better or more stable tools/libs... If there is little downside and some consensus then it should be done
<rmilecki>
Festivenari_: buy USB serial adapter for 5 USD ;)
<rmilecki>
probably less
<Festivenari_>
rmilecki: yeah, I'm waiting on them from China, sadly
<mangix>
lipnitsk: For the Ninja commit, the only downside is CMake bugs which I'm just finding out about :).
<Festivenari_>
I guess having a serial adaptor is basically required unless you want to be stuck with paperweights...
<rmilecki>
Festivenari_: definitely
<lipnitsk>
mangix: fun. I'm sure you are able to do the necessary due diligence
<lipnitsk>
if the concept is sound and widely used I support it... Anyways, off to bed now.
<mangix>
lipnitsk: for the uClibc++ commit, it needs to be removed. Buggy and barely any development upstream. I have pending patches that are not being reviewed.
<mangix>
The downside is size of libstdc++. static linking can help with that
<lipnitsk>
yeah that sucks..
<plntyk>
with gcc11 there will be a default version bump of c++ too - so "old code" / coding style might see some impacts too
<plntyk>
default mode for C++ is now -std=gnu++17 instead of -std=gnu++14
<mangix>
good
<plntyk>
same std bump as in C some revisions ago - that created some work in packages tree too iirc
<mangix>
now everything can be constexpr
<mangix>
plntyk: no way it'll be as bad
<plntyk>
not that many c++ projects ? ^^
<mangix>
it's not that. C89 - C99 was a major change
<mangix>
C++14 to 17 is very minor
<mangix>
but if they've gotten rid of auto_ptr in GCC11 then it'll be a different story.
<mangix>
that's gone with C++17 AFAIK
<rsalvaterra>
Heh… I never liked C++, the syntax is just abominable.
<plntyk>
wikipedia seems to agree with you - new features are nice - but theoretically since earlier c++ should be turing-complete anyway - so there is no "urgency" to add/change ^^
<mangix>
rsalvaterra: OTOH it has nice things that C does not.
<mangix>
I wish we had constexpr for C
* rsalvaterra
looks it up…
<rsalvaterra>
mangix: Seems to fit the "nice to have" bin, sure.
<Festivenari_>
With C, my only annoyance is having no vectors/maps included, but otherwise, it's a very nice language
<Festivenari>
Really sucks that 99% of routers I find on sites like eBay are all broadcom-based
<rsalvaterra>
Festivenari: Smart people don't get rid of the good ones… :)
luke-jr has joined #openwrt-devel
<Festivenari>
rsalvaterra: well, it might be easier with some of those routers to just run programs off the USB sticks (these routers have USB ports), but it's a bit annoying that telnetd refuses to run (I bet dropbear would run)
<Festivenari>
or... if there is telnetd, it's some weird one with restricted commands
<rsalvaterra>
Yeah, Broadcom has a "special" console.
<Festivenari>
rsalvaterra: well, it seems like there's a command injection vulnerability with just about any program that you "run" using it; ping 1.1.1.1|ls /
<Festivenari>
Surprisingly, they don't let you use certain characters (; and &)
<rsalvaterra>
But most Broadcom hardware I've seen is ISP OEM stuff (Technicolor, ex-Thomson). I have an old Thomson router here, but it's basically sitting in a box.
<Festivenari>
rsalvaterra: oh, well, that's what I'm dealing with...
<rsalvaterra>
Festivenari: Really? Which model?
<Festivenari>
rsalvaterra: uh, well, that depends. If you're talking about technicolor, I actually have a DJA0231
<Festivenari>
it runs a locked-down build of OpenWRT
<Festivenari>
even opkg works
<mangix>
rsalvaterra: no
<rsalvaterra>
Festivenari: That's a big box! Telstra?
<mangix>
in order to have constexpr in C, you must use defines
<Festivenari>
rsalvaterra: yep, and I don't use that ISP, luckily
<mangix>
doing const int a = 5; is not a constant expression
<rsalvaterra>
mangix: Thanks, makes sense.
<mangix>
"#define a 5" is a constant expression
<mangix>
with C++ instead of doing macro magic, you can just use a simple function, declare it as constexpr, and achieve the same result.
<rsalvaterra>
Festivenari: I have a TG787 (or TG784, don't remember exactly, it's the polycarbonate white one with grey top).
<Festivenari>
rsalvaterra: you could try doing some command injection with the ping diagnostic option
<Festivenari>
however, in my case, I downgraded the router to an older firmware version and used a cwmp exploit
ivanich has joined #openwrt-devel
<rsalvaterra>
Festivenari: Heh… I already did something similar on the Altice FiberGateway (GR241AG). It's running Linux (and BusyBox, and a lot of other open source apps), and those f****rs haven't even released the source code.
Tapper has quit [Ping timeout: 245 seconds]
black_ant has joined #openwrt-devel
black_ant has quit [Changing host]
black_ant has joined #openwrt-devel
<aparcar[m]1>
lipnitsk: it seems to compile fine without...
<rsalvaterra>
blocktrron: ping
<aparcar[m]1>
magnusk: it's the rebase step which is required to get rid of the github merge commit
<aparcar[m]1>
magnusk: sorry wrong name
<aparcar[m]1>
mangix: see above
<Festivenari>
rsalvaterra: most companies seem to never bother, but I find it weird that a company like netgear bothers too (sometimes...)
<aparcar[m]1>
I guess we can also tell the for loop to stick the first entry
<mangix>
aparcar[m]1: there is no merge commit
danitool has joined #openwrt-devel
<aparcar[m]1>
GitHub CI applies one
<aparcar[m]1>
the CI merges it on the top of master
<rsalvaterra>
Oh, and they didn't merge this for 5.4?
<mangix>
no
<rsalvaterra>
Weird… oh, well, I'll take care of it.
<mangix>
much appreciated
<rsalvaterra>
Speaking of which, I never used USB/IP, but I find the concept fascinating. :)
<mangix>
sounds like insanity to me, but I just hit this in my all package build
<olmari>
I've not used USB/IP on the openwrt, but on KVM/Libvirt VM's I have (whatever implementation it has)
<rsalvaterra>
The most complicated thing of adding patches is naming them… :P
<olmari>
works suprisingly well even through most laggy internet conn
<olmari>
when I have obscure device which needs windows or something alike, usb/ip is perfect solution 🙂 attach device on my computer laptop on car, use it in VM windows running on local hackerspace =)
<olmari>
rsalvaterra: naming... it is hard even at stage of hostname ;D
<mangix>
this has got to be the strangest build error I have ever seen
<mangix>
warning: This function cannot be safely ported, use getline(3) instead, as it is supported by GNU and POSIX.1-2008.
<karlp>
what function?
<mangix>
I have no idea
<rsalvaterra>
mangix: Since this is from linux-next, I'll tag it as v5.13, is this alright?
<rsalvaterra>
mangix: Oh, I haven't checked the date, only the repository.
<mangix>
oh wow kernel 5.9
Festivenari_ has joined #openwrt-devel
<rsalvaterra>
5.9? It's actually not that old…
Festivenari has quit [Ping timeout: 260 seconds]
<aparcar[m]1>
lipnitsk: okay fix works ty
<mangix>
aparcar[m]1: I would merge before users start complaining
<aparcar[m]1>
k
swex has joined #openwrt-devel
decke has joined #openwrt-devel
<rsalvaterra>
I just noticed I'm running without AT803X on my ath79 devices, with Linux 5.10 (after seeing blocktrron's commit), without any issues… is this normal? What kind of problems should I expect?
feriman has joined #openwrt-devel
<rsalvaterra>
mangix: Build-testing.
<plntyk>
rsalvaterra, many ath79 have switches and not the single "phy" attached
<plntyk>
rgmii --- switch vs. rgmii --- pure phy i think
<rsalvaterra>
plntyk: So… if it caused problems on my devices, I'd notice, as the switch wouldn't work, is this correct?
<blocktrron>
rsalvaterra: depends on the device you are using and whether o not the bootloader resets the PHY /applies necessary delays
<rsalvaterra>
blocktrron: I haven't seen any reference to at803x in WDR3600 and Archer C6 device trees… What should I look for?
<blocktrron>
They use switch ICs for which it does not matter (at least without DSA)
<rsalvaterra>
Ah, got it.
<blocktrron>
The cable tester functionality of the AR803x series is pretty neat
<blocktrron>
played around with it yesterday, locates faults with +- 5 meter accuracy
<rsalvaterra>
blocktrron: I actually didn't know about that until about an hour ago, reading the datasheet. :)
<blocktrron>
Should in theory also work on the WAN port of AR9331+, didn't work with AR724x though
<blocktrron>
given the fact how expensive some halfway decent cable testers are: yes
<rsalvaterra>
And maybe with DSA there's hope of getting AR8{2,3}37N hardware NAT working…?
<rsalvaterra>
These switches have lots of neat features.
<blocktrron>
Not sure what the state is in that regard
<blocktrron>
Layer3 offloading was working on MT7621 with swconfig, lost that with DSA. Not sure if it's not implemented in the DSA subsys or the MT7531 driver
<rsalvaterra>
blocktrron: But it still has hardware flow offloading, right? Not that it matters for people who use SQM, but still…
<russell-->
Festivenari_: did you say that you couldn't type at the serial console?
<Festivenari_>
russell--: yep, I was using another router, but I do have the boot log now
<russell-->
sometimes the manufacturer doesn't populate a shunt resistor, so the RX pin isn't connected. do you have photos of the board?
<Festivenari_>
russell--: uh, give me 10mins, but sure
<Festivenari_>
I think I was able to write to the serial console, but hmm... it seemingly stopped working (tried screen and minicom)
<russell-->
what i'm interested in is what tools CFE gives you, and you need to be able to type at it to get a CFE prompt
<plntyk>
you could try to replug the usb side if its a usb-ttl serial adapter
<plntyk>
sometimes garbage during restart of soc might scramble the adapter somehow - at least thats what i experienced with the cheapest china ebay stuff
<russell-->
the other thing to be aware of is parallel flash is hard to deal with the SPI flash, if you screw up, you are in a nightmare land of JTAG with unknown configurations, tftp booting an initramfs image without touching the flash is the way to make progress.
<russell-->
harder*
<russell-->
than* SPI flash
<Festivenari_>
>Parallel flash device: name AM29DL800B, id 0x22cb, size 8192KB
<Festivenari_>
I don't really care if wifi and the 3G modem are unusable since I plan to cluster all 13 of them for some fun, I suppose
<Festivenari_>
but I will go ahead and see if I can interact with the CFE via serial
<russell-->
yes, do
<russell-->
if you have a continuity tester, you can poke around to see where the tx and rx pins might be connected to nearby pads
jlsalvador has quit [Quit: jlsalvador]
<russell-->
the board's tx pin is clearly connected or you wouldn't have a boot log
Neighbor11111112 has joined #openwrt-devel
<russell-->
"*** Press any key to stop auto run (1 seconds) ***" means you should start mashing the keyboard as soon as you see the CFE spitting text
<Festivenari_>
russell--: I have to wonder if I have damaged my 2nd router since I was playing around with the serial stuff a few hours ago with other routers
<Festivenari_>
after I had done that, I was unable to send any data over serial (only receive data)
<Festivenari_>
I guess I will try another router
<Neighbor11111112>
Hi all, does OpenWRT reduce the number of exported symbols? I'm trying to load a kernel module that uses register_sysctl_table and it fails with Unknown symbol err 0. The kmod is GPL and that function definitely is exported.
<Neighbor11111112>
I checked Module.symvers in my OpenWRT Linux directory and it is tiny, only 225 lines. Does OpenWRT try to reduce the number of exported symbols?
<Neighbor11111112>
PS the symbol appears to be available in kallsyms, when I grep for it I get "801b65f4 T register_sysctl_table"
<olmari>
Neighbor11111112: I know buildroot has option to remove unneccesary kernel symbols, I don't know what is default for buildbots
dedeckeh has joined #openwrt-devel
<russell-->
Festivenari_: have you checked the voltage of your serial cable? and/or measured the vcc on the serial header?
<Festivenari_>
russell--: yep
<russell-->
presumably 3.3v
<Neighbor11111112>
Interesting olmari. I guess you don't know what the config is called in OpenWRT? I'll try searching .config to see if anything appears
<olmari>
nah.. I know I see it in make menuconfig
<Neighbor11111112>
Ahh this looks suspicious (CONFIG_STRIP_KERNEL_EXPORTS=y), I'll look into it
<Neighbor11111112>
Thanks olmari !
<russell-->
another possibility is CONFIG_KERNEL_KALLSYMS
Borromini has joined #openwrt-devel
<russell-->
Festivenari_: looks like you might need to use a soldering iron and solder wick to get the radios out of the socket, but if you find yourself in need of some atheros miniPCI radios, let me know. I have boxes of them.
<Festivenari_>
russell--: yeah, I already have plenty
<russell-->
and, if it's not rude to suggest, there might be better ways of using your time than these things
<Festivenari_>
russell--: yeah, I find it fun, that's all
<russell-->
good enough reason
<russell-->
it is also fun to put them i a pile and light them on fire ;-)
<Festivenari_>
russell--: alright, got into the CFE
<russell-->
nice!
<Festivenari_>
>Available commands: sm, dm, w, e, r, p, c, f, i, b, reset, flashimage, help
<russell-->
run help on each one
<Festivenari_>
russell--: yeah, just ran "help"
<Festivenari_>
gave me info on them
<russell-->
u-boot would have something like printenv
<plntyk>
Festivenari_, sometimes more commands might be available - vendors manipulate sometimes the strings / options shown
<Festivenari_>
plntyk: I mean, it's possible, considering it's netcomm
jlsalvador has joined #openwrt-devel
<plntyk>
those fond memories of dumping flash via mm over serial :)
<russell-->
+1
<Festivenari_>
>web info: Waiting for connection on socket 0.
<Festivenari_>
I wonder if there's a HTTP server running now
<Festivenari_>
oh, and there is
<Festivenari_>
nice
<Festivenari_>
> New software is being programmed to the flash memory. The DSL Router will reboot upon completion. This process will take about 2 minutes.
<Festivenari_>
ooh
<Festivenari_>
and let's see if this turns it into a paper weight (wait, not really because I have the original firmware)
<russell-->
that looks like it'll give you a recovery method
<Festivenari_>
russell--: woah
<Festivenari_>
it's booting... wait, nope
<Festivenari_>
>Kernel Panic
<Festivenari_>
>[ 0.000000] Kernel panic - not syncing: unable to detect bcm963xx board
<russell-->
what did you flash?
<Festivenari_>
russell--: uh, the image I made using the OpenWRT image builder (I added in the device def)
<Festivenari_>
what are the chances it isn't a bcm963xx SoC?
<Festivenari_>
but hmm... it booted it up
<Festivenari_>
oh... removed the heat sink and I see a BCM6369
<Festivenari_>
well, the BCM6368 was misleading
junland has quit [Quit: %ZNC Disconnected%]
junland has joined #openwrt-devel
<Festivenari_>
russell--: probably a good thing recovery works
<lipnitsk>
okay, I'll wait if that's what it takes. No pressure.
<blocktrron>
every time there's a ramips kernel bump I'm happy i have no stakes in it
black_ant has quit [Ping timeout: 260 seconds]
Borromini has joined #openwrt-devel
Borromini has quit [Client Quit]
<lipnitsk>
blocktrron: does it get ugly?
<lipnitsk>
adrianschmutzler: addressed your comment. manually for now, but also sent a patch to the ML hoping to automate the CONFIG_PLUGIN_HOSTCC being set inadvertently.
<lipnitsk>
I actually want to move some patches from ramips to generic (mtd, mtk eth driver, at least), but will wait until initial 5.10 support is merged.
<Grommish>
Well. WLS2 crapped the bed, so I had to start over .. meh.. and, because I"m a glutton for punishment, I'm going back with WSL2 ;p
<Grommish>
Maybe this time it won't break
<grift>
not sure if "glutton for punishment is accurate" , misguided seems more appropriate
<lipnitsk>
Grommish: I want to like wsl2 but seems like it has issues here and there all the time. Linux natively is the way to go
<Grommish>
I have a real Ubuntu 20.04 bare metal install, but I like the freedome of WSL2.. It refused to start and wouldn't tell me why.. I had to Unregister that install and start over
<Grommish>
I did manage to get a extract first, but. meh
<grift>
wsl2 is the anti-thesis of freedom: LicenseSubsystem: Proprietary commercial software;
adrianschmutzler has quit [Quit: ~ Trillian - www.trillian.im ~]
<dangole>
lipnitsk: grabbed your PR and testing on RBM11G now, looks like it's all great. i've folded it into two patches though, one refreshing the 5.4 patches, and one adding 5.10 support, so we don't add files just to delete them with the next commit...
<dangole>
lipnitsk: i do appreciate that as format for the PR though, it made your changes very transparent. however, i don't think we need to carry all that in the tree for ever
<lipnitsk>
dangole: you mean you squashed the copy and the remove commits?
<lipnitsk>
you call on proper squashing - I don't care as long as it's readable
<dangole>
lipnitsk: exactly.
<lipnitsk>
note that I pushed something an hour ago RE: adrianschmutzler comment
philipp64 has quit [Quit: philipp64]
<blocktrron>
lipnitsk: ramips patches are either non-descriptive and unclear in what their purpose is or upstreamable but nobody cared to even send them off
<dangole>
just fetched again from your tree and `git diff FETCH_HEAD` returns empty, so i got all the latest fixes, i guess
<lipnitsk>
blocktrron: yes, I want to upstream some and look harder at others... At some point... Hard to ensure platform compatibility with so many devices out there though. I only have an mt7621 er-x
<lipnitsk>
dangole: yeah it looks good to me
<blocktrron>
that's the cherry on top
philipp64 has joined #openwrt-devel
<lipnitsk>
looks like we are better off now than years ago. That 50+ patch series from blogic
<lipnitsk>
I see evidence of its remains ;)
<lipnitsk>
and a whole bunch of drivers that were never upstreamed..
<lipnitsk>
are other platforms better?
<blocktrron>
Well, everything I've said is my opinion
philipp64 has quit [Client Quit]
<Grommish>
grift: Yeah, but then again, so it Fedora :) I just use WSL for building when I'm not at my other machine for other things
Grommish_ has joined #openwrt-devel
feriman has quit [Ping timeout: 260 seconds]
Grommish has quit [Ping timeout: 264 seconds]
shibboleth has quit [Quit: shibboleth]
rmilecki has quit [Ping timeout: 276 seconds]
<lipnitsk>
now if we can just merge in-tree WireGuard into 21.02 that would just be super great! :)