Re-compile lua to use double precision for floating-point numbers

Delbert Franz ddf at sonic.net
Tue May 4 12:47:34 EDT 2010


I compiled the toolchain without keeping track of the time but I did 
notice that none of the cpu cores was all that busy.  However, after 
the toolchain was compiled  and I verified that the image worked,
I did a 

make clean 

then used 

make menuconfig

to modify the image a bit.  I did the "make clean" to be sure that 
there was nothing remaining that I deleted to potentially confuse the 
process.  It may not be needed but at this stage in my understanding 
of the process, I took no chances:) I deleted Ruby-have no need for 
that, modified busybox to include watch and setfont, then found out 
setfont did not work with the font file I had, added some things for 
Lua, etc:) After any "make clean", a subsequent 


make V=99 >& make.out 

will take close to three hours.  I always use "V=99", and save the 
output in a file, just in case something goes wrong.  I wondered why 
myself because the machine seemed to spend an inordinate amount of 
time in what the time command calls "system".  Yes, this is one fast 
machine and during my "real work" I have five or six cores (Linux sees 
it as an 8-core device) pegged at 100% for some minutes at a time.  I 
initially thought that I would be able to compile the whole toolchain 
and image in much less than three hours--there must be a bottleneck 
somewhere but I hardly have the time to sort it out--working on the 
Ben is not "real work" and I have lots of the latter to do:) 

                          Delbert




On Monday 03 May 2010, Ron K. Jeffries wrote:
> Delbert.
> 
> What exactly too 3 HOURS to compile on your  Intel i7 system. That's one
> fast machine. Or doe you only have 256MB of RAM or some such? ;)
> ---
> Ron K. Jeffries
> 
> 
> On Mon, May 3, 2010 at 11:01, Delbert Franz <ddf at sonic.net> wrote:
> 
> > Thanks, Mirko.  After I sent the E-mail, I had another inspiration on
> > how to find out what was needed to accomplish my goal:
> >
> > 1.  By looking at the output from "make V=99" after doing a "make clean"
> > (takes a bit less than 3 hours on my Intel i7), I found out where the
> > original package for lua was stored.  I copied that to a temp location
> > and discovered that none of the "extra" files were present.
> >
> > 2.  I saw that there were several patches that created completely new
> > files.  One of these was lnum_config.h and the first patch in the list
> > created it.
> >
> > 3.  Then in ../openwrt-xburst/package/lua/patches (the .. is whatever
> > top level directory name you used when creating the tool chain) I made
> > one change to the first patch file: 010-lua-5.1.3-lnum-full-260308.patch,
> > at line 1852:
> >
> > Original line:
> >
> > +# define LNUM_FLOAT
> >
> > Changed line:
> > +# define LNUM_DOUBLE
> >
> > Then returned to  the directory: ../open-xburst
> > and executed
> >
> > make package/lua/compile V=99 >& make_just_lua.out
> >
> > where: "make_just_lua.out"
> > is a file containing  the output from the command.  If everything
> > goes well you should find two new packages in
> > "../openwrt-xburst/bin/xburst/packages"
> >
> > liblua_5.1.4-6_xburst.ipk
> > lua_5.1.4-6_xburst.ipk
> >
> > 4.  Copy these two files to some convenient location on your
> > filesystem on the Ben.
> >
> > 5.  Then you have to remove the existing Lua.  Of course if you want
> > to return to the original package, you will have to find it somewhere,
> > I took mine from an earlier compile of a custom image, and have it
> > available to reinstall Lua.  To remove lua and lualib
> >
> > opkg remove lua
> > opkg remove lualib
> >
> > You will get some error messages about some files not found-- I just
> > ignored them:)
> >
> > 6. Then install the new version
> >
> > opkg install liblua_5.1.4-6_xburst.ipk  lua_5.1.4-6_xburst.ipk
> >
> > You will again get some error messages: just ignore them.  Maybe in
> > the next month or two those will go away as the software packages
> > mature:)
> >
 snip
> >
> >
> >
> > On Monday 03 May 2010, Mirko Vogt wrote:
> > > You could remove all patches, as they're mostly just to avoid
> > > performance issues :)
> > >
> > > mirko
> > >
> > >
> > > On Sun, 2010-05-02 at 14:42 -0700, Delbert Franz wrote:
> > > > I'm trying to set the values for Lua so that it will use double
> > > > precision for floating point numbers.  Yes, I know it will be slow:)
> > > > However, I am trying to compare the Nanonote to some other small
 snip




More information about the discussion mailing list


interactive