Welcome! Log In Create A New Profile

Advanced

2017.07-2023.04 U-Boot Kirkwood - GoFlexNet, GoFlexHome, PogoE02, Dockstar, iConnect, NetgearStora, PogoV4/Mobile, Sheevaplug, NSA325, NSA320, NSA310S, NSA320S, NSA310, HP T5325, Dreamplug

Posted by bodhi 
Agreed. The proper solutions would be for the jffs2 driver to have a mount option which would specify which forms of compression could be used, or for the file system itself to have such an option (similar to what might be settable by the tune2fs command on an ext* FS. If there is such a mount option, I couldn't find it. There was some talk of a FS option being introduced at some point, but obviously, even if our Pogos have it, it was not set up correctly. So your options are (1) always mount the jffs2 FS RO, or (2) use it and forego the ability to boot back to the Pogo OS.

There is little reason change the FS, except for the case where you make some change in the Pogo OS that leaves it unbootable. OTOH, I see little reason to ever have to boot the Pogo OS except for nostalgia.

A side question: What is the data partition, mtd3 used for? It is the largest of the four partitions. Does the stock OS use it at all? I suppose one could create a FS there (probably a UBIFS would be best) if one desires to store some files in the PogoPlug itself.
restamp,

> OTOH, I see little
> reason to ever have to boot the Pogo OS except for
> nostalgia.

True. We did an excercise mostly for the sake of knowledge. But it might be useful to others who want to sell their devices, or for someone who just want to have a simple rescue mechanism without installing a more advance rescue system.

> A side question: What is the data partition, mtd3
> used for? It is the largest of the four
> partitions. Does the stock OS use it at all? I
> suppose one could create a FS there (probably a
> UBIFS would be best) if one desires to store some
> files in the PogoPlug itself.

There is nothing in mtd3. It could be repurposed to combine with mtd2 for Emdebian, or other rootfs. Note that Jeff's and davygravy rescue systems didn't change the mtdparts definition and I recall that their rescue systems did not use mtd3 (I could be wrong). It would be a really good place to flash a binary for special purpose device (instead of messing with the rootfs on mtd2).

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

I gather this uboot.2014.07-tld-2.pogo_e02.bodhi.tar will work with a PogoPlug P02, right?
habibie

> Bodhi,
>
> I gather this
> uboot.2014.07-tld-2
> .pogo_e02.bodhi.tar
will work with a
> PogoPlug P02, right?

No. The one in my signature with OXNAS name.
http://forum.doozan.com/read.php?3,16017

See this post:
http://forum.doozan.com/read.php?2,20686,21008#msg-21008

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



Edited 2 time(s). Last edit at 04/07/2015 04:48PM by bodhi.
bodhi Wrote:
-------------------------------------------------------
> It is. Separate power source is needed. 2
> choices:
>
> 1. eSata enclosure
> or
> 2. a cable directly connect to the port but the
> HDD draws power source from outside.
>
>
> EDITED: wrong link for the cable (I can't seem to
> find the correct one on my bookmarks)

eSata enclosures would also need power from an outside source though :\. Oh well. I bought a 2.5 inch drive which works well enough.

I wonder if the power problems come from the 12V rail or the 5V rail. If the 12V, could probably tap the pogoplug's power adapter :B.
Hey, I have postet this already here, but this might be even a better place.

I will have a NSA310 around until end of April. I'd like to have a working u-boot with netconsole working so that I could watch the server boot/shutdown from within the network.

As far as I understood, support for the NSA310 has not been provided yet due to lack of devices. So I would like to offer my help developing a NSA31 u-boot. As the NSA310 is not far away fro the NSA320, it should not be such a big deal (at least I hope so).

What did I do so far? I have downloaded the latest NSA320 u-boot from bodhis dropbox and uploaded it to the NSA310 using kwboot. It got transferred and the device rebooted, but it got stuck saying the name of SOC.

So I pulled the lates git sources, copied nsa320.h to nsa310.h, did so for any other files under 'board', exchanged any NSA320 strings to NSA310, did make nsa310_config and make. The make process produced severa u-boot.* files, but none of them could be transferred to the device using kwboot, it failed saying invalid image.

So, currently I am stuck. If I were able to get an uart image from the sources, I would possibly start poking around. However, right now I need some help to get further.
marlemion,

> So, currently I am stuck. If I were able to get an
> uart image from the sources, I would possibly
> start poking around. However, right now I need
> some help to get further.

Consider where you are right now, I don't think 2 weeks is enough to get it working (I don't have a lot of free time, atm). So I guess it will be another time to revisit this.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Well, I don't give up sooo easily. :)

I managed to make the kwb image (make u-boot.kwb), too easy. It gets loaded by kwboot, but stops at the same message as the precompiled.

So I turned on Debug in common.h and get the following:

U-Boot 2014.07-gbb8ac0e-dirty (Apr 16 2015 - 13:42:10)
ZyXEL NSA310 1-Bay Power Media Server

U-Boot code: 00600000 -> 00668EB4  BSS: -> 006B7870
SoC:   Kirkwood 88F6281_A1
monitor len: 000B7870
ramsize: 20000000
TLB table from 1fff0000 to 1fff4000
Top of RAM usable for U-Boot at: 1fff0000
Reserving 734k for U-Boot at: 1ff38000
Reserving 4224k for malloc() at: 1fb18000
Reserving 36 Bytes for Board Info at: 1fb17fdc
Reserving 160 Bytes for Global Data at: 1fb17f3c
New Stack Pointer is: 1fb17f30


Looks like there is something wrong with the memory. I saw that in kwbimage.cfg a 256mb memory chip is defined. Doesn't have the zyxel NSA320 512mb? Is there a multiplicator (x2) somewhere in the code?

EDIT: Nevermind, I've got it working at least to the u-boot prompt.

Changes in kwbimage.cfg:

# NSA320 bits
# DATA 0xFFD01508 0x10000000    # CS[1]n Base address to 256Mb
# DATA 0xFFD0150C 0x0FFFFFF5    # CS[1]n Size 256Mb Window enabled for CS1
# NSA320 bits

DATA 0xFFD01508 0x00000000      # CS[1]n Size, window disabled
DATA 0xFFD01514 0x00000000      # CS[2]n Size, window disabled
DATA 0xFFD0151C 0x00000000      # CS[3]n Size, window disabled


How can I export and import the printenv from the NAND to test booting?

EDIT2: After disabling Debug again, I now get the following output:

U-Boot 2014.07-gbb8ac0e (Apr 16 2015 - 14:00:00)
ZyXEL NSA310 1-Bay Power Media Server

SoC:   Kirkwood 88F6281_A1
DRAM:  256 MiB
WARNING: Caches not enabled
NAND:  128 MiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   egiga0
PHY reset timed out
MV88E1318 PHY initialized on egiga0
Hit any key to stop autoboot:  0 
NSA310>


Where does the CRC error come from? Is it supposed to read the environment from the NAND at that point?

EDIT3: Ok, got it booting. My arch has a separate boot partition at /dev/sda1. It finds it, but does search for /boot/uImage instead of /uImage. So I created another boot directory in /boot and linked the uImage there. Does not boot properly, as the init is not found. But those are problems I could handle myself.

Another problem: my router says that the u-boot has an ip when started and waiting at the command prompt. However, I can't ping from inside u-boot nor ping from outside to u-boot. Do I need some more environment variables for netconsole to work?

EDIT4: Definitely _not_ working is the network interface. u-boot tells that it is initialized and it is blinking, but it does not respond to any ping nor does it ping itself, regardless which combination of netmask/ipaddr/gatewayip I chose. :(

EDIT5: The problem is that the NSA310 has a Realtek 8169 network chip instead of a Marvell Alaska 88E1318. I am currently checking if I can use some code of other boards having this chip, too.

EDIT6: Well, the chip is a RTL8111d chip (so reported by linux kernel, the chip itself says RTL8111DL). This chips should be supported by the rtl8169.c driver provided by u-boot. However, I have difficulties to add it to the nsa310 uboot build.

What I did so far was:

/*
 * Ethernet Driver configuration
 */
#ifdef CONFIG_CMD_NET
#define CONFIG_RTL8169                  1       /* Network device */
#define CONFIG_MVGBE_PORTS              {0, 0}  /* enable port 0 only */
#define CONFIG_PHY_BASE_ADR             0x1
#define CONFIG_PHY_GIGE
#define CONFIG_NETCONSOLE
#endif /* CONFIG_CMD_NET */

So I set thhe MVGBE Ports to be both disabled. Removing MVGBE completely resulted in a dependency hell. Apparently it is quite deeply woven in the kirkwood code. Looks like nobody expected kirkwood to use a different ethernet chip. Furthermore, I added the RTL8169 chipset. I also removed the MV8XXXX reset code from nsa310.c, as it is related to the not used ethernet chip only. To get anything to initialize, I added:

int board_eth_init(bd_t *bis)
{
        return rtl8169_initialize(bis);
}

to nsa310.c.

However, this resulted in:

/u-boot-kirkwood-marlemion/drivers/net/rtl8169.c:481: undefined reference to `pci_bus_to_hose'
/u-boot-kirkwood-marlemion/drivers/net/rtl8169.c:481: undefined reference to `pci_hose_bus_to_phys'
drivers/net/built-in.o: In function `rtl_send':
/u-boot-kirkwood-marlemion/drivers/net/rtl8169.c:530: undefined reference to `pci_bus_to_hose'
/u-boot-kirkwood-marlemion/drivers/net/rtl8169.c:530: undefined reference to `pci_hose_bus_to_phys'
drivers/net/built-in.o: In function `rtl8169_init_ring':
/u-boot-kirkwood-marlemion/drivers/net/rtl8169.c:688: undefined reference to `pci_bus_to_hose'
/u-boot-kirkwood-marlemion/drivers/net/rtl8169.c:688: undefined reference to `pci_hose_bus_to_phys'
drivers/net/built-in.o: In function `rtl8169_hw_start':
/u-boot-kirkwood-marlemion/drivers/net/rtl8169.c:635: undefined reference to `pci_bus_to_hose'
/u-boot-kirkwood-marlemion/drivers/net/rtl8169.c:635: undefined reference to `pci_hose_bus_to_phys'
/u-boot-kirkwood-marlemion/drivers/net/rtl8169.c:637: undefined reference to `pci_bus_to_hose'
/u-boot-kirkwood-marlemion/drivers/net/rtl8169.c:637: undefined reference to `pci_hose_bus_to_phys'
drivers/net/built-in.o: In function `rtl8169_initialize':
/u-boot-kirkwood-marlemion/drivers/net/rtl8169.c:924: undefined reference to `pci_find_devices' 
/u-boot-kirkwood-marlemion/drivers/net/rtl8169.c:927: undefined reference to `pci_read_config_word'
/u-boot-kirkwood-marlemion/drivers/net/rtl8169.c:938: undefined reference to `pci_read_config_dword'
/u-boot-kirkwood-marlemion/drivers/net/rtl8169.c:953: undefined reference to `pci_bus_to_hose'
/u-boot-kirkwood-marlemion/drivers/net/rtl8169.c:953: undefined reference to `pci_hose_bus_to_phys'
arm-none-eabi-ld.bfd: BFD (GNU Binutils) 2.25 assertion fail elf32-arm.c:7827
arm-none-eabi-ld.bfd: BFD (GNU Binutils) 2.25 assertion fail elf32-arm.c:7827
arm-none-eabi-ld.bfd: BFD (GNU Binutils) 2.25 assertion fail elf32-arm.c:7827
arm-none-eabi-ld.bfd: BFD (GNU Binutils) 2.25 assertion fail elf32-arm.c:7827
arm-none-eabi-ld.bfd: BFD (GNU Binutils) 2.25 assertion fail elf32-arm.c:7827
arm-none-eabi-ld.bfd: error: required section '.rel.plt' not found in the linker script
arm-none-eabi-ld.bfd: final link failed: Invalid operation


Thus, I added CONFIG_PCI to include/configs/nsa310.h

/*
 * Ethernet Driver configuration
 */
#ifdef CONFIG_CMD_NET
#define CONFIG_RTL8169                  1       /* Network device */
#define CONFIG_PCI                      1       /* Network device */
#define CONFIG_MVGBE_PORTS              {0, 0}  /* enable port 0 only */
#define CONFIG_PHY_BASE_ADR             0x1
#define CONFIG_PHY_GIGE
#define CONFIG_NETCONSOLE
#endif /* CONFIG_CMD_NET */


However, this throws another error:

drivers/pci/built-in.o: In function `pci_init':
/u-boot-kirkwood-marlemion/drivers/pci/pci.c:723: undefined reference to `pci_init_board'
arm-none-eabi-ld.bfd: BFD (GNU Binutils) 2.25 assertion fail elf32-arm.c:7827
arm-none-eabi-ld.bfd: error: required section '.rel.plt' not found in the linker script
arm-none-eabi-ld.bfd: final link failed: Invalid operation


AFAIK, arm has no pci at all, so it would make sense. I am quite lost atm.

EDIT7: So the RTL8111d chip is an PCI-e chip. PCI-e is initialized, however, the linking problems remain. Does anybody know how to get further?

EDIT8:

Ok, some further investigation. include/netdev.h states:

/* Boards with PCI network controllers can call this from their board_eth_init()
 * function to initialize whatever's on board.
 * Return value is total # of devices found */

static inline int pci_eth_init(bd_t *bis)
{
        int num = 0;

#ifdef CONFIG_PCI

[...]

#if defined(CONFIG_RTL8169)
        num += rtl8169_initialize(bis);
#endif

[...]

#endif  /* CONFIG_PCI */
        return num;
}

Thus, I will need to define CONFIG_PCI and CONFIG_RTL8169 in the nsa310.h config file and then I should be able to invoke the ethernet card using

int board_eth_init(bd_t *bis)
{
        return pci_eth_init(bis);
}

in nsa310.c.

However, this results in the known error 'undefined reference to `pci_init_board'' (s.above). pci.c refers to a 'board specific pci_init_board function'. Well, when grepping through the c files given in the board directory, one can find a diversity of these functions.

It is no clear to me, if the PCI-e port needs additional initialization, is not properly initialized (AFAIK it is not used by the other boards, how could I test this?), or does not need any further initialization at all.

Depending on the answers to these questions, it might be necessary to deliver a board-specific pci controller function for the NSA310...

BTW, when I compile the image without CONFIG_PCI, it compiles fine but does not find any ethernet controller, which makes sense.



Edited 8 time(s). Last edit at 04/17/2015 03:29AM by marlemion.
Hi, I run following and got bad blocks ((

/tmp $ dmesg | grep -i 'bad'
Scanning device for bad blocks
Bad eraseblock 100 at 0x000000c80000
Bad eraseblock 200 at 0x000001900000
Bad eraseblock 979 at 0x000007a60000
block 21 is bad

May I flash to new uBoot?

Thank you.
@bodhi

Im having an issue updateing to the latest uboot. (2014.07) Currently on the test version you released for the (2013.10) nsa325.

when I cat /proc/mtd I get:

dev:    size   erasesize  name
mtd0: 08000000 00020000 "orion_nand"

Im using the default uboot env you posted in this thread with ethaddr changed and root set. Im also using your stock jessie 3.18.5 rootfs.
Buttzy,

After flashing default envs, did you adjust the mtdparts to the orginal as:
mtdparts=mtdparts=orion_nand:0x100000(uboot),0x80000(stock_uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2)

Please post the output of fw_printenv and I'll take a look.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
andsol Wrote:
-------------------------------------------------------
> Hi, I run following and got bad blocks ((
>
> /tmp $ dmesg | grep -i 'bad'
> Scanning device for bad blocks
> Bad eraseblock 100 at 0x000000c80000
> Bad eraseblock 200 at 0x000001900000
> Bad eraseblock 979 at 0x000007a60000
> block 21 is bad
>
> May I flash to new uBoot?
>
> Thank you.

The output seems to get cut off here:
> block 21 is bad

Can you repost the exact output of
dmesg | grep -i bad

In any case, if the bad blocks are not in the first 1MB (block 0 to 7) then it's OK to flash new u-boot.

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

Unfortunately my nsa325v2 became a brick (((.

It reboots constantly.
When press on power: HDD1 light blink with green and then SYS green, 30 secs it repeats.

I bought serial cable and terminal shows me this:

▒_!5e57-=▒Y5▒▒▒Y!y▒▒▒▒i-▒▒▒s▒▒▒▒A▒▒▒▒w[}e▒▒▒▒▒▒▒e-{▒▒T_▒▒k▒-▒y=9/5▒#!▒5#=;'57▒▒▒▒▒-▒▒▒▒▒e-{▒▒[▒▒▒▒▒▒5'▒▒a▒▒▒▒5'▒▒u▒▒▒5'▒▒▒5▒▒▒▒51-1=▒▒▒Y▒▒u▒▒▒▒_oM▒-#--='-
                                                                          57▒!#▒▒!▒!▒=!;!!▒▒▒▒▒▒▒￟▒▒▒cY}▒▒▒▒▒|||||||||||||||
When I connect cable it not reboots, it just showing this symbol "|" continuosly.
(probabbly something wrong with cable)


My steps was:

1. Download this: uboot.2014.07-tld-3.nsa325.bodhi.tar
2. flash_erase /dev/mtd0 0 4
Erase Total 4 Units 
Performing Flash Erase of length 131072 at offset 0x60000 done
3. nandwrite /dev/mtd0 uboot.2014.07-tld-3.nsa325.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
4. ./flash_erase /dev/mtd0 0xc0000 1
Erase Total 1 Units
Performing Flash Erase of length 131072 at offset 0xc0000 done
5. ./nandwrite -s 786432 /dev/mtd0 uboot.2014.07-tld-2.environment.img
Writing data to block 6 at offset 0xc0000
6. Then i modified etc/fw_env.config to this:
# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors
# NAND example
/dev/mtd0               0xc0000         0x20000         0x20000                 4
7. Set env
/tmp # fw_setenv arcNumber 4495
/tmp # fw_setenv machid
/tmp # fw_printenv
/tmp # fw_setenv ipaddr '192.168.0.3'
/tmp # fw_setenv serverip '192.168.0.2'
/tmp # fw_setenv preboot 'run preboot_nc'
8. My final conf was:
/tmp # fw_printenv
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
baudrate=115200
bootcmd=run bootcmd_uenv; run bootcmd_usb; run bootcmd_mmc; run bootcmd_sata; reset
bootcmd_mmc=run mmc_init; run set_bootargs_mmc; run mmc_boot
bootcmd_sata=run sata_init; run set_bootargs_sata; run sata_boot;
bootcmd_usb=run usb_init; run set_bootargs_usb; run usb_boot;
bootdelay=10
console=ttyS0,115200
device=0:1
ethact=egiga0
if_netconsole=ping $serverip
led_error=orange blinking
led_exit=green off
led_init=green blinking
mainlineLinux=yes
mmc_boot=mw 0x800000 0 1; run mmc_load_uimage; if run mmc_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
mmc_init=mmc rescan
mmc_load_uimage=ext2load mmc $device 0x800000 /boot/uImage
mmc_load_uinitrd=ext2load mmc $device 0x1100000 /boot/uInitrd
mmc_root=/dev/mmcblk0p1
mtdids=nand0=orion_nand
partition=nand0,2
preboot_nc=run if_netconsole start_netconsole
rootdelay=10
rootfstype=ext3
sata_boot=mw 0x800000 0 1; run sata_load_uimage; if run sata_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
sata_init=ide reset
sata_load_uimage=ext2load ide $device 0x800000 /boot/uImage
sata_load_uinitrd=ext2load ide $device 0x1100000 /boot/uInitrd
sata_root=/dev/sda1
set_bootargs_mmc=setenv bootargs console=$console root=$mmc_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
set_bootargs_sata=setenv bootargs console=$console root=$sata_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
set_bootargs_usb=setenv bootargs console=$console root=$usb_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
usb_boot=mw 0x800000 0 1; run usb_load_uimage; if run usb_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
usb_init=usb start
usb_load_uimage=ext2load usb $device 0x800000 /boot/uImage
usb_load_uinitrd=ext2load usb $device 0x1100000 /boot/uInitrd
usb_root=/dev/sda1
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
uenv_import=echo importing envs ...; env import -t 0x810000
uenv_load=usb start; mmc rescan; ide reset; setenv uenv_loaded 0; for devtype in usb mmc ide; 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 0x810000 /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
arcNumber=4495
ethaddr=5C:F4:AB:2F:F9:95
ipaddr=192.168.0.3
serverip=192.168.0.2
preboot=run preboot_nc
After reboot, BRICK :(.

What went wrong? Is there is a way to fix it?
Thanks.
andsol,

Definitely not a brick! when you see the Sys LED solid green, it means the kernel has been loaded.

You serial console connection is bad. And also you did not try connect with netconsole either.

1. Check serial wiring, see if TX and RX wires were swapped or not. And then on a SSH shell, run picocom for serial connection. But don't power up yet.

2. On another SSH shel (in the box that has the serverip 192.168.0.2), start netconsole server. This is needed because you already set up with netconsole in u-boot env.
nc -lup 6666 192.168.0.3 6666

3. Power up.

You should see the output going to both ssh shell session. If serial console got garbage again, then your serial console hardware needs to be examined. Netconsole should show u-boot start banner and the boot process.

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



Edited 1 time(s). Last edit at 04/20/2015 06:15PM by bodhi.
@bodhi

No luck, I bought another cable. Same results.

1. TX RX set right. I use Windows and VMware Debian image inside. Picocom connection (Current: 115200 8N1, Terminal emulation : VT102 or ANSI). Shows this:
�/5'���y���k���75-95�==-'=;'5��mUj�=�UY{����렕�}����UV������������9|##-#1-
�/5'��뵵��7�75-95�%%9������뵵��7�75-95�%%9�������Q#1�m%=15�s!=�3!;!! |�9!%U-�/5'���y���k���75-95�==-'=;'5��mUj�=�UY{�����@U�}����UV������������9=##-#-
2. netconsole (nc.exe on windows) - calm, no messages there. Its like uboot not reaching point for network environment setup.

3. When I power on (serial connected): half second green HDD2, then SYS for 30 seconds, then 5 times orange sys blink, and then reboot. When serial is not connected all the same without orange blinking.

4 . Probabbly I should not change:
# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors
# NAND example
/dev/mtd0               0xc0000         0x20000         0x20000                 4
Before it was:
# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors
# NAND example
/dev/mtd1               0x00000         0x20000         0x20000                 4

Is there is a way to flash NAND to some stable image?
Its good device i don't want to throw it away.
Any ideas?



Edited 1 time(s). Last edit at 04/21/2015 05:31AM by andsol.
1. TX RX set right. I use Windows and VMware Debian image inside. Picocom connection (Current: 115200 8N1, Terminal emulation : VT102 or ANSI).

This is my picocom command. I'm not sure what did you mean by N1 above?
picocom --b 115200 --f n --p n --d 8 /dev/ttyUSB0

2. netconsole (nc.exe on windows) - calm, no messages there. Its like uboot not reaching point for network environment setup.

Use nc on Debian and netcat traditional on Ubuntu. netconsole is not really good on a VM or Windows, you might have not yet getting it running correctly.

3. When I power on (serial connected): half second green HDD2, then SYS for 30 seconds, then 5 times orange sys blink, and then reboot. When serial is not connected all the same without orange blinking.

If you see the system LED blinking and then solid for 30 seconds like that. It meants u-boot has booted the kernel. When it turns orange blinking, it's because some files were not loaded properly (could be initramfs file), so u-boot resets the box and start again.

4 . Probabbly I should not change:
# MTD device name Device offset Env. size Flash sector size Number of sectors
# NAND example
/dev/mtd0 0xc0000 0x20000 0x20000 4
Before it was:
# MTD device name Device offset Env. size Flash sector size Number of sectors
# NAND example
/dev/mtd1 0x00000 0x20000 0x20000 4

No, this is not relevant during booting.

5. Is there is a way to flash NAND to some stable image?

Yes. But you need good serial connection. And you can use UART booting to boot the box, as I refered to into the 1st post:

Quote

Important Note: If possible, try to test this boot image with UART booting before flashing to NAND. For the NSA325, use the small image in this post to test UART. See davygravy's UART booting using kwboot instruction here in this thread.

6. Its good device i don't want to throw it away.

No, if your u-boot installation did not give you any error like you posted above, then it's defintely not bricked. Especially with the LED was solid Green for a while before Orange.

So, get the serial connection working first. If you are sure that it works, then try UART booting to test that (UART booting does not involve NAND).

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

1. Lo luck with UART connection, just messy symbols.
I have two cables based on two different ships, but from same company :) :
One is on PL2303TA, and the second one PL2303RA.
http://www.prolific.com.tw/US/ShowProduct.aspx?pcid=41&showlevel=0041-0041
Could you tell me which cable are you using? I will try to buy your one...

2. NSA325 is not pinging and I see on DHCP that NAS is not requesting IP.



Edited 1 time(s). Last edit at 04/21/2015 01:37PM by andsol.
@andsol,

> Could you tell me which cable are you using? I
> will try to buy your one...

I use the serial module in this post:
http://forum.doozan.com/read.php?8,13263,13264#msg-13264

I recalled some prolific serial module had jumper on the board which needs to be set. That could have been the problem.

> 2. NSA325 is not pinging and I see on DHCP that
> NAS is not requesting IP.

Which rootfs that you're using? You could try this before you receive your new serial module:

- Create a single Ext3 partition on a new USB thumb drive.
- Use the rootfs Debian-3.16.0-kirkwood-tld-2 (Updated 02 Sept 2014) in my rootfs thread. Follow the instruction in that section to prepare the USB.
- If you have an HDD installed in the NSA325v2, remove it.
- Boot with this USB rootfs. There is a pretty good chance it will boot into Debian.

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

It works.
The problem was with cables. Could you add somewhere in faq about my mistakes?

1. Do not use cables based on: PL2303TA, PL2303RA chipsets.
2. I have used two partitions (boot ext2, rootfs ex3). Which is wrong.

I can login to SSH via LAN. So its not a brick anymore :) thank you bodhi for help.

PS
1. When I insert HDD1 system does not start. SYS is green, but no ping to NAS. Here is my config
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
baudrate=115200
bootcmd=run bootcmd_uenv; run bootcmd_usb; run bootcmd_mmc; run bootcmd_sata; reset
bootcmd_mmc=run mmc_init; run set_bootargs_mmc; run mmc_boot
bootcmd_sata=run sata_init; run set_bootargs_sata; run sata_boot;
bootcmd_usb=run usb_init; run set_bootargs_usb; run usb_boot;
bootdelay=10
console=ttyS0,115200
device=0:1
ethact=egiga0
if_netconsole=ping $serverip
led_error=orange blinking
led_exit=green off
led_init=green blinking
mainlineLinux=yes
mmc_boot=mw 0x800000 0 1; run mmc_load_uimage; if run mmc_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
mmc_init=mmc rescan
mmc_load_uimage=ext2load mmc $device 0x800000 /boot/uImage
mmc_load_uinitrd=ext2load mmc $device 0x1100000 /boot/uInitrd
mmc_root=/dev/mmcblk0p1
mtdids=nand0=orion_nand
partition=nand0,2
preboot_nc=run if_netconsole start_netconsole
rootdelay=10
rootfstype=ext3
sata_boot=mw 0x800000 0 1; run sata_load_uimage; if run sata_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
sata_init=ide reset
sata_load_uimage=ext2load ide $device 0x800000 /boot/uImage
sata_load_uinitrd=ext2load ide $device 0x1100000 /boot/uInitrd
sata_root=/dev/sda1
set_bootargs_mmc=setenv bootargs console=$console root=$mmc_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
set_bootargs_sata=setenv bootargs console=$console root=$sata_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
set_bootargs_usb=setenv bootargs console=$console root=$usb_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
usb_init=usb start
usb_load_uimage=ext2load usb $device 0x800000 /boot/uImage
usb_load_uinitrd=ext2load usb $device 0x1100000 /boot/uInitrd
usb_root=/dev/sda1
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
uenv_import=echo importing envs ...; env import -t 0x810000
uenv_load=usb start; mmc rescan; ide reset; setenv uenv_loaded 0; for devtype in usb mmc ide; 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 0x810000 /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
arcNumber=4495
ethaddr=5C:F4:AB:2F:F9:95
ipaddr=192.168.0.3
preboot=run preboot_nc
load_dtb=ext2load usb 0:1 0x1c00000 /boot/dts/kirkwood-nsa325.dtb
load_initrd=ext2load usb 0:1 0x1100000 /boot/uInitrd
load_uimage=ext2load usb 0:1 0x800000 /boot/uImage
usb_boot=run load_dtb; run load_uimage; if run load_initrd; then bootm 0x800000 0x1100000 0x1c00000; else bootm 0x800000 - 0x1c00000; fi
serverip=192.168.0.10
2. NC still not avalilable.



Edited 2 time(s). Last edit at 04/21/2015 06:28PM by andsol.
andsol,

1. Look at section "B. Mounting rootfs in multi-drive configuration" in this post:
http://forum.doozan.com/read.php?3,19093

2. Describe what OS you use for netconsole server, which nc program version, and how did you attempt to connect. Please also post the log (or the exact command you used)

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

1. I've change it to
fw_setenv usb_root 'LABEL=rootfs'
it works now

2. I use ubuntu as a server, in command line:
nc -l -p 6666 192.168.0.10
When i do following on NAS:
cat test.txt | nc 192.168.0.10 6666
I receive message from the file.

But during booting, terminal empty.

Any way its not a critical to me to have a network console. I will order proper cable in case of something. Thank you bodhi!!!



Edited 2 time(s). Last edit at 04/21/2015 07:27PM by andsol.
andsol Wrote:
-------------------------------------------------------
> @bodhi
>
> 1. I've change it to
>
> fw_setenv usb_root 'LABEL=rootfs'
>
> it works now
>
> 2. I use ubuntu as a server, in command line:
>
> nc -l -p 6666 192.168.0.10
>
> When i do following on NAS:
>
> cat test.txt | nc 192.168.0.10 6666
>
> I receive message from the file.
>
> But during booting, terminal empty.
>

> Any way its not a critical to me to have a network
> console. I will order proper cable in case of
> something. Thank you bodhi!!!

Awesome!

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

Sorry I took so long to reply.

After reading your reply realised my mistake. When I set the mtdparts I ended up with this:

mtdparts=orion_nand:0x100000(uboot),0x80000(stock_uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2)

instead of:

mtdparts=mtdparts=orion_nand:0x100000(uboot),0x80000(stock_uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2)
Re: 2013.10 U-Boot for FDT and Non-FDT Kernel - GoFlex Net/GoFlex Home/Pogo E02
April 22, 2015 07:01PM
@StephenR0,

If you are still around. Here is something of interest. I had opportunity to try this test and it looks like the Pogoplug Pro/Classic U-Boot can recognize the Sandsik Readycache 32GB just fine:

U-Boot SPL 2013.10-tld-4 (Sep 07 2014 - 14:10:12)
  Boot device: NAND
Attempting to set PLLA to 850 MHz ...
  plla_ctrl0 : 0000020a
  plla_ctrl1 : 00330000
  plla_ctrl2 : 0065008b
  plla_ctrl3 : 000000f1

PLLA Set


U-Boot 2013.10-tld-5 (Mar 07 2015 - 16:50:17) for OXNAS

DRAM:  128 MiB
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   
Led:	GREEN
mii0
Main Loop
Hit any key to stop autoboot:  0 
OX820> 
OX820> 
OX820> 
OX820> 
OX820> ide reset

Reset IDE: Bus 0: OK 
  Device 0: Model: SanDisk SDSSDRC032G  Firm: 3.0.0  Ser#: 13393xxxxxxx
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 30533.8 MB = 29.8 GB (62533296 x 512)
OX820> ide part

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

Part	Start Sector	Num Sectors	UUID		Type
  1	2048      	62531248  	00000000-01	83 Boot

OX820> ide info

IDE device 0: Model: SanDisk SDSSDRC032G  Firm: 3.0.0  Ser#: 13393xxxxxxx
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 30533.8 MB = 29.8 GB (62533296 x 512)
OX820>

Note that a different IDE driver (OXNAS flavor) is used in this u-boot version.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
I have a Pogoplug E02 V2 with bad uBoot, I'm trying to follow your guide to get it up and running again. I have to use a USB and serial connect into the box via my other working pogoplug E02.

everything seems ok until this step:

dmesg | grep -i 'bad'

[    1.070000] Scanning device for bad blocks
[    1.110000] Bad eraseblock 766 at 0x05fc0000

do I need a work around? if so please help... thanks!
Preluder Wrote:
-------------------------------------------------------
> I have a Pogoplug E02 V2 with bad uBoot, I'm
> trying to follow your guide to get it up and
> running again. I have to use a USB and serial
> connect into the box via my other working pogoplug
> E02.
>
> everything seems ok until this step:
>
>
> dmesg | grep -i 'bad'
> 
> [    1.070000] Scanning device for bad blocks
> [    1.110000] Bad eraseblock 766 at 0x05fc0000
>
>
> do I need a work around? if so please help...
> thanks!

It's OK, no need to work around. This bad block is way out in different area of NAND. u-boot is in the first 8 blocks.

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

I got to play around a little with my dockstar and decided to improve my skills with embedded devices. Some questions came up and i hope someone here can help me out.

To start from scratch i decided to (learn to) build, test and flash u-boot. So here i what i allready figured out by myself: setting up a dev machine, getting cross-compile-tools, pulling from denx git and building u-boot for the dockstar (also the kwb). I also got bodhis precompiled u-boot and flashed it to the dockstar on mtd0. since i am not sure, if my builds are ok, i want to test it by loading it from usb, or tftp. but after go 0x800200 nothing happens . i can start bodhi's uboot with this method, but note mine. Im not sure, if this is that signifficant, since i also could not start bodhis uboot with the older 2011 jef's uboot. I understand, that the dockstar does not support kwboot?

Maybe you could explain a few things:
1. what is the kwb-format (what is the difference to bin und elf?),
2. is there any possibility to test "my" build (mkimage - l gives proper output).
3. Is denx git considered as stable? or should i use another one?
4. was my procedure right? make dockstar_defconf from denx git and make dockstar.kwb?
5. since denx-uboot git has a a config file for the dockstar are the patches here in the forum still appliable?

I hope you can help me out with the information, i really want to learn more about embedded linux/uboot/etc. The final goal is to be able to build and flash uboot, kernel and rootfs on a ubifs-volume on nand. so any tips, reading propositions, etc. are appreciated!
thanks, alex
alex,

>i can start
> bodhi's uboot with this method, but note mine. Im
> not sure, if this is that signifficant, since i
> also could not start bodhis uboot with the older
> 2011 jef's uboot.

U-Boot code is quite different from older to new version, so chainloading does not work most of the time. From a new u-boot, chainloading a much older u-boot such as stock FW works because that old u-boot was written in a way that made it possible.

> I understand, that the dockstar
> does not support kwboot?

Correct.

> Maybe you could explain a few things:
> 1. what is the kwb-format (what is the difference
> to bin und elf?),

kwboot does not have its own format. Marvell u-boot image has a header format (i.e. that's why you have to excute a "go 0x800200"). kwboot handshakes with the boot ROM in the plug during reset and sends the image after the handshake occurred. The header is not used in UART booting (UPDATE: this is not quite true, I've oversimplified it :), only used when it is a NAND resident u-boot.

> 2. is there any possibility to test "my" build
> (mkimage - l gives proper output).

Not with the Dockstar. It does not have UART booting.

> 3. Is denx git considered as stable?

Yes.

> 5. since denx-uboot git has a a config file for
> the dockstar are the patches here in the forum
> still appliable?

If you want to build and test u-boot, the best plug is the GoFlex Net or GoFlex Home. It has UART booting capability. And use my GitHub source to build. It was branched of the mainline (not forked).

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



Edited 2 time(s). Last edit at 05/14/2015 04:46PM by bodhi.
pengu
possible U-Boot for ZyXEL NSA310?
May 16, 2015 09:11AM
I'm using the latest bodhi rootfs on this device, but I don't want to embed DTS as I have to (with stock U-Boot).
So I'm using this U-Boot build right now:

https://dl.dropboxusercontent.com/u/86027317/u-Boot/InstallUbootNsa310.html

This has 2 disadvantages:

- the ethernet device isn't avaible in U-Boot
- on cold boot it tooks a long time (sometimes 3 minutes) to see U-Boot up and running
Re: possible U-Boot for ZyXEL NSA310?
May 16, 2015 03:35PM
pengu,

Have you tried UART booting with this NSA310 u-boot version? if that works then it is much easier to experiment with new u-boot build. I could help looking at the code if you do have UART booting.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Sorry, you can't reply to this topic. It has been closed.