qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Wei Huang <wei@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Fam Zheng" <famz@redhat.com>
Cc: lvivier@redhat.com, peter.maydell@linaro.org, drjones@redhat.com,
	quintela@redhat.com, qemu-devel@nongnu.org, dgilbert@redhat.com
Subject: Re: [Qemu-devel] [PATCH 1/1] tests: Add migration test for aarch64
Date: Thu, 4 Oct 2018 10:27:45 -0500	[thread overview]
Message-ID: <bb1a3136-c381-52c6-4ef3-d56ff4320226@redhat.com> (raw)
In-Reply-To: <81006285-7644-c03e-a2a8-7458cfd064b8@redhat.com>



On 10/04/2018 10:07 AM, Philippe Mathieu-Daudé wrote:
> On 28/09/2018 21:47, Wei Huang wrote:
> [...]> +++ b/tests/migration/aarch64/Makefile
>> @@ -0,0 +1,20 @@
>> +# To specify cross compiler prefix, use CROSS_PREFIX=
>> +#   $ make CROSS_PREFIX=aarch64-linux-gnu-
>> +
>> +.PHONY: all clean
>> +all: a-b-kernel.h
>> +
>> +a-b-kernel.h: aarch64.kernel
>> +	echo "$$__note" > header.tmp
> 
> This won't work on a read-only fs.

Under which setting? If tmp file can't be generated on a read-only fs,
wouldn't $@ have the same problem?

> 
> Why don't you use $@ directly?
> 
>> +	xxd -i $< | sed -e 's/.*int.*//' >> header.tmp
> 
> Please use:
> 
> xxd -g4 ...

This option doesn't work with -i (the include file style output) which
is what we want. From xxd manual:

"-g bytes | -groupsize bytes
    separate the output of every <bytes> bytes (two hex characters or
    eight bit-digits each) by a whitespace. Specify -g 0 to suppress
    grouping.  <Bytes> defaults to 2 in normal mode and 1 in bits
    mode. Grouping does not apply to postscript or include style."


> 
> xxd might not be installed on the host.

xxd is provided by vim packages. So it should be available in most distros.

> 
> That said we should however install it on the docker cross images.

Agreed.

> 
>> +	mv header.tmp $@
>> +
>> +aarch64.kernel: aarch64.elf
>> +	$(CROSS_PREFIX)objcopy -O binary $< $@
>> +
>> +aarch64.elf: a-b-kernel.S
>> +	$(CROSS_PREFIX)gcc -o $@ -nostdlib -Wl,--build-id=none $<
>> +
>> +clean:
>> +	@rm -rf *.kernel *.elf
> 

  reply	other threads:[~2018-10-04 15:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1538164055-23719-1-git-send-email-wei@redhat.com>
2018-10-04 13:48 ` [Qemu-devel] [PATCH 1/1] tests: Add migration test for aarch64 Andrew Jones
2018-10-04 13:58   ` Wei Huang
2018-10-04 14:17   ` Thomas Huth
2018-10-04 16:15     ` Wei Huang
2018-10-04 15:07 ` Philippe Mathieu-Daudé
2018-10-04 15:27   ` Wei Huang [this message]
2018-10-04 15:30     ` Philippe Mathieu-Daudé
2018-10-04 15:50       ` Wei Huang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bb1a3136-c381-52c6-4ef3-d56ff4320226@redhat.com \
    --to=wei@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=dgilbert@redhat.com \
    --cc=drjones@redhat.com \
    --cc=famz@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).