?? ramdisk.html
字號:
is just a matter of affecting the compilation variable so they point to
arm-linux tools.
<br>You can get samba at this location : <a href="www.samba.org">www.samba.org</a>
.
<br>The following command shows how to cross-compile samba :
<p>
bash$ cd samba-xxx // where samba's code
source resides
<br>
bash$ CC="arm-linux-gcc" INCLUDES="/usr/local/arm/2.95.3/arm-linux/include/
/usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3/include"
<br>
LIBS="/usr/local/arm/2.95.3/arm-linux/lib/libg.a" CFLAGS="$INCLUDES $LIBS"
./configure --prefix=/home/user/usr/local/samba-2.2.7a
<br>
--sbindir=/usr/home/amine/usr/local/samba-2.2.7a/sbin/
<br>
bash$ make install
<br>
bash$ make
<p>All samba binaries and libraries will be in /home/user/usr/local/samba-2.2.7a.
you can copy them in your ramdisk just like the way you did with busybox
including some minor changes
<br>in the location. In case of samba you only need to copy the sbin and
lib directories so you can meet RAM size restrictions. finally you have
to create a samba config file named smb.conf
<br>that allows you to configure your samba server (add your computer
to an existing network, share files...). Please refer to samba-source-directory/examples/simple/smb.conf
to pick up some configuration patterns for your samba server.
<p>
bash$ cp -a /home/user/usr/local/samba/sbin/* /mnt/ramdisk-as/usr/local/samba/sbin/*
<br>
bash$ cp -a /home/user/usr/local/samba/lib/* /mnt/ramdisk-as/usr/local/samba/lib/*
<br>
bash$ touch /mnt/ramdisk-as/usr/local/samba/lib/smb.conf
<h2>
<a NAME="Getting Apache"></a>Getting Apache</h2>
Apache won't cross-compile because it tries to execute some binaries on
i386 during the configure process and that is why we choose to install
the RPM package that suits ARM processors.
<br>please refer to the next section for more information on how to install
RPM packages.
<h2>
<a NAME="Installing RPM packages"></a>Installing RPM packages</h2>
Cross-compiling sources can be an overwhelming task especially for beginners
in the linux world. we decide to add this section to give an alternative
way to install the packages you need
<br>to set up your ramdisk. First of all, you need to fetch the RPM packages
from the web, there is great web site that has almost everything : <a href="http://rpmfind.net/linux/RPM/netwinder/netwinder/RPMS/base/3.1-15/NetWinder_ARM_Linux.html">http://rpmfind.net/linux/RPM/netwinder/netwinder/RPMS/base/3.1-15/NetWinder_ARM_Linux.html</a>
<br>Be careful to the dependencies, sometimes you need to install other
libraries before installing the wanted package.
<br>The installation process is very easy to perform. you need to mount
your ramdisk as explained before (you need to log in as root) :
<p>
bash$ mount -o loop your_ramdisk /mnt/your_ramdisk_directory
<br>
bash$ cd /mnt/your_ramdisk_directory
<br>
bash$ rpm2cpio whereever_your_packages_are/package.rpm | cpio -i
-d --no-absolute-filenames
<p>This will install the binaries, libraries and config files in the appropriate
places. in order to reduce your ramdisk's content size you might delete
some useless directories like doc, man that can
<br>be found in /usr and /lib.
<br>
<h2>
<a NAME="Setting up the network interfaces"></a>Setting up the network interfaces</h2>
You can set up your network interfaces automaticaly at start time just
by adding a small file in /etc/rc.d/init.d. we named it interfaces. this
file contains the following line :
<br>
ifconfig eth0 ip_address
<br>what you need to do next is to create a symbolic link to the file interfaces
in /etc/rc.d/rc3.d, it goes like this :
<p>
bash$ cd /etc/rc.d/rc3.d
<br>
bash$ ln -s ../init.d/interfaces S20interfaces
<p>At start time, when the system starts all the services in your machine,
you will see the "starting interfaces" line. if no error comes out after
this line, this means that you configured your network interfaces correctly.
<br>
<h2>
<a NAME="Installing mingetty"></a>Installing mingetty</h2>
<font size=+0>mingetty is a minimal getty for use on virtual consoles.
It allows you to have a prompt on your screen so you can type commands
and use your system.</font>
<br><font size=+0>To install mingetty you need to get the RPM package from
the internet (check this location </font> <a href="http://handhelds.org/download/linux/arm/netwinder-rpms/RPMS/base/3.1-15/">http://handhelds.org/download/linux/arm/netwinder-rpms/RPMS/base/3.1-15/</a>
).
<br>Once you unpack and install the RPM you need to strip and then copy
the mingetty binary in the /sbin of your ramdisk.
<p>
bash$ mount -o loop ramdisk /mnt/ramdisk
<br>
bash$ arm-linux-strip -s -g whereever_mingetty_is_installed/sbin/mingetty
<br>
bash$ cp whereever_mingetty_is_installed/sbin/mingetty
/mnt/ramdisk/sbin
<p>In order to make the virtual console work with mingetty, you need to
pass a virtual console as an argument to it in the /etc/inittab file. this
argument will be a symbolic link to /dev/vc/n where n is a number. we choose
tty1 as a symbolic link to /dev/vc/1. Make sure you that /dev/vc/1 exists
and the symbolic link /dev/tty1 points to it when you boot your board.
if they don't exist you can pick whatever is available and matchs the description
given above. Once this step is checked you need to add a new entry in your
/etc/inittab. that'll launch the mingetty automatically at start time.
for this you need to scroll down the /etc/inittab to the location where
you find some entries like these :
<p>
# /sbin/getty invocations for the runlevels.
<br>
# Format:
<br>
# <id>:<runlevels>:<action>:<process>
<br>
#1:2345:respawn:/sbin/getty 115200 tty1
<br>
#2:23:respawn:/sbin/getty 115200 tty2
<p>
# Example how to put a getty on a serial line (for a terminal)
<p>Now you can add your mingetty entry :
<p>
# /sbin/getty invocations for the runlevels.
<br>
# Format:
<br>
# <id>:<runlevels>:<action>:<process>
<br>
#1:2345:respawn:/sbin/getty 115200 tty1
<br>
#2:23:respawn:/sbin/getty 115200 tty2
<p>
# Example how to put a getty on a serial line (for a terminal)
<br>
1:235:respawn:/sbin/mingetty tty1
<p>Finally you will have to add the tty1 (whatever you have chosen as a
virtual console) entry in the /etc/securetty. At this level we can say
that you have done everything you need to have a nice prompt display on
your screen ready to take commands.
<br>
<br>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -