how to wipe mtd1 off your pogoplug mobile

This forum is for Marvell Kirkwood devices such as the GoFlex Home/Net, PogoPlug v1/v2, SheevaPlug, and ZyXEL devices.

how to wipe mtd1 off your pogoplug mobile

Postby hecatae » Wed Jul 15, 2015 7:36 pm

step one, replace ubifs with rescue system,

step two, replace rescue system with openwrt following http://blog.qnology.com/2015/02/openwrt ... obile.html

step three, try to reset rootfs using "mtd -r erase rootfs" in terminal

result, mtd0 valid, but nothing in mtd1, :lol:

can I tftpboot the rescuesystem ubifs back to mtd1 using serial?
hecatae
 
Posts: 32
Joined: Tue Nov 18, 2014 9:17 pm

Re: how to wipe mtd1 off your pogoplug mobile

Postby grayman4hire » Wed Jul 15, 2015 9:44 pm

What exactly is the issue you're trying to solve?

"mtd0 valid" means that your uboot is okay? If so boot Debian/ALARM from USB and do whatever you want with the internal nand - rescuesystem/openwrt.
grayman4hire
 
Posts: 350
Joined: Sat Sep 29, 2012 12:03 am
Location: SF, CA

Re: how to wipe mtd1 off your pogoplug mobile

Postby hecatae » Thu Jul 16, 2015 5:39 pm

as far as I can tell my uboot is okay, but nothing will boot, usb, sdcard, ubifs...

so I'm stuck as after 5 usb sticks and 4 sd cards, there is definitely something wrong.
hecatae
 
Posts: 32
Joined: Tue Nov 18, 2014 9:17 pm

Re: how to wipe mtd1 off your pogoplug mobile

Postby grayman4hire » Thu Jul 16, 2015 9:55 pm

Did you setup netconsole? That would help determine if uboot is okay and if your uboot environment parameters are correct.

If not, you'll need a serial console connection. Worst case, uboot is messed up, and you need to recover via UART booting.

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

Use bodhi's kwboot found here - https://www.dropbox.com/s/bx1usk1bzt87ufh/kwboot
grayman4hire
 
Posts: 350
Joined: Sat Sep 29, 2012 12:03 am
Location: SF, CA

Re: how to wipe mtd1 off your pogoplug mobile

Postby hecatae » Thu Jul 23, 2015 8:12 pm

yes i setup netconsole,

serial tells me host 10.10.10.5 is not available,

hang on:

$this->bbcode_second_pass_code('', 'Hit any key to stop autoboot: 0
## Error: "bootcmd_usb" not defined
## Error: "bootcmd_mmc" not defined
## Error: "bootcmd_sata" not defined
Trying to boot from NAND ...
UBI: attaching mtd1 to ubi0
UBI: scanning is finished
UBI: attached mtd1 (name "mtd=1", size 127 MiB) to ubi0
UBI: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes
UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 512
UBI: VID header offset: 512 (aligned 512), data offset: 2048
UBI: good PEBs: 1015, bad PEBs: 1, corrupted PEBs: 0
UBI: user volume: 0, internal volumes: 1, max. volumes count: 128
UBI: max/mean erase counter: 1/1, WL threshold: 4096, image sequence number: 0
UBI: available PEBs: 992, total reserved PEBs: 23, PEBs reserved for bad PEB handling: 19
Error reading superblock on volume 'ubi0:rootfs' errno=-19!
ubifsmount - mount UBIFS volume

Usage:
ubifsmount <volume-name>
- mount 'volume-name' volume
resetting ...
')
hecatae
 
Posts: 32
Joined: Tue Nov 18, 2014 9:17 pm

Re: how to wipe mtd1 off your pogoplug mobile

Postby hecatae » Thu Jul 23, 2015 8:25 pm

Pogoplugv4> printenv
printenv
bootcmd=run bootcmd_usb; run bootcmd_mmc; run bootcmd_sata; run loadubi; reset
bootdir=/boot
bootfilem=uImage
bootfilez=zImage
bootubi=echo Trying to boot from NAND ...;if run mountubi; then ubifsload ${loadaddr} /boot/zImage;ubifsload ${fdtaddr} /boot/dtbs/${fdtfile};ubifsumount; setenv bootargs console=${console} ubi.mtd=1 root=ubi0:rootfs ro rootfstype=ubifs rootwait ${mtdparts};bootz ${loadaddr} - ${fdtaddr};fi
bootzubi=echo Booting from nand ...; run setargsubi; bootz ${loadaddr} - ${fdt_addr};
console=ttyS0,115200
ethact=egiga0
ethaddr=00:25:31:03:da:5b
fdt_addr=0x1c00000
fdt_file=/boot/kirkwood-pogoplug_v4.dtb
fdtaddr=0x800000
fdtdir=/boot/dtbs
fdtfile=kirkwood-pogoplugv4.dtb
ipaddr=10.10.10.3
loadaddr=0x800000
loadfdt=echo loading ${fdtdir}/${fdtfile} ...; load ${devtype} ${bootpart} ${fdtaddr} ${fdtdir}/${fdtfile}
loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilez} || load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilem}
loadrd=load ${devtype} ${bootpart} ${rdaddr} ${bootdir}/${rdfile}
loadubi=echo Trying to boot from NAND ...;if run mountubi; then run loadubizimage;run loadubifdt;ubifsumount;run bootzubi;fi
loadubifdt=ubifsload ${fdt_addr} ${fdt_file}
loadubizimage=ubifsload ${loadaddr} ${zimage}
mainargs=setenv bootargs console=${console} ${mtdparts} root=${root} rw rootwait ${optargs} ${ncargs}
mountubi=ubi part rootfs; ubifsmount ubi0:rootfs
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),-(rootfs)
ncargs=ignore_loglevel netconsole=6665@10.10.10.3/eth0,6666@10.10.10.4/
ncip=10.10.10.5
ncipk=10.10.10.4
netconsole=on
preboot=if env exists netconsole && test ${netconsole} = on; then if ping ${ncip}; then setenv stdin nc; setenv stdout nc; setenv stderr nc; if env exists ncargsusr; then echo ncargs has been defined by user; setenv ncargs ${ncargsusr}; else setenv ncargs ignore_loglevel netconsole=6665@${ipaddr}/eth0,6666@${ncipk}/; fi; fi; else echo Netconsole has been turned off.; echo To turn it on, set netconsole variable to on.; setenv stdin; setenv stdout; setenv stderr; setenv ncargs; fi
rdaddr=0x1100000
rdfile=initramfs-linux.img
setargsubi=setenv bootargs console=${console},${baudrate} ${optargs} ubi.mtd=1 root=ubi0:rootfs rw rootfstype=ubifs rootwait ${mtdparts}
startboot=usb start; ide reset; for devtype in mmc usb ide; do setenv devnum 0; while ${devtype} dev ${devnum}; do echo ${devtype} found on device ${devnum}; setenv bootpart ${devnum}:1; echo Checking for: ${bootdir}/uEnv.txt ...; if test -e ${devtype} ${bootpart} ${bootdir}/uEnv.txt; then load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/uEnv.txt; env import -t ${loadaddr} ${filesize}; echo Loaded environment from ${bootdir}/uEnv.txt; echo Checking if uenvcmd is set ...; if test -n ${uenvcmd}; then echo Running uenvcmd ...; run uenvcmd; fi; fi; if run loadimage; then if env exists root; then echo root has been defined by user; else part uuid ${devtype} ${bootpart} uuid; setenv root PARTUUID=${uuid}; fi; run mainargs; if run loadfdt; then if run loadrd; then bootz ${loadaddr} ${rdaddr}:${filesize} ${fdtaddr}; else bootz ${loadaddr} - ${fdtaddr}; fi; else if run loadrd; then echo Booting uImage with initrd; bootm ${loadaddr} ${rdaddr}:${filesize}; else bootm ${loadaddr}; fi; fi; else echo No kernel found; fi; setexpr devnum ${devnum} + 1; done; done;
stderr=nc
stdin=nc
stdout=nc
zimage=/boot/zImage

Environment size: 3477/131068 bytes
hecatae
 
Posts: 32
Joined: Tue Nov 18, 2014 9:17 pm

Re: how to wipe mtd1 off your pogoplug mobile

Postby grayman4hire » Fri Jul 24, 2015 12:43 am

$this->bbcode_second_pass_quote('', '
')## Error: "bootcmd_usb" not defined
## Error: "bootcmd_mmc" not defined
## Error: "bootcmd_sata" not defined


Not sure how/why you're missing these environment variables and others, but that's the reason you can't boot Debian/Arch from USB.

Below is my environment variable for reference.

$this->bbcode_second_pass_quote('', '
')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:05:xxxx
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)
loadaddr=0x800000
zImage=/boot/zImage
fdt_addr=0x1c00000
fdt_file=/boot/dtbs/kirkwood-pogov4.dtb
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
grayman4hire
 
Posts: 350
Joined: Sat Sep 29, 2012 12:03 am
Location: SF, CA

Re: how to wipe mtd1 off your pogoplug mobile

Postby moonman » Fri Jul 24, 2015 2:15 am

He is missing those variables because he installed 2015.04 arch uboot and modified bootcmd, probably taking the line from bodhi's environment along with mixing in crap from other posts in the forum. Of course it will not work.

OP, make your choice of the U-Boot you want. You absolutely do not need to edit environment if you install 2015.04 uboot.
If you want to see the logic behind those long lines in arch uboot, refer here: https://github.com/moonman/u-boot/commi ... fb841ac5f1
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am

Re: how to wipe mtd1 off your pogoplug mobile

Postby WarheadsSE » Fri Jul 24, 2015 2:36 am

He got netconsole, and in IRC I had him run this to reset his environment.
$this->bbcode_second_pass_code('', 'env defaults -f -a')
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm


Return to Marvell Kirkwood

Who is online

Users browsing this forum: No registered users and 20 guests

cron