[meta-xilinx] [PATCH 1/4] conf/machine/*.conf: Move to QB_NETWORK_DEVICE for QEMU targets

Alistair Francis alistair23 at gmail.com
Wed Jan 25 15:39:19 PST 2017


On Wed, Jan 25, 2017 at 9:44 AM, Nathan Rossi <nathan at nathanrossi.com> wrote:
> On 26 January 2017 at 01:54, Alistair Francis <alistair23 at gmail.com> wrote:
>> On Wed, Jan 25, 2017 at 6:59 AM, Nathan Rossi <nathan at nathanrossi.com> wrote:
>>> Move the setup of network devices to the new QB_NETWORK_DEVICE variable,
>>> this avoids the need to configure slirp or tap options from the machine
>>> configuration.
>>>
>>> Additionally this provides the benefit of letting runqemu handle the
>>> setup of tap and slirp arguments, allowing for it to provide features
>>> such as host-guest port forwarding for slirp.
>>
>> I was just about to send a patch that will conflict with this.
>>
>> I wanted to add the TFTP option to teh slirp netowrking, see the diff below:
>>
>> --- a/conf/machine/zcu102-zynqmp.conf
>> +++ b/conf/machine/zcu102-zynqmp.conf
>> @@ -28,7 +28,7 @@ QB_MACHINE = "-machine xlnx-zcu102"
>>  QB_MEM = "-m 2048"
>>  QB_OPT_APPEND = "-nographic -serial mon:stdio -serial null"
>>  QB_TAP_OPT = "-netdev
>> tap,id=net0,ifname=@TAP@,script=no,downscript=no -net nic -net nic
>> -net nic -net nic,netdev=net0,macaddr=@MAC@"
>> -QB_SLIRP_OPT = "-netdev user,id=net0 -net nic -net nic -net nic -net
>> nic,netdev=net0"
>> +QB_SLIRP_OPT = "-netdev user,id=net0 -net nic -net nic -net nic -net
>> nic,netdev=net0,tftp=${DEPLOY_DIR_IMAGE}"
>>
>>  # Xilinx QEMU options
>>  QB_OPT_APPEND_append_qemuboot-xilinx = " -hw-dtb
>> ${DEPLOY_DIR_IMAGE}/qemu-hw-devicetrees/zcu102-arm.dtb "
>>
>> Does this new method allow TFTP boots?
>
> So the runqemu change, splits "-net"/"-device" args into
> QB_NETWORK_DEVICE, and the "-netdev" options into the QB_SLIRP_OPT and
> QB_TAP_OPT. The runqemu script will auto-populate the QB_SLIRP/TAP_OPT
> variables with various options (tap device, port forwards, etc).
>
> http://git.openembedded.org/openembedded-core/commit/?id=7dddd090806914a62d977730440d803e48f44763
>
> So it is still possible to do what you want with QB_SLIRP_OPT, but it
> will overwrite the auto populated value that is provided by runqemu.
> So depending on why you need TFTP, it might be worth looking into
> adding it as a feature into runqemu (better dynamic tftp directory
> setting)?

Ok, so it sounds like this is something that we should add to the
runqemu script.

I'll add that to my to-do list.

Acked-by: Alistair Francis <alistair.francis at xilinx.com>

Thanks,

Alistair


Thanks,

Alistair

>
> Regards,
> Nathan



More information about the meta-xilinx mailing list