* Do you have your minimum ramdisk image which can provide basic network services ?
@ 2000-05-29 7:27 SangTae Ha
2000-05-29 7:56 ` Wolfgang Denk
2000-05-30 18:29 ` Tom Roberts
0 siblings, 2 replies; 6+ messages in thread
From: SangTae Ha @ 2000-05-29 7:27 UTC (permalink / raw)
To: Rodney Davies; +Cc: linuxppc-embedded
I want to make my ramdisk image which can provide basic network services such as "ping","traceroute","telnet" and "ftp". I want to reduce my file size within (1or2)M bytes. I already downloaded full image file at ftp://ftp.ppc.kernel.org/pub/linuxppc/embedded/mbxroot.full.tgz
This file is so big including all of things. I am currently pruning various directories and files in it. I hope that it doesn't take too much time.
I have two choices.
1) compile the LRP(Linux Router Project) package and make it into root file system image
2) reducing file size from full image file and make final small size image
How do you think about above solutions?
I just want to use TCP/IP networking facilities. I will really be happy if you already got that image..
Thank you for your help
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Do you have your minimum ramdisk image which can provide basic network services ?
2000-05-29 7:27 Do you have your minimum ramdisk image which can provide basic network services ? SangTae Ha
@ 2000-05-29 7:56 ` Wolfgang Denk
2000-05-30 18:29 ` Tom Roberts
1 sibling, 0 replies; 6+ messages in thread
From: Wolfgang Denk @ 2000-05-29 7:56 UTC (permalink / raw)
To: SangTae Ha; +Cc: linuxppc-embedded
In message <020e01bfc93f$5dc075c0$db52df8d@helsinki> you wrote:
>
> I want to make my ramdisk image which can provide basic network services such as "ping","traceroute","telnet" and "ftp". I want to reduce my file size within (1or2)M bytes. I already downloaded full image file at ftp://ftp.ppc.kernel.org/pub/linuxppc/em
> bedded/mbxroot.full.tgz
This is most probably not the best approach.
You should not start with a full installation of everything, but
instead start with an empty system and design what you need to have
it it.
/bin/ping, /usr/sbin/traceroute, /usr/bin/ftp, and /usr/bin/telnet
together need (compressed) well below 100 kB, so if you don't need
glibc2 for any reasons you can easily fit this within your limits
(hell, in 1 MB you can have a compressed image with a full web server
including >560 kB of web pages *plus* the Linux kernel).
> This file is so big including all of things. I am currently pruning various directories and files in it. I hope that it doesn't take too much time.
> I have two choices.
> 1) compile the LRP(Linux Router Project) package and make it into root file system image
> 2) reducing file size from full image file and make final small size image
What's wrong with using one of the existing embedded releases, and
building your system from buttom up? Both the Montavista HHL release
or our CD-ROM should get you started easily (see
http://www.denx.de/solutions-en.html for a start).
> How do you think about above solutions?
I think you are on a wrong track.
> I just want to use TCP/IP networking facilities. I will really be happy if you already got that image..
What is the purpose of your embedded system?
What do you want to have FTP for, when you don't have any files to
send, or any commands to process files you "get"? It's difficult to
make recommendations (especially for embedded systems) when you hold
back essential information...
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd@denx.de
Nothing ever becomes real until it is experienced. - John Keats
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Do you have your minimum ramdisk image which can provide basic network services ?
2000-05-29 7:27 Do you have your minimum ramdisk image which can provide basic network services ? SangTae Ha
2000-05-29 7:56 ` Wolfgang Denk
@ 2000-05-30 18:29 ` Tom Roberts
2000-05-30 18:39 ` Daris Nevil
1 sibling, 1 reply; 6+ messages in thread
From: Tom Roberts @ 2000-05-30 18:29 UTC (permalink / raw)
To: linuxppc-embedded
SangTae Ha wrote:
> I already downloaded full image file at > ftp://ftp.ppc.kernel.org/pub/linuxppc/embedded/mbxroot.full.tgz
I just downloaded that file, too. As you say, it is HUGE (133 MB
gzipped).
Unfortunately, it is also incomplete. In particular, it is missing:
init (/etc/telinit is a link to init, but no init)
inetd
I had been hoping to simply build up an initrd image from selected
pieces of it, because I now have the Linux kernel, console, and
initrd-ramdisk up and running on my hardware (Hurrah!). But I'm
having difficulty building a sufficient initrd image to actually use
the network driver I have written (:-(). So far, I cannot even ping
myself using the loopback device (no inetd, I suppose).
Tom Roberts tjroberts@lucent.com
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Do you have your minimum ramdisk image which can provide basic network services ?
2000-05-30 18:29 ` Tom Roberts
@ 2000-05-30 18:39 ` Daris Nevil
2000-05-31 13:45 ` Tom Roberts
0 siblings, 1 reply; 6+ messages in thread
From: Daris Nevil @ 2000-05-30 18:39 UTC (permalink / raw)
To: Tom Roberts; +Cc: linuxppc-embedded
Tom,
The quick-and-dirty way of enabling your loopback device
is:
ifconfig lo 127.0.0.1
Daris
SiSIC Inc/SNMC
www.snmc.com
Tom Roberts wrote:
> SangTae Ha wrote:
> > I already downloaded full image file at > ftp://ftp.ppc.kernel.org/pub/linuxppc/embedded/mbxroot.full.tgz
>
> I just downloaded that file, too. As you say, it is HUGE (133 MB
> gzipped).
>
> Unfortunately, it is also incomplete. In particular, it is missing:
> init (/etc/telinit is a link to init, but no init)
> inetd
>
> I had been hoping to simply build up an initrd image from selected
> pieces of it, because I now have the Linux kernel, console, and
> initrd-ramdisk up and running on my hardware (Hurrah!). But I'm
> having difficulty building a sufficient initrd image to actually use
> the network driver I have written (:-(). So far, I cannot even ping
> myself using the loopback device (no inetd, I suppose).
>
> Tom Roberts tjroberts@lucent.com
>
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Do you have your minimum ramdisk image which can provide basic network services ?
2000-05-30 18:39 ` Daris Nevil
@ 2000-05-31 13:45 ` Tom Roberts
2000-05-31 15:35 ` Daris Nevil
0 siblings, 1 reply; 6+ messages in thread
From: Tom Roberts @ 2000-05-31 13:45 UTC (permalink / raw)
To: Daris Nevil; +Cc: linuxppc-embedded
Daris Nevil wrote:
> The quick-and-dirty way of enabling your loopback device
> is:
> ifconfig lo 127.0.0.1
Yes, I did that; I get:
$ ifconfig lo 127.0.0.1
127.0.0.1: Resolver Error 0 (no error)
Usage: ifconfig [-a] [-i] [-v] interface
[inet address]
[hw] [ax25 address]
[metric NN] [mtu NN]
[trailers] [-trailers]
[arp] [-arp]
[netmask aa.bb.cc.dd]
[dstaddr aa.bb.cc.dd]
[mem_start NN] [io_addr NN] [irq NN]
[[-] broadcast [aa.bb.cc.dd]]
[[-]pointopoint [aa.bb.cc.dd]]
[up] [down] ...
I have no idea what "Resolver error 0" is, nor why ifconfig thinks
that is an invalid command line....
$ ping 127.0.0.1
ping: unknown protocol icmp.
I think I need to be running inetd to implement the ping protocol, and
so far I have been unable to find a PowerPC image of inetd.
My /etc/protocols has icmp listed (copied from a working i386 linux).
I may have more serious errors, like incompatible libraries....
Tom Roberts tjroberts@lucent.com
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Do you have your minimum ramdisk image which can provide basic network services ?
2000-05-31 13:45 ` Tom Roberts
@ 2000-05-31 15:35 ` Daris Nevil
0 siblings, 0 replies; 6+ messages in thread
From: Daris Nevil @ 2000-05-31 15:35 UTC (permalink / raw)
To: Tom Roberts; +Cc: linuxppc-embedded
Tom,
I'm not sure what the Resolver Error 0 zero is either. I don't
remember seeing that one.
However, I do know that you don't need inetd for ping. If you
want to use ping the way it is then you will need the nss
libraries in addition to your /etc/protocols file. I cheated and
hacked ping.c and hard-coded the icmp protocol number. The
patch for the hack is included below.
Daris Nevil
SiSIC Inc/SNMC
----------------------------------------------
Patch for ping.c that removes the need for /etc/protocols and nss
libraries.
By Daris Nevil (dnevil@snmc.com)
To patch:
cd netkit-base-0.10/ping
patch -Np1 < ping-no-protocols.patch
--- ping.old Tue May 30 22:26:48 2000
+++ ping.c Tue May 30 22:26:54 2000
@@ -87,6 +87,7 @@
*/
#ifdef __linux__
#define SAFE_TO_DROP_ROOT
+#define NO_PROTOCOLS // Elimnates the need for /etc/protocols and nss
libs
#endif
#if defined(__GLIBC__) && (__GLIBC__ >= 2)
@@ -223,13 +224,16 @@
/*
* Pull this stuff up front so we can drop root if desired.
*/
+#ifdef NO_PROTOCOLS
setprotoent(0); // Leave the /etc/protocols file open
if (!(proto = getprotobyname("icmp"))) {
(void)fprintf(stderr, "ping: unknown protocol icmp.\n");
exit(2);
}
-
+#else
+ proto->p_proto = 1; // ICMP, from /etc/protocols
+#endif
if ((s = socket(AF_INET, SOCK_RAW, proto->p_proto)) < 0) {
if (errno==EPERM) {
fprintf(stderr, "ping: ping must run as root\n");
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2000-05-31 15:35 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-05-29 7:27 Do you have your minimum ramdisk image which can provide basic network services ? SangTae Ha
2000-05-29 7:56 ` Wolfgang Denk
2000-05-30 18:29 ` Tom Roberts
2000-05-30 18:39 ` Daris Nevil
2000-05-31 13:45 ` Tom Roberts
2000-05-31 15:35 ` Daris Nevil
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).