Difference between revisions of "Efika"

From C4 Wiki
Jump to: navigation, search
m (Reverted edits by 204.0.181.196 (Talk); changed back to last version by 70.245.237.5)
Line 1: Line 1:
 +
----
 +
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
 +
----
 +
=[http://awuhodynaro.co.cc Under Construction! Please Visit Reserve Page. Page Will Be Available Shortly]=
 +
----
 +
=[http://awuhodynaro.co.cc CLICK HERE]=
 +
----
 +
</div>
 
The [http://www.efika.info EFIKA] is an embedded PowerPC board with a 400MHz 32-bit freescale MPC5200 (603e/e300), 128MB RAM, 100MBit/s NIC, 2xUSB 1.1, Soundchip, 2.5" harddisk connector, PCI and AGP (with riser-card) and serial out.
 
The [http://www.efika.info EFIKA] is an embedded PowerPC board with a 400MHz 32-bit freescale MPC5200 (603e/e300), 128MB RAM, 100MBit/s NIC, 2xUSB 1.1, Soundchip, 2.5" harddisk connector, PCI and AGP (with riser-card) and serial out.
  
Line 28: Line 36:
  
 
==== Preparations ====
 
==== Preparations ====
# Download a stage3-tar-ball and unpack it to e.g. <tt>/nfsroot</tt>.
+
# Download a stage3-tar-ball and unpack it to e.g. &lt;tt>/nfsroot&lt;/tt>.
# Change <tt>/nfsroot//etc/fstab</tt>, so that the root-filesystem will be mounted via NFS: <code>10.10.1.1:/nfsroot              /              nfs            noatime        0 1</code>
+
# Change &lt;tt>/nfsroot//etc/fstab&lt;/tt>, so that the root-filesystem will be mounted via NFS: &lt;code>10.10.1.1:/nfsroot              /              nfs            noatime        0 1&lt;/code>
# Change <tt>/nfsroot/etc/securetty</tt> and add a line for logging in later via serial-line: <code> echo ttyPSC0 >> /nfsroot/etc/securetty</code>
+
# Change &lt;tt>/nfsroot/etc/securetty&lt;/tt> and add a line for logging in later via serial-line: &lt;code> echo ttyPSC0 >> /nfsroot/etc/securetty&lt;/code>
# Also add that serial-line to <tt>/nfsroot/etc/inittab</tt>: <code>echo "s0:12345:respawn:/sbin/agetty 115200 ttyPSC0 vt100" >> /nfsroot/etc/inittab</code> (you can use ''linux'' instead of ''vt100'' for a coloured term, but then you should have a good serial communicotian program)
+
# Also add that serial-line to &lt;tt>/nfsroot/etc/inittab&lt;/tt>: &lt;code>echo "s0:12345:respawn:/sbin/agetty 115200 ttyPSC0 vt100" >> /nfsroot/etc/inittab&lt;/code> (you can use ''linux'' instead of ''vt100'' for a coloured term, but then you should have a good serial communicotian program)
# Add a password-hash for the root-password into <tt>/nfsroot/etc/shadow</tt>.  I used htpasswd2 from apache for it.  Call it with <code>htpasswd -nb root secret</code>.  This will create the hash for the root-user with the password ''secret''.  Replace the <code>*</code> after <code>root:</code> in the shadow-file with that hash.
+
# Add a password-hash for the root-password into &lt;tt>/nfsroot/etc/shadow&lt;/tt>.  I used htpasswd2 from apache for it.  Call it with &lt;code>htpasswd -nb root secret&lt;/code>.  This will create the hash for the root-user with the password ''secret''.  Replace the &lt;code>*&lt;/code> after &lt;code>root:&lt;/code> in the shadow-file with that hash.
# Give your system a hostname in <tt>/nfsroot/etc/hostname</tt> and add that hostname after the localhost-entry in <tt>/nfsroot/etc/hosts</tt>
+
# Give your system a hostname in &lt;tt>/nfsroot/etc/hostname&lt;/tt> and add that hostname after the localhost-entry in &lt;tt>/nfsroot/etc/hosts&lt;/tt>
# Unfortunately mounting another nfs-share for the portage-tree later will not work, as nfs-utils are not installed yet (I'm working on a special nfsroot-efika-stage4).  Bind-mounting  a portage-tree on a Gentoo-system will not work either (nfs just ignores that).  So we have to download and unpack a current portage-snapshot into <tt>/nfsroot/usr/portage</tt>. Alternatively you can rsync your local portage-tree into <tt>/nfsroot</tt>: <code>rsync --archive --progress --exclude=packages/ --exclude=distfiles/ /usr/portage/ /nfsroot/usr/portage/</code>.
+
# Unfortunately mounting another nfs-share for the portage-tree later will not work, as nfs-utils are not installed yet (I'm working on a special nfsroot-efika-stage4).  Bind-mounting  a portage-tree on a Gentoo-system will not work either (nfs just ignores that).  So we have to download and unpack a current portage-snapshot into &lt;tt>/nfsroot/usr/portage&lt;/tt>. Alternatively you can rsync your local portage-tree into &lt;tt>/nfsroot&lt;/tt>: &lt;code>rsync --archive --progress --exclude=packages/ --exclude=distfiles/ /usr/portage/ /nfsroot/usr/portage/&lt;/code>.
# Finally unpack the [http://www.efika.de/download/modules_efika.tgz precompiled modules] into <tt>/nfsroot</tt> (<code>tar xvzf modules_efika.tgz -C /nfsroot/</code>.
+
# Finally unpack the [http://www.efika.de/download/modules_efika.tgz precompiled modules] into &lt;tt>/nfsroot&lt;/tt> (&lt;code>tar xvzf modules_efika.tgz -C /nfsroot/&lt;/code>.
  
 
The nfsroot is now prepared for a first and simple boot.  Let us now set up the dhcp-/tftp-/nfs-server-voodoo.
 
The nfsroot is now prepared for a first and simple boot.  Let us now set up the dhcp-/tftp-/nfs-server-voodoo.
  
 
==== DHCP-Server ====
 
==== DHCP-Server ====
I use dnsmasq for the dhcp-server, as it provides the possibilty to add tftp-dhcp-boot-options.  Basically you only need to set two lines in your <tt>dnsmasq.conf</tt>:
+
I use dnsmasq for the dhcp-server, as it provides the possibilty to add tftp-dhcp-boot-options.  Basically you only need to set two lines in your &lt;tt>dnsmasq.conf&lt;/tt>:
<pre>
+
&lt;pre>
 
dhcp-range=10.10.1.2,10.10.1.2,5m
 
dhcp-range=10.10.1.2,10.10.1.2,5m
 
dhcp-host=00:0b:2f:e7:e7:20,10.10.1.2
 
dhcp-host=00:0b:2f:e7:e7:20,10.10.1.2
</pre>
+
&lt;/pre>
  
;dhcp-range: <code><first-IP-address>,<last-IP-address>,<lease-time></code>
+
;dhcp-range: &lt;code>&lt;first-IP-address>,&lt;last-IP-address>,&lt;lease-time>&lt;/code>
;dhcp-host: <code><MAC-address>,<IP-address></code> (the MAC-address is printed on the sticker above the Ethernet-port)
+
;dhcp-host: &lt;code>&lt;MAC-address>,&lt;IP-address>&lt;/code> (the MAC-address is printed on the sticker above the Ethernet-port)
  
 
Probably you might also want to set some more settings for the interface on the server, routing etc.  After that start the daemon.
 
Probably you might also want to set some more settings for the interface on the server, routing etc.  After that start the daemon.
  
 
==== TFTP-Server ====
 
==== TFTP-Server ====
This time I use atftp as TFTP-Server.  This server expects <tt>/tftproot</tt> as the path for tftp-files.  But it's possible to change it in the config.
+
This time I use atftp as TFTP-Server.  This server expects &lt;tt>/tftproot&lt;/tt> as the path for tftp-files.  But it's possible to change it in the config.
  
Now place [http://www.efika.de/download/kernel_efika the kernel] into <tt>/tftproot</tt> and start the daemon.
+
Now place [http://www.efika.de/download/kernel_efika the kernel] into &lt;tt>/tftproot&lt;/tt> and start the daemon.
  
 
==== NFS-Server ====
 
==== NFS-Server ====
Add <code>/nfsroot        10.10.1.2(rw,sync,no_root_squash)</code> to your <tt>/etc/exports</tt> and start the daemon.  Make sure, that a firewall is not blocking nfs-requests.  Also make sure, that <tt>/etc/hosts.{allow,deny}</tt> are set properly.
+
Add &lt;code>/nfsroot        10.10.1.2(rw,sync,no_root_squash)&lt;/code> to your &lt;tt>/etc/exports&lt;/tt> and start the daemon.  Make sure, that a firewall is not blocking nfs-requests.  Also make sure, that &lt;tt>/etc/hosts.{allow,deny}&lt;/tt> are set properly.
  
 
==== Serial console ====
 
==== Serial console ====
Attach a null modem serial cable between the EFIKA and a PC with serial port.  I use <tt>screen</tt> as serial terminal program: <code>screen -m -c /dev/null /dev/ttyS0 115200 8n1</code>.
+
Attach a null modem serial cable between the EFIKA and a PC with serial port.  I use &lt;tt>screen&lt;/tt> as serial terminal program: &lt;code>screen -m -c /dev/null /dev/ttyS0 115200 8n1&lt;/code>.
  
 
==== Booting ====
 
==== Booting ====
 
Now, let's boot!  Switch on the EFIKA.  You should see some lines with RAM-checking etc.  After that you see a prompt:
 
Now, let's boot!  Switch on the EFIKA.  You should see some lines with RAM-checking etc.  After that you see a prompt:
<pre>
+
&lt;pre>
 
ok #
 
ok #
</pre>
+
&lt;/pre>
  
On that prompt type in <code>boot eth kernel_efika linux console=ttyPSC0 ip=dhcp panic=10 root=/dev/nfs nfsroot=10.10.1.1:/nfsroot</code>.
+
On that prompt type in &lt;code>boot eth kernel_efika linux console=ttyPSC0 ip=dhcp panic=10 root=/dev/nfs nfsroot=10.10.1.1:/nfsroot&lt;/code>.
  
 
The EFIKA should download the kernel, boot up and will provide a login-prompt.  Log in with your root-password you set previously.  Welcome to your EFIKA!
 
The EFIKA should download the kernel, boot up and will provide a login-prompt.  Log in with your root-password you set previously.  Welcome to your EFIKA!
Line 77: Line 85:
 
* Check your daemon-log-files
 
* Check your daemon-log-files
 
* Check your firewall if it allows DHCP, TFTP and NFS
 
* Check your firewall if it allows DHCP, TFTP and NFS
* Check the permissions of <tt>/tftproot</tt> and <tt>/nfsroot</tt>
+
* Check the permissions of &lt;tt>/tftproot&lt;/tt> and &lt;tt>/nfsroot&lt;/tt>

Revision as of 02:16, 24 November 2010



Under Construction! Please Visit Reserve Page. Page Will Be Available Shortly


CLICK HERE


The EFIKA is an embedded PowerPC board with a 400MHz 32-bit freescale MPC5200 (603e/e300), 128MB RAM, 100MBit/s NIC, 2xUSB 1.1, Soundchip, 2.5" harddisk connector, PCI and AGP (with riser-card) and serial out.

Pylon received a board for development work on it. I will leave it in the C4, so that we can attach additional hardware on it.

Ideas for development tasks

  1. mpd-server as in-replacement for the already existing one
  2. connection to the Fnordlicht (built at C4's U23 2005)
  3. using JACK for disco-lights

Booting

Harddisk

Currently I don't have any harddisk available, so this could not be tested. But it would be nice to create a complete stand-alone machine out of it.

USB

It's also possible to boot via USB. But it's only USB 1.1, so very slow.

NFS

I will use Gentoo/Linux on that machine. Yes, it might be slow, but it can be changed to your needs. Also it's possible to build on another PowerPC or with cross-dev.

Setup

Server
10.10.1.1
Client
10.10.1.2

Preparations

  1. Download a stage3-tar-ball and unpack it to e.g. <tt>/nfsroot</tt>.
  2. Change <tt>/nfsroot//etc/fstab</tt>, so that the root-filesystem will be mounted via NFS: <code>10.10.1.1:/nfsroot / nfs noatime 0 1</code>
  3. Change <tt>/nfsroot/etc/securetty</tt> and add a line for logging in later via serial-line: <code> echo ttyPSC0 >> /nfsroot/etc/securetty</code>
  4. Also add that serial-line to <tt>/nfsroot/etc/inittab</tt>: <code>echo "s0:12345:respawn:/sbin/agetty 115200 ttyPSC0 vt100" >> /nfsroot/etc/inittab</code> (you can use linux instead of vt100 for a coloured term, but then you should have a good serial communicotian program)
  5. Add a password-hash for the root-password into <tt>/nfsroot/etc/shadow</tt>. I used htpasswd2 from apache for it. Call it with <code>htpasswd -nb root secret</code>. This will create the hash for the root-user with the password secret. Replace the <code>*</code> after <code>root:</code> in the shadow-file with that hash.
  6. Give your system a hostname in <tt>/nfsroot/etc/hostname</tt> and add that hostname after the localhost-entry in <tt>/nfsroot/etc/hosts</tt>
  7. Unfortunately mounting another nfs-share for the portage-tree later will not work, as nfs-utils are not installed yet (I'm working on a special nfsroot-efika-stage4). Bind-mounting a portage-tree on a Gentoo-system will not work either (nfs just ignores that). So we have to download and unpack a current portage-snapshot into <tt>/nfsroot/usr/portage</tt>. Alternatively you can rsync your local portage-tree into <tt>/nfsroot</tt>: <code>rsync --archive --progress --exclude=packages/ --exclude=distfiles/ /usr/portage/ /nfsroot/usr/portage/</code>.
  8. Finally unpack the precompiled modules into <tt>/nfsroot</tt> (<code>tar xvzf modules_efika.tgz -C /nfsroot/</code>.

The nfsroot is now prepared for a first and simple boot. Let us now set up the dhcp-/tftp-/nfs-server-voodoo.

DHCP-Server

I use dnsmasq for the dhcp-server, as it provides the possibilty to add tftp-dhcp-boot-options. Basically you only need to set two lines in your <tt>dnsmasq.conf</tt>: <pre> dhcp-range=10.10.1.2,10.10.1.2,5m dhcp-host=00:0b:2f:e7:e7:20,10.10.1.2 </pre>

dhcp-range
<code><first-IP-address>,<last-IP-address>,<lease-time></code>
dhcp-host
<code><MAC-address>,<IP-address></code> (the MAC-address is printed on the sticker above the Ethernet-port)

Probably you might also want to set some more settings for the interface on the server, routing etc. After that start the daemon.

TFTP-Server

This time I use atftp as TFTP-Server. This server expects <tt>/tftproot</tt> as the path for tftp-files. But it's possible to change it in the config.

Now place the kernel into <tt>/tftproot</tt> and start the daemon.

NFS-Server

Add <code>/nfsroot 10.10.1.2(rw,sync,no_root_squash)</code> to your <tt>/etc/exports</tt> and start the daemon. Make sure, that a firewall is not blocking nfs-requests. Also make sure, that <tt>/etc/hosts.{allow,deny}</tt> are set properly.

Serial console

Attach a null modem serial cable between the EFIKA and a PC with serial port. I use <tt>screen</tt> as serial terminal program: <code>screen -m -c /dev/null /dev/ttyS0 115200 8n1</code>.

Booting

Now, let's boot! Switch on the EFIKA. You should see some lines with RAM-checking etc. After that you see a prompt: <pre> ok # </pre>

On that prompt type in <code>boot eth kernel_efika linux console=ttyPSC0 ip=dhcp panic=10 root=/dev/nfs nfsroot=10.10.1.1:/nfsroot</code>.

The EFIKA should download the kernel, boot up and will provide a login-prompt. Log in with your root-password you set previously. Welcome to your EFIKA!

Troubleshooting

  • Check your serial and network cable
  • Check your daemon-log-files
  • Check your firewall if it allows DHCP, TFTP and NFS
  • Check the permissions of <tt>/tftproot</tt> and <tt>/nfsroot</tt>