Welcome! Log In Create A New Profile

Advanced

2017.07- 2024.10 U-Boot Kirkwood

Posted by bodhi 
farsheed,

> The only
> issue is that the dockstar loses connection to
> router after a day or so without any reason.I did
> not have this issue with the older archlinux
> install. I am not sure if the whole system
> actually crashes or there is some issue with my
> network/dhcp setting . Any ideas how to
> troubleshoot this problem. .I was trying to find
> system logs to see what exactly fail but cannot
> come up with any explanation.

This problem is on Arch distro so you should ask at Arch site. This is quite different between Arch systemd and Debian sysvinit.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
ok thanks.
bodhi Wrote:
-------------------------------------------------------
> 2014.01 uBoot images for GoFlexNet, GoFlex Home,
> Pogoplug E02, Dockstar, iConnect, Netgear Stora.
>
> These images support the following latest u-Boot
> features (among others):
>
> - both FDT and non-FDT kernel booting
> - supports EFI/GPT partition > 2TB (SATA and USB)
> either for booting or just attached.
> - boot Ext4 rootfs
> ...

Hi all, I'm facing problems trying to boot off gpt partition on my hdd.
I own Netgear Stora and use this uBoot, here's my output:
Netgear Stora> version

U-Boot 2014.01-tld-1 (Mar 17 2014 - 22:25:07)
Netgear-MS2110
gcc (Debian 4.6.3-14) 4.6.3
GNU ld (GNU Binutils for Debian) 2.22
Netgear Stora> ide reset

Reset IDE: Bus 0: OK Bus 1: OK 
  Device 0: Model: WDC WD30EFRX-68EUZN0 Firm: 80.00A80 Ser#:  WD-WMC4N0941090
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 2861588.4 MB = 2794.5 GB (5860533168 x 512)
  Device 1: Model: WDC WD20EZRX-00DC0B0 Firm: 80.00A80 Ser#:  WD-WMC300839711
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 1907729.0 MB = 1863.0 GB (3907029168 x 512)
Netgear Stora> ide part

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

Part    Start Sector    Num Sectors     UUID            Type
  1     1               -1              00000000-01     ee


Partition Map for IDE device 1  --   Partition Type: DOS

Part    Start Sector    Num Sectors     UUID            Type
  1     1               -387938129      00000000-01     ee
Netgear Stora>

on the gpt-aware pc i get the following for the primary hdd (device 0):
root# lsblk /dev/sdf -oname,size,fstype,type,partlabel                         
NAME    SIZE FSTYPE      TYPE PARTLABEL
sdf     2.7T             disk 
├─sdf1  512M ext3        part Linux filesystem
└─sdf2  2.7T LVM2_member part Linux LVM
root# fdisk -l /dev/sdf

Disk /dev/sdf: 2.7 TiB, 3000592982016 bytes, 5860533168 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: gpt
Disk identifier: 5ECAC69A-5B42-490D-88F0-81023B8DD4BC

Device           Start          End   Size Type
/dev/sdf1           40      1048615   512M Linux filesystem
/dev/sdf2      1048616   5860533134   2.7T Linux LVM
Does anyone know how to solve the issue?
Ill,

If the disk does not contain data, reformat it in Debian with parted. Or back up the data and reformat.

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



Edited 1 time(s). Last edit at 06/21/2014 12:22AM by bodhi.
I tried a bunch of partitioning tools, including parted, all with the same result (no result actually). It seems as my box doesn't understand gpt while on the uboot stage. The partition type: DOS and the code EE say that uboot sees the protective MBR, not gpt.
Anyway, the only thing that helped was gdisk's hybrid MBR, but I consider it a dirty hack :)
Ill,

Sorry about this :) I was so sure that it's was included the Netgear patch in u-Boot. But you've found out the hard way, I missed that 1 line of code in the Netgear Stora patch!!! Must have been an editing error. Seems like other Stora users have not tried this feature.

I will release a new u-boot version soon which will include this. Pls check back in a couple weeks.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Glad to hear, bodhi, thank you.
I've uploaded the 2014.01-tld-3 u-Boot image for Netgear Stora. This version corrected the missing support for GPT and large HDD booting.

Since it has not been tested, please remember to try UART booting first before flashing for real.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
bodhi Wrote:
-------------------------------------------------------
> I've uploaded the 2014.01-tld-3 u-Boot image for
> Netgear Stora. This version corrected the missing
> support for GPT and large HDD booting.
>
> Since it has not been tested, please remember to
> try UART booting first before flashing for
> real.

Works great now, thanks for support)
I've uploaded the 2014.07 U-Boot images for GoFlexNet, GoFlex Home, Pogoplug E02, Dockstar, Pogplug V4/Mobile, iConnect, Netgear Stora. Please see 1st post for download link and installation instruction.

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

Thank you @bodhi. Will try to give the PPV4 uBoot a test tonight/tomorrow.

bodhi Wrote:
-------------------------------------------------------
> I've uploaded the 2014.07 U-Boot images for
> GoFlexNet, GoFlex Home, Pogoplug E02, Dockstar,
> Pogplug V4/Mobile, iConnect, Netgear Stora. Please
> see 1st post for download link and installation
> instruction.
hi @bodhi,

I don't think the default uboot environment are correct.

U-Boot 2014.07-tld-1 (Jul 18 2014 - 00:59:45)
Pogoplug V4

SoC:   Kirkwood 88F6192_A1
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  128 MiB
MMC:   kwsdio: 0
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
Hit any key to stop autoboot:  0
(Re)start 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
** Bad device usb 0 **
** Bad device usb 0 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!
Unknown command 'bootcmd_mmc' - try 'help'
Unknown command 'bootcmd_sata' - try 'help'
resetting ...

Looks like you're missing the "run" in front:
bootcmd=run bootcmd_usb; bootcmd_mmc; bootcmd_sata; reset

As feedback, I would like to see the "mmc_bootcmd" and "sata_bootcmd" (<devicetype>_bootcmd) as the standard.
Thanks Gray!

LouisV did report the typos:
http://forum.doozan.com/read.php?2,11663,16696#msg-16696

I've updated the post to indicate that.

Quote

As feedback, I would like to see the "mmc_bootcmd" and "sata_bootcmd" (<devicetype>_bootcmd) as the standard.

The reason I use bootcmd_xxx postfix was to follow the same convention that Jeff used originally. It is nice to see all bootcmd's in the same place when you list it in netconsole or serial console (they are sorted by alphanumeric order).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
bodhi Wrote:
> The reason I use bootcmd_xxx postfix was to follow
> the same convention that Jeff used originally. It
> is nice to see all bootcmd's in the same place
> when you list it in netconsole or serial console
> (they are sorted by alphanumeric order).

Here is the default uboot env from my E02 using Jeff's installation script. He uses <devicetype>_bootcmd as the standard. I believe DavyGravy was the one that switched it up. Doesn't really matter as long as it's consistent. What convention does the uboot from ALARM use?
ethact=egiga0
bootdelay=3
baudrate=115200
mainlineLinux=yes
console=ttyS0,115200
led_init=green blinking
led_exit=green off
led_error=orange blinking
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
mtdids=nand0=orion_nand
partition=nand0,2
stdin=serial
stdout=serial
stderr=serial
rescue_installed=0
rescue_set_bootargs=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts $rescue_custom_params
rescue_bootcmd=if test $rescue_installed -eq 1; then run rescue_set_bootargs; nand read.e 0x800000 0x100000 0x400000; bootm 0x800000; else run pogo_bootcmd; fi
pogo_bootcmd=if fsload uboot-original-mtd0.kwb; then go 0x800200; fi
force_rescue=0
force_rescue_bootcmd=if test $force_rescue -eq 1 || ext2load usb 0:1 0x1700000 /rescueme 1 || fatload usb 0:1 0x1700000 /rescueme.txt 1; then run rescue_bootcmd; fi
ubifs_mtd=3
ubifs_set_bootargs=setenv bootargs console=$console ubi.mtd=$ubifs_mtd root=ubi0:rootfs rootfstype=ubifs $mtdparts $ubifs_custom_params
ubifs_bootcmd=run ubifs_set_bootargs; if ubi part data && ubifsmount rootfs && ubifsload 0x800000 /boot/uImage && ubifsload 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; fi
usb_scan=usb_scan_done=0;for scan in $usb_scan_list; do run usb_scan_$scan; if test $usb_scan_done -eq 0 && ext2load usb $usb 0x800000 /boot/uImage 1; then usb_scan_done=1; echo "Found bootable drive on usb $usb"; setenv usb_device $usb; setenv usb_root /dev/$dev; fi; done
usb_scan_list=1 2 3 4
usb_scan_1=usb=0:1 dev=sda1
usb_scan_2=usb=1:1 dev=sdb1
usb_scan_3=usb=2:1 dev=sdc1
usb_scan_4=usb=3:1 dev=sdd1
usb_init=run usb_scan
usb_device=0:1
usb_root=/dev/sda1
usb_rootfstype=ext2
usb_rootdelay=10
usb_set_bootargs=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params
usb_bootcmd=run usb_init; run usb_set_bootargs; run usb_boot
usb_boot=mw 0x800000 0 1; ext2load usb $usb_device 0x800000 /boot/uImage; if ext2load usb $usb_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
arcNumber=2097
ethaddr=00:25:31:00:aa:aa
bootcmd=usb start; usb stop; usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run rescue_bootcmd; run pogo_bootcmd; reset
Hi bodhi,
I would like to use 3TB hard drives, with arch linux or debian. What is the start point?. I have already installed arch linux from the archlinux website and it works good.But 3TB support is not there. And right now I am using USB drive (top). I would like to use the SD card. And I don't want to solder a serial cable. How do I use the netconsole?. Thanks in advance.
vaidyasr,

If your question is about the Pogo V4 or Mobile with Arch installed, then 3TB is not supported and netconsole is not supported either. This is because current ALARM Pogo V4 U-boot is a variant of stock U-Boot.

So you can install the latest U-Boot in this thread and boot the same Arch rootfs. But with your current U-Boot and Arch installation, you will need to download NAND tools (I mentioned in 1st post) to flash U-Boot. But pls read the entire post before starting.

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

I've re-upload uboot.2014.07-tld-1.environment.img.bodhi.tar to fix typos in bootcmd which was reported in this post.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Hi bodhi,
Do I need to do Step A in page 1?. I don't find /etc/fw_env.config as I am using Arch installed in a USB. How to proceed?
vaidyasr Wrote:
-------------------------------------------------------
> Hi bodhi,
> Do I need to do Step A in page 1?. I don't find
> /etc/fw_env.config as I am using Arch installed in
> a USB. How to proceed?
Just create it with the following command:

echo "/dev/mtd0 0xc0000 0x20000 0x20000">/etc/fw_env.config
Thanks grayman4hire.
I have tried to step 2 got the below
Quote

[root@alarm tmp]# ./fw_printenv ethaddr
Warning: Bad CRC, using default environment
## Error: "ethaddr" not defined
Hi bodhi,
I would like to my PPV4 with Debian. I don't have serial cable. I would like to use SD card as a root device. So, do I need to use Jeff's script?. Please help. I don't want to screw my PPV4 2nd time.

I found the arch linux is recognizing the USB hub which was not recognized by stack OS. Is there a possibility of using the kernel modules/drivers used in arch to the stack OS, so that I don't bother any of the above steps?. I mainly want to use my USB hub, so that I can connect 2+ drives.



Edited 1 time(s). Last edit at 07/22/2014 07:03PM by vaidyasr.
@gray

It is more complicated than just adding the file.

@vaidyasr,

When you boot with Arch installation on Pogo V4/Mobile, you're not using the uboot-env-tools that newer systems are using. You are using blparam (cloudengines tool to deal with NAND).

So let me get you the links to different threads here, and once you've read them, I'll write more explanation.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Ok, thank you. One more question. I found the script in arch linux installation called ppv4-install.sh. which contains similar steps on page 1, but dealt with bldparm, so can I just use the same script by making appropriate changes (not to download uboot from web) and use your uboot?.
vaidyasr Wrote:
-------------------------------------------------------
> Ok, thank you. One more question. I found the
> script in arch linux installation called
> ppv4-install.sh. which contains similar steps on
> page 1, but dealt with bldparm, so can I just use
> the same script by making appropriate changes (not
> to download uboot from web) and use your uboot?.

No.
@vaidyasr,

Here is the thread that shows similar instruction about how to install new U-Boot manually. The starting point is from the Arch Linux installation of Pogo V4/Mobile:

[Pogoplug Mobile/Series 4] Install uBoot/Debian

From this post, you can see the NAND tools set is needed to do the installation, if you are installing from a system that does not provide it (stock Pogo OS, Pogo V4 Arch Linux). And as the result, you need to:

- download NAND tools
- create the file /etc/fw_env.config

Note that I stated this in the first post of this thread (current Arch Linux installation for Pogo V4 is like stock in this aspect):
Quote

Also, if you are running stock kernel, which usually does not provide NAND tools, you can download it here in this thread.

Please ask more questions if you're not sure. Because you could brick your box doing manual installation for U-Boot.

Advice: you should be preprared to connect a serial console in case of something goes wrong.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Please let me know my manual steps are OK.

I downloaded the nandtools and got them in /tmp.

Created /etc/fw_env.config manually by using below commands.
echo "/dev/mtd0 0xc0000 0x20000 0x20000">/etc/fw_env.config

# /tmp/flash_erase /dev/mtd0 0 4

# /tmp/nandwrite /dev/mtd0 uboot.nandpogoV4-MMC-mtdparts-noSATA.kwb

The above are the steps I have planned to do. After that can I just reboot, so that it will start in arch linux, but with 3TB support.
vaidyasr,

Please reread the first post. The link I've included above is only for information. The 1st post in this thread is what you need to follow. Take your time.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
OK, here are my steps.

I believe the link above you have shared should be http://forum.doozan.com/read.php?3,11538,11706
Because in the link I have shared, they have blparam commands.

1. Download UBOOT image from http://bitly.com/1mv0END (PPV4). filename - uboot.2014.07-tld-1.pogo_v4.bodhi.tar
2. Create /etc/fw_env.config manually by using below commands.
Quote

# echo "/dev/mtd0 0xc0000 0x20000 0x20000">/etc/fw_env.config

Flash uBoot
Quote

# /usr/local/bin/cloudengines/bin/blparam > current_envs.txt
# cd /tmp; tar -xf uboot.2014.07.tld-1.goflexnet.bodhi.tar
# /usr/sbin/flash_erase /dev/mtd0 0x100000 4
# /usr/sbin/nandwrite /dev/mtd0 uboot.2014.07.tld-1.goflexnet.mtd0.kwb
# /usr/local/bin/cloudengines/bin/blparam to make sure that there are no errors.

Flash uBoot env
Download uboot.2014.07-tld-1.environment.img.bodhi.tar
Quote

# cd /tmp; tar -xf uboot.2014.07-tld-1.environment.img.bodhi.tar
# /usr/sbin/flash_erase /dev/mtd0 0xc0000 1
# /usr/sbin/nandwrite -s 786432 /dev/mtd0 uboot.2014.07-tld-1.environment.img

Modify env
Quote

# /usr/local/cloudengines/bin/blparam arcNumber=3960
# /usr/local/cloudengines/bin/blparam machid=f78

Restore envs from the saved env.
Quote

# /usr/local/cloudengines/bin/blparam mtdparts='xxxxxxxxx'
# /usr/local/cloudengines/bin/blparam rootfstype='xxxx'
# /usr/local/cloudengines/bin/blparam ethaddr='xx:xx:xx:xx:xx:xx'
That serial should work, same one listed in this blog http://blog.qnology.com/2013/10/pogoplug-e02-v2-serial-connection.html
I don't think it works with windows OS greater than 7
Sorry, you can't reply to this topic. It has been closed.