Coder Social home page Coder Social logo

exjobb's Introduction

Buildroot

make menuconfig to configure.
Checked options:

  • Target Architecture = x86_64 (Target options)
  • Enable C++ support (apperently needed by iperf3) (Toolchain)
  • Disable 'Enable root login with password' (System configuration)
  • Disable 'Run a getty (login prompt) after boot' (System configuration)
  • Disable Linux Kernel (Kernel)
  • Enable iperf3 (Target packages -> Networking applications)
  • Enable ext2/3/4 root filesystem (Filesystem images)
    • ext4 variant
  • Disable 'tar the root filesystem' (Filesystem images)

Copy init scripts to rootfs (maybe have to do one make before this):

cp inittab buildroot/output/target/etc/inittab 
cp setup_client_net_ns.sh buildroot/output/target/etc/init.d/S41network_qemu
cp -p enable_events.sh buildroot/output/target/
cp -p toggle_skb_zeroing.sh buildroot/output/target/
cd buildroot
make

Networking

Create tap between host and client called qemu_tap (no outside connection) on subnet 192.168.111.0/24. The host ip is 192.168.111.1 and the client 192.168.111.2.

Run setup_host_net.sh to setup host network (create tap, assign ip and routing).
Run delete_host_net.sh to remove the host network (remove tap and routing). The script setup_client_net.sh is run during by the init script in qemu on boot which sets up ip and routing on the client

Need to enable this driver in the kernel for -device rtl8139 to work. (Device Drivers -> Network device support -> Ethernet driver support -> RealTek RTL-8139 C+ PCI Fast Ethernet Adapter support) Enabled realtek network drivers

Linux Kernel

mkdir linux-x86-build
cd linux

# Default configuration
make O=../linux-x86-build defconfig
make O=../linux-x86-build kvm_guest.config

# Further configuration
make O=../linux-x86-build menuconfig

# Build
make O=../linux-x86-build -j8 

exjobb's People

Contributors

antonwiklund99 avatar joeljohansson99 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.