Welcome! Log In Create A New Profile

Advanced

UART Booting HowTo for Selected Kirkwood Devices

Posted by davygravy 
Re: UART Booting HowTo for Selected Kirkwood Devices
September 06, 2016 03:50PM
mike Wrote:
-------------------------------------------------------
> I will try
> http://forum.doozan.com/read.php?2,11663,11713#msg
> -11713

No, dont try that. I will post link to different post.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: UART Booting HowTo for Selected Kirkwood Devices
September 06, 2016 04:34PM
Mike,

With SD rootfs plugged in, kwboot again, interrupt serial console and

run bootcmd_uenv
setenv dtb_file '/boot/dts/kirkwood-pogoplug_v4.dtb'
boot

You will boot into Debian correctly as the Pogo V4. LED should be on correctly.

Proceed to instal Pogo V4 u-boot for real:
http://forum.doozan.com/read.php?3,12381

-bodhi
===========================
Forum Wiki
bodhi's corner
Hi bodhi,
Thank you one more time for your help!
It's done. My pogoplug is alive.

4.6.0-kirkwood-tld-1 on board.

I did this to flash uboot to NAND.

flash_erase /dev/mtd0 0 4
nandwrite /dev/mtd0 uboot.2016.05-tld-1.pogo_v4.mtd0.kwb
flash_erase /dev/mtd0 0xc0000 1
nandwrite -s 786432 /dev/mtd0 uboot.2014.07-tld-1.environment.img
uboot.2016.05-tld-1.environment.img
fw_setenv arcNumber 3960
fw_setenv machid F78
fw_setenv usb_rootfstype ext3
fw_setenv mtdparts 'mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)'
fw_setenv bootcmd 'run bootcmd_uenv; boot; reset'
Re: UART Booting HowTo for Selected Kirkwood Devices
September 07, 2016 01:22PM
After flashing you dont need uEnv.txt. Remove it and

Set bootcmd back to

fw_setenv bootcmd 'run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; reset'

-bodhi
===========================
Forum Wiki
bodhi's corner
Hi Bodhi,
I have done this:
mv /boot/uEnv.txt /boot/uEnv.bak
fw_setenv bootcmd 'run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; reset'
reboot
... and led was blinking green then appeared orange and pogo couldn't boot.

I've restored uEnv.txt on another linux box, restarted and pogo works again.
It seems that I have to have uEnv.txt in /boot/.

fw_prinenv
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=10
bootdev=usb
device=0:1
devices=usb ide mmc
disks=0 1 2 3
ethact=egiga0
ethaddr=52:3b:20:9c:11:51
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb_addr=0x1c00000
load_initrd_addr=0x1100000
load_uimage_addr=0x800000
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
mainlineLinux=yes
mtdids=nand0=orion_nand
partition=nand0,2
preboot_nc=run if_netconsole start_netconsole
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
stderr=serial
stdin=serial
stdout=serial
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
usb_ready_retry=15
mtdparts=mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)
arcNumber=3960
machid=F78
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; reset
dtb_file=/boot/kirkwood-pogoplug_v4.dtb
ipaddr=192.168.0.10
serverip=192.168.0.3
if_netconsole=ping $serverip
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
preboot=run if_netconsole start_netconsole

uEnv.txt
dtb_file=/boot/dts/kirkwood-pogoplug_v4.dtb
Re: UART Booting HowTo for Selected Kirkwood Devices
September 09, 2016 04:38AM
mike,

Then after booting into Debian,

fw_setenv dtb_file '/boot/dts/kirkwood-pogoplug_v4.dtb'

And move uEnv.txt to uEnv.txt.bak.

If you still can't boot without uEnv.txt then use picocom to monitor serial console, capture the log and post here.

If you don't have picocom, then in Debian,

apt-get install picocom

-bodhi
===========================
Forum Wiki
bodhi's corner
It works. Thank you!
Re: UART Booting HowTo for Selected Kirkwood Devices
November 20, 2016 10:01AM
I can confirm that kwboot works with the Iomega IX4-200d which has BootRom v1.11

The trick is to flip the switch and start kwboot after approx 1 second. Quite reliable though.

My command is
kwboot -b uboot.2016.05-tld-1.sheevaplug.mtd0.kwb -B 115200 -t -p /dev/...

I'm not sure whether this uboot image came from this thread, but it's certainly here on the forum.
Re: UART Booting HowTo for Selected Kirkwood Devices
April 19, 2017 07:29AM
Qizhitong 501m v2 confirmed
Re: UART Booting HowTo for Selected Kirkwood Devices
October 31, 2017 04:42PM
Hi bodhi - I'm bbaaaaaacckkk (hopefully this won't be as epic a journey as with my E02 from a few days ago, and thanks again for all the help there by the way).

I have a Pogoplug Mobile which I must have messed up some time ago - it won't boot, but when I connect via serial I see some envs that look like they belong with an E02 and not a V4/Mobile.

I'm trying now to "test this boot image with UART booting before flashing to NAND" (from your latest U-boot post).

I untarred kwboot-2016.05.tar & downloaded your latest uboot, then typed
root@PogoV4Debian:/temp# ./kwboot -t -B 115200 /dev/ttyUSB0 -b uboot.2017.07-tld-1.pogo_v4.mtd0.kwb -p

At first I thought this was failing, but then I found this thread and your exchange with Mike, and after several repetitions of the kwboot command I got
Sending boot image...
  0 % [......................................................................]
  1 % [......................................................................]
...
 97 % [......................................................................]
 99 % [....................................]
[Type Ctrl-\ + c to quit]

...but then nothing else happens. At no point does the LED on my Pogo come on.

I'm supposed to see the U-boot start up here, correct?

I'm connecting with picocom running on a functioning Pogo-V4. My mobile has a USB stick plugged in with newest rootfs, and the ethernet cable is plugged in.

I have a feeling you might ask me to post printenv output:
Pogov4> printenv
arcNumber=3960
bootcmd=run bootcmd_usb; run bootcmd_mmc; run bootcmd_sata; run bootcmd_pogo; reset
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=10
bootdev=usb
device=0:1
devices=usb ide mmc
disks=0 1 2 3
dtb_file=/boot/dts/kirkwood-pogo_e02.dtb
ethact=egiga0
ethaddr=00:25:31:06:25:fd
if_netconsole=ping $serverip
ipaddr=192.168.0.231
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_dtb_addr=0x1c00000
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_initrd_addr=0x1100000
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
load_uimage_addr=0x800000
machid=F78
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)
partition=nand0,2
preboot_nc=run if_netconsole start_netconsole
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
serverip=192.168.0.220
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
usb_ready_retry=15
usb_rootfstype=ext3

Environment size: 2904/131068 bytes
Pogov4>


If you have some advice either on how to get the UART boot to work, or just changes to make to the envs, please let me know. I thought I had changed the obvious problems (dtb_file, serverip & ipaddr) but I must not have saved the changes and at this point it's probably best to just show you what's there.

As always, profuse and over-effusive thanks for all your help.
-huge


[EDIT: Should have mentioned the errors that come up on boot attempt. Here they are]
Pogov4> boot
## Error: "bootcmd_usb" not defined
## Error: "bootcmd_mmc" not defined
## Error: "bootcmd_sata" not defined
## Error: "bootcmd_pogo" not defined
resetting ...


U-Boot 2016.05-tld-1 (Jun 12 2016 - 13:41:47 -0700)
Pogoplug V4

SoC:   Kirkwood 88F6192_A1
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  128 MiB
MMC:   kwsdio: 0
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
Hit any key to stop autoboot:  0
Pogov4>



Edited 1 time(s). Last edit at 10/31/2017 04:55PM by huge.
Re: UART Booting HowTo for Selected Kirkwood Devices
October 31, 2017 06:18PM
huge,

> root@PogoV4Debian:/temp# ./kwboot -t -B 115200
> /dev/ttyUSB0 -b
> uboot.2017.07-tld-1.pogo_v4.mtd0.kwb -p

> [Type Ctrl-\ + c to quit]

When it stuck here, it might mean that your serial connection is not solid. At this point u-boot has not started yet, so don't worry about the envs. Check the wires and try again. Serial console might work OK with marginal connections, but kwboot does handshake so it could be stuck.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: UART Booting HowTo for Selected Kirkwood Devices
October 31, 2017 06:37PM
bodhi Wrote:
-------------------------------------------------------
> huge,
>
>
> > root@PogoV4Debian:/temp# ./kwboot -t -B 115200
> > /dev/ttyUSB0 -b
> > uboot.2017.07-tld-1.pogo_v4.mtd0.kwb -p
> 
> > [Type Ctrl-\ + c to quit]
>
>
> When it stuck here, it might mean that your serial
> connection is not solid. At this point u-boot has
> not started yet, so don't worry about the envs.
> Check the wires and try again. Serial console
> might work OK with marginal connections, but
> kwboot does handshake so it could be stuck.

Well, shoot. That's going to be tough. I don't own a soldering iron so I have the wires taped to the circuit board. I'm not surprised that I would have a "marginal connection", but at this point I don't know if I can do anything about it other than trying to clamp the wires down a little tighter.
Re: UART Booting HowTo for Selected Kirkwood Devices
October 31, 2017 07:01PM
huge Wrote:
-------------------------------------------------------
> bodhi Wrote:
> -------------------------------------------------------
> > huge,
> >
> >
> > > root@PogoV4Debian:/temp# ./kwboot -t -B
> 115200
> > > /dev/ttyUSB0 -b
> > > uboot.2017.07-tld-1.pogo_v4.mtd0.kwb -p
> > 
> > > [Type Ctrl-\ + c to quit]
> >
> >
> > When it stuck here, it might mean that your
> serial
> > connection is not solid. At this point u-boot
> has
> > not started yet, so don't worry about the envs.
> > Check the wires and try again. Serial console
> > might work OK with marginal connections, but
> > kwboot does handshake so it could be stuck.
>
> Well, shoot. That's going to be tough. I don't own
> a soldering iron so I have the wires taped to the
> circuit board. I'm not surprised that I would have
> a "marginal connection", but at this point I don't
> know if I can do anything about it other than
> trying to clamp the wires down a little tighter.

It worked fo rme in the past with small pins and test clips. These solder buttons are soft enough.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: UART Booting HowTo for Selected Kirkwood Devices
August 27, 2019 11:54AM
The UART boot works for NSA310
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: