[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
howtos:hardware:arm:qemu_support_in_slackware_arm [2020/09/22 16:58 (UTC)] – [Create QEMU Disk Image] mralk3 | howtos:hardware:arm:qemu_support_in_slackware_arm [2021/03/28 12:51 (UTC)] (current) – [Sources] mralk3 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Note: Needs update (March 2020) ===== | ||
- | |||
- | The helper scripts were built for qemu-2.5, and do not work with the latest version of qemu (4.2 at the time of writing). | ||
- | The issues are to do with the network support. | ||
- | |||
- | Please base fixes on the [[ftp:// | ||
====== Qemu Support in Slackware ARM ====== | ====== Qemu Support in Slackware ARM ====== | ||
Line 12: | Line 6: | ||
* QEMU provides a platform to allow an operating system to believe that it is running on real hardware. | * QEMU provides a platform to allow an operating system to believe that it is running on real hardware. | ||
* QEMU runs on your Slackware PC or server. | * QEMU runs on your Slackware PC or server. | ||
+ | |||
+ | ===== Last modified (September 2020) ===== | ||
+ | |||
+ | This tutorial was last verified on // | ||
+ | |||
+ | < | ||
+ | |||
+ | If you have suggestions for the helper scripts, please post a diff [[https:// | ||
===== Who is Slackware ARM in QEMU aimed at? ===== | ===== Who is Slackware ARM in QEMU aimed at? ===== | ||
Line 40: | Line 42: | ||
- Configure QEMU Permissions on the Slackware x86 Host | - Configure QEMU Permissions on the Slackware x86 Host | ||
- Create the QEMU disk image using the helper scripts | - Create the QEMU disk image using the helper scripts | ||
+ | - Configure a web server to mirror Slackware ARM for the qemu guest | ||
==== Download Slackware ARM ==== | ==== Download Slackware ARM ==== | ||
Download Slackware ARM to your Slackware x86 Host. In this tutorial rsync is used to mirror Slackware ARM. Before running rsync, make sure your user has read, write, and execute permissions within the directory you pick. In this example / | Download Slackware ARM to your Slackware x86 Host. In this tutorial rsync is used to mirror Slackware ARM. Before running rsync, make sure your user has read, write, and execute permissions within the directory you pick. In this example / | ||
Line 134: | Line 136: | ||
NAT mode does not require any additional configuration on the Slackware x86 host machine or in the QEMU guest machine. | NAT mode does not require any additional configuration on the Slackware x86 host machine or in the QEMU guest machine. | ||
< | < | ||
- | # cd /export/ | + | # cd /slackwarearm |
# qemu-system-arm -nographic \ | # qemu-system-arm -nographic \ | ||
-m 1024 \ | -m 1024 \ | ||
-M vexpress-a9 \ | -M vexpress-a9 \ | ||
+ | -smp 4 \ | ||
-k en-us \ | -k en-us \ | ||
-net nic \ | -net nic \ | ||
- | -net user | + | -net user,restrict=n \ |
| | ||
</ | </ | ||
Line 147: | Line 150: | ||
With NAT mode enabled, QEMU launches a virtual network of 10.0.2.0/ | With NAT mode enabled, QEMU launches a virtual network of 10.0.2.0/ | ||
- | ==== QEMU Bridged Mode Networking | + | ==== Configure a Web Server to Mirror Slackware ARM ==== |
- | The best way to set up a bridged network interface for QEMU is with the provided helper script, rc.local-additions. | + | There is a very simple |
- | You can find the helper script with comments online here: [[http:// | + | < |
- | The following commands must be executed as root to disable NetworkManager: | + | The URL pointing |
- | < | + | |
- | # / | + | |
- | # chmod -x / | + | |
- | </ | + | |
- | + | ||
- | The following network settings are assumed for the **Slackware x86 host machine**. | + | |
- | < | + | |
- | Default Gateway: 192.168.1.1 | + | |
- | Static IP address: 192.168.1.2 | + | |
- | Network Mask: 255.255.255.0 / 192.168.1.0/ | + | |
- | Name server: 192.168.1.1 | + | |
- | </ | + | |
- | + | ||
- | You need to edit the //qemu-network-tun.sh// helper script for QEMU. It is required to bring up the QEMU guest network interface. | + | |
- | + | ||
- | File: / | + | |
- | < | + | |
- | #!/bin/sh | + | |
- | + | ||
- | # This is the IP of ' | + | |
- | BRIDGEIP=192.168.1.4 | + | |
- | + | ||
- | modprobe tun | + | |
- | /sbin/ifconfig $1 $BRIDGEIP netmask 255.255.255.0 | + | |
- | /sbin/brctl addif br0 $1 | + | |
- | </ | + | |
- | + | ||
- | Here is the relevant portion of the rc.local-addtions script that requires modification. | + | |
- | < | + | |
- | .. snip .. | + | |
- | + | ||
- | # Turn on the bridge. | + | |
- | # the one specified in your qemu-network-bridge.sh script | + | |
- | # in your ' | + | |
- | # You need a bridge IP, a tunnel (tap0) IP, and then another | + | |
- | # IP which is assigned to the Slackware ARM host (by Linux inside QEMU) | + | |
- | # to its own eth0. | + | |
- | # I tried bringing this up after eth0 but the bridge didn't work. | + | |
- | # I don't know why that is! | + | |
- | ifconfig br0 192.168.1.3 up | + | |
- | + | ||
- | # Put back the original IP for eth0: | + | |
- | ifconfig eth0 192.168.1.2 up | + | |
- | + | ||
- | # | + | |
- | route del default | + | |
- | route add default gw 192.168.1.1 | + | |
- | </code> | + | |
- | + | ||
- | These network settings assume static IP addressing. | + | |
- | + | ||
- | Copy rc.local-addtions to /etc/ | + | |
- | < | + | |
- | # cp / | + | |
- | # chmod +x / | + | |
- | </ | + | |
- | + | ||
- | At this point it is recommended reboot your Slackware x86 host to assure the settings in rc.local are in use and that NetworkManager is completely disabled. | + | |
- | <note important> | + | For a production environment, |
- | Modify the launcher helper scripts once you are certain your host has the appropriate network settings. | + | Alternatively, |
===== Install Slackware ARM ===== | ===== Install Slackware ARM ===== | ||
Line 227: | Line 172: | ||
< | < | ||
- | cd /export/ | + | cd /slackwarearm |
./ | ./ | ||
</ | </ | ||
Line 247: | Line 192: | ||
==== Setup and Configuration ==== | ==== Setup and Configuration ==== | ||
- | Run the **setup** command at the shell prompt after you exit the partitioning tool. Make the installer aware of your swap parition | + | Run the **setup** command at the shell prompt after you exit the partitioning tool. Make the installer aware of your swap partition |
- | The full path of the NFS share is required: | + | < |
- | < | + | In this case we will use the host IP address, enter the URL address: |
- | Enter the IP address: 192.168.1.2 | + | |
- | Enter the directory: /export/ | + | < |
- | </ | + | This is the directory that is accessible in your web browser. |
Following that, you will be prompted for package selection. | Following that, you will be prompted for package selection. | ||
Line 282: | Line 227: | ||
< | < | ||
- | # cd /export/ | + | # cd /slackwarearm |
# vi disk_launch | # vi disk_launch | ||
</ | </ | ||
Line 309: | Line 254: | ||
====== Sources ====== | ====== Sources ====== | ||
<!-- If you are copying information from another source, then specify that source --> | <!-- If you are copying information from another source, then specify that source --> | ||
- | * Originally written by [[wiki:user: | + | * Originally written by [[http:// |
* Original source: [[http:// | * Original source: [[http:// | ||
<!-- Authors are allowed to give credit to themselves! --> | <!-- Authors are allowed to give credit to themselves! --> | ||
- | * Modified and Maintained by [[wiki: | + | * Modified and Maintained by [[wiki: |
<!-- * Contributions by [[wiki: | <!-- * Contributions by [[wiki: | ||