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 Wed 26 Nov 2014, 03:40
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
busybox extras
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 4 of 5 Posts_count   Goto page: Previous 1, 2, 3, 4, 5 Next
Author Message
musher0


Joined: 04 Jan 2009
Posts: 4339
Location: Gatineau (Qc), Canada

PostPosted: Mon 17 Jun 2013, 08:56    Post_subject: Re: cal
Sub_title: for Karl
 

L18L wrote:
Karl Godt wrote:
2013 06:June 01:watday 02:disday 03:dongsday ...

would be really helpful
Code:
f=/tmp/bla;echo;date "+%Y %m:%B">$f;m=`cat $f`;y=${m:0:4};m=${m:5:2};for i in `seq 31`;do date -d $y-$m-$i "+%d:%A">>$f 2>/dev/null;done;grep -v '-' $f|tr '\n' ' ';echo


Hi, L18L.

Interesting, this "one-liner". With the tr \n removed, it can form the basis of a quick and easy agenda in txt format. (168 bytes rather than 1Mb for osmo!)

Thanks for the hunch.

musher0

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send_private_message Visit_website 
L18L

Joined: 19 Jun 2010
Posts: 2579
Location: www.eussenheim.de/

PostPosted: Tue 18 Jun 2013, 04:24    Post_subject: Re: re: cal for Karl  

technosaurus,
apologies for derailing your thread Embarassed Crying or Very sad
musher0 wrote:
... (168 bytes rather than 1Mb for osmo!)...

Arrow Why osmo and not compare with minixcal Question [edit] size: 8556B [/edit] Wink

Edited_times_total
Back to top
View user's profile Send_private_message 
musher0


Joined: 04 Jan 2009
Posts: 4339
Location: Gatineau (Qc), Canada

PostPosted: Tue 18 Jun 2013, 16:52    Post_subject: Re: re: cal for Karl  

L18L wrote:
technosaurus,
apologies for derailing your thread Embarassed Crying or Very sad
musher0 wrote:
... (168 bytes rather than 1Mb for osmo!)...

Arrow Why osmo and not compare with minixcal Question Wink


L18L,

That's because the comparison with the size of minixcal (8,556Kb) would
not "hit" the imagination as much! Wink (Ouch, someone's imagination was hit!) Smile

musher0

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send_private_message Visit_website 
Ibidem

Joined: 25 May 2010
Posts: 523
Location: State of Jefferson

PostPosted: Wed 19 Jun 2013, 01:18    Post_subject:  

musher0 wrote:
Embarassed (see picture)
Maybe it depends on the locale parameters that you use?
Still, the real cal offers more choices...

The REAL cal does not: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/cal.html
You seem to have fallen for the GNU fallacy that "number of features" == "how good it is".
In reality, there are several factors in determining quality:
(1) Features
a-some features that everyone needs
b-some features that vastly improve things for many people
c-some features that are used once in a while
d-some features that are actively harmful
(2) How stable the implementation is
(3) size of the implementation

Busybox focuses on 2 & 3, implementing the features that are needed rather than "everything that everyone has ever done".
Additionally, Busybox is oriented towards following standards.

In GNU software, I frequently run across options and interfaces that were peculiar to DEC or Sun tools and libraries in the 1990's, perpetuated by GNU's cruft accumulation. I run across behavior that will break a POSIX-conformant script, with a long option like --posix to turn on "conformant" behavior...except that --posix is not specified and is thus neither portable nor conformant.
Look at the output of this on Debian:
Code:

$ { echo 0; { for cmd in `busybox |sed -ne 's/,/\n/gp' |grep -v xz`; do size `command -v $cmd` 2>/dev/null |tail -n 1; done; }|awk '{print  $4 " + "}';echo p; }|busybox dc
12215080

That's TWELVE MEGABYTES even with several applets having no equivalent installed, and I can build a static busybox with that and more in less than one megabyte:
Code:

$ ./busybox; ls -l busybox
BusyBox v1.22.0.git (2013-06-12 22:24:54 PDT) multi-call binary.
BusyBox is copyrighted by many authors between 1998-2012.
Licensed under GPLv2. See source distribution for detailed
copyright notices.

Usage: busybox [function [arguments]...]
   or: busybox --list[-full]
   or: busybox --install [-s] [DIR]
   or: function [arguments]...

        BusyBox is a multi-call binary that combines many common Unix
        utilities into a single executable.  Most people will create a
        link to busybox for each function they wish to use and BusyBox
        will act like whatever it was invoked as.

Currently defined functions:
        [, [[, acpid, add-shell, addgroup, adduser, adjtimex, ar, arp, ash,
        awk, base64, basename, bash, bbconfig, beep, blkid, blockdev,
        bootchartd, brctl, bunzip2, bzcat, bzip2, cal, cat, catv, chat, chattr,
        chgrp, chmod, chown, chpasswd, chpst, chroot, chrt, chvt, cksum, clear,
        cmp, comm, conspy, cp, cpio, crond, crontab, cryptpw, cttyhack, cut,
        date, dc, dd, deallocvt, delgroup, deluser, depmod, devmem, df,
        dhcprelay, diff, dirname, dmesg, dnsd, dnsdomainname, dos2unix, dpkg,
        dpkg-deb, du, dumpkmap, dumpleases, echo, ed, egrep, eject, env,
        envdir, envuidgid, expand, expr, fakeidentd, false, fbset, fbsplash,
        fbvnc, fdflush, fdformat, fdisk, fgconsole, fgrep, find, findfs,
        flash_eraseall, flash_lock, flash_unlock, flashcp, flock, fold, free,
        freeramdisk, fsck, fsck.minix, fsync, ftpd, ftpget, ftpput, fuser,
        getopt, getty, grep, groups, guess_fs, gunzip, gzip, halt, hd, hdparm,
        head, hexdump, hostid, hostname, httpd, hush, hwclock, id, ifconfig,
        ifdown, ifenslave, ifplugd, ifup, inetd, init, inotifyd, insmod,
        install, ionice, iostat, ip, ipaddr, ipcalc, ipcrm, ipcs, iplink,
        iproute, iprule, iptunnel, kbd_mode, kill, killall, killall5, klogd,
        less, linux32, linux64, linuxrc, ln, loadfont, loadkmap, logger, login,
        logname, logread, losetup, lpd, lpq, lpr, ls, lsattr, lsmod, lsof,
        lspci, lsusb, lzcat, lzma, lzop, lzopcat, makedevs, makemime, man,
        md5sum, mdev, mesg, microcom, mkdir, mkdosfs, mke2fs, mkfifo,
        mkfs.ext2, mkfs.minix, mkfs.reiser, mkfs.vfat, mknod, mkpasswd, mkswap,
        mktemp, modinfo, modprobe, more, mount, mountpoint, mpstat, msh, mv,
        nameif, nanddump, nandwrite, nbd-client, nc, netstat, nice, nmeter,
        nohup, nroff, nslookup, ntpd, od, openvt, passwd, patch, pgrep, pidof,
        ping, ping6, pipe_progress, pivot_root, pkill, pmap, popmaildir,
        poweroff, powertop, printenv, printf, ps, pscan, pstree, pwd, pwdx,
        raidautorun, rdate, rdev, readahead, readlink, readprofile, realpath,
        reboot, reformime, remove-shell, renice, reset, resize, rev, rfkill,
        rm, rmdir, rmmod, route, rpm, rpm2cpio, rtcwake, run-parts, runsv,
        runsvdir, rx, script, scriptreplay, sed, sendmail, seq, setarch,
        setconsole, setfont, setkeycodes, setlogcons, setserial, setsid,
        setuidgid, sh, sha1sum, sha256sum, sha3sum, sha512sum, showkey,
        slattach, sleep, smemcap, softlimit, sort, split, start-stop-daemon,
        stat, strings, stty, su, sulogin, sum, sv, svlogd, swapoff, swapon,
        switch_root, sync, sysctl, syslogd, tac, tail, tar, tcpsvd, tee,
        telnet, telnetd, test, tftp, tftpd, time, timeout, top, touch, tr,
        traceroute, traceroute6, true, tty, ttysize, tunctl, tune2fs,
        ubiattach, ubidetach, ubimkvol, ubirmvol, ubirsvol, ubiupdatevol,
        udhcpc, udhcpc6, udhcpd, udpsvd, umount, uname, uncompress, unexpand,
        uniq, unix2dos, unlzma, unlzop, unxz, unzip, uptime, usleep, uudecode,
        uuencode, vconfig, vi, vlock, volname, watch, watchdog, wc, wget,
        which, whoami, whois, xargs, xz, xzcat, yes, zcat, zcip

-rwxr-xr-x 1 ibid ibid 947304 Jun 12 23:01 busybox


...OK, sorry for the rant.
Back to top
View user's profile Send_private_message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3972
Location: Kiel,Germany

PostPosted: Wed 19 Jun 2013, 05:29    Post_subject:  

Quote:
, and I can build a static busybox with that and more in less than one megabyte:

http://busybox.net/downloads/busybox-snapshot.tar.bz2
Without pam and dmalloc mine is
bash-3.00# ls -l ./busybox
-rwxr-xr-x 1 root root 1939492 2013-06-19 11:28 ./busybox
the double size .
Upx'd would be 50% ~ 1MB estimated .

Use full modutils , disabled pretty output for lsmod and dmesg .

Had o switch the header directory /usr/include from the current upgraded one to the Puppy-4 kernel 2.6.30.5 /usr/include for
miscutils/adjtimex.c: In function ‘adjtimex_main’:
miscutils/adjtimex.c:92: Fehler: ‘ADJ_OFFSET_SINGLESHOT’ undeclared (first use in this function)

then switch back to the current for
miscutils/rfkill.c:23:26: error: linux/rfkill.h: No such file or directory

and finally switch to Lupu-5.1.1 /usr/include for
miscutils/ubi_tools.c:67:26: error: mtd/ubi-user.h: No such file or directory

.
Back to top
View user's profile Send_private_message Visit_website 
Ibidem

Joined: 25 May 2010
Posts: 523
Location: State of Jefferson

PostPosted: Wed 19 Jun 2013, 14:27    Post_subject:  

Karl Godt wrote:
Quote:
, and I can build a static busybox with that and more in less than one megabyte:

http://busybox.net/downloads/busybox-snapshot.tar.bz2
Without pam and dmalloc mine is
bash-3.00# ls -l ./busybox
-rwxr-xr-x 1 root root 1939492 2013-06-19 11:28 ./busybox
the double size .
Upx'd would be 50% ~ 1MB estimated .

Use full modutils , disabled pretty output for lsmod and dmesg .

Had o switch the header directory /usr/include from the current upgraded one to the Puppy-4 kernel 2.6.30.5 /usr/include for
miscutils/adjtimex.c: In function ‘adjtimex_main’:
miscutils/adjtimex.c:92: Fehler: ‘ADJ_OFFSET_SINGLESHOT’ undeclared (first use in this function)

then switch back to the current for
miscutils/rfkill.c:23:26: error: linux/rfkill.h: No such file or directory

and finally switch to Lupu-5.1.1 /usr/include for
miscutils/ubi_tools.c:67:26: error: mtd/ubi-user.h: No such file or directory

.

I'm using musl from git as libc--I use
Code:
make CC=/path/to/musl-gcc CFLAGS="-static -Os -D_ALL_SOURCE"
and have applied a couple patches to both musl and busybox, including some new applets. I disabled utmp support.

The busybox source I use is in https://github.com/idunham/busybox (branch enh), and the musl I used is in https://github.com/idunham/musl (branch g_hack). I configured musl with CFLAGS=-Os.
What I've disabled:
Code:
# CONFIG_EXTRA_COMPAT is not set
# CONFIG_USE_PORTABLE_CODE is not set
# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set
# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set
# CONFIG_INSTALL_NO_USR is not set
# CONFIG_LOCALE_SUPPORT is not set
# CONFIG_UNICODE_USING_LOCALE is not set
# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set
# CONFIG_UNICODE_BIDI_SUPPORT is not set
# CONFIG_UNICODE_NEUTRAL_TABLE is not set
# CONFIG_FEATURE_CLEAN_UP is not set
# CONFIG_FEATURE_UTMP is not set
# CONFIG_FEATURE_WTMP is not set
# CONFIG_SELINUX is not set
# CONFIG_FEATURE_HAVE_RPC is not set
# CONFIG_PIE is not set
# CONFIG_NOMMU is not set
# CONFIG_BUILD_LIBBUSYBOX is not set
# CONFIG_FEATURE_INDIVIDUAL is not set
# CONFIG_FEATURE_SHARED_BUSYBOX is not set
# CONFIG_DEBUG is not set
# CONFIG_DEBUG_PESSIMIZE is not set
# CONFIG_WERROR is not set
# CONFIG_DMALLOC is not set
# CONFIG_EFENCE is not set
# CONFIG_INSTALL_APPLET_HARDLINKS is not set
# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set
# CONFIG_INSTALL_APPLET_DONT is not set
# CONFIG_INSTALL_SH_APPLET_SYMLINK is not set
# CONFIG_INSTALL_SH_APPLET_HARDLINK is not set
# CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER is not set
# CONFIG_FEATURE_SYSTEMD is not set
# CONFIG_FEATURE_HWIB is not set
# CONFIG_FEATURE_TAR_SELINUX is not set
# CONFIG_WHO is not set
# CONFIG_USERS is not set
# CONFIG_FEATURE_VI_REGEX_SEARCH is not set
# CONFIG_FEATURE_FIND_CONTEXT is not set
# CONFIG_FEATURE_CALL_TELINIT is not set
# CONFIG_PAM is not set
# CONFIG_MODPROBE_SMALL is not set
# CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE is not set
# CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED is not set
# CONFIG_FEATURE_2_4_MODULES is not set
# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set
# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set
# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set
# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set
# CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set
# CONFIG_FDISK_SUPPORT_LARGE_DISKS is not set
# CONFIG_FEATURE_MOUNT_NFS is not set
# CONFIG_DEVFSD is not set
# CONFIG_DEVFSD_MODLOAD is not set
# CONFIG_DEVFSD_FG_NP is not set
# CONFIG_DEVFSD_VERBOSE is not set
# CONFIG_LAST is not set
# CONFIG_FEATURE_LAST_SMALL is not set
# CONFIG_FEATURE_LAST_FANCY is not set
# CONFIG_FEATURE_MAKEDEVS_LEAF is not set
# CONFIG_MT is not set
# CONFIG_RUNLEVEL is not set
# CONFIG_TASKSET is not set
# CONFIG_FEATURE_TASKSET_FANCY is not set
# CONFIG_WALL is not set
# CONFIG_NC_110_COMPAT is not set
# CONFIG_ARPING is not set
# CONFIG_ETHER_WAKE is not set
# CONFIG_FEATURE_IFUPDOWN_IP is not set
# CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN is not set
# CONFIG_FEATURE_INETD_RPC is not set
# CONFIG_FEATURE_UPTIME_UTMP_SUPPORT is not set
# CONFIG_FEATURE_PS_WIDE is not set
# CONFIG_FEATURE_PS_LONG is not set
# CONFIG_CHCON is not set
# CONFIG_FEATURE_CHCON_LONG_OPTIONS is not set
# CONFIG_GETENFORCE is not set
# CONFIG_GETSEBOOL is not set
# CONFIG_LOAD_POLICY is not set
# CONFIG_MATCHPATHCON is not set
# CONFIG_RESTORECON is not set
# CONFIG_RUNCON is not set
# CONFIG_FEATURE_RUNCON_LONG_OPTIONS is not set
# CONFIG_SELINUXENABLED is not set
# CONFIG_SETENFORCE is not set
# CONFIG_SETFILES is not set
# CONFIG_FEATURE_SETFILES_CHECK_OPTION is not set
# CONFIG_SETSEBOOL is not set
# CONFIG_SESTATUS is not set
# CONFIG_ASH_IDLE_TIMEOUT is not set
# CONFIG_ASH_MAIL is not set
# CONFIG_FEATURE_SH_IS_HUSH is not set
# CONFIG_FEATURE_SH_IS_NONE is not set
# CONFIG_FEATURE_BASH_IS_HUSH is not set
# CONFIG_FEATURE_BASH_IS_NONE is not set

Disabling hush/msh would save a bit more.
Back to top
View user's profile Send_private_message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3972
Location: Kiel,Germany

PostPosted: Wed 19 Jun 2013, 15:25    Post_subject:  

Code:
bash-3.00# diff -up bb-config-ibidem bb-config-krg |grep -E '^\+|^\-'
--- bb-config-ibidem   2013-06-19 21:18:35.000000000 -0100
+++ bb-config-krg   2013-06-19 21:20:05.000000000 -0100
-# CONFIG_EXTRA_COMPAT is not set
-# CONFIG_INSTALL_NO_USR is not set
-# CONFIG_LOCALE_SUPPORT is not set
-# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set
-# CONFIG_UNICODE_BIDI_SUPPORT is not set
-# CONFIG_UNICODE_NEUTRAL_TABLE is not set
-# CONFIG_FEATURE_CLEAN_UP is not set
-# CONFIG_FEATURE_UTMP is not set
-# CONFIG_FEATURE_WTMP is not set
+# CONFIG_FEATURE_SUID_CONFIG_QUIET is not set
-# CONFIG_FEATURE_HAVE_RPC is not set
-# CONFIG_DEBUG is not set
-# CONFIG_DEBUG_PESSIMIZE is not set
-# CONFIG_FEATURE_SYSTEMD is not set
-# CONFIG_FEATURE_HWIB is not set
+# CONFIG_FEATURE_USERNAME_COMPLETION is not set
+# CONFIG_FEATURE_EDITING_ASK_TERMINAL is not set
+# CONFIG_FEATURE_SKIP_ROOTFS is not set
+# CONFIG_MONOTONIC_SYSCALL is not set
+# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set
-# CONFIG_WHO is not set
-# CONFIG_USERS is not set
-# CONFIG_FEATURE_VI_REGEX_SEARCH is not set
+# CONFIG_UNCOMPRESS is not set
+# CONFIG_LZMA is not set
+# CONFIG_XZ is not set
+# CONFIG_FEATURE_DATE_NANO is not set
+# CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT is not set
+# CONFIG_FEATURE_BLKID_TYPE is not set
+# CONFIG_FEATURE_DMESG_PRETTY is not set
+# CONFIG_FEATURE_SGI_LABEL is not set
+# CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set
-# CONFIG_DEVFSD is not set
-# CONFIG_DEVFSD_MODLOAD is not set
-# CONFIG_DEVFSD_FG_NP is not set
-# CONFIG_DEVFSD_VERBOSE is not set
-# CONFIG_LAST is not set
+# CONFIG_FEATURE_VOLUMEID_SQUASHFS is not set
+# CONFIG_INOTIFYD is not set
-# CONFIG_FEATURE_LAST_FANCY is not set
-# CONFIG_FEATURE_MAKEDEVS_LEAF is not set
-# CONFIG_MT is not set
-# CONFIG_RUNLEVEL is not set
-# CONFIG_TASKSET is not set
-# CONFIG_FEATURE_TASKSET_FANCY is not set
-# CONFIG_WALL is not set
-# CONFIG_NC_110_COMPAT is not set
-# CONFIG_ARPING is not set
-# CONFIG_ETHER_WAKE is not set
-# CONFIG_FEATURE_IFUPDOWN_IP is not set
-# CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN is not set
-# CONFIG_FEATURE_INETD_RPC is not set
-# CONFIG_FEATURE_UPTIME_UTMP_SUPPORT is not set
+# CONFIG_FEATURE_MAKEDEVS_TABLE is not set
+# CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN is not set
+# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set
+# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set
+# CONFIG_FEATURE_RUNSVDIR_LOG is not set
-# CONFIG_ASH_IDLE_TIMEOUT is not set
+# CONFIG_ASH_OPTIMIZE_FOR_SIZE is not set
+# CONFIG_FEATURE_BASH_IS_ASH is not set
-# CONFIG_FEATURE_BASH_IS_NONE is not set
+# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set
bash-3.00#

Next time wil have to check CONFIG_FEATURE_BLKID_TYPE is enabled
which will set FEATURE_VOLUMEID_SQUASHFS ( Depends on: VOLUMEID && FEATURE_BLKID_TYPE )
Embarassed
Back to top
View user's profile Send_private_message Visit_website 
Karl Godt


Joined: 20 Jun 2010
Posts: 3972
Location: Kiel,Germany

PostPosted: Thu 20 Jun 2013, 02:29    Post_subject:  

# pwd
/usr/musl/include
# find -type l
./rpc
./asm-generic
./asm
./regex.h
./sys/cdefs.h
./sched.h
./bits/wordsize.h
./bits/sockaddr.h
./bits/types.h
./bits/typesizes.h
./bits/sched.h
./sched.h-normal
./asm-x86
./mtd
./net/if_slip.h
./net/if_packet.h
./linux
#

Had some problems with musl . less compiled without options and inetd without rpc at the end .
But regex.h is problematic . Used the regular regex.h but final link failed . grep without -E is unusable for me :

findutils/lib.a(grep.o): In function `grep_file':
grep.c: (.text+0x24b): undefined reference to `re_compile_pattern'

Size without vi(also regex.h) and grep : 976KB .

But since no one will ever revive P-I 100MHz 64MB-Ram boards , probably 2MB static Busybox still is very nice and less troublesome than musl's 1MB at it's current state .
Back to top
View user's profile Send_private_message Visit_website 
Ibidem

Joined: 25 May 2010
Posts: 523
Location: State of Jefferson

PostPosted: Fri 21 Jun 2013, 11:13    Post_subject:  

Karl Godt wrote:
# pwd
/usr/musl/include
# find -type l
./rpc
./asm-generic
./asm
./regex.h
./sys/cdefs.h
./sched.h
./bits/wordsize.h
./bits/sockaddr.h
./bits/types.h
./bits/typesizes.h
./bits/sched.h
./sched.h-normal
./asm-x86
./mtd
./net/if_slip.h
./net/if_packet.h
./linux
#

Had some problems with musl . less compiled without options and inetd without rpc at the end .
But regex.h is problematic . Used the regular regex.h but final link failed . grep without -E is unusable for me :

findutils/lib.a(grep.o): In function `grep_file':
grep.c: (.text+0x24b): undefined reference to `re_compile_pattern'

Size without vi(also regex.h) and grep : 976KB .

But since no one will ever revive P-I 100MHz 64MB-Ram boards , probably 2MB static Busybox still is very nice and less troublesome than musl's 1MB at it's current state .


Use musl regex.h, but make sure you turn off vi regex support and CONFIG_EXTRA_COMPAT (these need glibc extensions). There is a reason that I disabled those.
Also disable anything RPC related.

grep -E does work.
Also, be sure to use the branches specified! There are a couple small incompatibility issues in mainline musl/busybox at present.
Back to top
View user's profile Send_private_message 
technosaurus


Joined: 18 May 2008
Posts: 4379

PostPosted: Fri 21 Jun 2013, 19:17    Post_subject:  

With only disabling the features not supported by musl and puppy 's kernel, my builds are less than 1mb. If you are getting close to 2mb, its probably using the static. gnu libc.

I would recommend disabling hush also, because it mishandles path/*/file (pretty commonly used)

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


Joined: 20 Jun 2010
Posts: 3972
Location: Kiel,Germany

PostPosted: Fri 21 Jun 2013, 21:07    Post_subject:  

Quote:
Use musl regex.h, but make sure you turn off vi regex support and CONFIG_EXTRA_COMPAT (these need glibc extensions). There is a reason that I disabled those.
Also disable anything RPC related.

Did that, compiled fine .

Quote:
Also, be sure to use the branches specified! There are a couple small incompatibility issues in mainline musl/busybox at present.

Tar.bz2 with Binary(without Links) and .config inkluded :
https://docs.google.com/file/d/0B7Meqrmt7a3GbTBDVGtFaEhManc/edit?usp=sharing
Back to top
View user's profile Send_private_message Visit_website 
musher0


Joined: 04 Jan 2009
Posts: 4339
Location: Gatineau (Qc), Canada

PostPosted: Sat 22 Jun 2013, 04:51    Post_subject:  

Ibidem wrote:
musher0 wrote:
Embarassed (see picture)
Maybe it depends on the locale parameters that you use?
Still, the real cal offers more choices...

The REAL cal does not: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/cal.html
You seem to have fallen for the GNU fallacy that "number of features" == "how good it is".
In reality, there are several factors in determining quality:
(1) Features
a-some features that everyone needs
b-some features that vastly improve things for many people
c-some features that are used once in a while
d-some features that are actively harmful
(2) How stable the implementation is
(3) size of the implementation

Busybox focuses on 2 & 3, implementing the features that are needed rather than "everything that everyone has ever done".
Additionally, Busybox is oriented towards following standards.
(..)


Hello, Ibidem.

I frankly don't care if the call with more features is pure or not.
What is obvious from your intervention above is that you value
the quality of the implementation over usefulness for the user.

I am too much of a novice in programming to argue with you on
the technical level: you'd probably play with my code like a chef
with a pancake.

So I'll stick to attitude:
I value quality too, but I hope to never go as far as to turn a "pure"
implementation into a complication, and at times a nuisance, for the user.

You certainly have the right to seek quality and compactness, even to edit
GNU-utils until the cows come home. However, I feel it is then your moral
duty to inform the user w-i-d-e-l-y, in as many forums as possible, in
magazine articles, webzines, blogs, whatever, that some and at times
most functions of utility x were lost in its compaction into busybox.

You can't pass a Coke for a Pepsi, and vice versa. I wish someone on this
forum would have told me the true nature of busybox: it would have
saved me days of research on the Internet for the more complete
utilities i needed -- as well as a feeling of having been duped.

Let's leave it at that.

Regards.

musher0

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)

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

Joined: 25 May 2010
Posts: 523
Location: State of Jefferson

PostPosted: Sat 22 Jun 2013, 12:26    Post_subject:  

@Karl: fyi, the "bbconfig" applet just prints out the .config, so that isn't completely needed.
And if you happen to have xz, that will squeeze a little more size out, decompress faster, and take less ram to decompress than bzip2.

@technosaurus: I'm interested in seeing what your configuration is...what I posted was the output of
Code:
bbconfig |grep '^#'
(all disabled settings), because I have so much enabled.
I disabled UTMP/WTMP because those are stubs in musl (Rich Felker joked about a modern implementation of utmp posting your logins to Foursquare).
I suspect they're also not needed in standard Puppy.
A few applets need trivial changes to the includes, and some need musl to provide ethers.h; the patch that will enable that is still pending, so I merged it in g_hack.

@musher0:
OK, fair. But I vastly prefer busybox, partly because of the reduced size, partly for saner limits on functionality.
Back to top
View user's profile Send_private_message 
jamesbond

Joined: 26 Feb 2007
Posts: 2230
Location: The Blue Marble

PostPosted: Sat 22 Jun 2013, 13:52    Post_subject:  

musher0 wrote:
You can't pass a Coke for a Pepsi, and vice versa. I wish someone on this
forum would have told me the true nature of busybox: it would have
saved me days of research on the Internet for the more complete
utilities i needed -- as well as a feeling of having been duped.


From busybox official homepage http://busybox.net/about.html
About Busybox wrote:
BusyBox combines tiny versions of many common UNIX utilities into a single small executable. It provides replacements for most of the utilities you usually find in GNU fileutils, shellutils, etc. The utilities in BusyBox generally have fewer options than their full-featured GNU cousins; however, the options that are included provide the expected functionality and behave very much like their GNU counterparts. BusyBox provides a fairly complete environment for any small or embedded system.

BusyBox has been written with size-optimization and limited resources in mind. It is also extremely modular so you can easily include or exclude commands (or features) at compile time. This makes it easy to customize your embedded systems. To create a working system, just add some device nodes in /dev, a few configuration files in /etc, and a Linux kernel.
(emphasis is mine). And it has been like that from day one. The reason why Puppy uses busybox is because of that small size. Puppy only uses the full GNU utilities when it is absolutely necessary. That's one of the reason why Puppy stays small when other distro grows by leaps and bounds.

@Karl: My 64-bit static compile of busybox (using uclibc) is about 1.2MB with almost all applets enabled (except the runit tools). 64-bit compile is usually 20% larger than 32-bit compile. bbconfig attached.
bbconfig.gz
Description 
gz

 Download 
Filename  bbconfig.gz 
Filesize  5.51 KB 
Downloaded  241 Time(s) 

_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread
Back to top
View user's profile Send_private_message 
Ibidem

Joined: 25 May 2010
Posts: 523
Location: State of Jefferson

PostPosted: Sat 22 Jun 2013, 15:04    Post_subject:  

jamesbond wrote:


@Karl: My 64-bit static compile of busybox (using uclibc) is about 1.2MB with almost all applets enabled (except the runit tools). 64-bit compile is usually 20% larger than 32-bit compile. bbconfig attached.


Looking through your config, I see a few things I'm curious about...
Try setting CONFIG_FEATURE_COMPRESS_USAGE; it compresses the usage messages, which can be a significant gain.
I think you could disable CONFIG_FEATURE_HAVE_RPC, since only inetd cares; but it doesn't change much of anything.
While rpm2cpio is useful, you might want to disable rpm.
Why set CONFIG_FEATURE_OSF_LABEL?
I don't know about others, but I use XFS.
I doubt many Puppy users need CONFIG_MT; it's for controlling magnetic tape drives.
While I haven't done so yet, you may wish to disable CONFIG_HUSH; it's a second shell, and it's more minimal than ash.
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 4 of 5 Posts_count   Goto page: Previous 1, 2, 3, 4, 5 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Off-Topic Area » Programming
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.1546s ][ Queries: 12 (0.0097s) ][ GZIP on ]