Customize mini2440 qtopia image

jignesh
Hi,

I have mini2440. I am using rootfs_qtopia_qt4.img to run the qtopia.
I want to customize it as per my application as per below.

1. Remove all sample application.
2. Remove messages in boot up loading.
3. Directly run my own GUI application in init that has develped in Qtopia.

Means I want to customize qtopia and file system , build and install in
board.

how can i customize it, built and create a image ?

Thanks

davef
Search for <mini2440vietnam> he has some relevant tutorials.

jignesh
I can not find tutorial to customize qtopia.
can you please provide me link for this.

thanks

davef
http://mini2440vietnam.blogspot.co.nz/2011/04/upgrade-qt462-in-mini2440....

jignesh
I have build the tslib,but i am getting the following error in my host OS
Ubuntu 12.04.

libtool: compile:  arm-none-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I..
-I../src -DTS_POINTERCAL=\"/home/tslib/etc/pointercal\" -DTSLIB_INTERNAL
-fvisibility=hidden -DGCC_HASCLASSVISIBILITY -march=armv4t -MT input-raw.lo
-MD -MP -MF .deps/input-raw.Tpo -c input-raw.c  -fPIC -DPIC -o
.libs/input-raw.o
input-raw.c: In function 'check_fd':
input-raw.c:116: error: 'SYN_MAX' undeclared (first use in this function)
input-raw.c:116: error: (Each undeclared identifier is reported only once
input-raw.c:116: error: for each function it appears in.)
input-raw.c:167: error: 'ABS_MT_PRESSURE' undeclared (first use in this
function)
input-raw.c:178: error: 'ABS_MT_SLOT' undeclared (first use in this
function)
input-raw.c: In function 'ts_input_read_mt':
input-raw.c:494: error: 'ABS_MT_PRESSURE' undeclared (first use in this
function)
input-raw.c:500: error: 'ABS_MT_TOOL_X' undeclared (first use in this
function)
input-raw.c:505: error: 'ABS_MT_TOOL_Y' undeclared (first use in this
function)
input-raw.c:520: error: 'ABS_MT_DISTANCE' undeclared (first use in this
function)
input-raw.c:557: error: 'ABS_MT_SLOT' undeclared (first use in this
function)
make[2]: *** [input-raw.lo] Error 1
make[2]: Leaving directory `/usr/local/tslib/plugins'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/tslib'
make: *** [all] Error 2

davef
input-raw.c:116: error: 'SYN_MAX' undeclared (first use in this function)

Usually tells you that some library is missing.  Are you following the
linked tutorial and what stage are you at?

Possibly worth checking that you are compiling with the correct toolchain.

   arm-linux -v  (on the command line)

davef
Is the Ubuntu machine 32 or 64 bit?

jignesh
I am using Ubuntu 32-bit 12.04 LTS.
I have already build Qtopia successfully in my host system.
I am getting the above error during the make of tslib.


which the right command to check correct toolchain arm-linux -v or
arm-linux-gcc -v?

output of command arm-linux -v:
arm-linux: command not found

Output of command arm-linux-gcc -v:
Using built-in specs.
Target: arm-none-linux-gnueabi
Configured with:
/opt/FriendlyARM/mini2440/build-toolschain/working/src/gcc-4.4.3/configure
--build=i386-build_redhat-linux-gnu --host=i386-build_redhat-linux-gnu
--target=arm-none-linux-gnueabi --prefix=/opt/FriendlyARM/toolschain/4.4.3
--with-sysroot=/opt/FriendlyARM/toolschain/4.4.3/arm-none-linux-gnueabi//sys-roo
t
--enable-languages=c,c++ --disable-multilib --with-arch=armv4t
--with-cpu=arm920t --with-tune=arm920t --with-float=soft
--with-pkgversion=ctng-1.6.1 --disable-sjlj-exceptions
--enable-__cxa_atexit --with-gmp=/opt/FriendlyARM/toolschain/4.4.3
--with-mpfr=/opt/FriendlyARM/toolschain/4.4.3
--with-ppl=/opt/FriendlyARM/toolschain/4.4.3
--with-cloog=/opt/FriendlyARM/toolschain/4.4.3
--with-mpc=/opt/FriendlyARM/toolschain/4.4.3
--with-local-prefix=/opt/FriendlyARM/toolschain/4.4.3/arm-none-linux-gnueabi//sy
s-root
--disable-nls --enable-threads=posix --enable-symvers=gnu --enable-c99
--enable-long-long --enable-target-optspace
Thread model: posix
gcc version 4.4.3 (ctng-1.6.1)

davef
Sorry, I should have said arm-linux-gcc -v

My guess is you need to find:

   input-raw.h

or input-raw.c

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

search input-raw

jignesh
Yes, I have also found the input-raw.c file in tslib/plugins.

In that file,
All above macro that has given error as a undeclared is also used in
check_fd function.


static int check_fd(struct tslib_input *i)
{
  struct tsdev *ts = i->module.dev;
  int version;
  long evbit[BITS_TO_LONGS(EV_CNT)];
  long absbit[BITS_TO_LONGS(ABS_CNT)];
  long keybit[BITS_TO_LONGS(KEY_CNT)];
  long synbit[BITS_TO_LONGS(SYN_CNT)];

  if (ioctl(ts->fd, EVIOCGVERSION, &version) < 0) {
    fprintf(stderr, "tslib: Selected device is not a Linux input event
device\n");
    return -1;
  }

  /* support version EV_VERSION 0x010000 and 0x010001
   * this check causes more troubles than it solves here */
  if (version < EV_VERSION)
    fprintf(stderr, "tslib: Warning: Selected device uses a different
version of the event protocol than tslib was compiled for\n");

  if ( (ioctl(ts->fd, EVIOCGBIT(0, sizeof(evbit)), evbit) < 0) ||
    !(evbit[BIT_WORD(EV_ABS)] & BIT_MASK(EV_ABS)) ||
    !(evbit[BIT_WORD(EV_KEY)] & BIT_MASK(EV_KEY)) ) {
    fprintf(stderr, "tslib: Selected device is not a touchscreen (must
support ABS and KEY event types)\n");
    return -1;
  }

  if ((ioctl(ts->fd, EVIOCGBIT(EV_ABS, sizeof(absbit)), absbit)) < 0 ||
      !(absbit[BIT_WORD(ABS_X)] & BIT_MASK(ABS_X)) ||
      !(absbit[BIT_WORD(ABS_Y)] & BIT_MASK(ABS_Y))) {
    if (!(absbit[BIT_WORD(ABS_MT_POSITION_X)] &
BIT_MASK(ABS_MT_POSITION_X)) ||
        !(absbit[BIT_WORD(ABS_MT_POSITION_Y)] &
BIT_MASK(ABS_MT_POSITION_Y))) {
      fprintf(stderr, "tslib: Selected device is not a touchscreen (must
support ABS_X/Y or ABS_MT_POSITION_X/Y events)\n");
      return -1;
    }
  }

  /* Since some touchscreens (eg. infrared) physically can't measure
pressure,
   * the input system doesn't report it on those. Tslib relies on pressure,
thus
   * we set it to constant 255. It's still controlled by BTN_TOUCH/BTN_LEFT
-
   * when not touched, the pressure is forced to 0. */
  if (!(absbit[BIT_WORD(ABS_PRESSURE)] & BIT_MASK(ABS_PRESSURE)))
    i->no_pressure = 1;

  if ((ioctl(ts->fd, EVIOCGBIT(EV_KEY, sizeof(keybit)), keybit) < 0) ||
    !(keybit[BIT_WORD(BTN_TOUCH)] & BIT_MASK(BTN_TOUCH) ||
      keybit[BIT_WORD(BTN_LEFT)] & BIT_MASK(BTN_LEFT))) {
    fprintf(stderr, "tslib: Selected device is not a touchscreen (must
support BTN_TOUCH or BTN_LEFT events)\n");
    return -1;
  }

  /* Remember whether we have a multitouch device. We need to know for
ABS_X,
   * ABS_Y and ABS_PRESSURE data. */
  if ((absbit[BIT_WORD(ABS_MT_POSITION_X)] & BIT_MASK(ABS_MT_POSITION_X))
&&
      (absbit[BIT_WORD(ABS_MT_POSITION_Y)] & BIT_MASK(ABS_MT_POSITION_Y)))
    i->mt = 1;

  /* remember if we have a device that doesn't support pressure. We have to
   * set pressure ourselves in this case. */
  if (i->mt && !(absbit[BIT_WORD(ABS_MT_PRESSURE)] &
BIT_MASK(ABS_MT_PRESSURE)))
    i->no_pressure = 1;

  if (evbit[BIT_WORD(EV_SYN)] & BIT_MASK(EV_SYN))
    i->using_syn = 1;

  if ((ioctl(ts->fd, EVIOCGBIT(EV_SYN, sizeof(synbit)), synbit)) == -1)
    fprintf(stderr, "tslib: ioctl error\n");

  /* remember whether we have a multitouch type A device */
  if (i->mt && synbit[BIT_WORD(SYN_MT_REPORT)] & BIT_MASK(SYN_MT_REPORT) &&
      !(absbit[BIT_WORD(ABS_MT_SLOT)] & BIT_MASK(ABS_MT_SLOT)))
    i->type_a = 1;

  if (i->grab_events == GRAB_EVENTS_WANTED) {
    if (ioctl(ts->fd, EVIOCGRAB, (void *)1)) {
      fprintf(stderr, "tslib: Unable to grab selected input device\n");
      return -1;
    }
    i->grab_events = GRAB_EVENTS_ACTIVE;
  }

  return ts->fd;
}

jignesh
To remove this tslib undeclared error, which value has to given this all
MACROS?

davef
Does input-raw.h include check_fd();

Is there a #include "input-raw.h" in input-raw.c?

Try https://github.com/kergoth/tslib and see if he/she had an associated
forum.

davef
List the tools you placed on your host to cross-compile tslib.

jignesh
there is not included #include-raw.h in input-raw.c file.
I have also checked #include "input-raw.h" file in
https://github.com/kergoth/tslib, there is no input-raw.h file in this.
only input-raw.c file available.
  
I am using step to download and compile as per below for tslib.

cd /usr/local
git clone http://github.com/kergoth/tslib.git
export PATH=/opt/FriendlyARM/toolschain/4.4.3/bin:$PATH
export CROSS_COMPILE=arm-none-linux-gnueabi-
export CC=${CROSS_COMPILE}gcc
export CFLAGS=-march=armv4t
export CXX=${CROSS_COMPILE}"g++" 
export AR=${CROSS_COMPILE}"ar" 
export AS=${CROSS_COMPILE}"as"
export RANLIB=${CROSS_COMPILE}"ranlib"
export LD=${CROSS_COMPILE}"ld"
export STRIP=${CROSS_COMPILE}"strip"
export ac_cv_func_malloc_0_nonnull=yes
cd /usr/local/tslib
./autogen-clean.sh
./autogen.sh
./configure --host=arm-linux --prefix=/home/tslib --enable-shared=yes
--enable-static=yes
make
make install

davef
Those macros ie SYN_MAX have to be defined somewhere.  Another #include
file in input-raw.c or in input-raw.c itself.

Did you last post cross-compile successfully?

jignesh
No, i am getting error during make in the step of compiling of tslib in
above step.

davef
It appeared that you had tried to cross-compile new source at kergoth. So,
you still get the same error.

> List the tools you placed on your host to cross-compile tslib.

Try to answer my question.  If you don't know I will try to find the list.

davef
Another issue ... I never used 4.4.3 on the mini2440, it was 4.3.2

Reply

Name
eMail (not visible)
Subject (no text only in upper case; no HELP, URGENT...)
Text
HTML tags are not supported and links are generated automatically if they start with http or ftp.
Please submit long source code or log files as attachment (only registered users).
Please enter the number: 2 6 8 4