Skip to content

Commit 04aa7bc

Browse files
committed
builder - adjust for the new image module changes
Get the default platforms to build for and the binary archive location via _get_info_image. Remove default "buster" dist. Make sure we have created "$scriptdir/$archive_dir/" before rsyncing existing archives to the chroot in case it doesn't exist. Remove logic check to skip rpi4 on stretch (not needed with the new image changes that provides this).
1 parent d46a068 commit 04aa7bc

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

scriptmodules/admin/builder.sh

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,17 @@ function chroot_build_builder() {
8383

8484
local dist
8585
local dists="$__builder_dists"
86-
[[ -z "$dists" ]] && dists="buster"
86+
[[ -z "$dists" ]] && return 1
8787

8888
local platform
8989
local platforms="$__builder_platforms"
90-
[[ -z "$platforms" ]] && platforms="rpi1 rpi2 rpi4"
9190

9291
for dist in $dists; do
92+
[[ -z "$platforms" ]] && platforms="$(_get_info_image "$dist" "platforms")"
93+
9394
local chroot_dir="$md_build/$dist"
9495
local chroot_rps_dir="$chroot_dir/home/pi/RetroPie-Setup"
95-
local archive_dir="tmp/archives/$dist"
96+
local archive_dir="tmp/archives/$(_get_info_image "$dist" "name")"
9697

9798
local distcc_hosts="$__builder_distcc_hosts"
9899
if [[ -d "$rootdir/admin/crosscomp/$dist" ]]; then
@@ -117,18 +118,13 @@ function chroot_build_builder() {
117118
sudo apt-get install -y git; \
118119
"
119120
# copy existing packages from host if building in a clean chroot to avoid rebuilding everything
120-
mkdir -p "$chroot_rps_dir/$archive_dir"
121+
mkdir -p "$scriptdir/$archive_dir/" "$chroot_rps_dir/$archive_dir"
121122
rsync -av "$scriptdir/$archive_dir/" "$chroot_rps_dir/$archive_dir/"
122123
else
123124
sudo -u $user git -C "$chroot_rps_dir" pull
124125
fi
125126

126127
for platform in $platforms; do
127-
if [[ "$dist" == "stretch" && "$platform" == "rpi4" ]]; then
128-
printMsgs "heading" "Skipping platform $platform on $dist ..."
129-
continue
130-
fi
131-
132128
rp_callModule image chroot "$chroot_dir" \
133129
sudo \
134130
__use_ccache="$use_ccache" \

0 commit comments

Comments
 (0)