[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.

Welcome to the Slackware Documentation Project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
howtos:hardware:arm:qemu_support_in_slackware_arm [2020/09/22 17:17 (UTC)] – [Slackware x86 Host Prerequisites] mralk3howtos: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.  If you get the helper scripts working, please post a diff [[https://www.linuxquestions.org/questions/slackware-arm-108/qemu-system-arm-panic-on-x86_64-a-4175670124/|on here]] or email mozes at slackware. 
- 
-Please base fixes on the [[ftp://ftp.arm.slackware.com/slackwarearm/boardsupport/qemu/slackwarearm-current/helper-scripts/|the latest scripts]] 
 ====== 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.  In most cases this will be a desktop machine.  However, it is possible to run QEMU on a headless server and use VNC for graphics.   * QEMU runs on your Slackware PC or server.  In most cases this will be a desktop machine.  However, it is possible to run QEMU on a headless server and use VNC for graphics.
 +
 +===== Last modified (September 2020) =====
 +
 +This tutorial was last verified on //September, 22 2020//, on **Qemu 4.1 installed on Slackware64-current**, dated //Sun Sep 20 08:08:08 UTC 2020// Verification on Slackware 14.2 is still necessary.  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).
 +
 +<del>The issues are to do with the network support.</del>  //They should be fixed//.
 +
 +If you have suggestions for the helper scripts, please post a diff [[https://www.linuxquestions.org/questions/slackware-arm-108/qemu-system-arm-panic-on-x86_64-a-4175670124/|on here]] or email mozes at slackware.  Please base fixes on the [[ftp://ftp.arm.slackware.com/slackwarearm/boardsupport/qemu/slackwarearm-current/helper-scripts/|the latest scripts]].
  
 ===== 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 Apache web server (httpd) to mirror Slackware ARM for the guest+  - Configure 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 /slackwarearm/$SLACKREL is used, but you can use a directory of your choice. 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 /slackwarearm/$SLACKREL is used, but you can use a directory of your choice.
Line 134: Line 136:
 NAT mode does not require any additional configuration on the Slackware x86 host machine or in the QEMU guest machine.  Here is a shortened example of a QEMU guest being launched with NAT mode networking: NAT mode does not require any additional configuration on the Slackware x86 host machine or in the QEMU guest machine.  Here is a shortened example of a QEMU guest being launched with NAT mode networking:
 <code> <code>
-# cd /export/armhost+# 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 \
    ..snip..    ..snip..
 </code> </code>
Line 147: Line 150:
  
 With NAT mode enabled, QEMU launches a virtual network of 10.0.2.0/24.  The QEMU guest will be assigned the IP address 10.0.2.15.  The guest can access the Slackware x86 host at 10.0.2.2 and the QEMU DNS server runs at 10.0.2.3.  QEMU does not have direct access to the host's Local Area Network.  This means that the QEMU guest isn't assigned a physical IP address by your router DHCP service.  You will not be able to ping the QEMU guest from the host machine but the guest should be able to ping the host machine at 10.0.2.2.  The QEMU guest should be able to access the internet and communicate with the host machine. With NAT mode enabled, QEMU launches a virtual network of 10.0.2.0/24.  The QEMU guest will be assigned the IP address 10.0.2.15.  The guest can access the Slackware x86 host at 10.0.2.2 and the QEMU DNS server runs at 10.0.2.3.  QEMU does not have direct access to the host's Local Area Network.  This means that the QEMU guest isn't assigned a physical IP address by your router DHCP service.  You will not be able to ping the QEMU guest from the host machine but the guest should be able to ping the host machine at 10.0.2.2.  The QEMU guest should be able to access the internet and communicate with the host machine.
 +==== Configure a Web Server to Mirror Slackware ARM ====
 +
 +There is a very simple way to share the ARM directory on the host with the ARM guests.  Use python and launch a basic web server like so:
 +
 +<code> cd /slackwarearm && python -m SimpleHTTPServer</code>
 +
 +The URL pointing to the mirror depends on the directory structure you used to store Slackwarearm on the qemu host.  The directory /slackwarearm/$SLACKREL was used earlier in this guide.  If you have mirrored slackwarearm-current, you would point your web browser at:  http://192.168.1.2:8000/slackwarearm-current/.
 +
 +For a production environment, the Apache Web server (httpd on Slackware) may be more desirable.  Further directions to use Apache can be found [[howtos:network_services:setup_apache|here]].
 +
 +Alternatively, use a mirror on the internet if you have too much difficulty configuring your own mirror.
 ===== Install Slackware ARM ===== ===== Install Slackware ARM =====
  
Line 178: 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 partition and root partition.  It is recommended that you select the ext4 file system when you format the root partition.  Next you will be prompted to select the source media.  Choose option 4, **Install from NFS (Network Filesystem)**.  Enter the IP address of your Slackware x86 host.  Enter the path to the NFS mounted share.+Run the **setup** command at the shell prompt after you exit the partitioning tool.  Make the installer aware of your swap partition and root partition.  It is recommended that you select the ext4 file system when you format the root partition.  Next you will be prompted to select the source media.  Choose option 5, **Install from FTP/HTTP sever**.  Enter the IP address of your Slackware x86 host.  The path to the Apache (httpd) directory is required:
  
-The path to the Apache (httpd) directory is required: +<code>What is the URL of your FTP/HTTP server?</code> 
-<code> +In this case we will use the host IP address, enter the URL address: http://192.168.1.2 
-Enter the IP address: 192.168.1.2 # Host machine IP address + 
-Enter the directory: /slackwarearm/$SLACKREL/slackware +<code>What is the Slackware source directory?</code> 
-</code>+This is the directory that is accessible in your web browser.  I used: /slackwarearm-current/slackware
  
 Following that, you will be prompted for package selection.  Slackware ARM has all of the standard Slackware packages apart from those which are x86 only.  It is highly recommended that you do a **full** installation to satisfy all system dependencies.  Please be patient, this is the most time consuming part of the installation process. Following that, you will be prompted for package selection.  Slackware ARM has all of the standard Slackware packages apart from those which are x86 only.  It is highly recommended that you do a **full** installation to satisfy all system dependencies.  Please be patient, this is the most time consuming part of the installation process.
Line 213: Line 227:
  
 <code> <code>
-# cd /export/armhost+# cd /slackwarearm
 # vi disk_launch # vi disk_launch
 </code> </code>
Line 240: 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:mozes|Stuart Winter]]+  * Originally written by [[http://www.slackware.com/~mozes/|Stuart Winter]]
   * Original source: [[http://ftp.arm.slackware.com/slackwarearm/boardsupport/qemu/]]   * Original source: [[http://ftp.arm.slackware.com/slackwarearm/boardsupport/qemu/]]
 <!-- Authors are allowed to give credit to themselves! --> <!-- Authors are allowed to give credit to themselves! -->
-  * Modified and Maintained by [[wiki:user:mralk3 | Brenton Earl (mralk3)]]+  * Modified and Maintained by [[wiki:user:mralk3 | mralk3 ]]
 <!-- * Contributions by [[wiki:user:yyy | User Y]] --> <!-- * Contributions by [[wiki:user:yyy | User Y]] -->
  
 howtos:hardware:arm:qemu_support_in_slackware_arm ()