Jump to content

[Solved] kwboot on Armada 38x?


hmartin

Recommended Posts

Hi all,

 

Over at Doozan we are having quite a time trying to get kwboot to work on the newer Armada 385 based boards. It works for the ClearFrog because there is a DIP switch to select UART boot. However on shipping products like the Zyxel NAS326 and the Western Digital EX2 Ultra/EX2100/EX4100 this is not an option.

 

Does anyone else have any of the above products? Were you ever successful in getting it to load u-boot via uart?

Link to comment
Share on other sites

Just to update this thread: we now have kwboot working on Armada 38x boards. The trick to getting kwboot working was a patch which was never included in u-boot mainline: https://lists.denx.de/pipermail/u-boot/2015-August/226105.html

 

If you apply this patch to u-boot tree and build it, you will get a kwboot binary that works for Armada 38x chips. The timing is still variable, so it will take multiple attempts to successfully kwboot, but it is definitely possible.

 

I am quoting the post from Doozan:

Quote

Holy shit. It works! 

Apply the attached patch to kwboot.c in v2017.05 u-boot source. The patch is originally from https://lists.denx.de/pipermail/u-boot/2015-August/226105.html 

But it seems the patch was never applied to kwboot in the u-boot mainline (or at least, I cannot find it in the git log kwboot.c). 

The timing isn't perfect, I have to try a few times (edit: maybe 1 in 6 attempts is successful) before I can reproduce it, but I can definitely boot the u-boot I built from WD source (see the boot log below for build date, version, and "I run u-boot from kwboot!"). 

I tried u-boot-spl.kwb from v2017.05 but no luck. 
 


$ ./kwboot -f -t -B 115200 /dev/ttyUSB0 -b u-boot-a38x-Yosemite_2014T3_PQ-nand-uart.bin -s 0 -q 1
Sending boot message. Please reboot the target...-�$�"Ufw�$�"U����$
Dfw�$�"U�\�$�"U����$�DUf�$�"U�w���"U����$4"U���$�"U�w�$�"U���$�DUf|fD�&T����$�"U�E�$�"Df3DD�DU�E7$�"U����$4"U���$�"U�E��4"U�/7@� ���$�DU�w�$�"U����$�DUff�$�"D��fD$U��
Sending boot image...
  0 % [......................................................................]
<this goes on for a while>
 99 % [...................................]
[Type Ctrl-\ + c to quit]
�
 __   __                      _ _
|  \/  | __ _ _ ____   _____| | |
| |\/| |/ _` | '__\ \ / / _ \ | |
| |  | | (_| | |   \ V /  __/ | |
|_|  |_|\__,_|_|    \_/ \___|_|_|
         _   _     ____              _
        | | | |   | __ )  ___   ___ | |_ 
        | | | |___|  _ \ / _ \ / _ \| __| 
        | |_| |___| |_) | (_) | (_) | |_ 
         \___/    |____/ \___/ \___/ \__| 
 ** LOADER **


U-Boot 2013.01_v1.08 (Jun 05 2017 - 14:51:29) hmartin version: 2014_T3.0p6

Board: Yosemite DB6820
SoC:   MV88F6820 Rev A0
       running 2 CPUs
CPU:   ARM Cortex A9 MPCore (Rev 1) LE
       CPU 0
       CPU    @ 1332 [MHz]
       L2     @ 666 [MHz]
       TClock @ 200 [MHz]
       DDR    @ 666 [MHz]
       DDR 32 Bit Width, FastPath Memory Access, DLB Enabled, ECC Disabled
DRAM:  1 GiB

Map:   Code:			0x3fece000:0x3ff95d58
       BSS:			0x3ffef254
       Stack:			0x3f9cdf20
       Heap:			0x3f9ce000:0x3fece000
raise: Signal # 8 caught
raise: Signal # 8 caught
       U-Boot Environment:	0x00000000:0x00080000 (NAND)

NAND:  ID: dcad ,512 MiB
MMC:   mv_sdh: 0
PCI-e 0: Detected No Link.
USB2.0 0: Host Mode
USB3.0 0: Host Mode
USB3.0 1: Host Mode
Board configuration detected:
Creating 1 MTD partitions on "nand0":
0x00001f500000-0x00001ff00000 : "mtd=7"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    126976 bytes
UBI: smallest flash I/O unit:    2048
UBI: VID header offset:          2048 (aligned 2048)
UBI: data offset:                4096
UBI: attached mtd1 to ubi0
UBI: MTD device name:            "mtd=7"
UBI: MTD device size:            10 MiB
UBI: number of good PEBs:        80
UBI: number of bad PEBs:         0
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     1
UBI: available PEBs:             32
UBI: total number of reserved PEBs: 48
UBI: number of PEBs reserved for bad PEB handling: 2
UBI: max/mean erase counter: 2/0
UBIFS: mounted UBI device 0, volume 0, name "reserve2"
UBIFS: mounted read-only
UBIFS: file system size:   4063232 bytes (3968 KiB, 3 MiB, 32 LEBs)
UBIFS: journal size:       1015809 bytes (992 KiB, 0 MiB, 6 LEBs)
UBIFS: media format:       w4/r0 (latest is w4/r0)
UBIFS: default compressor: LZO
UBIFS: reserved for root:  200807 bytes (196 KiB)
Loading file '/mac_addr' to addr 0x02000000 with size 36 (0x00000024)...
Done
lan mac_addr :  00 90 a9 ff ff ff
Set lan 0 WakeOnLan ok
Set lan 2 WakeOnLan ok
I run u-boot from kwboot!
Enable HD1
Enable HD2
Net:   
|  port  | Interface | PHY address  |
|--------|-----------|--------------|
| egiga0 |   RGMII   |     0x00     |
| egiga1 |   RGMII   |   In-Band    |
| egiga2 |   SGMII   |     0x01     |
egiga0 [PRIME], egiga1, egiga2
Hit any key to stop autoboot:  0 
Marvell>> 1111

 

 

kwboot-x86_64.gz

kwboot.patch

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines