Mini2440 cable kit and soldering LGA14!

The very kind people at were generous enough to send me a mini2440 cable kit! This will be much easier than chopping up 2.5″ IDE connectors! The kit has all the connections you could ever need and will certainly make things much easier!


After getting the DS1621 thermometer working on the I2C bus i now on plan on connecting something more complicated and very small! They probably won’t recommend it in the data sheet but you can solder LGA14 using a normal iron and some enamelled wire. My first attempt is below. Unfortunately i started with much thicker wire which subsequently pulled a pad off but the thinner 0.15mm stuff is fairly easy. Checking the connections with a multimeter revealed no short circuits.


The plan is try this again with the same device (without breaking it!) and then solder it to some veroboard to which i’ll connect one of my new cables 🙂

Compiling the kernel with DS1621 support

After building the temperature sensing I2C circuit i posted about before i compiled a kernel for the mini2440 which supported the DS1621 temperature sensor. Thanks to the existing kernel support this was remarkably easy.

All i had to do was edit /mini2440_defconfig in …/kernel/mini2440/arch/arm/configs and change line 1039 to:


I compiled the kernel using the script i posted here interrupting the process after the git clones to change the line above and then allowing it to continue. I then booted the mini2440 and the sensor module was immediately available under:


In this directory you have the following:

root@mini2440:/sys/devices/platform/s3c2440-i2c/i2c-adapter/i2c-0/0-0048# ls
alarms           name             temp1_max        uevent
driver           power            temp1_max_alarm
hwmon            subsystem        temp1_min
modalias         temp1_input      temp1_min_alarm

The output on the DS1621 is controlled by the temp1_min and temp1_max thresholds. By default it goes high when temp1_input < temp1_min. You can view the temperature by reading temp1_input and you can adjust temp1_min and temp1_max by echoing the required threshold to the file, for example:

root@mini2440:/sys/devices/platform/s3c2440-i2c/i2c-adapter/i2c-0/0-0048# cat temp1_input
echo 27000 &gt; temp1_min

In this configuration the DS1621 output is high and drives the base of my transistor which switches on an LED. As soon as i heat the sensor the temperature goes above temp1_min the LED turns off.

Although i have no purpose for this circuit it serves as a proof of concept for installing I2C devices on the mini2440.

Here’s another pic with the power light on but the output off:


SMD on veroboard was never meant to look nice!

Booting using NFS and TFTP (updated)

Rather than slowly wearing out your NAND flash you can boot the mini2440 over a network by loading the kernel using TFTP and the OS from an NFS share. This also makes it much faster to test changes. Using Fedora 11 you can use YUM to install tftp, tftp-server and nfs-utils.

yum install tftp tftp-server nfs-utils

I created a folder /home/doug/mini2440/root_fs and added the following line to /etc/exports to allow r/w access from 192.168.1.*:


..and extracted the Angstrom file system as root to /home/doug/mini2440/root_fs

You’ll need to edit /etc/xinetd.d/tftp to setup TFTP. Mine is posted below for reference, you at least need to set disable = no.

# default: off
# description: The tftp server serves files using the trivial file transfer
#    protocol.  The tftp protocol is often used to boot diskless
#    workstations, download configuration files to network-aware printers,
#    and to start the installation process for some operating systems.
service tftp
disable    = no
socket_type        = dgram
protocol        = udp
wait            = yes
user            = root
server            = /usr/sbin/in.tftpd
server_args        = -s /home/doug/mini2440/kernel
per_source        = 11
cps            = 100 2
flags            = IPv4

I then started the services :

/etc/init.d/nfs start

/sbin/service xinetd start

To automate these i think you can do:

chkconfig tftp on

chkconfig xinetd on

chkconfig nfs on

Next i edited the uboot environment. Use the command setenv to modify or add entries and savenev when you’re finished. I ended up with the following:

MINI2440 # printenv
bootargs_base=console=ttySAC0,115200 noinitrd
root_nand=root=/dev/mtdblock3 rootfstype=jffs2
root_mmc=root=/dev/mmcblk0p2 rootdelay=2
set_root_nfs=setenv root_nfs root=/dev/nfs rw nfsroot=${serverip}:${root_nfs}
ifconfig_static=run setenv ifconfig ip=${ipaddr}:${serverip}::${netmask}:mini2440:eth0
ifconfig_dhcp=run setenv ifconfig ip=dhcp
set_bootargs_mmc=setenv bootargs ${bootargs_base} ${bootargs_init} ${mini2440} ${root_mmc}
set_bootargs_nand=setenv bootargs ${bootargs_base} ${bootargs_init} ${mini2440} ${root_nand}
set_bootargs_nfs=run set_root_nfs; setenv bootargs ${bootargs_base} ${bootargs_init} ${mini2440} ${root_nfs} ${ifconfig}
bootargs=console=ttySAC0,115200 noinitrd init=/sbin/init mini2440=0tb ip= root=/dev/nfs rw nfsroot=
bootcmd=tftp;bootm 32000000

Note when you setenv you have to omit the = sign. Obviously you’ll want to change some of this to suit your network setup. Here my laptop is and is my pfsense box which is assigning to the mini2440 by DHCP.

When you boot the system uboot will download the kernel over TFTP and then mount the NFS share.

If you have DHCP on your network Angstrom should automatically get an IP. You can skip the rest in this case!

If you want a static address you can change /etc/network/interfaces. I simply changed dhcp to static for eth0:

iface eth0 inet static

And after this the system booted up fine. Lastly i have a note which says I deleted the symlink /etc/resolve.conf and replaced it with:

domain local
search local

Be warned that the the entire of above needs to be compliant with your firewall and selinux, it won’t work otherwise!

I found the following Links helpful:



U-boot NFS / TFTP boot

Cross compiling Qt-embedded 4.5.3

Cross compiling Qt was actually very easy. I used the same machine described in the mini2440 kernel post.  If you have a vanilla install of Fedora 11  it’s more than likely you’ll get some errors due to missing packages so check the list i posted if you can’t figure out which ones you need. This is what i did:

  1. Download the Qt source from Trolltech
  2. Untar the archive somewhere, i simply used the desktop
  3. Edit the file mkspecs/qws/linux-arm-g++/qmake.conf according to your toolchain. I have attached mine here as an example. I used the toolchain from OpenEmbedded.
  4. Now run the following commands within the Qt directory:
  • ./configure -embedded arm -xplatform qws/linux-arm-g++ -prefix /usr/local/Qt -qt-mouse-tslib -little-endian
  • gmake -j 2 (or however many CPUs you have)
  • sudo gmake install

The resulting ~74MB  will be located in /usr/local/Qt. At first i ran the library from an SD card using a system wide link but later i used NFS.

I ran the library using BusError’s mini2440 kernel and an Angstrom base image I cross compiled using OpenEmbedded apriori. In my next post i’ll describe how to compile Angstrom Linux for this purpose which also provides the toolchain i used here. Finally when i get access to my mini2440 i’ll explain how to use the examples and setup the touch screen which was a little fiddly.

Big thanks to Cor for his post on building Qt which i’ve relied on heavily here.

Controlling the mini2440 system LEDs and the EEPROM

This is pretty trivial but i thought i’d post it just incase. Using the mini2440 kernel by BusError the system LEDs are registered under /sys/devices/platform/s3c24xxled.X, where X is the LED number. LEDs 1-4 are located on the system board and LED 5 is the backlight. To control the devices you can do the following:

cd /sys/devices/platform/s3c24xx_led.5/leds/backlight

echo 0 > brightness #turns the backlight off

echo 255 > brightness #turns the backlight on

You can also choose from one of the available triggers, for example..

root@mini2440:/sys/devices/platform/s3c24xx_led.5/leds/backlight# cat trigger
none nand-disk mmc0 timer heartbeat [backlight] gpio default-on
root@mini2440:/sys/devices/platform/s3c24xx_led.5/leds/backlight# echo heartbeat > trigger

Will make your backlight flash on and off like crazy!

Unfortunately there is no PWM control to manage the brightness. This would have been really nice.

The EEPROM can be controlled in a similar way. You can access it in:


Data can be written by using the following command:

echo whatever you want > eeprom

The just do the following to read the memory:

cat eeprom