Updating Boot Files and Kernel Modules¶
Boot Files¶
There are two partitions on the E100 micro SD card, FAT and rootfs. The FAT partition contains essential boot information while other files (driver modules, application libraries, home directories, etc.) are located in the root file system, or rootfs. For details on the root file system, see Experimental_Images. The boot partition includes the following files.
- MLO: The stage 1 boot loader that configures external memory and loads the second stage boot loader.
http://dl.dropbox.com/u/14618236/MLO
- U-Boot: The stage 2 boot loader that loads the Linux kernel.
http://dl.dropbox.com/u/14618236/u-boot.bin-for-2.6.38
- uImage: The Linux kernel
http://dl.dropbox.com/u/14618236/uImage-2.6.38-r0a-usrp-e1xx.bin
Updating Boot Files¶
The boot files can be updated from the device itself, or by using another host with a micro SD card reader.
From the device¶
First make sure you can mount the FAT partition from Linux. You will need to add the line:
/dev/mmcblk0p1 /media/FAT auto defaults,sync,noauto 0 0
to /etc/fstab on the E100. Also make sure the directory /media/FAT exists. Then run:
# mount /media/FAT
These files are for use with the 2.6.35 kernel. Do not use them with the 2.6.38 kernel.
Using the files from this page, update your system by:
- Copy MLO to /media/FAT/MLO (Always copy the new MLO over the old one, if you remove MLO, you need to re-format the FAT partition and copy MLO on first)
- Copy u-boot.bin to /media/FAT/u-boot.bin
- Copy uImage to /media/FAT/uImage
- Type reboot to restart the device
Using separate host¶
Insert the SD card into a card reader. On most Linux distributions, the two partitions should mount automatically as "FAT" and "rootfs". If not, the partitions need to be mounted manually.
$ ls /media/ FAT rootfs
Install the MLO. Always copy a new MLO over the old one. If not performed properly, the partition will need to be reformatted.
$ cd /media/FAT $ cp <download location>/MLO MLO
Install the U-Boot image and Linux kernel
$ cp <download location>/u-boot.bin-for-2.6.38 u-boot.bin $ cp <download location>/uImage-2.6.38-r0a-usrp-e1xx.bin uImage
Unmount the partitions. Note that the umount may take up to a few minutes to sync before the SD card can be safely removed.
$ umount /media/FAT $ umount /media/rootfs
Linux Kernel Modules¶
The kernel modules include device drivers not compiled into the kernel or required during the boot process. The driver for the E100 interface to the FPGA is included with the modules. In most cases, the kernel modules will be included with root file system image, but the modules can also be added or updated independently to an existing file system.
- Linux kernel modules
http://dl.dropbox.com/u/14618236/modules-2.6.38-r0a-usrp-e1xx.tgz
Updating kernel modules¶
Kernel modules can be installed from the running device or by using another host with a card reader.
From the device¶
Unpack the modules tarball into the kernel modules directory. It is not necessary to remove any old or existing kernel modules.
# cd /lib/modules # tar xvfz <download location>/modules-2.6.38-r0a-usrp-e1xx.tgz
Force changes to disk (as an precaution) and reboot.
# sync # reboot
Generate module dependencies and reboot again.
# depmod -a # reboot
Using a separate host¶
Insert the SD card into a card reader and the two partitions should automatically mount. If not, then the partitions must be manually mounted.
$ ls /media/ FAT rootfs
Unpack the modules tarball into the mounted kernel modules directory. It is not necessary to remove any old or existing kernel modules.
$ cd /media/rootfs/lib/modules $ sudo tar xvfz <download location>/modules-2.6.38-r0a-usrp-e1xx.tgz
Unmount the partitions and remove the SD card from the card reader.
$ umount /media/FAT $ umount /media/rootfs
Insert the SD card back into the E100 and boot the device. Then generate module dependencies and reboot again.
# depmod -a # reboot
Checking that modules are loaded¶
Proper loading of the kernel module for the E100 can be checked using modinfo.
# modinfo usrp_e filename: /lib/modules/2.6.38+/kernel/drivers/misc/usrp_e.ko license: GPL v2 author: Philip Balister <philip@opensdr.com> description: usrp_e alias: usrp_e version: 0.2 srcversion: 54B93C229BDE6C18148ED20 depends: vermagic: 2.6.38+ preempt mod_unload modversions ARMv7