How to cross compile sqlite-3.2.7 for arm9 s3c2410?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How to cross compile sqlite-3.2.7 for arm9 s3c2410?

cupidsd
I have downloaded sqlite-3.2.7.tar.gz from Internet, but I do not know how to compile it on s3c2410(linux 2.6, arm9, samsung)?

There is no useful tips in README or INSTALL, pls help me.

Thx.

------------------------------
?????????Sogou.com??2G??????????4?????!
http://mail.sogou.com/recommend/sogoumail_invite_reg1.jsp?from=sogouinvitation&s_EMAIL=cupidsd%40sogou.com&username=sqlite-users&FullName=sqlite-users&Email=sqlite-users%40sqlite.org&verify=fcd64dc521a05fbe8f224ceef58ce291

Reply | Threaded
Open this post in threaded view
|

Re: How to cross compile sqlite-3.2.7 for arm9 s3c2410?

Frank van Vugt
> I have downloaded sqlite-3.2.7.tar.gz from Internet, but I do not know how
> to compile it on s3c2410(linux 2.6, arm9, samsung)?

There's some info in the wiki on it, but basically the steps are:

1. change the configure script (see attached patch for 3.2.6)

2. configure with something like this (in my case an arm sa1110):
    cd $PATH/sqlite-3.2.6
    CC=arm-sa1100-linux-gnu-gcc CXX=arm-sa1100-linux-gnu-g++ \
    CFLAGS=-I$TOOLCHAIN_BASE/include BUILD_CC=gcc \
        ./configure --host=i686-pc-linux --target=arm-sa1100-linux \
             --disable-shared --disable-tcl --prefix=$PATH_INSTALL

3. change the Makefile a bit, setting 'BCC' to your regular compiler and (if
you want) add the static build flag, for example doing something like this:
        mv Makefile Makefile.sed
        cat Makefile.sed | sed 's/^BCC.*/BCC = gcc/' | sed 's/^LTLINK.*/&
-all-static/' > Makefile
        rm Makefile.sed

4. make && make install


Mind you, depending on which core you have and whether you want floating
point, you might find the other patch attached usefull as well. It is from an
earlier posting of myself:

"In order to wrap this up: apparently there's a feature / bug (choose one) in
any ARM core earlier than v5 due to which a float will be stored in big
endian quad order. The processor in this particular case is an SA1110, which
is default little endian while having a v4 core..... (and thus is 'swapping'
the quads)."



--
Best,




Frank.

patch_aml_sqlite3_configure.diff (2K) Download Attachment
patch_aml_sqlite3_vdbeaux_c.diff (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: How to cross compile sqlite-3.2.7 for arm9 s3c2410?

Ron Aaron

On Tue, September 27, 2005 7:39, Frank van Vugt said:

> There's some info in the wiki on it, but basically the steps are:

Hello, Frank -

I successfully created an ARM sqlite3 (3.2.7) and it is running on my Archos
PMA400 - thanks!

I have noticed that when I create a database and do a simple INSERT, (using
the sqlite3 binary), there is an appreciable delay (1-2 seconds) before
sqlite3 returns to the prompt.  When doing SELECT there is no delay.

I have not noticed this on my Windows or Linux machines (x86).

Is this possibly because of not using transactions?  It seems a bit extreme.
The device is storing the database on a hard-disk, so it shouldn't have to do
with paged RAM or something.

Thanks for any suggestions, and thanks again for the good instructions!

--
Reva Forth for Linux and Windows --  http://ronware.org/reva/
GPG key fingerprint: 8130 734C 69A3 6542 0853 CB42 3ECF 9259 AD29 415D


Reply | Threaded
Open this post in threaded view
|

Delay during insert - Was: [sqlite] How to cross compile sqlite-3.2.7 for arm9 s3c2410?

Frank van Vugt
Hi Ron,

> I have noticed that when I create a database and do a simple INSERT, (using
> the sqlite3 binary), there is an appreciable delay (1-2 seconds) before
> sqlite3 returns to the prompt.  When doing SELECT there is no delay.

Mmm, can't say that I have seen any strange delays on the arm platform, albeit
that it obviously *is* a bit slower than i386 ;). But seriously, given that
we're talking about a newly created db, a fairly simple table with no 'weird'
triggers etc, then a plain insert is not that much work and should return
almost instantly.

It might be due to some locking issues, but you didn't mention accessing the
db from multiple processes / threads. Also, your filesystem / kernel might
have issues (re)opening the file readwrite. You could use something like
strace to see what exactly is happening during the delay, given that this
tool is available on the platform, but if it isn't you could built it.

> I have not noticed this on my Windows or Linux machines (x86).

Me neither.

> Is this possibly because of not using transactions?

Not likely.

> The device is storing the database on a hard-disk, so it shouldn't
> have to do with paged RAM or something.

I wouldn't jump to the same conclusion when it was anything else than a simple
insert......, but anyway. The only additional thing that comes to mind is
that you were seeing a select coming from cache and that the insert triggered
a powerup of the drive......? Again, something like strace could tell you
what's happening.

> Thanks for any suggestions, and thanks again for the good instructions!

You're welcome, good luck !




--
Best,




Frank.