Skip to content

Commit 96c8fba

Browse files
committed
Use the platform.tar.gz as a replacement for platform folder
1 parent d6cc8e6 commit 96c8fba

File tree

5 files changed

+17
-1
lines changed

5 files changed

+17
-1
lines changed

build_debian.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -647,5 +647,5 @@ fi
647647
pushd $FILESYSTEM_ROOT && sudo tar czf $OLDPWD/$FILESYSTEM_DOCKERFS -C ${DOCKERFS_PATH}var/lib/docker .; popd
648648

649649
## Compress together with /boot, /var/lib/docker and $PLATFORM_DIR as an installer payload zip file
650-
pushd $FILESYSTEM_ROOT && sudo zip --symlinks $OLDPWD/$ONIE_INSTALLER_PAYLOAD -r boot/ $PLATFORM_DIR/; popd
650+
pushd $FILESYSTEM_ROOT && sudo tar czf platform.tar.gz -C $PLATFORM_DIR . && sudo zip -n .gz $OLDPWD/$ONIE_INSTALLER_PAYLOAD -r boot/ platform.tar.gz; popd
651651
sudo zip -g -n .squashfs:.gz $ONIE_INSTALLER_PAYLOAD $FILESYSTEM_SQUASHFS $FILESYSTEM_DOCKERFS

files/Aboot/boot0.j2

+6
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,12 @@ extract_image() {
350350
## Unzip the image except boot0 and dockerfs archive
351351
unzip -oq "$swipath" -x boot0 "$dockerfs" -d "$image_path"
352352

353+
## Extrat the platform.tar.gz
354+
info "Extracting platform.tar.gz"
355+
mkdir -p $image_path/platform
356+
tar xzf $image_path/platform.tar.gz -C $image_path/platform
357+
rm -rf $image_path/platform.tar.gz
358+
353359
## detect rootfs type
354360
local mountstr="$(grep " $target_path " /proc/mounts)"
355361
local rootdev="$(echo $mountstr | cut -f1 -d' ')"

installer/arm64/install.sh

+3
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,9 @@ else
168168
unzip -op $ONIE_INSTALLER_PAYLOAD "$FILESYSTEM_DOCKERFS" | tar xz $TAR_EXTRA_OPTION -f - -C $demo_mnt/$image_dir/$DOCKERFS_DIR
169169
fi
170170

171+
mkdir -p $demo_mnt/$image_dir/platform
172+
tar xzf $demo_mnt/$image_dir/platform.tar.gz -C $demo_mnt/$image_dir/platform
173+
rm -rf $demo_mnt/$image_dir/platform.tar.gz
171174

172175
if [ "$install_env" = "onie" ]; then
173176
# Store machine description in target file system

installer/armhf/install.sh

+3
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,9 @@ else
168168
unzip -op $ONIE_INSTALLER_PAYLOAD "$FILESYSTEM_DOCKERFS" | tar xz $TAR_EXTRA_OPTION -f - -C $demo_mnt/$image_dir/$DOCKERFS_DIR
169169
fi
170170

171+
mkdir -p $demo_mnt/$image_dir/platform
172+
tar xzf $demo_mnt/$image_dir/platform.tar.gz -C $demo_mnt/$image_dir/platform
173+
rm -rf $demo_mnt/$image_dir/platform.tar.gz
171174

172175
if [ "$install_env" = "onie" ]; then
173176
# Store machine description in target file system

installer/x86_64/install.sh

+4
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,10 @@ else
549549
unzip -op $ONIE_INSTALLER_PAYLOAD "$FILESYSTEM_DOCKERFS" | tar xz $TAR_EXTRA_OPTION -f - -C $demo_mnt/$image_dir/$DOCKERFS_DIR
550550
fi
551551
552+
mkdir -p $demo_mnt/$image_dir/platform
553+
tar xzf $demo_mnt/$image_dir/platform.tar.gz -C $demo_mnt/$image_dir/platform
554+
rm -rf $demo_mnt/$image_dir/platform.tar.gz
555+
552556
if [ "$install_env" = "onie" ]; then
553557
# Store machine description in target file system
554558
if [ -f /etc/machine-build.conf ]; then

0 commit comments

Comments
 (0)