* [Qemu-devel] [PATCH 12/12] Fix configure for s390 qemu on alpine
@ 2018-01-19 16:42 Christian Borntraeger
2018-01-19 16:53 ` Christian Borntraeger
0 siblings, 1 reply; 3+ messages in thread
From: Christian Borntraeger @ 2018-01-19 16:42 UTC (permalink / raw)
To: qemu-s390x, qemu-devel, Peter Maydell, Paolo Bonzini
Cc: Christian Borntraeger, Alice Frosi
From: Alice Frosi <alice@linux.vnet.ibm.comx>
In alpine docker image the qemu-system-s390x build is broken and
it throws this error:
qemu-system-s390x: Initialization of device s390-ipl failed: could not
load bootloader 's390-ccw.img'
The grep command of busybox uses regex. This fails on binary data
(e.g. stops on every \0), so it does not identify the string
BiGeNdIaN in the test case big/little. Therefore, it assumes
that the architecture is little endian.
This fix solves the grep problem by printing the content of
TMPO with strings
Signed-off-by: Alice Frosi <alice@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
[some changes to patch description, add -a option to strings]
---
configure | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index 6d8c996..383b14e 100755
--- a/configure
+++ b/configure
@@ -1906,9 +1906,9 @@ int main(int argc, char *argv[]) {
EOF
if compile_object ; then
- if grep -q BiGeNdIaN $TMPO ; then
+ if strings -a $TMPO | grep -q BiGeNdIaN ; then
bigendian="yes"
- elif grep -q LiTtLeEnDiAn $TMPO ; then
+ elif strings -a $TMPO | grep -q LiTtLeEnDiAn ; then
bigendian="no"
else
echo big/little test failed
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH 12/12] Fix configure for s390 qemu on alpine
2018-01-19 16:42 [Qemu-devel] [PATCH 12/12] Fix configure for s390 qemu on alpine Christian Borntraeger
@ 2018-01-19 16:53 ` Christian Borntraeger
2018-01-19 17:45 ` [Qemu-devel] [qemu-s390x] " Christian Borntraeger
0 siblings, 1 reply; 3+ messages in thread
From: Christian Borntraeger @ 2018-01-19 16:53 UTC (permalink / raw)
To: qemu-s390x, qemu-devel, Peter Maydell, Paolo Bonzini; +Cc: Alice Frosi
ignore the 12/12, it is just one patch....
On 01/19/2018 05:42 PM, Christian Borntraeger wrote:
> From: Alice Frosi <alice@linux.vnet.ibm.comx>
>
> In alpine docker image the qemu-system-s390x build is broken and
> it throws this error:
> qemu-system-s390x: Initialization of device s390-ipl failed: could not
> load bootloader 's390-ccw.img'
>
> The grep command of busybox uses regex. This fails on binary data
> (e.g. stops on every \0), so it does not identify the string
> BiGeNdIaN in the test case big/little. Therefore, it assumes
> that the architecture is little endian.
>
> This fix solves the grep problem by printing the content of
> TMPO with strings
>
> Signed-off-by: Alice Frosi <alice@linux.vnet.ibm.com>
> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
> [some changes to patch description, add -a option to strings]
> ---
> configure | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/configure b/configure
> index 6d8c996..383b14e 100755
> --- a/configure
> +++ b/configure
> @@ -1906,9 +1906,9 @@ int main(int argc, char *argv[]) {
> EOF
>
> if compile_object ; then
> - if grep -q BiGeNdIaN $TMPO ; then
> + if strings -a $TMPO | grep -q BiGeNdIaN ; then
> bigendian="yes"
> - elif grep -q LiTtLeEnDiAn $TMPO ; then
> + elif strings -a $TMPO | grep -q LiTtLeEnDiAn ; then
> bigendian="no"
> else
> echo big/little test failed
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [qemu-s390x] [PATCH 12/12] Fix configure for s390 qemu on alpine
2018-01-19 16:53 ` Christian Borntraeger
@ 2018-01-19 17:45 ` Christian Borntraeger
0 siblings, 0 replies; 3+ messages in thread
From: Christian Borntraeger @ 2018-01-19 17:45 UTC (permalink / raw)
To: qemu-s390x, qemu-devel, Peter Maydell, Paolo Bonzini; +Cc: Alice Frosi
And the from email address is also wrong. (spurious x after .com)
On 01/19/2018 05:53 PM, Christian Borntraeger wrote:
> ignore the 12/12, it is just one patch....
>
> On 01/19/2018 05:42 PM, Christian Borntraeger wrote:
>> From: Alice Frosi <alice@linux.vnet.ibm.comx>
>>
>> In alpine docker image the qemu-system-s390x build is broken and
>> it throws this error:
>> qemu-system-s390x: Initialization of device s390-ipl failed: could not
>> load bootloader 's390-ccw.img'
>>
>> The grep command of busybox uses regex. This fails on binary data
>> (e.g. stops on every \0), so it does not identify the string
>> BiGeNdIaN in the test case big/little. Therefore, it assumes
>> that the architecture is little endian.
>>
>> This fix solves the grep problem by printing the content of
>> TMPO with strings
>>
>> Signed-off-by: Alice Frosi <alice@linux.vnet.ibm.com>
>> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
>> [some changes to patch description, add -a option to strings]
>> ---
>> configure | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/configure b/configure
>> index 6d8c996..383b14e 100755
>> --- a/configure
>> +++ b/configure
>> @@ -1906,9 +1906,9 @@ int main(int argc, char *argv[]) {
>> EOF
>>
>> if compile_object ; then
>> - if grep -q BiGeNdIaN $TMPO ; then
>> + if strings -a $TMPO | grep -q BiGeNdIaN ; then
>> bigendian="yes"
>> - elif grep -q LiTtLeEnDiAn $TMPO ; then
>> + elif strings -a $TMPO | grep -q LiTtLeEnDiAn ; then
>> bigendian="no"
>> else
>> echo big/little test failed
>>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-01-19 17:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-19 16:42 [Qemu-devel] [PATCH 12/12] Fix configure for s390 qemu on alpine Christian Borntraeger
2018-01-19 16:53 ` Christian Borntraeger
2018-01-19 17:45 ` [Qemu-devel] [qemu-s390x] " Christian Borntraeger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).