To mount the jffs2 filesystem you first have to load the module
mtdblock. Directions in the mentioned thread won't help you boot to Pogo OS, but if you updated from an older installation you may find a backup of the original bootloader on mtd2:
$this->bbcode_second_pass_code('', '
modprobe mtdblock
mount -t jffs2 /dev/mtdblock2 /mnt/
ls -l /mnt/uboot-original-mtd0.kwb
')
If the file is not present you can get it this way
$this->bbcode_second_pass_code('', '
wget -O /mnt/uboot-original-mtd0.kwb http://download.doozan.com/uboot/files/uboot/uboot.mtd0.pinkpogo.original.kwb
')
On the U-Boot prompt (via serial console or netconsole) you can load and execute that bootloader which in turn will boot Pogo OS.
Edit: I just learned that mainline U-Boot is
missing the
fsload command, so this won't work.
$this->bbcode_second_pass_code('', '
u-boot>> fsload uboot-original-mtd0.kwb
fsload uboot-original-mtd0.kwb
### JFFS2 loading 'uboot-original-mtd0.kwb' to 0x800000
Scanning JFFS2 FS: ........ done.
### JFFS2 load complete: 524288 bytes loaded to 0x800000
u-boot>> go 0x800200
go 0x800200
## Starting application at 0x00800200 ...
')
If you cannot access U-Boot directly you have to permanently modify the environment in some way. In mainline U-Boot (which was installed when you unnecessarily executed pogo_e02.sh) a file /boot/uEnv.txt should be used for that purpose, but obviously you cannot use this approach to achieve that Pogo OS is always started when USB is absent. Instead you will have to change U-Boot's environment on mtd0: Install the package
uboot-tools, remove the hash at the beginning of the following line in /etc/fw_env.config
$this->bbcode_second_pass_code('', '
# /dev/mtd0 0xc0000 0x20000 0x20000
')
and then change U-Boot's bootcmd (use copy-paste):
$this->bbcode_second_pass_code('', '
fw_setenv bootcmd 'usb start; setenv letter 9;for type in usb; do for disk in 0 1 2 3; do if ${type} part ${disk};then setexpr letter $letter + 1;run load;fi;done;done;if fsload uboot-original-mtd0.kwb; then go 0x800200; fi'
')
Do this at your own risk, I have not tested it on a Pogo E02, because I don't use mainline U-Boot on it. But if it does not work it shouldn't harm: I tested it on the GoFlex Home with mainline U-Boot and it still boots to SATA (compared to the Pogo there are some extra commands regarding ide)
$this->bbcode_second_pass_code('', '
GoFlexHome> setenv bootcmd 'ide reset; usb start; setenv letter 9;for type in ide usb; do for disk in 0; do if ${type} part ${disk};then setexpr letter $letter + 1;run load;fi;done;done;if fsload uboot-original-mtd0.kwb; then go 0x800200; fi'
setenv bootcmd 'ide reset; usb start; setenv letter 9;for type in ide usb; do for disk in 0; do if ${type} part ${disk};then setexpr letter $letter + 1;run load;fi;done;done;if fsload uboot-original-mtd0.kwb; then go 0x800200; fi'
GoFlexHome> boot
boot
Reset IDE: Bus 0: OK Bus 1: not available
Device 0: Model: ST31000528AS Firm: CC3E Ser#: 6VP4TDBD
Type: Hard Disk
Supports 48-bit addressing
Capacity: 953869.7 MB = 931.5 GB (1953525168 x 512)
(Re)start USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
Partition Map for IDE device 0 -- Partition Type: EFI
Part Start LBA End LBA Name
Attributes
Type GUID
Partition GUID
1 0x00000800 0x028007ff "Linux filesystem"
attrs: 0x0000000000000000
type: 0fc63daf-8483-4772-8e79-3d69d8477de4
guid: 8e9c64c0-c11c-40c0-b823-3c47bdbdcb69
2 0x02800800 0x74706d8e "Linux filesystem"
attrs: 0x0000000000000000
type: 0fc63daf-8483-4772-8e79-3d69d8477de4
guid: 40a7fa17-6deb-47a9-ae72-27b359be70a5
Attempting to boot from ide 0:1...
89 bytes read in 64 ms (1000 Bytes/s)
Importing environment (uEnv.txt)...
Checking if uenvcmd is set ...
Running default loadzimage ...
** File not found /boot/zImage **
Running default loaduimage ...
3977208 bytes read in 789 ms (4.8 MiB/s)
Booting from 0 ...
## Booting kernel from Legacy Image at 00810000 ...
Image Name: Linux-3.15.6-1-ARCH
Created: 2014-07-18 20:10:56 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3977144 Bytes = 3.8 MiB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
')
Btw. on the GoFlex Home the fsload command would't work, because ubifs is used instead of jffs2, see my
HowTo for more details. Another approach is to load the original bootloader from a TFTP server.
$this->bbcode_second_pass_code('', '
GoFlexHome> tftpboot 0x800000 192.168.2.1:uboot.mtd0.dockstar.original.kwb
tftpboot 0x800000 192.168.2.1:uboot.mtd0.dockstar.original.kwb
Using egiga0 device
TFTP from server 192.168.2.1; our IP address is 192.168.2.250
Filename 'uboot.mtd0.dockstar.original.kwb'.
Load address: 0x800000
Loading: ####################################
3.1 MiB/s
done
Bytes transferred = 524288 (80000 hex)
GoFlexHome> go 0x800200
go 0x800200
## Starting application at 0x00800200 ...
')
I wonder if it is possible to boot stock OS without chainloading the original bootloader.