Diff for /wikisrc/ports/sandpoint/instnh23x.mdwn between versions 1.3 and 1.4

version 1.3, 2015/09/04 22:30:35 version 1.4, 2015/09/05 18:55:53
Line 63  board. Line 63  board.
 </tr>  </tr>
 </tbody>  </tbody>
 </table></td>  </table></td>
 <td align="left"><img src="http://www.netbsd.org/images/ports/sandpoint/nhnas_ser_header.jpg" alt="Serial port header" /></td>  <td align="left"><img src="http://www.NetBSD.org/images/ports/sandpoint/nhnas_ser_header.jpg" alt="Serial port header" /></td>
 </tr>  </tr>
 </tbody>  </tbody>
 </table>  </table>
Line 76  which have to be converted into regular  Line 76  which have to be converted into regular 
 circuit. Instructions how to build such a circuit yourself can be found  circuit. Instructions how to build such a circuit yourself can be found
 here:  here:
   
 -   Serial adapter for 3.3V TTL  -   [Serial adapter for 3.3V TTL](http://www.NetBSD.org/ports/sandpoint/ttl2rs232.html)
   
 Make sure that the layout of the connector fits to the pinout of the  Make sure that the layout of the connector fits to the pinout of the
 boards serial header, as shown above.  boards serial header, as shown above.
Line 99  entry for `/dev/ttyU0` in `/etc/remote`. Line 99  entry for `/dev/ttyU0` in `/etc/remote`.
 First time installation  First time installation
 =======================  =======================
   
   <a name="altboot"></a>
 The altboot bootloader  The altboot bootloader
 ----------------------  ----------------------
   
Line 129  The functionality of this NH-230/231 PPC Line 130  The functionality of this NH-230/231 PPC
 Probably to keep it small and to save space for a Linux kernel and  Probably to keep it small and to save space for a Linux kernel and
 ramdisk in the 4MB Flash, but also to keep the user from hacking it. It  ramdisk in the 4MB Flash, but also to keep the user from hacking it. It
 only allows to overwrite four predefined regions of the flash with  only allows to overwrite four predefined regions of the flash with
 special `load` commands, and the lack of a `cp` command leaves us with  special **load** commands, and the lack of a **cp** command leaves us with
 the only option to boot `altboot(8)` as a Linux kernel image through  the only option to boot `altboot(8)` as a Linux kernel image through
 `bootm`.  **bootm**.
   
 Getting altboot into RAM  Getting altboot into RAM
 ------------------------  ------------------------
Line 139  Getting altboot into RAM Line 140  Getting altboot into RAM
 The `altboot` boot loader has to be loaded and started using PPCBoot.  The `altboot` boot loader has to be loaded and started using PPCBoot.
 Usually there are three ways to invoke it:  Usually there are three ways to invoke it:
   
 -   loadb  -   **loadb** to load a binary file via serial line in kermit mode
     to load a binary file via serial line in kermit mode  -   **tftpboot** to load a binary file over the network with TFTP protocol
 -   tftpboot  
     to load a binary file over the network with TFTP protocol  
 -   start it from the flash memory  -   start it from the flash memory
   
 The last option is prefered once the installation is completed, but  The last option is prefered once the installation is completed, but
Line 150  obviously it is not possible for the fir Line 149  obviously it is not possible for the fir
 PPCBoot has set up the network interface, which we can use after  PPCBoot has set up the network interface, which we can use after
 configuring the `ipaddr` and `serverip` environment variables:  configuring the `ipaddr` and `serverip` environment variables:
   
     _MPC824X >   <pre>
     _MPC824X >   _MPC824X &gt; <strong>setenv ipaddr 192.168.0.107</strong>
     _MPC824X >   _MPC824X &gt; <strong>setenv serverip 192.168.0.5</strong>
     Saving Environment to Flash...  _MPC824X &gt; <strong>savenv</strong>
     unProtect FFC00000 ... FFC01FFF  Saving Environment to Flash...
     Un-Protected 1 sectors  unProtect FFC00000 ... FFC01FFF
     Erasing Flash...  Un-Protected 1 sectors
     . done  Erasing Flash...
     Erased 1 sectors  . done
     Writing to Flash... done  Erased 1 sectors
     Protected 1 sectors  Writing to Flash... done
   Protected 1 sectors
   </pre>
   
 Once you have set up TFTP and DHCP ([read below](#altboot_install)) you  Once you have set up TFTP and DHCP ([read below](#altboot_install)) you
 can download `altboot` into RAM at `0x1000000` like this:  can download `altboot` into RAM at `0x1000000` like this:
   
     _MPC824X >   <pre>
     TFTP from server 192.168.0.5; our IP address is 192.168.0.107  _MPC824X &gt; <strong>tftp 1000000 altboot.bin</strong>
     Filename 'altboot.bin'.  TFTP from server 192.168.0.5; our IP address is 192.168.0.107
     Load address: 0x1000000  Filename 'altboot.bin'.
     Loading: ################  Load address: 0x1000000
     done  Loading: ################
     Bytes transferred = 76884 (12c54 hex)  done
   Bytes transferred = 76884 (12c54 hex)
   </pre>
   
   <a name="altboot_install"></a>
 Boot the INSTALL kernel with altboot  Boot the INSTALL kernel with altboot
 ------------------------------------  ------------------------------------
   
Line 180  Now you can use `altboot` to launch the  Line 184  Now you can use `altboot` to launch the 
 installing NetBSD. You may choose to load it with TFTP or from NFS. For TFTP  installing NetBSD. You may choose to load it with TFTP or from NFS. For TFTP
 you have to enable `tftpd(8)` in `/etc/inetd.conf`, and for NFS there is  you have to enable `tftpd(8)` in `/etc/inetd.conf`, and for NFS there is
 a documentation at [The Network File  a documentation at [The Network File
 System](http://www.&os;.org/docs/guide/en/chap-net-services.html#chap-net-services-nfs).  System](http://www.NetBSD.org/docs/guide/en/chap-net-services.html#chap-net-services-nfs).
 But in both cases you have to set up a DHCP server, which is explained  But in both cases you have to set up a DHCP server, which is explained
 in the [DHCP Howto](http://www.&os;.org/docs/network/dhcp.html). An  in the [DHCP Howto](http://www.NetBSD.org/docs/network/dhcp.html). An
 appropriate `dhcpd.conf` entry could look like this:  appropriate `dhcpd.conf` entry could look like this:
   
             host nh-nas {              host nh-nas {
Line 198  NetBSD/sandpoint distribution and copy i Line 202  NetBSD/sandpoint distribution and copy i
 Then start the DHCP, NFS or TFTP server and boot the installation kernel  Then start the DHCP, NFS or TFTP server and boot the installation kernel
 from the firmware either with  from the firmware either with
   
     _MPC824X >   <pre>
   _MPC824X &gt; <strong>go 1000000 tftp:netbsd-INSTALL</strong>
   </pre>
   
 or from NFS:  or from NFS:
   
     _MPC824X >   <pre>
   _MPC824X &gt; <strong>go 1000000 nfs:netbsd-INSTALL</strong>
   </pre>
   
 Our bootloader configures the hardware, determines the IP address, loads  Our bootloader configures the hardware, determines the IP address, loads
 the kernel via network and launches it:  the kernel via network and launches it:
Line 285  the kernel via network and launches it: Line 293  the kernel via network and launches it:
   
 Just follow the usual procedure to install a NetBSD system.  Just follow the usual procedure to install a NetBSD system.
   
 Sandpoint installation window  <img src="//www.NetBSD.org/images/ports/sandpoint/install_window.jpg" alt="Sandpoint installation window" /></td>
   
 Post installation steps  Post installation steps
 =======================  =======================
   
Line 294  standalone when switched on, without the Line 303  standalone when switched on, without the
 you have to find a way to make your firmware automatically boot  you have to find a way to make your firmware automatically boot
 `altboot` and the kernel.  `altboot` and the kernel.
   
 Without a working `cp` command the only way to make your system  Without a working **cp** command the only way to make your system
 automatically boot NetBSD is to replace the Linux kernel on flash by  automatically boot NetBSD is to replace the Linux kernel on flash by
 `altboot.img`, which is our bootloader in PPCBoot image format, faking a  `altboot.img`, which is our bootloader in PPCBoot image format, faking a
 Linux kernel.  Linux kernel.
   
 When viewing the environment variables with `printenv` you can see that  When viewing the environment variables with **printenv** you can see that
 the `bootcmd` is calling `bootm` to load the Linux kernel. The first  the `bootcmd` is calling **bootm** to load the Linux kernel. The first
 address is the location which we have to overwrite with `altboot.img`.  address is the location which we have to overwrite with `altboot.img`.
 Here it is `0xffc10000`, which you have to replace in all the following  Here it is `0xffc10000`, which you have to replace in all the following
 commands, in case your `bootcmd` differs.  commands, in case your `bootcmd` differs.
Line 312  explained [above](#altboot). You might w Line 321  explained [above](#altboot). You might w
 image first. Then execute the following commands to overwrite it with  image first. Then execute the following commands to overwrite it with
 `altboot.img`:  `altboot.img`:
   
     _MPC824X >   <pre>
     Flash: upgrade Linux kernel in unProtect FFC10000 ... FFD8FFFF  _MPC824X &gt; <strong>load -k 1000000</strong>
     Un-Protected 24 sectors  Flash: upgrade Linux kernel in unProtect FFC10000 ... FFD8FFFF
     Erasing Flash...  Un-Protected 24 sectors
     ............. done  Erasing Flash...
     Erased 24 sectors  ............. done
     Writing to Flash... done  Erased 24 sectors
   Writing to Flash... done
   </pre>
   
 Additionally you may think about replacing the Linux RAM disk image at  Additionally you may think about replacing the Linux RAM disk image at
 the second address (`0xfff20000` in the example above) by an empty  the second address (`0xfff20000` in the example above) by an empty
Line 327  uncompress it with `gunzip(1)`). Or use  Line 338  uncompress it with `gunzip(1)`). Or use 
 dummy. Write it to flash as shown below. This will speed up the boot  dummy. Write it to flash as shown below. This will speed up the boot
 process, but is not really required.  process, but is not really required.
   
     _MPC824X >   <pre>
     RTL8169#0 configured  _MPC824X &gt; <strong>tftp 1000000 dummy.img</strong>
     ARP broadcast 1  RTL8169#0 configured
     TFTP from server 192.168.0.5; our IP address is 192.168.0.107  ARP broadcast 1
     Filename 'dummy.img'.  TFTP from server 192.168.0.5; our IP address is 192.168.0.107
     Load address: 0x1000000  Filename 'dummy.img'.
     Loading: #  Load address: 0x1000000
     done  Loading: #
     Bytes transferred = 64 (40 hex)  done
     _MPC824X >   Bytes transferred = 64 (40 hex)
     Flash: upgrade rootfs in unProtect FFF20000 ... FFFFFFFF  _MPC824X &gt; <strong>load -f 1000000</strong>
     Un-Protected 14 sectors  Flash: upgrade rootfs in unProtect FFF20000 ... FFFFFFFF
     Erasing Flash...  Un-Protected 14 sectors
     ......... done  Erasing Flash...
     Erased 14 sectors  ......... done
     Writing to Flash... done  Erased 14 sectors
   Writing to Flash... done
   </pre>
   
 Have fun with your mini NetBSD server!  Have fun with your mini NetBSD server!

Removed from v.1.3  
changed lines
  Added in v.1.4


CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb