<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.linuxmce.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Wingie</id>
	<title>LinuxMCE - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.linuxmce.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Wingie"/>
	<link rel="alternate" type="text/html" href="http://wiki.linuxmce.org/index.php/Special:Contributions/Wingie"/>
	<updated>2026-07-22T01:27:50Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>http://wiki.linuxmce.org/index.php?title=Mini2440_FAQ&amp;diff=29327</id>
		<title>Mini2440 FAQ</title>
		<link rel="alternate" type="text/html" href="http://wiki.linuxmce.org/index.php?title=Mini2440_FAQ&amp;diff=29327"/>
		<updated>2011-12-24T16:18:52Z</updated>

		<summary type="html">&lt;p&gt;Wingie: /* Where can I find out more info and get downloads for the mini2440? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Hardware]]&lt;br /&gt;
[[category: tutorials]]&lt;br /&gt;
[[Category: Orbiters]]&lt;br /&gt;
{{merge|Mini2440}}&lt;br /&gt;
{{versioninfo}}&lt;br /&gt;
&lt;br /&gt;
=Mini2440 Orbiter setup and FAQ=&lt;br /&gt;
&lt;br /&gt;
== FAQ for beginners on embeded technology and the mini2440 $99 single-board computer ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== What is LinuxMCE, and what embedded operating system runs it? ===&lt;br /&gt;
&lt;br /&gt;
linuxmce is an home automation and multi media appliance solution based on top of ubuntu, and supports tons of input devices, from mobiles over PDAs to flat screens&lt;br /&gt;
&lt;br /&gt;
=== How do I turn my mini2440 into an Orbiter? ===&lt;br /&gt;
&lt;br /&gt;
Glad you asked :-)  The porting for this is taking place right now.  When instructions become available, we&#039;ll post them here.  Follow the action via IRC or the links later in this page if you can&#039;t wait.&lt;br /&gt;
&lt;br /&gt;
=== What is JTAG?  Do I need it for anything? ===&lt;br /&gt;
&lt;br /&gt;
JTAG is a common low level debug interface.  you can operate cpus in single step mode and flash nand/nor that way and do low level debugging.&lt;br /&gt;
&lt;br /&gt;
It is generally what developers use when developing low-level drivers, or as a recovery tool if you somehow destroyed your NOR flash (that&#039;s the code your embedded computer runs when you 1st turn it on)&lt;br /&gt;
&lt;br /&gt;
=== What is vivi and u-boot? ===&lt;br /&gt;
&lt;br /&gt;
vivi is the old bootloader.&lt;br /&gt;
&lt;br /&gt;
uBoot is the new one - and can boot from SD cards.&lt;br /&gt;
&lt;br /&gt;
These are kindoflike grub - code which runs at startup and helps with loading or booting the operating system - but can do other exciting stuff like flash new bootloaders into the NAND memory etc.&lt;br /&gt;
&lt;br /&gt;
You hook your mini2440 serial cable (striaght-through - not a crossover) up to a terminal emulator on your desktop PC to access vivi or u-boot.&lt;br /&gt;
&lt;br /&gt;
=== What is QT? ===&lt;br /&gt;
&lt;br /&gt;
qt is a windowing toolkit developed into an embedded toolkit and such lately by trolltech, which was was acquired by nokia recently.  If your device is running QT, it probably doesn&#039;t have X.&lt;br /&gt;
&lt;br /&gt;
=== What is X or X11 ? ===&lt;br /&gt;
&lt;br /&gt;
it&#039;s a graphical display environment that runs on Linux - the same as the original Microsoft version called &amp;quot;Windows&amp;quot; runs on MS-DOS&lt;br /&gt;
&lt;br /&gt;
=== What&#039;s GPE ? ===&lt;br /&gt;
&lt;br /&gt;
GPE is a desktop environment, and includes at least a lightweight web browser&lt;br /&gt;
&lt;br /&gt;
=== What&#039;s OPIE ? ===&lt;br /&gt;
&lt;br /&gt;
opie is another different desktop environment&lt;br /&gt;
&lt;br /&gt;
=== What&#039;s cairo? ===&lt;br /&gt;
&lt;br /&gt;
A display programming component allowing apps to write directly on diretfb without needing X11 or QT etc (works on mini2440).   It&#039;s the graphical backend in most modern apps (Firefox etc). see http://www.cairographics.org/&lt;br /&gt;
&lt;br /&gt;
=== What&#039;s SDL? ===&lt;br /&gt;
&lt;br /&gt;
Another low-level screen/keyboard/mouse/etc library (works on mini2440).  http://www.libsdl.org/&lt;br /&gt;
&lt;br /&gt;
=== What&#039;s QEMU ? ===&lt;br /&gt;
&lt;br /&gt;
qemu is a hardware emulator - you can experiment with running things on this, without needing to use the actual hardware device.&lt;br /&gt;
&lt;br /&gt;
=== What is Android? ===&lt;br /&gt;
&lt;br /&gt;
A new linux operating system sponsored by google, predominently java-based, designed for mobile phones and portable gadgets.&lt;br /&gt;
&lt;br /&gt;
=== Does Android run on the Mini2440? ===&lt;br /&gt;
&lt;br /&gt;
There are no working ports to this platform yet - rumours exist of a mostly-working port having been achieved to a similar platform recently, so it&#039;s probably not far off.&lt;br /&gt;
&lt;br /&gt;
=== What is emdebian-grip-090306-armel-lenny-installed.tar.bz2 for ? ===&lt;br /&gt;
&lt;br /&gt;
thats a fantastic linux distribution and content base you can run with your kernel&lt;br /&gt;
&lt;br /&gt;
=== How do I see my mini2440 boot screen? ===&lt;br /&gt;
&lt;br /&gt;
Hook up the serial port to a PC using 115200 baud (no flow control) - this is how you access vivi and u-boot.&lt;br /&gt;
&lt;br /&gt;
=== What compiler switches do I need to build working code on a mini2440? ===&lt;br /&gt;
&lt;br /&gt;
If you&#039;re staring at &amp;quot;illegal instruction error&amp;quot; problems, and using arm-none-linux-gnueabi-gcc (Sourcery G++ Lite 2008q3-72) 4.3.2, you need this:&lt;br /&gt;
&lt;br /&gt;
 -msoft-float -D__GCC_FLOAT_NOT_NEEDED -march=armv4 -mtune=arm920t&lt;br /&gt;
&lt;br /&gt;
=== Where do I get a mini2440? ===&lt;br /&gt;
&lt;br /&gt;
As of March &#039;09 - there&#039;s 1 distributer in each of the USA, Japan, and Europe.  The mini2440 is made in China, and many sellers on eBay provide (unsupported) units, with Chinese instructions.  I know of only 2 distributer with English tools ( http://www.developmentboard.net, http://www.andahammer.com/ ) - please update this list if you can.&lt;br /&gt;
&lt;br /&gt;
=== How easy is it to &amp;quot;brick&amp;quot; a mini2440? ===&lt;br /&gt;
&lt;br /&gt;
basically you cannot really brick (kill) the unit - there is a NOR switch where you can boot from NOR in emergencies.  The rest of the time, you store new bootloaders etc in the NAND flash, and set the switch to boot from that.  If you kill your NOR too - you use the JTAG to fix that.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Where can I find out more info and get downloads for the mini2440? ===&lt;br /&gt;
&lt;br /&gt;
Blog: http://bliterness.blogspot.com&lt;br /&gt;
&lt;br /&gt;
Web: http://code.google.com/p/mini2440/&lt;br /&gt;
&lt;br /&gt;
Irc: #mini2440&lt;br /&gt;
&lt;br /&gt;
general info: http://www.handhelds.org&lt;br /&gt;
&lt;br /&gt;
more info: http://wiki.linuxmce.org/index.php/Mini2440&lt;br /&gt;
&lt;br /&gt;
some downloads: http://www.andahammer.com/downloads/&lt;br /&gt;
&lt;br /&gt;
Qt 4.5 on mini2440 http://blog.cor-net.org/&lt;br /&gt;
&lt;br /&gt;
Using the pengutronix BSP for the mini2440: http://wingston.workshopindia.com/wingz/embedded-programming-on-the-mini2440-using-ptxdist/&lt;br /&gt;
&lt;br /&gt;
Files and utils http://vt100.at/files/mini2440/&lt;br /&gt;
&lt;br /&gt;
Manufacturer update info http://www.developmentboard.net (english, german)&lt;br /&gt;
&lt;br /&gt;
Manufacturer update info http://arm9.net/mini2440-update.asp (chinese)&lt;br /&gt;
&lt;br /&gt;
Chinese downloads http://www.arm9down.cn/ [[http://www.arm9down.cn/mini2440/images-20090112.rar | jan_2009_release.rar]]&lt;/div&gt;</summary>
		<author><name>Wingie</name></author>
	</entry>
	<entry>
		<id>http://wiki.linuxmce.org/index.php?title=Mini2440&amp;diff=29299</id>
		<title>Mini2440</title>
		<link rel="alternate" type="text/html" href="http://wiki.linuxmce.org/index.php?title=Mini2440&amp;diff=29299"/>
		<updated>2011-12-17T09:54:38Z</updated>

		<summary type="html">&lt;p&gt;Wingie: /* Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Hardware]]&lt;br /&gt;
[[Category: Tutorials]]&lt;br /&gt;
[[Image:Mini2440.jpg|thumb|200px|mini2440]]&lt;br /&gt;
&lt;br /&gt;
= About =&lt;br /&gt;
This is a howto install uboot and a new kernel on the mini2440. Big thanks to BusError for the instructions and guidance. DISCLAIMER: This worked for me, if it eats your cat or burns your kitchen sink, don&#039;t blame me.&lt;br /&gt;
&lt;br /&gt;
Specification MINI2440v2 &lt;br /&gt;
CPU S3C2440A &lt;br /&gt;
MHz 400-533 &lt;br /&gt;
RAM 64MB &lt;br /&gt;
NOR flash 2MB &lt;br /&gt;
Nand Flash 128MB &lt;br /&gt;
Ethernet 10/100M Ethernet, RJ-45 connector &lt;br /&gt;
Serial ports 3 &lt;br /&gt;
RS232 1 &lt;br /&gt;
USB Host 1 &lt;br /&gt;
USB Device 1 &lt;br /&gt;
SD card slot 1 &lt;br /&gt;
Audio Interface In, Out, Mic &lt;br /&gt;
LCD connector 1 &lt;br /&gt;
Camera Interface 1 &lt;br /&gt;
JTAG 10pin JTAG connector &lt;br /&gt;
Bus 40pin connector &lt;br /&gt;
GPIO 34pin connector &lt;br /&gt;
Dimension 100x100mm &lt;br /&gt;
Linux Open Embeddeed with Ångström &lt;br /&gt;
WinCE WinCE 6.0 &lt;br /&gt;
&lt;br /&gt;
For more details:http://www.developmentboard.net/index.php/productdetail/Development+board/ARM9/SAMSUNG/S3C2440/MINI2440v2/info/1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Preparations =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I used this one: Add the bin dir to the $PATH. If you have a toolchain with another prefix (like arm-linux-) adapt the CROSS_COMPILE environment variable in the next steps.&lt;br /&gt;
&lt;br /&gt;
= Setting up the bootloader =&lt;br /&gt;
== Compiling uboot ==&lt;br /&gt;
Clone the git tree:&lt;br /&gt;
 mkdir uboot ; cd uboot&lt;br /&gt;
 git clone git://repo.or.cz/u-boot-openmoko/mini2440.git&lt;br /&gt;
Setup cross compiling:&lt;br /&gt;
 export CROSS_COMPILE=arm-none-linux-gnueabi-&lt;br /&gt;
or edit your .bashrc eg. &lt;br /&gt;
 export CROSS_COMPILE=arm-none-linux-gnueabi-&lt;br /&gt;
 export PS1=&amp;quot;\[\033[1;34m\]\u \[\033[0m\]\w:\$: \[\033[0m\]&amp;quot;&lt;br /&gt;
 #export PS1=&amp;quot;\u:\w\$&amp;gt;&amp;quot;&lt;br /&gt;
 LS_OPTIONS=&amp;quot;--color=auto&amp;quot;&lt;br /&gt;
 alias ls=&amp;quot;ls $LS_OPTIONS&amp;quot;&lt;br /&gt;
Prepare the mini2440 target:&lt;br /&gt;
 cd mini2440&lt;br /&gt;
 make mini2440_config&lt;br /&gt;
Compile:&lt;br /&gt;
 make all&lt;br /&gt;
This will give you a &amp;quot;u-boot.bin&amp;quot;. If you get an error about a missing whatever-gcc, verifiy if there is a hardcoded CROSS_COMPILE setting in the Makefile&lt;br /&gt;
&lt;br /&gt;
== Flashing uboot ==&lt;br /&gt;
We use the installed vivi bootloader to load uboot via usb. Power the board off, set the NOR switch to on, power the board on. You&#039;ll get the vivi output on the serial console. Press &#039;q&#039; to go to the shell and do the &amp;quot;load flash&amp;quot; on address 0 with the size of &amp;quot;u-boot.bin&amp;quot; (238232 bytes in this example):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[q] Goto shell of vivi                                                          &lt;br /&gt;
Enter your selection: q                                                         &lt;br /&gt;
Supervivi&amp;gt; load flash 0 238232 u                                                &lt;br /&gt;
USB host is connected. Waiting a download.                                      &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the &amp;quot;s3c2410_boot_usb&amp;quot; utility (http://mini2440.googlecode.com/files/s3c2410_boot_usb-20060807.tar.bz2) to upload the &amp;quot;u-boot.bin&amp;quot; via usb:&lt;br /&gt;
 ./s3c2410_boot_usb u-boot.bin &lt;br /&gt;
You&#039;ll see something like this as output, ignore the error message:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
csum = 0x9a6e&lt;br /&gt;
send_file: addr = 0x33f80000, len = 0x0003a298&lt;br /&gt;
Error downloading program&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and this on the serial console:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Now, Downloading [ADDRESS:30000000h,TOTAL:238242]                               &lt;br /&gt;
RECEIVED FILE SIZE:  238242 (232KB/S, 1S)                                       &lt;br /&gt;
Downloaded file at 0x30000000, size = 238232 bytes                              &lt;br /&gt;
Found block size = 0x0003c000                                                   &lt;br /&gt;
Erasing...    ... done                                                          &lt;br /&gt;
Writing...    ... done                                                          &lt;br /&gt;
Written 238232 bytes                                                            &lt;br /&gt;
Supervivi&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you see&lt;br /&gt;
 MINI2440 # saveenv&lt;br /&gt;
 &lt;br /&gt;
 Saving Environment to NAND...&lt;br /&gt;
 &lt;br /&gt;
 Erasing Nand...nand_erase: attempt to erase a bad block at page 0x00000260&lt;br /&gt;
&lt;br /&gt;
Try&lt;br /&gt;
 MINI2440 # nand scrub&lt;br /&gt;
 ...&lt;br /&gt;
 Really scrub this NAND flash? &amp;lt;y/N&amp;gt;&lt;br /&gt;
press y and enter. After erasing make&lt;br /&gt;
 MINI2440 # nand createbbt&lt;br /&gt;
press y and enter. Now you can save the environment&lt;br /&gt;
  MINI2440 # saveenv&lt;br /&gt;
&lt;br /&gt;
Now power off the board, set the NOR switch back to off, and power on the board. We verify the version and then prepare config storage in flash:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MINI2440 # version                                                              &lt;br /&gt;
                                                                                &lt;br /&gt;
U-Boot 1.3.2-dirty-moko12 (Mar  8 2009 - 13:50:19)  &lt;br /&gt;
&lt;br /&gt;
MINI2440 # dynenv set 40000                                                     &lt;br /&gt;
device 0 offset 0x40000, size 0x3fc0000                                         &lt;br /&gt;
45 4e 56 30 - 00 00 04 00           &lt;br /&gt;
&lt;br /&gt;
MINI2440 # saveenv                                                              &lt;br /&gt;
Saving Environment to NAND...                                                   &lt;br /&gt;
Erasing Nand...Writing to Nand... done                                          &lt;br /&gt;
&lt;br /&gt;
MINI2440 # reset                                                                &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Configure uboot ==&lt;br /&gt;
do a &amp;quot;printenv&amp;quot; to show active settings. Adjust the IP for uboot and the tftp server. We need proper IP connectivity to load the kernel with tftp. &amp;quot;setenv&amp;quot; is your friend. &amp;quot;saveenv&amp;quot; stores the setting to flash.&lt;br /&gt;
&lt;br /&gt;
= Kernel =&lt;br /&gt;
== Compilation ==&lt;br /&gt;
Fetch from git:&lt;br /&gt;
 mkdir kernel ; cd kernel&lt;br /&gt;
 git clone git://repo.or.cz/linux-2.6/mini2440.git&lt;br /&gt;
 cd mini2440&lt;br /&gt;
 mkdir -p ../kernel-bin&lt;br /&gt;
Generate .config from mini2440 template:&lt;br /&gt;
 CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm make O=../kernel-bin/ mini2440_defconfig&lt;br /&gt;
&lt;br /&gt;
(optional) if you want to modify kernel modules use this command afterwards:&lt;br /&gt;
 (optional if you don&#039;t have libncurses5-dev) apt-get install libncurses5-dev&lt;br /&gt;
 cd ../kernel-bin&lt;br /&gt;
 make ARCH=arm menuconfig&lt;br /&gt;
 cd ../mini2440&lt;br /&gt;
&lt;br /&gt;
Compile kernel and modules:&lt;br /&gt;
 CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm make O=../kernel-bin/&lt;br /&gt;
Generate &amp;quot;uImage&amp;quot; with the &amp;quot;mkimage&amp;quot; tool:&lt;br /&gt;
 ../uboot/mini2440/tools/mkimage -A arm -O linux -T kernel -C none -a 0x30008000 -e 0x30008000 -d ../kernel-bin/arch/arm/boot/zImage /tftpboot/uImage&lt;br /&gt;
&lt;br /&gt;
== Kernel Modules ==&lt;br /&gt;
To create the dynamically loaded kernel modules, which would go into the root file system later on do this:&lt;br /&gt;
 CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm make O=../kernel-bin/ modules&lt;br /&gt;
 CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm make O=../kernel-bin/ INSTALL_MOD_PATH=.. modules_install&lt;br /&gt;
&lt;br /&gt;
After this step, there should be a directory ../lib which would contain the dynamically loaded modules(drivers). This folder would go to the root file system of your board, for example I  have my filesystem on a sd card. I would stick the SD card in the PC, and mount it and then copy the modules as:&lt;br /&gt;
&lt;br /&gt;
  cp ../lib/modules/2.6.32-rc8/ /media/rootfs/lib/modules/ -r&lt;br /&gt;
&lt;br /&gt;
don&#039;t forget to&lt;br /&gt;
 sync&lt;br /&gt;
 umount /media/*&lt;br /&gt;
&lt;br /&gt;
== Flash kernel ==&lt;br /&gt;
Verify partitions, we need the offset for the kernel partition (probably 0x60000):&lt;br /&gt;
 mtdparts&lt;br /&gt;
Erase the kernel partition:&lt;br /&gt;
 nand erase 60000 &amp;lt;padded size&amp;gt;&lt;br /&gt;
Load the kernel with uboot into ram:&lt;br /&gt;
 tftp 0x32000000 uImage&lt;br /&gt;
Note the size, pad it to 512 byte and use the nand write command to flash it:&lt;br /&gt;
 nand write 32000000 60000 &amp;lt;padded size&amp;gt;.&lt;br /&gt;
== Configure uboot ==&lt;br /&gt;
We use a nfs chroot for now:&lt;br /&gt;
 setenv bootargs console=ttySAC0,115200 noinitrd init=/sbin/init mini2440=1tb ip=192.168.80.12 root=/dev/nfs rw nfsroot=192.168.80.1:/home/public/arm&lt;br /&gt;
This is helpful for automatic booting:&lt;br /&gt;
 setenv bootcmd &#039;nboot.e kernel ; bootm&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Bit Baking Angstrom, and QT Embedded 4 =&lt;br /&gt;
If you are using Fedora follow this link : http://www.electronics.diycinema.co.uk/embedded/mini2440/bitbaking-the-kernel-angstrom-and-qt4-embedded-all-at-once/comment-page-2/#comment-498 , otherwise follow here:&lt;br /&gt;
== Getting the required software ==&lt;br /&gt;
 cd ~&lt;br /&gt;
 mkdir OE&lt;br /&gt;
 cd OE&lt;br /&gt;
 git clone git://repo.or.cz/openembedded/mini2440.git openembedded&lt;br /&gt;
&lt;br /&gt;
Getting other required Softwares&lt;br /&gt;
 sudo apt-get install gawk diffstat help2man texi2html texinfo build-essential subversion cvs unzip texinfo git-core&lt;br /&gt;
 sudo dpkg-reconfigure dash&lt;br /&gt;
and choose &amp;quot;&amp;lt;No&amp;gt;&amp;quot; from the menu.&lt;br /&gt;
&lt;br /&gt;
Then we create a helper for ourselves:&lt;br /&gt;
 gedit ~/OE/source-me.txt&lt;br /&gt;
&lt;br /&gt;
and past the following, and change the /home/ashkax to your own home directory address.&lt;br /&gt;
&lt;br /&gt;
 export OETREE=&amp;quot;/home/ashkax/OE&amp;quot;&lt;br /&gt;
 BBPATH=${OETREE}/:${OETREE}/openembedded/&lt;br /&gt;
 echo Setting up dev env for Ångström&lt;br /&gt;
 if [ -z ${ORG_PATH} ] ; then&lt;br /&gt;
 ORG_PATH=${PATH}&lt;br /&gt;
 export ORG_PATH&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 if [ -z ${ORG_LD_LIBRARY_PATH} ] ; then&lt;br /&gt;
 ORG_LD_LIBRARY_PATH=${LD_LIBRARY_PATH}&lt;br /&gt;
 export ORG_LD_LIBRARY_PATH&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 PATH=${OETREE}/openembedded/bitbake/bin:${ORG_PATH}&lt;br /&gt;
 LD_LIBRARY_PATH=&lt;br /&gt;
 export PATH LD_LIBRARY_PATH BBPATH&lt;br /&gt;
 export LANG=C&lt;br /&gt;
 export BB_ENV_EXTRAWHITE=&amp;quot;MACHINE DISTRO OETREE ANGSTROM_MODE ANGSTROMLIBC LIBC&amp;quot;&lt;br /&gt;
 sudo sysctl vm.mmap_min_addr=0&lt;br /&gt;
 echo &amp;quot;Altered environment for OE Development&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This file that we just created will be used later on, to setup the compiler... Now lets edit the bitbake configuration file to tell bit bake we like it to compile the QT embedded for us too:&lt;br /&gt;
&lt;br /&gt;
 cd ~/OE/openembedded&lt;br /&gt;
 wget http://www.electronics.diycinema.co.uk/wp-content/uploads/2009/11/local.conf.txt&lt;br /&gt;
 gedit local.conf.txt&lt;br /&gt;
  &lt;br /&gt;
now change all the doug to your own user name, save the file and quit gedit. Then&lt;br /&gt;
 cp local.conf.txt conf/local.conf&lt;br /&gt;
&lt;br /&gt;
Alternatively you can use the original sample file and edit it to your liking:&lt;br /&gt;
 cd openembedded&lt;br /&gt;
 gedit mini2440_local_conf_example.conf&lt;br /&gt;
 cp mini2440_local_conf_example.conf conf/local.conf&lt;br /&gt;
&lt;br /&gt;
== Adding QT to baking recipes ==&lt;br /&gt;
 gedit ~/OE/openembedded/recipes/images/mini2440-image.bb&lt;br /&gt;
&lt;br /&gt;
it would be something like:&lt;br /&gt;
 #Angstrom bootstrap image&lt;br /&gt;
 IMAGE_PREPROCESS_COMMAND = &amp;quot;create_etc_timestamp&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 ANGSTROM_EXTRA_INSTALL ?= &amp;quot;&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 DEPENDS =  &amp;quot;task-base-extended \&lt;br /&gt;
 psplash-zap \&lt;br /&gt;
 esekeyd u-boot-utils tslib \&lt;br /&gt;
 i2c-tools i2c screen rsync nfs-utils \&lt;br /&gt;
 directfb gdbserver directfb mtd-utils \&lt;br /&gt;
 &amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 IMAGE_INSTALL = &amp;quot;task-base-extended \&lt;br /&gt;
 ${ANGSTROM_EXTRA_INSTALL} \&lt;br /&gt;
 psplash-zap qt4-embedded\&lt;br /&gt;
 esekeyd u-boot-utils tslib-calibrate tslib-tests \&lt;br /&gt;
 i2c-tools i2c screen rsync nfs-utils-client \&lt;br /&gt;
 directfb gdbserver directfb mtd-utils \&lt;br /&gt;
 rsvg pango \&lt;br /&gt;
 &amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 export IMAGE_BASENAME = &amp;quot;mini2440-image&amp;quot;&lt;br /&gt;
 IMAGE_LINGUAS = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 inherit image&lt;br /&gt;
&lt;br /&gt;
== running the bitbake ==&lt;br /&gt;
Now all you have to do is source the script from wherever you put it:&lt;br /&gt;
 source ~/OE/source-me.txt&lt;br /&gt;
 cd ~/OE/openembedded/&lt;br /&gt;
 bitbake mini2440-image&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you get an error trying to build a package try cleaning it:&lt;br /&gt;
bitbake -c clean INSERTPACKAGENAME&lt;br /&gt;
&lt;br /&gt;
Then try and build the image again. Maybe you won’t have this problem. I guess it’s either because the checksum parser failed to build or my hdd is dodgy. It only happened once on binutils but worked fine after cleaning it.&lt;br /&gt;
&lt;br /&gt;
A few hours later if all goes well you should have images in:&lt;br /&gt;
~/OE/oetmp/deploy/glibc/images/mini2440/&lt;br /&gt;
&lt;br /&gt;
Obviously that directory depends on what you setup in the local.conf.&lt;br /&gt;
&lt;br /&gt;
but, for a fun start boot up your mini2440 with the new image that you&#039;ve just created and issue the following command:&lt;br /&gt;
 ts_calibrate &lt;br /&gt;
 ts_test&lt;br /&gt;
 qtdemo -qws&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
== Write errors ==&lt;br /&gt;
When you have bad blocks in NAND, you&#039;ll get write errors. This gives more information: http://wiki.openmoko.org/wiki/NAND_bad_blocks&lt;br /&gt;
&lt;br /&gt;
Clear the flash (do not reset the board till uboot is reinstalled, or you need to use NOR/vivi to reinstall uboot via usb):&lt;br /&gt;
 nand scrub&lt;br /&gt;
Create new bad blocks table:&lt;br /&gt;
 nand createbbt&lt;br /&gt;
Reflash uboot (use the size in the output from the tftp command and pad it to hit 512 byte boundaries for the nand write command)&lt;br /&gt;
 tftp 0x32000000 u-boot.bin&lt;br /&gt;
 nand write 32000000 0 &amp;lt;size of u-boot.bin&amp;gt;&lt;br /&gt;
 reset&lt;br /&gt;
Create dynamic partitions:&lt;br /&gt;
 dynpart&lt;br /&gt;
 dynenv set u-boot_env&lt;br /&gt;
 saveenv&lt;br /&gt;
 reset&lt;br /&gt;
And then use write.e to write to the mtdparts, e.g.:&lt;br /&gt;
 tftp 0x32000000 uImage&lt;br /&gt;
 nand write.e 32000000 kernel&lt;br /&gt;
 nboot.e kernel&lt;br /&gt;
&lt;br /&gt;
== Python Alignment trap, Segmentation fault ==&lt;br /&gt;
This error and some other errors related to illegal instructions happened because all packages are compiled with -mthumb though the kernel and modules use -mno-thumb. The mix of instruction sets seem to cause problems. A hotfix is to edit your conf/distro/include/angstrom.inc and change the line:&lt;br /&gt;
ANGSTROM_ARM_INSTRUCTION_SET_armv4t = &amp;quot;thumb&amp;quot;&lt;br /&gt;
to&lt;br /&gt;
ANGSTROM_ARM_INSTRUCTION_SET_armv4t = &amp;quot;arm&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The default for the mini2440 is -mno-thumb but for some reason (save memory space, maybe?) the angstrom distro overrides this for all armv4t family processors.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Messed Up Screen Positions( or TS calibration) IN QT ==&lt;br /&gt;
If the resolution is messed up or you can run the ts_calibrate  but the hitting points are out of range, it may be because of the boot arguments.. Reboot your system, press a key in startup to go to uboot environment and make sure mini2440=0tb for 3.5&amp;quot; screen, and mini2440=1tb for 7&amp;quot; screen.&lt;br /&gt;
Try using the commands printenv, and setenv to do so.&lt;br /&gt;
&lt;br /&gt;
Try ts_calibrated after booting.&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
http://bliterness.blogspot.com/&lt;br /&gt;
&lt;br /&gt;
http://www.developmentboard.net/index.php/productdetail/Development+board/ARM9/SAMSUNG/S3C2440/MINI2440v2/info/1&lt;br /&gt;
&lt;br /&gt;
http://blog.cor-net.org/ (Qt 4.5 on mini2440)&lt;br /&gt;
&lt;br /&gt;
http://wiki.openembedded.net/index.php/Getting_Started&lt;br /&gt;
&lt;br /&gt;
http://www.sereno-online.com/site/2010/05/01/qt-4-6-2-installation-procedure-for-friendlyarm-mini-2440-board/ (Qt 4.6.2 on mini 2440)&lt;br /&gt;
&lt;br /&gt;
http://wingston.workshopindia.com/wingz/embedded-programming-on-the-mini2440-using-ptxdist/ (NEW)&lt;/div&gt;</summary>
		<author><name>Wingie</name></author>
	</entry>
	<entry>
		<id>http://wiki.linuxmce.org/index.php?title=Mini2440_FAQ&amp;diff=29254</id>
		<title>Mini2440 FAQ</title>
		<link rel="alternate" type="text/html" href="http://wiki.linuxmce.org/index.php?title=Mini2440_FAQ&amp;diff=29254"/>
		<updated>2011-12-10T05:27:18Z</updated>

		<summary type="html">&lt;p&gt;Wingie: /* Where can I find out more info and get downloads for the mini2440? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Hardware]]&lt;br /&gt;
[[category: tutorials]]&lt;br /&gt;
[[Category: Orbiters]]&lt;br /&gt;
{{merge|Mini2440}}&lt;br /&gt;
{{versioninfo}}&lt;br /&gt;
&lt;br /&gt;
=Mini2440 Orbiter setup and FAQ=&lt;br /&gt;
&lt;br /&gt;
== FAQ for beginners on embeded technology and the mini2440 $99 single-board computer ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== What is LinuxMCE, and what embedded operating system runs it? ===&lt;br /&gt;
&lt;br /&gt;
linuxmce is an home automation and multi media appliance solution based on top of ubuntu, and supports tons of input devices, from mobiles over PDAs to flat screens&lt;br /&gt;
&lt;br /&gt;
=== How do I turn my mini2440 into an Orbiter? ===&lt;br /&gt;
&lt;br /&gt;
Glad you asked :-)  The porting for this is taking place right now.  When instructions become available, we&#039;ll post them here.  Follow the action via IRC or the links later in this page if you can&#039;t wait.&lt;br /&gt;
&lt;br /&gt;
=== What is JTAG?  Do I need it for anything? ===&lt;br /&gt;
&lt;br /&gt;
JTAG is a common low level debug interface.  you can operate cpus in single step mode and flash nand/nor that way and do low level debugging.&lt;br /&gt;
&lt;br /&gt;
It is generally what developers use when developing low-level drivers, or as a recovery tool if you somehow destroyed your NOR flash (that&#039;s the code your embedded computer runs when you 1st turn it on)&lt;br /&gt;
&lt;br /&gt;
=== What is vivi and u-boot? ===&lt;br /&gt;
&lt;br /&gt;
vivi is the old bootloader.&lt;br /&gt;
&lt;br /&gt;
uBoot is the new one - and can boot from SD cards.&lt;br /&gt;
&lt;br /&gt;
These are kindoflike grub - code which runs at startup and helps with loading or booting the operating system - but can do other exciting stuff like flash new bootloaders into the NAND memory etc.&lt;br /&gt;
&lt;br /&gt;
You hook your mini2440 serial cable (striaght-through - not a crossover) up to a terminal emulator on your desktop PC to access vivi or u-boot.&lt;br /&gt;
&lt;br /&gt;
=== What is QT? ===&lt;br /&gt;
&lt;br /&gt;
qt is a windowing toolkit developed into an embedded toolkit and such lately by trolltech, which was was acquired by nokia recently.  If your device is running QT, it probably doesn&#039;t have X.&lt;br /&gt;
&lt;br /&gt;
=== What is X or X11 ? ===&lt;br /&gt;
&lt;br /&gt;
it&#039;s a graphical display environment that runs on Linux - the same as the original Microsoft version called &amp;quot;Windows&amp;quot; runs on MS-DOS&lt;br /&gt;
&lt;br /&gt;
=== What&#039;s GPE ? ===&lt;br /&gt;
&lt;br /&gt;
GPE is a desktop environment, and includes at least a lightweight web browser&lt;br /&gt;
&lt;br /&gt;
=== What&#039;s OPIE ? ===&lt;br /&gt;
&lt;br /&gt;
opie is another different desktop environment&lt;br /&gt;
&lt;br /&gt;
=== What&#039;s cairo? ===&lt;br /&gt;
&lt;br /&gt;
A display programming component allowing apps to write directly on diretfb without needing X11 or QT etc (works on mini2440).   It&#039;s the graphical backend in most modern apps (Firefox etc). see http://www.cairographics.org/&lt;br /&gt;
&lt;br /&gt;
=== What&#039;s SDL? ===&lt;br /&gt;
&lt;br /&gt;
Another low-level screen/keyboard/mouse/etc library (works on mini2440).  http://www.libsdl.org/&lt;br /&gt;
&lt;br /&gt;
=== What&#039;s QEMU ? ===&lt;br /&gt;
&lt;br /&gt;
qemu is a hardware emulator - you can experiment with running things on this, without needing to use the actual hardware device.&lt;br /&gt;
&lt;br /&gt;
=== What is Android? ===&lt;br /&gt;
&lt;br /&gt;
A new linux operating system sponsored by google, predominently java-based, designed for mobile phones and portable gadgets.&lt;br /&gt;
&lt;br /&gt;
=== Does Android run on the Mini2440? ===&lt;br /&gt;
&lt;br /&gt;
There are no working ports to this platform yet - rumours exist of a mostly-working port having been achieved to a similar platform recently, so it&#039;s probably not far off.&lt;br /&gt;
&lt;br /&gt;
=== What is emdebian-grip-090306-armel-lenny-installed.tar.bz2 for ? ===&lt;br /&gt;
&lt;br /&gt;
thats a fantastic linux distribution and content base you can run with your kernel&lt;br /&gt;
&lt;br /&gt;
=== How do I see my mini2440 boot screen? ===&lt;br /&gt;
&lt;br /&gt;
Hook up the serial port to a PC using 115200 baud (no flow control) - this is how you access vivi and u-boot.&lt;br /&gt;
&lt;br /&gt;
=== What compiler switches do I need to build working code on a mini2440? ===&lt;br /&gt;
&lt;br /&gt;
If you&#039;re staring at &amp;quot;illegal instruction error&amp;quot; problems, and using arm-none-linux-gnueabi-gcc (Sourcery G++ Lite 2008q3-72) 4.3.2, you need this:&lt;br /&gt;
&lt;br /&gt;
 -msoft-float -D__GCC_FLOAT_NOT_NEEDED -march=armv4 -mtune=arm920t&lt;br /&gt;
&lt;br /&gt;
=== Where do I get a mini2440? ===&lt;br /&gt;
&lt;br /&gt;
As of March &#039;09 - there&#039;s 1 distributer in each of the USA, Japan, and Europe.  The mini2440 is made in China, and many sellers on eBay provide (unsupported) units, with Chinese instructions.  I know of only 2 distributer with English tools ( http://www.developmentboard.net, http://www.andahammer.com/ ) - please update this list if you can.&lt;br /&gt;
&lt;br /&gt;
=== How easy is it to &amp;quot;brick&amp;quot; a mini2440? ===&lt;br /&gt;
&lt;br /&gt;
basically you cannot really brick (kill) the unit - there is a NOR switch where you can boot from NOR in emergencies.  The rest of the time, you store new bootloaders etc in the NAND flash, and set the switch to boot from that.  If you kill your NOR too - you use the JTAG to fix that.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Where can I find out more info and get downloads for the mini2440? ===&lt;br /&gt;
&lt;br /&gt;
Blog: http://bliterness.blogspot.com&lt;br /&gt;
&lt;br /&gt;
Web: http://code.google.com/p/mini2440/&lt;br /&gt;
&lt;br /&gt;
Irc: #mini2440&lt;br /&gt;
&lt;br /&gt;
general info: http://www.handhelds.org&lt;br /&gt;
&lt;br /&gt;
more info: http://wiki.linuxmce.org/index.php/Mini2440&lt;br /&gt;
&lt;br /&gt;
some downloads: http://www.andahammer.com/downloads/&lt;br /&gt;
&lt;br /&gt;
Qt 4.5 on mini2440 http://blog.cor-net.org/&lt;br /&gt;
&lt;br /&gt;
Using the pengutronix BSP for the mini2440: http://wingston.wordpress.com/embedded-programming-on-the-mini2440-using-ptxdist/&lt;br /&gt;
&lt;br /&gt;
Files and utils http://vt100.at/files/mini2440/&lt;br /&gt;
&lt;br /&gt;
Manufacturer update info http://www.developmentboard.net (english, german)&lt;br /&gt;
&lt;br /&gt;
Manufacturer update info http://arm9.net/mini2440-update.asp (chinese)&lt;br /&gt;
&lt;br /&gt;
Chinese downloads http://www.arm9down.cn/ [[http://www.arm9down.cn/mini2440/images-20090112.rar | jan_2009_release.rar]]&lt;/div&gt;</summary>
		<author><name>Wingie</name></author>
	</entry>
	<entry>
		<id>http://wiki.linuxmce.org/index.php?title=Mini2440&amp;diff=29251</id>
		<title>Mini2440</title>
		<link rel="alternate" type="text/html" href="http://wiki.linuxmce.org/index.php?title=Mini2440&amp;diff=29251"/>
		<updated>2011-12-09T17:24:38Z</updated>

		<summary type="html">&lt;p&gt;Wingie: /* Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Hardware]]&lt;br /&gt;
[[Category: Tutorials]]&lt;br /&gt;
[[Image:Mini2440.jpg|thumb|200px|mini2440]]&lt;br /&gt;
&lt;br /&gt;
= About =&lt;br /&gt;
This is a howto install uboot and a new kernel on the mini2440. Big thanks to BusError for the instructions and guidance. DISCLAIMER: This worked for me, if it eats your cat or burns your kitchen sink, don&#039;t blame me.&lt;br /&gt;
&lt;br /&gt;
Specification MINI2440v2 &lt;br /&gt;
CPU S3C2440A &lt;br /&gt;
MHz 400-533 &lt;br /&gt;
RAM 64MB &lt;br /&gt;
NOR flash 2MB &lt;br /&gt;
Nand Flash 128MB &lt;br /&gt;
Ethernet 10/100M Ethernet, RJ-45 connector &lt;br /&gt;
Serial ports 3 &lt;br /&gt;
RS232 1 &lt;br /&gt;
USB Host 1 &lt;br /&gt;
USB Device 1 &lt;br /&gt;
SD card slot 1 &lt;br /&gt;
Audio Interface In, Out, Mic &lt;br /&gt;
LCD connector 1 &lt;br /&gt;
Camera Interface 1 &lt;br /&gt;
JTAG 10pin JTAG connector &lt;br /&gt;
Bus 40pin connector &lt;br /&gt;
GPIO 34pin connector &lt;br /&gt;
Dimension 100x100mm &lt;br /&gt;
Linux Open Embeddeed with Ångström &lt;br /&gt;
WinCE WinCE 6.0 &lt;br /&gt;
&lt;br /&gt;
For more details:http://www.developmentboard.net/index.php/productdetail/Development+board/ARM9/SAMSUNG/S3C2440/MINI2440v2/info/1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Preparations =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I used this one: Add the bin dir to the $PATH. If you have a toolchain with another prefix (like arm-linux-) adapt the CROSS_COMPILE environment variable in the next steps.&lt;br /&gt;
&lt;br /&gt;
= Setting up the bootloader =&lt;br /&gt;
== Compiling uboot ==&lt;br /&gt;
Clone the git tree:&lt;br /&gt;
 mkdir uboot ; cd uboot&lt;br /&gt;
 git clone git://repo.or.cz/u-boot-openmoko/mini2440.git&lt;br /&gt;
Setup cross compiling:&lt;br /&gt;
 export CROSS_COMPILE=arm-none-linux-gnueabi-&lt;br /&gt;
or edit your .bashrc eg. &lt;br /&gt;
 export CROSS_COMPILE=arm-none-linux-gnueabi-&lt;br /&gt;
 export PS1=&amp;quot;\[\033[1;34m\]\u \[\033[0m\]\w:\$: \[\033[0m\]&amp;quot;&lt;br /&gt;
 #export PS1=&amp;quot;\u:\w\$&amp;gt;&amp;quot;&lt;br /&gt;
 LS_OPTIONS=&amp;quot;--color=auto&amp;quot;&lt;br /&gt;
 alias ls=&amp;quot;ls $LS_OPTIONS&amp;quot;&lt;br /&gt;
Prepare the mini2440 target:&lt;br /&gt;
 cd mini2440&lt;br /&gt;
 make mini2440_config&lt;br /&gt;
Compile:&lt;br /&gt;
 make all&lt;br /&gt;
This will give you a &amp;quot;u-boot.bin&amp;quot;. If you get an error about a missing whatever-gcc, verifiy if there is a hardcoded CROSS_COMPILE setting in the Makefile&lt;br /&gt;
&lt;br /&gt;
== Flashing uboot ==&lt;br /&gt;
We use the installed vivi bootloader to load uboot via usb. Power the board off, set the NOR switch to on, power the board on. You&#039;ll get the vivi output on the serial console. Press &#039;q&#039; to go to the shell and do the &amp;quot;load flash&amp;quot; on address 0 with the size of &amp;quot;u-boot.bin&amp;quot; (238232 bytes in this example):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[q] Goto shell of vivi                                                          &lt;br /&gt;
Enter your selection: q                                                         &lt;br /&gt;
Supervivi&amp;gt; load flash 0 238232 u                                                &lt;br /&gt;
USB host is connected. Waiting a download.                                      &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the &amp;quot;s3c2410_boot_usb&amp;quot; utility (http://mini2440.googlecode.com/files/s3c2410_boot_usb-20060807.tar.bz2) to upload the &amp;quot;u-boot.bin&amp;quot; via usb:&lt;br /&gt;
 ./s3c2410_boot_usb u-boot.bin &lt;br /&gt;
You&#039;ll see something like this as output, ignore the error message:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
csum = 0x9a6e&lt;br /&gt;
send_file: addr = 0x33f80000, len = 0x0003a298&lt;br /&gt;
Error downloading program&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and this on the serial console:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Now, Downloading [ADDRESS:30000000h,TOTAL:238242]                               &lt;br /&gt;
RECEIVED FILE SIZE:  238242 (232KB/S, 1S)                                       &lt;br /&gt;
Downloaded file at 0x30000000, size = 238232 bytes                              &lt;br /&gt;
Found block size = 0x0003c000                                                   &lt;br /&gt;
Erasing...    ... done                                                          &lt;br /&gt;
Writing...    ... done                                                          &lt;br /&gt;
Written 238232 bytes                                                            &lt;br /&gt;
Supervivi&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you see&lt;br /&gt;
 MINI2440 # saveenv&lt;br /&gt;
 &lt;br /&gt;
 Saving Environment to NAND...&lt;br /&gt;
 &lt;br /&gt;
 Erasing Nand...nand_erase: attempt to erase a bad block at page 0x00000260&lt;br /&gt;
&lt;br /&gt;
Try&lt;br /&gt;
 MINI2440 # nand scrub&lt;br /&gt;
 ...&lt;br /&gt;
 Really scrub this NAND flash? &amp;lt;y/N&amp;gt;&lt;br /&gt;
press y and enter. After erasing make&lt;br /&gt;
 MINI2440 # nand createbbt&lt;br /&gt;
press y and enter. Now you can save the environment&lt;br /&gt;
  MINI2440 # saveenv&lt;br /&gt;
&lt;br /&gt;
Now power off the board, set the NOR switch back to off, and power on the board. We verify the version and then prepare config storage in flash:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MINI2440 # version                                                              &lt;br /&gt;
                                                                                &lt;br /&gt;
U-Boot 1.3.2-dirty-moko12 (Mar  8 2009 - 13:50:19)  &lt;br /&gt;
&lt;br /&gt;
MINI2440 # dynenv set 40000                                                     &lt;br /&gt;
device 0 offset 0x40000, size 0x3fc0000                                         &lt;br /&gt;
45 4e 56 30 - 00 00 04 00           &lt;br /&gt;
&lt;br /&gt;
MINI2440 # saveenv                                                              &lt;br /&gt;
Saving Environment to NAND...                                                   &lt;br /&gt;
Erasing Nand...Writing to Nand... done                                          &lt;br /&gt;
&lt;br /&gt;
MINI2440 # reset                                                                &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Configure uboot ==&lt;br /&gt;
do a &amp;quot;printenv&amp;quot; to show active settings. Adjust the IP for uboot and the tftp server. We need proper IP connectivity to load the kernel with tftp. &amp;quot;setenv&amp;quot; is your friend. &amp;quot;saveenv&amp;quot; stores the setting to flash.&lt;br /&gt;
&lt;br /&gt;
= Kernel =&lt;br /&gt;
== Compilation ==&lt;br /&gt;
Fetch from git:&lt;br /&gt;
 mkdir kernel ; cd kernel&lt;br /&gt;
 git clone git://repo.or.cz/linux-2.6/mini2440.git&lt;br /&gt;
 cd mini2440&lt;br /&gt;
 mkdir -p ../kernel-bin&lt;br /&gt;
Generate .config from mini2440 template:&lt;br /&gt;
 CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm make O=../kernel-bin/ mini2440_defconfig&lt;br /&gt;
&lt;br /&gt;
(optional) if you want to modify kernel modules use this command afterwards:&lt;br /&gt;
 (optional if you don&#039;t have libncurses5-dev) apt-get install libncurses5-dev&lt;br /&gt;
 cd ../kernel-bin&lt;br /&gt;
 make ARCH=arm menuconfig&lt;br /&gt;
 cd ../mini2440&lt;br /&gt;
&lt;br /&gt;
Compile kernel and modules:&lt;br /&gt;
 CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm make O=../kernel-bin/&lt;br /&gt;
Generate &amp;quot;uImage&amp;quot; with the &amp;quot;mkimage&amp;quot; tool:&lt;br /&gt;
 ../uboot/mini2440/tools/mkimage -A arm -O linux -T kernel -C none -a 0x30008000 -e 0x30008000 -d ../kernel-bin/arch/arm/boot/zImage /tftpboot/uImage&lt;br /&gt;
&lt;br /&gt;
== Kernel Modules ==&lt;br /&gt;
To create the dynamically loaded kernel modules, which would go into the root file system later on do this:&lt;br /&gt;
 CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm make O=../kernel-bin/ modules&lt;br /&gt;
 CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm make O=../kernel-bin/ INSTALL_MOD_PATH=.. modules_install&lt;br /&gt;
&lt;br /&gt;
After this step, there should be a directory ../lib which would contain the dynamically loaded modules(drivers). This folder would go to the root file system of your board, for example I  have my filesystem on a sd card. I would stick the SD card in the PC, and mount it and then copy the modules as:&lt;br /&gt;
&lt;br /&gt;
  cp ../lib/modules/2.6.32-rc8/ /media/rootfs/lib/modules/ -r&lt;br /&gt;
&lt;br /&gt;
don&#039;t forget to&lt;br /&gt;
 sync&lt;br /&gt;
 umount /media/*&lt;br /&gt;
&lt;br /&gt;
== Flash kernel ==&lt;br /&gt;
Verify partitions, we need the offset for the kernel partition (probably 0x60000):&lt;br /&gt;
 mtdparts&lt;br /&gt;
Erase the kernel partition:&lt;br /&gt;
 nand erase 60000 &amp;lt;padded size&amp;gt;&lt;br /&gt;
Load the kernel with uboot into ram:&lt;br /&gt;
 tftp 0x32000000 uImage&lt;br /&gt;
Note the size, pad it to 512 byte and use the nand write command to flash it:&lt;br /&gt;
 nand write 32000000 60000 &amp;lt;padded size&amp;gt;.&lt;br /&gt;
== Configure uboot ==&lt;br /&gt;
We use a nfs chroot for now:&lt;br /&gt;
 setenv bootargs console=ttySAC0,115200 noinitrd init=/sbin/init mini2440=1tb ip=192.168.80.12 root=/dev/nfs rw nfsroot=192.168.80.1:/home/public/arm&lt;br /&gt;
This is helpful for automatic booting:&lt;br /&gt;
 setenv bootcmd &#039;nboot.e kernel ; bootm&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Bit Baking Angstrom, and QT Embedded 4 =&lt;br /&gt;
If you are using Fedora follow this link : http://www.electronics.diycinema.co.uk/embedded/mini2440/bitbaking-the-kernel-angstrom-and-qt4-embedded-all-at-once/comment-page-2/#comment-498 , otherwise follow here:&lt;br /&gt;
== Getting the required software ==&lt;br /&gt;
 cd ~&lt;br /&gt;
 mkdir OE&lt;br /&gt;
 cd OE&lt;br /&gt;
 git clone git://repo.or.cz/openembedded/mini2440.git openembedded&lt;br /&gt;
&lt;br /&gt;
Getting other required Softwares&lt;br /&gt;
 sudo apt-get install gawk diffstat help2man texi2html texinfo build-essential subversion cvs unzip texinfo git-core&lt;br /&gt;
 sudo dpkg-reconfigure dash&lt;br /&gt;
and choose &amp;quot;&amp;lt;No&amp;gt;&amp;quot; from the menu.&lt;br /&gt;
&lt;br /&gt;
Then we create a helper for ourselves:&lt;br /&gt;
 gedit ~/OE/source-me.txt&lt;br /&gt;
&lt;br /&gt;
and past the following, and change the /home/ashkax to your own home directory address.&lt;br /&gt;
&lt;br /&gt;
 export OETREE=&amp;quot;/home/ashkax/OE&amp;quot;&lt;br /&gt;
 BBPATH=${OETREE}/:${OETREE}/openembedded/&lt;br /&gt;
 echo Setting up dev env for Ångström&lt;br /&gt;
 if [ -z ${ORG_PATH} ] ; then&lt;br /&gt;
 ORG_PATH=${PATH}&lt;br /&gt;
 export ORG_PATH&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 if [ -z ${ORG_LD_LIBRARY_PATH} ] ; then&lt;br /&gt;
 ORG_LD_LIBRARY_PATH=${LD_LIBRARY_PATH}&lt;br /&gt;
 export ORG_LD_LIBRARY_PATH&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 PATH=${OETREE}/openembedded/bitbake/bin:${ORG_PATH}&lt;br /&gt;
 LD_LIBRARY_PATH=&lt;br /&gt;
 export PATH LD_LIBRARY_PATH BBPATH&lt;br /&gt;
 export LANG=C&lt;br /&gt;
 export BB_ENV_EXTRAWHITE=&amp;quot;MACHINE DISTRO OETREE ANGSTROM_MODE ANGSTROMLIBC LIBC&amp;quot;&lt;br /&gt;
 sudo sysctl vm.mmap_min_addr=0&lt;br /&gt;
 echo &amp;quot;Altered environment for OE Development&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This file that we just created will be used later on, to setup the compiler... Now lets edit the bitbake configuration file to tell bit bake we like it to compile the QT embedded for us too:&lt;br /&gt;
&lt;br /&gt;
 cd ~/OE/openembedded&lt;br /&gt;
 wget http://www.electronics.diycinema.co.uk/wp-content/uploads/2009/11/local.conf.txt&lt;br /&gt;
 gedit local.conf.txt&lt;br /&gt;
  &lt;br /&gt;
now change all the doug to your own user name, save the file and quit gedit. Then&lt;br /&gt;
 cp local.conf.txt conf/local.conf&lt;br /&gt;
&lt;br /&gt;
Alternatively you can use the original sample file and edit it to your liking:&lt;br /&gt;
 cd openembedded&lt;br /&gt;
 gedit mini2440_local_conf_example.conf&lt;br /&gt;
 cp mini2440_local_conf_example.conf conf/local.conf&lt;br /&gt;
&lt;br /&gt;
== Adding QT to baking recipes ==&lt;br /&gt;
 gedit ~/OE/openembedded/recipes/images/mini2440-image.bb&lt;br /&gt;
&lt;br /&gt;
it would be something like:&lt;br /&gt;
 #Angstrom bootstrap image&lt;br /&gt;
 IMAGE_PREPROCESS_COMMAND = &amp;quot;create_etc_timestamp&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 ANGSTROM_EXTRA_INSTALL ?= &amp;quot;&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 DEPENDS =  &amp;quot;task-base-extended \&lt;br /&gt;
 psplash-zap \&lt;br /&gt;
 esekeyd u-boot-utils tslib \&lt;br /&gt;
 i2c-tools i2c screen rsync nfs-utils \&lt;br /&gt;
 directfb gdbserver directfb mtd-utils \&lt;br /&gt;
 &amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 IMAGE_INSTALL = &amp;quot;task-base-extended \&lt;br /&gt;
 ${ANGSTROM_EXTRA_INSTALL} \&lt;br /&gt;
 psplash-zap qt4-embedded\&lt;br /&gt;
 esekeyd u-boot-utils tslib-calibrate tslib-tests \&lt;br /&gt;
 i2c-tools i2c screen rsync nfs-utils-client \&lt;br /&gt;
 directfb gdbserver directfb mtd-utils \&lt;br /&gt;
 rsvg pango \&lt;br /&gt;
 &amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 export IMAGE_BASENAME = &amp;quot;mini2440-image&amp;quot;&lt;br /&gt;
 IMAGE_LINGUAS = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 inherit image&lt;br /&gt;
&lt;br /&gt;
== running the bitbake ==&lt;br /&gt;
Now all you have to do is source the script from wherever you put it:&lt;br /&gt;
 source ~/OE/source-me.txt&lt;br /&gt;
 cd ~/OE/openembedded/&lt;br /&gt;
 bitbake mini2440-image&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you get an error trying to build a package try cleaning it:&lt;br /&gt;
bitbake -c clean INSERTPACKAGENAME&lt;br /&gt;
&lt;br /&gt;
Then try and build the image again. Maybe you won’t have this problem. I guess it’s either because the checksum parser failed to build or my hdd is dodgy. It only happened once on binutils but worked fine after cleaning it.&lt;br /&gt;
&lt;br /&gt;
A few hours later if all goes well you should have images in:&lt;br /&gt;
~/OE/oetmp/deploy/glibc/images/mini2440/&lt;br /&gt;
&lt;br /&gt;
Obviously that directory depends on what you setup in the local.conf.&lt;br /&gt;
&lt;br /&gt;
but, for a fun start boot up your mini2440 with the new image that you&#039;ve just created and issue the following command:&lt;br /&gt;
 ts_calibrate &lt;br /&gt;
 ts_test&lt;br /&gt;
 qtdemo -qws&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
== Write errors ==&lt;br /&gt;
When you have bad blocks in NAND, you&#039;ll get write errors. This gives more information: http://wiki.openmoko.org/wiki/NAND_bad_blocks&lt;br /&gt;
&lt;br /&gt;
Clear the flash (do not reset the board till uboot is reinstalled, or you need to use NOR/vivi to reinstall uboot via usb):&lt;br /&gt;
 nand scrub&lt;br /&gt;
Create new bad blocks table:&lt;br /&gt;
 nand createbbt&lt;br /&gt;
Reflash uboot (use the size in the output from the tftp command and pad it to hit 512 byte boundaries for the nand write command)&lt;br /&gt;
 tftp 0x32000000 u-boot.bin&lt;br /&gt;
 nand write 32000000 0 &amp;lt;size of u-boot.bin&amp;gt;&lt;br /&gt;
 reset&lt;br /&gt;
Create dynamic partitions:&lt;br /&gt;
 dynpart&lt;br /&gt;
 dynenv set u-boot_env&lt;br /&gt;
 saveenv&lt;br /&gt;
 reset&lt;br /&gt;
And then use write.e to write to the mtdparts, e.g.:&lt;br /&gt;
 tftp 0x32000000 uImage&lt;br /&gt;
 nand write.e 32000000 kernel&lt;br /&gt;
 nboot.e kernel&lt;br /&gt;
&lt;br /&gt;
== Python Alignment trap, Segmentation fault ==&lt;br /&gt;
This error and some other errors related to illegal instructions happened because all packages are compiled with -mthumb though the kernel and modules use -mno-thumb. The mix of instruction sets seem to cause problems. A hotfix is to edit your conf/distro/include/angstrom.inc and change the line:&lt;br /&gt;
ANGSTROM_ARM_INSTRUCTION_SET_armv4t = &amp;quot;thumb&amp;quot;&lt;br /&gt;
to&lt;br /&gt;
ANGSTROM_ARM_INSTRUCTION_SET_armv4t = &amp;quot;arm&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The default for the mini2440 is -mno-thumb but for some reason (save memory space, maybe?) the angstrom distro overrides this for all armv4t family processors.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Messed Up Screen Positions( or TS calibration) IN QT ==&lt;br /&gt;
If the resolution is messed up or you can run the ts_calibrate  but the hitting points are out of range, it may be because of the boot arguments.. Reboot your system, press a key in startup to go to uboot environment and make sure mini2440=0tb for 3.5&amp;quot; screen, and mini2440=1tb for 7&amp;quot; screen.&lt;br /&gt;
Try using the commands printenv, and setenv to do so.&lt;br /&gt;
&lt;br /&gt;
Try ts_calibrated after booting.&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
http://bliterness.blogspot.com/&lt;br /&gt;
&lt;br /&gt;
http://www.developmentboard.net/index.php/productdetail/Development+board/ARM9/SAMSUNG/S3C2440/MINI2440v2/info/1&lt;br /&gt;
&lt;br /&gt;
http://blog.cor-net.org/ (Qt 4.5 on mini2440)&lt;br /&gt;
&lt;br /&gt;
http://wiki.openembedded.net/index.php/Getting_Started&lt;br /&gt;
&lt;br /&gt;
http://www.sereno-online.com/site/2010/05/01/qt-4-6-2-installation-procedure-for-friendlyarm-mini-2440-board/ (Qt 4.6.2 on mini 2440)&lt;br /&gt;
&lt;br /&gt;
http://wingston.wordpress.com/embedded-programming-on-the-mini2440-using-ptxdist/ (NEW)&lt;/div&gt;</summary>
		<author><name>Wingie</name></author>
	</entry>
	<entry>
		<id>http://wiki.linuxmce.org/index.php?title=Mini2440&amp;diff=29250</id>
		<title>Mini2440</title>
		<link rel="alternate" type="text/html" href="http://wiki.linuxmce.org/index.php?title=Mini2440&amp;diff=29250"/>
		<updated>2011-12-09T17:23:17Z</updated>

		<summary type="html">&lt;p&gt;Wingie: /* Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Hardware]]&lt;br /&gt;
[[Category: Tutorials]]&lt;br /&gt;
[[Image:Mini2440.jpg|thumb|200px|mini2440]]&lt;br /&gt;
&lt;br /&gt;
= About =&lt;br /&gt;
This is a howto install uboot and a new kernel on the mini2440. Big thanks to BusError for the instructions and guidance. DISCLAIMER: This worked for me, if it eats your cat or burns your kitchen sink, don&#039;t blame me.&lt;br /&gt;
&lt;br /&gt;
Specification MINI2440v2 &lt;br /&gt;
CPU S3C2440A &lt;br /&gt;
MHz 400-533 &lt;br /&gt;
RAM 64MB &lt;br /&gt;
NOR flash 2MB &lt;br /&gt;
Nand Flash 128MB &lt;br /&gt;
Ethernet 10/100M Ethernet, RJ-45 connector &lt;br /&gt;
Serial ports 3 &lt;br /&gt;
RS232 1 &lt;br /&gt;
USB Host 1 &lt;br /&gt;
USB Device 1 &lt;br /&gt;
SD card slot 1 &lt;br /&gt;
Audio Interface In, Out, Mic &lt;br /&gt;
LCD connector 1 &lt;br /&gt;
Camera Interface 1 &lt;br /&gt;
JTAG 10pin JTAG connector &lt;br /&gt;
Bus 40pin connector &lt;br /&gt;
GPIO 34pin connector &lt;br /&gt;
Dimension 100x100mm &lt;br /&gt;
Linux Open Embeddeed with Ångström &lt;br /&gt;
WinCE WinCE 6.0 &lt;br /&gt;
&lt;br /&gt;
For more details:http://www.developmentboard.net/index.php/productdetail/Development+board/ARM9/SAMSUNG/S3C2440/MINI2440v2/info/1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Preparations =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I used this one: Add the bin dir to the $PATH. If you have a toolchain with another prefix (like arm-linux-) adapt the CROSS_COMPILE environment variable in the next steps.&lt;br /&gt;
&lt;br /&gt;
= Setting up the bootloader =&lt;br /&gt;
== Compiling uboot ==&lt;br /&gt;
Clone the git tree:&lt;br /&gt;
 mkdir uboot ; cd uboot&lt;br /&gt;
 git clone git://repo.or.cz/u-boot-openmoko/mini2440.git&lt;br /&gt;
Setup cross compiling:&lt;br /&gt;
 export CROSS_COMPILE=arm-none-linux-gnueabi-&lt;br /&gt;
or edit your .bashrc eg. &lt;br /&gt;
 export CROSS_COMPILE=arm-none-linux-gnueabi-&lt;br /&gt;
 export PS1=&amp;quot;\[\033[1;34m\]\u \[\033[0m\]\w:\$: \[\033[0m\]&amp;quot;&lt;br /&gt;
 #export PS1=&amp;quot;\u:\w\$&amp;gt;&amp;quot;&lt;br /&gt;
 LS_OPTIONS=&amp;quot;--color=auto&amp;quot;&lt;br /&gt;
 alias ls=&amp;quot;ls $LS_OPTIONS&amp;quot;&lt;br /&gt;
Prepare the mini2440 target:&lt;br /&gt;
 cd mini2440&lt;br /&gt;
 make mini2440_config&lt;br /&gt;
Compile:&lt;br /&gt;
 make all&lt;br /&gt;
This will give you a &amp;quot;u-boot.bin&amp;quot;. If you get an error about a missing whatever-gcc, verifiy if there is a hardcoded CROSS_COMPILE setting in the Makefile&lt;br /&gt;
&lt;br /&gt;
== Flashing uboot ==&lt;br /&gt;
We use the installed vivi bootloader to load uboot via usb. Power the board off, set the NOR switch to on, power the board on. You&#039;ll get the vivi output on the serial console. Press &#039;q&#039; to go to the shell and do the &amp;quot;load flash&amp;quot; on address 0 with the size of &amp;quot;u-boot.bin&amp;quot; (238232 bytes in this example):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[q] Goto shell of vivi                                                          &lt;br /&gt;
Enter your selection: q                                                         &lt;br /&gt;
Supervivi&amp;gt; load flash 0 238232 u                                                &lt;br /&gt;
USB host is connected. Waiting a download.                                      &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the &amp;quot;s3c2410_boot_usb&amp;quot; utility (http://mini2440.googlecode.com/files/s3c2410_boot_usb-20060807.tar.bz2) to upload the &amp;quot;u-boot.bin&amp;quot; via usb:&lt;br /&gt;
 ./s3c2410_boot_usb u-boot.bin &lt;br /&gt;
You&#039;ll see something like this as output, ignore the error message:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
csum = 0x9a6e&lt;br /&gt;
send_file: addr = 0x33f80000, len = 0x0003a298&lt;br /&gt;
Error downloading program&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and this on the serial console:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Now, Downloading [ADDRESS:30000000h,TOTAL:238242]                               &lt;br /&gt;
RECEIVED FILE SIZE:  238242 (232KB/S, 1S)                                       &lt;br /&gt;
Downloaded file at 0x30000000, size = 238232 bytes                              &lt;br /&gt;
Found block size = 0x0003c000                                                   &lt;br /&gt;
Erasing...    ... done                                                          &lt;br /&gt;
Writing...    ... done                                                          &lt;br /&gt;
Written 238232 bytes                                                            &lt;br /&gt;
Supervivi&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you see&lt;br /&gt;
 MINI2440 # saveenv&lt;br /&gt;
 &lt;br /&gt;
 Saving Environment to NAND...&lt;br /&gt;
 &lt;br /&gt;
 Erasing Nand...nand_erase: attempt to erase a bad block at page 0x00000260&lt;br /&gt;
&lt;br /&gt;
Try&lt;br /&gt;
 MINI2440 # nand scrub&lt;br /&gt;
 ...&lt;br /&gt;
 Really scrub this NAND flash? &amp;lt;y/N&amp;gt;&lt;br /&gt;
press y and enter. After erasing make&lt;br /&gt;
 MINI2440 # nand createbbt&lt;br /&gt;
press y and enter. Now you can save the environment&lt;br /&gt;
  MINI2440 # saveenv&lt;br /&gt;
&lt;br /&gt;
Now power off the board, set the NOR switch back to off, and power on the board. We verify the version and then prepare config storage in flash:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MINI2440 # version                                                              &lt;br /&gt;
                                                                                &lt;br /&gt;
U-Boot 1.3.2-dirty-moko12 (Mar  8 2009 - 13:50:19)  &lt;br /&gt;
&lt;br /&gt;
MINI2440 # dynenv set 40000                                                     &lt;br /&gt;
device 0 offset 0x40000, size 0x3fc0000                                         &lt;br /&gt;
45 4e 56 30 - 00 00 04 00           &lt;br /&gt;
&lt;br /&gt;
MINI2440 # saveenv                                                              &lt;br /&gt;
Saving Environment to NAND...                                                   &lt;br /&gt;
Erasing Nand...Writing to Nand... done                                          &lt;br /&gt;
&lt;br /&gt;
MINI2440 # reset                                                                &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Configure uboot ==&lt;br /&gt;
do a &amp;quot;printenv&amp;quot; to show active settings. Adjust the IP for uboot and the tftp server. We need proper IP connectivity to load the kernel with tftp. &amp;quot;setenv&amp;quot; is your friend. &amp;quot;saveenv&amp;quot; stores the setting to flash.&lt;br /&gt;
&lt;br /&gt;
= Kernel =&lt;br /&gt;
== Compilation ==&lt;br /&gt;
Fetch from git:&lt;br /&gt;
 mkdir kernel ; cd kernel&lt;br /&gt;
 git clone git://repo.or.cz/linux-2.6/mini2440.git&lt;br /&gt;
 cd mini2440&lt;br /&gt;
 mkdir -p ../kernel-bin&lt;br /&gt;
Generate .config from mini2440 template:&lt;br /&gt;
 CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm make O=../kernel-bin/ mini2440_defconfig&lt;br /&gt;
&lt;br /&gt;
(optional) if you want to modify kernel modules use this command afterwards:&lt;br /&gt;
 (optional if you don&#039;t have libncurses5-dev) apt-get install libncurses5-dev&lt;br /&gt;
 cd ../kernel-bin&lt;br /&gt;
 make ARCH=arm menuconfig&lt;br /&gt;
 cd ../mini2440&lt;br /&gt;
&lt;br /&gt;
Compile kernel and modules:&lt;br /&gt;
 CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm make O=../kernel-bin/&lt;br /&gt;
Generate &amp;quot;uImage&amp;quot; with the &amp;quot;mkimage&amp;quot; tool:&lt;br /&gt;
 ../uboot/mini2440/tools/mkimage -A arm -O linux -T kernel -C none -a 0x30008000 -e 0x30008000 -d ../kernel-bin/arch/arm/boot/zImage /tftpboot/uImage&lt;br /&gt;
&lt;br /&gt;
== Kernel Modules ==&lt;br /&gt;
To create the dynamically loaded kernel modules, which would go into the root file system later on do this:&lt;br /&gt;
 CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm make O=../kernel-bin/ modules&lt;br /&gt;
 CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm make O=../kernel-bin/ INSTALL_MOD_PATH=.. modules_install&lt;br /&gt;
&lt;br /&gt;
After this step, there should be a directory ../lib which would contain the dynamically loaded modules(drivers). This folder would go to the root file system of your board, for example I  have my filesystem on a sd card. I would stick the SD card in the PC, and mount it and then copy the modules as:&lt;br /&gt;
&lt;br /&gt;
  cp ../lib/modules/2.6.32-rc8/ /media/rootfs/lib/modules/ -r&lt;br /&gt;
&lt;br /&gt;
don&#039;t forget to&lt;br /&gt;
 sync&lt;br /&gt;
 umount /media/*&lt;br /&gt;
&lt;br /&gt;
== Flash kernel ==&lt;br /&gt;
Verify partitions, we need the offset for the kernel partition (probably 0x60000):&lt;br /&gt;
 mtdparts&lt;br /&gt;
Erase the kernel partition:&lt;br /&gt;
 nand erase 60000 &amp;lt;padded size&amp;gt;&lt;br /&gt;
Load the kernel with uboot into ram:&lt;br /&gt;
 tftp 0x32000000 uImage&lt;br /&gt;
Note the size, pad it to 512 byte and use the nand write command to flash it:&lt;br /&gt;
 nand write 32000000 60000 &amp;lt;padded size&amp;gt;.&lt;br /&gt;
== Configure uboot ==&lt;br /&gt;
We use a nfs chroot for now:&lt;br /&gt;
 setenv bootargs console=ttySAC0,115200 noinitrd init=/sbin/init mini2440=1tb ip=192.168.80.12 root=/dev/nfs rw nfsroot=192.168.80.1:/home/public/arm&lt;br /&gt;
This is helpful for automatic booting:&lt;br /&gt;
 setenv bootcmd &#039;nboot.e kernel ; bootm&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Bit Baking Angstrom, and QT Embedded 4 =&lt;br /&gt;
If you are using Fedora follow this link : http://www.electronics.diycinema.co.uk/embedded/mini2440/bitbaking-the-kernel-angstrom-and-qt4-embedded-all-at-once/comment-page-2/#comment-498 , otherwise follow here:&lt;br /&gt;
== Getting the required software ==&lt;br /&gt;
 cd ~&lt;br /&gt;
 mkdir OE&lt;br /&gt;
 cd OE&lt;br /&gt;
 git clone git://repo.or.cz/openembedded/mini2440.git openembedded&lt;br /&gt;
&lt;br /&gt;
Getting other required Softwares&lt;br /&gt;
 sudo apt-get install gawk diffstat help2man texi2html texinfo build-essential subversion cvs unzip texinfo git-core&lt;br /&gt;
 sudo dpkg-reconfigure dash&lt;br /&gt;
and choose &amp;quot;&amp;lt;No&amp;gt;&amp;quot; from the menu.&lt;br /&gt;
&lt;br /&gt;
Then we create a helper for ourselves:&lt;br /&gt;
 gedit ~/OE/source-me.txt&lt;br /&gt;
&lt;br /&gt;
and past the following, and change the /home/ashkax to your own home directory address.&lt;br /&gt;
&lt;br /&gt;
 export OETREE=&amp;quot;/home/ashkax/OE&amp;quot;&lt;br /&gt;
 BBPATH=${OETREE}/:${OETREE}/openembedded/&lt;br /&gt;
 echo Setting up dev env for Ångström&lt;br /&gt;
 if [ -z ${ORG_PATH} ] ; then&lt;br /&gt;
 ORG_PATH=${PATH}&lt;br /&gt;
 export ORG_PATH&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 if [ -z ${ORG_LD_LIBRARY_PATH} ] ; then&lt;br /&gt;
 ORG_LD_LIBRARY_PATH=${LD_LIBRARY_PATH}&lt;br /&gt;
 export ORG_LD_LIBRARY_PATH&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 PATH=${OETREE}/openembedded/bitbake/bin:${ORG_PATH}&lt;br /&gt;
 LD_LIBRARY_PATH=&lt;br /&gt;
 export PATH LD_LIBRARY_PATH BBPATH&lt;br /&gt;
 export LANG=C&lt;br /&gt;
 export BB_ENV_EXTRAWHITE=&amp;quot;MACHINE DISTRO OETREE ANGSTROM_MODE ANGSTROMLIBC LIBC&amp;quot;&lt;br /&gt;
 sudo sysctl vm.mmap_min_addr=0&lt;br /&gt;
 echo &amp;quot;Altered environment for OE Development&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This file that we just created will be used later on, to setup the compiler... Now lets edit the bitbake configuration file to tell bit bake we like it to compile the QT embedded for us too:&lt;br /&gt;
&lt;br /&gt;
 cd ~/OE/openembedded&lt;br /&gt;
 wget http://www.electronics.diycinema.co.uk/wp-content/uploads/2009/11/local.conf.txt&lt;br /&gt;
 gedit local.conf.txt&lt;br /&gt;
  &lt;br /&gt;
now change all the doug to your own user name, save the file and quit gedit. Then&lt;br /&gt;
 cp local.conf.txt conf/local.conf&lt;br /&gt;
&lt;br /&gt;
Alternatively you can use the original sample file and edit it to your liking:&lt;br /&gt;
 cd openembedded&lt;br /&gt;
 gedit mini2440_local_conf_example.conf&lt;br /&gt;
 cp mini2440_local_conf_example.conf conf/local.conf&lt;br /&gt;
&lt;br /&gt;
== Adding QT to baking recipes ==&lt;br /&gt;
 gedit ~/OE/openembedded/recipes/images/mini2440-image.bb&lt;br /&gt;
&lt;br /&gt;
it would be something like:&lt;br /&gt;
 #Angstrom bootstrap image&lt;br /&gt;
 IMAGE_PREPROCESS_COMMAND = &amp;quot;create_etc_timestamp&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 ANGSTROM_EXTRA_INSTALL ?= &amp;quot;&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 DEPENDS =  &amp;quot;task-base-extended \&lt;br /&gt;
 psplash-zap \&lt;br /&gt;
 esekeyd u-boot-utils tslib \&lt;br /&gt;
 i2c-tools i2c screen rsync nfs-utils \&lt;br /&gt;
 directfb gdbserver directfb mtd-utils \&lt;br /&gt;
 &amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 IMAGE_INSTALL = &amp;quot;task-base-extended \&lt;br /&gt;
 ${ANGSTROM_EXTRA_INSTALL} \&lt;br /&gt;
 psplash-zap qt4-embedded\&lt;br /&gt;
 esekeyd u-boot-utils tslib-calibrate tslib-tests \&lt;br /&gt;
 i2c-tools i2c screen rsync nfs-utils-client \&lt;br /&gt;
 directfb gdbserver directfb mtd-utils \&lt;br /&gt;
 rsvg pango \&lt;br /&gt;
 &amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 export IMAGE_BASENAME = &amp;quot;mini2440-image&amp;quot;&lt;br /&gt;
 IMAGE_LINGUAS = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 inherit image&lt;br /&gt;
&lt;br /&gt;
== running the bitbake ==&lt;br /&gt;
Now all you have to do is source the script from wherever you put it:&lt;br /&gt;
 source ~/OE/source-me.txt&lt;br /&gt;
 cd ~/OE/openembedded/&lt;br /&gt;
 bitbake mini2440-image&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you get an error trying to build a package try cleaning it:&lt;br /&gt;
bitbake -c clean INSERTPACKAGENAME&lt;br /&gt;
&lt;br /&gt;
Then try and build the image again. Maybe you won’t have this problem. I guess it’s either because the checksum parser failed to build or my hdd is dodgy. It only happened once on binutils but worked fine after cleaning it.&lt;br /&gt;
&lt;br /&gt;
A few hours later if all goes well you should have images in:&lt;br /&gt;
~/OE/oetmp/deploy/glibc/images/mini2440/&lt;br /&gt;
&lt;br /&gt;
Obviously that directory depends on what you setup in the local.conf.&lt;br /&gt;
&lt;br /&gt;
but, for a fun start boot up your mini2440 with the new image that you&#039;ve just created and issue the following command:&lt;br /&gt;
 ts_calibrate &lt;br /&gt;
 ts_test&lt;br /&gt;
 qtdemo -qws&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
== Write errors ==&lt;br /&gt;
When you have bad blocks in NAND, you&#039;ll get write errors. This gives more information: http://wiki.openmoko.org/wiki/NAND_bad_blocks&lt;br /&gt;
&lt;br /&gt;
Clear the flash (do not reset the board till uboot is reinstalled, or you need to use NOR/vivi to reinstall uboot via usb):&lt;br /&gt;
 nand scrub&lt;br /&gt;
Create new bad blocks table:&lt;br /&gt;
 nand createbbt&lt;br /&gt;
Reflash uboot (use the size in the output from the tftp command and pad it to hit 512 byte boundaries for the nand write command)&lt;br /&gt;
 tftp 0x32000000 u-boot.bin&lt;br /&gt;
 nand write 32000000 0 &amp;lt;size of u-boot.bin&amp;gt;&lt;br /&gt;
 reset&lt;br /&gt;
Create dynamic partitions:&lt;br /&gt;
 dynpart&lt;br /&gt;
 dynenv set u-boot_env&lt;br /&gt;
 saveenv&lt;br /&gt;
 reset&lt;br /&gt;
And then use write.e to write to the mtdparts, e.g.:&lt;br /&gt;
 tftp 0x32000000 uImage&lt;br /&gt;
 nand write.e 32000000 kernel&lt;br /&gt;
 nboot.e kernel&lt;br /&gt;
&lt;br /&gt;
== Python Alignment trap, Segmentation fault ==&lt;br /&gt;
This error and some other errors related to illegal instructions happened because all packages are compiled with -mthumb though the kernel and modules use -mno-thumb. The mix of instruction sets seem to cause problems. A hotfix is to edit your conf/distro/include/angstrom.inc and change the line:&lt;br /&gt;
ANGSTROM_ARM_INSTRUCTION_SET_armv4t = &amp;quot;thumb&amp;quot;&lt;br /&gt;
to&lt;br /&gt;
ANGSTROM_ARM_INSTRUCTION_SET_armv4t = &amp;quot;arm&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The default for the mini2440 is -mno-thumb but for some reason (save memory space, maybe?) the angstrom distro overrides this for all armv4t family processors.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Messed Up Screen Positions( or TS calibration) IN QT ==&lt;br /&gt;
If the resolution is messed up or you can run the ts_calibrate  but the hitting points are out of range, it may be because of the boot arguments.. Reboot your system, press a key in startup to go to uboot environment and make sure mini2440=0tb for 3.5&amp;quot; screen, and mini2440=1tb for 7&amp;quot; screen.&lt;br /&gt;
Try using the commands printenv, and setenv to do so.&lt;br /&gt;
&lt;br /&gt;
Try ts_calibrated after booting.&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
http://bliterness.blogspot.com/&lt;br /&gt;
&lt;br /&gt;
http://www.developmentboard.net/index.php/productdetail/Development+board/ARM9/SAMSUNG/S3C2440/MINI2440v2/info/1&lt;br /&gt;
&lt;br /&gt;
http://blog.cor-net.org/ (Qt 4.5 on mini2440)&lt;br /&gt;
&lt;br /&gt;
http://wiki.openembedded.net/index.php/Getting_Started&lt;br /&gt;
&lt;br /&gt;
http://www.sereno-online.com/site/2010/05/01/qt-4-6-2-installation-procedure-for-friendlyarm-mini-2440-board/ (Qt 4.6.2 on mini 2440)&lt;br /&gt;
&lt;br /&gt;
http://wingston.wordpress.com/embedded-programming-on-the-mini2440-using-ptxdist/&lt;/div&gt;</summary>
		<author><name>Wingie</name></author>
	</entry>
</feed>