Arduino Yun Mini Bricked linux (kernel panic) SQUASHFS ERROR, Reflashing with serial YMODEM or Kermit, O WIFI, SD card, Eth, or USB

0

INTRODUCTION

I am actually newbie to this advanced perspective of linux routers based systems as openWRT and i faced a problem with my Arduino Yun Mini board which found to be operated with this firmware for linux interfacing and WiFi module, So:

THE PROBLEM:

i tried to upgrade the system image with the new one on the arduino website which i don't sure is it for YUN or YUN mini exactly but i take the challenge :wink: and it seems they had some issues related to these board by throughing problems between .cc and .org domains that i don't understand but don't care, so i had to work around and when logging the boot from the board i reconizes the following suspicious messages before the boot hangs ::

Kernel panic - not syncing: No init found. Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.

Other suspected log messages :

SQUASHFS error: unable to read id index table

Repeated Suspected Messages :

jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000030: 0x7c7d instead

Further such events for this erase block will not be printed

Empty flash at 0x00000038 ends at 0x00000040

Old JFFS2 bitmask found at 0x000168c8

You cannot use older JFFS2 filesystems with newer kernels

MY MISTAKE

So, after many repeated search i suspect that the upgrade is never complete and some file system structure is broken and everywhere i searched they taking about reflashing the flash memory of the board where also there was a method in the arduino supports to do that using TFTP which requires a network connection to the board.

THE CONSTRAINS

the WiFi hotspot of the board never starts because of the firmware issue or anything i don't recognise, and there is no Ethernet socket available with Arduino Yun Mini and there is not USB host or SD card socket,

THE WAY I SAW

I did't find a way except SERIAL COMMUNICATION and hence i can enter the U-BOOT command line i found that two serial options are avialbble for me ::

LOADY = YMODEM Mode
LOADB = KERMIT Mode

MY CURRENT PROBLEM

I tried both ways loady and loadb using ExtraPutty and TeraTerm software without any options for offset or address or baudrate and send the files that i downloaded from here in this page Started by the U-boot binary file of course but unfortunately when it comes to 33% of the file the transaction aborted and the operation canceled and i tried over and over again with both tools and both protocols and the result was the same (the binary files does't downloaded to the flash memory of the board) and i still have a hope

WHAT I THOUGHT

I think if the problem is not from the file (if its not build for such type of transfer protocols or other thing), then the problem will be inside the addressing of where to put that files for further erasing and copying them to their place which puts me on a tight place inside that flash memory too :hot_face: i read about addressing and NOR NAND EEPROM .... but i found this issue requires further digging so i came here to the professionals of electronics drainage specialists :sweat_smile:

MY ENVIRONMENT VARIABLES

bootcmd=run addboard; run addtty;run addparts; run addrootfs; bootm 0x9fEa0000
bootdelay=4; baudrate=250000
ethaddr=0xb4:0x21:0x8a:0x00:0x00:0x10
ipaddr=192.168.1.2; serverip=192.168.1.1
board=linino-yun-mini
addboard=setenv bootargs board=${board}
addtty=setenv bootargs ${bootargs} console=${console}
mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env),14656k(rootfs),1280k(kernel),64k(nvram),64k(art),15936k@0x50000(firmware)
addparts=setenv bootargs ${bootargs} mtdparts=${mtdparts}
addrootfs=setenv bootargs ${bootargs} rootfstype=squashfs,jffs2 noinitrd
erase_env=erase 0x9f040000 +0x10000
dir= (i think this is set when upgrading)
lu=tftp 0x80060000 ${dir}u-boot-${board}.bin&&erase 0x9f000000 +$filesize&&cp.b $fileaddr 0x9f000000 $filesize
lf=tftp 0x80060000 ${dir}lininoIO-generic-${board}-rootfs-squashfs.bin&&erase 0x9f050000 +$filesize&&cp.b $fileaddr 0x9f050000 $filesize
lk=tftp 0x80060000 ${dir}lininoIO-generic-${board}-kernel.bin&&erase 0x9fEa0000 +$filesize&&cp.b $fileaddr 0x9fEa0000 $filesize
ethact=eth0
console=ttyATH0,250000
bootargs=board=linino-yun-mini console=ttyATH0,250000 mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot env)ro,14656k(rootfs),1280k(kernel),64k(nvram),64k(art),15936k@0x50000(firmware) rootfstype=squashfs,jffs2 noinitrd (I think there is mistake here when i set this from some other solutions i tried)
stdin=serial; stdout=serial; stderr=serial
Environment size: 1258/65532 bytes

MY BDINFO

boot_params = 0x83F77FB0
memstart    = 0x80000000
memsize     = 0x04000000
flashstart  = 0x9F000000
flashsize   = 0x01000000
flashoffset = 0x0002C8FC
ethaddr     = B4:21:8A:00:00:10
ip_addr     = 192.168.1.2
baudrate    = 250000 bps

THE BEGINING OF LOG

U-Boot 1.1.5-linino-gde64cfc5-dirty (Apr 14 2015 - 22:01:11)

Linino Board (ar9331) U-boot
DRAM:  64 MB
Top of RAM usable for U-Boot at: 84000000
Reserving 218k for U-Boot at: 83fc8000
Reserving 192k for malloc() at: 83f98000
Reserving 44 Bytes for Board Info at: 83f97fd4
Reserving 36 Bytes for Global Data at: 83f97fb0
Reserving 128k for boot params() at: 83f77fb0
Stack Pointer at: 83f77f98
Now running in RAM - U-Boot at: 83fc8000
Flash Manuf Id 0xef, DeviceId0 0x40, DeviceId1 0x18
flash size 16777216, sector count = 256
Flash: 16 MB
In:    serial
Out:   serial
Err:   serial
Net:   eth0: b4:21:8a:00:00:00
eth1: b4:21:8a:00:00:01
eth0, eth1
autoboot in 4 seconds (stop with 'lin')...
linino> 

MY U-BOOT COMMANDS

?       - alias for 'help'
autoscr - run script from memory
base    - print or set address offset
bdinfo  - print Board Info structure
boot    - boot default, i.e., run 'bootcmd'
bootd   - boot default, i.e., run 'bootcmd'
bootelf - Boot from an ELF image in memory
bootm   - boot application image from memory
bootp   - boot image via network using BootP/TFTP protocol
bootvx  - Boot vxWorks from an ELF image
cmp     - memory compare
coninfo - print console devices and information
cp      - memory copy
crc32   - checksum calculation
dhcp    - invoke DHCP client to obtain IP/boot params
echo    - echo args to console
erase   - erase FLASH memory
ethreg    - S26 PHY Reg rd/wr  utility
exit    - exit script
flinfo  - print FLASH memory information
go      - start application at address 'addr'
help    - print online help
iminfo  - print header information for application image
imls    - list all images found in flash
itest   - return true/false on integer compare
loadb   - load binary file over serial line (kermit mode)
loads   - load S-Record file over serial line
loady   - load binary file over serial line (ymodem mode)
loop    - infinite loop on address range
md      - memory display
mii     - MII utility commands
mm      - memory modify (auto-incrementing)
mtest   - simple RAM test
mw      - memory write (fill)
nfs - boot image via network using NFS protocol
nm      - memory modify (constant address)
ping    - send ICMP ECHO_REQUEST to network host
printenv- print environment variables
progmac - Set ethernet MAC addresses
protect - enable or disable FLASH write protection
rarpboot- boot image via network using RARP/TFTP protocol
reset   - Perform RESET of the CPU
run     - run commands in an environment variable
saveenv - save environment variables to persistent storage
setenv  - set environment variables
sleep   - delay execution for some time
test    - minimal test like /bin/sh
tftpboot- boot image via network using TFTP protocol
version - print monitor version

THE ENTIRE LOG

(Some repeated logs i removed for post length constrains)

U

-Boot 1.1.5-linino-gde64cfc5-dirty (Apr 14 2015 - 22:01:11)

Linino Board (ar9331) U-boot
DRAM:  64 MB
Top of RAM usable for U-Boot at: 84000000
Reserving 218k for U-Boot at: 83fc8000
Reserving 192k for malloc() at: 83f98000
Reserving 44 Bytes for Board Info at: 83f97fd4
Reserving 36 Bytes for Global Data at: 83f97fb0
Reserving 128k for boot params() at: 83f77fb0
Stack Pointer at: 83f77f98
Now running in RAM - U-Boot at: 83fc8000
Flash Manuf Id 0xef, DeviceId0 0x40, DeviceId1 0x18
flash size 16777216, sector count = 256
Flash: 16 MB
In:    serial
Out:   serial
Err:   serial
Net:   eth0: b4:21:8a:00:00:00
eth1: b4:21:8a:00:00:01
eth0, eth1
autoboot in 4 seconds (stop with 'lin')...
## Booting image at 9fea0000 ...
   Image Name:   MIPS OpenWrt Linux-3.3.8
   Created:      2015-04-18   0:46:24 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    1089704 Bytes =  1 MB
   Load Address: 80060000
   Entry Point:  80060000
   Verifying Checksum at 0x9fea0040 ...OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80060000) ...
## Giving linux memsize in bytes, 67108864

Starting kernel ...

[    0.000000] Linux version 3.3.8 (build@build-base) (gcc version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02) ) #1 Sat Apr 18 02:45:58 CEST 2015
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 00019374 (MIPS 24Kc)
[    0.000000] SoC: Atheros AR9330 rev 1
[    0.000000] Clocks: CPU:400.000MHz, DDR:400.000MHz, AHB:200.000MHz, Ref:25.000MHz
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] User-defined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone PFN ranges:
[    0.000000]   Normal   0x00000000 -> 0x00004000
[    0.000000] Movable zone start PFN for each node
[    0.000000] Early memory PFN ranges
[    0.000000]     0: 0x00000000 -> 0x00004000
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line:  board=linino-yun-mini console=ttyATH0,250000 mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env),14656k(rootfs),1280k(kernel),64k(nvram),64k(art),15936k@0x50000(firmware) rootfstype=squashfs,jffs2 noinitrd mem=64M rootfstype=squashfs,jffs2 noinitrd
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 61144k/65536k available (2358k kernel code, 4392k reserved, 642k data, 180k init, 0k highmem)
[    0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:256
[    0.000000] Calibrating delay loop... 265.42 BogoMIPS (lpj=1327104)
[    0.080000] pid_max: default: 32768 minimum: 301
[    0.080000] Mount-cache hash table entries: 512
[    0.080000] NET: Registered protocol family 16
[    0.090000] gpiochip_add: registered GPIOs 0 to 29 on device: ath79
[    0.090000] MIPS: machine is Arduino Yun-Mini
[    0.100000] ds_common_setup-163: wlan0 MAC:3f:4:f5:8a:21:b4
[    0.100000] ds_common_setup-173: eth1 MAC:3f:4:fd:8a:21:b4
[    0.540000] mach-linino: setting GPIO
[    0.540000] Setting GPIO OE 21
[    0.540000] Setting GPIO OE2 22
[    0.540000] Setting GPIO UART-ENA 23
[    0.540000] mach-linino: enabling GPIO SPI Controller
[    0.560000] bio: create slab <bio-0> at 0
[    0.570000] Switching to clocksource MIPS
[    0.570000] NET: Registered protocol family 2
[    0.570000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.580000] TCP established hash table entries: 2048 (order: 2, 16384 bytes)
[    0.580000] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[    0.580000] TCP: Hash tables configured (established 2048 bind 2048)
[    0.580000] TCP reno registered
[    0.580000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.590000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.590000] NET: Registered protocol family 1
[    0.610000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.610000] JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.620000] msgmni has been set to 119
[    0.620000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
[    0.620000] io scheduler noop registered
[    0.630000] io scheduler deadline registered (default)
[    0.630000] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.640000] ar933x-uart: ttyATH0 at MMIO 0x18020000 (irq = 11) i{ a AR933X UART
[    0.640000] console [ttyATH0] enabled, bootconsole disabled
[    0.640000] console [ttyATH0] enabled, bootconsole disabled
[    0.650000] m25p80 spi0.0: found w25q128, expected m25p80
[    0.650000] m25p80 spi0.0: w25q128 (16384 Kbytes)
[    0.650000] 7 cmdlinepart partitions found on MTD device spi0.0
[    0.660000] Creating 7 MTD partitions on "spi0.0":
[    0.660000] 0x000000000000-0x000000040000 : "u-boot"
[    0.660000] 0x000000040000-0x000000050000 : "u-boot-env"
[    0.670000] 0x000000050000-0x000000ea0000 : "rootfs"
[    0.670000] mtd: partition "rootfs" set to be root filesystem
[    0.670000] mtd: partition "rootfs_data" created automatically, ofs=9A0000, len=500000 
[    0.680000] 0x0000009a0000-0x000000ea0000 : "rootfs_data"
[    0.680000] 0x000000ea0000-0x000000fe0000 : "kernel"
[    0.680000] 0x000000fe0000-0x000000ff0000 : "nvram"
[    0.690000] 0x000000ff0000-0x000001000000 : "art"
[    0.690000] 0x000000050000-0x000000fe0000 : "firmware"
[    0.710000] ag71xx_mdio: probed
[    0.720000] eth0: Atheros AG71xx at 0xba000000, irq 5
[    1.270000] eth0: Found an AR7240/AR9330 built-in switch
[    2.300000] eth1: Atheros AG71xx at 0xb9000000, irq 4
[    2.850000] ag71xx ag71xx.0: eth1: connected to PHY at ag71xx-mdio.1:04 [uid=004dd041, driver=Generic PHY]
[    2.850000] input: gpio-keys-polled as /devices/platform/gpio-keys-polled/input/input0
[    2.860000] TCP cubic registered
[    2.860000] NET: Registered protocol family 17
[    2.860000] Bridge firewalling registered
[    2.870000] 8021q: 802.1Q VLAN Support v1.8
[    2.870000] SQUASHFS error: unable to read id index table
[    2.870000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000000: 0x6873 instead
[    2.880000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000004: 0x200b instead
[    2.880000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000008: 0xe299 instead
[    2.880000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000010: 0x5800 instead
[    2.890000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000014: 0x0400 instead
[    2.890000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000018: 0xc006 instead
[    2.900000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000001c: 0x0400 instead
[    2.900000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000020: 0xa81e instead
[    2.900000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000028: 0x847d instead
[    2.910000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000030: 0x7c7d instead
[    2.910000] Further such events for this erase block will not be printed

SO, i will be too thanksfull if you read all of these and accept the callange with my side and try to help me i can't lose this board and i can't imagine to use it as just UNO board and i don't have dogRJ45 or dogUSB and i am working on a project of an IoT based application that depends on it and the circuit is fabricated for this board. Any solution will be appreciated THanks

arduino
openwrt
u-boot
squashfs
kermit

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0