Welcome! Log In Create A New Profile

Advanced

Pogoplug E02 Debian Linux Installation Guide

Posted by feas 
Re: Pogoplug E02 Debian Linux Installation Guide
October 19, 2017 02:15PM
Maybe this doesn't matter, but I took a closer look at the versions of /etc/default/rcS and found that the one installed during dist-upgrade is entirely commented out:
#
# /etc/default/rcS
#
# Default settings for the scripts in /etc/rcS.d/
#
# For information about these variables see the rcS(5) manual page.
#
# This file belongs to the "initscripts" package.

# delete files in /tmp during boot older than x days.
# '0' means always, -1 or 'infinite' disables the feature
#TMPTIME=0

# spawn sulogin during boot, continue normal boot if not used in 30 seconds
#SULOGIN=no

# do not allow users to log in until the boot has completed
#DELAYLOGIN=no

# be more verbose during the boot process
#VERBOSE=no

# automatically repair filesystems with inconsistencies during boot
#FSCKFIX=no


Whereas the one that was there before (and which I backed up) assigns several variables:
TMPTIME=0
SULOGIN=no
DELAYLOGIN=no
UTC=yes
VERBOSE=no
FSCKFIX=yes
RAMRUN=no
RAMLOCK=no


Should I just leave it as is (ie with all those lines commented out)?
Re: Pogoplug E02 Debian Linux Installation Guide
October 19, 2017 02:40PM
These are commands that run at system start and are personal preferences.

I would select for myself in the new file:

TMPTIME=0 # will delete the temporary files on boot
DELAYLOGIN=no # Can interrupt incase of issues
VERBOSE=yes # I like seeing stuff
FSCKFIX=yes # Will repair any issues if not shutdown properly

No wrong answer really but arguments could be made for one way or other.
Re: Pogoplug E02 Debian Linux Installation Guide
October 19, 2017 07:12PM
I did the next update/upgrade step and all seemed to go well - a couple of warnings that didn't seem serious, like "can't delete xxx, directory not empty", but no Errors and it seemed to finish normally.

Then I thought something was wrong after reboot - the LED on the front of my Pogoplug did not come on and I did not see it in the list of connected devices on my router, I tried power-cycling it, still no LED or IP connection. Then I left home for a couple hours - when I came back, the LED was still out, but I saw that my router was now listing the Pogoplug. I can SSH into it and it seems fine - maybe the LED will recover on the next upgrade.

One other thing to report is that the output from "uname -a" that I am seeing is different from what you have in your instructions.

You have
3.2.0-4-kirkwood #1 Debian 3.2.81-1 armv5tel GNU/Linux

...and I show
Linux debian 3.16.0-4-kirkwood #1 Debian 3.16.48-1 (2017-09-28) armv5tel GNU/Linux

I'm guessing that's just a result of me updating right now so that I have a more recent install of Jessie? But I thought I'd bring it up.


So I assume that I should now move on to bhodi's uBoot & rootfs/Kernel instructions. From your replies to me I'm guessing that I could just do that with a fresh USB stick - I can do that on this E02/debian system, right? (meaning I don't have to take the USB stick out and boot back to the old Pogoplug OS, or use another Linux box)

thanks once again for all your help



Edited 1 time(s). Last edit at 10/19/2017 08:03PM by huge.
Re: Pogoplug E02 Debian Linux Installation Guide
October 19, 2017 08:30PM
huge Wrote:
-------------------------------------------------------
> I did the next update/upgrade step and all seemed
> to go well - a couple of warnings that didn't seem
> serious, like "can't delete xxx, directory not
> empty", but no Errors and it seemed to finish
> normally.
>
> Then I thought something was wrong after reboot -
> the LED on the front of my Pogoplug did not come
> on and I did not see it in the list of connected
> devices on my router, I tried power-cycling it,
> still no LED or IP connection. Then I left home
> for a couple hours - when I came back, the LED was
> still out, but I saw that my router was now
> listing the Pogoplug. I can SSH into it and it
> seems fine - maybe the LED will recover on the
> next upgrade.
>
> One other thing to report is that the output from
> "uname -a" that I am seeing is different from what
> you have in your instructions.
>
> You have
> 3.2.0-4-kirkwood #1 Debian 3.2.81-1 armv5tel
> GNU/Linux
>
> ...and I show
> Linux debian 3.16.0-4-kirkwood #1 Debian 3.16.48-1
> (2017-09-28) armv5tel GNU/Linux
>
> I'm guessing that's just a result of me updating
> right now so that I have a more recent install of
> Jessie? But I thought I'd bring it up.
>
>
> So I assume that I should now move on to bhodi's
> uBoot & rootfs/Kernel instructions. From your
> replies to me I'm guessing that I could just do
> that with a fresh USB stick - I can do that on
> this E02/debian system, right? (meaning I don't
> have to take the USB stick out and boot back to
> the old Pogoplug OS, or use another Linux box)
>
> thanks once again for all your help

Good job feas:)

hughe, you are running my released kernel. So you can proceed to install new uboot. No need to install rootfs, just update with new kernel.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogoplug E02 Debian Linux Installation Guide
October 19, 2017 09:21PM
huge Wrote:
-------------------------------------------------------
> I did the next update/upgrade step and all seemed
> to go well - a couple of warnings that didn't seem
> serious, like "can't delete xxx, directory not
> empty", but no Errors and it seemed to finish
> normally.
>


The install doesn't always clean itself very well. no worries.


> Then I thought something was wrong after reboot -
> the LED on the front of my Pogoplug did not come
> on and I did not see it in the list of connected
> devices on my router, I tried power-cycling it,
> still no LED or IP connection. Then I left home
> for a couple hours - when I came back, the LED was
> still out, but I saw that my router was now
> listing the Pogoplug. I can SSH into it and it
> seems fine - maybe the LED will recover on the
> next upgrade.
>


I had this problem also. I am not sure if it is a kernel issue or a debian thing but Bodhi fixed it for me here


> One other thing to report is that the output from
> "uname -a" that I am seeing is different from what
> you have in your instructions.
>
> You have
> 3.2.0-4-kirkwood #1 Debian 3.2.81-1 armv5tel
> GNU/Linux
>
> ...and I show
> Linux debian 3.16.0-4-kirkwood #1 Debian 3.16.48-1
> (2017-09-28) armv5tel GNU/Linux
>
> I'm guessing that's just a result of me updating
> right now so that I have a more recent install of
> Jessie? But I thought I'd bring it up.
>


You are correct.


> So I assume that I should now move on to bhodi's
> uBoot & rootfs/Kernel instructions. From your
> replies to me I'm guessing that I could just do
> that with a fresh USB stick - I can do that on
> this E02/debian system, right? (meaning I don't
> have to take the USB stick out and boot back to
> the old Pogoplug OS, or use another Linux box)
>


I suggested another usb stick so as not to undo what you had done that far.

As Bodhi said just upgrade to newer u-boot and kernel.

I think you may be on jessie and stretch is the new os version so you would need to change jessie to stretch in the sources.list and run update/upgrade (dist-upgrade may mess up led again) again or just go ahead and use Bodhi's new rootfs if you want the current stable release.


> thanks once again for all your help

Sorry for not making it clearer in the beginning that Bodhi's way is far quicker and easier. But at least you won't soon forget how to upgrade a system ;)


Welcome to the club and watch the slope, it's slippery.
Re: Pogoplug E02 Debian Linux Installation Guide
October 20, 2017 01:55AM
Much thanks to you both! (Bodhi's post fixed my LED too of course)

I may have taken the long road, but I know so little of this stuff that it's probably just as well.


So the next thing I'm going to try is to install the new uBoot (2016.05-tld-1) and kernel (4.13.5-kirkwood-tld-1) on another USB stick.

Right away I'm confused about something that probably should be obvious ... (A) Can I do all those steps on the debian E02 that I've just update/upgraded, and if so (B) Do I have to either reboot into the old Pogoplug OS with no drive inserted, or unplug the first drive and insert the second so that the new drive will be /dev/sda1? I'm guessing I can't just plug the 2nd drive into another port, format it and then follow instructions.


Just looking ahead to the uBoot instructions I've noticed a discrepancy that may or may not be important:

In the U-Boot instructions it says mtd partitions should be:
mtd0: 00100000 00020000 "u-boot"
mtd1: 00400000 00020000 "uImage"
mtd2: 02000000 00020000 "rootfs"
mtd3: 0db00000 00020000 "data"

My first 3 lines are the same but mtd3 is:
mtd3: 05b00000 00020000 "data"

I don't *exactly* know what mtd partitions are, and I'm generally unclear on what will end up on my thumb drive and what goes in NAND etc, so I don't know whether that's a problem.

humbly,
-huge
Re: Pogoplug E02 Debian Linux Installation Guide
October 20, 2017 02:24AM
huge Wrote:
-------------------------------------------------------
> Much thanks to you both! (Bodhi's post fixed my
> LED too of course)
>
> I may have taken the long road, but I know so
> little of this stuff that it's probably just as
> well.
>
>
> So the next thing I'm going to try is to install
> the new uBoot (2016.05-tld-1) and kernel
> (4.13.5-kirkwood-tld-1) on another USB stick.
>


on another usb stick you would need the rootfs also (its the os) doing it on the same usb stick you could skip the rootfs part.


> Right away I'm confused about something that
> probably should be obvious ...
> (A) Can I do all
> those steps on the debian E02 that I've just
> update/upgraded, and if so


yes


> (B) Do I have to either
> reboot into the old Pogoplug OS with no drive
> inserted, or unplug the first drive and insert the
> second so that the new drive will be /dev/sda1?
> I'm guessing I can't just plug the 2nd drive into
> another port, format it and then follow
> instructions.
>
>
keep the existing stick in, you'll need to see which the new usb stick is (i.e. /dev/sdb)
run "sudo dmesg" insert new usb stick and run it again, you should see the new stick's id.


> Just looking ahead to the uBoot instructions I've
> noticed a discrepancy that may or may not be
> important:
>
> In the U-Boot instructions it says mtd partitions
> should be:
> mtd0: 00100000 00020000 "u-boot"
> mtd1: 00400000 00020000 "uImage"
> mtd2: 02000000 00020000 "rootfs"
> mtd3: 0db00000 00020000 "data"
>
> My first 3 lines are the same but mtd3 is:
> mtd3: 05b00000 00020000 "data"
>
> I don't *exactly* know what mtd partitions are,
> and I'm generally unclear on what will end up on
> my thumb drive and what goes in NAND etc, so I
> don't know whether that's a problem.
>

my simplistic understanding which may be wrong is the first string of numbers is the location the file/directory starts and the size is the second so you don't want overlap but space between is ok.

u-boot is in nand and the mtd partitions along with the environment settings, the rest is on the stick

Bodhi's work/instructions are good to go so you will be all set. But don't worry about bringing things up, as learning what is going on is enpowering. read the instructions twice and make sure you notice which parts are for your device. always feel free to ask before, just like the saying, measure twice cut once

> humbly,
> -huge
Re: Pogoplug E02 Debian Linux Installation Guide
October 20, 2017 03:16AM
I should have noticed that the very next text after the mtd0 etc numbers is also confusing to me ... Bodhi's Uboot instructions:

dev: size erasesize name 
mtd0: 00100000 00020000 "u-boot" 
mtd1: 00400000 00020000 "uImage" 
mtd2: 02000000 00020000 "rootfs" 
mtd3: 0db00000 00020000 "data"

If you don't have /etc/fw_env.config file in your system then go ahead and create this file with the above content. MTD parts are not important for booting and it can be adjusted later. For users who like to keep the stock mtd definition, there is no need to adjust it to the above definition. As long as mtd0 is defined as 1MB (0x 00100000) or greater then it will be OK:
mtd0: 00100000 00020000 "u-boot"

Well, /etc/fw_env.config *is* present on my system, but it looks like this:

# Configuration file for fw_(printenv/saveenv) utility.
# Up to two entries are valid, in this case the redundant
# environment sector is assumed present.
# Notice, that the "Number of sectors" is ignored on NOR.

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


This seems confusing because my fw_env.config file both disagrees with the "above content", AND doesn't seem to go along with the prescription that "mtd0 is defined as 1MB (0x 00100000) or greater".

I'll be happy to ignore this if you say it's not an issue, but it seems like Bodhi's instructions are saying "make sure X is true" and I'm having trouble slicing those numbers to make X true.

thanks,
-huge
Re: Pogoplug E02 Debian Linux Installation Guide
October 20, 2017 03:36AM
huge Wrote:
-------------------------------------------------------
> I should have noticed that the very next text
> after the mtd0 etc numbers is also confusing to me
> ... Bodhi's Uboot instructions:
>
>
> dev: size erasesize name 
> mtd0: 00100000 00020000 "u-boot" 
> mtd1: 00400000 00020000 "uImage" 
> mtd2: 02000000 00020000 "rootfs" 
> mtd3: 0db00000 00020000 "data"
> 
> If you don't have /etc/fw_env.config file in your
> system then go ahead and create this file with the
> above content. MTD parts are not important for
> booting and it can be adjusted later. For users
> who like to keep the stock mtd definition, there
> is no need to adjust it to the above definition.
> As long as mtd0 is defined as 1MB (0x 00100000) or
> greater then it will be OK:
> mtd0: 00100000 00020000 "u-boot"
> 
>
>
> Well, /etc/fw_env.config *is* present on my
> system, but it looks like this:
>
>
> # Configuration file for fw_(printenv/saveenv)
> utility.
> # Up to two entries are valid, in this case the
> redundant
> # environment sector is assumed present.
> # Notice, that the "Number of sectors" is ignored
> on NOR.
> 
> # MTD device name       Device offset   Env. size 
>      Flash sector size       Number of sectors
> /dev/mtd0               0xc0000         0x20000   
>      0x20000
>
>
>
> This seems confusing because my fw_env.config file
> both disagrees with the "above content", AND
> doesn't seem to go along with the prescription
> that "mtd0 is defined as 1MB (0x 00100000) or
> greater".
>

Honestly, it is a bit confusing. Looking down further in Bodhi's u-boot post in step 8 it looks like the desired results are the same as what you have currently.
I believe we would need to see where mtd1 starts to verify that there is enough space to allow for the 1MB for u-boot.
Is what you posted the whole of what you got from /etc/fw_env.config or did you truncate the output to include just mtd0?

> I'll be happy to ignore this if you say it's not
> an issue, but it seems like Bodhi's instructions
> are saying "make sure X is true" and I'm having
> trouble slicing those numbers to make X true.
>
> thanks,
> -huge
Re: Pogoplug E02 Debian Linux Installation Guide
October 20, 2017 03:39AM
No that's all I have (which, yeah, is another level of confusion that I only have one line):
debian:/tmp#
debian:/tmp#
debian:/tmp# cat /etc/fw_env.config
# Configuration file for fw_(printenv/saveenv) utility.
# Up to two entries are valid, in this case the redundant
# environment sector is assumed present.
# Notice, that the "Number of sectors" is ignored on NOR.

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

Re: Pogoplug E02 Debian Linux Installation Guide
October 20, 2017 03:40AM
# Configuration file for fw_(printenv/saveenv) utility.
# Up to two entries are valid, in this case the redundant
# environment sector is assumed present.
# Notice, that the "Number of sectors" is ignored on NOR.

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

Above env location is correct for Pogo E02.

> mtd0: 00100000 00020000 "u-boot" 
> mtd1: 00400000 00020000 "uImage" 
> mtd2: 02000000 00020000 "rootfs" 
> mtd3: 0db00000 00020000 "data"

The above mtd definition is correct for Pogo E02. The mtd3 is irrelevant. When we install new u-boot, mtd0 is what count. The other mtd 1 to 3, you can safely ignore.

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



Edited 1 time(s). Last edit at 10/20/2017 03:41AM by bodhi.
Re: Pogoplug E02 Debian Linux Installation Guide
October 20, 2017 03:42AM
bodhi Wrote:
-------------------------------------------------------
>
> The above mtd definition is correct for Pogo E02.
> The last mtd3 is irrelevant. When we install new
> u-boot, mtd0 is what count. The rest you can
> safely ignore.

Woohoo! Thanks

(and it's OK that my fw_env.config only has one line in it?)
Re: Pogoplug E02 Debian Linux Installation Guide
October 20, 2017 03:45AM
huge Wrote:
-------------------------------------------------------
> bodhi Wrote:
> -------------------------------------------------------
> >
> > The above mtd definition is correct for Pogo
> E02.
> > The last mtd3 is irrelevant. When we install
> new
> > u-boot, mtd0 is what count. The rest you can
> > safely ignore.
>
> Woohoo! Thanks
>
> (and it's OK that my fw_env.config only has one
> line in it?)

Yes! there should be only 1 line. All other lines should be commented out.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogoplug E02 Debian Linux Installation Guide
October 20, 2017 03:47AM
mtd0 is 1MB.

The env location is at 0xc0000 (Its size is 128K).

u-boot image is at 0x0 (its size is 512K).

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



Edited 1 time(s). Last edit at 10/20/2017 03:48AM by bodhi.
Re: Pogoplug E02 Debian Linux Installation Guide
October 20, 2017 03:49AM
Cool, thanks ... sounds like I can move forward with what I have ... sorry for the paranoia
Re: Pogoplug E02 Debian Linux Installation Guide
October 20, 2017 03:51AM
I know it's hard to read :) it is different notation in dmesg and in cat /proc/mtd.

> mtd0: 00100000 00020000 "u-boot"


Meaning the size is 1M, and sector size is 128K.

in dmesg:

[    7.748831] Creating 4 MTD partitions on "orion_nand":
[    7.754003] 0x000000000000-0x000000100000 : "u-boot"     -- 1M
[    7.760055] 0x000000100000-0x000000500000 : "uImage"   -- 4M
[    7.766106] 0x000000500000-0x000002500000 : "rootfs"
[    7.772339] 0x000002500000-0x000010000000 : "data"

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



Edited 1 time(s). Last edit at 10/20/2017 03:54AM by bodhi.
Re: Pogoplug E02 Debian Linux Installation Guide
October 20, 2017 04:44AM
In the U-Boot instructions,

I'm in "B. Flashing default u-boot envs image",
sub-step "f. Adjust the DTB name to boot with a rootfs that has FDT kernel (this is the normal case):

Find your box DTB file in the rootfs /boot/dts directory and adjust the env to it.

Can/should I just ignore this step? I don't have a /boot/dts directory, and the only .dtb files I can find anywhere are in /usr/lib/linux-image-3.16.0-4-kirkwood/

In general should I be following instructions that have to do with FDT kernel?

[edit: Oh LOOK! on the very next line it says
In the special case when you are booting with a non-FDT kernel, or if you have appended the DTB to uImage. Remove the DTB file env. If not sure please post question before continuing.
Surprise, surprise, I'm not sure]



Edited 1 time(s). Last edit at 10/20/2017 04:47AM by huge.
Re: Pogoplug E02 Debian Linux Installation Guide
October 20, 2017 05:04AM
Maybe I should just post my printenv output and see if everything looks OK. Two things that I notice are:

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

(when I don't have a /boot/dts directory and that .dtb file does not appear anywhere under / )


And then ipaddr / serverip are set to 192.168.0.231 / 192.168.0.220, whereas I use a different 192.168.xxx.yyy in my home network. This box is already getting a static IP address from my router if that matters.


Here's the whole fw_printenv output:
debian:/tmp#
debian:/tmp# 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
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
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
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
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=3542
machid=dd6
ethaddr=00:25:31:04:80:8C
debian:/tmp# 
debian:/tmp#

Re: Pogoplug E02 Debian Linux Installation Guide
October 20, 2017 05:07AM
huge Wrote:
-------------------------------------------------------
> In the U-Boot instructions,
>
> I'm in "B. Flashing default u-boot envs image",
> sub-step "f. Adjust the DTB name to boot with a
> rootfs that has FDT kernel (this is the normal
> case):
>
>
> Find your box DTB file in the rootfs /boot/dts
> directory and adjust the env to it.
>
>
> Can/should I just ignore this step? I don't have
> a /boot/dts directory, and the only .dtb files I
> can find anywhere are in
> /usr/lib/linux-image-3.16.0-4-kirkwood/
>
> In general should I be following instructions that
> have to do with FDT kernel?
>
> [edit: Oh LOOK! on the very next line it says
>
> In the special case when you are booting with a
> non-FDT kernel, or if you have appended the DTB to
> uImage. Remove the DTB file env. If not sure
> please post question before continuing. 
>
> Surprise, surprise, I'm not sure]

I believe the instructions are for coming from installing his latest kernel first which includes the dtb directory in /boot.

I think you could do that then continue here.
Re: Pogoplug E02 Debian Linux Installation Guide
October 20, 2017 05:14AM
huge Wrote:
-------------------------------------------------------
> Maybe I should just post my printenv output and
> see if everything looks OK. Two things that I
> notice are:
>
> dtb_file=/boot/dts/kirkwood-pogo_e02.dtb
>
> (when I don't have a /boot/dts directory and that
> .dtb file does not appear anywhere under / )
>
>
> And then ipaddr / serverip are set to
> 192.168.0.231 / 192.168.0.220, whereas I use a
> different 192.168.xxx.yyy in my home network. This
> box is already getting a static IP address from my
> router if that matters.
>
>
You can set the ip address for a system that would act as a ftp server to pull files for booting and or act as the interface for netconsole. This is not really needed if you are not doing that. It's is a good idea to set the system ip for consistency. I would check that your ethaddr is set but I don't think it will cause a big deal if not set now.


> Here's the whole fw_printenv output:
>
> debian:/tmp#
> debian:/tmp# 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
> bootcmd_uenv=run uenv_load; if test $uenv_loaded
> -eq 1; then run uenv_import; fi
> 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
> mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
> 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=3542
> machid=dd6
> ethaddr=00:25:31:04:80:8C
> debian:/tmp# 
> debian:/tmp#
> 
> 
Re: Pogoplug E02 Debian Linux Installation Guide
October 20, 2017 05:19AM
feas Wrote:

>
> I believe the instructions are for coming from
> installing his latest kernel first which includes
> the dtb directory in /boot.
>
> I think you could do that then continue here.

Do you mean pause in the U-Boot instructions & install the latest kernel? Or just dig around and find the one .dtb file I need and copy it to /boot/dts?
Re: Pogoplug E02 Debian Linux Installation Guide
October 20, 2017 05:23AM
do the kernel but don't reboot then continue with u-boot is what i am thinking.
Re: Pogoplug E02 Debian Linux Installation Guide
October 20, 2017 05:27AM
feas Wrote:
-------------------------------------------------------

> >
> You can set the ip address for a system that would
> act as a ftp server to pull files for booting and
> or act as the interface for netconsole. This is
> not really needed if you are not doing that. It's
> is a good idea to set the system ip for
> consistency. I would check that your ethaddr is
> set but I don't think it will cause a big deal if
> not set now.
>
>

I know my ethaddr is correct.

I don't immediately have any need to set up an ftp server. I would like to be able to use netconsole - I assume that means I should set ipaddr to be the static local IP address of the E02. Should I set serverip to the local IP address of my router? Or does it not really matter?
Re: Pogoplug E02 Debian Linux Installation Guide
October 20, 2017 05:29AM
feas Wrote:
-------------------------------------------------------
> do the kernel but don't reboot then continue with
> u-boot is what i am thinking.

Great, thanks. I think I'll pick this up tomorrow.

I know I've thanked you repeatedly, but I'll keep doing it - you're being really helpful, thanks.
Re: Pogoplug E02 Debian Linux Installation Guide
October 20, 2017 05:34AM
huge Wrote:
-------------------------------------------------------
> feas Wrote:
> -------------------------------------------------------
>
> > >
> > You can set the ip address for a system that
> would
> > act as a ftp server to pull files for booting
> and
> > or act as the interface for netconsole. This is
> > not really needed if you are not doing that.
> It's
> > is a good idea to set the system ip for
> > consistency. I would check that your ethaddr is
> > set but I don't think it will cause a big deal
> if
> > not set now.
> >
> >
>
> I know my ethaddr is correct.
>
> I don't immediately have any need to set up an ftp
> server. I would like to be able to use netconsole
> - I assume that means I should set ipaddr to be
> the static local IP address of the E02. Should I
> set serverip to the local IP address of my router?
> Or does it not really matter?

yes set ipaddr for the e02 so you know what it is and don't have to search your router for it should it change across boots.

the serverip should be another computer in your network that you will communicate to the e02 from.

i think there may be an issue if you try to netconsole right now so maybe leave it blank or as is if it doesn't match anything on your network
Re: Pogoplug E02 Debian Linux Installation Guide
October 20, 2017 05:39AM
huge Wrote:
-------------------------------------------------------
> feas Wrote:
> -------------------------------------------------------
> > do the kernel but don't reboot then continue
> with
> > u-boot is what i am thinking.
>
> Great, thanks. I think I'll pick this up tomorrow.
>
>
> I know I've thanked you repeatedly, but I'll keep
> doing it - you're being really helpful, thanks.

i feel bad for setting you down a round about way with my post. i did it before i really knew about Bodhi's way and was really confused with all of the old e02 searches.
hopefully i have made it clearer now in my 1st post or Bodhi could just delete it or have it just point to his rootfs/kernel then uboot post.
Re: Pogoplug E02 Debian Linux Installation Guide
October 20, 2017 03:49PM
feas,

> i feel bad for setting you down a round about way
> with my post. i did it before i really knew about
> Bodhi's way and was really confused with all of
> the old e02 searches.
> hopefully i have made it clearer now in my 1st
> post or Bodhi could just delete it or have it just
> point to his rootfs/kernel then uboot post.

No problem. I've made a note in the first post.

Note to all: the kernel 3.16 is the last non-FDT kernel. Therefore there is no /boot/dts in the rootfs with 3.16.xx or earlier.

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



Edited 1 time(s). Last edit at 10/20/2017 04:03PM by bodhi.
Re: Pogoplug E02 Debian Linux Installation Guide
October 20, 2017 04:12PM
So was I correct to tell Huge to install your latest kernel now and then finish the uboot install from where he is now to get the /boot/dts file for u-boot?
Re: Pogoplug E02 Debian Linux Installation Guide
October 20, 2017 04:21PM
Hi feas,

> So was I correct to tell Huge to install your
> latest kernel now and then finish the uboot
> install from where he is now to get the /boot/dts
> file for u-boot?

Yes, absolutely correct.

When hughe installs the new kernel, the DTS directory will be populated by the tar command to extract DTB files. And then install u-boot right away (don't reboot), which will populate the new default envs. The new default envs tells u-boot to boot the new kernel, which already has the Pogo E02 DTB in /boot/dts.

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



Edited 1 time(s). Last edit at 10/20/2017 04:22PM by bodhi.
Re: Pogoplug E02 Debian Linux Installation Guide
October 20, 2017 04:43PM
feas Wrote:
-------------------------------------------------------
> huge Wrote:
> -------------------------------------------------------
> >
> > I know I've thanked you repeatedly, but I'll
> keep
> > doing it - you're being really helpful, thanks.
>
> i feel bad for setting you down a round about way
> with my post. i did it before i really knew about
> Bodhi's way and was really confused with all of
> the old e02 searches.
> hopefully i have made it clearer now in my 1st
> post or Bodhi could just delete it or have it just
> point to his rootfs/kernel then uboot post.

(A) Certainly no need to feel bad ... I suspect I'm better off having taken the longer road, partly from just following the steps and partly from you helping me out when I ran into something I didn't understand. I definitely wouldn't recommend deleting it



(B), I got through the rootfs installation instructions on my 2nd USB stick, hopefully without mishap. Because those had me extracting the .dtb files, I switched back to the UBoot instructions, created a /boot/dts directory on my first USB drive & copied kirkwood-pogo_e02.dtb there,

I'm a little confused by this step in the UBoot instructions:
C. Add uEnv.txt to /boot directory 

Create a text file in /boot directory with the content in the format that u-boot envs are listed. 

Examples: 

These 4 examples are only to demonstrate the syntax in uEnv.txt (they might or might not apply to your current settings): 

- Load appropriate DTB file for the kernel to run GoFlex Net box. 
- Use only USB drives for kernel and rootfs during booting 
- Use SD card, USB and SATA for booting. The kernel and rootfs search order is as they are appeared on the list: mmc, usb, ide. 
- Define that there are 8 storage devices (i.e. disk partitions). 

cat /boot/uEnv.txt 
dtb_file=/boot/dts/kirkwood-goflexnet.dtb
devices=usb
devices=mmc usb ide
disks=0 1 2 3 4 5 6 7

...but I'm guessing I muddled through it OK. Here's my uEnv.txt:
dtb_file=/boot/dts/kirkwood-pogo_e02.dtb
devices=usb
devices=usb
disks=0 1 2 3 4 5 6 7

Is there anything else I need to think about there?


(C), you said "i think there may be an issue if you try to netconsole right now so maybe leave it blank or as is if it doesn't match anything on your network". I'm wondering whether that has any impact on what I do with the two very last steps in the UBoot instructions:
10. Set up netconsole. It's important to set up neconsole if you don't already have serial console connected. If you've flashed the default environments in step 8 then activate netconsole with the following envs: 

fw_setenv 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'
fw_setenv preboot 'run preboot_nc'
fw_setenv ipaddr    '192.168.0.xxx'
fw_setenv serverip '192.168.0.yyy'

where the 192.168.0.xxx is this plug IP address, and 192.168.0.yyy is the IP address of the netconsole server where it will monitor the output from the this plug (adjust them to the real values in your own local network settings). 

11. Reboot. Upon reboot, in either serial console or netconsole, uBoot banner should show: 

U-Boot 2016.05-tld-1 (Jun 12 2016 ….)
<your box name>



And lastly (D) I'm back to a bit of confusion about where I'm at with 2 USB sticks, and with the differences between installing U-Boot, rootfs & kernel. Tell me if I'm thinking about this right:

-I've installed the new U-Boot with my first USB drive in /dev/sda, so I could now reboot with just that drive attached and it would boot with the new U-Boot but the older kernel that I ended up with.

-Because my 2nd USB drive was in /dev/sdb, I don't know if the fw_setenv commands I executed apply to it & I'm unclear what that means in terms of being able to boot from my 2nd USB drive. Does fw_setenv write to the NAND or to the drive/file-system?

-I've installed rootfs on my 2nd USB drive from Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2, but I haven't gone through the steps of installing linux-4.13.5-kirkwood-tld-1. Does that just mean I have a (hopefully) functional but slightly out-of-date kernel on that drive?
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: