Welcome! Log In Create A New Profile

Advanced

Pogoplug V4 - uBoot with Debian

Posted by Nirmal_Kumar 
Pogoplug V4 - uBoot with Debian
April 16, 2017 12:02PM
Dear Friends,

I have successfully installed uBoot and Debian is running smoothly on my Seagate Dockstar. I used this url http://projects.doozan.com/uboot for uBoot flash.

Now i want to setup the uboot and Debian on my New Pogoplug Series 4. I have few queries before i proceed.

1.Uboot Script : Does this script http://projects.doozan.com/uboot will pick up the latest Uboot or should i need to use a different Url. Because bodhi has mentioned to use the latest uBoot package for a better Modern NAS support.

2.Does anyone has experience in using Debian on micro SD card with class 4 in Pogoplug V4. is that stable?

Thanks
Nirmal
Re: Pogoplug V4 - uBoot with Debian
April 16, 2017 04:24PM
Nirmal_Kumar,


Quote

1.Uboot Script : Does this script http://projects.doozan.com/uboot will pick up the latest Uboot

No, it will install Jeff/davygravy older u-boot.

Quote

should i need to use a different Url. Because bodhi has mentioned to use the latest uBoot package for a better Modern NAS support

Currently, the procedure to install new u-boot for Pogo V4 is a manual procedure:
http://forum.doozan.com/read.php?3,12381

Quote

2.Does anyone has experience in using Debian on micro SD card with class 4 in Pogoplug V4. is that stable?

It is stable. But you need a good SD card brand, such as Sandisk. And make sure to back up your rootfs often.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: Pogoplug V4 - uBoot with Debian
April 20, 2017 01:05AM
Thanks Bodhi.

While flashing the UBoot in Pogo V4, i am getting an error in the SSH, can't fork. How to resolve this?
Re: Pogoplug V4 - uBoot with Debian
April 20, 2017 01:47AM
Nirmal_Kumar Wrote:
-------------------------------------------------------
> Thanks Bodhi.
>
> While flashing the UBoot in Pogo V4, i am getting
> an error in the SSH, can't fork. How to resolve th
> is?

I need to see the log of the teminal session to know what error you have encountered. Please post the log of how you flash u-boot.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: Pogoplug V4 - uBoot with Debian
April 20, 2017 06:34AM
It looks like RAM got low in my Pogo due to some process running behind. I cannot even run basic commands like ls or cp.

Then i resolved by using killall commands smbd and other ftp services running on pogov4. I also faced segmentation fault when running fw_setenv. Then later i resolved it by using the fw_setenv tools from https://github.com/pepaslabs/pogoplug-v4-bodhi-rootfs-debian

Finally, i have installed uboot successfully.

Few Queries :
1.I used your latest instructions on UBoot and also used chainboot loader concept from another blog. It used a different mtdparts which has one additional value called "failsafe".Whats is this for?

2.Is there a way i can confirm my u-boot is installed in the right way. How do i verify this?

3.When i used dmesg it outputs a long list. <3>[36631.420000] uncorrectable error : Is this a known issue?


FYI
- I can able to login to SSH using the old username & password



Edited 1 time(s). Last edit at 04/20/2017 12:27PM by Nirmal_Kumar.
Re: Pogoplug V4 - uBoot with Debian
April 20, 2017 01:08PM
This is the output i got from Netconsole



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
## Error: "bootcmd_mmc" not defined
## Error: "bootcmd_usb" not defined
## Error: "bootcmd_sata" not defined
ubi0: attaching mtd1
ubi0: scanning is finished
ubi0: attached mtd1 (name "mtd=4", size 112 MiB)
ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 512
ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
ubi0: good PEBs: 896, bad PEBs: 0, corrupted PEBs: 0
ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128
ubi0: max/mean erase counter: 18/8, WL threshold: 4096, image sequence number: 0
ubi0: available PEBs: 0, total reserved PEBs: 896, PEBs reserved for bad PEB handling: 8
Loading file 'uboot.mtd0.dockstar.original.kwb' to addr 0x00800000...
Done
Re: Pogoplug V4 - uBoot with Debian
April 20, 2017 09:13PM
Nirmal_Kumar Wrote:
-------------------------------------------------------
> This is the output i got from Netconsole
>
>
>
> 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
> ## Error: "bootcmd_mmc" not defined
> ## Error: "bootcmd_usb" not defined
> ## Error: "bootcmd_sata" not defined
> ubi0: attaching mtd1
> ubi0: scanning is finished
> ubi0: attached mtd1 (name "mtd=4", size 112 MiB)
> ubi0: PEB size: 131072 bytes (128 KiB), LEB size:
> 126976 bytes
> ubi0: min./max. I/O unit sizes: 2048/2048, sub-pag
> e size 512
> ubi0: VID header offset: 2048 (aligned 2048), data
> offset: 4096
> ubi0: good PEBs: 896, bad PEBs: 0, corrupted PEBs:
> 0
> ubi0: user volume: 1, internal volumes: 1, max. vo
> lumes count: 128
> ubi0: max/mean erase counter: 18/8, WL threshold:
> 4096, image sequence number: 0
> ubi0: available PEBs: 0, total reserved PEBs: 896,
> PEBs reserved for bad PEB handling: 8
> Loading file 'uboot.mtd0.dockstar.original.kwb' to
> addr 0x00800000...
> Done

It looks like you did not flash the detault envs image in Step 8.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: Pogoplug V4 - uBoot with Debian
April 20, 2017 09:57PM
Thanks Bodhi.

I flashed and i also verified the output mentioned in Step 8. Now the issue i am facing is the default Pogo OS in not detecting the SATA (top port) drive.

Here the output i got from ptintenv. Should i need to reflash the default env image again?

Pogov4> printenv
printenv
arcNumber=3960
bootcmd=run bootcmd_mmc; run bootcmd_usb; run bootcmd_sata; run bootcmd_pogo; reset
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_pogo=if ubi part root 2048 && ubifsmount ubi:rootfs && ubifsload 0x800000 uboot.mtd0.dockstar.original.kwb ; then go 0x800200; fi
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
dtb_file=/boot/dts/kirkwood-pogo_v4.dtb
ethact=egiga0
ethaddr=00:25:31:05:ec:22
if_netconsole=ping $serverip
ipaddr=192.168.1.5
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_dtb_addr=0x1c00000
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_initrd_addr=0x1100000
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
load_uimage_addr=0x800000
machid=f78
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)
nc_ready=1
ncip=192.168.1.11
partition=nand0,2
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
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.1.11
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=nc
stdin=nc
stdout=nc
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=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
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
usb_ready_retry=15
usb_rootfstype=ext3
Re: Pogoplug V4 - uBoot with Debian
April 21, 2017 08:22PM
Nirmal_Kumar Wrote:
-------------------------------------------------------
> Thanks Bodhi.
>
> I flashed and i also verified the output mentioned
> in Step 8. Now the issue i am facing is the defaul
> t Pogo OS in not detecting the SATA (top port) dri
> ve.
>
> Here the output i got from ptintenv. Should i need
> to reflash the default env image again?
>
> Pogov4> printenv
> printenv
> arcNumber=3960
> bootcmd=run bootcmd_mmc; run bootcmd_usb; run boot
> cmd_sata; run bootcmd_pogo; reset
> 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 lo
> ad_dtb; then bootm $load_uimage_addr - $load_dtb_a
> ddr; else bootm $load_uimage_addr; fi; fi
> bootcmd_pogo=if ubi part root 2048 && ubifsmount u
> bi:rootfs && ubifsload 0x800000 uboot.mtd0.docksta
> r.original.kwb ; then go 0x800200; fi
> 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
> dtb_file=/boot/dts/kirkwood-pogo_v4.dtb
> ethact=egiga0
> ethaddr=00:25:31:05:ec:22
> if_netconsole=ping $serverip
> ipaddr=192.168.1.5
> led_error=orange blinking
> led_exit=green off
> led_init=green blinking
> load_dtb=echo loading DTB $dtb_file ...; load $boo
> tdev $device $load_dtb_addr $dtb_file
> load_dtb_addr=0x1c00000
> load_initrd=echo loading uInitrd ...; load $bootde
> v $device $load_initrd_addr /boot/uInitrd
> load_initrd_addr=0x1100000
> load_uimage=echo loading uImage ...; load $bootdev
> $device $load_uimage_addr /boot/uImage
> load_uimage_addr=0x800000
> machid=f78
> mainlineLinux=yes
> mtdids=nand0=orion_nand
> mtdparts=mtdparts=orion_nand:2M(u-boot),3M(uImage)
> ,3M(uImage2),8M(failsafe),112M(root)
> nc_ready=1
> ncip=192.168.1.11
> partition=nand0,2
> 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 set
> env nc_ready 1; fi; done; if test $nc_ready -eq 1;
> then run start_netconsole; fi
> 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 S
> can device $dev; run scan_$dev; for disknum in $di
> sks; do if test $scan_done -eq 0; then echo device
> $dev $disknum:1; if load $dev $disknum:1 $load_uim
> age_addr /boot/uImage 1; then scan_done=1; echo Fo
> und bootable drive on $dev $disknum; setenv device
> $disknum:1; setenv bootdev $dev; fi; fi; done; fi;
> done
> serverip=192.168.1.11
> set_bootargs=setenv bootargs console=ttyS0,115200
> root=LABEL=rootfs rootdelay=10 $mtdparts $custom_p
> arams
> start_netconsole=setenv ncip $serverip; setenv boo
> tdelay 10; setenv stdin nc; setenv stdout nc; sete
> nv stderr nc; version;
> stderr=nc
> stdin=nc
> stdout=nc
> uenv_addr=0x810000
> uenv_import=echo importing envs ...; env import -t
> $uenv_addr $filesize
> uenv_init_devices=setenv init_usb "usb start"; se
> tenv init_ide "ide reset"; setenv init_mmc "mmc r
> escan"; for devtype in $devices; do run init_$devt
> ype; done;
> uenv_load=run uenv_init_devices; setenv uenv_loade
> d 0; for devtype in $devices; do for disknum in 0
> ; do run uenv_read_disk; done; done;
> uenv_read=echo loading envs from $devtype $disknum
> ...; if load $devtype $disknum:1 $uenv_addr /boot/
> uEnv.txt; then setenv uenv_loaded 1; fi
> uenv_read_disk=if test $devtype -eq mmc; then if $
> devtype part; then run uenv_read; fi; else if $de
> vtype part $disknum; then run uenv_read; fi; fi
> usb_ready_retry=15
> usb_rootfstype=ext3

No you can't boot the stock OS in NAND without further changes in uboot envs. It is set up to boot with USB, HDD, or SD card rootfs.

The reason that we want to use the new uboot : to make it easier booting to Linux on any type of external devices. So I would suggest you create a new rootfs on USB or SD card and boot with it.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner



Edited 1 time(s). Last edit at 04/21/2017 08:23PM by bodhi.
Re: Pogoplug V4 - uBoot with Debian
April 22, 2017 01:14AM
Hi Bodhi,

Thanks for your inputs. Now i was successfully able to install Debian and running smoothly.

Here the details:
1.Earlier i ran fw_setenv and altered the bootcmd from a different tutorial. Then i changed it based on new uBoot Image envionment properties
2.I used Kingston 4 GB class 4 Memory card in the MMC drive in pogoplug series 4

Few Queries :
1.How do i backup rootfs automtaically instead of ejecting and backing up?
2.What is the objective of setting init=/bin/systemd in bootargs. Should i use usb_boot_args or boot_args property?
3.Is there any post in this forum which explains how to set samba configuration to get good speed in the LAN?

Bodhi, Thanks for all your support to the community. I wish i document all my learning and share the same back to the community with respect to this embedded device pogoplu/dockstar experience.

~ Nirmal, India
Re: Pogoplug V4 - uBoot with Debian
April 22, 2017 03:19AM
Hi Nirmal,

> Thanks for your inputs. Now i was successfully abl
> e to install Debian and running smoothly.

Cool!

> 1.How do i backup rootfs automtaically instead of
> ejecting and backing up?

You need to use rsync to back up a live rootfs to a USB drive, or to a NFS share folder. If you can't find a tutorial how to do that then post back and I'll post some instruction.

> 2.What is the objective of setting init=/bin/syste
> md in bootargs. Should i use usb_boot_args or boot
> _args property?

If you want to boot with systemd as the Linux init system. Set custom_params, because you are booting with the default envs, where custom_params is a extra option in bootargs:

set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params

> 3.Is there any post in this forum which explains h
> ow to set samba configuration to get good speed in
> the LAN?
>

Yes. Look in the Wiki thread:

Quote

Samba

Samba smb.conf for a simple set up
HowTo setup Samba/CIFS shares

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: Pogoplug V4 - uBoot with Debian
April 23, 2017 12:08PM
Hi Bodhi,

I cam across the following tutorial for backing up the rootfs. Could you please let me know is this the apt one to go.?

https://wiki.archlinux.org/index.php/full_system_backup_with_rsync
https://wiki.debian.org/Backup/Clone

Queries :
1.Is it possible to backup the live system or should i need to shutdown and clone the rootfs

Thanks again..
Re: Pogoplug V4 - uBoot with Debian
April 23, 2017 05:18PM
Nirmal,

> https://wiki.archlinux.org/index.php/full_system_b
> ackup_with_rsync

The above is a good tutorial to back up live rootfs.

> Queries :
> 1.Is it possible to backup the live system or shou
> ld i need to shutdown and clone the rootfs
>

The best way to back up is to clone the rootfs. This Debian link is a good one.
https://wiki.debian.org/Backup/Clone

But it is easier to use tar command like I wrote:
http://forum.doozan.com/read.php?2,12096,24034#msg-24034

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner



Edited 1 time(s). Last edit at 04/23/2017 05:19PM by bodhi.
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: