Porting Guide/Kernel Fundamentals

From Tizen Wiki
Jump to: navigation, search

The kernel is the operating system that drives the platform. In this case, the kernel refers to the open source Linux kernel that is customized for the Tizen platform. The following section gives a brief overview about the Tizen kernel setup, configuration, and the build procedure for building a Linux kernel for your Tizen platform. The output of the kernel binary is a uImage that is suitable only for a u-boot boot loader. If you have chosen a secure booting configuration in your boot loader, this uImage must be compatible with your boot loader.

Kernel Configurations

To download the Tizen kernel source package, see Getting Source Code and Build. Set up or modify your kernel configuration, use the appropriate defconfig file from arch/arm/configs/ ( ARM CPU ).

For more detailed information about Tizen kernel configuration and kernel building, see Kernel Build.

Tizen uses INOTIFY instead of DNOTIFY. You must disable DNOTIFY from your kernel configuration.

If you want to use initramfs, you can use these configurations:


Tizen File System

Virtual Filesystem (VFS )

The virtual file system (VFS) is an abstraction layer on top of a more concrete file system (such as ext2, jfs, and ext4). The VFS provides a switching layer between the SCI (system call interface) and the file systems supported by the kernel, as shown in the following figure.


At the top of the VFS is a common API abstraction of functions, such as open, close, read, and write. At the bottom of the VFS are the file system abstractions that define how the upper-layer functions are implemented with respect to specific file system.

Below the file system layer is the page cache, which provides a common set of functions to the file system layer (independent of any particular file system). This caching layer optimizes access to the physical devices by keeping data around for a short time (or speculatively read ahead, so that the data is available when needed). Below the page cache are the device drivers, which implement the interface for the particular physical device.

Tizen Partition Layout

The following description is an example of the Tizen partition layout. The product vendor can modify the sequence or partition layout for their devices, as needed.


The boot partition is mounted in the /boot directory of rootfs. Here s-boot, u-boot, and the kernel image are saved as a file format, provided as system.tar.

  1. The CSA (Configuration Saved Area) partition is for non-volatile data, such as the calibration value of modem.
  2. The boot partition includes the kernel image, boot loader image, and modem image. Additionally, it can have device driver modules.
  3. Third partition is reserved for the future.
  4. The platform partition is mounted on the root directory. It contains fundamental frameworks for Tizen and some general utility for Linux. It canbe provided as a platform.img file.
  5. The data partition is mounted in the /opt directory and it includes applications, libraries of applications, and the platform database. It can be provided as a data.img file.
  6. The CSC (Customer Software Configuration) partition is mounted in the /mnt/csc directory. It can store the customer’s software configuration, such as the default language and time zone.
  7. The UMS (USB Mass Storage) partition is mounted in the /opt/media directory and it includes default (media) contents. It can be provided as ums.img.
  8. Each image file, platform.img, data.img, and ums.img can be zipped for downloading, for example, <IMAGE_NAME>.tar.gz.

File System Hierarchy Standard in Tizen

Each partition has the hierarchy illustrated in the following figure.


Supported File Systems in Tizen

Tizen supports the Extended 4 (ext4) file system. The Tizen kernel has to be compiled to enable support for the other file systems like JFS, XFS, BTRFS, and Reiserfs.

Default File System in Tizen

The Extended 4 (ext4) file system is configured as a default file system for Tizen.


The ext4 kernel configuration is done like this standard kernel configuration.


These are the configuration options to be enabled in the kernel configuration file.




Tizen supports MultiMediaCard, Secure Digital, and Secure Digital I/O Support. The MMC driver is implemented on top of host controller (such as SDHCI controller driver) and supports MMC, SD, SD High Speed, and SDHC cards.

If MMC is your booting device, read-write APIs, partition management, and flashing must be provided at the boot loader.


MSHCI/SDHCI Features Overview

The MMC/SD/SDIO driver supports the following features:

  • The driver is built in-kernel
  • MMC cards, including high speed cards
  • SD cards, including SD high speed and SDHC cards

MMC subsystem code structure in the kernel is located at /driver/mmc.

MMC subsystem structure is divided into 3 parts:

  • MMC block device driver located at /driver/mmc/card/
  • Protocol stack for MMC, SD, SDIO located at /driver/mmc/core/
  • Host controller driver located at /driver/mmc/host/

Hotplug MMC Event Handling in Tizen

Based on the hotplug event handling, the notification is passed to the deviced for device status changes. It detects, mounts, and monitors the status of the SD card.


The SDHCI controller is supported in the MMC/SD/SDIO interface. The Mobile Storage Host controller is only supported in the MMC interface.

  • Kernel Configuration for MMC Interface
    • CONFIG_MSHCI (for Mobile Storage Interface enable)
    • sys interface: /dev/mmcblk0pX
  • Kernel Configuration for SD/SDIO Interface
    • CONFIG_MMC_SDHCI (for SDHCI host Interface enable)
    • CONFIG_MMC_SDHCI_S3C (for Samsung SoC)
    • sys interface: /dev/mmcblk1pX

The X denotes the MMC partition number. Details of the partition mount point for Tizen are covered under Tizen Partition Layout.