Welcome! Log In Create A New Profile

Advanced

Convert Pogoplug Series 4 to Debian, howto?

Posted by odinb 
Convert Pogoplug Series 4 to Debian, howto?
August 13, 2016 04:36PM
Hi!

Currently running a couple of pogo plugs (one standard with SATA, one mobile) on Archlinux (https://archlinuxarm.org/platforms/armv5/pogoplug-series-4).

Now wanting to re-purpose these, and Debian fits me better!

How do I reflash them to the Bodhi u-Boot, and install Debian on the disks (sata on the v4, and usb-key on the v4 mobile) that are now running Arch?

Found these by searching:
http://forum.doozan.com/read.php?2,25422,25422#msg-25422
http://forum.doozan.com/read.php?3,12381

But they do not see to fit my scenario, or?

Thanks for any help/guidance!

[root@eyez ~]# cat /etc/fw_env.config
cat: /etc/fw_env.config: No such file or directory
[root@eyez ~]# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00200000 00020000 "u-boot"
mtd1: 00300000 00020000 "uImage"
mtd2: 00300000 00020000 "uImage2"
mtd3: 00800000 00020000 "failsafe"
mtd4: 07000000 00020000 "root"
mtd5: 00010000 00008000 "spi0.0"
[root@eyez ~]# fw_printenv ethaddr
-bash: fw_printenv: command not found
[root@eyez ~]# dmesg | grep -i 'bad'
[   14.935952] Scanning device for bad blocks
[   14.969468] Bad eraseblock 549 at 0x0000044a0000
[root@eyez ~]# fdisk -l
Disk /dev/sda: 149.1 GiB, 160041885696 bytes, 312581808 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x1f29dfaf

Device     Boot Start       End   Sectors  Size Id Type
/dev/sda1          63 312576704 312576642  149G 83 Linux
[root@eyez ~]#
Re: Convert Pogoplug Series 4 to Debian, howto?
August 13, 2016 06:09PM
odinb,

> Currently running a couple of pogo plugs (one
> standard with SATA, one mobile) on Archlinux
> (https://archlinuxarm.org/platforms/armv5/pogoplug
> -series-4).

You are running a much older ALARM u-boot. So you should do these 2 steps below (if you have serial console connected or willing to connect one then the risk of bricking is very low).

1. Flash new u-boot from inside Arch.
2. Create the Debian rootfs.


To install new u-boot in Linux, you need to pacman 2 packages. These are not installed, so that's why you see the errors above. And also old ALARM u-boot does not support fw_printenv and other mtd utilities.

a. Save current envs using blparam (you need this to do adjustment during u-boot instllation).

blparam > current_envs.txt

If blparam is not in your path, you might need to find it in /usr/local/bin/cloudengines, /usr/local/sbin/cloudengines.... or some such directory. And execute it directly with full path.

b. Install mtd-utils and u-boot-tools (use pacman and consult the man page to get the correct syntax).

c. Save you current mtd0 (this will create a 2MB file named mtd0.pogo_v4)

nanddump --noecc --omitoob -f mtd0.pogo_v4  /dev/mtd0

d. Follow the instruction on http://forum.doozan.com/read.php?3,12381 to install new u-boot. Knowing fw_setenv/fw_printenv will fail, so no need to do those. The new u-boot envs image and your adjustment during installation is enough to get you booting.

e. At this point you already have new u-boot envs. Verify it by looking at the output of
cat /etc/fw_env.config 
fw_printenv

f. You might want to come back here and post the log of your session above. Or might have questions. But don't reboot. You want to install Debian rootfs in step g below.


=========

If everything was going well so far, you can do the next step

g. Create the Debian 4.4 rootfs on USB folowing instruction on http://forum.doozan.com/read.php?2,12096. Pay attention about being root, single Ext3 partition, and skip step 4 (you are going to run with new u-boot).

h. Reboot

sync
shutdown -r now

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Convert Pogoplug Series 4 to Debian, howto?
August 13, 2016 11:46PM
bodhi Wrote:
-------------------------------------------------------
> d. Follow the instruction on
> http://forum.doozan.com/read.php?3,12381 to
> install new u-boot. Knowing fw_setenv/fw_printenv
> will fail, so no need to do those. The new u-boot
> envs image and your adjustment during installation
> is enough to get you booting.
>


Thanks for the response!

In d. above, does this mean I start in step 5 "Extract the archive to /tmp ", and continue from there?

Thanks!

a.
[root@eyez ~]# blparam > current_envs.txt
-bash: blparam: command not found
[root@eyez ~]# pacman -Ss blparam
alarm/pogoplug-blparam 1.0-4
    Blparam pulled from Pogoplug OS
[root@eyez ~]# pacman -S pogoplug-blparam
resolving dependencies...
looking for conflicting packages...

Packages (1) pogoplug-blparam-1.0-4

Total Download Size:   0.01 MiB
Total Installed Size:  0.03 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages...
 pogoplug-blparam-1.0-4-arm                                       6.8 KiB  0.00B/s 00:00 [####################################################] 100%
(1/1) checking keys in keyring                                                           [####################################################] 100%
(1/1) checking package integrity                                                         [####################################################] 100%
(1/1) loading package files                                                              [####################################################] 100%
(1/1) checking for file conflicts                                                        [####################################################] 100%
(1/1) checking available disk space                                                      [####################################################] 100%
:: Processing package changes...
(1/1) installing pogoplug-blparam                                                        [####################################################] 100%
[root@eyez ~]# blparam > current_envs.txt
[root@eyez ~]# ls -all
total 28
drwxr-x---  5 root root 4096 Aug 13 23:25 .
drwxr-xr-x 19 root root 4096 May 21 17:55 ..
-rw-------  1 root root 1540 Aug 13 17:40 .bash_history
drwxr-xr-x  4 root root 4096 Aug 25  2014 .config
-rw-r--r--  1 root root 1617 Aug 13 23:25 current_envs.txt
drwx------  3 root root 4096 Apr  5  2015 .gnupg
drwxr-xr-x  3 root root 4096 Feb 15  2014 .local
[root@eyez ~]# cat current_envs.txt
bootdelay=1
baudrate=115200
loads_echo=0
rootpath=/mnt/ARM_FS/
netmask=255.255.0.0
run_diag=yes
stdin=serial
stdout=serial
stderr=serial
CASset=min
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
MALLOC_len=1
ethprime=egiga0
netbsd_en=no
vxworks_en=no
load_nand=nboot 0x800000 0 0x200000
load_nand2=nboot 0x800000 0 0x500000
boot=bootm 0x800000
boot_nand=run load_nand boot || run load_nand2 boot
disaMvPnp=no
ethmtu=1500
usb0Mode=host
nandEcc=1bit
hddPowerCtrl=no
pcieTune=no
ethact=egiga0
ethaddr=00:25:31:05:f3:39
cesvcid=RJT2GSJDQWUZLTX98YBJHAC3JE
ceboardver=PPV4A3
ipaddr=192.168.58.233
serverip=192.168.58.188
bootargs=console=ttyS0,115200 root=ubi0:rootfs ubi.mtd=4,2048 rootfstype=ubifs
arcNumber=3960
mainlineLinux=yes
bootcmd=if usb start; then run alarm_boot; else nand read 0x800000 0x100000 0x73d0c; go 0x800000; fi
alarm_boot=ide reset; run alarm_revert; if ide part 0; then run alarm_ide; else setenv isDisk no; fi; run alarm_usb
alarm_revert=if fatls usb 0:1 /revert; then setenv mainlineLinux no; setenv arcNumber; setenv bootcmd run boot_nand; saveenv; reset; fi
alarm_args=setenv bootargs console=ttyS0,115200 root=$device rootwait rootfstype=ext3
alarm_which=if test $isDisk = yes; then setenv device /dev/sdb1; else setenv device /dev/sda1; fi
alarm_ide=if ext2load ide 0:1 0x800000 /boot/uImage; then setenv device /dev/sda1; run alarm_args; bootm 0x800000; else setenv isDisk yes; fi
alarm_usb=if ext2load usb 0:1 0x800000 /boot/uImage; then run alarm_which; run alarm_args; bootm 0x800000; fi
[root@eyez ~]#

b.
[root@eyez ~]# pacman -S mtd-utils
resolving dependencies...
looking for conflicting packages...

Packages (1) mtd-utils-1.5.2-1

Total Download Size:   0.16 MiB
Total Installed Size:  0.78 MiB

:: Proceed with installation? [Y/n]
:: Retrieving packages...
 mtd-utils-1.5.2-1-arm                                          162.9 KiB   740K/s 00:00 [####################################################] 100%
(1/1) checking keys in keyring                                                           [####################################################] 100%
(1/1) checking package integrity                                                         [####################################################] 100%
(1/1) loading package files                                                              [####################################################] 100%
(1/1) checking for file conflicts                                                        [####################################################] 100%
(1/1) checking available disk space                                                      [####################################################] 100%
:: Processing package changes...
(1/1) installing mtd-utils                                                               [####################################################] 100%
:: Running post-transaction hooks...
(1/1) Updating manpage index...
[root@eyez ~]# pacman -S uboot-tools
resolving dependencies...
looking for conflicting packages...

Packages (1) uboot-tools-2016.07-1

Total Download Size:   0.09 MiB
Total Installed Size:  0.56 MiB

:: Proceed with installation? [Y/n]
:: Retrieving packages...
 uboot-tools-2016.07-1-arm                                       96.9 KiB   881K/s 00:00 [####################################################] 100%
(1/1) checking keys in keyring                                                           [####################################################] 100%
(1/1) checking package integrity                                                         [####################################################] 100%
(1/1) loading package files                                                              [####################################################] 100%
(1/1) checking for file conflicts                                                        [####################################################] 100%
(1/1) checking available disk space                                                      [####################################################] 100%
:: Processing package changes...
(1/1) installing uboot-tools                                                             [####################################################] 100%
:: Running post-transaction hooks...
(1/1) Updating manpage index...
[root@eyez ~]#

c.
[root@eyez ~]# nanddump --noecc --omitoob -f mtd0.pogo_v4  /dev/mtd0
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x00200000...
[root@eyez ~]# ls -all
total 2080
drwxr-x---  5 root root    4096 Aug 13 23:32 .
drwxr-xr-x 19 root root    4096 May 21 17:55 ..
-rw-------  1 root root    1540 Aug 13 17:40 .bash_history
drwxr-xr-x  4 root root    4096 Aug 25  2014 .config
-rw-r--r--  1 root root    1617 Aug 13 23:25 current_envs.txt
drwx------  3 root root    4096 Apr  5  2015 .gnupg
drwxr-xr-x  3 root root    4096 Feb 15  2014 .local
-rw-r--r--  1 root root 2097152 Aug 13 23:32 mtd0.pogo_v4
[root@eyez ~]#

d.
[root@eyez ~]# wget https://bitly.com/1UgznAq
--2016-08-13 23:37:24--  https://bitly.com/1UgznAq
Resolving bitly.com (bitly.com)... 67.199.248.15, 67.199.248.14
Connecting to bitly.com (bitly.com)|67.199.248.15|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://www.dropbox.com/s/sn5w1a7dc71385p/uboot.2016.05-tld-1.pogo_v4.bodhi.tar [following]
--2016-08-13 23:37:24--  https://www.dropbox.com/s/sn5w1a7dc71385p/uboot.2016.05-tld-1.pogo_v4.bodhi.tar
Resolving www.dropbox.com (www.dropbox.com)... 108.160.172.238
Connecting to www.dropbox.com (www.dropbox.com)|108.160.172.238|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://dl.dropboxusercontent.com/content_link/agP8tq3EDRBr2onTgJKz6RgUIgvynpi39E2j5Knb6RJfHrKdPlXJiRz61S2OcHgx/file [following]
--2016-08-13 23:37:25--  https://dl.dropboxusercontent.com/content_link/agP8tq3EDRBr2onTgJKz6RgUIgvynpi39E2j5Knb6RJfHrKdPlXJiRz61S2OcHgx/file
Resolving dl.dropboxusercontent.com (dl.dropboxusercontent.com)... 45.58.75.5
Connecting to dl.dropboxusercontent.com (dl.dropboxusercontent.com)|45.58.75.5|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 532480 (520K) [application/x-tar]
Saving to: ‘1UgznAq’

1UgznAq                              100%[======================================================================>] 520.00K  --.-KB/s    in 0.1s

2016-08-13 23:37:26 (3.88 MB/s) - ‘1UgznAq’ saved [532480/532480]

[root@eyez ~]#
Re: Convert Pogoplug Series 4 to Debian, howto?
August 14, 2016 01:43AM
odinb,

> In d. above, does this mean I start in step 5
> "Extract the archive to /tmp ", and continue from
> there?

Yes.

> [root@eyez ~]# wget https://bitly.com/1UgznAq
> --2016-08-13 23:37:24--
> https://bitly.com/1UgznAq
> Resolving bitly.com (bitly.com)... 67.199.248.15,
> 67.199.248.14
> Connecting to bitly.com
> (bitly.com)|67.199.248.15|:443... connected.
> HTTP request sent, awaiting response... 301 Moved
> Permanently
> Location:
> https://www.dropbox.com/s/sn5w1a7dc71385p/uboot.20
> 16.05-tld-1.pogo_v4.bodhi.tar [following]
> --2016-08-13 23:37:24--
> https://www.dropbox.com/s/sn5w1a7dc71385p/uboot.20
> 16.05-tld-1.pogo_v4.bodhi.tar
> Resolving www.dropbox.com (www.dropbox.com)...
> 108.160.172.238
> Connecting to www.dropbox.com
> (www.dropbox.com)|108.160.172.238|:443...
> connected.
> HTTP request sent, awaiting response... 302 Found
> Location:
> https://dl.dropboxusercontent.com/content_link/agP
> 8tq3EDRBr2onTgJKz6RgUIgvynpi39E2j5Knb6RJfHrKdPlXJi
> Rz61S2OcHgx/file [following]
> --2016-08-13 23:37:25--
> https://dl.dropboxusercontent.com/content_link/agP
> 8tq3EDRBr2onTgJKz6RgUIgvynpi39E2j5Knb6RJfHrKdPlXJi
> Rz61S2OcHgx/file
> Resolving dl.dropboxusercontent.com
> (dl.dropboxusercontent.com)... 45.58.75.5
> Connecting to dl.dropboxusercontent.com
> (dl.dropboxusercontent.com)|45.58.75.5|:443...
> connected.
> HTTP request sent, awaiting response... 200 OK
> Length: 532480 (520K) [application/x-tar]
> Saving to: ‘1UgznAq’
>
> 1UgznAq
> 100%[=============================================
> =========================>] 520.00K --.-KB/s
> in 0.1s
>
> 2016-08-13 23:37:26 (3.88 MB/s) - ‘1UgznAq’
> saved [532480/532480]
>
> [root@eyez ~]#
> [/code]


Rename
mv 1UgznAq  uboot.2016.05-tld-1.pogo_v4.bodhi.tar

and install !

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Convert Pogoplug Series 4 to Debian, howto?
August 14, 2016 11:21AM
Ok, got a bit further, but are stuck again!

First, got an error in Step 8.
"[root@eyez tmp]# cat etc/fw_env.config
cat: etc/fw_env.config: No such file or directory"

Do I need to worry, or is the information I have above from "[root@eyez ~]# blparam > current_envs.txt" equivalent?

Same thing goes for Part B-c.
"[root@eyez ~]# fw_printenv > current_envs2.txt
Cannot parse config file '/etc/fw_env.config': Invalid argument"

And then of course the last part, Part B-e.
"[root@eyez tmp]# fw_setenv arcNumber 3960
Cannot parse config file '/etc/fw_env.config': Invalid argument
Error: environment not initialized
[root@eyez tmp]# fw_setenv machid f78
Cannot parse config file '/etc/fw_env.config': Invalid argument
Error: environment not initialized
[root@eyez tmp]#"

Seems these 3 are all connected! What to do?

Thanks!

Step 5.
[root@eyez ~]# mv 1UgznAq  uboot.2016.05-tld-1.pogo_v4.bodhi.tar
[root@eyez ~]# ls -all
total 2608
drwxr-x---  5 root root    4096 Aug 14 10:53 .
drwxr-xr-x 19 root root    4096 May 21 17:55 ..
-rw-------  1 root root    2058 Aug 13 23:50 .bash_history
drwxr-xr-x  4 root root    4096 Aug 25  2014 .config
-rw-r--r--  1 root root    1617 Aug 13 23:25 current_envs.txt
drwx------  3 root root    4096 Apr  5  2015 .gnupg
drwxr-xr-x  3 root root    4096 Feb 15  2014 .local
-rw-r--r--  1 root root 2097152 Aug 13 23:32 mtd0.pogo_v4
-rw-r--r--  1 root root  532480 Aug 13 23:37 uboot.2016.05-tld-1.pogo_v4.bodhi.tar
-rw-r--r--  1 root root     170 Aug 13 23:35 .wget-hsts
[root@eyez ~]# cp uboot.2016.05-tld-1.pogo_v4.bodhi.tar /tmp/
[root@eyez ~]# cd /tmp/
[root@eyez tmp]# ls -l
total 520
drwx------ 3 root root     60 Jul 31 00:27 systemd-private-b8a33e330aef4306b90f6cb10510c757-ntpd.service-1IRe5P
-rw-r--r-- 1 root root 532480 Aug 14 10:55 uboot.2016.05-tld-1.pogo_v4.bodhi.tar
[root@eyez tmp]# tar -xf uboot.2016.05-tld-1.pogo_v4.bodhi.tar
[root@eyez tmp]# ls -l
total 1032
drwx------ 3 root root     60 Jul 31 00:27 systemd-private-b8a33e330aef4306b90f6cb10510c757-ntpd.service-1IRe5P
-rw-r--r-- 1 root root 532480 Aug 14 10:55 uboot.2016.05-tld-1.pogo_v4.bodhi.tar
-rw-r--r-- 1 root root 524288 Jun 12 15:44 uboot.2016.05-tld-1.pogo_v4.mtd0.kwb

Step 6.
[root@eyez tmp]# flash_erase /dev/mtd0 0 4
Erasing 128 Kibyte @ 60000 -- 100 % complete

Step 7.
[root@eyez tmp]# nandwrite /dev/mtd0 uboot.2016.05-tld-1.pogo_v4.mtd0.kwb
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000
Writing data to block 3 at offset 0x60000

Step 8.
[root@eyez tmp]# cat etc/fw_env.config
cat: etc/fw_env.config: No such file or directory
[root@eyez tmp]# df -kh
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       147G  3.1G  137G   3% /
devtmpfs         60M     0   60M   0% /dev
tmpfs            60M     0   60M   0% /dev/shm
tmpfs            60M  248K   60M   1% /run
tmpfs            60M     0   60M   0% /sys/fs/cgroup
tmpfs            60M  1.1M   59M   2% /tmp

Part B-a.
[root@eyez tmp]# cd /root
[root@eyez ~]# wget https://bitly.com/1sMwD7b
--2016-08-14 11:01:16--  https://bitly.com/1sMwD7b
Resolving bitly.com (bitly.com)... 67.199.248.15, 67.199.248.14
Connecting to bitly.com (bitly.com)|67.199.248.15|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://www.dropbox.com/s/4smmw2wr4ugayz9/uboot.2016.05-tld-1.environment.bodhi.tar [following]
--2016-08-14 11:01:16--  https://www.dropbox.com/s/4smmw2wr4ugayz9/uboot.2016.05-tld-1.environment.bodhi.tar
Resolving www.dropbox.com (www.dropbox.com)... 108.160.172.238
Connecting to www.dropbox.com (www.dropbox.com)|108.160.172.238|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://dl.dropboxusercontent.com/content_link/AY12JM5E1cXMJHPTNGji0kGoWxHJZUo180fVExVYMYWjfIlWZwebtRHP6O4MjIiw/file [following]
--2016-08-14 11:01:17--  https://dl.dropboxusercontent.com/content_link/AY12JM5E1cXMJHPTNGji0kGoWxHJZUo180fVExVYMYWjfIlWZwebtRHP6O4MjIiw/file
Resolving dl.dropboxusercontent.com (dl.dropboxusercontent.com)... 45.58.75.165
Connecting to dl.dropboxusercontent.com (dl.dropboxusercontent.com)|45.58.75.165|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 204800 (200K) [application/x-tar]
Saving to: ‘1sMwD7b’

1sMwD7b                              100%[======================================================================>] 200.00K   314KB/s    in 0.6s

2016-08-14 11:01:19 (314 KB/s) - ‘1sMwD7b’ saved [204800/204800]

[root@eyez ~]# ls -l
total 2784
-rw-r--r-- 1 root root  204800 Aug 14 11:01 1sMwD7b
-rw-r--r-- 1 root root    1617 Aug 13 23:25 current_envs.txt
-rw-r--r-- 1 root root 2097152 Aug 13 23:32 mtd0.pogo_v4
-rw-r--r-- 1 root root  532480 Aug 13 23:37 uboot.2016.05-tld-1.pogo_v4.bodhi.tar
[root@eyez ~]# mv 1sMwD7b uboot.2016.05-tld-1.environment.bodhi.tar
[root@eyez ~]# ls -l
total 2784
-rw-r--r-- 1 root root    1617 Aug 13 23:25 current_envs.txt
-rw-r--r-- 1 root root 2097152 Aug 13 23:32 mtd0.pogo_v4
-rw-r--r-- 1 root root  204800 Aug 14 11:01 uboot.2016.05-tld-1.environment.bodhi.tar
-rw-r--r-- 1 root root  532480 Aug 13 23:37 uboot.2016.05-tld-1.pogo_v4.bodhi.tar
[root@eyez ~]# cp uboot.2016.05-tld-1.environment.bodhi.tar /tmp
[root@eyez ~]# cd /tmp
[root@eyez tmp]# ls -l
total 1232
drwx------ 3 root root     60 Jul 31 00:27 systemd-private-b8a33e330aef4306b90f6cb10510c757-ntpd.service-1IRe5P
-rw-r--r-- 1 root root 204800 Aug 14 11:02 uboot.2016.05-tld-1.environment.bodhi.tar
-rw-r--r-- 1 root root 532480 Aug 14 10:55 uboot.2016.05-tld-1.pogo_v4.bodhi.tar
-rw-r--r-- 1 root root 524288 Jun 12 15:44 uboot.2016.05-tld-1.pogo_v4.mtd0.kwb

Part B-b.
[root@eyez tmp]# tar -xf uboot.2016.05-tld-1.environment.bodhi.tar
[root@eyez tmp]# ls -l
total 1428
drwx------ 3 root root     60 Jul 31 00:27 systemd-private-b8a33e330aef4306b90f6cb10510c757-ntpd.service-1IRe5P
-rw-r--r-- 1 root root   2773 Jun 12 00:17 uboot.2016.05-tld-1.environment
-rw-r----- 1 root root  65536 Jun 12 01:44 uboot.2016.05-tld-1.environment.64K.img
-rw-r--r-- 1 root root 204800 Aug 14 11:02 uboot.2016.05-tld-1.environment.bodhi.tar
-rw-r----- 1 root root 131072 Jun 12 00:22 uboot.2016.05-tld-1.environment.img
-rw-r--r-- 1 root root 532480 Aug 14 10:55 uboot.2016.05-tld-1.pogo_v4.bodhi.tar
-rw-r--r-- 1 root root 524288 Jun 12 15:44 uboot.2016.05-tld-1.pogo_v4.mtd0.kwb
[root@eyez tmp]# cd /root/
[root@eyez ~]# ls -l
total 2784
-rw-r--r-- 1 root root    1617 Aug 13 23:25 current_envs.txt
-rw-r--r-- 1 root root 2097152 Aug 13 23:32 mtd0.pogo_v4
-rw-r--r-- 1 root root  204800 Aug 14 11:01 uboot.2016.05-tld-1.environment.bodhi.tar
-rw-r--r-- 1 root root  532480 Aug 13 23:37 uboot.2016.05-tld-1.pogo_v4.bodhi.tar

Part B-c.
[root@eyez ~]# fw_printenv > current_envs2.txt
Cannot parse config file '/etc/fw_env.config': Invalid argument

Part B-d.
[root@eyez ~]# /usr/sbin/flash_erase /dev/mtd0 0xc0000 1
Erasing 128 Kibyte @ c0000 -- 100 % complete
[root@eyez ~]# cd /tmp/
[root@eyez tmp]# ls
systemd-private-b8a33e330aef4306b90f6cb10510c757-ntpd.service-1IRe5P  uboot.2016.05-tld-1.environment.img
uboot.2016.05-tld-1.environment					      uboot.2016.05-tld-1.pogo_v4.bodhi.tar
uboot.2016.05-tld-1.environment.64K.img				      uboot.2016.05-tld-1.pogo_v4.mtd0.kwb
uboot.2016.05-tld-1.environment.bodhi.tar
[root@eyez tmp]# /usr/sbin/nandwrite -s 786432 /dev/mtd0 uboot.2016.05-tld-1.environment.img
Writing data to block 6 at offset 0xc0000

Part B-e.
[root@eyez tmp]# fw_setenv arcNumber 3960
Cannot parse config file '/etc/fw_env.config': Invalid argument
Error: environment not initialized
[root@eyez tmp]# fw_setenv machid f78
Cannot parse config file '/etc/fw_env.config': Invalid argument
Error: environment not initialized
[root@eyez tmp]#
Re: Convert Pogoplug Series 4 to Debian, howto?
August 14, 2016 01:56PM
Maybe I should add the current content of this file.

[root@eyez etc]# cat fw_env.config
# Configuration file for fw_(printenv/saveenv) utility.
# Up to two entries are valid, in this case the redundand
# environment sector is assumed present.
# MTD device name       Device offset   Env. size       Flash sector size
#/dev/mtd2               0x0000          0x20000         0x20000

# segate dockstar:
# /dev/mtd0               0xc0000         0x20000         0x20000

# iomega iconnect
# /dev/mtd0               0xa0000         0x20000         0x20000

# CuBox
# /dev/mtd0               0xc0000         0x10000         0x10000

# CuBox-i/Hummingboard
# /dev/mmcblk0              0x60000         0x2000         0x2000

# Utilite 1
# /dev/mtd1               0x0000          0x2000          0x2000
[root@eyez etc]#
Re: Convert Pogoplug Series 4 to Debian, howto?
August 14, 2016 03:36PM
odinb,

> Maybe I should add the current content of this
> file.

You're almost there! everything looks good. This is the correct content:

cat /etc/fw_env.config

# MTD device name	Device offset	Env. size	Flash sector size	Number of sectors
/dev/mtd0 0xc0000 0x20000 0x20000

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Convert Pogoplug Series 4 to Debian, howto?
August 14, 2016 05:19PM
Ok, thanks for the hand-holding! Need a bit more help....

for Part B-e.
Was this mtdparts correct?
fw_setenv mtdparts 'orion_nand'

for Part B-f.
"[root@eyez etc]# cd /boot/dts
-bash: cd: /boot/dts: No such file or directory
[root@eyez etc]#"

What should the .dtb parameter be for this command for me?
fw_setenv dtb_file '/boot/dts/kirkwood-dockstar.dtb'

Do I need?
fw_setenv dtb_file


Also, here is my "fw_printenv":
[root@eyez etc]# fw_printenv
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=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec
bootdelay=10
bootdev=usb
device=0:1
devices=usb ide mmc
disks=0 1 2 3
ethact=egiga0
if_netconsole=ping $serverip
ipaddr=192.168.0.231
led_error=orange blinking
led_exit=green off
led_init=green blinking
dtb_file=/boot/dts/kirkwood-pogo_e02.dtb
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
serverip=192.168.0.220
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
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
arcNumber=3960
machid=f78
mtdparts=orion_nand
ethaddr=00:25:31:05:f3:39
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi; sleep 3
[root@eyez etc]#



Part B-e. after editing “fw_env.config”
[root@eyez etc]# cat fw_env.config
# Configuration file for fw_(printenv/saveenv) utility.
# Up to two entries are valid, in this case the redundand
# environment sector is assumed present.
# MTD device name       Device offset   Env. size       Flash sector size
#/dev/mtd2               0x0000          0x20000         0x20000

# segate dockstar:
# /dev/mtd0               0xc0000         0x20000         0x20000

/dev/mtd0      		  0xc0000      	  0x20000      	  0x20000

# iomega iconnect
# /dev/mtd0               0xa0000         0x20000         0x20000

# CuBox
# /dev/mtd0               0xc0000         0x10000         0x10000

# CuBox-i/Hummingboard
# /dev/mmcblk0              0x60000         0x2000         0x2000

# Utilite 1
# /dev/mtd1               0x0000          0x2000          0x2000
[root@eyez etc]# fw_setenv arcNumber 3960
[root@eyez etc]# fw_setenv machid f78
[root@eyez etc]# fw_setenv mtdparts 'orion_nand'
[root@eyez etc]# fw_setenv ethaddr '00:25:31:05:f3:39'
[root@eyez etc]# fw_setenv bootcmd_uenv 'run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi; sleep 3'
[root@eyez etc]#
Re: Convert Pogoplug Series 4 to Debian, howto?
August 14, 2016 06:02PM
odinb,

> Ok, thanks for the hand-holding! Need a bit more
> help....

On the contrary, I only need to help you to help yourself. You're doing everything right :)

>
> for Part B-e.
> Was this mtdparts correct?
> fw_setenv mtdparts 'orion_nand'

No it is not. If you look back to your save envs using

blparam > current_envs.txt

The mtdparts variable is more than that, it should be set as:
fw_setenv mtdparts 'mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)'


> for Part B-f.
> "[root@eyez etc]# cd /boot/dts
> -bash: cd: /boot/dts: No such file or directory

Which rootfs are you using? if it is my Debian-4.4.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2 then it should have the /boot/dts folder

> Do I need?
> fw_setenv dtb_file

If the rootfs is Debian-3.16.0-kirkwood-tld-2-rootfs-bodhi.tar.bz2 or earlier then yes, it has a non-FDT kernel, so you need to clear this variable so that u-boot knows not to load it.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Convert Pogoplug Series 4 to Debian, howto?
August 14, 2016 09:07PM
bodhi Wrote:
-------------------------------------------------------
> >
> > for Part B-e.
> > Was this mtdparts correct?
> > fw_setenv mtdparts 'orion_nand'
>
> No it is not. If you look back to your save envs
> using
>
>
> blparam > current_envs.txt
>
>
> The mtdparts variable is more than that, it should
> be set as:
>
> fw_setenv mtdparts
> 'mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uIma
> ge2),8M(failsafe),112M(root)'
>
>
>
> > for Part B-f.
> > "[root@eyez etc]# cd /boot/dts
> > -bash: cd: /boot/dts: No such file or directory
>
> Which rootfs are you using? if it is my
> Debian-4.4.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2
> then it should have the /boot/dts folder
>
> > Do I need?
> > fw_setenv dtb_file
>
> If the rootfs is
> Debian-3.16.0-kirkwood-tld-2-rootfs-bodhi.tar.bz2
> or earlier then yes, it has a non-FDT kernel, so
> you need to clear this variable so that u-boot
> knows not to load it.


Ok, fixed the "root@eyez etc]# fw_setenv mtdparts 'mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)'" part!

for the OS, I am still running Archlinux on this box:
[root@eyez etc]# uname -a
Linux eyez 3.1.10-35-ARCH #1 PREEMPT Fri Jan 23 19:14:18 MST 2015 armv5tel GNU/Linux
[root@eyez etc]#

So, what should my next step be? Step "10. Set up net console" (is this applicable to me?), or should I do "install Debian rootfs in step g" from your first post above before rebooting? Can I even follow that guide, since I am currently booted fro Arch on the SATA disk I am using?

Thanks!



Edited 1 time(s). Last edit at 08/14/2016 09:10PM by odinb.
Re: Convert Pogoplug Series 4 to Debian, howto?
August 14, 2016 11:34PM
odinb,

> [root@eyez etc]# uname -a
> Linux eyez 3.1.10-35-ARCH #1 PREEMPT Fri Jan 23
> 19:14:18 MST 2015 armv5tel GNU/Linux

This looks like a older non-FDT Arch kenel.

> So, what should my next step be? Step "10. Set up
> net console" (is this applicable to me?),

Alsway good to set up netconsole, if you don't have serial console.

> should I do "install Debian rootfs in step g" from
> your first post above before rebooting? Can I even
> follow that guide, since I am currently booted fro
> Arch on the SATA disk I am using?

You can follow this guide and install Debian on a USB drive. And when you're happy that it is running OK, you can then reformat the Arch HDD and copy the USB rootfs over.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Convert Pogoplug Series 4 to Debian, howto?
August 15, 2016 07:28PM
Edit:
Ah, just read this thread: http://forum.doozan.com/read.php?3,14

"fw_setenv serverip" should be the IP of the remote host
and
"fw_setenv ipaddr" should be the IP of the plug.

Question, "fw_setenv ipaddr", this should be an IP other than the DHCP IP of the plug, right? In other words, the plug will have 2 IPs, one for net console and one for the host.

Ok, so just for clarification:
fw_setenv ipaddr '192.168.0.xxx' is the server host IP
fw_setenv serverip '192.168.0.yyy' is the netconsole IP

Did that.

So, is it safe to reboot the plug now?

What interfaces can I boot off of? I have USB2/USB3/SATA/SD.
Will it boot off of all these, including the USB3 and SD slot?

Seems I am getting close! This is exciting!


[root@eyez etc]# fw_printenv
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=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec
bootdelay=10
bootdev=usb
device=0:1
devices=usb ide mmc
disks=0 1 2 3
ethact=egiga0
if_netconsole=ping $serverip
led_error=orange blinking
led_exit=green off
led_init=green blinking
dtb_file=/boot/dts/kirkwood-pogo_e02.dtb
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
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
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
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
arcNumber=3960
machid=f78
ethaddr=00:25:31:05:f3:39
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi; sleep 3
mtdparts=mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)
preboot_nc=setenv nc_ready 0; for pingstat in 1 2 3 4 5; do; sleep 1; if run if_netconsole; then setenv nc_ready 1; fi; done; if test $nc_ready -eq 1; then run start_netconsole; fi
preboot=run preboot_nc
ipaddr=192.168.1.89
serverip=192.168.1.99
[root@eyez etc]#



Edited 3 time(s). Last edit at 08/15/2016 07:37PM by odinb.
Re: Convert Pogoplug Series 4 to Debian, howto?
August 15, 2016 09:34PM
odinb,

> "fw_setenv serverip" should be the IP of the
> remote host
> and
> "fw_setenv ipaddr" should be the IP of the plug.
>
> Question, "fw_setenv ipaddr", this should be an IP
> other than the DHCP IP of the plug, right? In
> other words, the plug will have 2 IPs, one for net
> console and one for the host.
>
> Ok, so just for clarification:
> fw_setenv ipaddr '192.168.0.xxx' is the server
> host IP
> fw_setenv serverip '192.168.0.yyy' is the
> netconsole IP
>
> Did that.

The correct terminology is: ipaddr is the IP address of the Pogo V4, serverip is the IP address of the netconsole server (the machine that you are running nc to communicate with the Pogo).

But during u-boot running, this ipaddr is actually whatever you specify here. Later when Debian booted, if you have DHCP, then that IP might not be the same. Usually, we use a static IP for the Pogo in Debian, and also specify that as ipaddr, so that it will be consistent and can be connected always.

So in your case, 89 is the Pogo, 99 is your laptop where you run nc (for example).

ipaddr=192.168.1.89
serverip=192.168.1.99

>
> So, is it safe to reboot the plug now?
>
> What interfaces can I boot off of? I have
> USB2/USB3/SATA/SD.
> Will it boot off of all these, including the USB3
> and SD slot?
>

Whichever drive that you have the Debian rootfs 4.4 on, it will be booted. Except that the USB 3.0 drive can not be used for booting. So if you have created the Debian rootfs 4.4 and mounted it here, then go ahead reboot.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Convert Pogoplug Series 4 to Debian, howto?
August 15, 2016 10:11PM
This is wrong:

dtb_file=/boot/dts/kirkwood-pogo_e02.dtb

Should be

dtb_file=/boot/dts/kirkwood-pogoplug_v4.dtb

If you've already rebooted, It will boot, but you need to adjust it later in Debian.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Convert Pogoplug Series 4 to Debian, howto?
August 15, 2016 11:48PM
Ok, followed your step above: "Create the Debian 4.4 rootfs on USB folowing instruction on http://forum.doozan.com/read.php?2,12096. Pay attention about being root, single Ext3 partition, and skip step 4 (you are going to run with new u-boot)."

EP45-UD3L media # gparted
<Here I formatted to ext3, with label rootfs>
======================
libparted : 2.3
======================
EP45-UD3L media # mount /dev/sde1 /media/usb/
EP45-UD3L media # cd usb/
EP45-UD3L usb # tar -xjvf /home/odinb/Downloads/Debian-4.4.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2
<Here I cut out the long list...>
./lib/startpar/
./lib/startpar/startpar-upstart-inject
./lib/startpar/startpar
./srv/
EP45-UD3L usb # df -kh
Filesystem      Size  Used Avail Use% Mounted on
udev            3.9G   12K  3.9G   1% /dev
tmpfs           799M  1.6M  797M   1% /run
/dev/sda1        22G  5.5G   16G  27% /
none            4.0K     0  4.0K   0% /sys/fs/cgroup
none            5.0M     0  5.0M   0% /run/lock
none            3.9G  868K  3.9G   1% /run/shm
none            100M   20K  100M   1% /run/user
/dev/sdb1       459G   53G  386G  12% /home
/dev/sde1       7.2G  397M  6.5G   6% /media/usb
EP45-UD3L usb # cd etc/
EP45-UD3L etc # vim fstab 
<here I change ext2 to ext3 in fstab and saved>
EP45-UD3L etc # cat fstab 
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
/dev/root      /               ext3    noatime,errors=remount-ro 0 1
tmpfs          /tmp            tmpfs   defaults          0       0
EP45-UD3L boot # sync
EP45-UD3L boot # cd ../..
EP45-UD3L media # umount /dev/sde1
EP45-UD3L media #


Tried first with a USB stick on top (USB2 port):
U-Boot 2016.05-tld-1 (Jun 12 2016 - 13:41:47 -0700)
Pogoplug V4
gcc (Debian 4.9.2-10) 4.9.2
GNU ld (GNU Binutils for Debian) 2.25
Hit any key to stop autoboot:  0
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

Reset IDE: ide_preinit failed

no USB devices available

no IDE devices available
running scan_disk ...
Scan device usb
device usb 0:1
** Bad device usb 0 **
device usb 1:1
** Bad device usb 1 **
device usb 2:1
** Bad device usb 2 **
device usb 3:1
** Bad device usb 3 **
Scan device ide

Reset IDE: ide_preinit failed
device ide 0:1
** Bad device size - ide 0 **
device ide 1:1
** Bad device size - ide 1 **
device ide 2:1
** Bad device ide 2 **
device ide 3:1
** Bad device ide 3 **
Scan device mmc
Card did not respond to voltage select!
device mmc 0:1
** Bad device mmc 0 **
device mmc 1:1
MMC Device 1 not found
MMC Device 1 not found
** Bad device mmc 1 **
device mmc 2:1
MMC Device 2 not found
MMC Device 2 not found
** Bad device mmc 2 **
device mmc 3:1
MMC Device 3 not found
MMC Device 3 not found
** Bad device mmc 3 **
loading uImage ...
** Bad device usb 0 **
loading uInitrd ...
** Bad device usb 0 **
loading DTB /boot/dts/kirkwood-pogo_e02.dtb ...
** Bad device usb 0 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!
Pogov4>

Ended up with red flashing LED in the front.

When that did not work, I tried an SD card, but no luck there either:
U-Boot 2016.05-tld-1 (Jun 12 2016 - 13:41:47 -0700)
Pogoplug V4
gcc (Debian 4.9.2-10) 4.9.2
GNU ld (GNU Binutils for Debian) 2.25
Hit any key to stop autoboot:  0
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

Reset IDE: ide_preinit failed

MMC rescan: current device # 0 initialized OK

no USB devices available

no IDE devices available

Partition Map for MMC device 0  --   Partition Type: DOS

Part   	Start Sector   	Num Sectors    	UUID   		Type
  1    	2048           	15521792       	00021c50-01    	83
loading envs from mmc 0 ...
** File not found /boot/uEnv.txt **
running scan_disk ...
Scan device usb
device usb 0:1
** Bad device usb 0 **
device usb 1:1
** Bad device usb 1 **
device usb 2:1
** Bad device usb 2 **
device usb 3:1
** Bad device usb 3 **
Scan device ide

Reset IDE: ide_preinit failed
device ide 0:1
** Bad device size - ide 0 **
device ide 1:1
** Bad device size - ide 1 **
device ide 2:1
** Bad device ide 2 **
device ide 3:1
** Bad device ide 3 **
Scan device mmc

MMC rescan: current device # 0 initialized OK
device mmc 0:1
1 bytes read in 890 ms (0 Bytes/s)
Found bootable drive on mmc 0
loading uImage ...
3154896 bytes read in 1463 ms (2.1 MiB/s)
loading uInitrd ...
7179935 bytes read in 1801 ms (3.8 MiB/s)
loading DTB /boot/dts/kirkwood-pogo_e02.dtb ...
10446 bytes read in 4181 ms (2 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-4.4.0-kirkwood-tld-1
   Created:      2016-02-19   5:55:25 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3154832 Bytes = 3 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-4.4.0-kirkwood-tld-1
   Created:      2016-02-19   7:33:04 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7179871 Bytes = 6.8 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01c00000
   Booting using the fdt blob at 0x1c00000


Starting kernel ...

It went a bit better, but still no luck.... ended up with solid yellow LED in the front.

Any ideas?



Edited 1 time(s). Last edit at 08/15/2016 11:49PM by odinb.
Re: Convert Pogoplug Series 4 to Debian, howto?
August 16, 2016 12:05AM
Edit: Yers, just saw your post on this also!


Ok, saw one issue!

"loading DTB /boot/dts/kirkwood-pogo_e02.dtb ..." it should be "kirkwood-pogoplug_v4.dtb".
So I did a rename of "kirkwood-pogoplug_v4.dtb" to "kirkwood-pogo_e02.dtb".

U-Boot 2016.05-tld-1 (Jun 12 2016 - 13:41:47 -0700)
Pogoplug V4
gcc (Debian 4.9.2-10) 4.9.2
GNU ld (GNU Binutils for Debian) 2.25
Hit any key to stop autoboot:  0
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

Reset IDE: ide_preinit failed

MMC rescan: current device # 0 initialized OK

no USB devices available

no IDE devices available

Partition Map for MMC device 0  --   Partition Type: DOS

Part   	Start Sector   	Num Sectors    	UUID   		Type
  1    	2048           	15521792       	00021c50-01    	83
loading envs from mmc 0 ...
** File not found /boot/uEnv.txt **
running scan_disk ...
Scan device usb
device usb 0:1
** Bad device usb 0 **
device usb 1:1
** Bad device usb 1 **
device usb 2:1
** Bad device usb 2 **
device usb 3:1
** Bad device usb 3 **
Scan device ide

Reset IDE: ide_preinit failed
device ide 0:1
** Bad device size - ide 0 **
device ide 1:1
** Bad device size - ide 1 **
device ide 2:1
** Bad device ide 2 **
device ide 3:1
** Bad device ide 3 **
Scan device mmc

MMC rescan: current device # 0 initialized OK
device mmc 0:1
1 bytes read in 888 ms (0 Bytes/s)
Found bootable drive on mmc 0
loading uImage ...
3154896 bytes read in 1462 ms (2.1 MiB/s)
loading uInitrd ...
7179935 bytes read in 1799 ms (3.8 MiB/s)
loading DTB /boot/dts/kirkwood-pogo_e02.dtb ...
10246 bytes read in 4206 ms (2 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-4.4.0-kirkwood-tld-1
   Created:      2016-02-19   5:55:25 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3154832 Bytes = 3 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-4.4.0-kirkwood-tld-1
   Created:      2016-02-19   7:33:04 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7179871 Bytes = 6.8 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01c00000
   Booting using the fdt blob at 0x1c00000


Starting kernel ...


This time it boots to solid green, and I can ping it!

I can also SSH to it, but I do not know the user/pass.... help!



Edited 1 time(s). Last edit at 08/16/2016 12:08AM by odinb.
Re: Convert Pogoplug Series 4 to Debian, howto?
August 16, 2016 12:14AM
odinb,

> EP45-UD3L media # gparted

> <Here I formatted to ext3, with label rootfs>
> ======================
> libparted : 2.3
> ======================
> EP45-UD3L media # mount /dev/sde1 /media/usb/
> EP45-UD3L media # cd usb/

Are you root here?

whoami

The USB was not detected by the plug. So this might be a brand problem. Certain brand is pretty bad for booting. Which brand is this?
scanning bus 0 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

Interrupt netconsole and get the envs listing And set the DTB to the correct one while you are at it.

setenv dtb_file '/boot/dts/kirkwood-pogoplug_v4.dtb'
printenv


> Starting kernel ...
>
> It went a bit better, but still no luck.... ended
> up with solid yellow LED in the front.
>

Amber/yellow meaning the rootfs was not mounted. Netconsole only outputs until "Starting kernel ...". There is Debian setup to see more, after you have booted. But let's get it boot into Debian.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Convert Pogoplug Series 4 to Debian, howto?
August 16, 2016 12:16AM
odinb,

> This time it boots to solid green, and I can ping
> it!
>
> I can also SSH to it, but I do not know the
> user/pass.... help!

Cool!

Quote

Updated 20 Feb 2016:

This Debian-4.4.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2 is to keep in sync with kernel Linux-4.4.0-kirkwood-tld-1.

Basic minimal Debian Kirkwood rootfs for most Kirwood plugs:

- tarball size: 137M
- install size: 398M
- a basic jessie rootfs.
- The init system used in this rootfs is sysvinit . To boot with systemd, see note 2 below.
- Installed packages: nano, avahi, ntp, busybox-syslogd (log to RAM), htop, isc-dhcp-client, dialog, bzip2, nfs server/client, iperf, ethtool, sysvinit-core, sysvinit, and sysvinit-utils.
- see LED controls in /etc/rc.local, and /etc/init.d/halt
- see some useful aliases in /root/.profile
- root password: root

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Convert Pogoplug Series 4 to Debian, howto?
August 16, 2016 05:18PM
bodhi Wrote:
-------------------------------------------------------
> odinb,
>
> > EP45-UD3L media # gparted
>
> > <Here I formatted to ext3, with label rootfs>
> > ======================
> > libparted : 2.3
> > ======================
> > EP45-UD3L media # mount /dev/sde1 /media/usb/
> > EP45-UD3L media # cd usb/
>
> Are you root here?
>
>
> whoami
>
>
> The USB was not detected by the plug. So this
> might be a brand problem. Certain brand is pretty
> bad for booting. Which brand is this?

Yes, I was root at the time, done that mistake too many times....

Don't know what USB stick brand it is, a noname I usually use to install OMV, OpenELEC and other small OS!

Fixed the DTB:
debian:~# fw_setenv dtb_file '/boot/dts/kirkwood-pogoplug_v4.dtb'
debian:~# fw_printenv
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=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec
bootdelay=10
bootdev=usb
device=0:1
devices=usb ide mmc
disks=0 1 2 3
ethact=egiga0
if_netconsole=ping $serverip
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
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
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
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
arcNumber=3960
machid=f78
ethaddr=00:25:31:05:f3:39
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi; sleep 3
mtdparts=mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)
preboot_nc=setenv nc_ready 0; for pingstat in 1 2 3 4 5; do; sleep 1; if run if_netconsole; then setenv nc_ready 1; fi; done; if test $nc_ready -eq 1; then run start_netconsole; fi
preboot=run preboot_nc
ipaddr=192.168.1.89
serverip=192.168.1.70
dtb_file=/boot/dts/kirkwood-pogoplug_v4.dtb
debian:~#

Anything else I should do, except for Note 1 and Note 2 (update SSH key and OS, run systemd)?

Can I just run the command as-is, or are changes needed?
fw_setenv usb_set_bootargs 'setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts init=/bin/systemd'

Also, do I need to worry about this message during boot:
loading envs from mmc 0 ...
** File not found /boot/uEnv.txt **

This is the latest firmware/U-Boot as far as understand. What about OS/kernel updates, do i want to go to "linux-4.6.0-kirkwood-tld-1-bodhi.tar.bz2 ", or is it enough to update with apt-get on current level?
root@debian:~# uname -a
Linux debian 4.4.0-kirkwood-tld-1 #1 PREEMPT Mon Jan 25 20:35:24 PST 2016 armv5tel GNU/Linux
root@debian:~#


Thanks a bunch for all help! This is really nice to be able to use the plug for something really useful again (I will use it for https://pi-hole.net)!



Edited 1 time(s). Last edit at 08/16/2016 08:19PM by odinb.
Re: Convert Pogoplug Series 4 to Debian, howto?
August 17, 2016 01:03AM
odinb,

> debian:~# fw_setenv dtb_file
> '/boot/dts/kirkwood-pogoplug_v4.dtb'

Good!

> Anything else I should do, except for Note 1 and
> Note 2 (update SSH key and OS, run systemd)?
>
> Can I just run the command as-is, or are changes
> needed?

No need to change anything. The new u-boot envs take care of disk partitions selection.

> root@debian:~# uname -a
> Linux debian 4.4.0-kirkwood-tld-1 #1 PREEMPT Mon
> Jan 25 20:35:24 PST 2016 armv5tel GNU/Linux

At this point, you just need to reboot and see what comes out of this custom command:

/root/myinfo

And then regenerate SSH key.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Convert Pogoplug Series 4 to Debian, howto?
August 17, 2016 11:13PM
Yup, SSH key already regenerated! One of the first things I did!
Also, changing to bash!

Added this to the ".profile" in the home/user folder:
root@debian:/home/debian# cat .profile
case $- in
  *i*)
    # Interactive session. Try switching to bash.
    if [ -z "$BASH" ]; then # do nothing if running under bash already
      bash=$(command -v bash)
      if [ -x "$bash" ]; then
        export SHELL="$bash"
        exec "$bash" -l
      fi
    fi
esac
root@debian:/home/debian#


For systemd, I could not get it to work even after adding the "fw_setenv usb_set_bootargs 'setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts init=/bin/systemd'" line!

Was getting this:
root@debian:~# systemctl
Failed to get D-Bus connection: Unknown error -1
root@debian:~#

Had to do this:
root@debian:~# apt-get install systemd systemd-sysv
root@debian:~# reboot

Now systemd works!

For the command you wanted me to run, I get nothing!
root@debian:~# /root/myinfo
-su: /root/myinfo: No such file or directory
root@debian:~#
Re: Convert Pogoplug Series 4 to Debian, howto?
August 18, 2016 12:34AM
As Ray said below, run it as an alias,
myinfo
I forgot what I included in this rootfs :)

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 08/18/2016 01:13AM by bodhi.
Re: Convert Pogoplug Series 4 to Debian, howto?
August 18, 2016 12:49AM
myinfo is included as an alias so you need to run it as just myinfo not /root/myinfo. See example from my IOmega Iconnect:

root@iconnect:/tmp# myinfo
iconnect
192.168.11.113
Machine model: Iomega Iconnect
"Debian GNU/Linux 8 (jessie)"
Linux version 4.4.0-kirkwood-tld-1 (root@tldDebian) (gcc version 4.9.2 (Debian 4.9.2-10) ) #1 PREEMPT Mon Jan 25 20:35:24 PST 2016

Ray
Re: Convert Pogoplug Series 4 to Debian, howto?
August 18, 2016 01:11AM
Thanks Ray!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Convert Pogoplug Series 4 to Debian, howto?
August 18, 2016 01:57AM
Is it perhaps because i run bash?

root@debian:~# myinfo
bash: myinfo: command not found
root@debian:~#
Re: Convert Pogoplug Series 4 to Debian, howto?
August 18, 2016 03:03AM
odinb Wrote:
-------------------------------------------------------
> Is it perhaps because i run bash?
>
>
> root@debian:~# myinfo
> bash: myinfo: command not found
> root@debian:~#
>

Because you've wiped out the /root/.profile I've included in the rootfs. Copy/paste the aliases from the original.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Convert Pogoplug Series 4 to Debian, howto?
August 18, 2016 08:56PM
Hi!

All good!

root@pi-hole:~# cat .profile
# ~/.profile: executed by Bourne-compatible login shells.

if [ "$BASH" ]; then
  if [ -f ~/.bashrc ]; then
    . ~/.bashrc
  fi
fi

alias ls="ls -a --color"
alias lst="ls -lrt"
alias ll="ls -l"
alias mymacaddr='x=$(ifconfig eth0) && x=${x#*HWaddr } && echo ${x%% *}'
alias myip='/root/myip.get'
alias mymachine='dmesg | grep -i machine | cut -c16-120'
alias myinfo='hostname;myip;mymachine;cat /proc/version'
alias h='history'

mesg n
root@pi-hole:~# myinfo
pi-hole
192.168.1.90
Machine model: Pogoplug v4
Linux version 4.4.0-kirkwood-tld-1 (root@tldDebian) (gcc version 4.9.2 (Debian 4.9.2-10) ) #1 PREEMPT Mon Jan 25 20:35:24 PST 2016
root@pi-hole:~#

Also, after systemd got fixed, the pi-hole script ran successfully!
(https://pi-hole.net)

Nice to get rid of most ads on my phones and tablets, even in the applications!

Thanks!



Edited 2 time(s). Last edit at 08/19/2016 09:41AM by odinb.
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: