[bootlin/training-materials updates] master: QEMU labs: "ip" command based solution (d4cbf59d)

Michael Opdenacker michael.opdenacker at bootlin.com
Fri Oct 9 08:29:27 CEST 2020


Repository : https://github.com/bootlin/training-materials
On branch  : master
Link       : https://github.com/bootlin/training-materials/commit/d4cbf59de28f5b37f394d0e8a4e7f109189cdb95

>---------------------------------------------------------------

commit d4cbf59de28f5b37f394d0e8a4e7f109189cdb95
Author: Michael Opdenacker <michael.opdenacker at bootlin.com>
Date:   Fri Oct 9 08:29:27 2020 +0200

    QEMU labs: "ip" command based solution
    
    Signed-off-by: Michael Opdenacker <michael.opdenacker at bootlin.com>
    Co-developed-by: Manuel Reis <mluis.reis at gmail.com>


>---------------------------------------------------------------

d4cbf59de28f5b37f394d0e8a4e7f109189cdb95
 labs/sysdev-u-boot-qemu/sysdev-u-boot-qemu.tex | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/labs/sysdev-u-boot-qemu/sysdev-u-boot-qemu.tex b/labs/sysdev-u-boot-qemu/sysdev-u-boot-qemu.tex
index 893ae4f8..1d610298 100644
--- a/labs/sysdev-u-boot-qemu/sysdev-u-boot-qemu.tex
+++ b/labs/sysdev-u-boot-qemu/sysdev-u-boot-qemu.tex
@@ -206,16 +206,14 @@ printenv foo
 To load a kernel in the next lab, we will setup networking between the QEMU emulated
 machine and the host.
 
-First install the \code{net-tools} package to get the \code{ifconfig}
-command.
-
-Then create a \code{/etc/qemu-myifup} (for example)
+To do so, create a \code{/etc/qemu-myifup} (for example)
 script that will bring up a network interface between QEMU and the host.
 Here are its contents:
 
 \begin{verbatim}
 #!/bin/bash
-exec /sbin/ifconfig $1 192.168.0.1
+/sbin/ip a add 192.168.0.1/24 dev $1
+/sbin/ip link set $1 up
 \end{verbatim}
 
 Of course, make this script executable:
@@ -232,7 +230,7 @@ Then, you will need root privileges to run QEMU this time,
 because of the need to bring up the network interface:
 
 \begin{verbatim}
-qemu-system-arm -M vexpress-a9 -m 128M -nographic \
+sudo qemu-system-arm -M vexpress-a9 -m 128M -nographic \
 -kernel u-boot-2020.04/u-boot \
 -sd sd.img \
 -net tap,script=/etc/qemu-myifup -net nic




More information about the training-materials-updates mailing list