Welcome! Log In Create A New Profile

Advanced

Netconsole performance

Posted by ubermacin 
Netconsole performance
June 25, 2015 11:38PM
I have a pogoplug e02 running: U-Boot 2014.07-tld-2 (Sep 20 2014 - 00:52:18)

Net console lags, when I type in ? it takes 30-45 seconds to display. In the serial console when booting it says:

host x.x.x.x is alive
Using egiga0 device

Five times in a row (x of course redacted). Is that normal?

Here is my printenv:
p r i n t e n v
baudrate=115200
bootcmd=usb start; setenv letter 9;for type in usb; do for disk in 0 1 2 3; do if ${type} part ${disk};then setexpr letter $letter + 1;run load;fi;done;done;
bootdelay=10
bootm=echo Booting from ${disk} ...; run setargs; bootm ${loadaddr};
bootz=echo Booting from ${disk} ...; run setargs; bootz ${loadaddr} - ${fdt_addr};
console=ttyS0
ethact=egiga0
ethaddr=X:X:X:X:X:X
fdt_addr=0x800000
fdt_file=/boot/dtbs/kirkwood-pogo_e02.dtb
if_netconsole=ping $serverip
importbootenv=echo Importing environment (uEnv.txt)...; env import -t $loadaddr $filesize
ipaddr=x.x.x.x
load=echo Attempting to boot from ${type} ${disk}:1...;if run loadbootenv; then run importbootenv;fi;echo Checking if uenvcmd is set ...;if test -n $uenvcmd; then echo Running uenvcmd ...;run uenvcmd;fi;echo Running default loadzimage ...;if run loadzimage; then run loadfdt;run bootz;fi;echo Running default loaduimage ...;if run loaduimage; then run bootm;fi;
loadaddr=0x810000
loadbootenv=load ${type} ${disk}:1 ${loadaddr} /boot/uEnv.txt
loadfdt=load ${type} ${disk}:1 ${fdt_addr} ${fdt_file}
loaduimage=load ${type} ${disk}:1 ${loadaddr} ${uimage}
loadzimage=load ${type} ${disk}:1 ${loadaddr} ${zimage}
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),-(rootfs)
bc_ready=1
ncip=x.x.x.x
preboot=run preboot_nc
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
serverip=x.x.x.x
setargs=setenv bootargs console=${console},${baudrate} ${optargs} root=/dev/sd${letter}1 rw rootwait ${mtdparts}
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=nc
stdin=nc
stdout=nc
uimage=/boot/uImage
zimage=/boot/zImage
Re: Netconsole performance
June 25, 2015 11:45PM
Also strange, when I try to boot into arch I see in the net console: Unknown command 'setexpr' - try 'help'

I see that in the bootcmd, and now I can't boot into arch now:

[ 12.439090] scsi 0:0:0:0: Direct-Access SanDisk Cruzer Glide 1.27 PQ: 0 ANSI: 6
[ 12.448658] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 12.454289] sd 0:0:0:0: [sda] 31266816 512-byte logical blocks: (16.0 GB/14.9 GiB)
[ 12.463262] sd 0:0:0:0: [sda] Write Protect is off
[ 12.468764] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[ 12.481577] sda: sda1
[ 12.486887] sd 0:0:0:0: [sda] Attached SCSI disk
[ 125.689754] random: nonblocking pool is initialized

I know I still have serial and net console, but not sure what to do next
Re: Netconsole performance
June 26, 2015 12:08AM
ubermacin Wrote:
-------------------------------------------------------
> Also strange, when I try to boot into arch I see
> in the net console: Unknown command 'setexpr' -
> try 'help'
>
> I see that in the bootcmd, and now I can't boot
> into arch now:
>
> [ 12.439090] scsi 0:0:0:0: Direct-Access
> SanDisk Cruzer Glide 1.27 PQ: 0 ANSI: 6
> [ 12.448658] sd 0:0:0:0: Attached scsi generic
> sg0 type 0
> [ 12.454289] sd 0:0:0:0: [sda] 31266816 512-byte
> logical blocks: (16.0 GB/14.9 GiB)
> [ 12.463262] sd 0:0:0:0: [sda] Write Protect is
> off
> [ 12.468764] sd 0:0:0:0: [sda] Write cache:
> disabled, read cache: enabled, doesn't support DPO
> or FUA
> [ 12.481577] sda: sda1
> [ 12.486887] sd 0:0:0:0: [sda] Attached SCSI
> disk
> [ 125.689754] random: nonblocking pool is
> initialized
>
> I know I still have serial and net console, but
> not sure what to do next

You are running my u-boot binary, but your u-boot envs settings are still from Ach u-boot. You should have flashed the default u-boot envs as instructed in step 8.

Since you have serial console, it's easy to recover. Just use the default envs text file:
uboot.2014.07-tld-2.environment (the content of the default envs in text format)
And enter the envs one by one at serial console prompt.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Netconsole performance
June 26, 2015 02:33PM
Hi Bodhi, thank you for your reply. I've started working through it and it's a nightmare so far. I see where on step 8 I missed that part. I thought the first part of the step 8 instructions were done when I verified the part "As described in step 1, u-boot envs must be defined in etc/fw_env.config as ..."

step 8b then states :
Quote

If your u-boot envs is already defined this way (either by Jeff or davygravy u-boot) you can skip this step 8 (optionally, you can go ahead and reflash the default envs and readjust your envs) . However, if you are installing from a recent release of Arch u-boot (2014.04 or after), you do need to do this step (in effect it is a totally different u-boot like the ones below in paragraph c, even though the envs location looks the same, i.e 0xc0000).

I guess I figured I DID do the step because step 8c doesn't describe my pogo (E02) and so I figured I "completed" step 8 via the first statement. Maybe just add that you need to follow Part B or something for those with Arch uboot.

Now on to my current pain point, is there another way to load this thing via rescue or something? Otherwise I've been dealing with this:

PogoE02> setenv bootcmd_usb run usb_init; run set_bootargs_usb; run usb_boot;
s e t e n v b o o t c m d _ u s b r u n u s b _ i n i t ; r u n s e t _ b o o t a r g s _ u s b ; r u n u s b _ b o o t ;
## Error: "set_bootargs_usb" not defined
## Error: "usb_boot" not defined
PogoE02> setenv usb_boot w 0x800000 0 1; run usb_load_uimage; if run usb_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
s e t e n v u s b _ b o o t w 0 x 8 0 0 0 0 0 0 1 ; r u n u s b _ l o a d _ u i m a g e ; i f r u n u s b _ l o a d _ u i n i t r d ; t h e n b o o t m 0 x 8 0 0 0 0 0 0 x 1 1 0 0 0 0 0 ; e l s e b o o t m 0 x 8 0 0 0 0 0 ; f i
## Error: "usb_load_uimage" not defined
## Error: "usb_load_uinitrd" not defined
Wrong Image Format for bootm command
ERROR: can't get kernel image!

maybe I'm doing it wrong again, any help would be appreciated :)
Re: Netconsole performance
June 26, 2015 03:41PM
Okay, I think I got it all running now. Just took a while, thanks again Bohdi!
Re: Netconsole performance
June 27, 2015 12:52AM
ubermacin Wrote:
-------------------------------------------------------
> Okay, I think I got it all running now. Just took
> a while, thanks again Bohdi!

Cool!

And thanks for the feedback about the instruction. I'll see if I can improve the part about Arch u-boot migration.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
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: