Diff for /wikisrc/ports/evbarm/install_using_sysinst.mdwn between versions 1.4 and 1.11

version 1.4, 2018/11/19 20:14:38 version 1.11, 2018/11/19 22:00:10
Line 4  In this document we will see step by ste Line 4  In this document we will see step by ste
 external media (SATA hard disk, USB stick or (u)SD card) using  external media (SATA hard disk, USB stick or (u)SD card) using
 [[!template id=man name="sysinst" section="8"]].  [[!template id=man name="sysinst" section="8"]].
   
   As practical example a BananaPI and a SATA hard disk will be used.
   However, the following instructions can be probably easily applied
   on other SoCs and medias with little adjustments.
   
   
 # Populating (u)SD card with `armv7.img`  # Populating (u)SD card with `armv7.img`
   
 *TODOleot*: (mostly) copy-paste instructions from allwinner.mdwn  - Download or build `armv7.img`, e.g.:
   
 *TODOleot*: Adjust/provide u-boot incantantions to boot on a BPI  [[!template id=programlisting text="""
   $ ftp http://cdn.NetBSD.org/pub/NetBSD/NetBSD-8.0/evbarm-earmv7hf/binary/gzimg/armv7.img.gz
   $ gunzip armv7.img.gz
   """]]
   
   - Write the image to (u)SD card:
   
 # Installing via sysinst(8)  [[!template id=programlisting text="""
   # dd if=armv7.img of=/dev/rsd0d bs=1m conv=sync
   """]]
   
   - Write u-boot to (u)SD card. `u-boot` images are provided by
   `sysutils/u-boot-<boardname>` packages, for example for Allwinner SoC:
   
 *TODOleot*: Document all sysinst(8) "screenshot"!  [[!template id=programlisting text="""
   # dd if=/usr/pkg/share/u-boot/&lt;boardname&gt;/u-boot-sunxi-with-spl.bin of=/dev/rld0d bs=1k seek=8 conv=sync
   """]]
   
   NetBSD/evbarm 8.0 does not automatically boot on the BananaPI.
   We can use the following commands to boot from the (u)SD cards in u-boot:
   
   [[!template id=programlisting text="""
   mmc dev 0
   setenv kernel netbsd-BPI.ub
   fatload mmc 0:1 82000000 $kernel
   bootm 82000000 root=ld0a console=fb
   """]]
   
   Or, to avoid typing them at every boot we can prepare an u-boot script via
   [[!template id=man name="mkubootimage" section="1"]].
   
   [[!template id=programlisting text="""
   $ cat boot.cmd
   mmc dev 0
   setenv kernel netbsd-BPI.ub
   fatload mmc 0:1 82000000 $kernel
   bootm 82000000 root=ld0a console=fb
   $ mkubootimage -A arm -n armv7 -T script boot.cmd boot.scr
   """]]
   
   ...and copy it on the populated (u)SD card:
   
   [[!template id=programlisting text="""
   # mount /dev/sd0e /mnt
   # cp /mnt/boot.scr /mnt/boot.scr.orig
   # cp boot.scr /mnt/
   """]]
   
   
   # Installing via sysinst(8)
   
 Now that the SD card is populated with `armv7.img` we can login as `root` (by  Now that the SD card is populated with `armv7.img` we can login as `root` (by
 default the password is empty) and run `sysinst`:  default the password is empty) and run `sysinst`:
Line 210  First we select the second entry ("b"),  Line 258  First we select the second entry ("b"), 
              | g: Linux native                   |               | g: Linux native                   |
              | h: Linux swap                     |               | h: Linux swap                     |
              | i: DOS FAT12                      |               | i: DOS FAT12                      |
              | <: page up, >: page down          |               | &lt;: page up, &gt;: page down          |
              +-----------------------------------+               +-----------------------------------+
   
   
Line 482  The installation will proceed as usual a Line 530  The installation will proceed as usual a
 please give a look to  please give a look to
 [The NetBSD Guide](https://www.netbsd.org/docs/guide/en/chap-exinst.html#exinst-choose-media).  [The NetBSD Guide](https://www.netbsd.org/docs/guide/en/chap-exinst.html#exinst-choose-media).
   
 *TODOleot*: add information how to populate `/boot` and prepare `boot.cmd`,  When the installation is completed, back to the shell we can populate
 `boot.scr`.  `/boot` partition of the hard disk ("wd0e") by just copying all
   files of the `/boot` partition of the (u)SD card (`armv7.img`):
   
 [[!template id=programlisting text="""  [[!template id=programlisting text="""
 # mount /dev/wd0e /mnt  # mount /dev/wd0e /mnt
 # cp -r /boot/* /mnt/  # cp -r /boot/* /mnt/
   # umount /mnt
   """]]
   
   Finally we can prepare a u-boot script (`boot.scr`) to load the kernel from the
   SATA hard disk and boot it:
   
   [[!template id=programlisting text="""
   $ cat boot.cmd
   scsi scan
   scsi dev 0
   setenv kernel netbsd-BPI.ub
   fatload scsi 0:1 82000000 $kernel
   bootm 82000000 root=wd0a console=fb
   $ mkubootimage -A arm -n armv7 -T script boot.cmd boot.scr
   """]]
   
   ...and copy them to the (u)SD `/boot`:
   
   [[!template id=programlisting text="""
   # cp boot.scr /boot
 """]]  """]]
   
   Please remember that in the early boot phase, u-boot and `boot.scr`
   are loaded from the (u)SD card and it loads the kernel present in
   the `/boot` partition of the hard disk.
   
   
 # References  # References
   

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


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