Booting SnapGear embedded Linux
来源:互联网 发布:淘宝买电视机怎么保修 编辑:程序博客网 时间:2024/05/29 08:57
Introduction
We are now ready to install Linux in our LEON3 embedded system. We will use a special version of SnapGear supporting LEON2 and LEON3 which can be downloaded from the Aeroflex Gaisler ftp site.
LEON Linux
There are two different versions of the Linux kernel in the Gaisler SnapGear distribution, namely 2.6.x and 2.0.x. The 2.0 version is modified for use with MMU-less LEON systems, it is called micro controller Linux –μCLinux. Version 2.6.x has support for MMU systems only, the kernel is from kernel.org with LEON specific patches and additional drivers mainly for GRLIB hardware. We will use2.6.21.1 a rather old version but good enough for our needs. For more information about SnapGear Linux read theSnapgear for LEON manual.
Download and install
We will goto the Linux download page.
Install the toolchain
We will download and install the LEON GLibC Cross-compiler (linux-x86 host) from the ftp site:
Installing SnapGear Linux 2.6
Download snapgear-2.6-p42.tar.bz2 from the Gaisler ftp site.
Install the SnapGear distribution anywhwere in your home directory by extracting it:
mkdir ~/SnapGear
cd ~/SnapGear
tar -xjf /path/to/dist/snapgear-2.6-p42.tar.bz2
Hardware support in Linux 2.6
Here is a list of GRLIB hardware blocks that are supported in Linux 2.6
- MMU
- LEON3 SMP
- GRETH 10/100/1000 Ethernet networking support
- SMC91x 10/100 Ethernet networking support
- OpenCores 10/100 Ethernet networking support
- PCI support (GRPCI)
- GRETH over PCI
- ATA DMA and non-DMA (ATACTRL)
- Host USB 1.1 and/or 2.0 (GRUSBHC)
- PS/2 support (GRPS2)
- SVGA Framebuffer (GRVGA)
- Text VGA support (APBVGA)
- I2C support (I2CMST)
- SPI support (SPICTRL)
- APBUART and GRTIMER
Configuring Linux
SnapGear comes with an easy to use graphical interface similar to the Linux kernel's configuration utility. From the GUI it is possible to select processor, Linux version, C library and what applications will be included into the root file system (ROMFS image) accessed by Linux during runtime. It is also possible to configure the boot loader parameters and configure the Linux kernel. The GUI can be launched by doing <make xconfig>.
The main configuration menu will appear. We will leave most of the settings unchanged for the time being, but there are a few things we must configure.
Click the Kernel/Library/Default Selection buttton and select kernel version linux-2.6.21.1. The version 2.6.29 seems to have some build problems. Select the Yes button for <Customize Vendor/User Settings> and go to the < Main Menu> and <Save and Exit>.
Then this window will open. We have to include some applications to make the build process finish without errors. For now we will only include BusyBox. Click the BusyBox button.
Enable the BusyBox application and go to the Main Menu and save and exit.
Fixing a bug
The first time we run make we got the following error message:
After searching the Gaisler support page I came up the following solution. Adding the line: #include <linux/limits.h> in the file:snapgear-2.6-p42/linux-2.6.21.1/scripts/mod/sumversion.c
Building SnapGear
After configuring the kernel and the applications it is possible to compile and build the SnapGear LEON Linux distribution using the command:make.
If the build is successfull, the images will be placed in the image sub-directory. There are two types of images.
- image.flashbz : PROM image that will first decompress the the kernel and applications into RAM and run everything from there
- image.dsu : RAM image suitable for download and excution on target hardware using the DSU, or on the TSIM/GRSIM simulators
Download SnapGear image
We will use GRMON to download and run the image. Here is the command to start GRMON using the USB cable:
grmon-eval -xilusb -nb -u
Here is the command using the ethernet connection (goes much faster):
grmon-eval -eth -ip <ip_address> -nb -u
and run.
- Booting SnapGear embedded Linux
- Speed up Booting Embedded System
- SnapGear Linux for LEON - 1 INTRODUCTION
- Booting cpio filesystem in Redboot embedded system
- Booting ARM Linux
- Booting ARM Linux
- Booting ARM Linux
- uClinux.snapgear
- uClinux.snapgear
- Booting
- Booting ARM Linux ATAG详解
- Booting ARM Linux ATAG详解
- Booting Linux from Windows' Boot Manager
- LPC: Booting Linux in five seconds
- Network Booting a Linux STB with PXE
- Uncompressing Linux...done, booting the kernel解决办法
- Uncompressing Linux..... done, booting the kernel.
- Linux无法启动解决 booting the kernel.
- svn更新项目时遇到被锁住的问题
- stdarg.h简介和使用
- hdu 1005 Number Sequence
- linux下定时执行程序
- Intel EPT硬件辅助性能评价
- Booting SnapGear embedded Linux
- 关于什么是 数据结构的精髓 -----总结
- C++指针入门(一)
- 设置linux开机进入字符界面
- php保留小数位数
- 北京气象局回应为何不发短信预警:存技术障碍。(你信吗)
- shell命令执行顺序
- (转载)uva题目难度分级列表
- ActionBar with Tab