Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 24 Jul 2014, 21:46
All times are UTC - 4
 Forum index » Advanced Topics » Puppy Projects
pUPnGO - 6Mb ISO - Basic Building Block Puplet
Moderators: Flash, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 29 of 58 Posts_count   Goto page: Previous 1, 2, 3, ..., 27, 28, 29, 30, 31, ..., 56, 57, 58 Next
Author Message
goingnuts

Joined: 07 Dec 2008
Posts: 779

PostPosted: Wed 14 Sep 2011, 14:39    Post_subject: jwm-2.0.1 static build compiled with uclibc and X11tiny  

configured with: --disable-confirm --disable-png --disable-jpeg --disable-xft --disable-fribidi --disable-xinerama --disable-xrender

with the "patch to jwm that remove sticky windows from pager" from here

Shipped as 125k upxed bin. Unpacked 266K - running using only 580K.
Same configuration but with dynamic linking is 124K and use 2636K.
Only bug so far is the time - showing time 2 hours behind - I have no clue to fix that other than setting system time 2 hours in the future Shocked Setting timezone to GMT0 also works.

Update 160911: Attached static build of rxvt-2.6.4 169K unpacked - shipped as 85K upxed bin. If ps tells the truth normal rxvt uses 2640K and this static build uses 368K running.

Update 190911: Finally got png to work so ship a build with everything but xft and fribidi enabled (confirm icons png shape xinerama xpm xrender). Unpacked size 413K shipped as upxed bin 204K.
jwm-2.0.1_static_allimg.tar.gz
Description  jwm-2.0.1 static build compiled with uclibc and X11tiny and everything enabled but fribidi and xft
gz

 Download 
Filename  jwm-2.0.1_static_allimg.tar.gz 
Filesize  201.84 KB 
Downloaded  119 Time(s) 
rxvt-2.6.4_static.tar.gz
Description  rxvt-2.6.4 static build compiled with uclibc and X11tiny.
gz

 Download 
Filename  rxvt-2.6.4_static.tar.gz 
Filesize  83.5 KB 
Downloaded  120 Time(s) 
jwm-2.0.1_static.tar.gz
Description  jwm-2.0.1 static build compiled with uclibc and X11tiny.
gz

 Download 
Filename  jwm-2.0.1_static.tar.gz 
Filesize  123.35 KB 
Downloaded  127 Time(s) 
Back to top
View user's profile Send_private_message Visit_website 
technosaurus


Joined: 18 May 2008
Posts: 4277

PostPosted: Mon 19 Sep 2011, 23:15    Post_subject:  

I made a partially-static compile of dillo3 here:
http://murga-linux.com/puppy/viewtopic.php?p=564263#564263
(no libstdc++ or fltk-1.3 dependency, just X11, Xft and image libs)
... also I posted my uclibc++ and fltk configs a few posts later
anyhow, it ended up being smaller than the shared libstdc++ build, so it may be useful for using c++ apps (and pretty easy, no extra toolchain required, since it includes a wrapper ... which I was also able to modify to keep out unwanted optimizations flags like -O3 etc...)

btw what version of tinyx11 are you using? amigo's? any patches?

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send_private_message 
goingnuts

Joined: 07 Dec 2008
Posts: 779

PostPosted: Tue 20 Sep 2011, 00:58    Post_subject:  

Tested you minimal dillo in P412 - was missing libjpeg.so.7 - but symlink to libjpeg.so.62.0.0 made him start. Looked nice - but crashed trying to go to 'http://goingnuts.dk/linux.asp' with a Segmentation fault Question
Anyway - would it be possible to do full static build using tinyX11?

I am using amigos tinyX11 - but have added Xt, Xmu, SM, ICE and Xinerama (and added a couple of missing functions to tinyX11) to do this jwm. Attached build of Patriots JWM 2.0.1 with Enhancements and Fixes + the "no-sticky-in-pager-patch", 419K unpacked - shipped as 207K upxed bin. Only excluded fribidi and xft. I think this version of jwm is even better than the official 500...
Update 210911: Found a missing xfunction in the first attached bin that made a defect upper right corner of client windows - sorry. I have uploaded a new build with this fixed.
jwm-2.0.1-pe-beta-1_static.tar.gz
Description  Static build of Patriots JWM 2.0.1 with Enhancements and Fixes
Updated 210911
gz

 Download 
Filename  jwm-2.0.1-pe-beta-1_static.tar.gz 
Filesize  204.67 KB 
Downloaded  128 Time(s) 

Edited_times_total
Back to top
View user's profile Send_private_message Visit_website 
technosaurus


Joined: 18 May 2008
Posts: 4277

PostPosted: Wed 21 Sep 2011, 13:16    Post_subject:  

Re:dillo, If it wouldn't be too much trouble to package up your toolchain (any format will do), I can build a compatible minimal uclibc++ toolchain (or 2 or 3 ... sometimes minimal is too minimal ... for example, exceptions and rtti add a lot of bloat, but some programs use exceptions extensively --- geany required a lot of commenting out to get it to build) I posted my .config and other config options in the dillo thread a couple of posts later using
http://git.uclibc.org/uClibc++/snapshot/uClibc++-master.tar.bz2
http://www.fltk.org/software.php?VERSION=1.3.0&FILE=fltk/snapshots/fltk-1.3.x-r9038.tar.bz2

EDIT btw the uclibc++ wrapper is a great template for eliminating the unwanted CFLAGS that upstream imposes on all builds (-O3 can be set to -Os, -finline* can be removed or replaced with -finline-small-functions etc...)

I do a lot of compiling and get a little annoyed with the stream of output clobbering my commands (I know they are still in history but I like to be able to scroll through them still) I also like sometimes having a history file that is not limited to a certain number of lines, so I can check for errors or special -D* defines or CFLAGS passed during compilation. I _had_ been using an Xdialog tailbox but have switched to rxvt + dialog for portability in my pupngo base systems with only X
Code:
#!/bin/sh
touch /tmp/cmdhist
rxvt -e dialog --tailbox /tmp/cmdhist 0 0 &
while read CMDS; do
   echo " # ${CMDS}" >>/tmp/cmdhist
   eval ${CMDS} 2>>/tmp/cmdhist >>/tmp/cmdhist
done


there is much room for improvement like:
using tee to redirect to file while keeping stderr (if you just remove 2>>/tmp/cmdhist it will stay local but not be logged)
option to not show the output at all or only certain parts etc...
The basic idea here is how terminal emulators work, but missing stdin
(I got the idea while trying to learn to port a terminal to xcb)

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send_private_message 
goingnuts

Joined: 07 Dec 2008
Posts: 779

PostPosted: Wed 21 Sep 2011, 14:05    Post_subject:  

I will try to make a package containing the uclibc used + my present tinyX11 source. It might take a day or two though.
Succeeded today to build links-2.3pre1 static - at the moment without ssl - but ended up in a 2400k bin (removed every language but english). Using 3800K running. Always liked links-2.3pre1 as it provides images, partly support javascript and build with ssl gives access to Gmail and other internet based services...
Back to top
View user's profile Send_private_message Visit_website 
PANZERKOPF

Joined: 16 Dec 2009
Posts: 280
Location: Earth

PostPosted: Wed 21 Sep 2011, 15:14    Post_subject:  

goingnuts wrote:

Succeeded today to build links-2.3pre1

IMHO Links is best browser for tiny systems. It can work in any mode: text console,
framebufer console, DirectFB, X. Current release: 2.3
Another fork of links named "Hacked Links":
http://xray.sai.msu.ru/~karpov/links-hacked/

_________________
SUUM CUIQUE.
Back to top
View user's profile Send_private_message 
sc0ttman


Joined: 16 Sep 2009
Posts: 2372
Location: UK

PostPosted: Wed 21 Sep 2011, 15:22    Post_subject:  

PANZERKOPF wrote:
goingnuts wrote:

Succeeded today to build links-2.3pre1

IMHO Links is best browser for tiny systems.

Elinks here!

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send_private_message 
technosaurus


Joined: 18 May 2008
Posts: 4277

PostPosted: Wed 21 Sep 2011, 15:45    Post_subject:  

sounds great, and yet another reason for me to clean up Xvesa for a standalone build, and eventually part of a multicall binary of the X essentials

I have worked through this idea in the past and boiled it down to these basic steps:
    rename each program's main(...) to main_program(...)
    use multicall code for the real main(...) from either busybox, embutils, git, wireless-tools, bzip2, gzip or xz (there may be others)
    while ([ $errors]) do build && debug ;done


the great part of this is:
    being able to fork() main_jwm(...) as soon as possible (similar to waitforx)
    reduced footprint with static builds
    ability to refactor "commonish" code for further footprint reduction
    ability to integrate common tools into the gui (like a terminal button similar to showdesktop, or even swallowed in an autohide tray like yakuake)

here are my recollections from a brief prior attempt:
    Xvesa uses the main from dix/main.c (I think)
    lots of problems with "multiple definition of *"
    its better to build the whole program at once using all of the *.c files (instead of precompiled *.o files) with the -D* -I* -L* flags etc from a separate standalone build, but causes more multiple definitions due to static declarations essentially becoming global (even moreso if -fwhole-program is used) ... still its probably better to know about them and cause a build error, than to try tracking it down after
    I got the -D* -I* and -L* flags etc by piping make through | tr " " "\n" |sort -u
    I used the external history file I posted a few posts ago to check that I didn't miss something.
    Xvesa's source code is really scattered and difficult to follow
    I never considered the effects of mixing C and C++ code

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send_private_message 
goingnuts

Joined: 07 Dec 2008
Posts: 779

PostPosted: Sat 24 Sep 2011, 15:48    Post_subject:  

Tiny front end for minimp3: wmmp3 is a dockapp to control mpg123. I have patched minimp3 to accept "-q" to be quiet when called by wmmp3. Main playlist/dirs and app-name to run for player is set in /root/.wmmp3. Example included in attached package.
So either symlink minimp3 with mpg123 or change the line in /root/.wmmp3 "mpg123 = /usr/bin/mpg123" to "mpg123 = /usr/bin/minimp3"

Compiled wmmp3 (144K) and minimp3 (40K) static.
You can make an additional autohide tray in jwm and swallow wmmp3 - add the following to .jwmrc-tray:
Code:
<Tray autohide="true" layout="vertical" insert="left" x="-1" y="600" border="2" height="65" >
<Swallow name="wmmp3" width="64">
wmmp3
</Swallow>
</Tray>
snap0001.png
 Description   Running wmmp3
 Filesize   7.61 KB
 Viewed   683 Time(s)

snap0001.png

wmmp3.tar.gz
Description  wmmp3+minimp3 patched static builds
gz

 Download 
Filename  wmmp3.tar.gz 
Filesize  94.34 KB 
Downloaded  106 Time(s) 

Edited_time_total
Back to top
View user's profile Send_private_message Visit_website 
technosaurus


Joined: 18 May 2008
Posts: 4277

PostPosted: Sun 25 Sep 2011, 01:18    Post_subject:  

here is a proof of concept for making a multicall Xapp binary
it just includes jwm and st ... went fairly smoothly

to add another just follow the templates in "build" and main.c (renaming each app's main() to <app>_main())
Xapps.tar.gz
Description  binary and links
gz

 Download 
Filename  Xapps.tar.gz 
Filesize  104.32 KB 
Downloaded  114 Time(s) 
Xapps-0.0.tar.gz
Description  sources
gz

 Download 
Filename  Xapps-0.0.tar.gz 
Filesize  268.63 KB 
Downloaded  117 Time(s) 

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send_private_message 
goingnuts

Joined: 07 Dec 2008
Posts: 779

PostPosted: Sun 25 Sep 2011, 01:47    Post_subject:  

technosaurus wrote:
here is a proof of concept for making a multicall Xapp binary
it just includes jwm and st ... went fairly smoothly

to add another just follow the templates in "build" and main.c (renaming each app's main() to <app>_main())

COOL! Thanks! Very Happy
Tried to do a bundle of minimp3 and wmmp3: Compiled ok and the saving is approx. 8k (from 40+144 to 176). But there might be a problem with wmmp3 calling minimp3 (when they both are in the same multicall bin) - wmmp3 is forking minipm3 and checking for pid of the fork before playing anything - guess pid might be equal for wmmp3 and minimp3 when launched from the bundle??
Definitely has some interesting potential - imaging Xfm+Xpaint+Xeditor+Xinit+jwm+rxvt etc in one static bin...
Back to top
View user's profile Send_private_message Visit_website 
technosaurus


Joined: 18 May 2008
Posts: 4277

PostPosted: Sun 25 Sep 2011, 04:54    Post_subject:  

I've replaced st with rxvt and added getgui, made it a little more configurable (main.c is generated now)

Currently it is configured for shared libs... will test as static once I get all the necessary apps in there ... any recommendations ... perhaps dialog compiled against xcurses instead of getgui or something else? Mupdf requires the same libs as jwm (+450kb), which panel applets?


I made a patch a while back to add minimp3 to busybox
but can you just fork() minimp3_main(...) instead of fork exec?

Todo add ifdefs to each main so that apps can be reconfigured and built standalone.
Edit: my Droid changed ifdefs to ideas
Xapps-0.0.1.tar.gz
Description  source
gz

 Download 
Filename  Xapps-0.0.1.tar.gz 
Filesize  763.1 KB 
Downloaded  162 Time(s) 
build.tar.gz
Description  binary and symlinks for rxvt, getgui and jwm
gz

 Download 
Filename  build.tar.gz 
Filesize  146.06 KB 
Downloaded  105 Time(s) 

Edited_times_total
Back to top
View user's profile Send_private_message 
goingnuts

Joined: 07 Dec 2008
Posts: 779

PostPosted: Sun 25 Sep 2011, 13:09    Post_subject:  

Changed wmmp3 to use execlp instead of execl and it seems to work (I don't know what I am doing - just T&E). The advantage is that minimp3 still works from CLI, wmmp3 still works with mpg123 if needed and the total size of bin is reduced - compared to build-in minimp3 in wmmp3.
Attached the bundle and image showing wmmp3 running in a second tray with autohide - very convenient and could be expanded with other wmapplets (mixer, diskmonitor etc).
snap0002.png
 Description   
 Filesize   15.47 KB
 Viewed   616 Time(s)

snap0002.png

Mp3bundle250911.tar.gz
Description  Mp3bundle (wmmp3+minimp3 multicall binary)
gz

 Download 
Filename  Mp3bundle250911.tar.gz 
Filesize  84.03 KB 
Downloaded  111 Time(s) 
Back to top
View user's profile Send_private_message Visit_website 
technosaurus


Joined: 18 May 2008
Posts: 4277

PostPosted: Sun 25 Sep 2011, 13:33    Post_subject:  

I wrote some helpers for static binaries that you may find useful

write1 - print string to stdout (saves 7-20kb over printf)
write2 - print string to stderr (saves 7-20kb over printf)
fork_exec - fork and exec a binary
fork_exec_wait - fork and exec a binary and wait for it to return
shift_n - shift an array by n (useful for something like busybox app <args> because you can shift_n(1,argv) and then fork_exec(argv))
wait_pids - waits for a list of pids to finish
swrl - just puts a swirling line on the screen

the attachment uses functions, but if you only use it once a #define may make more sense

Code:
#define write2(s) write(2, s, strlen(s));
#define write1(s) write(1, s, strlen(s));
#define fork_exec_wait(a) ({int s,p;if((p=fork())==0){execvp(a[0],a);}else{while(wait(&s)!= p);}})
#define shift_n(i,a) ({ int j=0;while(a[j] != NULL){a[j]=a[j+i];j++;}})


etc...

Edit: oops I put wait_pids in there, it is a program, not a function
I do however find it extremely useful is init scripts, and have been meaning to send it to the busybox mail list.
the shell builtin "wait" waits for _all_ pids of children, but we may fork several different trees in an init script and only need to wait for a few of them before continuing with something ... it is for improved boot speed - maybe other uses as well when speed is necessary
swrl is the same code, but shows that we are waiting
libstatic.tar.gz
Description 
gz

 Download 
Filename  libstatic.tar.gz 
Filesize  1.67 KB 
Downloaded  111 Time(s) 

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send_private_message 
goingnuts

Joined: 07 Dec 2008
Posts: 779

PostPosted: Sun 25 Sep 2011, 16:11    Post_subject:  

Thank you for sharing all this! Its really a nice new tool. Tried to add an other wmapplet to the MP3bundle: Static compiled each program was 40+144+131=315K. The multicall binary was 197K. So the last added program only added extra 21K which is close to the size of that program linked dynamic. So for the static build it seems that the more common libs the better the effect on size reduction. And according to ps the mem usage is like if running the single program alone (I think...)
Back to top
View user's profile Send_private_message Visit_website 
Display_posts:   Sort by:   
Page 29 of 58 Posts_count   Goto page: Previous 1, 2, 3, ..., 27, 28, 29, 30, 31, ..., 56, 57, 58 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Puppy Projects
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1133s ][ Queries: 12 (0.0128s) ][ GZIP on ]