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 04:50PM
Re: UART Booting HowTo for Selected Kirkwood Devices
September 06, 2016 05: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
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
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 02: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
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
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 05: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
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
It works. Thank you!
Re: UART Booting HowTo for Selected Kirkwood Devices
November 20, 2016 11: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 08:29AM
Qizhitong 501m v2 confirmed
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: