-
Notifications
You must be signed in to change notification settings - Fork 19
Yocto setup from scratch Example project ARM Azure Cloud Storage Gateway
The ARM-Azure Cloud Storage Gateway project aims to develop an embedded storage controller that will store user data into a SATA drive and interface with Microsoft Azure to enable cloud connectivity. The core of the storage controller will be the TI AM1808 chip, which has a high-performance ARM926EJ-S core with a built-in SATA controller.
To program the TI AM1808, a Yocto-based build system has been, allowing developers to create custom Linux distributions tailored to specific needs. The Linux kernel will be configured to enable the SATA and Ethernet interfaces to connect with Azure Blob Storage via the REST interface.
The project will require enabling support for the Embest SBC8018 board in both Linux Kernel and U-Boot. After porting the changes to the latest kernel and U-Boot, support for the platform needs to be added to the Yocto environment.
In this article I am going to describe the steps of creating a full project.
Below are the layers needed for creating custom distribution.
- poky
- meta-arm
- meta-openembedded
- meta-ti
Please refer to the implementation of ARM-Azure Cloud Storage Gateway https://github.com/sujoyray-ucolorado/final_project_AM1808_yocto to get an example of the project setup.
In addition of above layers, meta-aesd-proj layer was also created so that various project specific tools / implementations could be hosted using it.
Below are the steps one can follow:
- Create an empty git repository.
- For poky:
git submodule add https://git.yoctoproject.org/git/poky
- For meta-arm:
git submodule add https://git.yoctoproject.org/git/meta-arm
- For meta-openembedded :
git submodule add https://github.com/openembedded/meta-openembedded.git
- For meta-ti: It was forked from https://github.com/YoeDistro/meta-ti because actual TI repository is available under Gitlab.
The command is
git submodule add git@github.com:sujoyray-ucolorado/meta-ti-aesd-project.git
Below are the modifications made into meta-ti layer to add a custom platform
-
Under the conf/machine folder, following file was added /meta-ti-bsp/conf/machine/include/omapl138_aesd_proj.inc This file has been referred by various conf files.
-
The actual configuration file has been added under conf/machine /meta-ti-bsp/conf/machine/omapl138-aesd_proj.conf
-
In order to build U-BOOT following .bb file was added /meta-ti-bsp/recipes-bsp/u-boot/uboot-aesd-proj_git.bb
-
To build Linux kernel, following .bb file was added /meta-ti-bsp/recipes-bsp/u-boot/uboot-aesd-proj_git.bb
- meta-ti layer was designed for TI EVM board.
- It has various other components, such as LCD etc. which are not relevant for the project.
- The yocto build system is not appending device tree at the end of uIMage. Below were the changes need in in linux recipe to add devicetree along with uImage
uboot_prep_kimage:append () {
# This function is defined in kernel-devicetree.class
dtb_file=`get_real_dtb_path_in_kernel "${KERNEL_DEVICETREE}"`
mv linux.bin linux-orig.bin
cat linux-orig.bin "${dtb_file}" > linux+dtb.bin
ln -s linux+dtb.bin linux.bin
}
2. If uImage is the desired output, please customize below variables to match your board
UBOOT_ENTRYPOINT = "0xc0008000"
UBOOT_LOADADDRESS = "0xc0008000"
UIMAGE_LOADADDR = "0xc0008000"
KERNEL_IMAGE_COMPRESSION = ""
KERNEL_COMPRESSION_LEVEL = "0"
KERNEL_IMAGETYPES = "zImage uImage"
KERNEL_CLASSES += "kernel-uimage"
- Detailed video: Please refer: https://user-images.githubusercontent.com/111943882/235355265-93f321fa-97fc-4f9b-8c9d-72c79401cb62.mp4
- The project overview: Please refer: https://github.com/cu-ecen-aeld/final-project-sujoyray-ucolorado/wiki/ARM-Azure-Cloud-Storage-Gateway
- Full implementation: https://github.com/sujoyray-ucolorado/final_project_AM1808_yocto