Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[boot0]:remove no need files before extract image #460

Merged
merged 3 commits into from
Apr 1, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions files/Aboot/boot0.j2
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,13 @@ parse_environment_config() {
}

extract_image() {
## Clean old directory for read-write layer
rm -rf "$target_path/rw"

## Clean docker directory
rm -rf "$target_path/{{ DOCKERFS_DIR }}"
## Remove all the other unnecssary files except swi file, boot-config and boot0
for f in `ls -A $target_path`; do
if [ $f != "${swipath##*/}" ] && [ $f != "boot-config" ] && [ $f != "boot0" ]; then
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to preserve boot0? boot0 is embedded in the swi file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah. If so, we don't need to preserve it here. Was thinking it locates in /mnt/flash lol.

rm -rf "$target_path/$f"
fi
done


## Unzip the image
unzip -oq "$swipath" -x boot0 -d "$target_path"
Expand Down