diff options
| -rwxr-xr-x | meta/recipes-devtools/installer/adt-installer/scripts/extract_rootfs | 8 | ||||
| -rwxr-xr-x | scripts/runqemu-export-rootfs | 2 | ||||
| -rwxr-xr-x | scripts/runqemu-extract-sdk | 15 |
3 files changed, 14 insertions, 11 deletions
diff --git a/meta/recipes-devtools/installer/adt-installer/scripts/extract_rootfs b/meta/recipes-devtools/installer/adt-installer/scripts/extract_rootfs index 62dc170c8a..d1a595b268 100755 --- a/meta/recipes-devtools/installer/adt-installer/scripts/extract_rootfs +++ b/meta/recipes-devtools/installer/adt-installer/scripts/extract_rootfs | |||
| @@ -28,7 +28,6 @@ extract_rootfs() | |||
| 28 | native_sysroot=$3 | 28 | native_sysroot=$3 |
| 29 | target_sysroot=$2 | 29 | target_sysroot=$2 |
| 30 | PSEUDO_COMMAND="$native_sysroot/usr/bin/pseudo" | 30 | PSEUDO_COMMAND="$native_sysroot/usr/bin/pseudo" |
| 31 | PSEUDO_OPTS="-P $natvie_sysroot/usr" | ||
| 32 | TAR_OPTS="-xjf" | 31 | TAR_OPTS="-xjf" |
| 33 | PSEUDO_OPTS="-P $native_sysroot/usr" | 32 | PSEUDO_OPTS="-P $native_sysroot/usr" |
| 34 | 33 | ||
| @@ -46,9 +45,10 @@ extract_rootfs() | |||
| 46 | mkdir -p "$target_sysroot" | 45 | mkdir -p "$target_sysroot" |
| 47 | fi | 46 | fi |
| 48 | 47 | ||
| 49 | mkdir -p "$target_sysroot/var/pseudo" | 48 | pseudo_state_dir="$target_sysroot/../$(basename "$target_sysroot").pseudo_state" |
| 50 | touch "$target_sysroot/var/pseudo/pseudo.pid" | 49 | mkdir -p "$pseudo_state_dir" |
| 51 | PSEUDO_LOCALSTATEDIR="$target_sysroot/var/pseudo" | 50 | touch "$pseudo_state_dir/pseudo.pid" |
| 51 | PSEUDO_LOCALSTATEDIR="$pseudo_state_dir" | ||
| 52 | export PSEUDO_LOCALSTATEDIR | 52 | export PSEUDO_LOCALSTATEDIR |
| 53 | 53 | ||
| 54 | echo_info "Extracting rootfs: $1, using pseudo..." | 54 | echo_info "Extracting rootfs: $1, using pseudo..." |
diff --git a/scripts/runqemu-export-rootfs b/scripts/runqemu-export-rootfs index f8213ba4ef..3c77dd74cd 100755 --- a/scripts/runqemu-export-rootfs +++ b/scripts/runqemu-export-rootfs | |||
| @@ -68,7 +68,7 @@ NFSPID=~/.runqemu-sdk/nfs$NFS_INSTANCE.pid | |||
| 68 | MOUNTPID=~/.runqemu-sdk/mount$NFS_INSTANCE.pid | 68 | MOUNTPID=~/.runqemu-sdk/mount$NFS_INSTANCE.pid |
| 69 | 69 | ||
| 70 | PSEUDO_OPTS="-P $OECORE_NATIVE_SYSROOT/usr" | 70 | PSEUDO_OPTS="-P $OECORE_NATIVE_SYSROOT/usr" |
| 71 | PSEUDO_LOCALSTATEDIR="$NFS_EXPORT_DIR/var/pseudo" | 71 | PSEUDO_LOCALSTATEDIR="$NFS_EXPORT_DIR/../$(basename $NFS_EXPORT_DIR).pseudo_state" |
| 72 | export PSEUDO_LOCALSTATEDIR | 72 | export PSEUDO_LOCALSTATEDIR |
| 73 | 73 | ||
| 74 | if [ ! -d "$PSEUDO_LOCALSTATEDIR" ]; then | 74 | if [ ! -d "$PSEUDO_LOCALSTATEDIR" ]; then |
diff --git a/scripts/runqemu-extract-sdk b/scripts/runqemu-extract-sdk index 4b5247597f..509af66216 100755 --- a/scripts/runqemu-extract-sdk +++ b/scripts/runqemu-extract-sdk | |||
| @@ -73,15 +73,18 @@ if [ ! -d "$SDK_ROOTFS_DIR" ]; then | |||
| 73 | mkdir -p "$SDK_ROOTFS_DIR" | 73 | mkdir -p "$SDK_ROOTFS_DIR" |
| 74 | fi | 74 | fi |
| 75 | 75 | ||
| 76 | if [ -e "$SDK_ROOTFS_DIR/var/pseudo" ]; then | 76 | pseudo_state_dir="$SDK_ROOTFS_DIR/../$(basename "$SDK_ROOTFS_DIR").pseudo_state" |
| 77 | echo "Error: $SDK_ROOTFS_DIR/var/pseudo already exists!" | 77 | |
| 78 | echo "Please delete the entire rootfs tree manually if this is really what you want" | 78 | if [ -e "$pseudo_state_dir" ]; then |
| 79 | echo "Error: $pseudo_state_dir already exists!" | ||
| 80 | echo "Please delete the rootfs tree and pseudo directory manually" | ||
| 81 | echo "if this is really what you want." | ||
| 79 | exit 1 | 82 | exit 1 |
| 80 | fi | 83 | fi |
| 81 | 84 | ||
| 82 | mkdir -p "$SDK_ROOTFS_DIR/var/pseudo" | 85 | mkdir -p "$pseudo_state_dir" |
| 83 | touch "$SDK_ROOTFS_DIR/var/pseudo/pseudo.pid" | 86 | touch "$pseudo_state_dir/pseudo.pid" |
| 84 | PSEUDO_LOCALSTATEDIR="$SDK_ROOTFS_DIR/var/pseudo" | 87 | PSEUDO_LOCALSTATEDIR="$pseudo_state_dir" |
| 85 | export PSEUDO_LOCALSTATEDIR | 88 | export PSEUDO_LOCALSTATEDIR |
| 86 | 89 | ||
| 87 | echo "Extracting rootfs tarball using pseudo..." | 90 | echo "Extracting rootfs tarball using pseudo..." |
