Welcome! Log In Create A New Profile

Advanced

First try woes: Debian on the PogoPlug Pro

Posted by cdlenfert 
First try woes: Debian on the PogoPlug Pro
May 21, 2017 05:51PM
Hoping to run Debian on a PogoPlug pro

I can no longer access my Pogo via SSH and I’m guessing it may be due to using a cheap USB drive.

Followed Qii Hong’s guide here: http://blog.qnology.com/2015/04/hacking-pogoplug-v3oxnas-proclassic.html
• I had to look around the web, archives, doozan forum, etc for all of the required files.
• I realize this will put me on an old version of debian, but I figured I could upgrade uBoot and Debian later, for now I needed more step by step instructions

Installed rootfs from here: https://www.dropbox.com/s/shk6b7klgyuu48p/Debian-3.17.0-oxnas-tld-1-rootfs-bodhi.tar.bz2

Installed uBoot from here: https://www.dropbox.com/s/17vrdq07thcx9hj/uboot.2013.10-tld-4.ox820.bodhi.tar

Initially I started working through the guide connected via SSH over the PogoPro’s wifi, after I started getting errors trying to do fw_setenv steps related to the ethaddr steps. I was able to do those successfully after connecting the PogoPro to my router via ethernet.

Everything seemed to go as expected otherwise. The only odd part was that I was not able to get the USB to show up in a list using df -h and in order to format it I had to use the command fdisk -l to see that my usb was located at dev/sdc so I proceeded to use sdc(1) instead of sda(1) in the formatting steps.

Here is the output of my fw_printenv.txt file:
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=5
baudrate=115200
ethaddr=00:25:31:00:f7:fd
fdt_file=/boot/dts/ox820-pogoplug-classic.dtb
dt_load_dtb=ext2load usb 0:1 $dtb_addr $fdt_file

I also entered all the commands to configure netconsole, but am not sure how to make the actual connection to get the boot log info.

The PogoPro starts up, gets a solid green light, and appears to be getting an IP address, but that’s all I can do for now. I do have a serial device but would like to take advantage of netconsole since it’s there, or figure out how (if it is the USB drive at fault) I can clone or format another usb to test that as the problem. I do have a Raspberry Pi running debian, so could I just use the formatting and debian install steps with a USB device connected to the Pi?

Thanks for any points in the right direction.
Re: First try woes: Debian on the PogoPlug Pro
May 22, 2017 01:49AM
cdlenfert ,

> Everything seemed to go as expected otherwise. The
> only odd part was that I was not able to get the U
> SB to show up in a list using df -h and in order t
> o format it I had to use the command fdisk -l to s
> ee that my usb was located at dev/sdc so I proceed
> ed to use sdc(1) instead of sda(1) in the formatti
> ng steps.

This is odd. If the USB is the only storage device plugged in then it should have been sda1. It is perhaps something to do with your USB drive brand and/or model (i.e. bad hardware).

> Here is the output of my fw_printenv.txt file:
> bootcmd=bootp; setenv bootargs root=/dev/nfs nfsro
> ot=${serverip}:${rootpath} ip=${ipaddr}:${serverip
> }:${gatewayip}:${netmask}:${hostname}::off; bootm
> bootdelay=5
> baudrate=115200
> ethaddr=00:25:31:00:f7:fd
> fdt_file=/boot/dts/ox820-pogoplug-classic.dtb
> dt_load_dtb=ext2load usb 0:1 $dtb_addr $fdt_file
>

Your u-boot envs are incomplete. So it means you have not installed the u-boot default envs image (u-boot installation always needs 2 images, the u-boot image and the u-boot default env image).


> I also entered all the commands to configure netco
> nsole, but am not sure how to make the actual conn
> ection to get the boot log info.

With the above u-boot envs, you have no netconsole.

> The PogoPro starts up, gets a solid green light, a
> nd appears to be getting an IP address, but that’s
> all I can do for now. I do have a serial device

Now it's time to connect the serial console. It will help making everything so much easier. After you have recovered from this wrong installation, then you can setup netconsole and use that permanently instead of serial console.

> bu
> t would like to take advantage of netconsole since
> it’s there, or figure out how (if it is the USB dr
> ive at fault) I can clone or format another usb to
> test that as the problem. I do have a Raspberry Pi
> running debian, so could I just use the formatting
> and debian install steps with a USB device connect
> ed to the Pi?
>

As I mentioned, you'll need serial console to make fixing this u-boot installation problem easier.

There is another possible path to receover, (booting SATA), but that is a lot more work than just connecting serial console.

-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
Re: First try woes: Debian on the PogoPlug Pro
May 22, 2017 11:23AM
Thanks bodhi I'm not sure where I botched the u-boot install, but glad to know which direction to go to fix it.

Quote
bodhi
Your u-boot envs are incomplete. So it means you have not installed the u-boot default envs image (u-boot installation always needs 2 images, the u-boot image and the u-boot default env image).

If I work through these steps again while connected via serial console will that fix the u-boot envs and netconsole?

#setup fw_env.config for oxnas
echo "/dev/mtd0 0x00100000 0x20000 0x20000">/etc/fw_env.config

#save original envs
/usr/local/cloudengines/bin/blparam > /blparam.txt

#Download and flash new uBoot
wget http://download.qnology.com/pogoplug/oxnas/uboot.2013.10-tld-4.ox820.bodhi.tar
wget http://download.qnology.com/pogoplug/oxnas/uboot.2013.10-tld-4.ox820.bodhi.tar.md5

#check md5sum
md5sum -c uboot.2013.10-tld-4.ox820.bodhi.tar.md5

#extract uBoot files
tar -xf uboot.2013.10-tld-4.ox820.bodhi.tar

#BE EXTRA CAREFUL WITH THE THESE COMMANDS.
#NO TYPOS! CUT AND PASTE.
#Erase and flash uboot on mtd0
#Flash encoded spl stage1 to 0x0
/tmp/flash_erase /dev/mtd0 0x0 6
/tmp/nandwrite /dev/mtd0 uboot.spl.2013.10.ox820.850mhz.mtd0.img

#Flash uboot to 0x40000
/tmp/nandwrite -s 262144 /dev/mtd0 uboot.2013.10-tld-4.ox820.mtd0.img
#Flash uboot environment
#Erase 1 block starting 0x00100000
/tmp/flash_erase /dev/mtd0 0x00100000 1
/tmp/nandwrite -s 1048576 /dev/mtd0 pogopro_uboot_env.img

#Set MAC Address
/tmp/fw_setenv ethaddr "$(cat /sys/class/net/eth0/address)"

#default to pogoplug classic dtb
/tmp/fw_setenv fdt_file '/boot/dts/ox820-pogoplug-classic.dtb'
/tmp/fw_setenv dt_load_dtb 'ext2load usb 0:1 $dtb_addr $fdt_file'

#double check the MAC Address matches with
#what is on the bottom of your Pogoplug
/tmp/fw_printenv ethaddr

#print out all uboot environment parameters
#make sure there are no errors
/tmp/fw_printenv > /fw_printenv.txt
/tmp/fw_printenv


Setup Netconsole
More info here - http://forum.doozan.com/read.php?3,14,14


#Update IP Addresses as appropriate
#ipaddr = Pogoplug IP
/tmp/fw_setenv preboot 'run preboot_nc'
/tmp/fw_setenv ipaddr '192.168.1.10'
/tmp/fw_setenv serverip '192.168.1.100'
Re: First try woes: Debian on the PogoPlug Pro
May 22, 2017 12:00PM
Yes, it will fix the errors.

Perform all the steps above. And then do this additional step:

/tmp/fw_printenv > /fw_printenv.txt
/tmp/fw_printenv

Please the entire log of what you did before rebooting.

-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
Re: First try woes: Debian on the PogoPlug Pro
May 22, 2017 12:51PM
Sounds good. I'll post back soon. Thanks again.

One question since I'm kind of starting over, would it be possible to do the steps above but substitute the old u-boot tar file and debian tar for the latest version in your related threads.

For example replace
#extract uBoot files
tar -xf uboot.2013.10-tld-4.ox820.bodhi.tar
with
#extract uBoot files
tar -xf uboot.2015.10-tld-1.ox820.bodhi.tar

and
#Flash uboot to 0x40000
/tmp/nandwrite -s 262144 /dev/mtd0 uboot.2013.10-tld-4.ox820.mtd0.img
with
#Flash uboot to 0x40000
/tmp/nandwrite -s 262144 /dev/mtd0 uboot.2015.10-tld-1.ox820.mtd0.img

and
#Flash uboot environment
#Erase 1 block starting 0x00100000
/tmp/flash_erase /dev/mtd0 0x00100000 1
/tmp/nandwrite -s 1048576 /dev/mtd0 pogopro_uboot_env.img
with
#Flash uboot environment
#Erase 1 block starting 0x00100000
/tmp/flash_erase /dev/mtd0 0x00100000 1
/tmp/nandwrite -s 1048576 /dev/mtd0 uboot.2013.10-tld-5.ox820.environment.img

and this one I'm guessing at since I have the pro model
#default to pogoplug classic dtb
/tmp/fw_setenv fdt_file '/boot/dts/ox820-pogoplug-classic.dtb'
with
#default to pogoplug pro dtb
/tmp/fw_setenv fdt_file 'ox820-pogoplug-pro.dtb'

And finally wget the latest rootfs tar and replace:
#extract
tar -xvjf Debian-3.17.0-oxnas-tld-1-rootfs-bodhi.tar.bz2

#cleanup
rm Debian-3.17.0-oxnas-tld-1-rootfs-bodhi.tar.bz2*
with
tar -xvjf Debian-3.17.0-oxnas-tld-1-rootfs-bodhi.tar

#cleanup
rm Debian-3.17.0-oxnas-tld-1-rootfs-bodhi.tar*

Then will I be on the latest and greatest? If so I'll also plan do do that ethernet fix
ethtool -A eth0 rx off tx off

Thanks again!
Re: First try woes: Debian on the PogoPlug Pro
May 22, 2017 01:51PM
cdlenfert,

What you list above is all correct. Except these 2 items:

1. Netconsole does not start automatically using the latest version, as stated in the uboot release thrread:
http://forum.doozan.com/read.php?3,16017

Quote

I've uploaded the uboot.2015.10-tld-1 u-Boot image for Pogoplug V3 Oxnas.

Warning: netconsole does not start automatically in this version. If you don't have serial console and therefore need netconsole to see the boot progress, please use previous u-boot version (uboot.2013.10-tld-3.ox820.bodhi.tar - Updated 16 May 2014). And follow the instruction in that section.

So if you need netconsole, then use the version you have
uboot.2013.10-tld-4.ox820.mtd0.img

If you can use serial console to troubleshoot booting problem in the future, then use uboot.2015.10-tld-1.


2. Latest Pogo V3 rootfs is

Debian-3.17.0-oxnas-tld-1-rootfs-bodhi.tar.bz2

-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
Re: First try woes: Debian on the PogoPlug Pro
May 22, 2017 02:31PM
Ahh yes, same rootfs in both versions. Thanks for pointing that out and confirming. Since I have serial, I don't think I'll really need netconsole, so I should be able to skip the netconsloe steps, right (since it won't work anyway).

One more question :)
I noticed later on in Qui's guide that he makes this change in order to configure the wifi card in the PogoPro. If I do this out of the gate, will ethernet still work after a reboot? Ideally I'd like to have the wifi card be functional with the option to also hook up via ethernet.

Quote
cdlenfert
and this one I'm guessing at since I have the pro model
#default to pogoplug classic dtb
/tmp/fw_setenv fdt_file '/boot/dts/ox820-pogoplug-classic.dtb'

with
#default to pogoplug pro dtb
/tmp/fw_setenv fdt_file 'ox820-pogoplug-pro.dtb'
Re: First try woes: Debian on the PogoPlug Pro
May 22, 2017 02:42PM
cdlenfert,

This is the correct setting for Pogo Pro.

>
> #default to pogoplug pro dtb
> /tmp/fw_setenv fdt_file 'ox820-pogoplug-pro.dtb'
>

ox820-pogoplug-classic.dtb is wrong for Pogo Pro. Qui used the classic version for all cases, which is not a very good choice (it would cause some confusion when you see wifi is not working). When people installing u-boot, I would expect they know which Pogo V3 box they have, and can follow instruction to choose between 2 hardware versions.

Ethernet always works if you have the cable connected. Wifi is a different story. You will need to do further set up to have both ethernet and Wifi co-exists and working, and when you unplug one or the other.

-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



Edited 1 time(s). Last edit at 05/22/2017 02:45PM by bodhi.
Re: First try woes: Debian on the PogoPlug Pro
May 23, 2017 11:45AM
After getting the serial connection working I'm able to see the boot process in action. If I don't interrupt it, it just keeps retrying.

Here is the boot data
U-Boot SPL 2013.10-tld-4 (Sep 07 2014 - 14:10:12)                               
  Boot device: NAND                                                             
Attempting to set PLLA to 850 MHz ...                                           
  plla_ctrl0 : 0000020a                                                         
  plla_ctrl1 : 00330000                                                         
  plla_ctrl2 : 0065008b                                                         
  plla_ctrl3 : 000000f1                                                         
                                                                                
PLLA Set                                                                        
                                                                                
                                                                                
U-Boot 2013.10-tld-4 (Sep 08 2014 - 19:43:38) for OXNAS                         
                                                                                
DRAM:  128 MiB                                                                  
NAND:  128 MiB                                                                  
In:    serial                                                                   
Out:   serial                                                                   
Err:   serial                                                                   
Net:                                                                            
Led:    GREEN                                                                   
mii0                                                                            
Main Loop                                                                       
## Error: "preboot_nc" not defined                                              
Hit any key to stop autoboot:  0                                                
Waiting for PHY auto negotiation to complete... done                            
ENET Speed is 1000 Mbps - FULL duplex connection                                
BOOTP broadcast 1                                                               
DHCP client bound to address 192.168.2.4                                        
*** Warning: no boot file name; using 'C0A80204.img'                            
Using mii0 device                                                               
TFTP from server 192.168.2.1; our IP address is 192.168.2.4                     
Filename 'C0A80204.img'.                                                        
Load address: 0x60000000                                                        
Loading: T T T T

After that it goes into a loop
Retry count exceeded; starting again
BOOTP broadcast 1
DHCP client bound to address 192.168.2.4
*** Warning: no boot file name; using 'C0A80204.img'
Using mii0 device
TFTP from server 192.168.2.1; our IP address is 192.168.2.4
Filename 'C0A80204.img'.
Load address: 0x60000000
Loading: T T T T T T T T T

If I interrupt by pressing a key before boot, I get a command not found for any basic commands like 'ls' or 'cd', basically when I hit the first 'wget' while trying to re-do the flash u-boot steps above, I'm stuck. Any ideas how to proceed?

I do see these commands as available when I do 'help'.
?       - alias for 'help'
askenv  - get environment variables from stdin
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
bootmenu- ANSI terminal bootmenu
bootp   - boot image via network using BOOTP/TFTP protocol
bootvx  - Boot vxWorks from an ELF image
bootz   - boot Linux zImage image from memory
chpart  - change active partition
cmp     - memory compare
coninfo - print console devices and information
cp      - memory copy
crc32   - checksum calculation
date    - get/set/reset date & time
dhcp    - boot image via network using DHCP/TFTP protocol
diskboot- boot from IDE device
dns     - lookup the IP of a hostname
echo    - echo args to console
editenv - edit environment variable
env     - environment handling commands
exit    - exit script
ext2load- load binary file from a Ext2 filesystem
ext2ls  - list files in a directory (default /)
ext4load- load binary file from a Ext4 filesystem
ext4ls  - list files in a directory (default /)
ext4write- create a file in the root directory
false   - do nothing, unsuccessfully
fatinfo - print information about filesystem
fatload - load binary file from a dos filesystem
fatls   - list files in a directory (default /)
fatwrite- write file into a dos filesystem
fdt     - flattened device tree utility commands
fsls    - list files in a directory (default /)
gettime - get timer val elapsed,

go      - start application at address 'addr'
grepenv - search environment variables
hash    - compute hash message digest
help    - print command description/usage
ide     - IDE sub-system
iminfo  - print header information for application image
imxtract- extract a part of a multi-image
ini     - parse an ini file in memory and merge the specified section into the env
itest   - return true/false on integer compare
load    - load binary file from a filesystem
loadb   - load binary file over serial line (kermit mode)
loads   - load S-Record file over serial line
loadx   - load binary file over serial line (xmodem mode)
loady   - load binary file over serial line (ymodem mode)
loop    - infinite loop on address range
md      - memory display
md5sum  - compute MD5 message digest
mdio    - MDIO utility commands
mii     - MII utility commands
mm      - memory modify (auto-incrementing address)
mtdparts- define flash/nand partitions
mw      - memory write (fill)
nand    - NAND sub-system
nboot   - boot from NAND device
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
pxe     - commands to get and boot from pxe files
reset   - Perform RESET of the CPU
run     - run commands in an environment variable
saveenv - save environment variables to persistent storage
setenv  - set environment variables
setexpr - set environment variable as the result of eval expression
showvar - print local hushshell variables
sleep   - delay execution for some time
sntp    - synchronize RTC via network
source  - run script from memory
sysboot - command to get and boot from syslinux files
terminal- start terminal emulator
test    - minimal test like /bin/sh
tftpboot- boot image via network using TFTP protocol
time    - run commands and summarize execution time
true    - do nothing, successfully
ubi     - ubi commands
ubifsload- load file from an UBIFS filesystem
ubifsls - list files in a directory
ubifsmount- mount UBIFS volume
ubifsumount- unmount UBIFS volume
unzip   - unzip a memory region
usb     - USB sub-system
usbboot - boot from USB device
version - print monitor, compiler and linker version
zip     - zip a memory region
OX820> usb
usb - USB sub-system



Edited 1 time(s). Last edit at 05/23/2017 01:14PM by cdlenfert.
Re: First try woes: Debian on the PogoPlug Pro
May 23, 2017 12:00PM
running some of the USB commands I'm able to get info on the connected USB (which would have some if not all of the original executable files).
OX820> usb start
(Re)start USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
OX820> usb dev

USB device 0: Vendor: Verbatim Rev:      Prod: Store n Go Drive
            Type: Removable Hard Disk
            Capacity: 3750.0 MB = 3.6 GB (7680000 x 512)
Re: First try woes: Debian on the PogoPlug Pro
May 23, 2017 02:24PM
cdlenfert,

> U-Boot SPL 2013.10-tld-4 (Sep 07 2014 - 14:10:12)
> Boot device: NAND
> Attempting to set PLLA to 850 MHz ...
> plla_ctrl0 : 0000020a
> plla_ctrl1 : 00330000
> plla_ctrl2 : 0065008b
> plla_ctrl3 : 000000f1
>
> PLLA Set
>
>
> U-Boot 2013.10-tld-4 (Sep 08 2014 - 19:43:38) for
> OXNAS
>
> DRAM: 128 MiB
> NAND: 128 MiB
> In: serial
> Out: serial
> Err: serial
> Net:
> Led: GREEN
> mii0
> Main Loop
> ## Error: "preboot_nc" not defined
> Hit any key to stop autoboot: 0

So far so good.


> Waiting for PHY auto negotiation to complete... do
> ne
> ENET Speed is 1000 Mbps - FULL duplex connection
> BOOTP broadcast 1
> DHCP client bound to address 192.168.2.4
> *** Warning: no boot file name; using 'C0A80204.im
> g'

> Using mii0 device
> TFTP from server 192.168.2.1; our IP address is 19
> 2.168.2.4
> Filename 'C0A80204.img'.
> Load address: 0x60000000
> Loading: T T T T
> [/code]
>

The above errors should not occur if you have installed the u-boot default envs image (ctually they are not part of the default envs so you would not see them executing).

> If I interrupt by pressing a key before boot, I ge
> t a command not found for any basic commands like
> 'ls' or 'cd', basically when I hit the first 'wget
> ' while trying to re-do the flash u-boot steps abo
> ve, I'm stuck. Any ideas how to proceed?

The commands you tried are Linux shell commands. They are not available in u-boot console.

> ? - alias for 'help'
> askenv - get environment variables from stdin
> 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
> bootmenu- ANSI terminal bootmenu
> bootp - boot image via network using BOOTP/TFTP
> protocol
> bootvx - Boot vxWorks from an ELF image
> bootz - boot Linux zImage image from memory
> chpart - change active partition
> cmp - memory compare
> coninfo - print console devices and information
> cp - memory copy
> crc32 - checksum calculation
> date - get/set/reset date & time
> dhcp - boot image via network using DHCP/TFTP p
> rotocol
> diskboot- boot from IDE device
> dns - lookup the IP of a hostname
> echo - echo args to console
> editenv - edit environment variable
> env - environment handling commands
> exit - exit script
> ext2load- load binary file from a Ext2 filesystem
> ext2ls - list files in a directory (default /)
> ext4load- load binary file from a Ext4 filesystem
> ext4ls - list files in a directory (default /)
> ext4write- create a file in the root directory
> false - do nothing, unsuccessfully
> fatinfo - print information about filesystem
> fatload - load binary file from a dos filesystem
> fatls - list files in a directory (default /)
> fatwrite- write file into a dos filesystem
> fdt - flattened device tree utility commands
> fsls - list files in a directory (default /)
> gettime - get timer val elapsed,
>
> go - start application at address 'addr'
> grepenv - search environment variables
> hash - compute hash message digest
> help - print command description/usage
> ide - IDE sub-system
> iminfo - print header information for application
> image
> imxtract- extract a part of a multi-image
> ini - parse an ini file in memory and merge th
> e specified section into the env
> itest - return true/false on integer compare
> load - load binary file from a filesystem
> loadb - load binary file over serial line (kermi
> t mode)
> loads - load S-Record file over serial line
> loadx - load binary file over serial line (xmode
> m mode)
> loady - load binary file over serial line (ymode
> m mode)
> loop - infinite loop on address range
> md - memory display
> md5sum - compute MD5 message digest
> mdio - MDIO utility commands
> mii - MII utility commands
> mm - memory modify (auto-incrementing address
> )
> mtdparts- define flash/nand partitions
> mw - memory write (fill)
> nand - NAND sub-system
> nboot - boot from NAND device
> nfs - boot image via network using NFS protoco
> l
> nm - memory modify (constant address)
> ping - send ICMP ECHO_REQUEST to network host
> printenv- print environment variables
> pxe - commands to get and boot from pxe files
> reset - Perform RESET of the CPU
> run - run commands in an environment variable
> saveenv - save environment variables to persistent
> storage
> setenv - set environment variables
> setexpr - set environment variable as the result o
> f eval expression
> showvar - print local hushshell variables
> sleep - delay execution for some time
> sntp - synchronize RTC via network
> source - run script from memory
> sysboot - command to get and boot from syslinux fi
> les
> terminal- start terminal emulator
> test - minimal test like /bin/sh
> tftpboot- boot image via network using TFTP protoc
> ol
> time - run commands and summarize execution tim
> e
> true - do nothing, successfully
> ubi - ubi commands
> ubifsload- load file from an UBIFS filesystem
> ubifsls - list files in a directory
> ubifsmount- mount UBIFS volume
> ubifsumount- unmount UBIFS volume
> unzip - unzip a memory region
> usb - USB sub-system
> usbboot - boot from USB device
> version - print monitor, compiler and linker versi
> on
> zip - zip a memory region
> OX820> usb
> usb - USB sub-system

The above commands are u-boot commands.

---

Look at your u-boot installation log. You must have missed flashing the default envs image.

-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
Re: First try woes: Debian on the PogoPlug Pro
May 23, 2017 02:52PM
Not sure what I'm missing here :/

Qui’s Guide
/tmp/flash_erase /dev/mtd0 0x0 6
/tmp/nandwrite /dev/mtd0 uboot.spl.2013.10.ox820.850mhz.mtd0.img
/tmp/nandwrite -s 262144 /dev/mtd0 uboot.2013.10-tld-4.ox820.mtd0.img
/tmp/flash_erase /dev/mtd0 0x00100000 1
/tmp/nandwrite -s 1048576 /dev/mtd0 pogopro_uboot_env.img

My Log
[root@PogoplugPro /tmp]# /tmp/flash_erase /dev/mtd0 0x0 6
Erasing 128 Kibyte @ a0000 -- 100 % complete 
[root@PogoplugPro /tmp]# /tmp/nandwrite /dev/mtd0 uboot.spl.2013.10.ox820.850mhz.mtd0.img
Writing data to block 0 at offset 0x0
[root@PogoplugPro /tmp]# /tmp/nandwrite -s 262144 /dev/mtd0 uboot.2013.10-tld-4.ox820.mtd0.img
Writing data to block 2 at offset 0x40000
Writing data to block 3 at offset 0x60000
Writing data to block 4 at offset 0x80000
Writing data to block 5 at offset 0xa0000
[root@PogoplugPro /tmp]# /tmp/flash_erase /dev/mtd0 0x00100000 1
Erasing 128 Kibyte @ 100000 -- 100 % complete 
[root@PogoplugPro /tmp]# /tmp/nandwrite -s 1048576 /dev/mtd0 pogopro_uboot_env.img
Writing data to block 8 at offset 0x100000

And this was the result of 'fw_printenv'
[root@PogoplugPro /root]# /tmp/fw_printenv
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=5
baudrate=115200
ethaddr=00:25:31:00:f7:fd
fdt_file=/boot/dts/ox820-pogoplug-classic.dtb
dt_load_dtb=ext2load usb 0:1 $dtb_addr $fdt_file

Any way to come back from this aside from a sata drive boot? Can I reconfigure with the u-boot commands, get the PogoPro to boot from the recognized USB, revert to stock OS boot?

Thanks again very much for your feedback and help so far.
Re: First try woes: Debian on the PogoPlug Pro
May 24, 2017 03:38AM
cdlenfert Wrote:
-------------------------------------------------------
> Not sure what I'm missing here :/
>
> Qui’s Guide
>
> /tmp/flash_erase /dev/mtd0 0x0 6
> /tmp/nandwrite /dev/mtd0 uboot.spl.2013.10.ox820.8
> 50mhz.mtd0.img
> /tmp/nandwrite -s 262144 /dev/mtd0 uboot.2013.10-t
> ld-4.ox820.mtd0.img
> /tmp/flash_erase /dev/mtd0 0x00100000 1
> /tmp/nandwrite -s 1048576 /dev/mtd0 pogopro_uboot_
> env.img
>
>
> My Log
>
> [root@PogoplugPro /tmp]# /tmp/flash_erase /dev/mtd
> 0 0x0 6
> Erasing 128 Kibyte @ a0000 -- 100 % complete
> [root@PogoplugPro /tmp]# /tmp/nandwrite /dev/mtd0
> uboot.spl.2013.10.ox820.850mhz.mtd0.img
> Writing data to block 0 at offset 0x0
> [root@PogoplugPro /tmp]# /tmp/nandwrite -s 262144
> /dev/mtd0 uboot.2013.10-tld-4.ox820.mtd0.img
> Writing data to block 2 at offset 0x40000
> Writing data to block 3 at offset 0x60000
> Writing data to block 4 at offset 0x80000
> Writing data to block 5 at offset 0xa0000
> [root@PogoplugPro /tmp]# /tmp/flash_erase /dev/mtd
> 0 0x00100000 1
> Erasing 128 Kibyte @ 100000 -- 100 % complete
> [root@PogoplugPro /tmp]# /tmp/nandwrite -s 1048576
> /dev/mtd0 pogopro_uboot_env.img
> Writing data to block 8 at offset 0x100000
>
>
> And this was the result of 'fw_printenv'
>
> [root@PogoplugPro /root]# /tmp/fw_printenv
> bootcmd=bootp; setenv bootargs root=/dev/nfs nfsro
> ot=${serverip}:${rootpath} ip=${ipaddr}:${serverip
> }:${gatewayip}:${netmask}:${hostname}::off; bootm
> bootdelay=5
> baudrate=115200
> ethaddr=00:25:31:00:f7:fd
> fdt_file=/boot/dts/ox820-pogoplug-classic.dtb
> dt_load_dtb=ext2load usb 0:1 $dtb_addr $fdt_file
>
>

At this point,

cat /etc/fw_env.config
cat /proc/mtd

Please post the output here.

-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



Edited 1 time(s). Last edit at 05/24/2017 07:11AM by bodhi.
Re: First try woes: Debian on the PogoPlug Pro
May 24, 2017 08:16AM
Unknown command 'cat'

I'm doing this after stopping auto-boot
Re: First try woes: Debian on the PogoPlug Pro
May 24, 2017 11:08AM
Can I use setenv to update my u-boot envs to match the following and get the PogoPro to boot from my USB? Would changes be necessary to since I set up an older version using Qui's guide? I was looking at this thread which made me hopefully (I realize it's for a different hardware, but hoping the process could work) - http://forum.doozan.com/read.php?3,16129

My printenv
baudrate=115200
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serm
bootdelay=5
dt_load_dtb=ext2load usb 0:1 $dtb_addr $fdt_file
ethact=mii0
ethaddr=00:25:31:00:f7:fd
fdt_file=/boot/dts/ox820-pogoplug-classic.dtb
ipaddr=192.168.0.54
preboot=run preboot_nc
serverip=192.168.0.32
stderr=serial
stdin=serial
stdout=serial

Environment size: 444/131068 bytes

And modify it to mach your fw_printenv from - http://forum.doozan.com/read.php?3,16017
autoload=no
baudrate=115200
bootargs=console=ttyS0,115200n8
bootdelay=10
console=console=ttyS0,115200n8
ethact=mii0
ethaddr=5e:2b:15:71:ec:b6
ipaddr=192.168.0.222
mtdids=nand0=41000000.nand
mtdparts=mtdparts=41000000.nand:14m(boot),-(data)
serverip=192.168.0.220
stderr=serial
stdin=serial
stdout=serial
usb_device=0:1
if_netconsole=ping $serverip
preboot_nc=run if_netconsole start_netconsole
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version
usb_set_bootargs=setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootdelay=10
uinitrd_addr=0x60e00000
uimage_addr=0x60500000
dtb_addr=0x62c00000
dt_load_dtb=ext2load usb 0:1 $dtb_addr /boot/dts/ox820-pogoplug-pro.dtb
dt_load_initrd=ext2load usb 0:1 $uinitrd_addr /boot/uInitrd
dt_load_uimage=ext2load usb 0:1 $uimage_addr /boot/uImage
dt_bootm=bootm $uimage_addr $uinitrd_addr $dtb_addr
dt_usb_boot=run dt_load_uimage; run dt_load_initrd; run dt_load_dtb; run dt_bootm
dt_usb_bootcmd=run usb_set_bootargs; run dt_usb_boot
dt_bootcmd_usb=usb start; run dt_usb_bootcmd; usb stop; reset
bootcmd=run dt_bootcmd_usb
Re: First try woes: Debian on the PogoPlug Pro
May 24, 2017 01:24PM
cdlenfert,


At this point, meaning right after you execute fw_printenv in the instruction:

[root@PogoplugPro /root]# /tmp/fw_printenv


Run these 2 commands, so I can see why the fw_printenv did not print correct values:

cat /etc/fw_env.config
cat /proc/mtd

-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
Re: First try woes: Debian on the PogoPlug Pro
May 24, 2017 02:25PM
I don't think I can work through the instructions (at least I'm not sure how I would) because I'm only able to access the u-boot console when connected via serial/UART. When I try anything like fw_printenv the result is an unknown command. Is there some other way I should be connecting or getting additional capabilities outside of the u-boot console?
OX820> /tmp/fw_printenv
Unknown command '/tmp/fw_printenv' - try 'help'
Re: First try woes: Debian on the PogoPlug Pro
May 25, 2017 01:42AM
cdlenfert,

> Can I use setenv to update my u-boot envs to match
> the following and get the PogoPro to boot from my
> USB? Would changes be necessary to since I set up
> an older version using Qui's guide? I was looking
> at this thread which made me hopefully (I realize
> it's for a different hardware, but hoping the proc
> ess could work) - http://forum.doozan.com/read.php
> ?3,16129
>
> My printenv
>
> baudrate=115200
> bootcmd=bootp; setenv bootargs root=/dev/nfs nfsro
> ot=${serverip}:${rootpath} ip=${ipaddr}:${serm
> bootdelay=5
> dt_load_dtb=ext2load usb 0:1 $dtb_addr $fdt_file
> ethact=mii0
> ethaddr=00:25:31:00:f7:fd
> fdt_file=/boot/dts/ox820-pogoplug-classic.dtb
> ipaddr=192.168.0.54
> preboot=run preboot_nc
> serverip=192.168.0.32
> stderr=serial
> stdin=serial
> stdout=serial
> 
> Environment size: 444/131068 bytes
>
>
> And modify it to mach your fw_printenv from - http
> ://forum.doozan.com/read.php?3,16017
>
> autoload=no
> baudrate=115200
> bootargs=console=ttyS0,115200n8
> bootdelay=10
> console=console=ttyS0,115200n8
> ethact=mii0
> ethaddr=5e:2b:15:71:ec:b6
> ipaddr=192.168.0.222
> mtdids=nand0=41000000.nand
> mtdparts=mtdparts=41000000.nand:14m(boot),-(data)
> serverip=192.168.0.220
> stderr=serial
> stdin=serial
> stdout=serial
> usb_device=0:1
> if_netconsole=ping $serverip
> preboot_nc=run if_netconsole start_netconsole
> start_netconsole=setenv ncip $serverip; setenv boo
> tdelay 10; setenv stdin nc; setenv stdout nc; sete
> nv stderr nc; version
> usb_set_bootargs=setenv bootargs console=ttyS0,115
> 200 root=/dev/sda1 rootdelay=10
> uinitrd_addr=0x60e00000
> uimage_addr=0x60500000
> dtb_addr=0x62c00000
> dt_load_dtb=ext2load usb 0:1 $dtb_addr /boot/dts/o
> x820-pogoplug-pro.dtb
> dt_load_initrd=ext2load usb 0:1 $uinitrd_addr /boo
> t/uInitrd
> dt_load_uimage=ext2load usb 0:1 $uimage_addr /boot
> /uImage
> dt_bootm=bootm $uimage_addr $uinitrd_addr $dtb_add
> r
> dt_usb_boot=run dt_load_uimage; run dt_load_initrd
> ; run dt_load_dtb; run dt_bootm
> dt_usb_bootcmd=run usb_set_bootargs; run dt_usb_bo
> ot
> dt_bootcmd_usb=usb start; run dt_usb_bootcmd; usb
> stop; reset
> bootcmd=run dt_bootcmd_usb
>

Yes, this is the right approach. Since you mentioned above you can only do this in u-boot console. So you could use setenv in u-boot console to set each one of these

autoload=no
baudrate=115200
bootargs=console=ttyS0,115200n8
bootdelay=10
console=console=ttyS0,115200n8
ethact=mii0
ethaddr=5e:2b:15:71:ec:b6
ipaddr=192.168.0.222
mtdids=nand0=41000000.nand
mtdparts=mtdparts=41000000.nand:14m(boot),-(data)
serverip=192.168.0.220
stderr=serial
stdin=serial
stdout=serial
usb_device=0:1
if_netconsole=ping $serverip
preboot_nc=run if_netconsole start_netconsole
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version
usb_set_bootargs=setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootdelay=10
uinitrd_addr=0x60e00000
uimage_addr=0x60500000
dtb_addr=0x62c00000
dt_load_dtb=ext2load usb 0:1 $dtb_addr /boot/dts/ox820-pogoplug-pro.dtb
dt_load_initrd=ext2load usb 0:1 $uinitrd_addr /boot/uInitrd
dt_load_uimage=ext2load usb 0:1 $uimage_addr /boot/uImage
dt_bootm=bootm $uimage_addr $uinitrd_addr $dtb_addr
dt_usb_boot=run dt_load_uimage; run dt_load_initrd; run dt_load_dtb; run dt_bootm
dt_usb_bootcmd=run usb_set_bootargs; run dt_usb_boot
dt_bootcmd_usb=usb start; run dt_usb_bootcmd; usb stop; reset
bootcmd=run dt_bootcmd_usb

For example,

setenv bootcmd 'run dt_bootcmd_usb'
setenv mtdparts 'mtdparts=41000000.nand:14m(boot),-(data)'

Note that I used a single quote before and after the string so that the embedded spaces and embedded = sign are literals.

-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
Re: First try woes: Debian on the PogoPlug Pro
May 25, 2017 12:07PM
Edit: Please skip this post, I got the PogoPro to boot into Debian on the USB by re-entering the u-boot setenv commands. The only difference in getting it to work was updating the pogo IP in the envs settings, and the server IP, and then I did a 'saveenv" so I wouldn't have to put in all these commands again. I've got root access on debian. My question now is, will it boot successfully again after I unplug and re-attach to my router? Doing so will change the pogo's IP address. The reason why it changed in the first place was because I needed the pogo to be close to my mac to connect serial, which would be more difficult in the location where the router is easily accessible.
_____

Thanks Bodhi, here's my results including my printenv after setting the variables and the result of sending a 'reset' command to trigger the boot process. Unfortunately I wasn't able to boot into debian on the usb. Should I have to do 'savenv' after entering these commands in u-boot console? checking 'printenv' after the failed boot, they've reverted back to my old env settings. Could I have put in the wrong new env settings considering I'm trying to boot an older version of debian? Thanks again for your direction, I'm enjoying learning about this stuff, but obviously still have a long way to go.
##**NewEnvs**##

autoload=no
baudrate=115200
bootargs=console=ttyS0,115200n8
bootcmd=run dt_bootcmd_usb
bootdelay=5
console=console=ttyS0,115200n8
dt_bootcmd_usb=usb start; run dt_usb_bootcmd; usb stop; reset
dt_load_dtb=ext2load usb 0:1 $dtb_addr /boot/dts/ox820-pogoplug-pro.dtb
dt_usb_boot=run dt_load_uimage; run dt_load_initrd; run dt_load_dtb; run dt_bootm
dt_usb_bootcmd=run usb_set_bootargs; run dt_usb_boot
dtb_addr=0x62c00000
ethact=mii0
ethaddr=00:25:31:00:f7:fd
fdt_file=/boot/dts/ox820-pogoplug-classic.dtb
if_netconsole=ping $serverip
ipaddr=192.168.0.54
mtdids=nand0=41000000.nand
mtdparts=mtdparts=41000000.nand:14m(boot),-(data)
preboot=run preboot_nc
preboot_nc=run if_netconsole start_netconsole
serverip=192.168.0.32
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc;n
stderr=serial
stdin=serial
stdout=serial
uimage_addr=0x60500000
uinitrd_addr=0x60e00000
usb_device=0:1
usb_set_bootargs=setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootdelay=10

Environment size: 1086/131068 bytes

##***Boot Log**##

resetting ...

U-Boot SPL 2013.10-tld-4 (Sep 07 2014 - 14:10:12)
  Boot device: NAND
Attempting to set PLLA to 850 MHz ...
  plla_ctrl0 : 0000020a
  plla_ctrl1 : 00330000
  plla_ctrl2 : 0065008b
  plla_ctrl3 : 000000f1

PLLA Set


U-Boot 2013.10-tld-4 (Sep 08 2014 - 19:43:38) for OXNAS

DRAM:  128 MiB
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   
Led:    GREEN
mii0
Main Loop
## Error: "preboot_nc" not defined
Hit any key to stop autoboot:  0 
Waiting for PHY auto negotiation to complete... done
ENET Speed is 1000 Mbps - FULL duplex connection
BOOTP broadcast 1
DHCP client bound to address 192.168.2.4
*** Warning: no boot file name; using 'C0A80204.img'
Using mii0 device
TFTP from server 192.168.2.1; our IP address is 192.168.2.4
Filename 'C0A80204.img'.
Load address: 0x60000000
Loading: T T T T T T T T T T 
Retry count exceeded; starting again
BOOTP broadcast 1
DHCP client bound to address 192.168.2.4
*** Warning: no boot file name; using 'C0A80204.img'
Using mii0 device
TFTP from server 192.168.2.1; our IP address is 192.168.2.4
Filename 'C0A80204.img'.
Load address: 0x60000000
Loading: T 
Abort

Led:    ORANGE (Failed)
Wrong Image Format for bootm command

Led:    ORANGE (Failed)
ERROR: can't get kernel image!



Edited 1 time(s). Last edit at 05/25/2017 12:39PM by cdlenfert.
Re: First try woes: Debian on the PogoPlug Pro
May 25, 2017 01:12PM
cdlenfert,

>Please skip this post, I got the PogoPro to
> boot into Debian on the USB by re-entering the u-b
> oot setenv commands. The only difference in gettin
> g it to work was updating the pogo IP in the envs
> settings, and the server IP, and then I did a 'sav
> eenv" so I wouldn't have to put in all these comma
> nds again. I've got root access on debian.

Cool!


> My question now is, will it boot successfully again after
> I unplug and re-attach to my router?

Yes.

> Doing so will
> change the pogo's IP address. The reason why it ch
> anged in the first place was because I needed the
> pogo to be close to my mac to connect serial, whic
> h would be more difficult in the location where th
> e router is easily accessible.

The IP won't change if you use static IP (in /etc/netowrk/interfaces).

And when you use dynamic IP (it is default setting in the rootfs), you can always use its name (debian.local) to login. For example,

ssh root@debian.local

-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
Re: First try woes: Debian on the PogoPlug Pro
May 25, 2017 07:16PM
Well I greatly appreciate all the help getting the boot botch sorted out.

Edit: Please ignore the stuff below. The reason I couldn't SSH into the Pogo was that I hooked up another external drive and I'm guessing it didn't know where to look for rootfs. I'll have to see how to remedy that later. For now, all is good with the wifi connection. I am still curious if I need to change the u-boot envs that specify the ethernet IP address, or was that just for netconsole use?

Here's where I'm currently at.

After updating and configuring Debian (including wifi configuration), I was able to reboot with the same ethernet connection and ehternet and wifi were able to connect and get valid IPs.

However after disconnecting the ethernet and booting, the wifi failed to connect to my network.

Is this because of the manual ethernet IP I designated in the u-boot envs while the pogo was tethered to my mac?

How do I get this thing to boot and connect to my network solely on wifi?



Edited 1 time(s). Last edit at 05/25/2017 10:25PM by cdlenfert.
Re: First try woes: Debian on the PogoPlug Pro
May 25, 2017 10:53PM
cdlenfert,

This wifi/ethernet is a common problem with the Pogo Pro. I'll find the post where you can follow to set it up correctly.

-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
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: