00:12
shoragan has quit [Read error: Network is unreachable]
00:17
shoragan has joined #openwrt-devel
00:24
shoragan has quit [Quit: quit]
00:25
shoragan has joined #openwrt-devel
01:07
goliath has quit [Quit: SIGSEGV]
01:21
gch981213 has joined #openwrt-devel
02:00
tSYS has quit [Quit: *squeak*]
02:00
tSYS has joined #openwrt-devel
02:46
Obi-Wan has quit [Remote host closed the connection]
02:49
Obi-Wan has joined #openwrt-devel
02:52
skynet2 has quit [Ping timeout: 480 seconds]
05:15
vincejv has quit [Remote host closed the connection]
05:19
rua has quit [Quit: Leaving.]
05:45
vincejv has joined #openwrt-devel
06:36
rua has joined #openwrt-devel
06:40
guidosarducci has quit [Remote host closed the connection]
06:42
rua has quit [Quit: Leaving.]
06:43
rua has joined #openwrt-devel
06:56
mrnuke has joined #openwrt-devel
07:41
rua has quit [Quit: Leaving.]
07:41
rua has joined #openwrt-devel
07:44
rua has joined #openwrt-devel
07:46
rua has quit [Remote host closed the connection]
07:49
rua has joined #openwrt-devel
10:36
rua has quit [Quit: Leaving.]
11:22
aparcar has joined #openwrt-devel
11:23
<
aparcar >
Mangix: ping
11:23
<
aparcar >
Mangix: ideas on when meson doesn't find mbedtls on a debian machine even if mbedtls-dev is installed?
13:55
rua has joined #openwrt-devel
16:05
dermoth has quit [Remote host closed the connection]
16:05
dermoth has joined #openwrt-devel
17:29
robimarko has joined #openwrt-devel
17:43
<
svanheule >
mrnuke: ping
17:45
<
mrnuke >
svanheule: pong
17:46
<
svanheule >
mrnuke: I was looking into a new safeloader image format for the EAP683, and then I remember you were working on the EAP610-Outdoor
17:47
<
mrnuke >
svanheule: is it a binary TOC instead of text strings?
17:47
<
svanheule >
mrnuke: you're aware that your factory image generation script is rather similar to the tplink-safeloader tool from firmware-utils?
17:48
<
svanheule >
yeah, same binary TOC (assuming that's table of contents)
17:48
<
mrnuke >
svanheule: yeah. I looked into tplink-safeloader C program, and immediately thought it was a bad idea
17:48
<
mrnuke >
I think it's the Makefile that should know the "Support list" string. It shouldn't be hardcoded on a board-by-board basis in A C program
17:48
<
svanheule >
integrating the new format won't be straightforward, no
17:49
<
svanheule >
the whole board table in that utility shouldn't be there :P
17:49
<
svanheule >
certainly now that the tool isn't in openwrt.git anymore, adding boards is quite tedious...
17:50
<
mrnuke >
That utility is one of my motivations for using python to pack images
17:52
<
svanheule >
the thing I'm a bit worried about is the explosion of safeloader formats. they're all subtly different, but could share quite a bit of logic
17:52
<
svanheule >
image checksum, soft-version structure, support-list "structure"
17:53
<
svanheule >
maybe it's just time for tplink-safeloader to be rewritten :P
17:55
<
mrnuke >
I would propose we use tplink-2022 as written, and then see if there is a way to share code with the "older" format
17:55
<
mrnuke >
There would be minimal code I could share with the safeloader from firmware-utils. THe MD5 salt would be one.
17:55
minimal has joined #openwrt-devel
17:56
<
mrnuke >
Most of the old code deals with the text-based TOC. There's very little python code to deal with the File I/O
17:57
<
mrnuke >
I suppose we could add a packer/unpacker for the safeloader-old TOC in the python code, end reuse most of tplink-2022 wihtout modification
17:58
<
mrnuke >
If I gave you a hexdump of the TOC, it might be obvious. hold on
17:58
<
svanheule >
it appeared more consistent if the ToC started with '>3I' (rootfs size, entry count, ???), followed by the entries (name, offset, size, more info?)
17:59
<
svanheule >
I've been staring at the 683's hexdump for half a day :P
18:00
<
svanheule >
then the non-FF bytes matches exactly with [>3I] + 40 * [>32s3I]
18:00
<
mrnuke >
"3I" doesn't make sense. You'd get the offset + size of entry[n-1], and then the "type" of entry[n]
18:00
<
svanheule >
and the name/base/size order is the same in the text-type ToC
18:01
<
svanheule >
or just a third piece of info about the ToC
18:04
<
svanheule >
ah, I see, the "type" in your ToC is 0
18:06
<
mrnuke >
Now, it is possible that rootfs is (offset, size, type), and entries are (name, offset, size, type)
18:06
<
mrnuke >
Since "type" didn't seem to be strictly needed, I didn't investigate that much
18:07
<
svanheule >
sure, a zero before or after doesn't make much of a difference :)
18:08
<
mrnuke >
That's the same format! YAY!
18:08
<
svanheule >
entry:type for the EAP683 is 0x1, so that's what made me decide on the triple int ToC header
18:09
<
svanheule >
they seem to be using it on (all?) NAND devices
18:09
<
mrnuke >
I see an extra "00 00 00 01" after the last entry. I am willing to concede that the "type" comes after the name string, and not before it
18:10
<
svanheule >
type or whatever that 0x1 might mean
18:10
<
svanheule >
maybe "flash extra carefully"
18:10
<
mrnuke >
#define TPLINK_CONFUSE_SVANHEULE_AND_MRNUKE BIT(0)
18:10
<
mrnuke >
could be a bitfield
18:12
<
svanheule >
then I decided to look for other supported TP-Link devices that use ubi volume
18:12
<
svanheule >
turns out there's a JSON variant of safeloader images as well
18:12
<
mrnuke >
Extra points if you find an XML!
18:13
<
svanheule >
and the mercusys mr90x uses yet another variant!
18:13
<
svanheule >
XML is so 2005
18:14
<
mrnuke >
Obviously some poor internt at tplink said "text-based TOC is not good enough. And another one said "binary is not good, let's make JSON"
18:14
<
mrnuke >
Surely someone must have thought of other formats!
18:14
<
svanheule >
I wonder how many forks they have of their own tool
18:14
<
svanheule >
must be a nightmare to maintain (haha, as if they're maintaining it)
18:15
<
mrnuke >
Look at Archer be550. The images appear to be encrypted!
18:16
<
mrnuke >
I'm certain we'll see more exciting image format challenges from TPLink
18:16
<
svanheule >
That thing is shaped like an X :O
18:16
<
svanheule >
lost opportunities to have doen that with 802.11ax
18:17
<
svanheule >
45MB firmware image... yikes
18:17
<
mrnuke >
and root-locked (the bastards)
18:18
<
mrnuke >
I bet you can put one of the old archers next to it, bend the antennas inwards, and spell "AX"
18:19
<
mrnuke >
I think the type might mean [0] = flash me; [1] = metadata
18:20
<
mrnuke >
Look at the eap TOC. there's a "rootfs" type 0, "APPSBL", type 0, and all the rest are type 1
18:20
<
svanheule >
would be odd to include BLE FW images and then not have the upgrade install them
18:21
<
svanheule >
fun fact: the BLE firmware isn't a binary blob, but an Intel HEX file
18:22
<
mrnuke >
what the HEX ?
18:22
<
svanheule >
probably the flashing tool takes that as input and they were too lazy to modify it...
18:22
<
svanheule >
bulk of the file is UBI image anyway
18:23
<
mrnuke >
Have you used the mkimage-2022 script to extract the contents?
18:23
<
mrnuke >
It can do that ;)
18:23
<
svanheule >
I only found yours after I modified tplink-safeloader to parse the format
18:24
<
mrnuke >
You went through a lot more pain than I did.
18:24
<
svanheule >
modified in a hacky way, so not publishable
18:24
<
svanheule >
well, I was like "this is a safeloader file! I know this!"
18:24
<
svanheule >
*one day later*
18:30
<
mrnuke >
2021! That predates my tplink-2022 script
18:30
<
mrnuke >
I find python pretty nifty for these sort of file manipulations
18:31
<
mrnuke >
ANd the way it forces you to serialize and deserialize data is genius. No more pointer casts and byte order errors!
18:31
<
mrnuke >
C is one of the worst languages in my opinion for this sort of work
18:38
<
mrnuke >
svanheule: BTW, I have a ews2910p v3 incoming. IIRC, that should have the I2C version of the BCM controller
18:39
<
svanheule >
I2C version for the MCU interface or a direct I2C connectoin to the BCM PSE chips?
18:39
<
mrnuke >
I2C connection between the CPU and MCU, yes
18:39
<
svanheule >
ok, I have one or two of those device too
18:40
<
mrnuke >
Good to know. When I need a tester for realtek-poe changes, I know where to look :p
18:41
<
svanheule >
just kidding, would be nice to be able to use OpenWrt and PoE on that thing
18:41
<
svanheule >
now, that will probably mean I'll have to look into the VLAN issues for realtek...
18:42
<
mrnuke >
realtek-poe changes come for free
18:43
<
mrnuke >
although, I'd love a newer kernel on these unrealtek devices
18:46
<
svanheule >
I think 6.1 was mostly there (thanks to Borromini and bmork), but the chip was eating all frames with the default VLAN config :(
18:46
<
svanheule >
gonna wrap up here for today. Later!
19:00
kirdesde has quit [Ping timeout: 480 seconds]
19:19
<
Mangix >
aparcar: context?
19:19
<
Mangix >
mbedtls needs find_library on each individual library. dependency() doesn't work. upstream refuses to fix it.
19:31
Borromini has joined #openwrt-devel
19:58
Borromini has quit [Quit: Lost terminal]
19:58
kirdesde has joined #openwrt-devel
20:03
dermoth has quit [Remote host closed the connection]
20:17
<
aparcar >
Mangix: yea eventually figured it out 🙂
20:22
dermoth has joined #openwrt-devel
20:27
<
KanjiMonster >
Mangix: the switch to gnu11 happened in 5.18, this is 5.15
21:56
<
Mangix >
KanjiMonster: hmm? this is not backported?
21:57
<
Mangix >
yeah, target/linux/generic/backport-5.15/005-v5.17-02-Kbuild-move-to-std-gnu11.patch