pUPnGO - 6Mb ISO - Basic Building Block Puplet

A home for all kinds of Puppy related projects
Message
Author
User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#461 Post by technosaurus »

The big advantage to include jwm would be the possibility of modifying xinit to call the xvesa and jwm as functions and the associated improved timing (that is essentially what I did with wait4display - I also removed everything that could be part of a script). Looking further, same could go for "programs" called by jwm... instant starts would result.

I think I may be able to adapt uclibc and busybox build environment to fit by adding some stuff to kconfig and makefiles, so that it becomes an extended busybox... new stuff would go to either appropriate dirs or a new X dir.
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#462 Post by goingnuts »

technosaurus wrote: I think I may be able to adapt uclibc and busybox build environment to fit by adding some stuff to kconfig and makefiles, so that it becomes an extended busybox... new stuff would go to either appropriate dirs or a new X dir.
That would be great! I think it would be nice if users could choose to build standalone apps as well...

Found that selecting text in rxvt and pasting in ex. geany made rxvt die or no paste done, in the above mcb_vesa. So I have upgraded rxvt to rxvt-2.7.10 and now paste works. The attached mcb_vesa also include jwm - increasing unpacked size to 1K, upxed around 500K. Maybe I should exclude xinerama and confirm from jwm? Confirm seems annoying...

If anyone have suggestions for pure X-based apps (not using gtk or Xaw or Motif stuff) for a good text-editor, a "paint"-program, IRC, torrent or others...please tell!

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#463 Post by technosaurus »

to build standalone ... for the code changes to main()

proceed the pseudo main with something like

#ifndef MULTICALL
#define jwm_main(a,b) main(a,b)
#endif

to build multicall you would need -DMULTICALL in the CFLAGS

@goingnuts
the buildsystem used by the kernel requires curses to configure from the command line - would it be better to implement a similar shell only system that does essentially the same thing? probably using read as you have done in the past with some of your config scripts
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#464 Post by nooby »

Guys don't get me wrong now. I have done my best to keep a low
profile and to not derail this wonderful thread for a long long time.

So bear with me just a short comment.

the work you goingnuts and you technosaurus do on pupngo
is of much value to me and I wished more people would get involved.

Would it be possible to get somebody into puppy 528 to apply this
knowledge from pupnggo so we get a modern kernel that have the
drivers we need for our modern computers.

oops bad grammar and fuzzy thinking on my part.
I simply meanpupngo would be working on modern computers
if it was based on a modern kernel with all the drivers those have.

GoingNuts I know you want to stay in this kernel and I don't criticize
that at all. Everybody should follow their inner motivation but it would
be a very good thing if you guys could find somebody that apply this
knowledge on a modern kernel.


Just my 5 cents and I go back into lurking now. Promise.
I use Google Search on Puppy Forum
not an ideal solution though

PANZERKOPF
Posts: 282
Joined: Wed 16 Dec 2009, 21:38
Location: Earth

#465 Post by PANZERKOPF »

goingnuts wrote: Maybe I should exclude xinerama and confirm from jwm? Confirm seems annoying...
IMHO confirm is totally unneeded option.
goingnuts wrote: If anyone have suggestions for pure X-based apps (not using gtk or Xaw or Motif stuff) for a good text-editor, a "paint"-program, IRC, torrent or others...please tell!
Not a suggestion but found one advanced text-editor named "xcoral", needs Xlibs only. Source is attached. (Note: file is xz archive renamed to gz. This board rejects files which have xz extension).
SUUM CUIQUE.

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#466 Post by goingnuts »

technosaurus: Guess we need multiple select menu and I haven't done any decent for console only. Possible for dialog/Xdialog. Also might need some dynamic change of choices depending on what users choose (limit choices of apps if diet libc chosen as example, but could also be choice of apps within a package - package textutilities have a lot of apps and would be nice if one could choose only some of them). Maybe I am making things too complicated...

nooby:
Your always welcome... I did make versions of pUPnGO with newer kernels (2.6.33.2 from lupo and 2.6.35.7 from snow) and essentially (and by purpose) everything else in pUPnGO except kernel/drivers was the same (only zdrv and initrd holds kernel-dependent stuff).
But its just a building block - and not a lot of people seems to see any advantage in using my approach as a basis for more feature rich systems.

I use P412 kernel because it gives a decent small size and works on old/new hardware. If I could have smaller sized kernel with same functionality using newer kernels I would use them.

PANZERKOPF: Thanks - I will look at that one - using xredit at the moment but...its ugly! Just compiled and did a small test: It nice! Its a "biggie" but you also get C-library lookup as far as I can see - and a lot more. So much functionality using X11/Xau/Xdmcp only.
Update: Compiled well with uclibc+tinyX11 and bin was only 55K larger than the dynamic linked bin. Attached pet holds the static version + all other needed files. Expands to approx. 1300K on disk.
Its really cool. Thanks!
Last edited by goingnuts on Thu 03 Nov 2011, 05:26, edited 1 time in total.

PANZERKOPF
Posts: 282
Joined: Wed 16 Dec 2009, 21:38
Location: Earth

#467 Post by PANZERKOPF »

Small puzzle game.
Smaller than "Hello Word" in C :)
Uses Xlibs but main code is written in pure x86 assembly.
Attachments
puzzle.asm.gz
(7.84 KiB) Downloaded 310 times
SUUM CUIQUE.

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#468 Post by technosaurus »

I got to thinking about adding many apps to the mcbs and the multiple if strcmp ... will start to take some time and add size

I wanted to do a switch case, but you can only do 1 character with it or an integer etc... so I found a way to convert the strings

change this:

Code: Select all

echo 'int  main ( int argc, char** argv ){
#define _(x1,x2,x3,x4)  (((((((x4)<<8)|(x3))<<8)|(x2))<<8)|(x1))
switch ( _(argv[0][0],argv[0][1],argv[0][2],argv[0][3]) ) {' >main.c
and for the applets, just use the first 4 letters as such:

Code: Select all

echo 'case _('j','w','m','\0')	:  return(jwm_main(argc, argv));' >>main.c
since _() is a macro all of the applet names get defined at compile time as a single value instead of an array of characters the only thing that gets checked at runtime is some simple math on arg0 and 1 comparison instead of X

Did I miss anything important?
I know busybox must do something similar because there was a recent post for fixing swapon and swapoff, so need to mention that in comments I guess (its an easy fix with another switch case if we ever get names that close)
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

menu for console only.

#469 Post by L18L »

goingnuts wrote:technosaurus: Guess we need multiple select menu and I haven't done any decent for console only. Possible for dialog/Xdialog. Also might need some dynamic change of choices depending on what users choose (limit choices of apps if diet libc chosen as example, but could also be choice of apps within a package - package textutilities have a lot of apps and would be nice if one could choose only some of them). Maybe I am making things too complicated...
This example of a menu in initrd might be of interest for you?

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#470 Post by goingnuts »

PANZERKOPF: Cute little thing! Reminded me of AsmLibx.

technosaurus: Haven't tried your code yet but looks attractive. Maybe missing the symlink- and instruction part. Below example of my current content in main_new.c (for a single app build):

Code: Select all

#include <stdio.h>
#include <string.h>
int symlink(const char *path1, const char *path2);
char  *basename(char *);

int meh_main(int argc, char ** argv);

int main(int argc, char ** argv) {
if(!strcmp(basename(argv[0]), "mcb_meh") && (argc == 1)) {
	fputs("mcb_meh multicall binary (build 2011-11-09).\n", stdout);
	fputs("Usage: [function] [arguments]...called via symlink to mcb_meh.\n", stdout);
	fputs("Use [mcb_meh --install] to install all the symlinks.\n", stdout);
	fputs("\n", stdout);
	fputs(" Currently defined functions:\n", stdout);
	fputs(" meh\n", stdout);
}

else if(!strcmp(basename(argv[0]), "meh")) {
    return(meh_main(argc, argv));
    }

else if(!strcmp(basename(argv[0]), "mcb_meh") && strcmp(argv[1], "--install") == 0) {
    fputs("Installing symlinks...",stdout);
    
symlink(basename(argv[0]), "meh");
    fputs("done\n",stdout);
    }
    if(argc > 1 && !strcmp(argv[1], "--install") == 0){
    fputs(basename(argv[0]),stdout);
    fputs(": ",stdout);
    fputs(basename(argv[1]),stdout);
	fputs("...function not found.\n",stdout);
    }
    return(0);
}
L18L Thanks for the reference - its was more a multi-choice select function for CLI I meant - like:

(X) I want coffe
(X) I want sugar
( ) I want milk

An idea for the initrd-CLI menu: Include a static build of dialog to get more GUI-like menus - might also be implemented for savefile select?
Attachments
dialog.gz
rename to dialog - upxed static build of dialog-1.1-20071028 - 104K
(103.03 KiB) Downloaded 290 times

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#471 Post by technosaurus »

goingnuts wrote: technosaurus: Haven't tried your code yet but looks attractive. Maybe missing the symlink- and instruction part.
yes that was intentional, I figured that would be best put into a script, but it might be nice to have it list the applets, so the script could be generic.

[ "$JWM" ] && APPLETS="$APPLETS $JWM"

echo 'case _('a','p','p','l') : return(printf("$APPLETS"));' >>main.c

then the script is something like this

Code: Select all

#!/bin/sh
DIR=`dirname $0`
cd $DIR
for $x `applets` ; do ln -s mcb $x; done
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#472 Post by goingnuts »

Attached static builds (uclibc+tinyX11) of Xvesa [560K] and Xfbdev [544K]. Shipped upxed. I have run with the Xvesa for a couple of weeks now and it seems solid and stable. For the Xfbdev you need a kernel with framebuffer support and pass vga=ask or vga=785 to kernel at boot (ex: puppy pfix=ram vga=ask).
Fontpath compiled to "/usr/X11R6/lib/X11/fonts/misc/" and builds contain no build-in fonts. Patched with fix for black background and mouse-scroll.

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#473 Post by goingnuts »

If you would like to exercise the TinyX11-lib your self and compile Xvesa/Xfbdev I have posted the source for above builds and the used uclibc - both as pet-files - here.
Update: Also posted source and build script for additional libs (libjpeg, libpng, giflib, libPropList and libopenssl) as well as a collection of sources for applications that can be build with TinyX11 (9menu-1.8, calctool-2.4.9.orig, NDL , pupslock-0.1, wmix-3.2, asmem-1.9, meh-0.3, pmmon5, wmcpuload-1.0.0 and wmnet-1.05)

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#474 Post by technosaurus »

@goingnuts - excellent work on the new MCBs,

I went through a bunch of X11 text editors and none of them compare with the older (3.x) version of minimum profit with the ncursesw backend -
Amazingly it actually looks better than most X-only editors and will do text highlighting, search/replace, block copy/paste, regular expressions, macros, autoindent... could probably backport spellcheck - v5 just uses the aspell binary
(there is a gtk1 backend too, which ends up being smaller than PDcurses since it uses an Xaw backend)

here is a basic template for defaulttext{editor,viewer}
[ $DISPLAY ] && rxvt -e mp --mouse $@ || mp $@

this could be a preferred method for doing the default* apps, since they could be used in a console only version as well (maybe with a little tweaking of bg & fg colors depending on the mode?) dialog could maybe be Xdialog with a wrapper, but not 100% sure how to get stdout/err back
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#475 Post by goingnuts »

@technosaurus: Thanks!
I would have liked to do a mcb of Xvesa and Xfbdev as they only differs a few Kb libraries but it seems that the main-function in some way detects which libs are included and in which order... :?

I did make a mcb_curses holding dialog/retawq/aumix/htop/mp with a decent size. If any interests in exercising this I can post it here...

I have been messing with building gtk 1.2 on top of tinyX11/uclibc with some success although my fight with libtool has not ended yet. Not being very skilled in gtk its a slow process - and although apps builds fine - some segfaults for unknown reasons. Status is a working Xdialog-2.3.1, gtkedit-0.1 and gtkdiskfree-1.6.5. emelfm-0.9.2 builds but has trouble setting its conf files. Fm-0.2 builds but I haven't found much fun with it as a file manager. Started out trying to build ROX-Filer-1.2.2-12 but cant get tinygdk-pixbuf-0.21.0 running yet - also miss fontconfig and other needed stuff for this.
All the gtk builds ends up 800-1000K in size (as standalone) - but if they could be mcbized I guess one could create a descent collection of must have apps with a total size 1200-1800K.

PANZERKOPF
Posts: 282
Joined: Wed 16 Dec 2009, 21:38
Location: Earth

#476 Post by PANZERKOPF »

goingnuts wrote:and although apps builds fine - some segfaults for unknown reasons.
In my experience, some gtk1 apps crash with segfault when needed fonts (hardcoded) are not present in current system. They work properly after editing sources or making font aliases in current system.
SUUM CUIQUE.

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#477 Post by goingnuts »

PANZERKOPF: Thank you for the hint!
Turns out that emelfm is so convinced that its plugins is present at first run that it does not check if they are - and segfaults. Thats a bug. Fixed in attached build. Plugins wont work in a static build (they are shared objects) but seems to be unneeded as you can use normal function calls instead.

It still have some suicidal behavior if you try to change font to some of the listed types (in pUPnGO). Might be that my approach by having all fonts in one directory is the problem...

Seems to me that gtk-apps are developed in a more mature environment than pUPnGO. Although all dependencies are fulfilled they might fail because of missing "application dependencies". Ex. emelfm needs "file" present to show File Type, free, df and others. And source code do not respond informative if missing...

For file type I found the attached hexd/file-script in mulinux - modified it a bit (source code included below) and its a low resource replacement working for ROX-Filer/emelfm and from console. Guess the file types recognized could be expanded by adding info to the script. Needs dd and the included hexd.

hexd gives you the following additional tools:

Code: Select all

BinToHexText  : show code in hex + ascii.   User can edit the hex code.
HexTextToBin  : translate hex code derived from BinToHexText to binary code.
BinToHexOnly  : show code in hex with no spaces or linefeeds.
BinToTextOnly : show code as text, and dots for what can't print.
PrintText          : called by the text output functions, shows printable chars
Also included in attached archive is the static build of emelfm-0.9.2...(400K upxed)
Update 121211: Removed attachment view for better one...
Last edited by goingnuts on Mon 12 Dec 2011, 20:06, edited 1 time in total.

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#478 Post by goingnuts »

technosaurus: It took me a little time to do the test of gtk version of mp: Its really a nice and tiny replacement for geany!

So included it (gtk only) in the first successful gtk-mcb build: dillo-0.8.6, emelfm-0.9.2, Xdialog-2.3.1 and mp-3.3.13 in one 1644K bin (676K upxed). The included mcb_gtk is "self-configuring" as it will create needed dirs for emelfm/dillo and some rudimentary config files (if you put mcb_gtk in /usr/bin and run command: mcb_gtk --install) but it is shipped with directory structure, symlinks and config-files.

Did a ssl version of dillo also but could not read gmail anyway so removed it again. Have fun with these 4in1 must have gtk1 apps.
b]Update 121211:[/b] Removed attachment view for better one...
Last edited by goingnuts on Mon 12 Dec 2011, 20:06, edited 1 time in total.

PANZERKOPF
Posts: 282
Joined: Wed 16 Dec 2009, 21:38
Location: Earth

#479 Post by PANZERKOPF »

goingnuts wrote:PANZERKOPF: Thank you for the hint!
Seems to me that gtk-apps are developed in a more mature environment than pUPnGO.
Yes, build "oldschool" apps in new environment is sometimes problematic.
For file type I found the attached hexd/file-script in mulinux - modified it a bit (source code included below) and its a low resource replacement working for ROX-Filer/emelfm and from console. Guess the file types recognized could be expanded by adding info to the script. Needs dd and the included hexd.
I guess that busybox hexdump can be used instead of hexd.
SUUM CUIQUE.

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#480 Post by technosaurus »

goingnuts wrote: Did a ssl version of dillo also but could not read gmail anyway so removed it again. Have fun with these 4in1 must have gtk1 apps.
I wonder if it is just a user agent issue... If not, there is sylpheed-1.0.x

I wish Google would commit to an api (not just mail)

With what you have so far, I am guessing we could put together a loaded initramfs in ~3mb or have a kernel image with X built into the kernel image in 4mb.

I can post my older version when I get home Monday, but I finally got it to start aterm devpts had to be mounted and SHELL exported as /bin/sh unless busybox is built with the built-in bash as ash alias. From there the "normal" boot process can happen in an open terminal(s)
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

Post Reply