Thank you for replying, plz give me some to time to digest this
@bobafetthotmail
Are you still here? So sorry it took so long, i tried to modify boot environment but ended with no boot, neither Openwrt booted nor ArchLinux. Had to acquire serial cable to correct so at least ArchLinux boots again. Here is my boot environment, would you be so kind to help me modify it for Openwrt? Should I ask developers maybe? That wiki warning I guess means nobody verified new kwb uboot image is working on Pogo E02?
ethact=egiga0
bootdelay=3
baudrate=115200
mainlineLinux=yes
led_init=green blinking
led_exit=green off
led_error=orange blinking
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
mtdids=nand0=orion_nand
partition=nand0,2
stdin=serial
stdout=serial
stderr=serial
rescue_installed=0
rescue_set_bootargs=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts $rescue_custom_params
rescue_bootcmd=if test $rescue_installed -eq 1; then run rescue_set_bootargs; nand read.e 0x800000 0x100000 0x400000; bootm 0x800000; else run pogo_bootcmd; fi
pogo_bootcmd=if fsload uboot-original-mtd0.kwb; then go 0x800200; fi
force_rescue=0
force_rescue_bootcmd=if test $force_rescue -eq 1 || ext2load usb 0:1 0x1700000 /rescueme 1 || fatload usb 0:1 0x1700000 /rescueme.txt 1; then run rescue_bootcmd; fi
ubifs_mtd=3
ubifs_set_bootargs=setenv bootargs console=$console ubi.mtd=$ubifs_mtd root=ubi0:rootfs rootfstype=ubifs $mtdparts $ubifs_custom_params
ubifs_bootcmd=run ubifs_set_bootargs; if ubi part data && ubifsmount rootfs && ubifsload 0x800000 /boot/uImage && ubifsload 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; fi
usb_scan=usb_scan_done=0;for scan in $usb_scan_list; do run usb_scan_$scan; if test $usb_scan_done -eq 0 && ext2load usb $usb 0x800000 /boot/uImage 1; then usb_scan_done=1; echo "Found bootable drive on usb $usb"; setenv usb_device $usb; setenv usb_root /dev/$dev; fi; done
usb_scan_list=1 2 3 4
usb_scan_1=usb=0:1 dev=sda1
usb_scan_2=usb=1:1 dev=sdb1
usb_scan_3=usb=2:1 dev=sdc1
usb_scan_4=usb=3:1 dev=sdd1
usb_init=run usb_scan
usb_device=0:1
usb_root=/dev/sda1
usb_rootfstype=ext2
usb_rootdelay=10
usb_set_bootargs=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params
usb_bootcmd=run usb_init; run usb_set_bootargs; run usb_boot
usb_boot=mw 0x800000 0 1; ext2load usb $usb_device 0x800000 /boot/uImage; if ext2load usb $usb_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
bootcmd=usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run rescue_bootcmd; run pogo_bootcmd; reset
ethaddr=00:25:xx:xx:xx:xx
arcNumber=3542
machid=dd6
serverip=192.168.1.30
ipaddr=192.168.1.20
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
===============================================
# nc -lup 6666
U-Boot 2011.12 (Feb 20 2012 - 21:21:59)
Pogoplug E02
arm-none-linux-gnueabi-gcc (Sourcery G++ Lite 2009q3-67) 4.4.1
GNU ld (Sourcery G++ Lite 2009q3-67) 2.19.51.20090709
Hit any key to stop autoboot: 0
u-boot>>
u-boot>>
u-boot>>
u-boot>> help
help
? - alias for 'help'
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'
bootm - boot application image from memory
bootp - boot image via network using BOOTP/TFTP protocol
chpart - change active partition
cmp - memory compare
coninfo - print console devices and information
cp - memory copy
crc32 - checksum calculation
dhcp - boot image via network using DHCP/TFTP protocol
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 /)
false - do nothing, unsuccessfully
fatinfo - print information about filesystem
fatload - load binary file from a dos filesystem
fatls - list files in a directory (default /)
fsinfo - print information about filesystems
fsload - load binary file from a filesystem image
go - start application at address 'addr'
help - print command description/usage
iminfo - print header information for application image
imxtract- extract a part of a multi-image
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
ls - list files in a directory (default /)
md - memory display
mii - MII utility commands
mm - memory modify (auto-incrementing address)
mtdparts- define flash/nand partitions
mtest - simple RAM read/write test
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
reset - Perform RESET of the CPU
run - run commands in an environment variable
saveenv - save environment variables to persistent storage
setenv - set environment variables
showvar - print local hushshell variables
sleep - delay execution for some time
source - run script from memory
test - minimal test like /bin/sh
tftpboot- boot image via network using TFTP protocol
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
usb - USB sub-system
usbboot - boot from USB device
version - print monitor, compiler and linker version
u-boot>> help nand
help nand
nand - NAND sub-system
Usage:
nand info - show available NAND devices
nand device [dev] - show or set current device
nand read - addr off|partition size
nand write - addr off|partition size
read/write 'size' bytes starting at offset 'off'
to/from memory address 'addr', skipping bad blocks.
nand read.raw - addr off|partition
nand write.raw - addr off|partition
Use read.raw/write.raw to avoid ECC and access the page as-is.
nand erase[.spread] [clean] off size - erase 'size' bytes from offset 'off'
With '.spread', erase enough for given file size, otherwise,
'size' includes skipped bad blocks.
nand erase.part [clean] partition - erase entire mtd partition'
nand erase.chip [clean] - erase entire chip'
nand bad - show bad blocks
nand dump[.oob] off - dump page
nand scrub [-y] off size | scrub.part partition | scrub.chip
really clean NAND erasing bad blocks (UNSAFE)
nand markbad off [...] - mark bad block(s) at offset (UNSAFE)
nand biterr off - make a bit error at offset (UNSAFE)
u-boot>> reset
reset
resetting ...
U-Boot 2011.12 (Feb 20 2012 - 21:21:59)
Pogoplug E02
arm-none-linux-gnueabi-gcc (Sourcery G++ Lite 2009q3-67) 4.4.1
GNU ld (Sourcery G++ Lite 2009q3-67) 2.19.51.20090709
Hit any key to stop autoboot: 0
(Re)start USB...
USB: Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 2 USB Device(s) found
scanning bus for storage devices... 0 Storage Device(s) found
** Block device usb 0 not supported
** Invalid boot device **
Creating 1 MTD partitions on "nand0":
0x000002500000-0x000008000000 : "mtd=3"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size: 131072 bytes (128 KiB)
UBI: logical eraseblock size: 129024 bytes
UBI: smallest flash I/O unit: 2048
UBI: sub-page size: 512
UBI: VID header offset: 512 (aligned 512)
UBI: data offset: 2048
UBI: attached mtd1 to ubi0
UBI: MTD device name: "mtd=3"
UBI: MTD device size: 91 MiB
UBI: number of good PEBs: 728
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: 0
UBI: available PEBs: 717
UBI: total number of reserved PEBs: 11
UBI: number of PEBs reserved for bad PEB handling: 7
UBI: max/mean erase counter: 1/1
UBIFS error (pid 0): ubifs_get_sb: cannot open "ubi:rootfs", error -19
Error reading superblock on volume 'ubi:rootfs'!
** Block device usb 0 not supported
** Block device usb 1 not supported
** Block device usb 2 not supported
** Block device usb 3 not supported
** Block device usb 0 not supported
** Block device usb 0 not supported
Wrong Image Format for bootm command
ERROR: can't get kernel image!
stopping USB..
### JFFS2 loading 'uboot-original-mtd0.kwb' to 0x800000
Scanning JFFS2 FS: ....... read_nand_cached: error reading nand off 0xd40000 size 8192 bytes
. done.
### JFFS2 load complete: 524288 bytes loaded to 0x800000
## Starting application at 0x00800200 ...
Yeah I'm not going anywhere.
The wiki warning means that I tried to boot OpenWrt image from flash with bodhi's uboot using the same commands the OpenWrt Uboot uses (which should result in the same action), and it always failed to boot properly while if I booted the initramfs image (ram-only, loaded from a USB drive) it worked but I can't use that for a true system.
I never flashed openwrt uboot file because as I said this device cannot be recovered if it's bad. The kirkwood target has been neglected for years before the LEDE split (release 17.something) and changes were not tested for 4-5 years on this device.
I'll tell you how to change the current uboot configuration to boot both Arch and OpenWrt, since it seems that your uboot has the right commands to do so (the ubifs commands).
I am assuming you have your Arch on a USB drive because OpenWrt needs to use the whole flash space for itself (apart from uboot partitions), so we start with changing the flash partitioning with
setenv mtdparts 'mtdparts=orion_nand:0xe0000@0x0(uboot),0x20000@0xe0000(uboot_env),0x100000@0x100000(second_stage_uboot),-@0x200000(ubi)'
this changes boot command to try booting OpenWrt if it cannot find Arch (so remove USB drive with Arch if you want to boot OpenWrt), and removes the hook for the "try to boot Arch from ubifs/flash" command as now there is OpenWrt there. I also remove the "boot original pogoplug firmware" hook for the same reason.
setenv bootcmd 'usb start; run force_rescue_bootcmd; run usb_bootcmd; usb stop; run rescue_bootcmd; run openwrt_bootcmd; reset
now we set down the openwrt bootcommand where we start with temporarily clearing a bunch of stuff that we don't want when booting OpenWrt (the changes done when booting OpenWrt are not saved so after a reboot the uboot can still boot Arch), we set the right environment to boot, and then proceed with OpenWrt boot
setenv openwrt_bootcmd 'setenv arcNumber ; setenv machid ; setenv bootargs_root; setenv bootargs console=ttyS0,115200 ; ubi part ubi; ubifsmount ubi:rootfs; ubi read 0x800000 kernel; bootm 0x800000'
then you save the modified config
saveenv
Then to install the firmware on flash on a kirkwood device I usually boot the OpenWrt initramfs image, so get a USB drive, format it with FAT32 and put the
openwrt-18.06.4-kirkwood-cloudengines_pogoe02-initramfs-uImage file (the one I used, if you want to take the 19.07 one it's ok too), rename it to "openwrt" and then type these commands from the uboot console to boot it manually. I rename the file to keep the commands simple and short.
usb reset
fatload usb 0:1 0x800000 openwrt
bootm 0x800000
After that you should see OpenWrt booting, but this is a RAM-only system, it's not saved to flash. So now you connect to it with the web interface and do a firmware upgrade as normal, this should make the OpenWrt system reformat the internal flash and write the firmware. It shouldn't touch primary uboot partition as it is marked as "read-only" in OpenWrt firmware so even if it does something wrong you are not bricking the device.
Thank you for replying! Probably I have better understanding now. In wiki there are some confusing parts, probably typos, such as Openwrt flash layout size for mtd1 should be 0x20000, and I could not figure nand.write.e command.
I have this as if nand write.e was not available in my bootloader. Also mtdparts command looks differently. Anyway please bear with me I will try your approach hopefully today
u-boot>> help nand
help nand
nand - NAND sub-system
Usage:
nand info - show available NAND devices
nand device [dev] - show or set current device
nand read - addr off|partition size
nand write - addr off|partition size
read/write 'size' bytes starting at offset 'off'
to/from memory address 'addr', skipping bad blocks.
nand read.raw - addr off|partition
nand write.raw - addr off|partition
Use read.raw/write.raw to avoid ECC and access the page as-is.
nand erase[.spread] [clean] off size - erase 'size' bytes from offset 'off'
With '.spread', erase enough for given file size, otherwise,
'size' includes skipped bad blocks.
nand erase.part [clean] partition - erase entire mtd partition'
nand erase.chip [clean] - erase entire chip'
nand bad - show bad blocks
nand dump[.oob] off - dump page
nand scrub [-y] off size | scrub.part partition | scrub.chip
really clean NAND erasing bad blocks (UNSAFE)
nand markbad off [...] - mark bad block(s) at offset (UNSAFE)
nand biterr off - make a bit error at offset (UNSAFE)
u-boot>>
I'm looking at source of the OpenWrt build system so that's the most likely to be true.
commands given in the wiki are for old uboot (stock uboot), newer uboots have slightly different commands. For example you can erase and write to partition names (as denfined in mtdparts) instead of by address.
Anyway, you don't care about nand write commands as the flashing will be done by OpenWrt's initramfs system when you do the firmware upgrade.
Checking again the source, it seems OpenWrt does not have a dedicated Pogoplug E02 dts patch to change the partitions from the upstream file (this is the upstream file in Linux mainline https://github.com/torvalds/linux/blob/master/arch/arm/boot/dts/kirkwood-pogo_e02.dts )
(see the block of stuff after &nand )
This is kind of weird and it could explain why it didn't boot correctly from flash for me, I didn't notice this.
So you probably need to provide the mtdparts too in the boot command and hope it will take these mdtparts instead of the ones defined in the dts.
setenv openwrt_bootcmd 'setenv arcNumber ; setenv machid ; setenv bootargs_root; setenv bootargs console=ttyS0,115200 $mtdparts; ubi part ubi; ubifsmount ubi:rootfs; ubi read 0x800000 kernel; bootm 0x800000'
the commands to boot the OpenWrt initramfs image must be also changed so it gets the different mtdparts (so when it is installing this to flash it will do it in the right place)
usb reset
fatload usb 0:1 0x800000 openwrt
setenv bootargs console=ttyS0,115200 $mtdparts
bootm 0x800000
if this does not work please let me know and I'll patch that file to have the right partitions, compile a firmware and initramfs and try again on my own Pogo E02. I have a strong suspicion that this was the culprit the last time I tried.
I will.
No need for me to flash secondary bootloader right?
I will lose pogo orignal firmware once I do sysupgrade from openwrt in RAM but that is expected?
No you don't need it.
The secondary bootloader is needed only for stock bootloader that cannot boot OpenWrt.
The Arch bootloader you have is good enough to boot OpenWrt if you change the config as I said.
The partition for secondary uboot will be wasted, but it's around 1 MB and you still have 126MB or so anyway, no big deal.
Yes, OpenWrt will replace the stock firmware, in most cases OpenWrt replaces original firmware.
Pogoplugs were bound to a cloud account and service, afaik their cloud service does not use them anymore, so the stock firmware (and the device) has no real use now.
You can back them up though, if you are using OpenWrt 19.07 release you can use the web interface to do it.
After you have booted the OpenWrt initramfs image, BEFORE doing the firmware upgrade you can back up the partitions of the stock firmware from the same page you use for firmware upgrade, or use commandline with nandread (not dd, this is raw flash) and a USB drive formatted with ext4.
@bobafetthotmail
openwrt flash layout uses slightly different names for partitions:
u-boot
u-boot env
second_stage_u-boot
rootfs
does this matter I use yours?
The wiki is outdated on this device. The only partition name that matters for OpenWrt is the name of the last partition. "ubi" is what it expects to boot correctly (this is correct in my instructions). Other partitions are not used or not modified by it.
Other devices like Zyxel 325 and 310 and PogoPlug v4 also use the same name for their firmware partition. It is a UBI volume containing a kernel blob called "kernel", a squashfs root called "rootfs" and a read-write ubifs partition.
Worked, ran initramfs from usb stick and flashed sysupgrade from Luci, cpuinfo does not show device model unlike on ArchLinux, because of missing arcNumber, machid?
I will now poweroff device?
root@OpenWrt:~# uname -a
Linux OpenWrt 4.14.167 #0 Wed Jan 29 16:05:35 2020 armv5tel GNU/Linux
root@OpenWrt:~# cat /proc/cpuinfo
processor : 0
model name : Feroceon 88FR131 rev 1 (v5l)
BogoMIPS : 400.00
Features : swp half fastmult edsp
CPU implementer : 0x56
CPU architecture: 5TE
CPU variant : 0x2
CPU part : 0x131
CPU revision : 1
Hardware : Marvell Kirkwood (Flattened Device Tree)
Revision : 0000
Serial : 0000000000000000
root@OpenWrt:~# df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 1.8M 1.8M 0 100% /rom
tmpfs 123.7M 284.0K 123.4M 0% /tmp
/dev/ubi0_2 108.3M 44.0K 103.6M 0% /overlay
overlayfs:/overlay 108.3M 44.0K 103.6M 0% /
tmpfs 512.0K 0 512.0K 0% /dev
root@OpenWrt:~# cat /proc/mtd
dev: size erasesize name
mtd0: 000e0000 00020000 "uboot"
mtd1: 00020000 00020000 "uboot_env"
mtd2: 00100000 00020000 "second_stage_uboot"
mtd3: 07e00000 00020000 "ubi"
From ArchLinux ARM
[root@alarm ~]# cat /proc/cpuinfo
processor : 0
model name : Feroceon 88FR131 rev 1 (v5l)
BogoMIPS : 1191.11
Features : swp half thumb fastmult edsp
CPU implementer : 0x56
CPU architecture: 5TE
CPU variant : 0x2
CPU part : 0x131
CPU revision : 1
Hardware : Pogoplug E02
Revision : 0000
Serial : 0000000000000000
[root@alarm ~]#
all OpenWrt devices are using Flattened Device Tree to specify the hardware specifications, arcNumber and machid are not used anymore.
I don't know if what you see in cpuid is correct or not as I never checked mine.
root@OpenWrt:~# cat /proc/mtd
dev: size erasesize name
mtd0: 000e0000 00020000 "uboot"
mtd1: 00020000 00020000 "uboot_env"
mtd2: 00100000 00020000 "second_stage_uboot"
mtd3: 07e00000 00020000 "ubi"
This is good, it seems the mtdparts override worked, these are the mtdparts we wanted.
Try rebooting and see if it boots correctly.
@bobafetthotmail
There are some errors but boots and seems ok.
I do not have any usb devices but says it found 2.
Hit any key to stop autoboot: 0
(Re)start USB...
USB: Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 2 USB Device(s) found
scanning bus for storage devices... 0 Storage Device(s) found
** Block device usb 0 not supported
** Invalid boot device **
** Block device usb 0 not supported
** Block device usb 1 not supported
** Block device usb 2 not supported
** Block device usb 3 not supported
** Block device usb 0 not supported
** Block device usb 0 not supported
Wrong Image Format for bootm command
ERROR: can't get kernel image!
stopping USB..
### JFFS2 loading 'uboot-original-mtd0.kwb' to 0x800000
Scanning JFFS2 FS: read_nand_cached: error reading nand off 0x100000 size 8192 bytes
read_nand_cached: error reading nand off 0x102000 size 8192 bytes
read_nand_cached: error reading nand off 0x104000 size 8192 bytes
read_nand_cached: error reading nand off 0x106000 size 8192 bytes
read_nand_cached: error reading nand off 0x108000 size 8192 bytes
read_nand_cached: error reading nand off 0x10a000 size 8192 bytes
read_nand_cached: error reading nand off 0x10c000 size 8192 bytes
read_nand_cached: error reading nand off 0x10e000 size 8192 bytes
read_nand_cached: error reading nand off 0x110000 size 8192 bytes
read_nand_cached: error reading nand off 0x112000 size 8192 bytes
read_nand_cached: error reading nand off 0x114000 size 8192 bytes
read_nand_cached: error reading nand off 0x116000 size 8192 bytes
read_nand_cached: error reading nand off 0x118000 size 8192 bytes
read_nand_cached: error reading nand off 0x11a000 size 8192 bytes
read_nand_cached: error reading nand off 0x11c000 size 8192 bytes
read_nand_cached: error reading nand off 0x11e000 size 8192 bytes
done.
find_inode failed for name=uboot-original-mtd0.kwb
load: Failed to find inode
### JFFS2 LOAD ERROR<0> for uboot-original-mtd0.kwb!
Creating 1 MTD partitions on "nand0":
0x000000200000-0x000008000000 : "mtd=3"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size: 131072 bytes (128 KiB)
UBI: logical eraseblock size: 129024 bytes
UBI: smallest flash I/O unit: 2048
UBI: sub-page size: 512
UBI: VID header offset: 512 (aligned 512)
UBI: data offset: 2048
UBI: attached mtd1 to ubi0
UBI: MTD device name: "mtd=3"
UBI: MTD device size: 126 MiB
UBI: number of good PEBs: 1007
UBI: number of bad PEBs: 1
UBI: max. allowed volumes: 128
UBI: wear-leveling threshold: 4096
UBI: number of internal volumes: 1
UBI: number of user volumes: 3
UBI: available PEBs: 9
UBI: total number of reserved PEBs: 998
UBI: number of PEBs reserved for bad PEB handling: 10
UBI: max/mean erase counter: 2/1
UBIFS error (pid 0): ubifs_get_sb: cannot open "ubi:ubi:rootfs", error -19
Error reading superblock on volume 'ubi:ubi:rootfs'!
Read 0 bytes from volume kernel to 00800000
No size specified -> Using max size (2193408)
## Booting kernel from Legacy Image at 00800000 ...
Image Name: ARM OpenWrt Linux-4.14.167
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2078730 Bytes = 2 MiB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ...
How to start failsafe mode on these devices?
ok never mind - says in wiki.
Thank you very much for your patience and help.
Hopefully Openwrt will give new life to these devices.
Clearly I own you Bob at least a beer!
Is that email in your nick valid one?
the errors you see are normal, your bootloader is set for "poor man multiboot".
The bootloader tries to boot Arch from USB, if not found gives an error, then tries recovery boot from Arch, not found and gives error, and at the end boots OpenWrt.
If you plug in your Arch USB drive and reboot it should boot Arch.
the email in my profile is real, yes. it's a gmail
It looks as failsafe mode can be entered only from serial console, not from netconsole, which is kind of inconvenient.
would i be able to mount mtd3 partition under Arch Linux?
I mean if I lock myself so I can mount mtd3 and repair config files or reset password?
Let's say I boot Archlinux from usb stick, would this work to access mtd3?
ubiattach -p /dev/mtd3
mount -t ubifs ubi0:ubi /mount/point
All devices without a reset button have the same problem.
I'm not sure it will work, I never tried it. You would want to attach the UBI volume, list partitions and then mount the read-write ubifs partition though. As I said there are 3 partitions in the UBI.
You need to list volumes with ubinfo -a and find out the name of the third partition, as that is the read-write partition and know that this is an overlay over the root filesystem, so only files you changed from default system will be present.
There is some information here http://trac.gateworks.com/wiki/linux/ubi (these devices are using OpenWrt, maybe older than current version, as their stock firmware so the info is more or less useful).
A different approach to the problem (what I do) is to just have serial console permanently attached to all my devices, I bought a bunch of tiny usb-UART boards with female mini-USB ports and drilled a small hole in the case, I soldered wires to the UART pins and then glued the small thing in place so it is accessible from the hole (so I can plug a USB cable in the port).
Cisco and all serious equipment has a serial port, so why can't I do the same, right?
Another possibility is using a panel stereo audio jack to provide a more discreet serial port interface (and you will have to solder a male audio jack on your USB-UART dongle to connect to it).
yes thank you, i will look later:
/dev/ubi0_2 on /overlay type ubifs (rw,noatime,ubi=0,vol=2)
other problem, fw_printenv does not read mtd1 uboot_env but this does not seem to break anything:
root@OpenWrt: ~fw_printenv
Warning: Bad CRC, using default environment
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=5
baudrate=115200
Afaik OpenWrt on this device does not need to look at uboot envs, the MAC address is set by the bootloader.
If you want to use that from OpenWrt you need to set the correct place where your uboot envs are. The Arch uboot does not keep them in the same place.
copy the contents of /etc/fw_env.config from the Arch installation (I assume fw_printenv works in your Arch drive) and copy that in OpenWrt, then it should work.
Hi, I'm bring to life this thread after so many years, because I had some Pogoplug Mobile (Series 4) laying around getting dust on some drawer here and I wanted to give them life again, currently they have OpenWrt Chaos Calmer 15.05.1
I want to be able to upgrade to OpenWRT 20 and if it is possible to preserve capability to boot to an sd card with Debian (I just was able to boot to 10-Buster with https://github.com/susamn/debian-10-buster-pogoplug-v4)
Can someone point me out how to proceed to upgrade OpenWRT 20 ?
I managed to printenv vars from current uboot:
opkg install uboot-envtools
root@PogoPlug:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00100000 00020000 "u-boot"
mtd1: 07f00000 00020000 "rootfs"
root@PogoPlug:~# cat<<'EOF' > /etc/fw_env.config
# MTD device name Device offset Env. size Flash sector size Number of sectors
/dev/mtd0 0xc0000 0x20000 0x20000
EOF
root@PogoPlug:~# fw_printenv
ipaddr=192.168.0.231
serverip=192.168.0.220
baudrate=115200
bootcmd_mmc=run mmc_init; run set_bootargs_mmc; run mmc_boot
bootcmd_sata=run sata_init; run set_bootargs_sata; run sata_boot;
bootcmd_usb=run usb_init; run set_bootargs_usb; run usb_boot;
bootdelay=10
console=ttyS0,115200
device=0:1
ethact=egiga0
if_netconsole=ping $serverip
led_error=orange blinking
led_exit=green off
led_init=green blinking
mainlineLinux=yes
mmc_boot=mw 0x800000 0 1; run mmc_load_uimage; if run mmc_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
mmc_init=mmc rescan
mmc_load_uimage=ext2load mmc $device 0x800000 /boot/uImage
mmc_load_uinitrd=ext2load mmc $device 0x1100000 /boot/uInitrd
mmc_root=/dev/mmcblk0p1
mtdids=nand0=orion_nand
partition=nand0,2
preboot_nc=run if_netconsole start_netconsole
rootdelay=10
rootfstype=ext3
sata_boot=mw 0x800000 0 1; run sata_load_uimage; if run sata_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
sata_init=ide reset
sata_load_uimage=ext2load ide $device 0x800000 /boot/uImage
sata_load_uinitrd=ext2load ide $device 0x1100000 /boot/uInitrd
sata_root=/dev/sda1
set_bootargs_mmc=setenv bootargs console=$console root=$mmc_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
set_bootargs_sata=setenv bootargs console=$console root=$sata_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
set_bootargs_usb=setenv bootargs console=$console root=$usb_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
usb_boot=mw 0x800000 0 1; run usb_load_uimage; if run usb_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
usb_init=usb start
usb_load_uimage=ext2load usb $device 0x800000 /boot/uImage
usb_load_uinitrd=ext2load usb $device 0x1100000 /boot/uInitrd
usb_root=/dev/sda1
ethaddr=00:25:31:xx:xx:xx
arcNumber=3960
machid=F78
usb_rootfstype=ext3
bootcmd_pogo=if ubi part root 2048 && ubifsmount ubi:rootfs && ubifsload 0x800000 uboot.mtd0.dockstar.original.kwb ; then go 0x800200; fi
mtdparts=mtdparts=orion_nand:1M(u-boot),-(rootfs)
fdt_file=/boot/kirkwood-pogoplug_v4.dtb
loadaddr=0x800000
zimage=/boot/zImage
fdt_addr=0x1c00000
loadubi=echo Trying to boot from NAND ...;if run mountubi; then run loadubizimage;run loadubifdt;ubifsumount;run bootzubi;fi
mountubi=ubi part rootfs; ubifsmount ubi0:rootfs
loadubizimage=ubifsload ${loadaddr} ${zimage}
loadubifdt=ubifsload ${fdt_addr} ${fdt_file}
bootzubi=echo Booting from nand ...; run setargsubi; bootz ${loadaddr} - ${fdt_addr};
setargsubi=setenv bootargs console=${console},${baudrate} ${optargs} ubi.mtd=1 root=ubi0:rootfs rw rootfstype=ubifs rootwait ${mtdparts}
bootcmd=run bootcmd_usb; run bootcmd_mmc; run bootcmd_sata; run loadubi; reset
Any help will be appreaciated!!!
Don't change the uboot config ?
And if it happens, you can always restore them.
Those setting probably came from https://forum.doozan.com/