BuildSystem: Write my own disk image perm updater
If user's bash does not have bultin stat, updating image perms was terribly slow. This patch adds a simple c program that does the job without exec overhead
This commit is contained in:
@@ -42,9 +42,17 @@ build_toolchain () {
|
||||
$BANAN_TOOLCHAIN_DIR/build.sh
|
||||
}
|
||||
|
||||
build_tools() {
|
||||
perm_tool="$BANAN_TOOLS_DIR/update-image-perms"
|
||||
if [ ! -f "$perm_tool" ] || [ "$perm_tool" -ot "$perm_tool.c" ]; then
|
||||
gcc -O2 -Wall -Wextra -Werror -o "$perm_tool" "$perm_tool.c" || exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
create_image () {
|
||||
build_target all
|
||||
build_target install
|
||||
build_tools
|
||||
$BANAN_SCRIPT_DIR/image.sh "$1"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user