1
0
mirror of https://git.yoctoproject.org/meta-arm synced 2026-01-12 03:10:15 +00:00

iota: add distro related cofiguration

Add distro configuration and images recipes for tiny and core image for
iota distribution.

Change-Id: I31df5009dbd67b03016150833cc1a6905caa9ca2
Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
This commit is contained in:
Rui Miguel Silva
2019-07-12 16:43:29 +01:00
committed by Tushar Khandelwal
parent f815620455
commit ebb261e64b
4 changed files with 135 additions and 0 deletions

60
meta-iota/README.md Normal file
View File

@@ -0,0 +1,60 @@
# Iota OS
This is meta layer dedicated to support Arm fast models.
# Iota setup
The way to start the setup to build the distribution is to fetch the
iota-manifest. For that, first install repo tool from google:
```
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > /tmp/repo
sudo install -m 0755 /tmp/repo /usr/local/bin/repo;
```
and then fetch the manifest:
```
mkdir ~/iota; cd ~/iota
repo init -u oteutoehuote -b master -m default.xml
repo sync
```
after setup the following environment variables to set the distribution and the
machine type of the build, for now only vexpress-a32 is totally tested, but
others will follow:
```
export DISTRO="iota"
export MACHINE="vexpress-a32"
```
Then prepare the environment to run the build, in the top directory
```
source setup-environment
```
This will create and put you ready to start the build in a topdir/build-iota
directory, to start the build just type:
```
bitbake iota-tiny-image
```
The first build is long and can take several minutes to conclude, when finished
check the resulted binaries in the deploy directory
```
~/iota/build-iota/tmp-iota/deploy/images/vexpress-a32/
```
To load the resulted flash img in the FVP model
```
YOCTO_OUTDIR=~/iota/build-iota/tmp-iota/deploy/images/vexpress-a32
./host/FVP_Base_Cortex-A32x1 \
-C bp.secureflashloader.fname=${YOCTO_OUTDIR}/bl1.bin \
-C bp.flashloader0.fname=${YOCTO_OUTDIR}/iota-tiny-image-vexpress-a32.wic
```

View File

@@ -0,0 +1,14 @@
# SPDX-License-Identifier: MIT
#
# Copyright (c) 2019 Arm Limited
#
require conf/distro/poky-tiny.conf
DISTRO_NAME = "Iota - Tiny Linux Distribution"
DISTRO = "iota-tiny"
DISTRO_VERSION = "0.1"
INHERIT += "image-buildinfo"
TCLIBC = "musl"

18
meta-iota/conf/layer.conf Normal file
View File

@@ -0,0 +1,18 @@
# SPDX-License-Identifier: MIT
#
# Copyright (c) 2019 Arm Limited
#
# iota has a conf and classes directory, add to BBPATH
BBPATH .= ":${LAYERDIR}"
# iota has a packages directory, add to BBFILES
BBFILES += " \
${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS += "iota"
BBFILE_PATTERN_iota := "^${LAYERDIR}/"
BBFILE_PRIORITY_iota = "14"
LAYERSERIES_COMPAT_iota = "warrior"

View File

@@ -0,0 +1,43 @@
# SPDX-License-Identifier: Apache-2.0
#
# Copyright (c) 2019 Linaro, LLC
# Copyright (c) 2019 Arm Limited
#
# Iota Recipe to build tiny minimal image
#
SUMARY = "Iota Tiny Minimal Image"
DESCRIPTION = "Tiny Linux image for Iota Distribution"
LICENSE = "MIT"
IMAGE_LINGUAS = " "
IMAGE_FEATURES += "debug-tweaks"
IMAGE_FSTYPES += " wic"
DEPENDS += "u-boot-mkimage-native"
inherit core-image
# Remove Partition table if wic image is generated
do_cleanup_partition_table() {
echo "check if partition table exits in wic image"
header=$(head -c 4 ${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.wic | md5sum -b | cut -d ' ' -f1)
if [ ${header}=="d9a7c187f1dc40d183b645f61daa500f" ]; then
echo "remove partition table from wic image"
tail -c +1025 ${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.wic > ${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.img
mv ${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.img ${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.wic
fi
}
addtask do_cleanup_partition_table after do_image_wic before do_image_complete
do_image_make_ramfs() {
echo "adding uboot header to cpio.gz"
mkimage -A arm -O linux -C none -T ramdisk -n ramdisk -a 0x84000000 -e 0x84000000 -n "Iota Ramdisk" -d ${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.cpio.gz ${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.initramfs.cpio.gz
cd ${IMGDEPLOYDIR}; ln -s ${IMAGE_NAME}.rootfs.initramfs.cpio.gz ${IMAGE_LINK_NAME}.initramfs.cpio.gz
}
do_image_make_ramfs_corstone700() {
echo "u-boot not present in corstone700"
}
addtask do_image_make_ramfs after do_image_cpio before do_image_wic