www.cutedigi.com     Call Us:  303-834-7832    Email Us:  sales at cutedigi.com

Quick Find:    
Search
    
Use keywords to find the product you are looking for.
Categories
.NET Micro Frameworks
3D printer
Arduino
Arduino Kits
Arduino Shields
Audio
Book
Breakout Board
Cables
Cellular
Component
Development Tools
DMX512
Drone
EL
Ethernet
FPGA
GPS
LCD
Lighting LED
Powerline Communication
Programmer/Emulator
Project Case
Prototyping
Python-On-A-Chip
Raspberry Pi
Robotics
Security and Spy Camera
Sensor
Services
Storage
Tools
Tracking
Video
Wireless
Featured more
Pitaya: ANDROID 4.0 Development Kit With WiFI HDMI  GOOGLE TV
Pitaya: ANDROID 4.0 Development Kit With WiFI HDMI GOOGLE TV
 $39.00 
Specials more
CuHead Pro WiFi/Ethernet Shield with AirPlay/DLNA Audio
CuHead Pro WiFi/Ethernet Shield with AirPlay/DLNA Audio
 $55.90  $51.00 
ATWIN Quad-band GPRS/GSM Shield for Arduino
ATWIN Quad-band GPRS/GSM Shield for Arduino
 $49.00  $45.00 
Linker Kit for Raspberry Pi / pcDuino
Linker Kit for Raspberry Pi / pcDuino
 $29.00  $24.90 
LinkSprite JPEG Color Camera Serial UART Interface (TTL level)
LinkSprite JPEG Color Camera Serial UART Interface (TTL level)
 $44.00  $39.00 
pcDuino3: A20 Single Board Computer supports Arduino Programming
pcDuino3: A20 Single Board Computer supports Arduino Programming
 $77.00  $49.00 
WiFi  RedBack 1.0 -- Arduino  yellowjacket Compatible
WiFi RedBack 1.0 -- Arduino yellowjacket Compatible
 $75.00  $64.99 
  Top » Catalog » Linux Port Tutorial TQ2440 » TUT 7: Compile Kernel Image
TUT 7: Compile Kernel Image   by Patrick

7.1  Compile Kernel Image

 

Type:

#make zImage

to compile the image of kernel. After the compilation is done, there will be a file named zImages under "arch/arm/boot", we can burn this file into the TQ2440 board, and the boot will be like:

  

 

7.2 Save the Image to the specified location

For conviency, I also change the "Makefile" under "arch/arm/boot", in line 58, we added the following marked as red. The red part move the generated zImage to the root directory of the kernel, i.e.e, linux-2.6.25.8, and rename it as zImage.bin:

$(obj)/zImage:$(obj)/compressed/vmlinux FORCE
$(call if_changed,objcopy)
@cp -f arch/arm/boot/zImage zImage.bin
@echo ' Kernel: $@ is ready'

 

We also change the Makefile under the root directory, line line 1156 (2.6.25.8) and line 1255 (2.6.30.4), add the following (marked as red), so that when we do

 

#make distclean

 

to clean the generated files, the zImage under the root will also be removed.

 

distclean: mrproper
@find $(srctree) $(RCS_FIND_IGNORE)
( -name '*.orig' -o -name '*.rej' -o -name '*~' -o -name '*.bak' -o -name '#*#' -o -name '.*.orig'
-o -name '.*.rej' -o -size 0
-o -name '*%' -o -name '.*.cmd' -o -name 'core' )
-type f -print | xargs rm -f rm -f zImage.bin

Note 1: until now, the kernel can just barely boot, we haven't done any driver work of NAND Flash, so this is just first step.

Additional comments: We can also add a platform option for our board TQ2440, how to do?

An example explained using linux-2.6.30.4:

Add our own platform TQ2440 (follows SMDK244), first we analyze the dependency relationship of SMDK2440, mainly look at the Kconfig and Makefile under "arch/arm/machs3c2410/"
"arch/arm/mach-s3c2440/" and "arch/arm/plat-s3c24xx/". Two important options ARCH_S3C2410 and MACH_SMDK. We follow it to make our own platform config.

Copy "arch/arm/mach-s3c2440/mach-smdk2440.c" as "mach-tq2440.c"

(Note: in the already ported kernel source files we provided, because we first modify config of smdk2440 options, and then copy to TQ2440, so machsmdk2330.c and mach-tq2440.c are almost identical.)

Copy "arch/arm/plat-s3c24xx/common-smdk.c" as "common-EmbedSky.c"

Copy "arch/arm/plat-s3c24xx/include/plat/common-smdk.h" as"common-EmbedSky.h"

You can also refer to the ported kernel source files for reference.

Note 2: When porting Linux-2.6.30.4, modifying mac-smdk2440.c referring to mach-tq2440.c  in our files, and

modifying common-smdk.c refering to common-EmbedSky.c in the source files we provided.

This article was published on Sunday 11 April, 2010.
Current Reviews: 0  Write Review 
Tell a friend
Tell a friend about this article:     
Shopping Cart more
0 items
Articles
New Articles (0)
All Articles (82)
Android
Arduino (30)
DMX512 (1)
FPPA (3)
GPS (6)
Industry News (5)
Linux Port Tutorial TQ2440 (24)
MCU Zone (4)
Multitouch Display (2)
PCB/SMT Assembly Service (2)
Sensors (1)
Smart Home (4)
Cards Accepted
Cards We Accept