Skip to content
Snippets Groups Projects
Commit f2c40bcc authored by Lorenzo Pagliai's avatar Lorenzo Pagliai
Browse files

[RASPBERRY] Add support to Raspberry Pi 4 machine

* The Raspberry Pi 4 machine only supports U-Boot in Edgehog Things distro,
for this reason we introduce a check on the presence of U-Boot files and
eventually not deploy the package in case no files are found.
* At build time, we only check the number of U-Boot artifacts and give a
  warning if they are less than expected.
parent eade2597
No related branches found
No related tags found
No related merge requests found
...@@ -201,6 +201,11 @@ release: ...@@ -201,6 +201,11 @@ release:
{% set MACHINE = "seco-" + PROCESSOR + "-e58" %} {% set MACHINE = "seco-" + PROCESSOR + "-e58" %}
{% set DEFCONFIG = "seco_smarc_e58_genio700_edgehog" %} {% set DEFCONFIG = "seco_smarc_e58_genio700_edgehog" %}
{% set BUILD_DIR = "build_e58_genio700" %} {% set BUILD_DIR = "build_e58_genio700" %}
{% elif 'raspberrypi4-64' in machine %}
{% set PROCESSOR = "raspberrypi4-arm64" %}
{% set MACHINE = "raspberrypi4-64" %}
{% set DEFCONFIG = "raspberrypi4_64_edgehog" %}
{% set BUILD_DIR = "build_rpi4_64" %}
{% endif %} {% endif %}
{% if PROCESSOR == 'imx6' %} {% if PROCESSOR == 'imx6' %}
{% set UBOOT_FILE = "u-boot.imx" %} {% set UBOOT_FILE = "u-boot.imx" %}
...@@ -222,6 +227,10 @@ release: ...@@ -222,6 +227,10 @@ release:
{% set UBOOT_FILE = "bl2.img u-boot-initial-env fip.bin" %} {% set UBOOT_FILE = "bl2.img u-boot-initial-env fip.bin" %}
{% set KERNEL_FILE = "fitImage" %} {% set KERNEL_FILE = "fitImage" %}
{% set AZURE_PATH = "mediatek/" + machine %} {% set AZURE_PATH = "mediatek/" + machine %}
{% elif PROCESSOR == 'raspberrypi4-arm64' %}
{% set UBOOT_FILE = "u-boot.bin" %}
{% set KERNEL_FILE = "Image" %}
{% set AZURE_PATH = "raspberry/" + machine %}
{% endif %} {% endif %}
{% endif %} {% endif %}
{% for distro in DISTRO.split(' ')%} {% for distro in DISTRO.split(' ')%}
......
...@@ -18,11 +18,8 @@ if [[ $UBOOT_FILE != *"none"* ]]; then ...@@ -18,11 +18,8 @@ if [[ $UBOOT_FILE != *"none"* ]]; then
count_uboot_files=$(($count_uboot_files+$count_tmp)) count_uboot_files=$(($count_uboot_files+$count_tmp))
count_el=$((count_el+1)) count_el=$((count_el+1))
done done
if [ $count_uboot_files -eq 0 ]; then if [ $count_uboot_files -lt "$count_el" ]; then
echo "No uboot artifacts were compiled, exiting with error 1 .." echo "U-Boot artifacts lower than expected found, warning!"
exit 1
elif [ $count_uboot_files -gt 0 ] && [ $count_uboot_files -lt "$count_el" ]; then
echo "uboot artifacts lower than expected found, warning!"
else else
echo "All uboot artifacts were found!" echo "All uboot artifacts were found!"
fi fi
......
...@@ -49,25 +49,29 @@ case none in ...@@ -49,25 +49,29 @@ case none in
for el in $UBOOT_FILE; do for el in $UBOOT_FILE; do
find $ART_PATH -iname $el -exec cp -L {} $uboot_dir/ \; find $ART_PATH -iname $el -exec cp -L {} $uboot_dir/ \;
done done
tar -czvf $BASE_DIRECTORY/$uboot_filename -C $uboot_dir $(for el in ${UBOOT_FILE}; do echo $el; done) if [ -z "$(ls -A $uboot_dir 2>/dev/null)" ]; then
ls -la echo "No U-Boot artifacts found, not creating archive to deploy!"
else
tar -czvf $BASE_DIRECTORY/$uboot_filename -C $uboot_dir $(for el in ${UBOOT_FILE}; do echo $el; done)
ls -la
az storage blob upload --account-name $AZURE_STORAGE_ACCOUNT \
--sas-token $AZURE_STORAGE_SAS_TOKEN \
--container-name $AZURE_CONTAINER_NAME \
--file $BASE_DIRECTORY/$uboot_filename \
--name $AZURE_PATH/$DEPLOY_PATH/$uboot_filename \
--overwrite
if [ ! -n "$CI_COMMIT_TAG" ]; then
az storage blob upload --account-name $AZURE_STORAGE_ACCOUNT \ az storage blob upload --account-name $AZURE_STORAGE_ACCOUNT \
--sas-token $AZURE_STORAGE_SAS_TOKEN \ --sas-token $AZURE_STORAGE_SAS_TOKEN \
--container-name $AZURE_CONTAINER_NAME \ --container-name $AZURE_CONTAINER_NAME \
--file $BASE_DIRECTORY/$uboot_filename \ --file $BASE_DIRECTORY/$uboot_filename \
--name $AZURE_PATH/$DEPLOY_PATH/$uboot_filename_latest \ --name $AZURE_PATH/$DEPLOY_PATH/$uboot_filename \
--overwrite --overwrite
if [ ! -n "$CI_COMMIT_TAG" ]; then
az storage blob upload --account-name $AZURE_STORAGE_ACCOUNT \
--sas-token $AZURE_STORAGE_SAS_TOKEN \
--container-name $AZURE_CONTAINER_NAME \
--file $BASE_DIRECTORY/$uboot_filename \
--name $AZURE_PATH/$DEPLOY_PATH/$uboot_filename_latest \
--overwrite
fi
echo "Finishing U-Boot upload"
fi fi
echo "Finishing U-Boot upload"
;; ;;
esac esac
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment