International Conference on Microelectronics, Communication & Computing (MicroCom 2016)
Transplantation of U-Boot and Linux Kernel to OMAP-L138 Presented By:Suvendu Kumar Dash Department of Electronics and Communication Engineering Vel Tech Dr. RR & Dr. SR Technical University Chennai, Tamil Nadu, India
Contents • Abstracts • Introduction • Overview of OMAP-L138 • Transplantation Methods • Stability of Linux Kernel in OMAP-L138 • Conclusion • Reference
29-03-2016
Suvendu Kumar Dash
[email protected]
2
Abstracts • The OMAP - L138 DSP+ARM Processor is a dual core SoC developed by Texas Instrument. • This paper emphasises on retrieving the Linux Kernel code, analysing in specific aspect about the modules supported by OMAP - L138 Processor, altered source code of the Linux Kernel as per the requirement, Understanding Transplanting of Linux Kernel & U-boot (boot loader) mechanism according to the target board i.e. OMAP - L138 chip based customised board, cross compile and so on. • A new customised operating system is created which is suitable for the target board. The operating system is compiled and transplanted onto the target board successfully.
29-03-2016
Suvendu Kumar Dash
[email protected]
3
Overview of OMAP-L138
29-03-2016
Suvendu Kumar Dash
[email protected]
4
Transplantation Method • Here in this Paper we use two transplantation process • U-Boot Transplantation • Linux Kernel Transplantation
29-03-2016
Suvendu Kumar Dash
[email protected]
5
U-boot Transplantation LCDK Linux SDK Main Software Components Software Component
Purpose
U-boot Source
LCDK Bootloader. Loads Linux kernel from MMC/SD, NAND or NFS
ARMv5 File System
Bootable target file system that can be mounted via SD card or NFS
GCC Tool Chain
Open source GNU tools to cross compile ARM target programs
SYS/BIOS
Real Time OS for C674 DSP
SysLink
Inter Processor Communication (IPC) software to communicate between Linux and DSP applications
C6x Tool Chain
TI C6000 ISA tool chain to build DSP side applications
29-03-2016
Suvendu Kumar Dash
[email protected]
6
U-boot Transplantation
29-03-2016
Suvendu Kumar Dash
[email protected]
7
Transplantation of Linux Kernel • The Transplanting of Linux kernel is to rewrite source code of Linux operating system aimed at specific target platform, then install it to the target platform and make it run right. • In the Linux Transplanting method, it can be diminished, altered source code and so on to enhance the real-time nature of the new system or reduce the size of the fresh system. • Before transplantation we have to do so some step like • Configuration of Linux Kernel • Cross-Compile Linux Kernel
29-03-2016
Suvendu Kumar Dash
[email protected]
8
Configuration of Linux Kernel • There are several versions of Linux kernel configuration command run: • #make oldconfig • #make menuconfig • #make xconfig
• In this paper we are using #make menuconfig, which is a better option than other two configuration options.
29-03-2016
Suvendu Kumar Dash
[email protected]
9
Cont… Configuration files system: Y: Enable POSIX file locking API Y: Kernel automounter version 4 support Y: NFS client support Y: JFFS2 filesystem support Y: Compressed ROM file system support M: Simple RAM-based file system support Configuration MTD: Y: MTD partition support Y: Direct char device access to MTD devices Y: Caching block device access to MTD devices Y: NFTL Support Y: NAND ECC Smart Media byte order M: Simple Block Device for Nand Flash (BONFS) Y: Support for generic platform NAND driver Configure the system type: Y: omapl138 emif lcd support Y: DA850/OMAP-L138/AM18x based system Y: TI DA850/OMAP-L138/AM18x Reference Platform Suvendu Kumar Dash 29-03-2016
[email protected]
10
Cross Compilation Process • The Compiler is a power full tool, it transforms a series of numbers and symbols as the content of the high-level programming language into a machine language instruction set. • The cross- compilation is the use of one type of machines running on the compiler to compile a source program and create object code run on another machine. • Linux using the GNU tools, community developers compile the similar architecture of the cross compiler tool chain. It normally includes arm-gcc, binutils, glibc and so on. • Arm the linux-ld is a cross-linker and arm- linux-gcc is a cross compiler. 29-03-2016
Suvendu Kumar Dash
[email protected]
11
Cont… • Compilation of kernel is an easy process, once if it will configure with the #make command to the compilation of the kernel. • Implementation: • • • •
# make distclean # make uImage # make modules # make modules_install
29-03-2016
Suvendu Kumar Dash
[email protected]
12
Cont… •
• • •
If you would like to re-compile the kernel, and then use the command "#make distclean", which delete the dependency and remove old compiled documents and then repeat the previous steps. The image of the kernel is branching into a compressed kernel image and uncompressed kernel image. The compressed kernel image is called zImage and uncompressed kernel image is called uImage, located at arch/arm/boot path. Load this image file to the target board, the target board provides more complete common system peripherals, configure uboot startup parameters can be up and running Linux-2.6.37 kernel. 29-03-2016
Suvendu Kumar Dash
[email protected]
13
Stability of Linux Kernel in OMAP-L138 • After successfully transplanting of the Linux Kernel in the OMAPL138, we demonstrated by executing an application. We develop a driver for LCD which displays the alphabets, Symbol and numbers in LCD panel. • For that we develop the device driver of LCD by controlling the GPIO pin of the OMAP-L138.
29-03-2016
Suvendu Kumar Dash
[email protected]
14
Cont… We are using different functions structures are • module_init ( ) • module_exit ( ) • davinci_gpio_regs ( ) • Lcd_driver_init ( ) • Lcd_driver_config ( ) • Lcd_send_instruction ( ) 29-03-2016
• Lcd_send_data ( ) • Display_char ( ) • Display_line ( ) • Display_object ( ) • Pinmux_config ( ) • GPIO_set_pin_dir ( ) • GPIO_set_pin_outdata ( )
Suvendu Kumar Dash
[email protected]
15
Cont… • The Makefile will be used for crossing compile with the LCD device driver lcd.c in the following. • The cross-compilation chain of 2.6.37 is installed in the /usr/local/arm path of the directory. • In Figure clearly show the waveform on the LCD. In this waveform the blue line is for showing the lcd command, the pink line showing the chip selects and the green line is for write operation. The pink wave form and the green waveform are always same because the write operation is only possible when the chip select is enabled.
29-03-2016
Suvendu Kumar Dash
[email protected]
16
Cont…
29-03-2016
Suvendu Kumar Dash
[email protected]
17
Future Work • These are the following points suggested for future work: • After showing the stability of the kernel in OMAP, now it’s time to implement this product in real time device. • For use as a real time device, Optimisation of the Boot time is more essential. So if we will reduce the boot time and then only the value of the device will increase.
29-03-2016
Suvendu Kumar Dash
[email protected]
18
Conclusion • This paper discusses about the Linux kernel, OMAP-L138, Linux Kernel customisation, Process of Transplanting U-Boot and Linux Kernel to OMAP L138 and cross-compile the Linux kernel. • This paper also mentions the study of modules supported by OMAP - L138 to develop an architecture dependent code. • For checking the stability of customise kernel in OMAP-l138 we develop an LCD driver, this clearly visible that the driver of the LCD is working perfectly by displaying the characters, numbers and symbols. • So after that we conclude that we successfully transplanting of uboot and the modified Linux source code on the target board.
29-03-2016
Suvendu Kumar Dash
[email protected]
19
References [1] S. Yanpeng, P. Peng and Z. Yuan, “Linux Transplantation Based on The Processor S3C2440,” The Ninth International Conference on Electronic Measurement & Instruments-ICEMI 2009, Beijing, China. pp-306-309, DOI: http://dx.doi.org/10.1109/ICEMI.2009.5274593 [2] Texas Instruments OMAP-L138 C6000™ DSP+ ARM® Processor Technical Manual (2009). Available: http://www.ti.com/lit/ds/symlink/omap- l138.pdf [3] HU Jie and ZHANG Gen-bao, “Research Transplanting Method of Embedded Linux Kernel Based on ARM Platform,” International Conference of Information Science and Management Engineering-ISME 2010, Xi’an, China. pp-35-38, DOI: http://dx.doi.org/10.1109/ISME.2010.191 [4] Robert Love, “Getting Started with the Kernel” in Linux Kernel Development, 3rd ed.USA: Pearson Education, Inc. 2010, pp-11-21. [5] Greg Kroah-Hartman, “Configuring and Building” Linux Kernel In A Nutshell. Cambridge: O’Reilly Media, Inc. 2006, pp-17-26. 29-03-2016
Suvendu Kumar Dash
[email protected]
20
29-03-2016
Suvendu Kumar Dash
[email protected]
21