提交 f6eb889b 编写于 作者: S Simon Fels

scripts: fine tune create rootfs package script

上级 795728aa
......@@ -4,23 +4,24 @@ TOPDIR=`echo $ANDROID_BUILD_TOP`
PRODUCT_NAME=generic_arm64
OUTDIR=out/target/product/$PRODUCT_NAME
CURDIR=`pwd`
TARGET=anbox-rootfs
if [ -d rootfs ] ; then
rm -rf rootfs
if [ -d $TARGET ] ; then
rm -rf $TARGET
fi
mkdir rootfs
cp -r $OUTDIR/root/* rootfs/
cp -r $OUTDIR/system/* rootfs/system/
mkdir $TARGET
cp -r $OUTDIR/root/* $TARGET/
cp -r $OUTDIR/system/* $TARGET/system/
mkdir rootfs/cache
mkdir $TARGET/cache
find out -name filesystem_config.txt -exec cp {} rootfs \;
if [ ! -e rootfs/filesystem_config.txt ] ; then
find out -name filesystem_config.txt -exec cp {} $TARGET \;
if [ ! -e $TARGET/filesystem_config.txt ] ; then
echo "ERROR: Filesystem config is not available. You have to run"
echo "ERROR: $ make target-files-package"
echo "ERROR: to generate it as part of the Android build."
rm -rf rootfs
rm -rf $TARGET
exit 1
fi
......@@ -30,13 +31,16 @@ if [ -z "$TOPDIR" ] || [ "$CURDIR" != "$TOPDIR" ] ; then
exit 1
fi
cp anbox-init.sh rootfs/
chmod +x rootfs/anbox-init.sh
cp anbox/scripts/anbox-init.sh $TARGET/
chmod +x $TARGET/anbox-init.sh
chmod 755 rootfs/init.*
chmod 755 rootfs/default.prop
chmod 755 rootfs/system/build.prop
chmod +x rootfs/anbox-init.sh
chmod 755 $TARGET/init.*
chmod 755 $TARGET/default.prop
chmod 755 $TARGET/system/build.prop
chmod +x $TARGET/anbox-init.sh
tar cf rootfs.tar rootfs
rm -rf rootfs
TARBALL_NAME=anbox-rootfs-`date +%Y%m%d%H%M`.tar
tar cf $TARBALL_NAME $TARGET
rm -rf $TARGET
echo "Created $TARBALL_NAME"
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册