pengutronix bsp installation mini2440

Samyukta Ramnath
I was installing the pengutronix BSP according to the quickstart manual.
While configuring the ptxdist with the command:
$./configure

I get an error as:
configure:error:Please specify the location of the patch executable with
the option '--with-patch'

What location am I supposed to give here ?

davef
Which version of the mini2440BSP, which PTXdist version and which toolchain
version.

Samyukta Ramnath
I am using everything as in the manual.

ptxdist-2013.09.0.tar.bz2
OSELAS.BSP-Pengutronix-Mini2440-2013.10.0.tar.gz
OSELAS.Toolchain-2012.12.1.tar.bz2

Samyukta Ramnath
Thanks.
I got it by just installing the patch command line tool

davef
Juergen,

On checking my installation I see I have OSELAS.Toolchain-2012.12.0 instead
of OSELAS.Toolchain-2012.12.1

I think when I upgraded from OSELAS.BSP-Pengutronix-Mini2440-2012.12.0 to
OSELAS.BSP-Pengutronix-Mini2440-2013.10.0 I forgot to update the toolchain.

Seems to work OK, so am I just lucky?  And should I change to 2012.12.1?


OSELAS.BSP-Pengutronix-Mini2440-2013.10.0 is the latest and
git-public.pengutronix.de has  ptxdist-2014.04.0 as working with this BSP. 
Which toolchain version(s) are OK with this combo?

Thank you,
Dave

Juergen
You still can use the 2012.12.0 toolchain release. The .1 and .2 releases
are bug fixing releases. If you have no trouble with your root filesystem
built with the .0 release just continue to use it. If you have trouble with
your binaries you can give the .2 toolchain release a try.

davef
Thank you.

And the toolchain for the last question?

Samyukta Ramnath
I am following the Quickstart manual to install the Pengutronix BSP.
I installed the ptxdist-2012.12.1 to match with my toolchain:
OSELAS.Toolchain-2012.12.1

When I try the command:
ptxdist select ptxconfigs/arm-v4t-...
I get the error:
/usr/local/bin/ptxdist: line 2129: archive: command not found

I checked my folder /usr/local/bin.
It has 3 files currently: ptxdist
                          ptxdist-2012.12.1
                          ptxdist-2013.09.0

The line 2129 of ptxdist file is:

eval PTXDIST_SRCDIR="${PTXCONF_SETUP_SRCDIR}"

What's going wrong? I cannot find anything wrong with the eval command

Juergen
davef,

sorry, didn't recognize your last question in your post. If you select the
toolchain PTXdist automatically selects the most recent toolchain release
it finds when the "ptxdist toolchain ..." command runs.
This happens due to the setting of
'PTXCONF_CROSSCHAIN_VENDOR="OSELAS.Toolchain-2013.12"' which does not
include the release number.

Juergen
Samyukta,

you must ensure the "/usr/local/bin/ptxdist" link you are using points to
"/usr/local/lib/ptxdist-2012.12.1/bin/ptxdist" to match the correct PTXdist
release.

Can you check, what the variable "PTXCONF_SETUP_SRCDIR" contains in your
"~/.ptxdist/ptxdistrc-2012.12"? Maybe it contains some garbage which
confuses PTXdist and the shell it uses.

davef
I did look at the ptxconfig file and noted the third number was missing. 
So, that is how the magic happens.

Thanks,
Dave

Samyukta Ramnath
Attachment: ptxdist files.rar (46.02 KB)
Instead of Building a toolchain(section 3.3.3), I tried to get the
toolchain already made by following the section 3.3.2 of the manual.
This was done without any errors and warnings.

For building the Root filesystem (section 4.6 of the Quickstart guide),
after the command: $ ptxdist go

I again got the same error:
/usr/local/bin/ptxdist: line 2149: archive: command not found
install: cannot create directory '': No such file or directory
ptxdist: error: cannot create dir: ''

Surprisingly, this time the line number changed from 2129 to 2149. I
checked the "PTXCONF_SETUP_SRCDIR" and I could not find any garbage in it.

I have attached all 3 files in my folder /usr/local/bin/ptxdist 
for your referance.Please have a look into it.

I am tired of installations for FriendlyARM now...

Juergen
Can you send us the content of the variable "PTXCONF_SETUP_SRCDIR" contains
in your "~/.ptxdist/ptxdistrc-*" (or the whole files)?
Sending us the "ptxdist" files from the PTXdist installation is really
useless, because everybody using PTXdist has these files...

Samyukta Ramnath
Hello
I checked my PTXCONF_SETUP_SRCDIR in the file mentioned. It says:
PTXCONF_SETUP_SRCDIR="~/source archive"

'~/source archive' is the path I had mentioned while running ptxdist setup
command under the option 'Source Directories'

I made a folder named 'source archive' while doing this.Is there a mistake
in the way I have specified the path?

Thanks & Regards

davef
As the guru is probably having breakfast, I'd suggest you give it a new
name like:
"/home/PTXdist_src"

I have my ideas why it doesn't work, but he will come back and tell us the
real reason!

Juergen
The answer is simple: whitespaces in filenames and pathes are evil. :)

Change your path to '~/source_archive' and it will work again. Or use
davef's path suggestion.

Samyukta Ramnath
Thanks Davef and Juergen. Changing the name did work.
I keep on doing some silly mistakes. Sorry for all the trouble.

Samyukta Ramnath
I have completed building the required images.
For some reason, it is not possible for me to access the ftp server for the
board.(The IP address for the board needs to be registered with the
institute)

Is it possible to continue with the Supervivi Transfer tool instead of
Barebox Bootloader? In that case, which images should I transfer to the
board?

Thanks & Regards

davef
Why do you need to access the ftp server?  The images can be loaded by
using an SD card or tftp

I'd suggest the SD card.  I don't think procedure found its way into the
QuickStart guide.  If you want to continue with SD cards I'll be back in
about 3 hours and will check this thread.  Meanwhile try tftp.

Juergen
You should setup a local network between the Mini2440 and your host and
configure it statically. Then you can continue using the TFTP method to
finish setting up your Mini2440

sudhakar
Hi Sir ,I am getting this error .Pls give ur suggetions .
ism@ism-desktop:~/OSELAS.Toolchain-2012.12.1$ ptxdist go
error:  The ptxconfig file version and ptxdist version do not match:

  configfile version: 2012.12.0
  ptxdist version:    2013.09.0

  You can either migrate from an older ptxdist release with:
  'ptxdist migrate'

  or, to ignore this error, add '--force'
  to ptxdist's parameters, e.g.:
  'ptxdist --force go'

davef
There is a "complex" set of rules of which BSP version, which PTXdist
version and which toolchain can be used together OR you get this message.  

I haven't worked out all the rules.

I would suggest that you look at the QuickStart guide, and install the BSP
version recommended and possibly get rid the 2012.12.0 BSP.  You would then
have to manually update the configfile to your needs.

There is a proper method to do this.  Maybe, read in the "How to be a
PTXdist Guru" on their site.

Good luck

sudhakar_G
Hi Sir, I am getting the following ERROR Message .
When i give this command [FRom OSELES.BSP-QUickstar.mini2440] 
$sudo platform-mini2440/sysroot-host/bin/usbpush
platform-mini2440/images/barebox-image

Unable to claim usb interface 1 of device: Device or resource busy

My host is UBUNTU 14.04

Pls help me 
 
Regards,
sudhakar.G

davef
Can I assume you are using a USB to RS232 converter?

With this plugged into your host what does lsusb tell you?

sudhakar_G
Hi Sir,
       
No sir, i am not using any USB to RS322 converter.

Below is the output of lsusb in my HOST UBUNTU 14.04 

ism@ism-desktop:/lib/udev/rules.d$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 022: ID 5345:1234 Owon PDS6062T Oscilloscope
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Regards,
Sudhakar.G

davef
OK then, how do you connect the host to the target?

davef
Sorry, Owon PDS6062T Oscilloscope is the ID for the mini2440.

davef
It has been about a year since I last put images on the mini2440 but I am
sure I just connected a RS232 to USB converter to the host, open two
terminal sessions and the files get loaded via the RS232 port.

In other words you do not use the USB port on the mini2440 for anything.

davef
So, if you do a lsusb you will see the IP for your USB to RS232 converter.

sudhakar_G
Hi Sir,

Mini2440 -Board Side                      HOST (UBUNTU 14.04 LTS)

UART ------------------------RS232 CABLE ------------UART

USB PORT[USB B TYPE] --------------------------------USB PORT[USB A TYPE]

network                                 network 


I have connected board & PC using RS-232 cable.
I have connected board & PC using USB a type & b type connector 
Both My board & PC are in the network .

I have downloaded DNW Linux and installed in HOST .
then i am doing as per manual . 
MINICOM [TERMINAL 1] with setting as /dev/ttyS0, Baudrate 115200 ,8N1

##### FriendlyARM BIOS 2.0 for 2440 #####
[x] format NAND FLASH for Linux
[v] Download vivi 
[k] Download linux kernel 
[y] Download root_yaffs image 
[a] Absolute User Application
[n] Download Nboot for WinCE 
[l] Download WinCE boot-logo
[w] Download WinCE NK.bin 
[d] Download & Run 
[z] Download zImage into RAM 
[g] Boot linux from RAM 
[f] Format the nand flash 
[b] Boot the system 
[s] Set the boot parameters 
[u] Backup NAND Flash to HOST through USB(upload) 
[r] Restore NAND Flash from HOST through USB 
[q] Goto shell of vivi 
[i] Version: 1138-2K
Enter your selection: q
Supervivi> load ram 0x31000000 154040 u
USB host is connected. Waiting a download.

[TERMINAL 2]

ism@ism-desktop:~/OSELAS.BSP-Pengutronix-Mini2440$ ls -l
platform-mini2440/images/barebox-image 
-rw-r--r-- 1 ism ism 154040 Feb  4 10:58
platform-mini2440/images/barebox-image
ism@ism-desktop:~/OSELAS.BSP-Pengutronix-Mini2440$ sudo
platform-mini2440/sysroot-host/bin/usbpush
platform-mini2440/images/barebox-image
[sudo] password for ism: 
Unable to claim usb interface 1 of device: Device or resource busy
ism@ism-desktop:~/OSELAS.BSP-Pengutronix-Mini2440$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 5345:1234 Owon PDS6062T Oscilloscope
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Pls help me 
Regards,
Sudhakar.G

davef
OK, it appears you have made a good description of what you are doing at
your end.

1) I wasn't aware that there was a version of DNW for Linux.
2) I am sure that when you place the NOR/NAND in the NOR position and 
   fire up the mini2440 that you are really seeing a Supervivi menu NOT
   a DNW one.
3) I still believe that there is no USB cable involved in this process.

Juergen help!

davef
Yikes, just read the instructions again.  Change Supervivi to vivi.

3) appears to be a false statement!!!

Looks like I need to do this more often!

sudhakar_G
Hi davef ,
       What's the Wrong with my procedure? Why i am getting that error?
Please help me to fix the problem.

Regards,
Sudhakar.G

davef
If I really knew I would tell you!

Have you bought this mini2440 recently?  What size flash does it have?

davef
http://www.friendlyarm.net/forum/topic/6280

There have been issues noted with the latest mini2440 product that have
different Flash chips in them.

The full story ... to date:

http://blog.gmane.org/gmane.comp.embedded.ptxdist.oselas.community

sudhakar_G
Hi davef,

     1 1/2 Years back we has purchased.NAND FLASH -1GB,NOR FLASH
-2M,SDRAM-64MB.

Regards,
Sudhakar.G

davef
That unit should be OK.  The important bit of information is the part
numbers on the flash chips, but don't worry about that now.

I assume you didn't find any help searching for your error message on this
site and the greater WWW.

Unfortunately, my mini2440s are in a remote location or I would hook them
up to verify operation.

I would suggest posting this issue on:

http://blog.gmane.org/gmane.comp.embedded.ptxdist.oselas.community

They are most helpful.

davef
Did you read this one?

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

"It is because the code is just trying to access
only the first two ports 0 and 1 only and you may have connected the usb
3rd port!"

Does this mean try different ports on your host, ie root hub (whatever that
is)?

davef
root hub = internal USB hub on the motherboard.

Thank you Google.

davef
Another suggestion:

- do a demsg before and after 

ism@ism-desktop:~/OSELAS.BSP-Pengutronix-Mini2440$ sudo
platform-mini2440/sysroot-host/bin/usbpush
platform-mini2440/images/barebox-image

and:

stopping to put your password after this command ... try doing an operation
so that you are already logged on as root before even starting the whole
process

Also, /var/log/ maybe looking at syslog might give you more detail on what
is going wrong.

davef
dmesg NOT demsg. It is getting late here!

sudhakar_G
Hi davef,
      I didn't get any result,still i am facing the same problem .Pls help
me.
Regards,
Sudhakar.G

davef
Now I remember another file that Juergen asks for.  There is a file in your
OSELAS .... /platform-mini2440 directory called logfile.

Delete it to remove all the previous PTXdist actions.

Then start again and when you get the fault have a look at that file and
tell us what the last few lines say.

Sending that logfile to the site I mentioned earlier should generate a
response.  I don't see any posting by you there.

davef
You seem reluctant to post on:

http://blog.gmane.org/gmane.comp.embedded.ptxdist.oselas.community

Do you want me to ask there for you?

sudhakar_G
Hi Sir,
      I am fresher new to this forum .Little bit afraid what exactly i need
to post & all .I have posted my query on the URL what you mentioned.But
didn't know how to see reply for my post .

I got the output.I have successfully ported linux-3.16 to mini2440.
The error i am getting earlier is "Unable to claim usb interface 1 of
device: Device or resource busy" .what i have observed is there is one
module name " secbulk " which is getting loaded at runtime.I have unloaded
that module .After that everything went as mentioned in the manual .

I am very much thankful for you sir.
Regards,
Sudhakar.G

davef
I do not see your question on that forum, which is just as well as you have
fixed your problem.

secbulk is a Windows driver for DNW.  It appears that if you have DNW
running on your Windows host, which you did NOT need for for the
Pengutronix BSP, it ties up the USB port that you need.

I would call that bad luck!

Glad you got there in the end and hope your future experience is more
positive.

Gonyappa kurubar
Dear all
       please help me 


    madhu@madhu-desktop:~/ptx/ptxdist-2015.01.0$ ptxdist platformconfig
error:  'selected_ptxconfig' file is missing
  try 'ptxdist select <ptxconfig>' or
  'ptxdist clone <project>' to clone an existing project

error:  The ptxconfig file version and ptxdist version do not match:

  configfile version: 
  ptxdist version:    2015.01.0

  You can either migrate from an older ptxdist release with:
  'ptxdist migrate'

  or, to ignore this error, add '--force'
  to ptxdist's parameters, e.g.:
  'ptxdist --force --auto-version platformconfig'


    Gonyappa
Thanks in advance

Juergen
Run this command inside the BSP directory!
Clone the Mini2440-BSP repository via GIT to your local harddisk, change
into the new directory and then run this command again.

davef
Did I even get close on his cross-post!

gonyappa
madhu@madhu-desktop:/home/opt/OSELAS.Toolchain-2014.12.0$ ptxdist select
ptxconfigs
error: cannot select
  'ptxconfigs'
  does not exist, or is not a file.




please help me fix this error

Gonyappa
Hi 

     
   am getting this error 


madhu@madhu-desktop:/home/OSELAS.Toolchain-2014.12.0/OSELAS.BSP-Pengutronix-Mini
2440$
ptxdist platform
configs/platform-friendlyarm-mini2440/platformconfig-NAND-128M 
ptxdist: error: ptxdist-2013.09.0 not found!






please help me

Gonyappa
madhu@madhu-desktop:/home/OSELAS.Toolchain-2014.12.0/OSELAS.BSP-Pengutronix-Mini
2440$
ptxdist go

ptxdist: error: wrong toolchain vendor: Cannot continue! Vendor is
'OSELAS.Toolchain-2014.12.0',
ptxdist: error: specified: OSELAS.Toolchain-2012.12
ptxdist: error: found:   OSELAS.Toolchain-2014.12.0

madhu@madhu-desktop:/home/OSELAS.Toolchain-2014.12.0/OSELAS.BSP-Pengutronix-Mini
2440$

Juergen
Please start with the new release in the GIT-Repository. You mix a new
toolchain release with an old BSP release.