We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

OpenWRT on the Omega 2(+)



  • @luz It's board.d/02_network that sets the correct MAC-address. If you look through the file you'll find a mention to linkit in two different sections, with one section accessing the mtd-device and setting MAC-addresses -- add your profile there and POOF, you've got valid MAC-address.

    I made an mt7688-based profile "omega2p" (this is what they call it in the official images, too) and grepped through the files to find any references to "linkit" (grep -i -R "linkit") in base-files and modified the relevant sections for "omega2p," also. There were a few minor differences in the DTS-file that I didn't notice at first, so I modified those, too. If you'd like, I can share the changes I made as a patch-file.

    EDIT: Thought to mention, that with my custom profile the Omega2+ works just peachy, including the microSD-slot, WiFi as both a client and an ap and all that. You mentioned in your earlier post that WiFi-sta didn't work for you, but you must have just made some configuration-mistake as I didn't have to do anything special to get it going -- just a working config.



  • Eh, I actually went ahead and forked LEDE. I'll make a pull-request after I've tested my changes a bit more, but in the meanwhile grab it from https://github.com/WereCatf/source , if you wish.



  • @WereCatf Terrific! Thanks for the fork and PR, I'll check it out immediately!

    BTW: the non-plus omega2 is called "omega2" in those board switch statement, in case you want to add this as well.



  • @luz said in OpenWRT on the Omega 2(+):

    BTW: the non-plus omega2 is called "omega2" in those board switch statement, in case you want to add this as well.

    Yeah, I was thinking of it, but I feel a bit iffy about it, since I can't test it. I mean, it should work fine, I just change the Flash-size to 16MB instead of 32MB, but I still would like to test it first before making any pull-requests. So, I dunno.



  • Out of simple boredom I've been toying around with optimizing LEDE and after a lot of fiddling and benchmarking I've come to the conclusion that using -Os (the default) is better than than -O2, simply because of the really small instruction-cache -- benchmarking e.g. openssl yields better results with -Os than with -O2. There is no noticeable speed-difference between -mips32r2 and -march=24kec, so may as well just use the default of -mips32r2 (besides, if you use anything other than -march=mips32r2 or -mips32r2 some packages fail to optimize their code correctly. A workaround would be to define -D_MIPS_ARCH_MIPS32R2 and -D_MIPS_ARCH="MIPS32R2" manually). Adding -mdsp, however, yields a real nice ~17% improvement for DES and ~21% improvement for 3DES with openssl, and a couple of percent with some of the other ciphers. It didn't reduce performance with any cipher at all, from what I can tell. This is to say, if one is compiling custom packages, -mdsp is most likely well worth adding, at least for math-heavy packages.



  • @WereCatf I installed openssl-utils. Calling it I get two errors:
    COMP_zlib_cleanup: symbol not found
    BIO-f-zlib: symbol not found
    I have no idea what's wrong. Can you help?



  • @Claus-Kühnel The Onion-devs have compiled their openssl-libraries with different settings than the LEDE-devs. You could try to install the openssl-library from LEDE's repos, but you risk breaking other stuff, then, so I recommend against that. Another option would be to e.g. download the libopenssl-package and extract it to another location, then calling openssl-utils with LD_LIBRARY_PATH set to point to the extraced libopenssl.



  • @WereCatf I'm currently stuck regarding gpiomux (swiching pins between GPIO and special function). On regular omega2 there's the omega2-ctrl tool to query/switch pin groups. However, the source of that tool is not on github, so I cant build it. I pinged @Lazar-Demin about that but so far got no response.

    I tried installing the prebuilt opkg. It is installable, but when called complains "unable to open mmap fileroot".

    Any idea how to approach this until Onion manages to publish their LEDE branch?

    BTW: Just a small but important detail for your omega2.dts: The Omega2 (non-plus) has only 64MB RAM, so the memory definition needs to be as follows, otherwise the Omega2 will crash during boot:

    memory@0 {
      device_type = "memory";
      reg = <0x0 0x4000000>;
    };


  • @luz said in OpenWRT on the Omega 2(+):

    I tried installing the prebuilt opkg. It is installable, but when called complains "unable to open mmap fileroot".

    Did you enable KERNEL_DEVMEM (menuconfig Global Build Settings -> /dev/mem virtual device support)?

    BTW: Just a small but important detail for your omega2.dts: The Omega2 (non-plus) has only 64MB RAM, so the memory definition needs to be as follows, otherwise the Omega2 will crash during boot:

    memory@0 {
    device_type = "memory";
    reg = <0x0 0x4000000>;
    };

    Yeah, I'll just merge the Omega2-branch to master and fix that.



  • Is the memory define really needed?
    I think you should remove the memory portion...and try it.
    You may find it's not required...LOL
    You may also wish to drop "mx25l25635e"
    compatible = "jedec,spi-nor"; should be enough.
    Since it's defined in jedec why do you need "mx25l25635e" and "mx25l12835e"

    So why do we need two dts files?

    BTW .dts usually are in UPPER CASE....whereas dtsi files are normally lower case.

    check some multi size devices such as WRTNODE or NIXCORE.
    You will find they have a common dtsi that references the SoC dtsi and then a dts for each device.



  • @Larry-Pinney said in OpenWRT on the Omega 2(+):

    Is the memory define really needed?
    I think you should remove the memory portion...and try it.

    No. I don't care enough to bother trying something like that.

    So why do we need two dts files?

    BTW .dts usually are in UPPER CASE....whereas dtsi files are normally lower case.

    check some multi size devices such as WRTNODE or NIXCORE.
    You will find they have a common dtsi that references the SoC dtsi and then a dts for each device.

    You'd then have three files, instead of two. I don't see the improvement. Also, if you'd take a look, you'll find plenty of dts-files in lower-case there, including for ramips-targets -- I'm not changing the case.



  • You may do as you wish....and go against convention.
    However...you will find that you do not need to define the memory line. (if you try)
    Then you wouldn't need two dts files or even a dtsi file ...thus reducing the code to a single file.
    and further there is no need to specify flash chips already defined by jedec.

    There are no all lower case dts files in /target/linux/ramips/dts ... only your omega2 🙂



  • @WereCatf

    SULU: You try to cross brains with Spock, he'll cut you to pieces every time.



  • @WereCatf said in OpenWRT on the Omega 2(+):

    Did you enable KERNEL_DEVMEM (menuconfig Global Build Settings -> /dev/mem virtual device support)?

    No, I was looking for something like that but didn't find it. Apparently, KERNEL_DEVMEM has been added to LEDE only a few days ago on December 24th, 2016, and I hadn't pulled changes since.

    Thanks a lot for the hint! Worked :-)!! Now I can switch gpiomux when installing the binary package from the onion feed.

    Probably I don't need dynamic reconfiguration for my application, so I can set the default pinctrl in the .dts and will not actually need the omega2-ctrl tool.

    Still, I hope Omega2 support will soon be pushed to LEDE (or a LEDE fork on github soon!), and all referenced packages such as omega-ctrl will appear in github too...



  • @luz said in OpenWRT on the Omega 2(+):

    Thanks a lot for the hint! Worked :-)!! Now I can switch gpiomux when installing the binary package from the onion feed.

    I haven't played much with my Omega2p lately and I never actually tried if gpiomux or fast-gpio works in my images, so it's good that you got around to testing it and reporting back here. Maybe the information will come in useful for someone else, too.

    Still, I hope Omega2 support will soon be pushed to LEDE (or a LEDE fork on github soon!), and all referenced packages such as omega-ctrl will appear in github too...

    Here's hoping. I just don't quite understand why the devs keep the stuff private in the first place, it's not like it'd hurt them or their community. shrug



  • @Larry-Pinney I think you are arguing with the wrong guy 😉 @WereCatf is just helping us mere mortals (meaning, LEDE/OpenWrt novices) with some quite useful practical hints.

    It's @onion who you should listen to you - you seem to have some experience as a LEDE mainline contributor, and that's what onion will hopefully become too, soon...

    It's a pity they don't leverage the knowledge from people like you by opening their LEDE branch for inspection, test and improvements. This would improve the quality of a later PR to LEDE.

    Out of cusiosity: why don't we need that memory def? The kernel needs to find the memory size somehow, how would it work without that def? (this is a real question, as a beginner, I really don't know - memory testing maybe? where? at the uboot level?)



  • @WereCatf said in OpenWRT on the Omega 2(+):

    Here's hoping. I just don't quite understand why the devs keep the stuff private in the first place, it's not like it'd hurt them or their community. shrug

    I don't understand it either.

    I mean, most probably they are currently too busy with other things to take the time to clean up and prepare a PR to LEDE at this time. But just pushing their WIP fork of LEDE to a github repo would be instant and actually help us and them, as some of the cleanup work would be done by the community.

    After all, it's nothing they can avoid - this is all GPLv2 stuff so the sources to build the shipping images must be made available (only fully onion-specific programs could possibly remain closed - yes, that would include omega2-ctrl, but not the basic setup, dts, profile, uboot etc.)



  • @luz Quite agree with all this.

    It is a repeat of the situation with the Omega1 - despite frequent multiple requests for a copy of their repository for OpenWrt to enable us to deal with issues with that (probably most notably the recurrent kernel version mismatch issues for many packages) there never was any response - and probably now never will be 😞

    While my Omega2 still hasn't arrived, I am getting quite concerned about the number and type of issues that are getting reported in these forums. I will reserve final judgement until I do get my Omega2 and try things out myself, but am getting close to giving up on the Omega - reluctant to do that, I have invested quite a lot of effort over the last year with the Omega1 and it would be a shame to see the work go to waste - but eventually one has to cut one's losses 🙂

    I am seriously considering switching to using a Raspberry Pi Zero (with Red Bear IoT pHAT for Wifi an BLE access) - physically bigger than the Omega but way more powerful.



  • @Kit-Bishop said in OpenWRT on the Omega 2(+):

    I am seriously considering switching to using a Raspberry Pi Zero (with Red Bear IoT pHAT for Wifi an BLE access) - physically bigger than the Omega but way more powerful.

    If you don't need a CSI-camera, might I suggest taking a look at C.H.I.P., too? It's already got WiFi and Bluetooth on-board and a free, full-size USB-port for any possible additions you might want. Personally, I find the built-in lipo-charger an exceedingly handy feature, too.



  • @WereCatf Thanks - C.H.I.P. looks interesting. The more one digs, the more viable alternatives to the Omega one finds - and at good prices with a good range of functionality 🙂



Looks like your connection to Community was lost, please wait while we try to reconnect.