**** BEGIN LOGGING AT Thu May 06 02:59:56 2021 May 06 06:08:06 can someone post /etc/openwrt_release and /etc/openwrt_version from 19.07 and 20.02 May 06 06:09:04 feels like the firmware fields should be part of the system "device" fields so its editable May 06 06:09:39 nopthing defines the devic e either i guess May 06 06:12:58 so i wonder whats even popumating this information May 06 06:13:03 OutBackDingo: Check /var/sysuinfo May 06 06:14:03 OutBackDingo: It's defined in /lib/preinit/01_sysinfo I believe May 06 06:14:18 cat /var/sysinfo/board_name May 06 06:14:18 teltonika,rut955 May 06 06:14:18 root@00-1E-42-2A-83-5D:~# cat /var/sysinfo/model May 06 06:14:18 Teltonika RUT955 May 06 06:14:23 as part of the target define May 06 06:15:37 and that'll be in the ./target/linux/xxxx/base-files May 06 06:18:04 Grommish: yikes... im trying to figure out, how firmware updates can be done from a management system if it has X different devices, and X different versions of firmware per device May 06 06:18:46 so logic is hey device what are yopu, and what firmware version are you running May 06 06:18:57 OutBackDingo: Well.. Each target will have it' own file and compat for sysupgrade to key against May 06 06:19:18 check the /lib/upgrade/platform.sh May 06 06:20:28 so basically device answers with im a "DEVICE" with "Version" May 06 06:20:58 Yes, which will key against the compatiblity of the target baked into the image May 06 06:22:28 no easy solution LOL May 06 06:22:45 Well, it is May 06 06:22:52 your target name is in the image file May 06 06:23:16 openwrt-octeon-itus_shield-router-squashfs-sysupgrade.tar for example May 06 06:23:21 right but how does the system know which image to give the device... this is the problem May 06 06:23:31 Gotcha May 06 06:24:05 Well.. You should use ssh and script automation to read that board_name May 06 06:24:06 its alsmost like we have to maintain a "device" database itself for devices/fimrwares May 06 06:24:25 hehe All.. Welcome to the wonder world of OpSec? May 06 06:25:14 or write code to get boardname/model/version and release May 06 06:25:28 and store that when the device rgisters to the system May 06 06:26:01 be easier for it to say, im runing on firmware image "name" LOL May 06 06:26:30 If you use SSH certs, you can just do: ssh
cat /var/sysinfo/model May 06 06:26:40 from the management system May 06 06:26:50 and use that to decide which sysupgrade to scp May 06 06:26:59 then execute it via ssh remote from /tmp May 06 06:27:16 Throw an exception if it can't match the model/board_info May 06 06:29:17 If you are building from source, you can always just edit your targets to read whatever you want May 06 06:29:51 or plant an additional identifer in that 01_sysinfo May 06 06:29:53 or platform.sh May 06 06:30:27 platform.sh is where those board_info and model are populated May 06 06:31:04 yeah i guess we have to build a promper hi, im board arch, target, name, version May 06 06:31:22 Then you can just rebase your local source repo to bounce those change to the top rather than pulling May 06 06:31:48 so you're kept up to date with the upstream. I do this to re-add the 2 additional boot slots on my device locally, for example May 06 06:32:29 yes that all make sense if your only using a single device type May 06 06:32:46 ./scripts/env is your friend :) May 06 06:32:55 You can setup multiple target environment with their own .config May 06 06:33:03 and just switch between then May 06 06:33:58 or we can say any device in target A and target B, then derive the the device soecific May 06 06:35:46 basically Target System and Target Profile May 06 06:36:31 Hi, is the the correct place to ask about how one can get started on compiling OpenWRT for an unsupported modem? Basically, I want to add support to a modem I have. I've already successfully built coreutils statically using the OpenWRT mips32 compiler (which I used sha256sum from coreutils to make sure I correctly dumped the stock firmware via May 06 06:36:31 netcat). So, if having the stock firmware helps with figuring out how to add support, I already have it dumped. May 06 06:36:32 I've got ./script/env defines for my Shield, th ER10x, the rpi4 and an x86_64 target May 06 06:38:08 AlexisEvelyn: Ideally, You'd find a supported device that uses the SoC for you're device, see what needs to be changed and define the new target May 06 06:38:36 AlexisEvelyn: What device? May 06 06:39:36 It's a Sagem 4320. It has a 2 core Broadcom4350 V8.0 cpu and a BCM6306KMLG adls line driver chip. May 06 06:40:40 AlexisEvelyn: I'm not familar with it, but that doesn't mean anything :) You may want to post in Hardware Questions or the Dev section on the forum (https://forum.openwrt.org/c/hardware-questions-and-recommendations/13 and https://forum.openwrt.org/c/devel/8) May 06 06:40:53 Thanks! May 06 06:41:01 I know Broadcom people consistently complain about lack of drivers because.. broadcom May 06 06:41:10 but I dunno if that'd judt Wifi or everything May 06 06:41:48 I was unable to figure out any alternate names for the modem, so I was stuck on finding any related firmware that would work (e.g. if the same modem was supported under a different name), May 06 06:42:19 https://forum.openwrt.org/t/zte-zxhn-h368n-creating-openwrt-image/50335 May 06 06:42:56 That uses that SoC and there is al ink from tmomas in that thread on how to start poking at it May 06 06:43:35 Might be a good starting point May 06 06:59:32 mangix: ping May 06 07:00:15 mangix: I got asked this and I don't know how to answer, gimme a hint? "I made a patch, sent it to the mailing list. It got reviewed and I was asked to make some changes. After sending V2 I realised I didn't cc the original reviewer, so I am not sure they see it. The email was only addressed to the mailing list. Resend (and dupe) or send as a v3?" May 06 07:10:28 So, it looks like I need to learn by looking at previous commits. https://openwrt.org/docs/guide-developer/adding_new_device. It appears that I might have bootloader tftp as when I telnet into the device (without issuing the sh command to gain full shell), I can see a tftp command. This is when the modem is fully booted up, so I don't know for sure May 06 07:10:28 if this is the bootloader tftp command or just a regular one (I've never used ftp on a bootloader before). May 06 07:10:53 Oh, nevermind, it is bootloader. This is an example argument. `-g -t i -f filename server_ip Get (flash) broadcom or whole image to modem` May 06 07:12:20 tftp is it's own protocol similar to ftp, but different (trivial file transport proto). May 06 07:12:51 AlexisEvelyn: You can use tftpd64 if you're Windows based. Easy to setup May 06 07:13:25 Most NAS boxes have it built in as well, if you've got one on the network May 06 07:13:53 I'm on a Mac. I did not realize it was a different protocol, but I can probably find a version of a tftp server for Mac (or if that fails, then I'll use Virtualbox for Windows or Debian). May 06 07:14:20 *nod* I'm sure Mac has a tftp, but I have no knowledge of the Mac ecosphere May 06 07:16:16 Turns out tftp is built in on Mac, it just needs to be turned on.:)  - https://www.wirelessphreak.com/2016/07/using-built-in-tftp-server-on-os-x-el.html May 06 07:16:35 Makes it easy :) May 06 07:18:04 blocktrr1: i can't see mistake in that 5.4 backport, upstream code looks like: May 06 07:18:06 if (!ofpart_node && !master->parent) May 06 07:18:08 master->parent is NULL only for master MTD device May 06 07:18:09 * May 06 07:18:11 blocktrr1: now, 5.4 backport looks like: May 06 07:18:12 if (!ofpart_node && !mtd_is_partition(master)) May 06 07:18:14 i thought that mtd_is_partition is false also only for master MTD device May 06 07:21:09 so if there is a problem it should be in both: upstream and our 5.4 backport May 06 07:34:58 AlexisEvelyn: well, not quite. The MacOS firewall doesn't like TFTP. May 06 07:37:58 Huh. I'm not sure why it wouldn't. I have the "automatically allow built in software to receive incoming connections" box ticked on and the router is able to tell me if a file exists on the tftp server (I created a blank file called test.txt and it can tell when the file exists when I retrieve it). May 06 07:38:56 I'm currently just trying to work out how to have the router boot from a firmware image and not flash it. The tftp client hints that the only options involve flashing the firmware image. May 06 07:40:59 I know the router is not able to write the test.txt file, it throws `tftp: write error`, but that's probably due to it being a blank file and not a config file like it was expecting. May 06 07:47:44 turn off the firewall and try again. May 06 07:48:12 but reading is a better test. May 06 07:53:36 Once I can figure out what tftp considers a config file, I'll be able to confirm if it completely works or not. Currently the command `tftp -p -t f -f /etc/gateway.conf 192.168.254.1` results in `tftp: server error: (2) Access violation` and the next line being `tftp: Could not back up config file.`. May 06 07:53:55 This is being ran as the root user. May 06 07:54:55 I'm actually thinking of trying to see if I can boot directly from usb without overwriting the existing firmware, so that way once I can build an image, I can test it without bricking the device. May 06 07:55:53 This is because the tftp command seems to hint at only being able to flash config/images and not just booting from a temp directory. May 06 08:05:42 blocktrr1: there's a bug indeed I think May 06 08:05:45 blocktrr1: i'm working on it May 06 08:15:46 Oh, wow, I'm in the news again…! XD https://www.phoronix.com/scan.php?page=news_item&px=Linux-5.13-UBIFS-Zstd May 06 08:19:09 Nice May 06 08:22:46 Good news is, I can access files from my USB drive on the router. Bad news is, I have no idea how to get the router to reboot using an image. Sure, I can probably modify cmdline, but then I run the risk of bricking the router (and while I've used serial before using my RPI's GPIO pins, but I'm not entirely sure that I can unbrick from that). May 06 08:25:06 Like, I know it's possible to temporarily reboot from a file as I've done it before on an old Android phone while experimenting with Linux. I just don't know what commands the app used to accomplish the temporary boot switch. May 06 08:37:03 blocktrr1: i've a fix ready May 06 08:46:52 blocktrr1: i've to describe my changes & send the fix, i'll do that today May 06 08:50:11 I can confirm that my flash drive lights up before networking is done and then it stops, then lights up after networking is done. So I believe the router is checking the usb for something (potentially a boot image). May 06 09:11:28 pkgadd: can you incorporate the review comments in #4060? May 06 09:56:11 philipp64: hey. Were you able to login to wiki? May 06 12:16:35 Build [#39](https://buildbot.openwrt.org/openwrt-21.02/images/#builders/19/builds/39) of `layerscape/armv7` failed. May 06 12:43:31 rmilecki: nice, thank you May 06 12:43:54 Sorry for the fuzz last evening, at some point i didn't understand what was going on. May 06 12:44:00 Ping me if you've got something to test. May 06 13:06:11 blocktrr1: i'm refreshing patches for every 5.4 target now, it's going to take a amoment May 06 14:03:45 blocktrr1: can you test commit i just pushed? May 06 14:04:01 https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=ed4641e9f1ad940cb60187dea09cf17c865efcaf ("kernel: fix parsing fixed subpartitions") May 06 15:08:46 jow: could you check my DSA LuCI post: https://forum.openwrt.org/t/request-for-testing-luci-on-dsa-devices/92126/29?u=rmilecki May 06 15:14:31 rmilecki: not sure how to answer that May 06 15:14:36 oops ;)_ May 06 15:14:49 I am open to alternative suggestions May 06 15:15:09 the underlying uci config is such an extreme clusterfuck that I pretty much gave up trying to visualize it May 06 15:15:17 any advise on how to disable services during first start? should I just add a uci-defaults file containing a list of `service foobar {stop,disable}`? May 06 15:15:36 jow: oh :/ May 06 15:15:53 i thought that you got sth nice with nbd after all May 06 15:16:29 there's two way to define bridges May 06 15:16:40 then the weird bqackwards indirect way to attach wireless interfaces to bridges May 06 15:16:46 jow: is that a problem with netifd and UCI? or just DSA complexity? May 06 15:16:58 bridge vlan filters implying bridge membership May 06 15:17:04 semantically overlapping with list/option ifname May 06 15:17:19 I'd say a problem with netifd/uci May 06 15:18:02 that config is organically growns over the course of 15 years or so with no clear concept on the desired semantics, no clear teminology, no proper definition of involved entities, their relation ships, constraints etc. May 06 15:18:42 there's config interface settings implying devide settings, there's config interface declarations implying device declarations May 06 15:19:37 jow: i was thinking about improving LuCI, now I'm wondering if we should refactory netifd/uci instead May 06 15:19:42 lot's of implicit state, alternating defaults, ... May 06 15:20:27 double of even triple overloaded options with different semantics and acceptable values depending on context and chosen protocol May 06 15:20:56 proto handlers spawning virtual sub interfaces or not depending on options May 06 15:21:03 jow: ok, so I guess reworking netfid is they way to go May 06 15:21:20 jow: any tips where to start? what should we do first to clean up that mess? May 06 15:21:30 no, redesigning the network config first, then change whatever needs changing May 06 15:21:46 compe up with a clear and consistent way to express desired configuration May 06 15:22:26 draw a clear destinction between layer 2 (bridges, vlans, tunnels) and layer 3 config May 06 15:22:43 hard to redesign config options that are not even properly documented anywhere :| May 06 15:22:49 a proper way to deal with dual stacked configuration May 06 15:23:03 no @wan vs. wan6 vs. wan_6 May 06 15:23:25 a sane way to related wireless netdevs to layer2 objects such as bridges May 06 15:23:29 *relate May 06 15:24:11 and not some "just use wireless.wifi-iface.network" crap which does different things depending on how the destination network is defined May 06 15:25:07 (is it a bridge? then bridge it. is it a vlan? maybe a vlan on top of a bridge, then bridge it too? is it a netdev? then just inherit ip settings. is it a netdev already in use by something else? then overwrite random ip settings or simply do nothing, depending on the phase of the moon) May 06 15:25:42 jow: ok, you concinced me about the mess we have there May 06 15:25:57 *convinced May 06 15:29:02 I recently learned that we now also support vlan aliases May 06 15:30:24 and that settings in "config interface lan; option type bridge" will conflict with ones in "config device; option type bridge; option name br-lan" May 06 15:30:42 one would assume they get merged internally, but nope, undefined behaviour May 06 15:31:26 so you now need to add ui logic to forbit the creation of a device called "br-foo" if a "config interface foo; option type bridge" exists May 06 15:31:37 stuff like that May 06 15:39:04 jow, you helped me earlier with firewall rules that look like, https://pastebin.com/gk7e7fF5 May 06 15:39:48 Rule is being added but it seems like it gets added to the INPUT chain which means I cannot alter the routing, I'd like that rule to hit the PREROUTING chain instead. Can I do that from uci configs? May 06 15:40:59 barhom: add `option dest '*'` May 06 15:42:32 specific src & dest or src & dest '*' -> FORWARD, src '*' & specific dest -> POSTROUTING, dest '*' & specific src -> PREROUTING, any src and unset dest option -> INPUT, all other cases OUTPUT May 06 15:42:43 That worked! Thanks May 06 15:43:14 Makes sense, thanks May 06 16:03:53 rmilecki: will do when im finished with work May 06 16:08:20 blocktrr1: thx May 06 16:29:40 jow: thanks for explanations May 06 16:30:16 jow: i'm wondering thoug if we shouldn't require all "dynamic" devices like tap, tunnels, etc. to be explicitly defined May 06 18:12:42 https://pastebin.com/iq1RK1Xi May 06 18:13:29 I was running the following: May 06 18:13:30 git clone https://github.com/openwrt/openwrt May 06 18:13:30 cd openwrt May 06 18:13:30 sudo git pull May 06 18:13:30 ./scripts/feeds update -a May 06 18:13:30 ./scripts/feeds install -a May 06 18:13:55 with the first command "git clone https://github.com/openwrt/openwrt" like two years ago May 06 18:14:40 why there are more and more warnings like: WARNING: Makefile 'package/feeds/packages/collectd/Makefile' has a dependency on 'libcurl', which does not exist May 06 18:20:29 should I push this: https://patchwork.ozlabs.org/project/openwrt/patch/20210502223940.165798-1-hauke@hauke-m.de/ ? I haven't see the errors, I just searched for package Makefiles which have a @TARGET_ dependency May 06 18:41:00 AlexisEvelyn: copy /System/Library/LaunchDaemons/tftp.plist to your home directory, enable it, and then load/launch that. May 06 18:41:28 PaulFertser: yes, I got in and changed my password. Thanks May 06 18:42:36 nbd: please have a look at https://github.com/openwrt/openwrt/pull/4150 ... it's trivial. May 06 18:45:47 Here's something interesting. For compiling libelf-0.8.13, the Makefile has `--target=x86_64-apple-darwin20.4.0 --host=x86_64-apple-darwin20.4.0 --build=x86_64-apple-darwin20.4.0` with `--enable-elf64` and the error is `configure: error: neither int nor long is 32-bit`. May 06 18:49:32 I believe that is related with Apple removing support for 32 bit. Not entirely sure why it's trying to build for OSX, when I'm trying to build firmware for testing ram only booting. I'm trying to see what happens when I build a generic (smp bcm63xx) firmware (generic as in not for a specific device, not the 1 core option). Looks like I'll be using May 06 18:49:33 Debian in Virtualbox. May 06 18:52:20 I discovered by looking through example logs that on the Wiki that one can load tftp in ram only (using the version of tftp on the router), but it has to be a custom ramdisk build. As I have to restart to enable Virtualbox, I'll see you on the other side. **** BEGIN LOGGING AT Thu May 06 23:07:25 2021 **** BEGIN LOGGING AT Thu May 06 23:39:43 2021 May 07 00:30:37 ynezz: done (re PR#4060) May 07 02:16:33 I have a question, none of you wouldn't happen to know how to bypass the broadcom image check when trying to boot from ram only? I'm currently getting the error `tftp:error:658.597:cmsImg_validateImage:1032:The format isn't broadcom image` when trying to load `vmlinux-initramfs` with `tftp -g -t i -f vmlinux-initramfs 192.168.254.1`. May 07 02:17:25 I'm currently looking at https://openwrt.org/docs/guide-developer/adding_new_device#testing_images in an attempt to test a generic openwrt build on my router without flashing the image. May 07 02:25:33 AlexisEvelyn: no expert but You might find necessary information in target/linux/{bmips,bcm63xx}/image directory how to create INITRAMFS image. Good Luck. May 07 02:26:17 *directories May 07 02:43:50 Reading `target/linux/brcm63xx/image/README.images-bcm63xx` I see `The imagetags for tftp/ftp flashing is based on Broadcom 3.00-3.04 imagetags and is known to be correct as the source code GPL and is available for reading.`. So, if I'm understanding this correctly, at least one of the images should be able to be loaded via tftp. I just have to May 07 02:43:51 figure out which one. Especially since there are a lot of different files with initramfs in the name. May 07 02:48:24 Apparently the only image that exists for Sagem and is initramfs does not work, so I'll have to see what I can find out about the image format tftp is looking for. May 07 02:56:46 I did manage to find out that my board's chip id is 63268. This info came from tftp as I'm testing to see what it's response will be from running the image flashing tool (I presume this particular tftp will ask to confirm flash before it actually commits to it). May 07 02:58:19 I had to use the squashfs image to get the chip id message. The initramfs image does not produce that error message. **** ENDING LOGGING AT Fri May 07 02:59:56 2021