* Re: Re: [gentoo-dev] Gentoo Embedded
@ 2003-10-28 23:03 jtoyota
2003-10-28 23:38 ` Dejan Nikic
0 siblings, 1 reply; 9+ messages in thread
From: jtoyota @ 2003-10-28 23:03 UTC (permalink / raw
To: gentoo-dev
ok i'm new to both linux and gentoo. so plz don't flame me. yet, in order to get rid of gcc and portage why not compile or write a self-compile/extract thing-a-ma-jig (pre-build) the packages desired. does this defeat your goal?
-josh
============================================================
From: Vano D <gentoo-dev@europeansoftware.com>
Date: 2003/10/28 Tue AM 11:24:12 EST
To: gentoo-dev@gentoo.org
Subject: Re: [gentoo-dev] Gentoo Embedded
On Tue, 2003-10-28 at 10:10, Paul de Vrieze wrote:
> You could bind mount the portage tree into the root system (of course
> updates will be out of the question). After you're done unmerge portage
> and it works.
[Still not used to the reply-to. Now off to the list. Paul already has a
copy of my email before anyone else (lucky you ;)]
This is very interesting. Such a simple idea. Anyhow I have also been
looking at ways to get rid of portage/gcc/dev tools out of Gentoo. But
my goal has been to clean the system of dev tools and thus portage
(since it would be useless without dev tools) so as to create server
installations. (Although I also have had a side interest in getting a
knoppix-like system built solely out of gentoo.)
I wonder if it would be possible to somehow remotely "mount" the rest of
the stuff such as gcc/python etc.. as with portage. So this way the
system would be completely clean and when it needs to be updated a
script would mount/link the tools from a remote system and after its
done upgrading it would unlink and we are left with a lean clean system.
Any thoughts on this?
PD. I already have attempted at removing gcc and whatnot from Gentoo but
have ended up with a nonbootable system. I would really appreciate if
anyone who has had success in doing this would shed some light and give
some tips.
Cheers,
Vano.
--
Vano D <gentoo-dev@europeansoftware.com>
--
gentoo-dev@gentoo.org mailing list
============================================================
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Re: [gentoo-dev] Gentoo Embedded
2003-10-28 23:03 Re: [gentoo-dev] Gentoo Embedded jtoyota
@ 2003-10-28 23:38 ` Dejan Nikic
2003-10-29 0:01 ` [gentoo-dev] 'submerge' was " david
0 siblings, 1 reply; 9+ messages in thread
From: Dejan Nikic @ 2003-10-28 23:38 UTC (permalink / raw
To: jtoyota; +Cc: gentoo-dev
well the thing is that you don't want to remove gcc, only portage some
unused libs (i doubt their any with default Gentoo install) and probably
all those man and doc files. There should be ways to statically link
everything, but that might be some work.
I got a 200mb install now, that I will hackaway at and try to get it
bellow 50mb hopefully I'm thinking of maybe writing something that will
use an existing gentoo install and use gentoo's portage and stuff to build
an LFS-like (Linux from scratch) image.
On Tue, 28 Oct 2003 jtoyota@bellsouth.net wrote:
> ok i'm new to both linux and gentoo. so plz don't flame me. yet, in order to get rid of gcc and portage why not compile or write a self-compile/extract thing-a-ma-jig (pre-build) the packages desired. does this defeat your goal?
>
> -josh
> ============================================================
> From: Vano D <gentoo-dev@europeansoftware.com>
> Date: 2003/10/28 Tue AM 11:24:12 EST
> To: gentoo-dev@gentoo.org
> Subject: Re: [gentoo-dev] Gentoo Embedded
>
> On Tue, 2003-10-28 at 10:10, Paul de Vrieze wrote:
> > You could bind mount the portage tree into the root system (of course
> > updates will be out of the question). After you're done unmerge portage
> > and it works.
>
> [Still not used to the reply-to. Now off to the list. Paul already has a
> copy of my email before anyone else (lucky you ;)]
>
> This is very interesting. Such a simple idea. Anyhow I have also been
> looking at ways to get rid of portage/gcc/dev tools out of Gentoo. But
> my goal has been to clean the system of dev tools and thus portage
> (since it would be useless without dev tools) so as to create server
> installations. (Although I also have had a side interest in getting a
> knoppix-like system built solely out of gentoo.)
>
> I wonder if it would be possible to somehow remotely "mount" the rest of
> the stuff such as gcc/python etc.. as with portage. So this way the
> system would be completely clean and when it needs to be updated a
> script would mount/link the tools from a remote system and after its
> done upgrading it would unlink and we are left with a lean clean system.
>
> Any thoughts on this?
>
> PD. I already have attempted at removing gcc and whatnot from Gentoo but
> have ended up with a nonbootable system. I would really appreciate if
> anyone who has had success in doing this would shed some light and give
> some tips.
>
> Cheers,
>
> Vano.
>
> --
> Vano D <gentoo-dev@europeansoftware.com>
>
>
>
> --
> gentoo-dev@gentoo.org mailing list
>
> ============================================================
>
>
>
> --
> gentoo-dev@gentoo.org mailing list
>
>
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 9+ messages in thread
* [gentoo-dev] 'submerge' was Re: Re: [gentoo-dev] Gentoo Embedded
2003-10-28 23:38 ` Dejan Nikic
@ 2003-10-29 0:01 ` david
2003-10-29 19:46 ` Ned Ludd
2003-10-31 7:07 ` luke
0 siblings, 2 replies; 9+ messages in thread
From: david @ 2003-10-29 0:01 UTC (permalink / raw
To: Dejan Nikic; +Cc: jtoyota, gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1107 bytes --]
On Tue, Oct 28, 2003 at 03:38:42PM -0800, Dejan Nikic wrote:
> well the thing is that you don't want to remove gcc, only portage some
> unused libs (i doubt their any with default Gentoo install) and probably
> all those man and doc files. There should be ways to statically link
> everything, but that might be some work.
>
> I got a 200mb install now, that I will hackaway at and try to get it
> bellow 50mb hopefully I'm thinking of maybe writing something that will
> use an existing gentoo install and use gentoo's portage and stuff to build
> an LFS-like (Linux from scratch) image.
>
Turns out I had a lot of extra time at work today... ;-)
well here is submerge. It is about 150 lines of bash and nothing very special.
submerge takes a couple of configuration parameters in a file to run.
I've attached it plus a sample config file. There are a couple extra
features I have in mind for it... and I'm open to suggestions and code
;-)
like I said before, a basic system can be done with:
sys-kernel/linux-headers
glibc
=busybox-0.60.5-r1
=gawk-3.1.2-r3
=baselayout-1.8.6.8-r1
tinylogin
Dave
[-- Attachment #2: submerge.sh --]
[-- Type: application/x-sh, Size: 4671 bytes --]
[-- Attachment #3: build_config --]
[-- Type: text/plain, Size: 222 bytes --]
ROOT_DIR=/tmp/rootme
MOUNT_DIR=/mnt/root_fs
FS_NAME=/tmp/root_fs
FS_TYPE=ext3
STRIP="/bin /sbin /usr/sbin /usr/lib /lib"
E_OPTS="--nodeps -q -k"
GCC_CONFIG="/usr/bin/gcc-config"
export USE="+static"
export LINKS="yes"
[-- Attachment #4: Type: text/plain, Size: 37 bytes --]
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] 'submerge' was Re: Re: [gentoo-dev] Gentoo Embedded
2003-10-29 0:01 ` [gentoo-dev] 'submerge' was " david
@ 2003-10-29 19:46 ` Ned Ludd
2003-10-31 7:07 ` luke
1 sibling, 0 replies; 9+ messages in thread
From: Ned Ludd @ 2003-10-29 19:46 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1671 bytes --]
To achieve a larger number of packages getting linked as static you
could append LDFLAGS="-static" in your make.conf.
This will work on alot of ebuilds that don't support static in the IUSE,
but this option must be used with care.
On Tue, 2003-10-28 at 19:01, david@futuretel.com wrote:
> On Tue, Oct 28, 2003 at 03:38:42PM -0800, Dejan Nikic wrote:
> > well the thing is that you don't want to remove gcc, only portage some
> > unused libs (i doubt their any with default Gentoo install) and probably
> > all those man and doc files. There should be ways to statically link
> > everything, but that might be some work.
> >
> > I got a 200mb install now, that I will hackaway at and try to get it
> > bellow 50mb hopefully I'm thinking of maybe writing something that will
> > use an existing gentoo install and use gentoo's portage and stuff to build
> > an LFS-like (Linux from scratch) image.
> >
>
> Turns out I had a lot of extra time at work today... ;-)
> well here is submerge. It is about 150 lines of bash and nothing very special.
> submerge takes a couple of configuration parameters in a file to run.
>
> I've attached it plus a sample config file. There are a couple extra
> features I have in mind for it... and I'm open to suggestions and code
> ;-)
>
> like I said before, a basic system can be done with:
>
> sys-kernel/linux-headers
> glibc
> =busybox-0.60.5-r1
> =gawk-3.1.2-r3
> =baselayout-1.8.6.8-r1
> tinylogin
>
> Dave
>
> ______________________________________________________________________
> --
> gentoo-dev@gentoo.org mailing list
--
Ned Ludd <solar@gentoo.org>
Gentoo Linux Developer
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 307 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] 'submerge' was Re: Re: [gentoo-dev] Gentoo Embedded
2003-10-29 0:01 ` [gentoo-dev] 'submerge' was " david
2003-10-29 19:46 ` Ned Ludd
@ 2003-10-31 7:07 ` luke
2003-10-31 8:53 ` luke
2003-10-31 19:47 ` david
1 sibling, 2 replies; 9+ messages in thread
From: luke @ 2003-10-31 7:07 UTC (permalink / raw
To: david; +Cc: Dejan Nikic, jtoyota, gentoo-dev
On Tue, Oct 28, 2003 at 04:01:55PM -0800, david@futuretel.com wrote:
> On Tue, Oct 28, 2003 at 03:38:42PM -0800, Dejan Nikic wrote:
> > well the thing is that you don't want to remove gcc, only portage some
> > unused libs (i doubt their any with default Gentoo install) and probably
> > all those man and doc files. There should be ways to statically link
> > everything, but that might be some work.
> >
> > I got a 200mb install now, that I will hackaway at and try to get it
> > bellow 50mb hopefully I'm thinking of maybe writing something that will
> > use an existing gentoo install and use gentoo's portage and stuff to build
> > an LFS-like (Linux from scratch) image.
> >
>
> Turns out I had a lot of extra time at work today... ;-)
> well here is submerge. It is about 150 lines of bash and nothing very special.
> submerge takes a couple of configuration parameters in a file to run.
>
> I've attached it plus a sample config file. There are a couple extra
> features I have in mind for it... and I'm open to suggestions and code
> ;-)
>
> like I said before, a basic system can be done with:
>
> sys-kernel/linux-headers
> glibc
> =busybox-0.60.5-r1
> =gawk-3.1.2-r3
> =baselayout-1.8.6.8-r1
> tinylogin
I took your script for a testrun, overall very nice.
When I left the USE="-static", the overall size ended up being much larger,
so I removed it. Adding "-nls" is a good idea too, although its simple
enough to coopt localepurge.
I added the line
find ${ROOT_DIR} -name "*.a" | xargs -r r
as the first line of create_img.
I know gawk should eventually be removed as a dep of the init scripts, but
for now, removing ${ROOT_DIR}/bin/pgawk* helps.
tundra embeddedgentoo # ls work/bin/pgawk* -l
-rwxr-xr-x 2 root root 237376 Oct 31 15:55 work/bin/pgawk
-rwxr-xr-x 2 root root 237376 Oct 31 15:55 work/bin/pgawk-3.1.2
I do have a question - in the argument handling case statement, where do
the values for target and host come from?
--
luke
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] 'submerge' was Re: Re: [gentoo-dev] Gentoo Embedded
2003-10-31 7:07 ` luke
@ 2003-10-31 8:53 ` luke
2003-10-31 19:47 ` david
1 sibling, 0 replies; 9+ messages in thread
From: luke @ 2003-10-31 8:53 UTC (permalink / raw
To: gentoo-dev
On Fri, Oct 31, 2003 at 05:07:07PM +1000, luke@trolltech.com wrote:
> I do have a question - in the argument handling case statement, where do
> the values for target and host come from?
Duh, they are strings... one too many programming languages for a
Friday afternoon.
I wrote a few lines to make sure busybox gets to do its thing
for as many command names as possible, I will post that on the weekend
sometime.
--
luke
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] 'submerge' was Re: Re: [gentoo-dev] Gentoo Embedded
2003-10-31 7:07 ` luke
2003-10-31 8:53 ` luke
@ 2003-10-31 19:47 ` david
2003-11-03 3:18 ` luke
2003-11-03 3:20 ` luke
1 sibling, 2 replies; 9+ messages in thread
From: david @ 2003-10-31 19:47 UTC (permalink / raw
To: luke; +Cc: Dejan Nikic, jtoyota, gentoo-dev
On Fri, Oct 31, 2003 at 05:07:07PM +1000, luke@trolltech.com wrote:
> When I left the USE="-static", the overall size ended up being much larger,
> so I removed it. Adding "-nls" is a good idea too, although its simple
> enough to coopt localepurge.
>
interesting. I wonder why.
> I added the line
> find ${ROOT_DIR} -name "*.a" | xargs -r r
> as the first line of create_img.
>
did you mean | xargs -r rm ?
I added a little routine to rm -rf directories specified in
the config file. That way one can just tell it to get rid of
man/doc/info/include
those types of things.
If you have something cool to add, I'd love a patch ;-)
> I know gawk should eventually be removed as a dep of the init scripts, but
> for now, removing ${ROOT_DIR}/bin/pgawk* helps.
>
> tundra embeddedgentoo # ls work/bin/pgawk* -l
> -rwxr-xr-x 2 root root 237376 Oct 31 15:55 work/bin/pgawk
> -rwxr-xr-x 2 root root 237376 Oct 31 15:55 work/bin/pgawk-3.1.2
>
Well a simple grep through init scripts shows gawk being used a lot.
Will the runlevels work with out it ?
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] 'submerge' was Re: Re: [gentoo-dev] Gentoo Embedded
2003-10-31 19:47 ` david
@ 2003-11-03 3:18 ` luke
2003-11-03 3:20 ` luke
1 sibling, 0 replies; 9+ messages in thread
From: luke @ 2003-11-03 3:18 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 2330 bytes --]
On Fri, Oct 31, 2003 at 11:47:39AM -0800, david@futuretel.com wrote:
> On Fri, Oct 31, 2003 at 05:07:07PM +1000, luke@trolltech.com wrote:
> > When I left the USE="-static", the overall size ended up being much larger,
> > so I removed it. Adding "-nls" is a good idea too, although its simple
> > enough to coopt localepurge.
> >
>
> interesting. I wonder why.
Dont know. ${ROOT_DIR}/usr/lib/gconv is full of not-very-useful-to-me
things as well, like Chinese support, and localepurge doesnt handle
those files. It might be getting closer to the time to try replacing
glibc with uclibc or dietlibc.
> > I added the line
> > find ${ROOT_DIR} -name "*.a" | xargs -r r
> > as the first line of create_img.
> >
>
> did you mean | xargs -r rm ?
Yes.
> I added a little routine to rm -rf directories specified in
> the config file. That way one can just tell it to get rid of
> man/doc/info/include
> those types of things.
Im just doing that manually for now.
> If you have something cool to add, I'd love a patch ;-)
busybox_links.default is attached, and needs to be in the dir above ${ROOT_DIR}.
I generated it by reading /usr/portage/sys-apps/busybox/files/Config.h-0.60.5-cd
cd ${ROOT_DIR}
for i in `cat ../busybox_links.default`;do echo $i;for j in `find . -name $i`;do ln -sf /bin/busybox $j >/dev/null 2>&1;basename $j;done;done | sort | uniq -u | xargs -n1 --replace ln -s /bin/busybox bin/{}
I integrated localepurge into submerge as well, but I havent checked if its working
properly. There was something about a missing file.
> > I know gawk should eventually be removed as a dep of the init scripts, but
> > for now, removing ${ROOT_DIR}/bin/pgawk* helps.
> >
> > tundra embeddedgentoo # ls work/bin/pgawk* -l
> > -rwxr-xr-x 2 root root 237376 Oct 31 15:55 work/bin/pgawk
> > -rwxr-xr-x 2 root root 237376 Oct 31 15:55 work/bin/pgawk-3.1.2
> >
>
> Well a simple grep through init scripts shows gawk being used a lot.
> Will the runlevels work with out it ?
pgawk is profiling gawk; not useful on an embedded system. Also Im sure
that pgawk should be a symlink to pgawk-3.1.2. Might have to file a
bugreport on that one.
busybox awk might be good enough to let the init scripts work, otherwise
mawk is smaller than gawk. If you try either, let me know how it goes.
--
luke
[-- Attachment #2: busybox_links.default --]
[-- Type: text/plain, Size: 532 bytes --]
ash
basename
cat
chgrp
chmod
chown
chroot
chvt
clear
cmp
cp
cpio
cut
date
dd
df
dirname
dmesg
du
echo
env
fbset
fdflush
find
free
grep
gunzip
gzip
halt
head
hostname
ifconfig
init
insmod
kill
killall
klogd
ln
loadkmap
losetup
ls
lsmod
md5sum
mkdir
mkfifo
mknod
mkswap
modprobe
more
mount
mv
nc
nslookup
pidof
ping
pivot_root
poweroff
ps
pwd
readlink
reboot
reset
rm
rmdir
rmmod
route
sed
sleep
sort
swaponoff
sync
syslogd
tail
tar
telnet
tftp
touch
traceroute
true
false
umount
uniq
uname
uptime
vi
wc
wget
which
whoami
xargs
yes
[-- Attachment #3: Type: text/plain, Size: 37 bytes --]
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] 'submerge' was Re: Re: [gentoo-dev] Gentoo Embedded
2003-10-31 19:47 ` david
2003-11-03 3:18 ` luke
@ 2003-11-03 3:20 ` luke
1 sibling, 0 replies; 9+ messages in thread
From: luke @ 2003-11-03 3:20 UTC (permalink / raw
To: gentoo-dev
While Ive still got it, this is the list of files provided by
coreutils, that cant be provided by busybox.
/bin/nl
/bin/od
/bin/pr
/bin/dir
/bin/fmt
/bin/ptx
/bin/seq
/bin/tac
/bin/sum
/bin/who
/bin/comm
/bin/fold
/bin/join
/bin/stat
/bin/vdir
/bin/unexpand
/bin/cksum
/bin/nohup
/bin/paste
/bin/pinky
/bin/shred
/bin/split
/bin/users
/bin/sha1sum
/bin/csplit
/bin/factor
/bin/expand
/bin/groups
/bin/unlink
/bin/printenv
/bin/pathchk
/bin/dircolors
/bin/install
/bin/nice
--
luke
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2003-11-03 3:23 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-28 23:03 Re: [gentoo-dev] Gentoo Embedded jtoyota
2003-10-28 23:38 ` Dejan Nikic
2003-10-29 0:01 ` [gentoo-dev] 'submerge' was " david
2003-10-29 19:46 ` Ned Ludd
2003-10-31 7:07 ` luke
2003-10-31 8:53 ` luke
2003-10-31 19:47 ` david
2003-11-03 3:18 ` luke
2003-11-03 3:20 ` luke
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox