List Info

Thread: distrib/notes/armish/prep




distrib/notes/armish/prep
country flaguser name
Canada
2008-02-20 10:17:22
Lots of rewriting to make it better for the release,
including describing the "easy way" and the
"hard way"
to get into auto-booting. Looking for OK's as I'd like 
to get this in before the release if possible.

Thx
Ian

Index: prep
============================================================
=======
RCS file: /cvs/src/distrib/notes/armish/prep,v
retrieving revision 1.9
diff -u -p -r1.9 prep
--- prep	18 Jun 2007 14:50:34 -0000	1.9
+++ prep	20 Feb 2008 16:12:59 -0000
 -1,23
+1,31 
 dnl	$OpenBSD: prep,v 1.9 2007/06/18 14:50:34 ian Exp $
 To be able to boot the OpenBSD/MACHINE installation
program, you will
-need to acquire some limited knowledge of RedBoot, the
low-level
-process that controls the microprocessor after hardware
initialization.
+need to learn a bit about RedBoot, the low-level process
that controls
+the microprocessor after hardware initialization.
 dnl
 dnl XXX bootable partitions
-The enabled features between IOData HDL-G and Thecus N2100
vary so
+The enabled features between IOData HDL-G and Thecus N2100
vary, so
 different methods will be needed on both machines.
 
-The Thecus N2100 needs a serial cable. There is either a
10-pin
-header (with one pin removed) on the back of the disk
circuit board,
+Thecus cannot load a file from disk, but can load an image
+from flash or network.
+IOData can load an image from disk (ext2fs), however the
commands
+to load from flash are not available and network booting
does not appear
+to work.
+
+Talking to the Thecus
+
+The Thecus N2100 needs a serial cable. On the back of the
disk drive
+circuit board, there is either a 10-pin header (with one
pin removed),
 or 9 holes for you to solder in your own header.  The
ribbon cable
 that connects from there to your serial cable or the serial
port on
 your computer is of the same type as used on older i386
PCs, but
 be aware that there are two different types of 10-pin IDC
to DB-9M
 ribbon cable in use, which look identical (the differences
are hidden
-inside the DB-9 connector). The cable you need is wired
using the 
+inside the DB-9 connector). The cable you need is wired
using the
 "AT-Everex" or "Asus" pinout, as
described here:
 http://www.pccables
.com/07120.htm
-and not the more straightforward to solder
"crossed" type:
+and *not* the more straightforward to solder
"crossed" type:
 http://www.pccable
s.com/07121.htm.
 If you wish to check a cable, or make your own, the pinouts
are:
 DB9           IDC10
 -29,42
+37,27  Wire pin 1 to 1, 2 to 2 etc, with 10 not
 
 On the Thecus N2100, it is necessary to move jumper J3 to
J4 to properly
 route the serial port interrupt to allow serial to work
under OpenBSD.
-This jumper is under the disk drives, so you may wish to
ensure its 
-correct setting while you are installing the disk(s).  For
instructions 
+This jumper is under the disk drives, so you may wish to
ensure its
+correct setting while you are installing the disk(s).  For
instructions
 on assembling/disassembling your N2100, see the N2100
Manual at
 http://www.thecus.com/download/manual/N2100%20UM%20EN.p
df
 
-Thecus cannot load a file from disk, but can load an image
-from flash or network.
-IOData can load an image from disk (ext2fs), however the
commands
-to load from flash are not available and network booting
does not appear
-to work.
-
-Booting Thecus N2100 
+Booting Thecus N2100
 
 When you have connected your computer, a command like
"tip -115200 tty00"
 (assuming you're using the first serial port on your
machine) should 
-connect you to the Thecus console.
-
-Thecus RedBoot provides the 'fconfig' (not ifconfig)
command to
-change the boot configuration of the device. Also 'fis' is
provided
-to perform flash operations.
-
-Due to a change made by Thecus to the firmware, fconfig
does not
-work with Thecus firmware version 1.93 (Feb 2007) and
later, and
-*it is thus not possible to make the Thecus auto-boot into
OpenBSD*
-(worse, it will let you enter the "script"
commands below, but
-ignore them on boot).
+connect you to the Thecus console. Now apply power to the
Thecus
+and start it.
 
 After some device probe information, you should see this
prompt:
 
 == Executing boot script in 3.000 seconds - enter ^C to
abort
 
-To enter interactive RedBoot, it is necessary to press ^C
within a
-second or so of the prompt, it will typically accept the ^C
if typed 
+To enter interactive RedBoot, it is necessary to press ^C
within the given
+number of seconds of the prompt. It will typically accept
the ^C if typed 
 during the diagnostics that precede this prompt.
 
-The recommended way to install Thecus is to configure
networking and
+The recommended way to boot OpenBSD on Thecus is to
configure networking and
 load bsd.rd from a tftp server or http server. First
networking must be
 configured using the fconfig or ip_address commands.
 
 -74,7
+67,7  supported. (BOOTP configuration _may_ no
 
 Using ip_address only allows you to set the local IP
address and
 the IP address of the server where bsd.rd is located.  This
command
-also ensures that the new values will be used immediately.
+takes effect immediately but will not persist across a
reboot.
 
 eg:
 ---
 -84,89
+77,122  Default server: 10.0.0.7, DNS server IP:
 
 ---
 
-If you want to make permanent changes or you have to use 
-a more complicated network setup where you have to use a
-gateway or a nameserver, you have to use fconfig.
+Once you have done this, and have set up your TFTP server
on
+the gateway machine (10.0.0.7 in the above example), you
can
+boot manually.
+
+RedBoot> load /boot.armish
+Using default protocol (TFTP)
+Entry point: 0x00100000, address range:
0x00100000-0x00106804
+RedBoot> go
+>> OpenBSD/armish BOOT 1.0
+boot> boot /bsd.rd
+booting wd0a:/bsd.rd: 196+1878672+2663444+0+225844
[75+110592+98669]=0x4c49f0
+
+OpenBSD/armish booting ...
+initarm: Configuring system ...
+physmemory: 32768 pages at 0xa0000000 -> 0xa7ffffff
+[ using 209832 bytes of bsd ELF symbol table ]
+Copyright (c) 1982, 1986, 1989, 1991, 1993
+        The Regents of the University of California.  All
rights reserved.
+Copyright (c) 1995-2007 OpenBSD. All rights reserved.  http://www.OpenBSD.org
+
+OpenBSD 4.1-current (RAMDISK) #108: Thu Jun  7 22:09:18 MDT
2007
+    deraadtarmish.openbsd.org:/usr/src/sys/arch/armish/compile/R
AMDISK
+real mem  = 134217728 (128MB)
+avail mem = 121081856 (115MB)
+...
+Install(I), Upgrade(U) or Shell(S)?
+
+If you then install to your hard disk, in future you can
+load /boot the same way and just hit "return" to
boot OpenBSD.
+
+Automatic Booting
+
+However, for easier booting, you may wish to modify the
flash
+memory so that the Thecus will boot automatically into
OpenBSD
+when it is powered up. Doing so disables the devices'
built-in
+Linux kernel, however, and makes it difficult or impossible
to
+apply future RedBoot firmware upgrades. There are two
general 
+approaches:
+1) Just change the boot configuration (using 'fconfig') to
automate the 
+   above booting (your TFTP or HTTP boot server will still
be needed);
+2) Remove a file from the flash and replace it with
OpenBSD's /boot;
+   this configuration can be booted standalone.
+
+Thecus RedBoot provides the 'fconfig' (not ifconfig)
command to
+change the boot configuration of the device. Also 'fis' is
provided
+to perform flash operations.
+
+Due to a change made by Thecus to the firmware, fconfig
does not
+work with Thecus firmware version "1.93 (Feb
2007)" or later, and
+*it is thus not possible to make the Thecus auto-boot into
OpenBSD*
+(worse, it will let you enter the "script"
commands below, but
+ignore them on boot). To correct this, you must
"updgrade" your
+thecus down to version "1.93 Nov 29 2005" using
the file 
+n2100-downgrade-reboot.rom *before* you remove any files
from flash.
+You can get this file from Thecus; they have given
permission for
+it to be mirrored at http://www.darwins
ys.com/openbsd/. However,
+if you have removed files from flash before running this
downgrade,
+it is not believed to be possible to get your machine to
auto-boot.
+
+Once the downgrade is done, if your TFTP machine will
always be around,
+you can autoboot just by changing the boot script with
fconfig,
+as follows: (in this example, 192.168.1.254 is both the
default
+IP gateway and also the TFTP server):
 
-eg:
----
 RedBoot> fconfig
 Run script at boot: true
 Boot script: 
-.. fis load ramdisk
-.. fis load kernel
-.. exec
+.. load /boot.armish
+.. go
 Enter script, terminate with empty line
->>
-Boot script timeout (1000ms resolution): 1
+>> load /boot.armish
+>> go
+>> 
+Boot script timeout (1000ms resolution): 3
 Use BOOTP for network configuration: false
-Gateway IP address: 10.0.0.1
-Local IP address: 10.0.0.21
+Gateway IP address: 192.168.1.254
+Local IP address: 192.168.1.253
 Local IP address mask: 255.255.255.0
-Default server IP address: 10.0.0.7
+Default server IP address: 192.168.1.254
 Console baud rate: 115200
-DNS server IP address: 10.0.0.1
+DNS server IP address: 
 GDB connection port: 9000
 HW Status: 0
 Force console for special debug messages: false
-MAC address: [DO_NOT_MODIFY_MAC]
-MAC address 2: [DO_NOT_MODIFY_MAC]
+MAC address: 0x00:0x14:0xFD:0x30:0x25:0x14
+MAC address 2: 0x00:0x14:0xFD:0x30:0x25:0x15
 Network debug at boot time: false
 Reset default: Normal
-Serial number: N2100 V1.0.3
-Update RedBoot non-volatile configuration - continue (y/n)?
y
+Serial number: N2100 V2.1.06
 ... Unlock from 0xf0fc0000-0xf0fc1000: .
 ... Erase from 0xf0fc0000-0xf0fc1000: .
-... Program from 0x0ffd2000-0x0ffd3000 at 0xf0fc0000: .
+... Program from 0x07fd2000-0x07fd3000 at 0xf0fc0000: .
 ... Lock from 0xf0fc0000-0xf0fc1000: .
----
-
-Now that you have modified the configuration in the FLASH
-memory, you have to reset the box so the new configuration
-is going to be used upon boot.
-We have also removed the boot script by not re-entering
-it so you will be dropped to the RedBoot shell by default.
+RedBoot> 
 
-Recheck the new values and use the 'reset' command.
+This configuration can easily be set back to the default,
as the
+Linux system does not get erased from the flash memory. To
set it
+back, just change the boot script with fconfig back to what
it was,
+for example:
+
+	thecus_setip
+	fis load ramdisk
+	fis load kernel
+	exec -c "console=ttyS0,115200 root=/dev/ram0
initrd=0xa0800000,42M mem=128M0xa0000000"
 
----
+You could also remove the boot script altogether by not
re-entering
+it, so you would be dropped to the RedBoot shell by
default.
 
-Now that you have your network configured it is possible to
boot
-either from http
-RedBoot> load -m http /bsd.rd
-or tftp (to a configured tftp server, and Default server
configured)
-RedBoot> load bsd.rd
-
-after the ramdisk image is loaded, the 'go' command will
start the kernel
-eg:
----
-RedBoot> load bsd.rd
-Using default protocol (TFTP)
-Entry point: 0x00200000, address range:
0x00200000-0x00652180
-RedBoot> go
-
-OpenBSD/armish booting ...
-initarm: Configuring system ...
-physmemory: 32768 pages at 0xa0000000 -> 0xa7ffffff
-kernelsize text 1c7910 total 488728 end c0688728esym
c0688728
-physical_freestart a0689000 end a8000000
-[ no symbol table formats found ]
-Copyright (c) 1982, 1986, 1989, 1991, 1993
-        The Regents of the University of California.  All
rights reserved.
-Copyright (c) 1995-2006 OpenBSD. All rights reserved.  http://www.OpenBSD.org
+Recheck the new values and use the 'reset' command.
 
-OpenBSD 4.0 (RAMDISK) #34: Thu Aug 31 00:30:56 GMT 2006
-    deraadtarmish.openbsd.org:/usr/src/sys/arch/armish/compile/R
AMDISK
-...
 ---
 
-It is then possible to use bsd.rd to format and install the
HD on the Thecus.
+For the standalone booting option, you will have to load
/boot into
+the flash memory...
 
-In addition to installation, it is useful to configure the
Thecus to autoboot.
-This can be done either by overwriting part of the thecus
distribution rom
-or by loading the bootloader from the network.
-
-To overwrite the thecus rom and boot from the load device,
it is necessary
+To overwrite the Thecus ROM and boot from the load device,
it is necessary
 to delete a 'rom file' and load the openbsd bootloader
image there.  With
 networking configured (as above) remove a region and load
the 'boot' program.
 
 -183,12
+209,15  user              0xF0EA0000  0xF0EA0000
 ---
 
 There is no free space in the rom for the 'boot' program,
so something must
-be removed. WARNING, this will likely make the machine
unbootable into
-the original thecus server mode and it may not be
recoverable.
-EXTREME WARNING, do not touch the RedBoot, RedBoot config,
or FIS directory
-regions, doing so may brick the device.
+be removed. 
+WARNING: this will make the machine unbootable into the
original
+Thecus server mode and it is quite difficult to restore to
the
+original software.
+EXTREME WARNING: Do not touch the RedBoot, RedBoot config,
or FIS 
+directory regions, as doing so will probably brick the
device.
 
-Remove (with confirmation) a region to make space, eg user
+Remove (with confirmation) a region to make space, eg
'user' (the
+non-root files needed to run Linux from Flash Memory).
 ---
 RedBoot> fis delete user
 Delete image 'user' - continue (y/n)? y
 -199,14
+228,14  Delete image 'user' - continue (y/n)? y
 ... Lock from 0xf0fe0000-0xf1000000: .
 ---
 
-Load the armish openbsd bootloader 'boot' via tftp or http
+Load the Armish OpenBSD bootloader 'boot' via tftp or
http:
 
 ---
 RedBoot> load -m http /boot
 Entry point: 0x00100000, address range:
0x00100000-0x001067e0
 ---
 
-save that loaded file to flash
+Save that loaded file to flash:
 
 ---
 RedBoot> fis create boot
 -218,7
+247,7  RedBoot> fis create boot
 ... Lock from 0xf0fe0000-0xf1000000: .
 ---
 
-confirm its addition
+Confirm its addition:
 
 ---
 RedBoot> fis list
 -231,14
+260,14  kernel            0xF0D40000  0x00200000
 boot              0xF0EA0000  0x00100000  0x00020000 
0x00100000
 ---
 
-Now that the bootloader is in place, update fconfig to
autoboot OpenBSD
-----
+Now that the bootloader is in place, update fconfig to
autoboot OpenBSD:
+---
 RedBoot> fconfig
 Run script at boot: true
 Boot script:
 .. fis load ramdisk
 .. fis load kernel
-.. exec
+.. exec ...
 Enter script, terminate with empty line
 >> fis load boot
 >> go
 -250,17
+279,20  Update RedBoot non-volatile configuratio
 ... Erase from 0xf0fc0000-0xf0fc1000: .
 ... Program from 0x0ffd2000-0x0ffd3000 at 0xf0fc0000: .
 ... Lock from 0xf0fc0000-0xf0fc1000: .
-----
+---
 
 The important part is that 'Run script' is true and that
the commands are
 "fis load boot' and 'go' (note that 'boot' is the same
as the 'fis create boot'
-confirm the update and 'reset' to auto boot. The bootloader
is
-command driven with timeout like many other OpenBSD
architectures.
+confirm the update and 'reset' to auto boot. XXX What does
that mean??
+
+The bootloader is command driven with timeout like many
other OpenBSD
+architectures.
 
+------
 
 How to boot/install IOData HDL-G:
 
-The hda1 partition is the boot partition for linux, it
contains
+The hda1 partition is the boot partition for Linux; it
contains
 zImage and initrd. Since RedBoot only can boot from the
ext2fs partition
 it is very important that this partition be present and not
be reformatted.
 If this partition is destroyed, it will be necessary to
remove the HD and


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )