Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| freebsdavila [2008/06/17 21:37] – converted to 1.6 markup 127.0.0.1 | freebsdavila [2020/12/11 00:30] (current) – JohnMarkGurney | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== FreeBSD/arm for Gateworks Avila board ====== | ====== FreeBSD/arm for Gateworks Avila board ====== | ||
| - | This procedure has been tested on a %%FreeBSD%% HEAD system. | + | <callout type=" |
| + | **No longer supported** | ||
| + | |||
| + | Support for these boards have been removed. The last branch to support it is stable/11, but may need to go to previous stable branches for functional support. | ||
| + | </ | ||
| + | |||
| + | ===== Building and Booting Diskless ===== | ||
| ==== Build world ==== | ==== Build world ==== | ||
| < | < | ||
| - | make TARGET=arm TARGET_CPUTYPE=xscale | + | make TARGET_ARCH=armeb TARGET_CPUTYPE=xscale buildworld |
| </ | </ | ||
| - | ==== Setup an NFS root ==== | + | ==== Setup an new NFS root ==== |
| < | < | ||
| ROOT=/ | ROOT=/ | ||
| - | make TARGET=arm TARGET_CPUTYPE=xscale | + | make TARGET=arm TARGET_CPUTYPE=xscale |
| - | DESTDIR=$ROOT installworld | + | make TARGET=arm TARGET_CPUTYPE=xscale TARGET_ARCH=armeb DESTDIR=$ROOT distribution |
| - | mergemaster -m $SRC/etc -D $ROOT -i -A arm | + | mergemaster -m $SRC/etc -D $ROOT -i -A arm |
| </ | </ | ||
| Note: mergemaster will fail if used to install HEAD on a RELENG_6 system unless / | Note: mergemaster will fail if used to install HEAD on a RELENG_6 system unless / | ||
| + | Note: This will still fail to produce an NFS root image that can be logged in as root via control. | ||
| ==== Configure the NFS root for diskless use ==== | ==== Configure the NFS root for diskless use ==== | ||
| Consult diskless(8). | Consult diskless(8). | ||
| ==== Build and install a kernel ==== | ==== Build and install a kernel ==== | ||
| - | * Load the npe(4) microcode file IxNpeMicrocode.dat from http:// | ||
| - | **Is this still the case?** | ||
| < | < | ||
| - | make TARGET=arm KERNCONF=AVILA buildkernel | + | make TARGET=arm |
| - | make TARGET=arm KERNCONF=AVILA DESTDIR=$ROOT installkernel | + | make TARGET=arm |
| </ | </ | ||
| Line 69: | Line 74: | ||
| ==== Record the above commands ==== | ==== Record the above commands ==== | ||
| - | To record the above redboot script so that it's used every time the board is reset run the fconfig command at the redboot prompt and answer the questions. Past this you can setup a %%FreeBSD%% installation on compact flash and store a kernel in flash using redboot. | + | To record the above redboot script so that it's used every time the board is reset run the fconfig command at the redboot prompt and answer the questions. |
| - | so it is not yet possible to boot a kernel directly from compact flash (when formatted with UFS). | + | |
| - | ==== Boot kernel from CF ==== | + | ===== Building with Nanobsd ===== |
| - | On Avila: | + | |
| - | * Insert CF into the board. | + | The nanobsd(8) packaging system can be used to construct bootable compact flash images. |
| - | * Boot from NFS | + | |
| - | * fdisk ad0 | + | |
| - | * disklabel ad0s1 (remember that xscale-arm kernel is big-endian) | + | |
| - | * mount /dev/ad0s1a /mnt | + | |
| - | * cd /; find -x . | cpio -pdamuv /mnt | + | |
| - | On the NFS Host: | + | Run nanobsd. |
| - | * Adapt /sys/arm/conf/AVILA, comment | + | < |
| - | | + | cd tools/tools/nanobsd/gateworks |
| - | | + | sh ../nanobsd.sh -c ./avila |
| - | | + | </ |
| + | |||
| + | Note this will cross-compile world and a kernel then construct the disk image. | ||
| + | |||
| + | < | ||
| + | sudo ../ | ||
| + | </ | ||
| + | |||
| + | The file avila specifies the contents of the file system image and how to construct the disk image. | ||
| + | |||
| + | Nanobsd leaves the disk image in the / | ||
| + | |||
| + | < | ||
| + | dd if=_.disk.full of=/dev/da0 bs=32b | ||
| + | </ | ||
| + | |||
| + | The block size is important; if the transfer size does not reflect the expected geometry then the image written will/may be corrupted. | ||
| + | |||
| + | To update a nanobsd image you can use command line options for the script. | ||
| + | |||
| + | < | ||
| + | sudo ../ | ||
| + | </ | ||
| + | |||
| + | This will skip the buildworld stage then do a buildkernel with the -DNO_CLEAN option to reuse a previous build. | ||
| + | |||
| + | < | ||
| + | sudo ../ | ||
| + | </ | ||
| + | |||
| + | NOTE: At this time nanobsd does not know how to cross-build ports; the only way to add programs from the ports is to nfs mount a ports tree on a running Avila system and then build the programs. | ||
| + | |||
| + | ===== Boot kernel from CF ===== | ||
| + | |||
| + | Past this you can setup a %%FreeBSD%% installation on compact flash and use %%RedBoot%% to load a second level bootstrap from the onboard flash that loads %%FreeBSD%% from compact flash. | ||
| + | |||
| + | ==== On the build machine: ==== | ||
| + | |||
| + | Build a kernel configured to mount the file system from ad0. This is most easily done by copying the AVILA config file and stripping | ||
| + | |||
| + | Build the second level bootstrap program by entering the arm/xscale build environment and building sys/ | ||
| + | |||
| + | < | ||
| + | make TARGET_ARCH=arm TARGET_CPUTYPE=xscale TARGET_ARCH=armeb buildenv | ||
| + | cd sys/ | ||
| + | make | ||
| + | </ | ||
| + | |||
| + | Note that boot2 can be built to expect a BSD disklabel in the disk partition or not. The default build does not enable this because the bsdlabel program usually used to image disk labels is not endian-agonostic so is not usable on a little-endian | ||
| + | |||
| + | Once boot is built copy it to where tftp loads files from; e.g. | ||
| + | |||
| + | < | ||
| + | cp boot2 / | ||
| + | </ | ||
| + | |||
| + | ==== On the target board ==== | ||
| + | |||
| + | Download the boot2.avila file and write it to an image in the onboard flash (NB: we named the flash image boot2.freebsd | ||
| + | as opposed to the boot2.avila filename on the tftp server): | ||
| + | |||
| + | < | ||
| + | RedBoot> load boot2.avila | ||
| + | Using default protocol (TFTP) | ||
| + | Entry point: 0x00180000, address range: 0x00180000-0x00183384 | ||
| + | RedBoot> fis create boot2.freebsd | ||
| + | ... Erase from 0x50080000-0x500a0000: | ||
| + | ... Program from 0x00180000-0x00183384 at 0x50080000: . | ||
| + | ... Unlock from 0x50fe0000-0x51000000: | ||
| + | ... Erase from 0x50fe0000-0x51000000: | ||
| + | ... Program from 0x03fe0000-0x04000000 at 0x50fe0000: . | ||
| + | ... Lock from 0x50fe0000-0x51000000: | ||
| + | RedBoot> fis list | ||
| + | Name FLASH addr Mem addr Length | ||
| + | RedBoot | ||
| + | boot2.freebsd | ||
| + | FIS directory | ||
| + | RedBoot config | ||
| + | </ | ||
| + | |||
| + | You are now ready to boot from compact flash. | ||
| + | |||
| + | < | ||
| + | RedBoot> fis load boot2.freebsd | ||
| + | RedBoot> go | ||
| + | FreeBSD ARM (Avila) boot2 v0.2 | ||
| + | - | ||
| + | Default: /boot/kernel/kernel | ||
| + | boot: | ||
| + | KDB: debugger backends: ddb | ||
| + | KDB: current backend: ddb | ||
| + | Copyright (c) 1992-2008 The FreeBSD Project. | ||
| + | Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 | ||
| + | The Regents of the University of California. All rights reserved. | ||
| + | FreeBSD is a registered trademark of The FreeBSD Foundation. | ||
| + | FreeBSD 7.1-PRERELEASE #1: Fri Sep 26 14:37:41 PDT 2008 | ||
| + | root@trouble.errno.com:/ | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | To set the default boot to happen from compact flash just change the %%RedBoot%% configuration to do the above steps automatically; | ||
| + | |||
| + | < | ||
| + | RedBoot> fconfig | ||
| + | Run script at boot: true | ||
| + | Boot script: | ||
| + | .. load -b 0x200000 kernel-avila.nfs.vap7 | ||
| + | .. go | ||
| + | Enter script, terminate with empty line | ||
| + | >> fis load boot2.freebsd | ||
| + | >> go | ||
| + | >> | ||
| + | Boot script timeout (100ms resolution): | ||
| + | Use BOOTP for network configuration: | ||
| + | Gateway IP address: | ||
| + | Local IP address: | ||
| + | Local IP address mask: | ||
| + | Default server IP address: 10.0.0.251 | ||
| + | Console baud rate: 115200 | ||
| + | GDB connection port: 9000 | ||
| + | Force console for special debug messages: false | ||
| + | Network debug at boot time: false | ||
| + | Default network device: npe_eth0 | ||
| + | Update RedBoot non-volatile configuration - continue (y/n)? y | ||
| + | ... Unlock from 0x50fe0000-0x51000000: | ||
| + | ... Erase from 0x50fe0000-0x51000000: | ||
| + | ... Program from 0x03fe0000-0x04000000 at 0x50fe0000: . | ||
| + | ... Lock from 0x50fe0000-0x51000000: | ||
| + | </ | ||
| + | |||
| + | Now on reset you will boot from compact flash by default: | ||
| + | |||
| + | < | ||
| + | + | ||
| + | Trying NPE-B...success. Using NPE-B with PHY 0. | ||
| + | Ethernet eth0: MAC address 00: | ||
| + | IP: 192.168.3.2/ | ||
| + | Default server: 10.0.0.251 | ||
| + | |||
| + | RedBoot(tm) bootstrap and debug environment [ROM] | ||
| + | Gateworks certified release, version 2.02 - built 05:22:19, Mar 3 2006 | ||
| + | |||
| + | Platform: Gateworks Avila GW234X (IXP42X 533MHz) BE | ||
| + | Copyright (C) 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. | ||
| + | Copyright (C) 2004, 2005 Gateworks Corporation | ||
| + | |||
| + | RAM: 0x00000000-0x04000000, | ||
| + | FLASH: 0x50000000 - 0x51000000, 128 blocks of 0x00020000 bytes each. | ||
| + | == Executing boot script in 2.500 seconds - enter ^C to abort | ||
| + | RedBoot> fis load boot2.freebsd | ||
| + | RedBoot> go | ||
| + | FreeBSD ARM (Avila) boot2 v0.2 | ||
| + | - | ||
| + | Default: /boot/kernel/kernel | ||
| + | boot: | ||
| + | KDB: debugger backends: ddb | ||
| + | KDB: current backend: ddb | ||
| + | Copyright (c) 1992-2008 The FreeBSD Project. | ||
| + | Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 | ||
| + | The Regents of the University of California. All rights reserved. | ||
| + | FreeBSD is a registered trademark of The FreeBSD Foundation. | ||
| + | FreeBSD 7.1-PRERELEASE #1: Fri Sep 26 14:37:41 PDT 2008 | ||
| + | root@trouble.errno.com:/ | ||
| + | CPU: IXP425 533MHz rev 1 (ARMv5TE) (XScale core) | ||
| + | DC enabled IC enabled WB enabled LABT branch prediction enabled | ||
| + | 32KB/32B 32-way Instruction cache | ||
| + | 32KB/32B 32-way write-back-locking Data cache | ||
| + | real memory | ||
| + | avail memory = 58359808 (55 MB) | ||
| + | ath_hal: 0.10.5.10 (AR5210, AR5211, AR5212, AR5416, RF5111, RF5112, RF2413, RF5413, RF2133, RF2425, RF2417, REGOPS_FUNC) | ||
| + | ixp0: <Intel IXP425> on motherboard | ||
| + | pcib0: <IXP425 PCI Bus> on ixp0 | ||
| + | pci0: <PCI bus> on pcib0 | ||
| + | ath0: <Atheros 5413> irq 28 at device 1.0 on pci0 | ||
| + | ath0: [ITHREAD] | ||
| + | ath0: WARNING: using obsoleted if_watchdog interface | ||
| + | ath0: mac 10.4 phy 6.1 radio 6.3 | ||
| + | ath1: <Atheros 5413> irq 27 at device 2.0 on pci0 | ||
| + | ath1: [ITHREAD] | ||
| + | ath1: WARNING: using obsoleted if_watchdog interface | ||
| + | ath1: mac 10.5 phy 6.1 radio 6.3 | ||
| + | ixpclk0: <IXP425 Timer> on ixp0 | ||
| + | ixpiic0: <IXP425 GPIO-Based I2C Interface> | ||
| + | iicbb0: <I2C bit-banging driver> on ixpiic0 | ||
| + | iicbus0: <Philips I2C bus> on iicbb0 master-only | ||
| + | iicbus0: <unknown card> at addr 0 | ||
| + | iic0: <I2C generic I/O> on iicbus0 | ||
| + | ad74180: <Analog Devices AD7418 ADC> at addr 0x50 on iicbus0 | ||
| + | ds16720: <Dallas Semiconductor DS1672 RTC> at addr 0xd0 on iicbus0 | ||
| + | ixpwdog0: <IXP425 Watchdog Timer> on ixp0 | ||
| + | uart0: < | ||
| + | uart0: [FILTER] | ||
| + | uart0: console (115200, | ||
| + | uart1: < | ||
| + | uart1: [FILTER] | ||
| + | ixpqmgr0: <IXP425 Q-Manager> | ||
| + | ixpqmgr0: [ITHREAD] | ||
| + | npe0: <IXP NPE-B> on ixp0 | ||
| + | npe0: [ITHREAD] | ||
| + | npe0: remember to fix rx q setup | ||
| + | miibus0: <MII bus> on npe0 | ||
| + | ukphy0: <Generic IEEE 802.3u media interface> | ||
| + | ukphy0: | ||
| + | npe0: Ethernet address: 00: | ||
| + | npe1: <IXP NPE-C> on ixp0 | ||
| + | npe1: [ITHREAD] | ||
| + | npe1: remember to fix rx q setup | ||
| + | miibus1: <MII bus> on npe1 | ||
| + | ukphy1: <Generic IEEE 802.3u media interface> | ||
| + | ukphy1: | ||
| + | npe1: Ethernet address: 00: | ||
| + | ata_avila0: < | ||
| + | ata_avila0: [ITHREAD] | ||
| + | ata0: <ATA channel 0> on ata_avila0 | ||
| + | ata0: [ITHREAD] | ||
| + | led_avila0: < | ||
| + | ixpclk0: [FILTER] | ||
| + | Timecounter " | ||
| + | Timecounters tick every 10.000 msec | ||
| + | ad0: 61MB <SanDisk SDCFB-64 Vdg 1.17> at ata0-master PIO1 | ||
| + | Trying to mount root from ufs:ad0s1 | ||
| + | cp: utimes: /var/var: No such file or directory | ||
| + | cp: chown: /var/var: No such file or directory | ||
| + | cp: chmod: /var/var: No such file or directory | ||
| + | cp: chflags: /var/var: No such file or directory | ||
| + | Loading configuration files. | ||
| + | Entropy harvesting: kickstart. | ||
| + | Starting file system checks: | ||
| + | /dev/ad0s1: FILE SYSTEM CLEAN; SKIPPING CHECKS | ||
| + | /dev/ad0s1: clean, 35625 free (1 frags, 4453 blocks, 0.0% fragmentation) | ||
| + | /dev/ad0s3: FILE SYSTEM CLEAN; SKIPPING CHECKS | ||
| + | /dev/ad0s3: clean, 1917 free (5 frags, 239 blocks, 0.3% fragmentation) | ||
| + | Setting hostuuid: 8902ab18-8cef-11dd-b583-00026f3f9531. | ||
| + | Setting hostid: 0x5cb2bb66. | ||
| + | Mounting local file systems:. | ||
| + | Setting hostname: avila. | ||
| + | npe0: link state changed to UP | ||
| + | Starting Network: lo0 npe0. | ||
| + | ifconfig: npe0: bad value | ||
| + | Additional routing options:. | ||
| + | /etc/rc: WARNING: run_rc_command: | ||
| + | Generating host.conf. | ||
| + | Additional IP options:. | ||
| + | Mounting NFS file systems:. | ||
| + | Creating and/or trimming log files:. | ||
| + | Starting syslogd. | ||
| + | ELF ldconfig path: /lib /usr/lib | ||
| + | Initial arm initialization: | ||
| + | Additional ABI support:. | ||
| + | NFS access cache time=60 | ||
| + | Clearing /tmp (X related). | ||
| + | Starting local daemons:. | ||
| + | Updating motd. | ||
| + | Mounting late file systems:. | ||
| + | Starting sshd. | ||
| + | Starting cron. | ||
| + | Local package initialization: | ||
| + | Starting background file system checks in 60 seconds. | ||
| + | |||
| + | Sat Sep 27 23:54:08 UTC 2008 | ||
| + | |||
| + | FreeBSD/arm (avila) (ttyu0) | ||
| + | |||
| + | login: | ||
| + | </ | ||
| - | On Avila: | + | ==== Multiple Partitions ==== |
| - | * reboot | + | If you use the boot2 program |
| - | * CTRL-C before kernel loading (you need to config your cua*0 as 3wire via /etc/rc.d/serial to let CTRL-C work) | + | |
| - | * load -b 0x200000 kernel.ad0 | + | |
| - | * fis create kernel.ad0 (no need to overwrite | + | |
| - | * fconfig (to adapt the new kernel) | + | |