The mini2440 & PTXdist
By WingzThis is a series of tutorials that will help you get up-and-running with developing applications for the mini2440 development board. You can also learn a bit of embedded linux on the way of course
Things that you can do if you have a mini2440.
Step by Step Tutorials
- Introduction to the mini2440 : Get acquainted with your mini2440.
- Don’t have a mini2440? : See if you need to buy one.
- Things to do with the mini2440 : Check out whats possible with it.
- The Board Support Package : what is it anyway?
- Getting started with the pengutronix BSP : an introduction.
- Getting familiar with ptxdist : installation and setup of ptxdist.
- Toolchain compilation and setup : required to get anything compiled for the min2440.
- Basic commands in ptxdist : understand the tool you have.
- Embedded Linux Fundamentals : all the gibber-gabber explained.
- Compiling the BSP for the mini2440 : this will take a while.
- Setting up the barebox bootloader over TFTP : Get your mini2440 a life.
- Booting the compiled filesystem over NFS : and its aliiive!!
- Ptxdist menuconfig and kernelconfig : before we begin..
- Starting with the mini2440′s console : first things first.
- Making LEDs blink by the linux shell! : Lets see some blinky..
- Lets start with C programming : A humble hello word from your mini2440
- Controlling LEDs with C : *gasp* lights!!
- Pushing the mini2440′s buttons : When touching the mini2440′s display just isn’t enough..
- Starting Qt programming : Programming slick GUI interfaces with Qt
- Making the mini2440 sing via the Beeper : Let the mini2440 sing..
- A QT code for every peripheral : Just some notes on how to make a GUI for the mini2440′s thingies
- Setting up an SDL compilation environment : Start graphics and game programming on the mini2440′s LCD!
- Arduino and mini2440 communication setup : Get these two devices talking to each other.
- Getting the mini2440 connecting over wifi : IP adresses and all that Jazz..
- Talking to the mini2440 over WiFi : Establishing text chat between Computer and mini2440
[.. more coming soon!! -Web server control with the mini2440/so check regularly or follow the blog
]


This blog is of great help. I purchased my mini2440 4 months back and had no clue about where to begin. This blog has helped me take my first baby step with the mini2440. Cheers!
Its nice to hear that!! \m/
I am thiniking to buy mini 2440 board. but i am completely new to linux platform. I am knowing things pertaining to it from this site. Thanks…
I’m glad the blog helps!!
Don’t worry.. it will take a little time to get used to it but then programming things on the mini2440 is always fun!! And embedded systems takes a little time to get used to, but the results are sooo worth it!
thanks for ur support…
Hi! I have purchased a mini2440 for my final year project. I have installed Linux 2.6 kernel on it. I basically want to implement speech recognition.
The problem I am facing is starting out with the programming bit. I have knowledge of basic Linux commands as yet and am still getting a hold of them. I need to take an input from the microphone ; how do i locate which file in /dev is the one for the mic?
Kindly help me with how do i go about writing code for it.
The S3C2440’s built in I2S bus interface is directly connected to an external 8/16 bit stereo CODEC. The
circuit with the UDA1341 audio decoder chip is taken directly from a Samsung reference design. This might be supported by the kernel.. i’ll check.
Thanks for the reply!
I am running Linux 2.6.32.2 kernel. The CON10 interface is provided for mic in/out or the on-board mic and audio jack may be used for audio. I did read about the ALSA tools on the web. Would it be possible to record from the on-board microphone on installing the ALSA driver set? Or do you suggest another approach that the kernel supports?
I think you should be able to!
This sounds very interesting.. If you enable UDA support in the kernel, it shows a sound chip at /dev/dsp. Then there are tools like rawrec, arecord that sorta work. As in they say they’re recording but when i play the clip there’s nothing.. Maybe some configuration settings are needed to use these tools properly.. If you do get it working.. just lemme know..
hi.
best your tutorial
I want to a USB wireless adapter but I don’t know to buy which adapter.
could you best supports list adapters for mini2440
ahmet, take a look into a current kernel, which USB based adapters are supported. The list is long
hello…
anyone here was able to run Java graphical apps in the mini2440..?
if yes, can please explain how to install the gtk libraries..?
Thank you
you could ask in the ptxdist mailing list. they might be able to help you.
hi wingz i am making my final graduation project about ip phone and i need to use arm minin2440 , will it be good choice
and if not please give me the suitable release of arm kit
please help me to decide which kit i will buy
sorry for my english
{{ from egypt }}
the mini2440 might give you some issues in the voice processing side.. (As it doesnt have a dedicated DSP – like beagle board).. If you feel you need an onboard DSP for your application you might think about the mini210 from ARM only. If you can manage with the mini2440′s UDA134x then the mini2440 will be fine!
my firs app wich is doing a real job
hii.. i m doing a project on ON n OFF controlling of a relay/LED using mini2440…
i have to design a graphical screen for dis where two buttons will b displayed. on touching d buttons d LED/relay will get on n off respectively… i dnt knw linux at all… sir plss can u tell me where to strt 4m.. i m completely confused…
You are in luck. Check this page over here.
Now, those steps – in order – will let you get started on your mini2440. LED control code will come when you are working with Qt GUI creator. Its easy, just follow the steps.
woow! My Goodness! your website is awesome! Excellent! thank u guy for sharing ur information
Hi wingz,
Thanks to your website..i finished my final year project.. I learnt a lot about embedded system…btw without going to any project centres or workshops….Please continue the good work…
hey.. im really glad to hear that!
hi wingz…
i took mini board and following ur tutorials
while setting up board support package , after typing ptxdist get..
i am getting following error
“”"”"
target: barebox-.tar.bz2
————————
–2012-04-06 15:35:08– http://www.barebox.org/download/barebox-.tar.bz2
Resolving http://www.barebox.org... 78.47.139.85, 2a01:4f8:121:2:5054:ff:feaf:fc62
Connecting to http://www.barebox.org|78.47.139.85|:80… connected.
HTTP request sent, awaiting response… 404 Not Found
2012-04-06 15:35:09 ERROR 404: Not Found.
–2012-04-06 15:35:09– http://www.pengutronix.de/software/ptxdist/temporary-src/barebox-.tar.bz2
Resolving http://www.pengutronix.de... 78.47.139.85, 2a01:4f8:121:2:5054:ff:feaf:fc62
Connecting to http://www.pengutronix.de|78.47.139.85|:80… connected.
HTTP request sent, awaiting response… 404 Not Found
2012-04-06 15:35:10 ERROR 404: Not Found.
Could not download packet
URL: http://www.barebox.org/download/barebox-.tar.bz2
make: *** [/home/poorna/BSP/OSELAS.BSP-Pengutronix-Mini2440-2011.11.0/src/barebox-.tar.bz2] Error 1
ptxdist: ‘barebox_mlo menuconfig’ returned with an error
“”"”"”
can u plz resolve this erros…
thnku…
what is your ptxdist and BSP version numbers?
OSELAS.BSP-Pengutronix-Mini2440-2011.11.0
ptxdist-2011.11.0
Seems you didn’t follow the tutorial. The error message you see is due to a not configured platform (or incomplete). Some packages in PTXdist do not come with a fixed release number. So, you must setup the correct release number in the menu. And this release number will then be used to download the corresponding archive from the web. And “barebox-.tar.bz2″ shows this release number was not setup in the menu. But in my Mini2440 BSP is *is* setup. So, what are you really doing?
How to setup the version no?
i googled this erro and found some thing similar on mail lists even. but couldnt find the solution from them.
Run “ptxdist platformconfig” and navigate to
bootloaders –>
[*] barebox —>
On my original Mini2440 BSP the entries are looking like this:
(2011.05.0) barebox version
(d66774abcf9fa6c9530e13543cc707bc) barebox source md5sum
(barebox-NAND-128M.config) config file
[*] extend the builtin barebox environment
(${PTXDIST_PLATFORMCONFIGDIR}/barebox-128m-env) env dir
thnku fr ur reply…
but i too have same thing in my barebox as u mentioned.
and while i type “ptxdist go” while being in bsp folder i am getting following error.
“”"”"
checking whether to build shared libraries… yes
checking whether to build static libraries… yes
checking for a sed that does not truncate output… (cached) /usr/local/lib/ptxdist-2012.03.0/bin/sed
checking for XI… no
configure: error: Package requirements (xproto >= 7.0.13 x11 >= 1.2.99.1 xextproto >= 7.0.3 xext >= 1.0.99.1 inputproto >= 1.9.99.902) were not met:
No package ‘xproto’ found
No package ‘x11′ found
No package ‘xextproto’ found
No package ‘xext’ found
No package ‘inputproto’ found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables XI_CFLAGS
and XI_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
make: *** [/home/poorna/BSP/OSELAS.BSP-Pengutronix-Mini2440-2011.11.0/platform-mini2440/state/xorg-lib-xi.prepare] Error 1
“”"”"
wingz help me out in this two issues.
i googled but to my level of knowledge i couldnt understand what they were telling.
thnku…
can you send this issue to oselas@community.pengutronix.de ? I think you need to enable the Xorg packages.. they provide the X window system packages..
i wil send this issue, hope i get sme response.
i enabled all the packages when it asked with y,n,m options.
I thought i could remove some if nt required.
my suggestion – delete all and re-do the steps – this time when you run ptxdist migrate answer ‘n’ to everything and see if you have the same error. Alternatively you could upgrade to a newer version of ptxdist and the BSP and try again.
i tried to upgrade but…
new versions are asking for ne toolchains versions..
What did you do up to this point? It seems you enabled some X server related things, didn’t you? How did you enabled it? Most of the time this kind of error happens if someone tries to be smart and changes the settings with an editor in the PTXdist config files instead of using the “ptxdist menuconfig” feature.
I enabled all the packages which are displayed while i set BSP. i mean it asks for options like [y,n,m] so.
can i disable them which are nt required ?
When you use my original Mini2440 BSP and follow the manual there is no need to answer any questions. So, what did you do?
i followed the tutorial and when i typed ptxdist go…
i was imedeaitley followed by package names and options to select them.
couldnt knw why….
ptxdist migrate asks that – select n for all of them – unless you need the package and know what it was.
thnku wingz…
i am trying it…
Congrats, you found a bug in PTXdist. When I’m doing the same here with the November release of the BSP and the March release of PTXdist it also fails at the same package. We are now going to hunt this bug…
oh..thn i wil wait for ur fix…..thnku
There is no quick solution for this bug. While the migration step if you answer with ‘y’ to a so called “sub component”, this sub component will be enabled, even if the main component is still disabled. In your case you enabled the xorg-lib-xi sub component, but the whole xorg main component is still disabled. This will break the dependency generator and the build will fail.
This cannot happen, when you just run “ptxdist menuconfig” instead. As long as the main component is disabled, you can’t enable any sub component.
The really bad news is, you can’t repair an already broken config file (due to the ‘migrate’ step) with a simple call to “ptxdist menuconfig”.
Maybe a different approach will help you: re-start with the Mini2440 BSP from the archive. And then run a simple “ptxdist menuconfig –force” and “ptdist platformconfig –force” to update the BSP to the new PTXdist revision. This will use the default settings of all new menuentries instead of asking you if you want to enable/disable it. This approach is also not perfect, but better than a broken config files.
thnks alot for ur help. i am starting from first…
Great Blog Wingz it’s been incredible helpfull.
thankz!
Hi ,please see what i really have to do here.
razi@ubuntu:~/BSP/OSELAS.BSP-Pengutronix-Mini2440-2012.02.0$ ptxdist go
****************************************************************************
*Please generate a barebox MLO config with ‘ptxdist menuconfig barebox_mlo’*
****************************************************************************
make: *** [/home/razi/BSP/OSELAS.BSP-Pengutronix-Mini2440-2012.02.0/configs/platform-friendlyarm-mini2440/y] Error
$ ptxdist platformconfig
bootloaders —>
[ ] barebox mlo —>
Hi, thanks for reply ,
please see that i have used the commands u have mentioned above and name the string as “barebox_mlo.config” when prompted to enter the string name and in the
blue and grey screen of ptxdist i see this line
“(barebox_mlo.config) mlo config file ”
and then i entered the command
$ ptxdist menuconfig barebox_mlo
then it again gives me blue and grey screen of PTxdist here do i have to set any options?
and then if i enter $ptxdist go
it gives me the following status :
——————————–
target: os-release.targetinstall
——————————–
install_init: preparing for image creation of ‘os-release’…
install_init: @ARCH@ -> armel
install_init: @PACKAGE@ -> os-release
install_init: @VERSION@ -> 1.0
install_init: @DEPENDS@ ->
install_init: preinst not available
install_init: postinst not available
install_init: prerm not available
install_init: postrm not available
install_fixup: @PRIORITY@ -> optional … done.
install_fixup: @SECTION@ -> base … done.
install_fixup: @AUTHOR@ -> “Michael Olbrich ” … done.
install_fixup: @DESCRIPTION@ -> missing … done.
xpkg_finish: collecting license (unknown) … done.
xpkg_finish: creating ipkg package …
install alternative:
src=ptxdist-2012.04.0/generic/etc/os-release
dst=/etc/os-release
owner=0
group=0
permissions=0644
install replace:
file=/etc/os-release
‘@VENDOR@’ -> ‘PTX’
install replace:
file=/etc/os-release
‘@PROJECT@’ -> ‘Mini2440′
install replace:
file=/etc/os-release
‘@PRJVERSION@’ -> ‘-2012.02.0′
install replace:
file=/etc/os-release
‘@PLATFORM@’ -> ‘mini2440′
install replace:
file=/etc/os-release
‘@PLATVERSION@’ -> ‘-2012.02.0′
install replace:
file=/etc/os-release
‘@PTXDIST_VERSION@’ -> ’2012.04.0′
install replace:
file=/etc/os-release
‘@DATE@’ -> ’2012-21-01T11:21:50-0700′
Packaged contents of /home/razi/BSP/OSELAS.BSP-Pengutronix-Mini2440-2012.02.0/platform-mini2440/packages/os-release.tmp/ipkg into /home/razi/BSP/OSELAS.BSP-Pengutronix-Mini2440-2012.02.0/platform-mini2440/packages/os-release_1.0_armel.ipk
done.
finished target os-release.targetinstall
————————————-
target: os-release.targetinstall.post
————————————-
finished target os-release.targetinstall.post
———————————
target: barebox_mlo.targetinstall
———————————
make: *** [/home/razi/BSP/OSELAS.BSP-Pengutronix-Mini2440-2012.02.0/platform-mini2440/state/barebox_mlo.targetinstall] Error 1
please guide me some what thanks for reply again
Sorry, Yasir, is was meant different: You should de-select the ‘barebox mlo’ entry. It is not required for the Mini2440 (some OMAP CPUs need this pre-bootloader, but the CPUs on the Mini2440 are of a different architecture).
Hi my above problem seems to be changed as now i have enter the command
ptxdist menuconfig barebox_mlo
it gives me a blue screen ,which seems some what like this :
.config – Linux/arm 2011.05.0-mini2440-ptx-2012.02.0 Barebox Configuration
?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
???????????????????????????????????????? Linux/arm 2011.05.0-mini2440-ptx-2012.02.0 Barebox Configuration ????????????????????????????????????????
? Arrow keys navigate the menu. selects submenus —>. Highlighted letters are hotkeys. Pressing includes, excludes, ?
? modularizes features. Press to exit, for Help, for Search. Legend: [*] built-in [ ] excluded module module ?
? capable ?
? ?
? ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ?
? ? System Type —> ? ?
? ? Arm specific settings —> ? ?
? ? General Settings —> ? ?
? ? Debugging —> ? ?
? ? Commands —> ? ?
? ? [ ] Networking Support —> ? ?
? ? Drivers —> ? ?
? ? Filesystem support —> ? ?
? ? [ ] Digest —> ? ?
? ? — ? ?
? ? Load an Alternate Configuration File ? ?
? ? Save an Alternate Configuration File
what i have to set here ?plz help in this regard
What is the locale on your system? What kind of terminal emulation do you use? Seems the ncurses library (which draws the menu) is confused on your system.