Gentoo Logo

Disclaimer : This document is not valid and is not maintained anymore.


[ << ] [ < ] [ Home ] [ > ] [ >> ]


10. Configuring the Bootloader

Content:

10.a. Making your Choice

Introduction

Now that your kernel is configured and compiled and the necessary system configuration files are filled in correctly, it is time to install a program that will fire up your kernel when you start the system. Such a program is called a bootloader.

Several bootloaders exist for Linux/ARM. You must choose one of the supported bootloaders, not all. Depending on the machine, you may have no choice at all!

Machine Supported Bootloaders
NetWinder NeTTrom
NSLU2 (aka SLUG) RedBoot
Loft RedBoot

10.b. NeTTrom

Upgrading NeTTrom

The NeTTrom bootloader is a specialized firmware developed specifically for the NetWinder machines. No other board uses this and due to its history, the source code is no longer available. However, there are firmware images of the last release still floating around, so the first thing you want to do is update to the last release of 2.3.3. This section is meant as a quickstart, not as a replacement for the full Firmware Upgrade HOWTO.

In order to flash your firmware, you need the latest release, the flashing utilities, and proper support in your kernel. The NetWinder flash driver is called NetWinder flash support and it is under Character devices in the kernel.

Code Listing 2.1: Install NeTTrom and NetWinder utilities

# emerge sys-boot/nettrom sys-block/nwutil

Warning: If the flashing of your firmware goes wrong, then you will be unable to recover via software means. Make sure you've taken all precautions against power failure and you read the flashwrite(8) man page.

Now that you have the latest firmware, you've installed the flash utilities, your kernel has flash write support, and you've read the flashwrite(8) man page, let's flash that sucker!

Code Listing 2.2: Flashing the NetWinder firmware

(First back up your existing firmware)
# dd if=/dev/nwflash of=/boot/nettrom.old bs=1

(Then write the new firmware)
# flashwrite /boot/nettrom

(Finally, verify that the write worked (replace BYTESIZE with the actual byte size of nettrom))
# dd if=/dev/nwflash of=/boot/nettrom.new bs=1 count=BYTESIZE
# cmp /boot/nettrom /boot/nettrom.new

If all goes well, you should be able to reboot and not be left with a brick. Let's move on to actually booting a kernel.

Using NeTTrom

NeTTrom can boot a kernel many different ways so we will go over the two most common: embedded in the flash and loading off the ext2 boot partition.

Embedding the kernel into flash is pretty easy with the nwlilo utility. Simply specify the path to the kernel you wish to embed as well as the kernel commandline (note that the root= value is important), and you're done!

Code Listing 2.3: Installing the kernel into flash

# nwlilo /boot/zImage "root=/dev/sda2 video=cyber2000fb"

The other method is copying the vmlinuz ELF to your ext2 boot partition and configuring NeTTrom to load that. Once you've copied your kernel over, reboot the machine as the only way to configure NeTTrom is from inside NeTTrom itself. Halt the autoboot process by pressing * twice followed by the return key. In the example below, we will assume your ext2 boot partition is at /dev/sda1 while your root partition is at /dev/sda3.

Code Listing 2.4: Configuring NeTTrom

NeTTrom> load-defaults
NeTTrom> setenv kernconfig fs
NeTTrom> setenv kerndev /dev/sda1
NeTTrom> setenv rootdev /dev/sda3
NeTTrom> setenv kernfile /boot/vmlinux
NeTTrom> setenv cmdappend [custom kernel cmdline settings]
NeTTrom> save-all
NeTTrom> boot

It isn't uncommon for NetWinders to have broken DMA hardware, so if your disks are giving you troubles when DMA is enabled, simply add ide=nodma to the cmdappend line above.

For a full NeTTrom command guide/reference, please see the NetWinder Firmware-HOWTO.

Now continue with Rebooting the System.

10.c. RedBoot

Upgrading RedBoot

The RedBoot firmware tends to be pretty popular due to its ease of use. We won't go over the process of updating your firmware as there's just too many ways you could get it wrong :). If you really want to update, please visit the RedBoot homepage.

Now continue with Rebooting the System.

10.d. Das U-Boot

Upgrading Das U-Boot

Das U-Boot tends to its power and portability. We won't go over the process of updating your version as there's just too many ways you could get it wrong :). If you really want to update, please visit the U-Boot homepage.

Now continue with Rebooting the System.

10.e. Rebooting the System

Exit the chrooted environment and unmount all mounted partitions. Then type in that one magical command you have been waiting for: reboot.

Code Listing 5.1: Exiting the chroot, unmounting all partitions and rebooting

# exit
cdimage ~# cd
cdimage ~# umount -l /mnt/gentoo/dev{/shm,/pts,}
cdimage ~# umount /mnt/gentoo{/proc,/boot,/sys,}
cdimage ~# reboot

Of course, don't forget to remove the bootable CD, otherwise the CD will be booted again instead of your new Gentoo system.

Once rebooted in your Gentoo installation, finish up with Finalizing your Gentoo Installation.


[ << ] [ < ] [ Home ] [ > ] [ >> ]


Print

View all

Page updated August 17, 2014

Summary: Due to the wide variety of embedded systems that use the ARM processor, we may not cover your bootloader.

Sven Vermeulen
Author

Grant Goodyear
Author

Roy Marples
Author

Daniel Robbins
Author

Chris Houser
Author

Jerry Alexandratos
Author

Seemant Kulleen
Gentoo x86 Developer

Tavis Ormandy
Gentoo Alpha Developer

Jason Huebel
Gentoo AMD64 Developer

Guy Martin
Gentoo HPPA developer

Pieter Van den Abeele
Gentoo PPC developer

Joe Kallar
Gentoo SPARC developer

Mike Frysinger
Gentoo * developer

John P. Davis
Editor

Pierre-Henri Jondot
Editor

Eric Stockbridge
Editor

Rajiv Manglani
Editor

Jungmin Seo
Editor

Stoyan Zhekov
Editor

Jared Hudson
Editor

Colin Morey
Editor

Jorge Paulo
Editor

Carl Anderson
Editor

Jon Portnoy
Editor

Zack Gilburd
Editor

Jack Morgan
Editor

Benny Chuang
Editor

Erwin
Editor

Joshua Kinard
Editor

Stuart Longland
Editor

Tobias Scherbaum
Editor

Xavier Neys
Editor

Gerald J. Normandin Jr.
Reviewer

Donnie Berkholz
Reviewer

Ken Nowack
Reviewer

Lars Weiler
Contributor

Donate to support our development efforts.

Copyright 2001-2014 Gentoo Foundation, Inc. Questions, Comments? Contact us.