Skip to content

Commit 591e6bf

Browse files
authored
Merge pull request #28 from MistySOM/develop
2 parents 581ee5f + 5f39478 commit 591e6bf

11 files changed

+117
-32
lines changed

.github/workflows/build-yocto.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ on:
1111

1212
jobs:
1313
build-yocto:
14-
runs-on: self-hosted
14+
runs-on: DC02
1515

1616
steps:
1717
- uses: actions/checkout@v3
18+
with:
19+
submodules: recursive
1820

1921
- name: Build the Docker image
2022
run: cd Build && ./build.sh;
@@ -29,4 +31,6 @@ jobs:
2931
path: |
3032
Build/output/images/smarc-rzv2l/Image-smarc-rzv2l.bin
3133
Build/output/images/smarc-rzv2l/r9a07g054l2-smarc.dtb
34+
Build/output/images/smarc-rzv2l/r9a07g054l2-smarc-ar0234.dtb
35+
Build/output/images/smarc-rzv2l/r9a07g054l2-smarc-imx462.dtb
3236
Build/output/images/smarc-rzv2l/mistysom-image-smarc-rzv2l.tar.bz2

.github/workflows/check-submodule.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,16 @@ jobs:
2929
# Set the value of the environment variable with the same name as the variable
3030
echo "target_branch=$target_branch" >> $GITHUB_ENV
3131
32-
- name: 'Check Submodule Branch'
32+
- name: 'Check meta-mistysom Submodule Branch'
3333
uses: jtmullen/[email protected]
3434
with:
3535
path: Build/meta-mistysom
3636
branch: ${{ env.target_branch }}
3737
require_head: true
38+
39+
- name: 'Check meta-econsys Submodule Branch'
40+
uses: jtmullen/[email protected]
41+
with:
42+
path: Build/meta-econsys
43+
branch: ${{ env.target_branch }}
44+
require_head: true

.gitmodules

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
[submodule "Build/meta-mistysom"]
22
path = Build/meta-mistysom
33
url = https://github.com/MistySOM/meta-mistysom.git
4+
[submodule "Build/meta-mistylwb5p"]
5+
path = Build/meta-mistylwb5p
6+
url = https://github.com/MistySOM/meta-mistylwb5p.git
7+
[submodule "Build/meta-econsys"]
8+
path = Build/meta-econsys
9+
url = https://github.com/MistySOM/meta-econsys.git

Build/Dockerfile

+2
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,7 @@ COPY start.sh /home/yocto/
3636
COPY exec.sh /home/yocto/
3737
# copy mistysom layer from the submodule
3838
COPY --chown=yocto:yocto meta-mistysom $WORK/meta-mistysom
39+
COPY --chown=yocto:yocto meta-mistylwb5p $WORK/meta-mistylwb5p
40+
COPY --chown=yocto:yocto meta-econsys $WORK/meta-econsys
3941

4042
CMD ["/home/yocto/exec.sh"]

Build/build.sh

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/bin/bash
2-
git submodule sync
3-
git submodule update --init --recursive
4-
IMAGE_NAME="$(whoami)-rzv2l_vlp_v3.0.0"
2+
if [ "$1" == "-b" ]; then
3+
IMAGE_NAME="$(whoami)-rzv2l_vlp_v3.0.0_$(git branch --show-current)"
4+
else
5+
IMAGE_NAME="$(whoami)-rzv2l_vlp_v3.0.0"
6+
fi
57
docker build -t ${IMAGE_NAME}:latest .
68
(docker images | grep "^<none" | awk '{print $3}' | xargs docker rmi) || :

Build/meta-econsys

Submodule meta-econsys added at 276db78

Build/meta-mistylwb5p

Submodule meta-mistylwb5p added at e9d9a16

Build/meta-mistysom

Submodule meta-mistysom updated 35 files

Build/run.sh

+35-20
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33

44
usage() {
55
echo " Usage:
6-
$ $0 -c|--cpath : path to local cache (download & sstate)
7-
$ $0 -n|--no : starts container but does not invoke bitbake
8-
$ $0 -s|--sdk : start in developer mode,
9-
invokes building of SDK"
6+
$ $0 -b|--branch : attach current branch name when running the container
7+
$ $0 -c|--cpath : path to local cache (download & sstate)
8+
$ $0 -n|--no : starts container but does not invoke bitbake,
9+
start in developer mode
10+
$ $0 -s|--sdk : invokes building of SDK
11+
$ $0 -v|--verbose run script in verbose mode"
1012
}
1113
#OUTDIR is bind mopunted and will contain the compiled output from the container
1214
OUTDIR='output'
13-
CONTNAME="$(whoami)-rzv2l_vlp_v3.0.0"
1415
test -t 1 && USE_TTY="-it"
1516
MPU="rzv2l"
1617
str="$*"
@@ -25,6 +26,10 @@ then
2526
fi
2627
while [[ $# -gt 0 ]]; do
2728
case $1 in
29+
-b|--branch)
30+
BRANCH="_$(git branch --show-current)"
31+
shift #past argument
32+
;;
2833
-c|--cpath)
2934
CPATH="$2"
3035
DLOAD="1"
@@ -34,12 +39,14 @@ while [[ $# -gt 0 ]]; do
3439
-n|--no)
3540
NO="1"
3641
shift #past argument
37-
shift #past value
3842
;;
3943
-s|--sdk)
4044
SDK="1"
4145
shift #past argument
42-
shift #past value
46+
;;
47+
-v|--verbose)
48+
VERBOSE="1"
49+
shift #past argument
4350
;;
4451
-*|--*)
4552
echo "Unknown argument $1"
@@ -48,28 +55,36 @@ while [[ $# -gt 0 ]]; do
4855
;;
4956
esac
5057
done
51-
#Create OUTDIR if iot doesn't exist
58+
CONTNAME="$(whoami)-rzv2l_vlp_v3.0.0${BRANCH}"
59+
if [ ! -z ${VERBOSE} ]; then
60+
IGNORE_OUTPUT="2>&1 1>/dev/null"
61+
fi
62+
#Create OUTDIR if it doesn't exist
5263
if [ ! -d "${OUTDIR}" ];
5364
then
5465
mkdir ${OUTDIR}
5566
fi
56-
chmod 777 ${OUTDIR}
67+
chmod +w ${OUTDIR} ${IGNORE_OUTPUT}
68+
ret=$?
69+
if [ $ret -ne 0 ];
70+
then
71+
echo "Unable to obtain full acess permissions to ${OUTDIR} and its sub directories, edit the permissions of ${OUTDIR} accordingly! exit"
72+
exit -1
73+
fi
5774
if [ -z "${CPATH}" ];
5875
then
59-
chmod 777 ${CPATH}/downloads
60-
chmod 777 ${CPATH}/sstate-cache/${MPU}
6176
/usr/bin/docker run --privileged ${USE_TTY} --rm -e NO=${NO} -e SDK=${SDK} -e DLOAD=${DLOAD} -v "${PWD}/${OUTDIR}":/home/yocto/rzv_vlp_v3.0.0/out --name ${CONTNAME} ${CONTNAME}
6277
else
6378
#Create CPATH sub directories if they do not exist
64-
if [ ! -d "${CPATH}/downloads" ];
65-
then
66-
mkdir ${CPATH}/downloads
67-
fi
68-
if [ ! -d "${CPATH}/sstate-cache/${MPU}" ];
79+
mkdir -p ${CPATH}/downloads
80+
mkdir -p ${CPATH}/sstate-cache/${MPU}
81+
82+
chmod -R +w ${CPATH} ${IGNORE_OUTPUT}
83+
ret=$?
84+
if [ $ret -ne 0 ];
6985
then
70-
mkdir ${CPATH}/sstate-cache/${MPU}
86+
echo "Unable to obtain write permissions to ${CPATH} and its sub directories, edit the permissions of ${CPATH} accordingly! exit"
87+
exit -1
7188
fi
72-
chmod 777 ${CPATH}/downloads
73-
chmod 777 ${CPATH}/sstate-cache/${MPU}
74-
/usr/bin/docker run --privileged ${USE_TTY} --rm -v "${PWD}/${OUTDIR}":/home/yocto/rzv_vlp_v3.0.0/out -v "${CPATH}/downloads":/home/yocto/rzv_vlp_v3.0.0/build/downloads -v "${CPATH}/sstate-cache":/home/yocto/rzv_vlp_v3.0.0/build/sstate-cache -e NO=${NO} -e SDK=${SDK} -e DLOAD=${DLOAD} --name ${CONTNAME} ${CONTNAME}
89+
/usr/bin/docker run --privileged ${USE_TTY} --rm -v "${PWD}/${OUTDIR}":/home/yocto/rzv_vlp_v3.0.0/out -v "${CPATH}/downloads":/home/yocto/rzv_vlp_v3.0.0/build/downloads -v "${CPATH}/sstate-cache/${MPU}/":/home/yocto/rzv_vlp_v3.0.0/build/sstate-cache -e NO=${NO} -e SDK=${SDK} -e DLOAD=${DLOAD} --name ${CONTNAME} ${CONTNAME}
7590
fi

Build/start.sh

+33-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/bash
22
set -e
33
#Check hostname is a hexadecimal number of 12
4+
SOMHOSTNAME="MistySOM-V2L"
45
LOCALCONF="${WORK}/build/conf/local.conf"
56
hname=`hostname | egrep -o '^[0-9a-f]{12}\b'`
67
echo $hname
@@ -39,18 +40,46 @@ NUM_CPU=$(((mem+swp)/1000/1000/4))
3940
#NUM_CPU=`nproc`
4041
##Update number of CPUs in local.conf
4142
sed -i "1 i\PARALLEL_MAKE = \"-j ${NUM_CPU}\"\nBB_NUMBER_THREADS = \"${NUM_CPU}\"" ${LOCALCONF}
43+
# Comment out the line that flags GPLv3 as an incompatible license
44+
sed -i '/^INCOMPATIBLE_LICENSE = \"GPLv3 GPLv3+\"/ s/./#&/' ${LOCALCONF}
45+
# append hostname to local.conf
46+
echo "hostname_pn-base-files = \"${SOMHOSTNAME}\"" >> ${LOCALCONF}
4247
#build offline tools, without network access
4348
if [ -z $DLOAD ];
4449
then
4550
sed -i 's/BB_NO_NETWORK = "0"/BB_NO_NETWORK = "1"/g' ${LOCALCONF}
4651
fi
47-
#addition of meta-mistysom layer to bblayers.conf
48-
sed -i 's/renesas \\/&\n ${TOPDIR}\/..\/meta-mistysom \\/' ${WORK}/build/conf/bblayers.conf
49-
#
52+
53+
#Add configuration details for Laird LWB5+ module according to: https://github.com/LairdCP/meta-summit-radio/tree/lrd-10.0.0.x/meta-summit-radio-pre-3.4
54+
cat <<EOT >> ${LOCALCONF}
55+
PREFERRED_RPROVIDER_wpa-supplicant = "sterling-supplicant-lwb"
56+
PREFERRED_RPROVIDER_wpa-supplicant-cli = "sterling-supplicant-lwb"
57+
PREFERRED_RPROVIDER_wpa-supplicant-passphrase = "sterling-supplicant-lwb"
58+
PREFERRED_RPROVIDER_wireless-regdb-static = "wireless-regdb"
59+
EOT
60+
61+
#addition of meta-mistysom & mistylwb5p layers to bblayers.conf
62+
sed -i 's/renesas \\/&\n'\
63+
' ${TOPDIR}\/..\/meta-mistysom \\\n'\
64+
' ${TOPDIR}\/..\/meta-econsys \\\n'\
65+
' ${TOPDIR}\/..\/meta-mistylwb5p\/meta-summit-radio-pre-3.4 \\\n'\
66+
' ${TOPDIR}\/..\/meta-openembedded\/meta-networking \\'\
67+
'/' ${WORK}/build/conf/bblayers.conf
68+
69+
# Disable recipes, tried BBMASK but was not working
70+
rm -rf ${WORK}/meta-mistylwb5p/meta-summit-radio-pre-3.4/recipes-packages/openssl
71+
rm -rf ${WORK}/meta-mistylwb5p/meta-summit-radio-pre-3.4/recipes-packages/summit-*
72+
rm -rf ${WORK}/meta-virtualization
73+
74+
# add dunfell compatibility to layers where they're missing to avoid WARNING
75+
echo "LAYERSERIES_COMPAT_qt5-layer = \"dunfell\"" >> ${WORK}/meta-qt5/conf/layer.conf
76+
echo "LAYERSERIES_COMPAT_rz-features = \"dunfell\"" >> ${WORK}/meta-rz-features/conf/layer.conf
77+
echo "LAYERSERIES_COMPAT_summit-radio-pre-3.4 = \"dunfell\"" >> ${WORK}/meta-mistylwb5p/meta-summit-radio-pre-3.4/conf/layer.conf
78+
5079
echo " ------------------------------------------------
5180
SETUP SCRIPT BUILD ENVIRONMENT SETUP SUCCESSFUL!
5281
run the following commands to start the build:
53-
'cd ~/rzv_vlp_v3.0.0/'
82+
'cd ${WORK}'
5483
'source poky/oe-init-build-env'
5584
'bitbake mistysom-image'"
5685
cd ~/rzv_vlp_v3.0.0

README.md

+20-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
# MistySOM-V2L
22

3-
This repository contains data that relate to the **MistySOM-V2L** version.
3+
This repository contains data that relate to the **MistySOM-V2L** version. It includes the [Build](Build/) container to build a Linux kernel, device tree & rootfs for MistySOM
44

5-
- It includes the [Build](Build/) container to build a Linux kernel, device tree & rootfs for MistySOM
5+
## Requirements
6+
7+
The build environment requires a Linux operating system with a Docker Engine installed. (Read [here](https://docs.docker.com/desktop/install/linux-install/) for installation)
8+
9+
As the first build can take hours to complete, it is highly recommended that the machine would have a powerful CPU, at least 16 GB of RAM, and at least 100 GB of SSD. *(Note that later builds would be faster using the previous build caches)*
10+
11+
It is important to be sure that the docker engine has enough space to work. By default, the engine uses the path `/var/lib/docker` which will be very limited if the root partition is separated from the home partition. So we recommend that you move the default location to a bigger partition. (Read [here](https://linuxconfig.org/how-to-move-docker-s-default-var-lib-docker-to-another-directory-on-ubuntu-debian-linux) for moving docker)
12+
13+
## How to Run
14+
15+
Run the commands below to start the build:
16+
17+
````
18+
git clone --recursive https://github.com/MistySOM/rzv2l.git
19+
cd rzv2l/Build
20+
./build.sh
21+
./run.sh
22+
````
23+
Details about the container and its parameters are mentioned [here](Build).

0 commit comments

Comments
 (0)