中文 | IPCkit | Online Chat
Home Products Resource Services Store About Us

 Developer Resources
Developer Resources
SOC/NET-SAM9X25
CM-SAM9G45.
SBC-SAM9G45.
IPC-SAM9G45
SBC-SAM9G20.
IPC-SAM9G20.
SBC-SAM9G45 User Method
Getting Start
System Update
Function Test
Linux System Develop
Linux Application Develop
Support Center
Resource Download
FAQ
Resource
Forum
 

Developer Resources for Linux System Develop

Overview

Linux kernel for SBC-SAM9G45 modules provides support for on-board peripherals and abstracts the functionality provided by the hardware. Corewindprovides ready-to-run binary kernel images, and source code of the modifications and additions made to the Linux kernel to work properly with SBC-SAM9G45 modules.

If you want to compile the Bootloader for SBC-SAM9G45, see the Bootloader Devlopment for SBC-SAM9G45

Kernel command line

The Linux kernel for SBC-SAM9G45 is shipped with built-in command line parameters:

bootargs=noinitrd console=ttySAC6,115200 LcdMode=480x272MR-16@60 root=/dev/mtdblock2 rw rootfstype=yaffs2

The default kernel command line defines primary console, default display settings, root device and root filesystem type. Setting U-Boot bootargs environment variable overrides default kernel command line and can be used to set desired kernel parameters.

Building kernel for SBC-SAM9G45

Step 1.Prepare the Cross Compile tools

Copy the arm-2007q1-10-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 to /tmp folder, and uncompress it as follow:

# cd /tmp
# sudo tar xvjf arm-2007q1-10-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 -C /
Admolition note.png arm-2007q1-10-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 Position: CD:/linux/tools, Or [Download it here]

Step 2.Building the kernel

copy the file linux-2.6.30.tar.bz2 From CD to ubuntu system in PC.

# mkdir sam9g45
# cd sam9g45
# cp -a /media/cdrom/linux/code/linux-2.6.30.tar.bz2 . 
# tar -xjf linux-2.6.30.tar.bz2 -C 
# cd linux-2.6.30
Admolition note.png linux-2.6.30.tar.bz2 position: CD:\linux\code, Or Download it here

Then we can get the linux-2.6.30 folders in Linux folder, run the command to compile it:

# make sam9g45_defconfig
# make uImage

If there is no error, uImage should have been generated with a file size of about 1.5M-2Mbyte. you can get it in Arch/arm/boot folder.

Step 3. Building Root File System

The file rootfs.tar.bz2 was the filesystem, and we can edit it and then compress it.
Run the follow command to uncompress it and make it.

# cd sam9g45
# cp -a /media/cdrom/linux/image/rootfs.tar.bz2 . 
# cp -a /media/cdrom/linux/image/tools.tar.bz2 .
# tar -xjf tools.tar.bz2 -C ./ 
# sudo tar -xjf rootfs.tar.bz2 -C ./
# sudo ./tools/mkyaffs2image ./rootfs rootfs.yaffs2

Then you can get the rootfs.yaffs2 on the sam9g45 folder.

Admolition note.png rootfs.tar.bz2 position: CD:\linux\code, Or [Download it here]

tools.tar.bz2 position: CD:\linux\code, Or [Download it here]

Image address in the Flash

The Linux image contains 4 parts, namely bootloader, kernel, rootfs, this chapter will introduce the method to burning the image to the board
The Address for the parts was as follow:

Position Start Address Size Usage
DataFlash 0xC0000000 0x4200 Boot strap code
DataFlash C0004200 0x4200 U-boot environment
DataFlash 0xC0008400 0x39C00 U-boot
Nand Flash 0x0000 0x200000 logo
Nand Flash 0x200000 0x200000 Linux kernel
Nand Flash 0x400000 -- Root file system
 

 

  Tel: +86-755-29638421  |    Sales Email: market@ipckit.com |  Support Email: support@ipckit.com | Gtalk: armdevs@gmail.com  
IPCkit.com | Copyright @2012 - CoreWind Technology Co.,Limited