summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbiao716.wang <biao716.wang@samsung.com>2023-01-04 14:40:52 +0900
committerbiao716.wang <biao716.wang@samsung.com>2023-01-04 14:40:52 +0900
commit662b88eec2e18a9dcfd75e0d26795930349d5855 (patch)
treebc00d1dc83d2d34205ff8a469d0fe1b9420cb387
parent3bfbb8352b1a2a5f899531831d7a60d46cc72ba6 (diff)
parent139d07f087cc3dafedd99f6cae32a18f6e1d2aa1 (diff)
downloadbuild-662b88eec2e18a9dcfd75e0d26795930349d5855.tar.gz
build-662b88eec2e18a9dcfd75e0d26795930349d5855.tar.bz2
build-662b88eec2e18a9dcfd75e0d26795930349d5855.zip
Change-Id: I3a94458a28b996551401d11ca38ff1a407bed3c4
-rw-r--r--Build.pm12
-rw-r--r--initvm.c4
-rw-r--r--qemu-reg15
3 files changed, 8 insertions, 23 deletions
diff --git a/Build.pm b/Build.pm
index dd06de3..437fea3 100644
--- a/Build.pm
+++ b/Build.pm
@@ -26,7 +26,7 @@ use Build::Rpm;
use Data::Dumper;
use POSIX qw(strftime);
-our $expand_dbg;
+our $expand_dbg = $ENV{BUILD_EXPAND_DEBUG} || undef;
our $do_rpm;
our $do_deb;
@@ -1040,7 +1040,7 @@ sub expand {
}
next if $p{$q[0]};
return (undef, "$q[0] $aconflicts{$q[0]}") if $aconflicts{$q[0]};
- print "added $q[0] because of $p (direct dep)\n" if $expand_dbg;
+ print STDERR "added $q[0] because of $p (direct dep)\n" if $expand_dbg;
push @p, $q[0];
$p{$q[0]} = 1;
$aconflicts{$_} = "conflict from project config with $q[0]" for @{$conflicts->{$q[0]} || []};
@@ -1097,7 +1097,7 @@ sub expand {
}
if (@q > 1 && !$doamb) {
push @pamb, $p unless @pamb && $pamb[-1] eq $p;
- print "undecided about $p:$r: @q\n" if $expand_dbg;
+ print STDERR "undecided about $p:$r: @q\n" if $expand_dbg;
next;
}
if (@q > 1) {
@@ -1125,7 +1125,7 @@ sub expand {
if ($doamb == 2) {
todo2recommended($config, \%recommended, \@rec_todo) if @rec_todo;
my @pq = grep {$recommended{$_}} @q;
- print "recommended [@pq] among [@q]\n" if $expand_dbg;
+ print STDERR "recommended [@pq] among [@q]\n" if $expand_dbg;
@q = @pq if @pq;
}
if (@q > 1) {
@@ -1138,7 +1138,7 @@ sub expand {
next;
}
push @p, $q[0];
- print "added $q[0] because of $p:$r\n" if $expand_dbg;
+ print STDERR "added $q[0] because of $p:$r\n" if $expand_dbg;
$p{$q[0]} = 1;
$aconflicts{$_} = "conflict from project config with $q[0]" for @{$conflicts->{$q[0]} || []};
if (!$ignoreconflicts) {
@@ -1163,7 +1163,7 @@ sub expand {
@pamb = ();
todo2recommended($config, \%recommended, \@rec_todo) if @rec_todo;
$doamb = %recommended ? 2 : 3;
- print "now doing undecided dependencies, $doamb = $doamb\n" if $expand_dbg;
+ print STDERR "now doing undecided dependencies, $doamb = $doamb\n" if $expand_dbg;
next;
}
return undef, @error if @error;
diff --git a/initvm.c b/initvm.c
index f77687c..b5f64cf 100644
--- a/initvm.c
+++ b/initvm.c
@@ -259,7 +259,7 @@ enum okfail binfmt_register(char *datafile, char *regfile)
int ret;
/* Is an interpreter for this arch already registered? */
snprintf(path, sizeof(path), SYSFS_BINFMT_MISC "/%s", f[name]);
- ret=access(path, X_OK);
+ ret=access(path, F_OK);
if (ret == 0) {
#ifdef DEBUG
fprintf(stderr,
@@ -277,11 +277,9 @@ enum okfail binfmt_register(char *datafile, char *regfile)
/* Does the interpreter exists? */
ret=access(f[interpreter], X_OK);
if (ret != 0) {
-#ifdef DEBUG
fprintf(stderr,
"%s: line %d: interpreter '%s' not found,"
" ignoring, return %d\n", datafile, line, f[interpreter], ret);
-#endif /* DEBUG */
continue;
}
diff --git a/qemu-reg b/qemu-reg
index 0346863..2f5abd4 100644
--- a/qemu-reg
+++ b/qemu-reg
@@ -7,17 +7,4 @@
#:aarch64:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-aarch64-binfmt:P
:aarch64:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-arm64-binfmt:P
:arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfa\xff\xff\xff:/usr/bin/qemu-arm-static:
-:armeb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-armeb-binfmt:P
-:ppc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x14:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-ppc-binfmt:P
-:ppc64:M::i\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x15:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff::/usr/bin/qemu-ppc64-binfmt:P
-:ppc64le:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x15:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff::/usr/bin/qemu-ppc64le-binfmt:P
-:mips:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mips-binfmt:P
-:mipsel:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mipsel-binfmt:P
-#:mipsn32:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mipsn32-binfmt:P
-#:mipsn32el:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mipsn32el-binfmt:P
-#:mips64:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mips64-binfmt:P
-#:mips64el:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mips64el-binfmt:P
-
-:sh4:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-sh4-binfmt:P
-:sh4eb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-sh4eb-binfmt:P
-
+:riscv64:M::\x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xf3\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-riscv64-binfmt:P