Go to file
2015-06-20 12:40:45 +00:00
classes rockchip-update-img: add 'rootdelay=1' parameter in CMDLINE 2014-05-05 14:38:08 +02:00
conf conf: machine: Add rk3288.conf to be shared between all rk3288-based boards 2015-06-20 12:40:45 +00:00
recipes-bsp recipes-bsp: New recipe for Petitboot, a kexec-based bootloader 2015-04-19 16:20:32 +00:00
recipes-core Remove busybox bbappend, this is no longer required for "fido" 2015-06-15 19:04:31 +00:00
recipes-devtools/net-kexec recipies-devtools: Add net-kexec package 2015-01-23 17:20:28 +00:00
recipes-kernel/linux recipes-kernel: linux-petitboot: Backport gmac activation on firefly-rk3288 2015-04-21 17:53:19 +00:00
recipes-support recipes-support: Add new package rules for rkflashtool 2015-01-23 17:20:28 +00:00
COPYING.MIT Initial commit 2014-04-04 16:25:45 +02:00
README Update release version and some informations in README 2015-04-23 18:45:41 +00:00

This README file contains information on building the meta-rockchip BSP layer, and booting images. Please see the corresponding sections below for details.

Dependencies

This layer depends on:

{ URI: git://git.openembedded.org/bitbake branch: dizzy

AND

URI: git://git.openembedded.org/openembedded-core
layers: meta
branch: dizzy

}

OR

URI: git://git.yoctoproject.org/poky branch: dizzy

Patches

Please submit any patches against this BSP to https://github.com/linux-rockchip/meta-rockchip and cc: the maintainer:

Maintainer: Romain Perier romain.perier@gmail.com

Table of Contents

I. Configure yocto/oe environment II. Building a second level bootloader based on kexec III. Booting your device

I. Configure yocto/oe environment

In order to build an image with BSP support for a given release, you need to download the corresponding tools described in the "Dependencies" section. Be sure that everything is in the same directory.

~ $ mkdir yocto; cd yocto ~/yocto $ git clone git://git.yoctoproject.org/poky -b dizzy ~/yocto $ git clone https://github.com/linux-rockchip/meta-rockchip.git

Then you need to source the configuration script: ~/yocto $ source poky/oe-init-build-env

Having done that, you can build a image for a rockchip board by adding the location of the meta-rockchip layer to bblayers.conf, along with any other layers needed (to access common metadata shared between BSPs) e.g.:

/path/to/yocto/poky/meta
/path/to/yocto/meta-rockchip \

To enable the build for a specific board, add its name in the MACHINE variable to local.conf:

MACHINE ?= "radxa-rock"

All supported machines can be found in meta-rockchip/conf/machine.

You should then be able to build a image as such:

$ bitbake core-image-minimal

At the end of a successful build, you should have an image in /path/to/yocto/build/tmp/deploy//<IMAGE_NAME>. See Yocto manual for more details.

II. Building a second level bootloader based on kexec

This BSP contains "Petitboot", a kexec-based second leval bootloader. As all available bootloaders provided by Rockchip are very limited and do not allow to boot from a block device containing a file system or from the network, we decided to use Petitboot, which just needs a minimalistic kernel to work.

See https://www.kernel.org/pub/linux/kernel/people/geoff/petitboot/petitboot.html

In a terminal, just type the following command: ~/yocto $ bitbake linux-petitboot

At the end of a successful build, you should have an image /path/to/yocto/build/tmp/deploy//RK3XPetitbootLoader-.bin. This image is already to the right format, so you can directly flash it as a kernel image to a Rockchip device with upgrade_tool.

III. Booting your device

Petitboot allows you to boot a kernel from the EMMC, an SDCARD, an USB storage device or even tthe network (it just needs to be supported by the Linux kernel). In order to do so, you need to put a configuration file at the root of the target device. Petitboot supports differents kind of configuration files, in this example we will an SDCARD and a kboot configuration file.

Copy your kernel image and your dtb under the /boot directory, on your device. Then create a kboot.conf in / and add the following content:

linux-next from sdcard='/boot/zImage dtb=/boot/.dtb root=/dev/mmcblk0p2 rootwait console=ttyS2,115200 earlyprintk' linux-next from tftp='tftp://192.168.0.5/zImage dtb=tftp://192.168.0.5/.dtb root=/dev/mmcblk0p2 rootwait console=ttyS2,115200 earlyprintk'

You can also use nfs

nfs='nfs://192.168.0.5/fire/boot/vmlinux.strip root=/dev/nfs rw ip=dhcp video=1080p fbcon=rotate:3'

Or http and nfs mixed together

http_nfs='http://192.168.0.5/ice/boot/vmlinux.strip nfs://192.168.0.5/ice/boot/initrd root=/dev/nfs'

Then, plug your SDCARD into your Rockchip device and power on the board. If everything worked fine, Petitboot should be started automatically and list all entries found in the configuration file.