tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: BeastieBox, a (Net)BSD BusyBox-like



On Mon, 8 Dec 2008, iMil wrote:

        I think your best result might be improving -DSMALL for some of
        the binaries from rescue, but for a few pulling in other sources.
        Of course any -DSMALL work helps almost everyone using NetBSD
        in embedded work and even people trying to fit install binaries
        on small media or memory systems :)

That's absolutely what I have in mind, I only choose other sources when there's no other choice, at this time 99% of my work is 4.0 based and from what I've seen I feel like it wouldn't change that much using 5.0.
[..]
Right, I had one old binary left, my bad, correct result is 3.4M... which is far too high considering that devices like Linksys WRT54G, Fonera and friends have around 4MB of flash memory.

        Thats not entirely a fair metric:

        - My 4.4MB /rescue gzips down to 2.2MB, which means vndcompress(1)
          could be a real win

        - /rescue is intended for recovering a broken system, so many
          binaries could be dropped for an embedded one. From the start of
          "ls /rescue | xargs which | xargs ls -s | sort -rn"
            184 /bin/ksh
            136 /usr/bin/kdump
            134 /usr/bin/ktruss
            126 /bin/csh
            122 /sbin/fsdb
            100 /sbin/fsck_lfs
          would just save 800K+ and even leaves in tetris! :)

        - None of the numbers I've quoted above were with -DSMALL, plus
          Thor's previous comments about making -DSMALL work for libc and
          others could gain a lot

        My gut feeling would be tuning the set of binaries and some
        work with -DSMALL could get your 3.4MB down to 2.5MB, and
        vndcompress(1) could get that down to 1.25MB. Granted, thats
        not as good as BusyBox, but thats all before you have to go
        outside the NetBSD source tree :)

        I think BeastieBox could end up being very interesting..
        good luck and have fun :)

--
                David/absolute       -- www.NetBSD.org: No hype required --


Home | Main Index | Thread Index | Old Index