Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 09-08-2015, 10:23 AM   #61
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Perhaps this will be of interest to those following this building of a system update.

We want to do graphics for our clock page (which will actually be a *.png picture).
All Kindle models can display a *.png picture (their messages and screensavers are *.png).
And we need to generate a new *.png each time the time-of-day changes.
Whoot!

We (or a script) requests the Lua application.
The command line processor turns that request over to the kernel.
The kernel reads the file header and finds the application is dynamic so it loads the loader (ld-linux-armhf.so.3 - which is a static binary) and turns over the request for it to handle.
The kernel "knows" what loader application because the application "told" it in the header's .interp field.
(In this case, it tells it the wrong one - I need to 'fix' the Lua makefile.)
The following is the information the loader uses to create the memory image:
Code:
usr/bin $ objdump -xs lua | grep '\.interp\|NEEDED\|SONAME\|RPATH'
  NEEDED               liblua.so.5.1.5
  NEEDED               libm.so.6
  NEEDED               libdl.so.2
  NEEDED               libreadline.so.6
  NEEDED               libhistory.so.6
  NEEDED               libncursesw.so.6
  NEEDED               libc.so.6
  0 .interp       00000019  00008134  00008134  00000134  2**0
Contents of section .interp:
The dynamic loader checks if each of the above are already in memory and reuses it or if not, loads it.
Looking at the first library requested as an example, the only thing it needs is libc - which you can bet is already in memory.
Code:
usr/lib $ objdump -xs liblua.so.5.1.5 | grep '\.interp\|NEEDED\|SONAME\|RPATH'
  NEEDED               libc.so.6
  SONAME               liblua.so.5.1.5
The dynamic loader (unless horribly broken) reused the copy of libc that was already loaded.

After that, and the loading of everything else needed, the loader turns execution over to Lua.
Which, when processing its script, finds a:
lc = require 'luacairo'
statement in the script.

The processing of the "require" statement discovers that it needs an external dynamic library, so it calls the dl (dynamic loader) library to get that done.
The dl library, not to re-invent the wheel, loads a copy of the system loader to handle whatever requests it gets.
Code:
lib $ objdump -xs libdl-2.21.so | grep '\.interp\|NEEDED\|SONAME\|RPATH'
  NEEDED               libc.so.6
  NEEDED               ld-linux-armhf.so.3
  SONAME               libdl.so.2
In this example case, it loads the libcairo dynamic library.
At this point, things are going to crash and burn if they haven't already.
Code:
lib $ objdump -xs libcairo.so.2.11400.2 | grep '\.interp\|NEEDED\|SONAME\|RPATH'
  NEEDED               libpixman-1.so.0
  NEEDED               libfontconfig.so.1
  NEEDED               libexpat.so.1
  NEEDED               libfreetype.so.6
  NEEDED               libharfbuzz.so.0
  NEEDED               libglib-2.0.so.0
  NEEDED               libpthread.so.0
  NEEDED               libbz2.so.1.0
  NEEDED               libpng16.so.16
  NEEDED               libz.so.1
  NEEDED               librt.so.1
  NEEDED               libm.so.6
  NEEDED               libc.so.6
  SONAME               libcairo.so.2
  RPATH                /var2/k2-work/k2-rel/./host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/lib:/var2/k2-work/k2-def/./host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/lib
See all those required dynamic libraries?
Those have to be found and loaded.
Only the run-time search path is set to locations that only exist on my build machine, not on the Kindle. (Oops)

Obviously, I have to 'fix' the libcairo makefile also.

And probably throw in a few more build system 'tweaks' to stand a better chance of getting things correct the first time the binaries are built.

And the first 'tweak' will be to fix its infrastructure of macros that are (mis-) using a 'reserved' variable name (LDFLAGS) to pass extra flags to GCC rather than to LD.

Ah, I guess the invented name(s) for that field will be based on: "GCCFLAGS"
Since that is how they are using it.

= = = =

@idoit: The binaries associated with Wireshark have the same set of problems.

Last edited by knc1; 09-08-2015 at 10:54 AM.
knc1 is offline   Reply With Quote
Old 09-08-2015, 11:23 AM   #62
thatworkshop
hub
thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.
 
thatworkshop's Avatar
 
Posts: 715
Karma: 2151032
Join Date: Jan 2012
Location: Iranian in Canada
Device: K3G, DXG, Kobo mini
Quote:
Originally Posted by knc1 View Post
@idoit: The binaries associated with Wireshark have the same set of problems.
And it does have quite a sizeable number of deps indeed...
thatworkshop is offline   Reply With Quote
Advert
Old 09-08-2015, 03:15 PM   #63
space_escalator
Member
space_escalator began at the beginning.
 
space_escalator's Avatar
 
Posts: 22
Karma: 10
Join Date: Aug 2015
Device: kindle 2
Wow. This has become something very interesting and impressive indeed. The work you're doing is amazing!
space_escalator is offline   Reply With Quote
Old 09-08-2015, 03:35 PM   #64
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by space_escalator View Post
Wow. This has become something very interesting and impressive indeed. The work you're doing is amazing!
I am combining several different project threads here (including one of my own).

Graphics on the non-X11 Kindles was always lacking attention.

So, one big push to get the resources on the early Kindle models that people need to work with may change that lack of attention.

= = = =

Meanwhile, back at the BR 'tweaking&testing' office -

The menu is sorted out (below), now start it to building a whole bunch of stuff and see what parts of the build system blow up.

(The extra LD options are wrong, the extra GCC options are correct - so I can tell when a makefile grabs the wrong field.)

- - Edit: - -
Well, that didn't take long:
Code:
checking whether the C compiler works... no
configure: error: in `/var2/k2-work/k2-rel/build/libtirpc-0.3.2':
configure: error: C compiler cannot create executables
See `config.log' for more details
The AARP Union Rules require I take a mid-day nap, so this seems like a good point in development to do just that . . . .
Attached Thumbnails
Click image for larger version

Name:	TargetCustomize.png
Views:	246
Size:	43.5 KB
ID:	141835  

Last edited by knc1; 09-08-2015 at 03:52 PM.
knc1 is offline   Reply With Quote
Old 09-08-2015, 03:47 PM   #65
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@knc1: Ooh, poisoning LDFLAGS with a specific pattern is indeed a nice idea to detect wonky buildsystems :].

Expect libtool to crush your dreams, though, it has a tendency to try to outsmart you by stripping unknown/broken flags ;/. (I ran into that when switching to LTO, which was all kinds of fun, because of that specific issue of buildsystems misusing CFLAGS/LDFLAGS, or not keeping both at link time, which in turn led me to discover said libtool 'feature').

Haven't found a good way to work-around that, sadly, so I'm currently using very ugly hacks to patch Makefiles when I can't use a simple global, semi-standard override (AM_LDFLAGS, IIRC).



TL;DR: As you're starting to see, there's a certain form of masochism involved in anything cross-compile related... ^^.


EDIT: Ah, right, that's also why I couldn't put the libtool-proof flags in LDFLAGS: the basic autotools sanity check fails. So poisoning LDFLAGS has to be done with something 'sane' that won't break at build/link time... Which in turn means you have to pore over build logs with your good friend ag/grep to pinpoint broken buildsystems...

Last edited by NiLuJe; 09-08-2015 at 04:01 PM.
NiLuJe is offline   Reply With Quote
Advert
Old 09-08-2015, 04:07 PM   #66
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Well, they aren't poison if the build system and the makefiles they call use them correctly.
But things do come to a screaming halt if they get the two confused.

Which is just what happened above.
So I know just where to look (after my nap).
knc1 is offline   Reply With Quote
Old 09-08-2015, 06:17 PM   #67
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by NiLuJe View Post
@knc1: Ooh, poisoning LDFLAGS with a specific pattern is indeed a nice idea to detect wonky buildsystems :].
- - -
After a decent nap, I discovered what you where writing about.
The highlighted line in the screenshot had an extra space in it.

But I lucked out, the build still blew up early, with something I can use to track back through the system with:
Added: "\" and ## comment for readablity:
Code:
configure:3218: checking whether the C compiler works
configure:3240: /var2/k2-work/k2-rel/./host/usr/bin/arm-linux-gcc \
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64   -O2  \
-Wl, -I/mnt/base-us/esys/lib/ld-linux-armhf.so.3 \  ## <= from TARGET_GCCFLAGS
-DGQ \
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 \
-I/mnt/base-us/esys/lib/ld-2.21.so \  ## <= from TARGET_LDFLAGS
conftest.c  >&5
Now, after my tweaking of the build system, TARGET_LDFLAGS should **only** be passed to *-linux-ld

I grep'd the build repository, there are only 160 occurances of LDFLAGS to be checked.
knc1 is offline   Reply With Quote
Old 09-08-2015, 07:13 PM   #68
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@knc1: What about when LDLFAGS actually *has* a legitimate reason for being in a *-gcc call? I'm mainly thinking of single source file stuff, where gcc itself is calling the linker (which is how some/most autotools tests behave, IIRC?)?
NiLuJe is offline   Reply With Quote
Old 09-08-2015, 08:18 PM   #69
thatworkshop
hub
thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.
 
thatworkshop's Avatar
 
Posts: 715
Karma: 2151032
Join Date: Jan 2012
Location: Iranian in Canada
Device: K3G, DXG, Kobo mini
Also, knc1, regarding what you replied about my point on stripping down unnecessary processes DXG might have, to preserve RAM a bit more (mainly cvm is the culprit here), I hope it can be done.

You mentioned it somewhere yesterday you're working... I can't find it now.
thatworkshop is offline   Reply With Quote
Old 09-08-2015, 09:16 PM   #70
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by NiLuJe View Post
@knc1: What about when LDLFAGS actually *has* a legitimate reason for being in a *-gcc call? I'm mainly thinking of single source file stuff, where gcc itself is calling the linker (which is how some/most autotools tests behave, IIRC?)?
That will work now.
In fact, it does work (both libtirpc and busybox are autotools packages).
Although I want to clean up the macro that generates the makefile macro that generates the setup for calling autotools tomorrow (or tonight if I can't sleep).

Yup -
Buildroot is that sort of beast - macros that generate macros that generate make rules.
(I don't think it gets more than three levels deep, mostly just one or two.)

The problem I fixed (or am fixing) was when LDFLAGS was passed to LD (which really doesn't like the GCC format for load flags).
knc1 is offline   Reply With Quote
Old 09-08-2015, 10:16 PM   #71
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
After all the macros expand, autotools patching, autoreconfig, libtool patching, libtoolizing, we hit the magic call to ./configure:

This one is really ugly, I'll spoiler it:
Notice that somebody/something trashed LDFLAGS after I dealt with them.
The gcc format sysroot option got stuffed into LDFLAGS and notice also that the gcc format sysroot option is missing from CFLAGS, CXXFLAGS and FCFLAGS.
The only reason this one isn't blowing up is because it links with gcc (via libtool) rather than ld and there is a bunch of stuff in there that makes up for the missing sysroot.
Spoiler:

If you think this is bad, remember it started out as a single line command before I broke it up:
Code:
>>> This is: $(auto.reconfig-env) autoreconfig $(auto.reconfig-args)
(
  cd /var2/k2-work/k2-rel/build/libtirpc-0.3.2/ &&  \
  PATH=\
     "/var2/k2-work/k2-rel/./host/bin:\
      /var2/k2-work/k2-rel/./host/sbin:\
      /var2/k2-work/k2-rel/./host/usr/bin:\
      /var2/k2-work/k2-rel/./host/usr/sbin:\
      /usr/local/sbin:\
      /usr/local/bin:\
      /usr/sbin:\
      /usr/bin:\
      /sbin:\
      /bin:\
      /usr/games" \
  AR="/usr/bin/ar" \
  AS="/usr/bin/as" \
  LD="/usr/bin/ld" \
  NM="/usr/bin/nm" \
  CC="/usr/bin/gcc" \
  GCC="/usr/bin/gcc" \
  CXX="/usr/bin/g++" \
  CPP="/usr/bin/cpp" \
  OBJCOPY="/usr/bin/objcopy" \
  RANLIB="/usr/bin/ranlib" \
  CPPFLAGS="-I/var2/k2-work/k2-rel/./host/usr/include" \
  CFLAGS="-O2 -I/var2/k2-work/k2-rel/./host/usr/include" \
  CXXFLAGS="-O2 -I/var2/k2-work/k2-rel/./host/usr/include" \
  LDFLAGS="-L/var2/k2-work/k2-rel/./host/lib -L/var2/k2-work/k2-rel/./host/usr/lib  \
                 -Wl,-rpath,/var2/k2-work/k2-rel/./host/usr/lib" \
  PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 \
  PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 \
  PKG_CONFIG="/var2/k2-work/k2-rel/./host/usr/bin/pkg-config" \
  PKG_CONFIG_SYSROOT_DIR="/" \
  PKG_CONFIG_LIBDIR="/var2/k2-work/k2-rel/./host/usr/lib/pkgconfig:\
                                  /var2/k2-work/k2-rel/./host/usr/share/pkgconfig" \
  LD_LIBRARY_PATH="/var2/k2-work/k2-rel/./host/usr/lib" \
  INTLTOOL_PERL=/usr/bin/perl \
  ACLOCAL="/var2/k2-work/k2-rel/./host/usr/bin/aclocal \
                -I /var2/k2-work/k2-rel/./host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/share/aclocal" \
  AUTOCONF="/var2/k2-work/k2-rel/./host/usr/bin/autoconf" \
  AUTOHEADER="/var2/k2-work/k2-rel/./host/usr/bin/autoheader" \
  AUTOMAKE="/var2/k2-work/k2-rel/./host/usr/bin/automake" \
  AUTOPOINT=/bin/true \
  /var2/k2-work/k2-rel/./host/usr/bin/autoreconf -f -i \
  -I "/var2/k2-work/k2-rel/./host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/share/aclocal" \
  -I "/var2/k2-work/k2-rel/./host/usr/share/aclocal" 

>>> This is: $(configure-env) ./configure $(configure-args)

 (
  cd /var2/k2-work/k2-rel/build/libtirpc-0.3.2/ && \
  rm -rf config.cache && \
  PATH="/var2/k2-work/k2-rel/./host/bin:\
            /var2/k2-work/k2-rel/./host/sbin:\
            /var2/k2-work/k2-rel/./host/usr/bin:\
            /var2/k2-work/k2-rel/./host/usr/sbin:\
            /usr/local/sbin:\
            /usr/local/bin:\
            /usr/sbin:/usr/bin:/sbin:/bin:/usr/games" 
  AR="/var2/k2-work/k2-rel/./host/usr/bin/arm-linux-ar" \
  AS="/var2/k2-work/k2-rel/./host/usr/bin/arm-linux-as" \
  LD="/var2/k2-work/k2-rel/./host/usr/bin/arm-linux-ld" \
  NM="/var2/k2-work/k2-rel/./host/usr/bin/arm-linux-nm" \
  CC="/var2/k2-work/k2-rel/./host/usr/bin/arm-linux-gcc" \
  GCC="/var2/k2-work/k2-rel/./host/usr/bin/arm-linux-gcc" \
  CPP="/var2/k2-work/k2-rel/./host/usr/bin/arm-linux-cpp" \
  CXX="/var2/k2-work/k2-rel/./host/usr/bin/arm-linux-g++" \
  FC="/var2/k2-work/k2-rel/./host/usr/bin/arm-linux-gfortran" \
  RANLIB="/var2/k2-work/k2-rel/./host/usr/bin/arm-linux-ranlib" \
  READELF="/var2/k2-work/k2-rel/./host/usr/bin/arm-linux-readelf" \
  STRIP="/var2/k2-work/k2-rel/./host/usr/bin/arm-linux-strip" \
  OBJCOPY="/var2/k2-work/k2-rel/./host/usr/bin/arm-linux-objcopy" \
  OBJDUMP="/var2/k2-work/k2-rel/./host/usr/bin/arm-linux-objdump" \
  AR_FOR_BUILD="/usr/bin/ar" \
  AS_FOR_BUILD="/usr/bin/as" \
  CC_FOR_BUILD="/usr/bin/gcc" \
  GCC_FOR_BUILD="/usr/bin/gcc" \
  CXX_FOR_BUILD="/usr/bin/g++" \
  LD_FOR_BUILD="/usr/bin/ld" \
  CPPFLAGS_FOR_BUILD="-I/var2/k2-work/k2-rel/./host/usr/include" \
  CFLAGS_FOR_BUILD="-O2 -I/var2/k2-work/k2-rel/./host/usr/include" \
  CXXFLAGS_FOR_BUILD="-O2 -I/var2/k2-work/k2-rel/./host/usr/include" \
  LDFLAGS_FOR_BUILD="-L/var2/k2-work/k2-rel/./host/lib -L/var2/k2-work/k2-rel/./host/usr/lib \
                                  -Wl,-rpath,/var2/k2-work/k2-rel/./host/usr/lib" \
  FCFLAGS_FOR_BUILD="" \
  DEFAULT_ASSEMBLER="/var2/k2-work/k2-rel/./host/usr/bin/arm-linux-as" \
  DEFAULT_LINKER="/var2/k2-work/k2-rel/./host/usr/bin/arm-linux-ld" \
  GCCFLAGS="-Wl,-I/mnt/base-us/esys/lib/ld-linux-armhf.so.3" \
  CPPFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" \
  CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64   -O2  \
                -Wl,-I/mnt/base-us/esys/lib/ld-linux-armhf.so.3" \
  CXXFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64   -O2  
                   -Wl,-I/mnt/base-us/esys/lib/ld-linux-armhf.so.3" \
  LDFLAGS="-I/mnt/base-us/esys/lib/ld-2.21.so" \
  FCFLAGS="" \
  PKG_CONFIG="/var2/k2-work/k2-rel/./host/usr/bin/pkg-config" \
  STAGING_DIR="/var2/k2-work/k2-rel/./host/usr/arm-buildroot-linux-gnueabihf/sysroot" \
  INTLTOOL_PERL=/usr/bin/perl \
  ac_cv_lbl_unaligned_fail=yes \
  ac_cv_func_mmap_fixed_mapped=yes \
  ac_cv_func_memcmp_working=yes \
  ac_cv_have_decl_malloc=yes \
  gl_cv_func_malloc_0_nonnull=yes \
  ac_cv_func_malloc_0_nonnull=yes \
  ac_cv_func_calloc_0_nonnull=yes \
  ac_cv_func_realloc_0_nonnull=yes \
  lt_cv_sys_lib_search_path_spec="" \
  ac_cv_c_bigendian=no \
  CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64   -O2  \
               -Wl,-I/mnt/base-us/esys/lib/ld-linux-armhf.so.3 -DGQ" \
  CONFIG_SITE=/dev/null \
  ./configure \
            --target=arm-buildroot-linux-gnueabihf \
            --host=arm-buildroot-linux-gnueabihf \
            --build=i686-pc-linux-gnu \
            --prefix=/usr \
            --exec-prefix=/usr \
            --sysconfdir=/etc \
            --localstatedir=/var \
            --program-prefix="" \
            --disable-gtk-doc \
            --disable-gtk-doc-html \
            --disable-doc \
            --disable-docs \
            --disable-documentation \
            --with-xmlto=no \
            --with-fop=no \
            --disable-dependency-tracking \
            --enable-ipv6  \
            --disable-static \
            --enable-shared  \
            --disable-gssapi 
 )
)

Which reminds me -
It would be a good thing to add menu entries that over-ride:
--sysconfdir=/etc and --localstatedir=/var
to put those into the writable: /mnt/base-us/esys/* tree.

Well, enough for tonight, more tomorrow.

Last edited by knc1; 09-09-2015 at 04:25 AM.
knc1 is offline   Reply With Quote
Old 09-08-2015, 10:44 PM   #72
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
For those at home that may be as confused as I was initially (because ld's -I flag is fairly obscure and much more explicit in its long form: --dynamic-linker, while gcc's -I flag is much more common), hit ld's & gcc's docs on those two .
NiLuJe is offline   Reply With Quote
Old 09-09-2015, 03:51 AM   #73
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by NiLuJe View Post
For those at home that may be as confused as I was initially (because ld's -I flag is fairly obscure and much more explicit in its long form: --dynamic-linker, while gcc's -I flag is much more common), hit ld's & gcc's docs on those two .
A good point, I probably should use the long form.
knc1 is offline   Reply With Quote
Old 09-09-2015, 01:33 PM   #74
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Menu updated (again), **now** I think it has everything required to support a system file tree not rooted at: "/".

For the use of the highlighted one, see:
http://www.gnu.org/savannah-checkout...#Site-Defaults

- - Edit - -
Those fields now show up in the build system's configuration file:
Code:
BR2_arm=y
BR2_arm1136jf_s=y
BR2_ARM_EABIHF=y
BR2_DL_DIR="$(CONFIG_DIR)/../k2-dl"
BR2_HOST_DIR="$(CONFIG_DIR)/host"
BR2_OPTIMIZE_2=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_PATH="/var2/k2-work/k2-def/host/usr"
BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y
BR2_TOOLCHAIN_EXTERNAL_CXX=y
#
# the one old, the one fixed and the three new ones:
# the path to the site config file not shown here because its set to its default value.
#
BR2_TARGET_OPTIMIZATION="-O2"
BR2_TARGET_GCCFLAGS="-Wl,-I/mnt/base-us/esys/lib/ld-linux-armhf.so.3"
BR2_TARGET_LDFLAGS="--dynamic-linker=/mnt/base-us/esys/lib/ld-linux-armhf.so.3"
BR2_TARGET_SYSCONFDIR="/mnt/base-us/esys/etc"
BR2_TARGET_LOCALSTATEDIR="/mnt/base-us/esys/var"
Tomorrow, make them do something (fixing other things as I find them).
Attached Thumbnails
Click image for larger version

Name:	ConfigurationOverrides.png
Views:	203
Size:	54.2 KB
ID:	141860  

Last edited by knc1; 09-09-2015 at 08:41 PM.
knc1 is offline   Reply With Quote
Old 09-10-2015, 11:56 AM   #75
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Found system had a "printallvariables" target -
Thought "hey, I'll do that and just fix anything wrong on the list".
Yeah, right, the list is 168,000+ lines long.

the death of "plan a".

- - - -

Plan B:
Make zlib build (it has no dependences, calls only the pkg-generic macro (which calls the pkg-inner-generic macro)).
fixing the pkg-generic macro(s) should fix 369 of the packages.

AND THEN
get the things that call the pkg-autotools macro(s) to work (which calls pkg-generic).
that should fix another 1019 of the packages.

and then if lucky, leave the pkg-cmake macro(s) for somebody else.

- - - -

pkg-generic works just as intended with my changes -
it was a problem with the makefile that ships with zlib (now BR patches it).

After lunch - fix or destroy the pkg-autotools macro.

- - - -

Mid-night++
Finally found where/why that autotools+libtool package was choking on my correction of the use of LDFLAGS - - -
Guess what - libtool has the same 'mistake' in it, as does automake-m4 files, and ...

So I found an 'easy' way to 'fix' the problem for packages that die on an "unknown option" failure in their configuration step now.

- - - -

Next (or later) morning -
It is amazing how many different ways people can screw-up an accepted usage.
Even the GNU tools folks screwing up the GNU recommended naming standards.

I think I need to step away from this project for a few days, give the brain a rest.

Last edited by knc1; 09-11-2015 at 10:37 AM.
knc1 is offline   Reply With Quote
Reply

Tags
browser, clock, html, k2i


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
bulk delete from Amazon's Kindle webpage? mewmartigan Amazon Kindle 16 01-30-2014 04:19 PM
Kindle 4.0.1 password tool webpage Lorphos Kindle Developer's Corner 6 02-13-2012 09:20 AM
Is there a webpage to check a Kindle's warranty status? travfar Amazon Kindle 4 07-25-2011 06:19 PM
Troubleshooting Need help with clock setting , kindle 2 wayneriette Amazon Kindle 15 02-15-2011 11:57 AM
Does the Kindle have a Clock markbot Amazon Kindle 6 09-27-2010 01:20 PM


All times are GMT -4. The time now is 01:57 PM.


MobileRead.com is a privately owned, operated and funded community.