Skip to content
Snippets Groups Projects

merge main to dev

Merged Guillaume LA ROQUE requested to merge main into dev
1 file
+ 20
5
Compare changes
  • Side-by-side
  • Inline
+ 20
5
@@ -15,6 +15,7 @@ Usage: package_aosp.sh <options>
--out-dir: android's OUT_DIR where the files are collected from
--name: package output name
--extra-target-files: space separated list of out/target/product/* files to be added
--extra-host-files: space separated list of host/linux-x86/bin/* files to be added
--ignore-missing: don't error if we can't copy some files (useful for failed builds)
DELIM__
}
@@ -23,7 +24,8 @@ function package_aosp {
local outdir="$1"
local name="$2"
local extra_target_files="$3"
local ignore_missing="$4"
local extra_host_files="$4"
local ignore_missing="$5"
local package_tempdir="${PWD}/${name}"
local package_fullpath="${PWD}/package/${name}.tar.gz"
@@ -39,6 +41,8 @@ function package_aosp {
userdata
vbmeta
super
vendor_boot
init_boot
)
echo "[*] copying images: $images"
@@ -61,8 +65,17 @@ function package_aosp {
fi
done
echo "[*] copying extra host tools"
for f in adb fastboot mke2fs mke2fs.conf; do
echo "[*] copying base host tools"
for f in adb fastboot; do
if [[ "$ignore_missing" == true ]] && [ ! -f ${outdir}/host/linux-x86/bin/${f} ]; then
warning "${f} not found, not copying"
else
cp ${outdir}/host/linux-x86/bin/${f} "${package_tempdir}"
fi
done
echo "[*] copying extra host tools: $extra_host_files"
for f in ${extra_host_files}; do
if [[ "$ignore_missing" == true ]] && [ ! -f ${outdir}/host/linux-x86/bin/${f} ]; then
warning "${f} not found, not copying"
else
@@ -80,9 +93,10 @@ function main {
local outdir=""
local name=""
local extra_target_files=""
local extra_host_files=""
local ignore_missing=false
local opts_args="out-dir:,name:,extra-target-files:,ignore-missing,help"
local opts_args="out-dir:,name:,extra-target-files:,extra-host-files:,ignore-missing,help"
local opts=$(getopt -o '' -l "${opts_args}" -- "$@")
eval set -- "${opts}"
@@ -91,6 +105,7 @@ function main {
--out-dir) outdir="$2"; shift 2 ;;
--name) name="$2"; shift 2 ;;
--extra-target-files) extra_target_files="$2"; shift 2 ;;
--extra-host-files) extra_host_files="$2"; shift 2;;
--ignore-missing) ignore_missing=true; shift ;;
--help) usage; exit 0 ;;
--) shift; break ;;
@@ -101,7 +116,7 @@ function main {
[ -z "${outdir}" ] && error_usage_exit "No out_dir provided"
[ -z "${name}" ] && error_usage_exit "No name provided"
package_aosp "${outdir}" "${name}" "${extra_target_files}" "${ignore_missing}"
package_aosp "${outdir}" "${name}" "${extra_target_files}" "${extra_host_files}" "${ignore_missing}"
exit 0
}
Loading