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

Messed up the kernel, how to recover?



  • I've messed up the Omega2 kernel (tried to move /etc and /usr to a microSD! šŸ˜ž ). Is there a way to restore it to factory setting? I tried to reinstall the firmware by clicking reset and power and getting the image from a USB (selection 2 at the prompt) but I got the following error ...

    Any help will be greatly appreciated.
    Thanks,
    Anupam

       ____       _             ____
      / __ \___  (_)__  ___    / __ \__ _  ___ ___ ____ _
     / /_/ / _ \/ / _ \/ _ \  / /_/ /  ' \/ -_) _ `/ _ `/
     \____/_//_/_/\___/_//_/  \____/_/_/_/\__/\_, /\_,_/
     W H A T  W I L L  Y O U  I N V E N T ? /___/"
    
    Board: Onion Omega2 APSoC DRAM:  128 MB
    relocate_code Pointer at: 87f60000
    flash manufacture id: c2, device id 20 19
    find flash: MX25L25635E
    *** Warning - bad CRC, using default environment
    
    ============================================
    Onion Omega2 UBoot Version: 4.3.0.3
    --------------------------------------------
    ASIC 7628_MP (Port5<->None)
    DRAM component: 1024 Mbits DDR, width 16
    DRAM bus: 16 bit
    Total memory: 128 MBytes
    Flash component: SPI Flash
    Date:Oct 18 2016  Time:17:29:05
    ============================================
    icache: sets:512, ways:4, linesz:32 ,total:65536
    dcache: sets:256, ways:4, linesz:32 ,total:32768
    CPU freq = 575 MHZ
    Estimated memory size = 128 Mbytes
    Resetting MT7628 PHY.
    Initializing MT7688 GPIO system.
    
    
    **************************************
    * Hold Reset button for more options *
    **************************************
    
    
    You have 40 seconds left to select a menu option...
    
    
    Please select option:
       [ Enter ]: Boot Omega2.
       [ 0 ]: Start Web recovery mode.
       [ 1 ]: Start command line mode.
       [ 2 ]: Flash firmware from USB storage.
    
    Option [2] selected.
    System Load Linux then write to Flash via USB Storage.
    Looking for a USB Storage.
    If suitable image is found on USB Storage writing to Flash will be attempted.
    U-Boot will look for a FAT file system.
    (Re)start USB...
    LOW LEVEL INIT USB0:
    Scanning bus 0 for devices...
    New Device 0
    usb_control_msg: request: 0x6, requesttype: 0x80
    value 0x100 index 0x0 length 0x8
    usb_control_msg: status = success?
    
     INSIDE USB INIT
    
     INSIDE USB INIT: Device responded.
    set address 1
    usb_control_msg: request: 0x5, requesttype: 0x0
    value 0x1 index 0x0 length 0x0
    usb_control_msg: status = success?
    usb_control_msg: request: 0x6, requesttype: 0x80
    value 0x100 index 0x0 length 0x12
    usb_control_msg: status = success?
    usb_control_msg: request: 0x6, requesttype: 0x80
    value 0x200 index 0x0 length 0x9
    usb_control_msg: status = success?
    usb_control_msg: request: 0x6, requesttype: 0x80
    value 0x200 index 0x0 length 0x19
    usb_control_msg: status = success?
    get_conf_no 0 Result 25, wLength 25
    if 0, ep 0
    ##EP epmaxpacketin[1] = 2
    set configuration 1
    usb_control_msg: request: 0x9, requesttype: 0x0
    value 0x1 index 0x0 length 0x0
    usb_control_msg: status = success?
    new device strings: Mfr=0, Product=1, SerialNumber=0
    usb_control_msg: request: 0x6, requesttype: 0x80
    value 0x300 index 0x0 length 0xFF
    usb_control_msg: status = success?
    USB device number 1 default language ID 0x409
    usb_control_msg: request: 0x6, requesttype: 0x80
    value 0x301 index 0x409 length 0xFF
    usb_control_msg: status = success?
    Manufacturer
    Product      OHCI Root Hub
    SerialNumber
    Device is a hub?
    usb_control_msg: request: 0x6, requesttype: 0xA0
    value 0x2900 index 0x0 length 0x4
    usb_control_msg: status = success?
    usb_control_msg: request: 0x6, requesttype: 0xA0
    value 0x2900 index 0x0 length 0x9
    usb_control_msg: status = success?
    usb_control_msg: request: 0x0, requesttype: 0xA0
    value 0x0 index 0x0 length 0x4
    usb_control_msg: status = success?
    usb_control_msg: request: 0x1, requesttype: 0x23
    value 0x8 index 0x1 length 0x0
    usb_control_msg: status = success?
    usb_control_msg: request: 0x0, requesttype: 0xA3
    value 0x0 index 0x1 length 0x4
    usb_control_msg: status = success?
    usb_control_msg: request: 0x3, requesttype: 0x23
    value 0x8 index 0x1 length 0x0
    usb_control_msg: status = success?
    usb_control_msg: request: 0x0, requesttype: 0xA3
    value 0x0 index 0x1 length 0x4
    usb_control_msg: status = success?
    usb_control_msg: request: 0x0, requesttype: 0xA3
    value 0x0 index 0x1 length 0x4
    usb_control_msg: status = success?
    usb_control_msg: request: 0x1, requesttype: 0x23
    value 0x10 index 0x1 length 0x0
    usb_control_msg: status = success?
    usb_control_msg: request: 0x3, requesttype: 0x23
    value 0x4 index 0x1 length 0x0
    usb_control_msg: status = success?
    usb_control_msg: request: 0x0, requesttype: 0xA3
    value 0x0 index 0x1 length 0x4
    usb_control_msg: status = success?
    usb_control_msg: request: 0x1, requesttype: 0x23
    value 0x14 index 0x1 length 0x0
    usb_control_msg: status = success?
    New Device 1
    usb_control_msg: request: 0x6, requesttype: 0x80
    value 0x100 index 0x0 length 0x8
    usb_control_msg: status = success?
    
     INSIDE USB INIT
    
     INSIDE USB INIT: Device responded.
    set address 2
    usb_control_msg: request: 0x5, requesttype: 0x0
    value 0x2 index 0x0 length 0x0
    usb_control_msg: status = success?
    usb_control_msg: request: 0x6, requesttype: 0x80
    value 0x100 index 0x0 length 0x12
    usb_control_msg: status = success?
    usb_control_msg: request: 0x6, requesttype: 0x80
    value 0x200 index 0x0 length 0x9
    usb_control_msg: status = success?
    usb_control_msg: request: 0x6, requesttype: 0x80
    value 0x200 index 0x0 length 0x20
    usb_control_msg: status = success?
    get_conf_no 0 Result 32, wLength 32
    if 0, ep 0
    if 0, ep 1
    ##EP epmaxpacketin[1] = 64
    ##EP epmaxpacketout[2] = 64
    set configuration 1
    usb_control_msg: request: 0x9, requesttype: 0x0
    value 0x1 index 0x0 length 0x0
    usb_control_msg: status = success?
    new device strings: Mfr=1, Product=2, SerialNumber=3
    usb_control_msg: request: 0x6, requesttype: 0x80
    value 0x300 index 0x0 length 0xFF
    usb_control_msg: status = success?
    USB device number 2 default language ID 0x409
    usb_control_msg: request: 0x6, requesttype: 0x80
    value 0x301 index 0x409 length 0xFF
    usb_control_msg: status = success?
    usb_control_msg: request: 0x6, requesttype: 0x80
    value 0x302 index 0x409 length 0xFF
    usb_control_msg: status = success?
    usb_control_msg: request: 0x6, requesttype: 0x80
    value 0x303 index 0x409 length 0xFF
    usb_control_msg: status = success?
    Manufacturer Kingston
    Product      DataTraveler 2.0
    SerialNumber C86000BDB7B2EF81FA32C583
    Device is a hub?
    2 USB Device(s) found
    scan end
           Scanning bus for storage devices...
    
    =================================================
    1: Hub,  USB Revision 1.10
     -  OHCI Root Hub
     - Class: Hub
     - PacketSize: 8  Configurations: 1
     - Vendor: 0x0000  Product 0x0000 Version 0.0
    
    =================================================
    2: Mass Storage,  USB Revision 2.0
     - Kingston DataTraveler 2.0 C86000BDB7B2EF81FA32C583
     - Class: (from Interface) Mass Storage
     - PacketSize: 64  Configurations: 1
     - Vendor: 0x0930  Product 0x6545 Version 1.0
    Testing BULK mode...Identifying a storage device...*
    USB_STORAGE: 1 Storage Device(s) found
    
    
    ***************************************
    * [!] This will take several minutes  *
    * please do not power off your Omega2 *
    ***************************************
    
    
    *
    *
    Reading file "omega2.bin"
    *
    ****************
    ****************
    ****************
    ****************
    ****************
    ****************
    
     FAT COMMAND: Unable to read file "omega2.bin" from device usb 0:1
    Upgrade F/W from USB storage failed.
    
    
       ____       _             ____
      / __ \___  (_)__  ___    / __ \__ _  ___ ___ ____ _
     / /_/ / _ \/ / _ \/ _ \  / /_/ /  ' \/ -_) _ `/ _ `/
     \____/_//_/_/\___/_//_/  \____/_/_/_/\__/\_, /\_,_/
     W H A T  W I L L  Y O U  I N V E N T ? /___/"
    
    Board: Onion Omega2 APSoC DRAM:  128 MB
    relocate_code Pointer at: 87f60000
    ******************************
    Software System Reset Occurred
    ******************************
    flash manufacture id: c2, device id 20 19
    find flash: MX25L25635E
    *** Warning - bad CRC, using default environment
    
    ============================================
    Onion Omega2 UBoot Version: 4.3.0.3
    --------------------------------------------
    ASIC 7628_MP (Port5<->None)
    DRAM component: 1024 Mbits DDR, width 16
    DRAM bus: 16 bit
    Total memory: 128 MBytes
    Flash component: SPI Flash
    Date:Oct 18 2016  Time:17:29:05
    ============================================
    icache: sets:512, ways:4, linesz:32 ,total:65536
    dcache: sets:256, ways:4, linesz:32 ,total:32768
    CPU freq = 575 MHZ
    Estimated memory size = 128 Mbytes
    Resetting MT7628 PHY.
    Initializing MT7688 GPIO system.
    
    
    **************************************
    * Hold Reset button for more options *
    **************************************
    
    
    
    Boot Linux from Flash NO RESET PRESSED.
    ## Booting image at bc050000 ...
       Image Name:   MIPS LEDE Linux-4.4.46
       Image Type:   MIPS Linux Kernel Image (lzma compressed)
       Data Size:    1311684 Bytes =  1.3 MB
       Load Address: 80000000
       Entry Point:  80000000
       Verifying Checksum ... OK
       Uncompressing Kernel Image ... OK
    No initrd
    ## Transferring control to Linux (at address 80000000) ...
    ## Giving linux memsize in MB, 128
    
    Starting kernel ...
    
    [    0.000000] Linux version 4.4.46 (root@2272a3272872) (gcc version 5.4.0 (LEDE GCC 5.4.0 r3273-a0888ec) ) #0 Thu Feb 2 23:46:03 2017
    [    0.000000] Board has DDR2
    [    0.000000] Analog PMU set to hw control
    [    0.000000] Digital PMU set to hw control
    [    0.000000] SoC Type: MediaTek MT7688 ver:1 eco:2
    [    0.000000] bootconsole [early0] enabled
    [    0.000000] CPU0 revision is: 00019655 (MIPS 24KEc)
    [    0.000000] MIPS: machine is Onion Omega2+
    [    0.000000] Determined physical RAM map:
    [    0.000000]  memory: 08000000 @ 00000000 (usable)
    [    0.000000] Initrd not found or empty - disabling initrd
    [    0.000000] Zone ranges:
    [    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
    [    0.000000] Movable zone start for each node
    [    0.000000] Early memory node ranges
    [    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
    [    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
    [    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
    [    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
    [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
    [    0.000000] Kernel command line: console=ttyS0,115200 rootfstype=squashfs,jffs2
    [    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
    [    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
    [    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
    [    0.000000] Writing ErrCtl register=0000e4d0
    [    0.000000] Readback ErrCtl register=0000e4d0
    [    0.000000] Memory: 125556K/131072K available (3025K kernel code, 142K rwdata, 728K rodata, 192K init, 196K bss, 5516K reserved, 0K cma-reserved)
    [    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    [    0.000000] NR_IRQS:256
    [    0.000000] intc: using register map from devicetree
    [    0.000000] CPU Clock: 580MHz
    [    0.000000] clocksource_probe: no matching clocksources found
    [    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6590553264 ns
    [    0.000010] sched_clock: 32 bits at 290MHz, resolution 3ns, wraps every 7405115902ns
    [    0.007520] Calibrating delay loop... 385.84 BogoMIPS (lpj=1929216)
    [    0.070042] pid_max: default: 32768 minimum: 301
    [    0.074637] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.080977] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.094351] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [    0.104013] pinctrl core: initialized pinctrl subsystem
    [    0.109719] NET: Registered protocol family 16
    [    0.133601] mt7621_gpio 10000600.gpio: registering 32 gpios
    [    0.139145] mt7621_gpio 10000600.gpio: registering 32 gpios
    [    0.144575] mt7621_gpio 10000600.gpio: registering 32 gpios
    [    0.151097] i2c-mt7621 10000900.i2c: clock 100KHz, re-start not support
    [    0.158634] clocksource: Switched to clocksource MIPS
    [    0.165152] NET: Registered protocol family 2
    [    0.170273] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.176966] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.183146] TCP: Hash tables configured (established 1024 bind 1024)
    [    0.189348] UDP hash table entries: 256 (order: 0, 4096 bytes)
    [    0.194952] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    [    0.201295] NET: Registered protocol family 1
    [    0.211300] futex hash table entries: 256 (order: -1, 3072 bytes)
    [    0.217254] Crashlog allocated RAM at address 0x3f00000
    [    0.237559] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [    0.243214] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
    [    0.255809] io scheduler noop registered
    [    0.259610] io scheduler deadline registered (default)
    [    0.265400] rt2880-pinmux pinctrl: pin io18 already requested by pinctrl; cannot claim for 10005000.pwm
    [    0.274482] rt2880-pinmux pinctrl: pin-18 (10005000.pwm) status -22
    [    0.280493] rt2880-pinmux pinctrl: could not request pin 18 (io18) from group pwm0  on device rt2880-pinmux
    [    0.289895] mtk-pwm 10005000.pwm: Error applying setting, reverse things back
    [    0.297266] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
    [    0.304877] console [ttyS0] disabled
    [    0.308311] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 28, base_baud = 2500000) is a 16550A
    [    0.317090] console [ttyS0] enabled
    [    0.317090] console [ttyS0] enabled
    [    0.324084] bootconsole [early0] disabled
    [    0.324084] bootconsole [early0] disabled
    [    0.332763] 10000d00.uart1: ttyS1 at MMIO 0x10000d00 (irq = 29, base_baud = 2500000) is a 16550A
    [    0.342280] 10000e00.uart2: ttyS2 at MMIO 0x10000e00 (irq = 30, base_baud = 2500000) is a 16550A
    [    0.352931] spi-mt7621 10000b00.spi: sys_freq: 193333333
    [    0.363005] m25p80 spi32766.0: using chunked io (size=31)
    [    0.368503] m25p80 spi32766.0: mx25l25635e (32768 Kbytes)
    [    0.374071] 4 ofpart partitions found on MTD device spi32766.0
    [    0.379994] Creating 4 MTD partitions on "spi32766.0":
    [    0.385210] 0x000000000000-0x000000030000 : "u-boot"
    [    0.392036] 0x000000030000-0x000000040000 : "u-boot-env"
    [    0.399321] 0x000000040000-0x000000050000 : "factory"
    [    0.406268] 0x000000050000-0x000002000000 : "firmware"
    [    0.453999] 2 uimage-fw partitions found on MTD device firmware
    [    0.460049] 0x000000050000-0x000000190404 : "kernel"
    [    0.466769] 0x000000190404-0x000002000000 : "rootfs"
    [    0.473698] mtd: device 5 (rootfs) set to be root filesystem
    [    0.479575] 1 squashfs-split partitions found on MTD device rootfs
    [    0.485852] 0x0000006f0000-0x000002000000 : "rootfs_data"
    [    0.503287] rt3050-esw 10110000.esw: link changed 0x00
    [    0.511021] mtk_soc_eth 10100000.ethernet eth0: mediatek frame engine at 0xb0100000, irq 5
    [    0.519698] i2c /dev entries driver
    [    0.523837] mt7621_wdt 10000120.watchdog: Initialized
    [    0.530586] NET: Registered protocol family 10
    [    0.539167] NET: Registered protocol family 17
    [    0.543787] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
    [    0.556633] 8021q: 802.1Q VLAN Support v1.8
    [    0.567928] VFS: Mounted root (squashfs filesystem) readonly on device 31:5.
    [    0.576213] Freeing unused kernel memory: 192K (803d0000 - 80400000)
    [    1.568697] init: Console is alive
    [    1.572380] init: - watchdog -
    [    4.002057] kmodloader: loading kernel modules from /etc/modules-boot.d/*
    [    4.156179] usbcore: registered new interface driver usbfs
    [    4.161918] usbcore: registered new interface driver hub
    [    4.167407] usbcore: registered new device driver usb
    [    4.178972] exFAT: Version 1.2.9
    [    4.221674] SCSI subsystem initialized
    [    4.232426] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    [    4.240872] ehci-platform: EHCI generic platform driver
    [    4.256528] phy phy-10120000.usbphy.0: remote usb device wakeup disabled
    [    4.263346] phy phy-10120000.usbphy.0: UTMI 16bit 30MHz
    [    4.268688] ehci-platform 101c0000.ehci: EHCI Host Controller
    [    4.274552] ehci-platform 101c0000.ehci: new USB bus registered, assigned bus number 1
    [    4.282733] ehci-platform 101c0000.ehci: irq 26, io mem 0x101c0000
    [    4.308676] ehci-platform 101c0000.ehci: USB 2.0 started, EHCI 1.00
    [    4.316163] hub 1-0:1.0: USB hub found
    [    4.320399] hub 1-0:1.0: 1 port detected
    [    4.329471] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
    [    4.337440] ohci-platform: OHCI generic platform driver
    [    4.343100] ohci-platform 101c1000.ohci: Generic Platform OHCI controller
    [    4.350071] ohci-platform 101c1000.ohci: new USB bus registered, assigned bus number 2
    [    4.358188] ohci-platform 101c1000.ohci: irq 26, io mem 0x101c1000
    [    4.423803] hub 2-0:1.0: USB hub found
    [    4.428047] hub 2-0:1.0: 1 port detected
    [    4.445352] MTK MSDC device init.
    [    4.488809] mtk-sd: MediaTek MT6575 MSDC Driver
    [    4.497021] sdhci: Secure Digital Host Controller Interface driver
    [    4.503365] sdhci: Copyright(c) Pierre Ossman
    [    4.511384] sdhci-pltfm: SDHCI platform and OF driver helper
    [    4.523342] usbcore: registered new interface driver usb-storage
    [    4.535297] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
    [    4.553173] init: - preinit -
    [    4.776387] usb 1-1: new high-speed USB device number 2 using ehci-platform
    [    5.084048] random: procd: uninitialized urandom read (4 bytes read, 10 bits of entropy available)
    [    5.093858] usb-storage 1-1:1.0: USB Mass Storage device detected
    [    5.113518] scsi host0: usb-storage 1-1:1.0
    [    5.430632] rt3050-esw 10110000.esw: link changed 0x00
    Press the [f] key and hit [enter] to enter failsafe mode
    Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
    [    6.111201] scsi 0:0:0:0: Direct-Access     Kingston DataTraveler 2.0 PMAP PQ: 0 ANSI: 4
    [    6.122686] sd 0:0:0:0: [sda] 60995328 512-byte logical blocks: (31.2 GB/29.1 GiB)
    [    6.131235] sd 0:0:0:0: [sda] Write Protect is off
    [    6.136845] sd 0:0:0:0: [sda] No Caching mode page found
    [    6.142319] sd 0:0:0:0: [sda] Assuming drive cache: write through
    [    6.154378]  sda: sda1
    [    6.160854] sd 0:0:0:0: [sda] Attached SCSI removable disk
    [    7.148646] mmc0: card never left busy state
    [    7.153001] mmc0: error -145 whilst initialising SD card
    [    8.028871] jffs2: notice: (414) jffs2_build_xattr_subsystem: complete building xattr subsystem, 3 of xdatum (0 unchecked, 3 orphan) and 3 of xref (0 dead, 3 orphan) found.
    [    8.046267] mount_root: switching to jffs2 overlay
    [    8.082876] urandom-seed: Seed file not found (/etc/urandom.seed)
    [    8.189635] procd: - early -
    [    8.192669] procd: - watchdog -
    json_object_from_file: error opening file /etc/hotplug.json: No such file or directory
    json_object_from_file: error opening file /etc/hotplug.json: No such file or directory
    json_object_from_file: error opening file /etc/hotplug.json: No such file or directory
    json_object_from_file: error opening file /etc/hotplug.json: No such file or directory
    


  • @Anupam-Bakshi
    The reloading of the firmware looks like everything is working as expected, until it tries to find the firmware file named "omega2.bin".

    • Is the USB formatted for FAT32?
    • Which firmware file did you download?
    • Did you put the firmware file in the root of the USB and rename it with the correct name: omega2.bin?

    [edit]
    To make the output easier to read, please place it between two sets of three backticks ```
    [/edit]



  • @cas My bad, I didn't rename the file to omega2.bin. Now that I did, it seems to have worked, but its still not booting! Any ideas ?

    I tried two different images but same result :
    omega2p-v0.1.9-b158.bin
    omega2p-v0.1.9-b159.bin

    Thank you for your help.

    ##EP epmaxpacketin[1] = 2
    set configuration 1
    usb_control_msg: request: 0x9, requesttype: 0x0
    value 0x1 index 0x0 length 0x0
    usb_control_msg: status = success?
    new device strings: Mfr=0, Product=1, SerialNumber=0
    usb_control_msg: request: 0x6, requesttype: 0x80
    value 0x300 index 0x0 length 0xFF
    usb_control_msg: status = success?
    USB device number 1 default language ID 0x409
    usb_control_msg: request: 0x6, requesttype: 0x80
    value 0x301 index 0x409 length 0xFF
    usb_control_msg: status = success?
    Manufacturer
    Product      OHCI Root Hub
    SerialNumber
    Device is a hub?
    usb_control_msg: request: 0x6, requesttype: 0xA0
    value 0x2900 index 0x0 length 0x4
    usb_control_msg: status = success?
    usb_control_msg: request: 0x6, requesttype: 0xA0
    value 0x2900 index 0x0 length 0x9
    usb_control_msg: status = success?
    usb_control_msg: request: 0x0, requesttype: 0xA0
    value 0x0 index 0x0 length 0x4
    usb_control_msg: status = success?
    usb_control_msg: request: 0x1, requesttype: 0x23
    value 0x8 index 0x1 length 0x0
    usb_control_msg: status = success?
    usb_control_msg: request: 0x0, requesttype: 0xA3
    value 0x0 index 0x1 length 0x4
    usb_control_msg: status = success?
    usb_control_msg: request: 0x3, requesttype: 0x23
    value 0x8 index 0x1 length 0x0
    usb_control_msg: status = success?
    usb_control_msg: request: 0x0, requesttype: 0xA3
    value 0x0 index 0x1 length 0x4
    usb_control_msg: status = success?
    usb_control_msg: request: 0x0, requesttype: 0xA3
    value 0x0 index 0x1 length 0x4
    usb_control_msg: status = success?
    usb_control_msg: request: 0x1, requesttype: 0x23
    value 0x10 index 0x1 length 0x0
    usb_control_msg: status = success?
    usb_control_msg: request: 0x3, requesttype: 0x23
    value 0x4 index 0x1 length 0x0
    usb_control_msg: status = success?
    usb_control_msg: request: 0x0, requesttype: 0xA3
    value 0x0 index 0x1 length 0x4
    usb_control_msg: status = success?
    usb_control_msg: request: 0x1, requesttype: 0x23
    value 0x14 index 0x1 length 0x0
    usb_control_msg: status = success?
    New Device 1
    usb_control_msg: request: 0x6, requesttype: 0x80
    value 0x100 index 0x0 length 0x8
    usb_control_msg: status = success?
    
     INSIDE USB INIT
    
     INSIDE USB INIT: Device responded.
    set address 2
    usb_control_msg: request: 0x5, requesttype: 0x0
    value 0x2 index 0x0 length 0x0
    usb_control_msg: status = success?
    usb_control_msg: request: 0x6, requesttype: 0x80
    value 0x100 index 0x0 length 0x12
    usb_control_msg: status = success?
    usb_control_msg: request: 0x6, requesttype: 0x80
    value 0x200 index 0x0 length 0x9
    usb_control_msg: status = success?
    usb_control_msg: request: 0x6, requesttype: 0x80
    value 0x200 index 0x0 length 0x20
    usb_control_msg: status = success?
    get_conf_no 0 Result 32, wLength 32
    if 0, ep 0
    if 0, ep 1
    ##EP epmaxpacketin[1] = 64
    ##EP epmaxpacketout[2] = 64
    set configuration 1
    usb_control_msg: request: 0x9, requesttype: 0x0
    value 0x1 index 0x0 length 0x0
    usb_control_msg: status = success?
    new device strings: Mfr=1, Product=2, SerialNumber=3
    usb_control_msg: request: 0x6, requesttype: 0x80
    value 0x300 index 0x0 length 0xFF
    usb_control_msg: status = success?
    USB device number 2 default language ID 0x409
    usb_control_msg: request: 0x6, requesttype: 0x80
    value 0x301 index 0x409 length 0xFF
    usb_control_msg: status = success?
    usb_control_msg: request: 0x6, requesttype: 0x80
    value 0x302 index 0x409 length 0xFF
    usb_control_msg: status = success?
    usb_control_msg: request: 0x6, requesttype: 0x80
    value 0x303 index 0x409 length 0xFF
    usb_control_msg: status = success?
    Manufacturer Kingston
    Product      DataTraveler 2.0
    SerialNumber C86000BDB7B2EF81FA32C583
    Device is a hub?
    2 USB Device(s) found
    scan end
           Scanning bus for storage devices...
    
    =================================================
    1: Hub,  USB Revision 1.10
     -  OHCI Root Hub
     - Class: Hub
     - PacketSize: 8  Configurations: 1
     - Vendor: 0x0000  Product 0x0000 Version 0.0
    
    =================================================
    2: Mass Storage,  USB Revision 2.0
     - Kingston DataTraveler 2.0 C86000BDB7B2EF81FA32C583
     - Class: (from Interface) Mass Storage
     - PacketSize: 64  Configurations: 1
     - Vendor: 0x0930  Product 0x6545 Version 1.0
    Testing BULK mode...Identifying a storage device...*
    USB_STORAGE: 1 Storage Device(s) found
    
    
    ***************************************
    * [!] This will take several minutes  *
    * please do not power off your Omega2 *
    ***************************************
    
    
    *
    *
    Reading file "omega2.bin"
    *
    ****************
    ****************
    ****************
    ****************
    ****************
    ****************
    ****************
    ******
    ******
    **********************************************************************************************************************************************************************************************************************************************
    *
    FAT: 7078055 Bytes read
    ............................................................................................................
    ............................................................................................................
    .
    .
    Done!
    
    
       ____       _             ____
      / __ \___  (_)__  ___    / __ \__ _  ___ ___ ____ _
     / /_/ / _ \/ / _ \/ _ \  / /_/ /  ' \/ -_) _ `/ _ `/
     \____/_//_/_/\___/_//_/  \____/_/_/_/\__/\_, /\_,_/
     W H A T  W I L L  Y O U  I N V E N T ? /___/"
    
    Board: Onion Omega2 APSoC DRAM:  128 MB
    relocate_code Pointer at: 87f60000
    ******************************
    Software System Reset Occurred
    ******************************
    flash manufacture id: c2, device id 20 19
    find flash: MX25L25635E
    *** Warning - bad CRC, using default environment
    
    ============================================
    Onion Omega2 UBoot Version: 4.3.0.3
    --------------------------------------------
    ASIC 7628_MP (Port5<->None)
    DRAM component: 1024 Mbits DDR, width 16
    DRAM bus: 16 bit
    Total memory: 128 MBytes
    Flash component: SPI Flash
    Date:Oct 18 2016  Time:17:29:05
    ============================================
    icache: sets:512, ways:4, linesz:32 ,total:65536
    dcache: sets:256, ways:4, linesz:32 ,total:32768
    CPU freq = 575 MHZ
    Estimated memory size = 128 Mbytes
    Resetting MT7628 PHY.
    Initializing MT7688 GPIO system.
    
    
    **************************************
    * Hold Reset button for more options *
    **************************************
    
    
    
    Boot Linux from Flash NO RESET PRESSED.
    ## Booting image at bc050000 ...
    Bad Magic Number,EAFCAFCB
    


  • @Anupam-Bakshi
    The 'bad magic number' error would seem to indicate that the file format is incorrect. Perhaps a corrupt download?

    I'd suggest using this firmware: omega2p-v0.1.10-b160.bin for the O2+

    Try to confirm that the downloaded file is valid by calculating and checking its checksum. I don't think Onion publish the official checksums, but you can check against my copy which I have successfully flashed several dozen times. Both md5sum and sha256sum results are below:

    $ md5sum omega2p-v0.1.10-b160.bin
    56467a9cccab0778971586034beec570 *omega2p-v0.1.10-b160.bin
    
    $ sha256sum omega2p-v0.1.10-b160.bin
    0e4bb0c74b8225250fa15639721fa5315fd485c0dc3a5c3b48495540a6ebbe92 *omega2p-v0.1.10-b160.bin
    


  • @cas The checksums are good. But I still get the same error šŸ˜ž
    I'll try changing the USB drive and see if that helps. Any other idea?

    56467a9cccab0778971586034beec570  omega2p-v0.1.10-b160.bin
    0e4bb0c74b8225250fa15639721fa5315fd485c0dc3a5c3b48495540a6ebbe92  omega2p-v0.1.10-b160.bin
    
       ____       _             ____
      / __ \___  (_)__  ___    / __ \__ _  ___ ___ ____ _
     / /_/ / _ \/ / _ \/ _ \  / /_/ /  ' \/ -_) _ `/ _ `/
     \____/_//_/_/\___/_//_/  \____/_/_/_/\__/\_, /\_,_/
     W H A T  W I L L  Y O U  I N V E N T ? /___/"
    
    Board: Onion Omega2 APSoC DRAM:  128 MB
    relocate_code Pointer at: 87f60000
    flash manufacture id: c2, device id 20 19
    find flash: MX25L25635E
    *** Warning - bad CRC, using default environment
    
    ============================================
    Onion Omega2 UBoot Version: 4.3.0.3
    --------------------------------------------
    ASIC 7628_MP (Port5<->None)
    DRAM component: 1024 Mbits DDR, width 16
    DRAM bus: 16 bit
    Total memory: 128 MBytes
    Flash component: SPI Flash
    Date:Oct 18 2016  Time:17:29:05
    ============================================
    icache: sets:512, ways:4, linesz:32 ,total:65536
    dcache: sets:256, ways:4, linesz:32 ,total:32768
    CPU freq = 575 MHZ
    Estimated memory size = 128 Mbytes
    Resetting MT7628 PHY.
    Initializing MT7688 GPIO system.
    
    
    **************************************
    * Hold Reset button for more options *
    **************************************
    
    
    You have 40 seconds left to select a menu option...
    
    
    Please select option:
       [ Enter ]: Boot Omega2.
       [ 0 ]: Start Web recovery mode.
       [ 1 ]: Start command line mode.
       [ 2 ]: Flash firmware from USB storage.
    
    Option [2] selected.
    System Load Linux then write to Flash via USB Storage.
    Looking for a USB Storage.
    If suitable image is found on USB Storage writing to Flash will be attempted.
    U-Boot will look for a FAT file system.
    (Re)start USB...
    LOW LEVEL INIT USB0:
    Scanning bus 0 for devices...
    New Device 0
    usb_control_msg: request: 0x6, requesttype: 0x80
    value 0x100 index 0x0 length 0x8
    usb_control_msg: status = success?
    
     INSIDE USB INIT
    
     INSIDE USB INIT: Device responded.
    set address 1
    usb_control_msg: request: 0x5, requesttype: 0x0
    value 0x1 index 0x0 length 0x0
    usb_control_msg: status = success?
    usb_control_msg: request: 0x6, requesttype: 0x80
    value 0x100 index 0x0 length 0x12
    usb_control_msg: status = success?
    usb_control_msg: request: 0x6, requesttype: 0x80
    value 0x200 index 0x0 length 0x9
    usb_control_msg: status = success?
    usb_control_msg: request: 0x6, requesttype: 0x80
    value 0x200 index 0x0 length 0x19
    usb_control_msg: status = success?
    get_conf_no 0 Result 25, wLength 25
    if 0, ep 0
    ##EP epmaxpacketin[1] = 2
    set configuration 1
    usb_control_msg: request: 0x9, requesttype: 0x0
    value 0x1 index 0x0 length 0x0
    usb_control_msg: status = success?
    new device strings: Mfr=0, Product=1, SerialNumber=0
    usb_control_msg: request: 0x6, requesttype: 0x80
    value 0x300 index 0x0 length 0xFF
    usb_control_msg: status = success?
    USB device number 1 default language ID 0x409
    usb_control_msg: request: 0x6, requesttype: 0x80
    value 0x301 index 0x409 length 0xFF
    usb_control_msg: status = success?
    Manufacturer
    Product      OHCI Root Hub
    SerialNumber
    Device is a hub?
    usb_control_msg: request: 0x6, requesttype: 0xA0
    value 0x2900 index 0x0 length 0x4
    usb_control_msg: status = success?
    usb_control_msg: request: 0x6, requesttype: 0xA0
    value 0x2900 index 0x0 length 0x9
    usb_control_msg: status = success?
    usb_control_msg: request: 0x0, requesttype: 0xA0
    value 0x0 index 0x0 length 0x4
    usb_control_msg: status = success?
    usb_control_msg: request: 0x1, requesttype: 0x23
    value 0x8 index 0x1 length 0x0
    usb_control_msg: status = success?
    usb_control_msg: request: 0x0, requesttype: 0xA3
    value 0x0 index 0x1 length 0x4
    usb_control_msg: status = success?
    usb_control_msg: request: 0x3, requesttype: 0x23
    value 0x8 index 0x1 length 0x0
    usb_control_msg: status = success?
    usb_control_msg: request: 0x0, requesttype: 0xA3
    value 0x0 index 0x1 length 0x4
    usb_control_msg: status = success?
    usb_control_msg: request: 0x0, requesttype: 0xA3
    value 0x0 index 0x1 length 0x4
    usb_control_msg: status = success?
    usb_control_msg: request: 0x1, requesttype: 0x23
    value 0x10 index 0x1 length 0x0
    usb_control_msg: status = success?
    usb_control_msg: request: 0x3, requesttype: 0x23
    value 0x4 index 0x1 length 0x0
    usb_control_msg: status = success?
    usb_control_msg: request: 0x0, requesttype: 0xA3
    value 0x0 index 0x1 length 0x4
    usb_control_msg: status = success?
    usb_control_msg: request: 0x1, requesttype: 0x23
    value 0x14 index 0x1 length 0x0
    usb_control_msg: status = success?
    New Device 1
    usb_control_msg: request: 0x6, requesttype: 0x80
    value 0x100 index 0x0 length 0x8
    usb_control_msg: status = success?
    
     INSIDE USB INIT
    
     INSIDE USB INIT: Device responded.
    set address 2
    usb_control_msg: request: 0x5, requesttype: 0x0
    value 0x2 index 0x0 length 0x0
    usb_control_msg: status = success?
    usb_control_msg: request: 0x6, requesttype: 0x80
    value 0x100 index 0x0 length 0x12
    usb_control_msg: status = success?
    usb_control_msg: request: 0x6, requesttype: 0x80
    value 0x200 index 0x0 length 0x9
    usb_control_msg: status = success?
    usb_control_msg: request: 0x6, requesttype: 0x80
    value 0x200 index 0x0 length 0x20
    usb_control_msg: status = success?
    get_conf_no 0 Result 32, wLength 32
    if 0, ep 0
    if 0, ep 1
    ##EP epmaxpacketin[1] = 64
    ##EP epmaxpacketout[2] = 64
    set configuration 1
    usb_control_msg: request: 0x9, requesttype: 0x0
    value 0x1 index 0x0 length 0x0
    usb_control_msg: status = success?
    new device strings: Mfr=1, Product=2, SerialNumber=3
    usb_control_msg: request: 0x6, requesttype: 0x80
    value 0x300 index 0x0 length 0xFF
    usb_control_msg: status = success?
    USB device number 2 default language ID 0x409
    usb_control_msg: request: 0x6, requesttype: 0x80
    value 0x301 index 0x409 length 0xFF
    usb_control_msg: status = success?
    usb_control_msg: request: 0x6, requesttype: 0x80
    value 0x302 index 0x409 length 0xFF
    usb_control_msg: status = success?
    usb_control_msg: request: 0x6, requesttype: 0x80
    value 0x303 index 0x409 length 0xFF
    usb_control_msg: status = success?
    Manufacturer Kingston
    Product      DataTraveler 2.0
    SerialNumber C86000BDB7B2EF81FA32C583
    Device is a hub?
    2 USB Device(s) found
    scan end
           Scanning bus for storage devices...
    
    =================================================
    1: Hub,  USB Revision 1.10
     -  OHCI Root Hub
     - Class: Hub
     - PacketSize: 8  Configurations: 1
     - Vendor: 0x0000  Product 0x0000 Version 0.0
    
    =================================================
    2: Mass Storage,  USB Revision 2.0
     - Kingston DataTraveler 2.0 C86000BDB7B2EF81FA32C583
     - Class: (from Interface) Mass Storage
     - PacketSize: 64  Configurations: 1
     - Vendor: 0x0930  Product 0x6545 Version 1.0
    Testing BULK mode...Identifying a storage device...*
    USB_STORAGE: 1 Storage Device(s) found
    
    
    ***************************************
    * [!] This will take several minutes  *
    * please do not power off your Omega2 *
    ***************************************
    
    
    *
    *
    Reading file "omega2.bin"
    *
    ****************
    ****************
    ****************
    ******
    ******
    **********************************************************************************************************************************************************************************************************************************************
    *
    FAT: 7078055 Bytes read
    ............................................................................................................
    ............................................................................................................
    .
    .
    Done!
    
    
       ____       _             ____
      / __ \___  (_)__  ___    / __ \__ _  ___ ___ ____ _
     / /_/ / _ \/ / _ \/ _ \  / /_/ /  ' \/ -_) _ `/ _ `/
     \____/_//_/_/\___/_//_/  \____/_/_/_/\__/\_, /\_,_/
     W H A T  W I L L  Y O U  I N V E N T ? /___/"
    
    Board: Onion Omega2 APSoC DRAM:  128 MB
    relocate_code Pointer at: 87f60000
    ******************************
    Software System Reset Occurred
    ******************************
    flash manufacture id: c2, device id 20 19
    find flash: MX25L25635E
    *** Warning - bad CRC, using default environment
    
    ============================================
    Onion Omega2 UBoot Version: 4.3.0.3
    --------------------------------------------
    ASIC 7628_MP (Port5<->None)
    DRAM component: 1024 Mbits DDR, width 16
    DRAM bus: 16 bit
    Total memory: 128 MBytes
    Flash component: SPI Flash
    Date:Oct 18 2016  Time:17:29:05
    ============================================
    icache: sets:512, ways:4, linesz:32 ,total:65536
    dcache: sets:256, ways:4, linesz:32 ,total:32768
    CPU freq = 575 MHZ
    Estimated memory size = 128 Mbytes
    Resetting MT7628 PHY.
    Initializing MT7688 GPIO system.
    
    
    **************************************
    * Hold Reset button for more options *
    **************************************
    
    
    
    Boot Linux from Flash NO RESET PRESSED.
    ## Booting image at bc050000 ...
    Bad Magic Number,EAFCAFCB
    


  • @Anupam-Bakshi
    Ouch, not the ideal outcome.
    Could be the USB drive, you could check the checksum of the files once you've transferred them and before you flash in case the drive is faulty or something is interfering with the transfer (e.g. av software).
    Be sure to 'safely remove' on windows or 'unmount' the device on *nix before disconnecting it.

    Other than that, I'm not sure what else to suggest. The number of bytes read corresponds to the size of the file, so it's not looking truncated.

    If all else fails, I'd suggest opening a ticket on the Help Desk and in the meantime, perhaps someone else will come along with some more ideas?



  • It was the usbdrive! I changed it and now it seems to be working!
    Earlier I was using Kingston, now using Sandisk.
    Thanks @cas for your help. Much appreciated.



  • @Anupam-Bakshi
    Good news, glad to hear that.
    Happy hacking. šŸ˜‰



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