Ptxdist: error loading barebox via tftp

dhruv
i am gettin the following error while loading barebox image, plz help me

mini2440:/ . /env/config 
mini2440:/ devinfo eth0     
base  : 0x00000000
size  : 0x00000000
driver: none

Parameters:
          ipaddr = 192.168.1.240
         ethaddr = 00:04:f3:00:06:35
         gateway = 192.168.1.2
         netmask = 255.255.255.0
        serverip = 192.168.1.7
mini2440:/ ping 192.168.1.7
T T T T T host 192.168.1.7 is alive
mini2440:/ ping 192.168.1.7
host 192.168.1.7 is alive
mini2440:/ update -t barebox -d nand
T T T T T T T T T ping failed: Network is down

erasing partition /dev/nand0.barebox.bb


flashing barebox-mini2440 to /dev/nand0.barebox.bb


tftp failed: Network is down

mini2440:/ ping 192.168.1.7         
ping failed: Network is down
mini2440:/ devinfo eth0             
base  : 0x00000000
size  : 0x00000000
driver: none

Parameters:
          ipaddr = 0.0.0.0
         ethaddr = 00:04:f3:00:06:35
         gateway = 192.168.1.2
         netmask = 255.255.255.0
        serverip = 192.168.1.7

davef
Do these T T T

mini2440:/ ping 192.168.1.7
T T T T T host 192.168.1.7 is alive
mini2440:/ ping 192.168.1.7
host 192.168.1.7 is alive
mini2440:/ update -t barebox -d nand
T T T T T T T T T ping failed: Network is down

take a few seconds to appear in turn?

dhruv
i had waited for long time for tftp to happen.

 The following  " T T T ping failed: Network is down " appears when i do
CTRL+C.

i came across the following link 
http://www.friendlyarm.net/forum/topic/2779

do u think these are the same issues?

davef
I did have a problem as per the link.  The problem seemed to go away.

Are you running the mini2440 off a switching hub?  I had lots of grief
trying to talk to the mini2440 from my Acer Aspire1 netbook.  Had to buy a
USB to serial converter in the end.

Seems either the netbook (running Ubuntu) or the mini2440 does not have
fully compliant ethernet physical levels.

Brabbit
Hi. davef

Can you transfer barebox-image on your host PC to Mini2440 via tftp?

I see this link: http://www.friendlyarm.net/forum/topic/2779

In third comment:

The issue with <tftpd-hpa> on my platform was traced when doing:

cat /etc/default/tftpd-hpa

It was expecting to find the tftpboot files in /var/lib so I changed
TFTP_DIRECTORY="/tftpboot" and the files uploaded.  That was after a long
search!

I can't found tftpboot file in /var/lib. And I search in filesystem in all
file not found TFTP_DIRECTORY.


Did you have any solution for transfer barebox-image to mini ?

davef
Brabbit,

That was a long time ago!  I don't remember why I was expected them in
/var/lib but that was a mistake.

On the host all you do in create a directory in root called tftpboot.

Following the Quickstart guide you copy the image files you want into
/tftpboot and barebox should do the rest.

davef
Sorry, you have to rename them to the files expected by barebox, ie:

platform-mini2440/images/barebox-image /tftpboot/barebox-mini2440

Brabbit
@davef

Thank you for Quickly answer.

I make directory /tftpboot/barebox-mini2440 and copy file barebox-image
into this folder.

I use command tftp 192.168.1.200(my mini2440 ip addr).

And I use command "put barebox-image" it show:

tftp> put barebox-image
Transfer timed out.

It doesn't sent file?

davef
Are you testing that tftp works before actually following Section 5 in the
QuickStart guide?

davef
Start on page 24 and work through each step until you get error.

Brabbit
Hi davef

I'm testing tftp on host pc.It's work.but I use command "updat -t barebox
-d nand" in mini. It show :

mini2440:/ update -t barebox -d nand                                       
    
host 192.168.1.100 is alive                                                
    
                                                                           
    
erasing partition /dev/nand0.barebox.bb                                    
    
                                                                           
    
                                                                           
    
flashing barebox-mini2440 to /dev/nand0.barebox.bb                         
    
                                                                           
    
TFTP from server 192.168.1.100 ('barebox-mini2440' ->
'/dev/nand0.barebox.bb')  
                                                                           
    
tftp failed: Invalid argument

davef
> tftp failed: Invalid argument

Never had this error.

Have you done any editing to your
/configs/platform-friendlyarm-mini2440/barebox-64m-env/config file?

How much flash does your mini2440 have?

I just re-read and noticed this:

> I make directory /tftpboot/barebox-mini2440 and copy file barebox-image
> into this folder.

You make a directory /tftpboot and copy file barebox-image to this
directory and re-name it barebox-mini2440

Brabbit
I try to build new image and use "update -t barebox -d nand".

It's show : ">tftp failed: Invalid argument" again.

Brabbit
I want to boot mini2440 on SD card. I should sent file barebox-mini2440
into NAND flash?

Juergen Beisert
The Mini2440 needs software support to be able to boot Linux from an
attached SD card. That is why you need first to store the Barebox
bootloader into the NAND and to start the CPU from NAND. Barebox then is
able to load and start the kernel from the SD card.

Brabbit
@Juergen Beisert

Thank you.

Are you know how to fix ">tftp failed: Invalid argument" ?

Juergen Beisert
Please take a look into the log files on your tftp server. Maybe some kind
of configuration is broken at your host side. Just an idea.

davef
> I'm testing tftp on host pc.

Does this mean you have tested tftp on your host BY talking to another PC
and are able to transfer files in both directions?

Do this before introducing the mini2440 into the equation.

Brabbit
Hi.

Today I'm try to install tftp server and change file "barebox-image" to
"barebox-mini2440" in folder /tftpboot.

I use command "update -t barebox -d nand".It's show this :

mini2440:/ update -t barebox -d nand                                       
    
host 192.168.1.100 is alive                                                
    
                                                                           
    
erasing partition /dev/nand0.barebox.bb                                    
    
                                                                           
    
                                                                           
    
flashing barebox-mini2440 to /dev/nand0.barebox.bb                         
    
                                                                           
    
TFTP from server 192.168.1.100 ('barebox-mini2440' ->
'/dev/nand0.barebox.bb')  
                                                                           
    
mini2440:/ 

It's OK?
Finish upload in nand?

Juergen Beisert
> It's OK?

Seems so. Last check is to change to boot from NAND and give it a try. If
Barebox greets you after power on, you win \o/

Brabbit
Oh No!!

I'm change switch S2 to NAND and turn off and then turn on power switch.
But it isn't show anything on the mini2440 touchscreen.

Juergen Beisert
Then double check, if the file "barebox-mini2440" which was downloaded and
stored into your NAND memory is really a Barebox image. And check if it was
configured for the correct NAND type and size.

Brabbit
@Juergen Beisert

@davef

It's OK.

Thank you very much!!!

I will go next section.

Brabbit
Now.I begin section 6.

I config in section 6.3 and start manually "boot mmc".

Show this:

mini2440:/ boot mmc
probing mci for sd card now
Limiting max. read block size down to 512
Limiting max. write block size down to 512
booting kernel of type uimage from /dev/disk0.0
Bad Magic Number
mini2440:/ 

What's happen?

Juergen Beisert
> Limiting max. read block size down to 512
> Limiting max. write block size down to 512

Seems Barebox doesn't like your SD Card. Try a different one.

Brabbit
Will I should resize SD card to 512KB or 512MB or ...?

davef
> Limiting max. read block size down to 512
> Limiting max. write block size down to 512

I often get this message. But, not the Bad Magic number message.

http://www.friendlyarm.net/forum/topic/3903

Perhaps the SD card has not been formatted correctly.  Point us to the
tutorial you used to do that or find:

"Howto boot with an SD card.zip"

http://www.friendlyarm.net/forum/topic/4179

davef
Should have started my response with . . .

No.

Brabbit
@davef

Thank a lot for solution.

I will try it.

Brabbit
Now. I have a problem.

How to setup Qt and use Qt Application in Pengutronix?

davef
Maybe, start with ticking the right boxes for something like Arora and see
if that works first.

If you want a Qt application that is not covered in the Pengutronix BSP
then you want to try:

ptxdist newpackage src-qmake-prog

Brabbit
Hi davef.

Thank you for my question.

You can answer me in this link

http://www.friendlyarm.net/forum/topic/4964

Thank you.