GPL Source Code



  • Building v2 now, will have it ready to push once done, and will post to the LEDE toolchain thread as well. šŸ™‚

    I'd love feedback once this is done as to what I could change about the docker image. Alternatively, folks can help @WereCatf out (not that he needs it) in making patches to his master branch, which is what I'm building off of. I had hoped that Onion,Inc. would build something like buildroot.org did to facilitate baking images to flash on your board once you got them. I think it'd aid greatly in this transparency discussion wrt GPL v2 and various other OSS licenses.

    <3,
    TJ



  • @administrators
    @Kit-Bishop
    @fossette

    For those of you that can not run the command

    ' git show 5cd49bb067cadfeba6eb7f09982f76558101ad5d '

    This will show the Onion Corporation :

    By virtue of it's submission to OpenWrt has read and understands the terms of the GPL and those of OpenWrt.

    Knowingly and willfully committed code and thus acknowledges the GPL as a valid license.

    commit 5cd49bb067cadfeba6eb7f09982f76558101ad5d
    Author: John Crispin john@openwrt.org
    Date: Fri Jul 24 09:09:49 2015 +0000

    ar71xx: add support for Onion Omega
    
    This patch adds support for the Onion Omega.
    
    https://onion.io/omega
    
    Signed-off-by: L. D. Pinney <ldpinney@gmail.com>
    Acked-by: Boken Lin <bl@onion.io>
    Tested-by: Jacky Huang <huangfangcheng@163.com>
    
    SVN-Revision: 46458
    

    ###CUT##
    Actual patch removed

    committed code from :
    target/linux/ar71xx/files/arch/mips/ath79/mach-onion-omega.c

    Onion Omega board support

    Copyright (C) 2015 Boken Lin bl@onion.io

    This program is free software; you can redistribute it and/or modify it
    under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

    ###CUT###

    Please push the code...as required.

    Thanks for your contribution to Open Source Software...



  • @Lazar-Demin is trying to merge profiles for Omega2(+) to LEDE, but it seems they have not been listening to anything we've said here on the forums or taken a look at what we've done. Their DTS still contains the same issue with the reset-button that I mentioned several times already and that I've fixed in my DTS, for example.



  • @WereCatf
    Yes ... I see we have a new branch.

    It's very short of the complete source used.

    However it is a start.



  • Here is my Device Tree Source :

    "WE" should be able to fix a few things now šŸ™‚

    /dts-v1/;

    #include "mt7628an.dtsi"

    #include <dt-bindings/gpio/gpio.h>
    #include <dt-bindings/input/input.h>

    / {
    compatible = "onion,omega", "mediatek,mt7628an-soc";
    model = "Onion Omega2";
    chosen {

    	bootargs = "console=ttyS0,115200";
    };
    
    gpio-leds {
    	compatible = "gpio-leds";
    
    	system {
    		label = "omega2:amber:system";
    		gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
    	};
    };
    
    gpio-keys-polled {
    	compatible = "gpio-keys-polled";
    	#address-cells = <1>;
    	#size-cells = <0>;
    	poll-interval = <20>;
    
    	reset {
    		label = "reset";
    		gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
    		linux,code = <KEY_RESTART>;
    	};
    };
    

    };

    &spi0 {
    status = "okay";

    pinctrl-names = "default";
    pinctrl-0 = <&spi_pins>, <&spi_cs1_pins>;
    
    m25p80@0 {
    	#address-cells = <1>;
    	#size-cells = <1>;
    	compatible = "jedec,spi-nor";
    	reg = <0>;
    	linux,modalias = "m25p80";
    	spi-max-frequency = <40000000>;
    	m25p,chunked-io = <31>;
    
    	partition@0 {
    		label = "u-boot";
    		reg = <0x0 0x30000>;
    		read-only;
    	};
    
    	partition@30000 {
    		label = "u-boot-env";
    		reg = <0x30000 0x10000>;
    	};
    
    	factory: partition@40000 {
    		label = "factory";
    		reg = <0x40000 0x10000>;
    		read-only;
    	};
    
    	partition@50000 {
    		label = "firmware";
    		reg = <0x50000 0x1fb0000>;
    	};
    };
    
    spidev@1 {
    	#address-cells = <1>;
    	#size-cells = <1>;
    	compatible = "linux,spidev";
    	reg = <1>;
    	spi-max-frequency = <40000000>;
    };
    

    };

    &ethernet {
    mtd-mac-address = <&factory 0x28>;
    };

    &gpio0 {
    status = "okay";
    };

    &gpio1 {
    status = "okay";
    };

    &gpio2 {
    status = "okay";
    };

    &i2c {
    status = "okay";
    };

    &pwm {
    status = "okay";
    };

    &sdhci {
    status = "okay";
    mediatek,cd-high;
    };

    &uart1 {
    status = "okay";
    };

    &uart2 {
    status = "okay";
    };

    &wmac {
    status = "okay";
    ralink,mtd-eeprom = <&factory 0x4>;
    };

    &pinctrl {
    state_default: pinctrl0 {

    	gpio {
    		ralink,group = "gpio", "i2c", "jtag", "perst", "pwm1", "refclk", "spis", "wdt", "wled_an", "wled_kn";
    		ralink,function = "gpio";
    	};
    };
    

    };



  • Not sure why this website mangles code ...

    But if anybody wants it...I can send it another way



  • @Larry-Pinney said in GPL Source Code:

    @WereCatf
    Yes ... I see we have a new branch.

    It's very short of the complete source used.

    However it is a start.

    Yes, it's a start! Thanks @Lazar-Demin / greenbreakfast!

    I hoped seeing the original Omega2 .dts would reveal why I can't get GPIO18/19 to work as GPIO in my LEDE build, while these work with standard Omega2 FW. However, no luck, the now posted .dts seems functionally identical to those figured out by @WereCatf and @Larry-Pinney (and my own).

    From the voltage levels I see on these pins they are probably in Ethernet PHY mode, rather than GPIO, but I don't see why, and how to change that. omega2-ctrl does not seem to have an option for those pins.

    Anyway, @onion please don't stop here! On my wishlist I see .config and the sources for omega2-ctrl in top positions šŸ˜‰



  • @Larry-Pinney said in GPL Source Code:

    Not sure why this website mangles code ...

    This my help you:
    https://community.onion.io/topic/707/markdown-how-to-start-with-it



  • I prettified my DTS-files up some and merged the reboot-fix by @Larry-Pinney , and now I am working on making a reasonably useable default-configuration that I can share soon.



  • Why all the fuss? I just managed to build the omega2 firmware from https://github.com/lede-project/source.git

    Checkout the onion-omega2 branch
    run:
    scripts/feeds update -a
    scripts/feeds install -a
    make menuconfig

    select CPU MIPS, Soc MT7688, Board Omega2 (or 2+ if you like)
    run:
    make V=99

    enjoy



  • @Ghent-The-Slicer said in GPL Source Code:

    Why all the fuss? I just managed to build the omega2 firmware from https://github.com/lede-project/source.git

    Checkout the onion-omega2 branch

    There is no such branch there. You may be referring to https://github.com/OnionIoT/source.git instead. Also, that branch appeared there less than two days ago, but this thread is quite a few days older than that already, so that's part of the "fuss." But sure, using your compiled image, try reboot... it won't work. Try the reset-button... it won't work.



  • Hm. The reboot-fix seems to have exposed another bug: the Omega2 now reboots fine, but doesn't shut down anymore! I don't know which one is better: to be able to reboot, or to be able to shutdown šŸ˜•



  • With a device such as the Omega2...

    Is the halt/shutdown command "really" useful?

    Nice ..tend to agree...
    But reboot seems to be used in practice much more often.



  • @Larry-Pinney That's kind of what I'm leaning towards. If you were to build some sort of a remote-sensor or whatever out of the Omega2, you'd probably want to be able to push an updated firmware, in case you have a bug somewhere, and be able to reboot to the new firmware without having to go and pull the plug to get it to reboot. But eh, I don't know.



  • Well...I think it's related to the bootloader....it always boots when powered on.

    Nearest x86 equivalent could be "defined" in the BIOS....
    Sorry we have NO BIOS today.



  • @WereCatf
    I flashed the compiled image via USB drive:
    copy the image to the usb drive and rename it to omega2.bin
    reboot the omega2, holding the button, select 2 from the terminal, wait forever

    It seems to boot fine except it is missing a large number of stuff - the web server for example. So you boot into serial console and that's about it.

    Looks like some sort of build configuration issue to add the missing stuff.

    Re: 'shutdown'. The omega2 with original firmware was not able to shutdown - it just reboots. Same with the compiled FW from the LEDE code. I have Linkit Smart 7688 - which has the same issue - no 'halt' - only reboot.


  • administrators

    Perhaps you guys would like to help fix up the Pull Request to meet the standards of the Lede project?
    As you might have guessed, the Onion team is very overwhelmed at the moment. We're doing our best to make sure everything runs smoothly but with 16 thousand backers, its proven to be quite difficult!



  • @Lazar-Demin

    At the moment the github by @WereCatf seems to be the "most correct" available....could use a bit more tweaking.

    The LEDE project plans to have it's first release very soon... 17.01 branch is due on Monday the 16th
    Having your device in a stable release would be an enormous benefit to the users.



  • @Lazar-Demin Geez! I just visited:
    https://lede-project.org/docs/howto/adding_to_toh
    and their link to "Criteria for adding devices to the ToH" is broken. You won't have it easy, will you?



  • @fossette It's not that hard, actually. My version already fulfills almost everything, I'd just have to consolidate all of my changes into a single commit and put a proper commit-message on it.


Log in to reply
 

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