Skip to content

Commit

Permalink
08.export-stage: check installation before exporting boot files sources
Browse files Browse the repository at this point in the history
Export sources if the boot files were downloaded from SWDownloads or Artifactory.
If the boot files were installed via ADI APT Repository they will be downloaded later with 'apt'.

Update stages numbering after adding an intermediate stage.

Signed-off-by: mlradu <[email protected]>
  • Loading branch information
mlradu committed Aug 27, 2024
1 parent d3e0303 commit 491b713
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions stages/08.export-stage/02.export-sources/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ if [ "${EXPORT_SOURCES}" = y ]; then

######################## ADI boot sources ########################

if [ "${CONFIG_XILINX_INTEL_BOOT_FILES}" = y ]; then
# Check if Xilinx and Intel boot files were downloaded or installed via ADI APT Package Repository
if [[ "${CONFIG_XILINX_INTEL_BOOT_FILES}" = y && "${USE_ADI_REPO_CARRIERS_BOOT}" = n ]]; then
# Extract SHAs for Linux and HDL boot files in order to download the sources of the binaries from the same commit they were built.
LINUX_SHA=$(sed -n 9p "${BUILD_DIR}/boot/$XILINX_INTEL_PROPERTIES" |cut -d"'" -f2)
HDL_SHA=$(sed -n 5p "${BUILD_DIR}/boot/$XILINX_INTEL_PROPERTIES" |cut -d"'" -f2)
Expand All @@ -38,7 +39,8 @@ if [ "${EXPORT_SOURCES}" = y ]; then
https://github.com/analogdevicesinc/hdl/archive/${HDL_SHA}.zip
fi

if [ "${CONFIG_RPI_BOOT_FILES}" = y ]; then
# Check if RPI boot files were downloaded or installed via ADI APT Package Repository
if [[ "${CONFIG_RPI_BOOT_FILES}" = y && "${USE_ADI_REPO_RPI_BOOT}" = n ]]; then
if [[ ! -z ${ARTIFACTORY_RPI} ]]; then
RPI_SHA=$(sed -n 2p "${BUILD_DIR}/boot/$RPI_ARTIFACTORY_PROPERTIES" |cut -d'=' -f2)
else
Expand All @@ -49,7 +51,7 @@ if [ "${EXPORT_SOURCES}" = y ]; then
fi


######################## Debootstrap package source ########################
######################## Debootstrap package source ########################

# Download debootstrap sources
DEBOOTSTRAP_VERSION=$(debootstrap --version | cut -d' ' -f 2)
Expand All @@ -63,7 +65,7 @@ if [ "${EXPORT_SOURCES}" = y ]; then
mount --bind /kuiper-volume/sources/deb-src "${BUILD_DIR}/deb-src"

chroot "${BUILD_DIR}" << EOF
bash stages/07.export-stage/03.export-sources/01.deb-src-chroot/run-chroot-deb.sh
bash stages/08.export-stage/02.export-sources/01.deb-src-chroot/run-chroot-deb.sh
EOF
umount "${BUILD_DIR}/deb-src"
rm -r "${BUILD_DIR}/deb-src"
Expand All @@ -76,7 +78,7 @@ EOF
mount --bind /kuiper-volume/sources/deb-src-rpi "${BUILD_DIR}/deb-src-rpi"

chroot "${BUILD_DIR}" << EOF
bash stages/07.export-stage/03.export-sources/01.deb-src-chroot/run-chroot-rpi.sh "${CONFIG_DESKTOP}"
bash stages/08.export-stage/02.export-sources/01.deb-src-chroot/run-chroot-rpi.sh "${CONFIG_DESKTOP}"
EOF
umount "${BUILD_DIR}/deb-src-rpi"
rm -r "${BUILD_DIR}/deb-src-rpi"
Expand Down

0 comments on commit 491b713

Please sign in to comment.