Giter Site home page Giter Site logo

onioniot / omega2-bootloader Goto Github PK

View Code? Open in Web Editor NEW
20.0 7.0 14.0 207.33 MB

Bootloader for the Omega2

License: GNU General Public License v2.0

Shell 0.93% Makefile 1.72% C 94.13% C++ 0.15% Assembly 2.91% Pawn 0.16%
bootloader omega2 uboot

omega2-bootloader's Introduction

U-Boot for Onion Omega2

SETUP BUILD ENVIRONMENT

sh setup_env.sh

Part of the setup is unpacking the MTK built tool. These tools require 32bit gcc libs.

MORE INFO

MEMORY MAPS AND BOARD CONFIGURATION

SoC spaicifc configuration are located in /include/configs/rt2880.h. Web recovery tool can be configured with:

#define CONFIG_SERVERIP 192.168.8.1
#define CONFIG_IPADDR   192.168.8.8
#define CONFIG_ETHADDR "00:AA:BB:CC:DD:10"

Max uboot upload size can be configured with:

#define WEBFAILSAFE_UPLOAD_UBOOT_SIZE_IN_BYTES		( 1024 * 1024 )

NOTE THAT YOU NEED A WIRE

(Only applies to early Omega2 sample firmware) You need a wire connecting 3.3V pin and 2.5V pin to make the following code getting the WPS button state work

val=RALINK_REG(0xb0000624);

NOTE ON UBOOT PARTITION SIZE

In case you Omega2 already has a loader installed that supports only upto 128K in web update please switch off some functionality in config.mk that takes up lots of space, for example RALINK_EHCI and/or RALINK_OHCI (except the web update functionality obviously) in order to keep the size withing the limits, compile the limited functionality executable and burn that.

As this version supports up to 192k (don't push the limits) then you will be able to burn the whole complete thing as it is, usually >170k in size. Credits to Zheng Han for coming up with this procedure.

FILENAMES OF IMAGES

The usual name by convention for firmware images is

root_uImage

Support for files produced by the de facto official buildroot environment exist that will allow you to burn files without renaming them, provided they are named

lede-ramips-mt7688-Omega2-squashfs-sysupgrade.bin

The latter depends on USB support working perfectly always and that might prove an overconfident assumption. For more on that, see below

CAVEATS ABOUT USING USB STORAGE DEVICES

USB support in the current version is a bit temperamental, so USB sticks are supported at what the USB spec calls "High Speed" ("maximum transfer rate of 480 Mbit/s"), which is on the slower side of today's expectations, so be patient. Furthermore, after testing different sticks from different bottom shelf Chinese manufactures, it was revealed that not all (even Chinese brand name) work as expected. The general rule of thumb would be, keep it simple, the more complicated the USB storage device is, that is, more additional functionality your "U-Disk" has, the higher the chances something might go wrong. With this particular HUB controller timing issues such as communication timeouts, could be observed in the current version of the code that may cropping up in certain situations.

MISCELLANEOUS WEIRDNESS

Sometimes burning stalls and the process hangs. Oddly enough, the only common denominator seems to be the presence of symbol '6' in the string representation of the size of the executable. Thank GOD, it's not '666' :) If that happens to you, don't panic. Just add (or remove) some unimportant functionality, such as printouts for example, that will change the size, and chances are the process of burning will proceed as expected.

omega2-bootloader's People

Contributors

greenbreakfast avatar mh1412 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

omega2-bootloader's Issues

Help with hard debrick :)

Hi,
I've been playing around with mine Omega2p+ and had erased u-boot (performed cp.uboot without loading anything to write) - so I assume it zero'ed first 4 bytes of u-boot, looking at the output.
Now device don't boot, serial output is blank, on power connect, the led on expansion dock blink for a while, then it's off.

Is there any way to debrick, maybe boot from microsd card or reflash u-boot without desoldering shield and reprogramming flash directly on the board?

Omega2+ fails to flash firmware from USB storage

Issue description

Omega2+ fails to flash firmware from USB storage

Steps to reproduce the issue

Follow usb flashing procedure: https://docs.onion.io/omega2-docs/Firmware-Flashing-from-USB-storage.html
Use image: http://repo.onioniot.com.s3.amazonaws.com/omega2/images/omega2p-v0.3.2-b233.bin

What's the expected result?

New firmware is flashed to device.

What's the actual result?

*ERROR: CTL:TIMEOUT X
BBB_reset
usb_control_msg: request: 0xFF, requesttype: 0x21
value 0x0 index 0x0 length 0x0
ERROR: CTL:TIMEOUT X

Additional details / screenshot

screenshot

Makefile:368: recipe for target 'httpd/libhttpd.a' failed

Hi

I am trying to build uboot, looks like there is issue in httpd

/opt/buildroot-gcc342/bin/mipsel-linux-gcc -gdwarf-2 -DDEBUG -Os -D__KERNEL__ -DTEXT_BASE=0xBC000000 -I/home/karthi/omega/omega2-bootloader/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/buildroot-gcc342/bin/../lib/gcc/mipsel-linux-uclibc/3.4.2/include -pipe -DCONFIG_MIPS -D__MIPS__ -mabicalls -DONION_WEB_FLASH -DONION_USB_FLASH -DRALINK_MDIO_ACCESS_FUN -DRALINK_DDR_POWERSAVE -march=4kc -mtune=4kc -DRALINK_SPI_UPGRADE_CHECK -DRALINK_RW_RF_REG_FUN -DRALINK_CMDLINE -DRALINK_EPHY_INIT -DCONFIG_LZMA -DRALINK_USB -DRALINK_OHCI -DP5_MAC_TO_NONE_MODE -DP4_MAC_TO_NONE_MODE -DASIC_BOARD -DMT7628_ASIC_BOARD -DMT7628_MP -DUBOOT_ROM -DON_BOARD_DDR2 -DON_BOARD_DDR_WIDTH_16 -DON_BOARD_16BIT_DRAM_BUS -DON_BOARD_1024M_DRAM_COMPONENT -DCFG_ENV_IS_IN_SPI -Wall -Wstrict-prototypes -c -o fs.o fs.c In file included from fs.c:54: fsdata.c:693: error: parse error before ',' token /home/karthi/omega/omega2-bootloader/config.mk:830: recipe for target 'fs.o' failed make[1]: *** [fs.o] Error 1 make[1]: Leaving directory '/home/karthi/omega/omega2-bootloader/httpd' Makefile:368: recipe for target 'httpd/libhttpd.a' failed make: *** [httpd/libhttpd.a] Error 2

MMC boot

Hi,

How to build u-boot to boot directly from emmc ? instead of overlay

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.