Leon Anavi
IT Tips && Tricks

Tizen

Created: 10.11.2014 01:28 Last Modified: 16.11.2014 21:16 Views: 9171
Keywords: ARM, ARMv7, display, fbset, Linux, Radxa, RK3188, Rockchip, systemd, Tizen, Tizen:Common, zypper

Porting Tizen:Common to Radxa Rock

The following article will explain how to prepare a bootable microSD card with Tizen:Common for the open source hardware developer board Radxa Rock. This is a single board computer with Rockchip RK3188 SoC that features a quad core ARM Cortex-A9 @ 1.6 Ghz and Mali400-mp4 GPU. It should be possible to apply the same tutorial with some minor modifications for other devices with RK3188.

Tizen-rockchip

Tizen-rockchip is an open source project which offers configuration files and tutorials for porting Tizen:Common and other Tizen profiles to devices with Rockchip SoC. The first supported device is Radxa Rock.

Tizen:Common Image for Radxa Rock

Tizen:Common image for Radxa Rock is available for download here. The image should be used with HDMI HD (720p) monitor and it includes:

  • Linux kernel 3.0.36+ for Rockchip
  • Proprietary bootloader for Rockchip
  • Tizen:Common image for ARMv7
  • Wayland
  • Weston

Replace X with the letter corresponding to the micro SD card and execute the following commands to copy the image on micro SD card using a personal computer with Ubuntu (another Unix-like OS or Linux distribution):

umount /dev/sdX*
tar -jxvf radxa-rock-tizen-common-20141116.tar.bz2
sudo dd if=radxa-rock-tizen-common-20141116.img of=/dev/sdX
sync

Login as root using password tizen.

Building Tizen:Common for Radxa Rock from Scratch

Perform the following actions if you want to create your own Tizen:Common image for Rockchip RK3188 devices from scratch. Pay attention that the instructions are for advanced users only!

  1. Clone the Linux kernel and its modules for Rockchip.
    git clone -b radxa-stable-3.0 https://github.com/radxa/linux-rockchip.git
  2. Go the directory linux-rockchip
  3. cd linux-rockchip
  4. Create a configuration depending the hardware version of your Radxa board. For Rock is pro(Mid 2014) or the new lite(Mid 2014):
    make radxa_rock_pro_linux_defconfig 
    For Radxa Rock full version(2013) or the old lite(2013):
    make radxa_rock_linux_defconfig
  5. Build the Linux kernel for Rockchip devices:
    make -j 8 kernel.img
  6. Build kernel modules:
    mkdir modules
    make INSTALL_MOD_PATH=./modules modules modules_install
  7. Build Tizen:Common image for ARMv7 from scratch or download the image available for Sunxi devices.
  8. Prepare bootable micro SD card for Radxa Rock. You can do it using fdisk. Alternatively you can download the ubuntu image provided by Ian Morrison and after that to replace the rootfs with Tizen:Common. Make sure that weston is using frame buffer as explained at this article.
  9. Copy the bootloader and the kernel to partition /dev/sdX of the micro SD card following these instuctions.
  10. Copy the Tizen:Common to the partition /dev/sdX1 of the micro SD card using dd. Pay attention that the micro SD card should be unmounted before running dd. It is highly recommended to execute sync after dd.
  11. Mount the micro SD card and remove the line about boot from /etc/fstab.
  12. Copy kernel modules.
  13. Plug the microSD card into Radxa Rock and turn on the device.
  14. Login as root using password tizen and make sure that correct repository is configured. For example:
    zypper addrepo http://download.tizen.org/snapshots/tizen/common/latest/repos/arm-wayland/packages/ common-wayland-armv7l
  15. Download the source code of fbset:
    wget https://launchpad.net/ubuntu/+archive/primary/+files/fbset_2.1.orig.tar.gz
  16. Install packages make, gcc, bison, and flex:
    zypper install make
    zypper install gcc
    zypper install bison
    zypper install flex
  17. Build fbset from source and install it:
    make install
  18. Create file /etc/systemd/system/fbset.service to configure a systemd service that sets the frame buffer resolution before starting weston with the following configuration:
    [Unit]
    Description=Framebuffer resolution
    Before=display-manager-run.service
    
    [Service]
    User=display
    ExecStartPre=/sbin/fbset -a -xres 1280 -yres  720 -vxres 1280 -vyres  720
    ExecStart= /bin/echo 1 > /sys/class/graphics/fb0/enable
    StandardInput=tty
    TTYPath=/dev/tty7
    
    [Install]
    WantedBy=graphical.target
    
  19. Enable the unit to be started at boot time:
    systemctl enable fbset
  20. Reboot the board.

Troubleshooting

If you get a blank screen, try to fix the display with the following command:
echo 1 > /sys/class/graphics/fb0/enable
For more information regarding the display options and supported resolutions please have a look at Radxa Rock display guide.

See Also

How to adapt Tizen:Common ARM images to boot renesas rcar
Booting Linux on Radxa Rock
Boot from SD card on Radxa Rock
Linux-rockchip
Tizen-sunxi
Tizen Wiki: ARM


  Home | About | Contact | Disclaimer | Sitemap © 2009-2022 Leon Anavi. All rights reserved.