From ProventusNova DeveloperWiki
Revision as of 14:42, 20 June 2025 by Admin (talk | contribs) (Initial creation of Create custom Yocto meta layer for MediaTek G510 board)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

About

This document shows a detailed guide on how to create a custom Yocto meta-layer for MediaTek G510 board.

Pre-requisites

1. The host machine must have the following requirements:

  • At least 90GB of space
  • At least 8GB RAM
  • Host OS must be a supported Linux distribution. (To see supported Linux Distributions, click supported distributions)

2. The following packages must be present in the host machine:

apt install build-essential chrpath cpio debianutils diffstat file gawk gcc git iputils-ping libacl1 liblz4-tool locales python3 python3-git python3-jinja2 python3-pexpect python3-pip python3-subunit socat texinfo unzip wget xz-utils zstd

Create meta-layer for MediaTek G510 board

Follow these steps to add meta-pn-mtk layer to your exisiting Yocto Project. And add the MACHINE and DISTRO needed for MediaTek G510 board.

Get a copy of meta-pn-mtk layer

Place the layer inside your Yocto Project layer.

git clone https://github.com/ProventusNova/meta-pn-mtk

Add the layer

You can either add the layer by editing the bblayers.conf file or add the layer by using the bitbake command.

Edit the bblayers.conf file by adding the layer manually.

BBLAYERS ?= " \
  ##OEROOT##/meta \
  ##OEROOT##/../meta-pn-mtk \
  "

Aternatively, you can add the layer by using the bitbake command.

bitbake-layers add-layer meta-pn-mtk

Edit the local.conf file

Edit the local.conf file in your build directory to use the DISTRO and MACHINE from the meta-pn-mtk

MACHINE ?= "mtk-g510"
DISTRO ?= "pn-mtk"

Edit or replace the layer.conf

Edit or replace the layer.conf to use the layer.conf file found in meta-pn-mtk.

It should contain the following:

# We have a conf and classes directory, add to BBPATH
BBPATH .= ":${LAYERDIR}"

# We have recipes-* directories, add to BBFILES
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend"

BBFILE_COLLECTIONS += "pn-mtk"
BBFILE_PATTERN_pn-mtk = "^${LAYERDIR}/"
BBFILE_PRIORITY_pn-mtk = "9"

# This should only be incremented on significant changes that will
# cause compatibility issues with other layers
LAYERVERSION_pn-mtk = "1"

LAYERDEPENDS_pn-mtk = " \
	core \
	mediatek-bsp \
	mediatek-tsn \
	mediatek-bluedroid \
	mediatek-demo \
	multimedia-layer \
	openembedded-layer \
	networking-layer \
	meta-python \
"

LAYERSERIES_COMPAT_pn-mtk = "scarthgap"

Need Further Support?

📞 Book Consultation Call: Show Calendar!

📩 Contact Via Email: support@proventusnova.com

🌐 Visit Our Website: ProventusNova.com