Repository : ssh://git@diktynna/doc
On branch : master
commit 48ad808f8fb5611d52bbbe0ff7a7890c8ced72b3 Merge: cee3a86 bb7de75 Author: Sven Eckelmann sven@narfation.org Date: Sat Mar 7 20:17:25 2020 +0100
Merge branch 'backup-redmine/2020-03-07'
48ad808f8fb5611d52bbbe0ff7a7890c8ced72b3 open-mesh/Download.rst | 26 ++++++------ open-mesh/Kernel_hacking_Debian_image.rst | 9 +++- open-mesh/News-draft.rst | 68 +++++++++++++++++++------------ 3 files changed, 63 insertions(+), 40 deletions(-)
diff --cc open-mesh/Download.rst index 1983a69,0000000..8ce0106 mode 100644,000000..100644 --- a/open-mesh/Download.rst +++ b/open-mesh/Download.rst @@@ -1,243 -1,0 +1,245 @@@ +.. SPDX-License-Identifier: GPL-2.0 + +Download B.A.T.M.A.N. +===================== + +We are currently working on different branches. To get the details about +the differences of these branches, see our :doc:`Branches Explained page <BranchesExplained>`. + +Please use the maint branch for your public infrastructure unless you +know exactly what you are doing and are prepared for the big unknown. + +.. _open-mesh-download-download-released-source-code: + +Download Released Source Code +----------------------------- + +- The latest version of :doc:`batman-adv </batman-adv/Wiki>` is - `batman-adv-2019.5.tar.gz https://downloads.open-mesh.org/batman/stable/sources/batman-adv/batman-adv-2019.5.tar.gz`__ - `md5 https://downloads.open-mesh.org/batman/stable/sources/batman-adv/batman-adv-2019.5.tar.gz.md5`__ - `sha1 https://downloads.open-mesh.org/batman/stable/sources/batman-adv/batman-adv-2019.5.tar.gz.sha1`__ - `asc https://downloads.open-mesh.org/batman/stable/sources/batman-adv/batman-adv-2019.5.tar.gz.asc`__ ++ `batman-adv-2020.0.tar.gz https://downloads.open-mesh.org/batman/stable/sources/batman-adv/batman-adv-2020.0.tar.gz`__ ++ `md5 https://downloads.open-mesh.org/batman/stable/sources/batman-adv/batman-adv-2020.0.tar.gz.md5`__ ++ `sha1 https://downloads.open-mesh.org/batman/stable/sources/batman-adv/batman-adv-2020.0.tar.gz.sha1`__ ++ `asc https://downloads.open-mesh.org/batman/stable/sources/batman-adv/batman-adv-2020.0.tar.gz.asc`__ +- The latest version of batctl (management and control tool for + batman-adv) is - `batctl-2019.5.tar.gz https://downloads.open-mesh.org/batman/stable/sources/batctl/batctl-2019.5.tar.gz`__ - `md5 https://downloads.open-mesh.org/batman/stable/sources/batctl/batctl-2019.5.tar.gz.md5`__ - `sha1 https://downloads.open-mesh.org/batman/stable/sources/batctl/batctl-2019.5.tar.gz.sha1`__ - `asc https://downloads.open-mesh.org/batman/stable/sources/batctl/batctl-2019.5.tar.gz.asc`__ ++ `batctl-2020.0.tar.gz https://downloads.open-mesh.org/batman/stable/sources/batctl/batctl-2020.0.tar.gz`__ ++ `md5 https://downloads.open-mesh.org/batman/stable/sources/batctl/batctl-2020.0.tar.gz.md5`__ ++ `sha1 https://downloads.open-mesh.org/batman/stable/sources/batctl/batctl-2020.0.tar.gz.sha1`__ ++ `asc https://downloads.open-mesh.org/batman/stable/sources/batctl/batctl-2020.0.tar.gz.asc`__ +- The latest version of alfred (Almighty Lightweight Fact Remote + Exchange Daemon) is - `alfred-2019.5.tar.gz https://downloads.open-mesh.org/batman/stable/sources/alfred/alfred-2019.5.tar.gz`__ - `md5 https://downloads.open-mesh.org/batman/stable/sources/alfred/alfred-2019.5.tar.gz.md5`__ - `sha1 https://downloads.open-mesh.org/batman/stable/sources/alfred/alfred-2019.5.tar.gz.sha1`__ - `asc https://downloads.open-mesh.org/batman/stable/sources/alfred/alfred-2019.5.tar.gz.asc`__ ++ `alfred-2020.0.tar.gz https://downloads.open-mesh.org/batman/stable/sources/alfred/alfred-2020.0.tar.gz`__ ++ `md5 https://downloads.open-mesh.org/batman/stable/sources/alfred/alfred-2020.0.tar.gz.md5`__ ++ `sha1 https://downloads.open-mesh.org/batman/stable/sources/alfred/alfred-2020.0.tar.gz.sha1`__ ++ `asc https://downloads.open-mesh.org/batman/stable/sources/alfred/alfred-2020.0.tar.gz.asc`__ + +- The latest stable version of batmand + (:ref:`unmaintained <open-mesh-BranchesExplained-batmand>`) is + `batman-0.3.2.tar.gz https://downloads.open-mesh.org/batman/releases/batman-0.3.2/batman-0.3.2.tar.gz`__ + `md5 https://downloads.open-mesh.org/batman/releases/batman-0.3.2/batman-0.3.2.tar.gz.md5`__ + `sha1 https://downloads.open-mesh.org/batman/releases/batman-0.3.2/batman-0.3.2.tar.gz.sha1`__ + `asc https://downloads.open-mesh.org/batman/releases/batman-0.3.2/batman-0.3.2.tar.gz.asc`__ +- The latest version of the vis server for the batmand (package not + needed for batman-adv) is + `vis-0.3.2.tar.gz https://downloads.open-mesh.org/batman/releases/batman-0.3.2/vis-0.3.2.tar.gz`__ + `md5 https://downloads.open-mesh.org/batman/releases/batman-0.3.2/vis-0.3.2.tar.gz.md5`__ + `sha1 https://downloads.open-mesh.org/batman/releases/batman-0.3.2/vis-0.3.2.tar.gz.sha1`__ + `asc https://downloads.open-mesh.org/batman/releases/batman-0.3.2/vis-0.3.2.tar.gz.asc`__ + +If you are wondering whether batman-adv or batmand might suit your setup +better, have a look at :doc:`this page </batman-adv/Wiki>`. Please note that +the development is focusing on batman-adv at the moment. + +To download previous release tarballs, simply check out our `download +section https://downloads.open-mesh.org/batman/releases/`__. + +If you find any bugs, please :doc:`let us know <Contribute>`! + +Git Repository Access +--------------------- + +Since we started integrating the batman-adv kernel module into the +mainline Linux tree, we maintain a git repository which contains the +batman-adv maintenance branches. More information can be found +:doc:`on our git page <UsingBatmanGit>`. +On overview about all the git repositories can be found on our `git +frontend https://git.open-mesh.org`__. We also host individual +repositories for development related to batman or meshing in general. +Feel free to contact us if you are interested in getting a repository +too. + +batman-adv in the Linux tree +---------------------------- + +Since linux 2.6.33 batman-adv is part of the official linux tree. You +can build batman-adv along with your linux binary by simply selecting +batman-adv in the Linux drivers section. If you use an older kernel or +want to have access to the latest features you can checkout our git +repository which still are backward compatible until 2.6.29. + +It follows an overview of linux versions and the batman-adv version they +contain, so that you can easily pick the compatible batctl packages: + +- linux 2.6.33 => batman-adv 0.2.0 (get batctl 0.2.0 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 2.6.34 => batman-adv 0.2.1 (get batctl 0.2.1 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 2.6.35 => batman-adv 2010.0.x (get batctl 2010.0.x from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 2.6.36 => batman-adv 2010.1.x (get batctl 2010.1.x from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 2.6.37 => batman-adv 2010.2.x (get batctl 2010.2.x from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 2.6.38 => batman-adv 2011.0.x (get batctl 2011.0.x from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 2.6.39 => batman-adv 2011.1.x (get batctl 2011.1.x from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 3.0 => batman-adv 2011.2.x (get batctl 2011.2.x from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 3.1 => batman-adv 2011.3.x (get batctl 2011.3.x from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 3.2 => batman-adv 2011.4.x (get batctl 2011.4.x from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 3.3 => batman-adv 2012.0.x (get batctl 2012.0.x from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 3.4 => batman-adv 2012.1.x (get batctl 2012.1.x from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 3.5 => batman-adv 2012.2.x (get batctl 2012.2.x from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 3.6 => batman-adv 2012.3.x (get batctl 2012.3.x from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 3.7 => batman-adv 2012.4.x (get batctl 2012.4.x from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 3.8 => batman-adv 2013.0.x (get batctl 2013.0.x from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 3.9 => batman-adv 2013.1.x (get batctl 2013.1.x from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 3.10 => batman-adv 2013.2.x (get batctl 2013.2.x from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 3.11 => batman-adv 2013.3.x (get batctl 2013.3.x from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 3.12 => batman-adv 2013.4.x (get batctl 2013.4.x from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 3.13 => batman-adv 2014.0.x (get batctl 2014.0.x from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ + NOTE: in-kernel version number is 2013.5.0 +- linux 3.14 => batman-adv 2014.1.x (get batctl 2014.1.x from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 3.15 => batman-adv 2014.2.x (get batctl 2014.2.x from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 3.16 => batman-adv 2014.3.x (get batctl 2014.3.x from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 3.17-3.19 => batman-adv 2014.4.x (get batctl 2014.4.x from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 4.0-4.1 => batman-adv 2015.0 (get batctl 2015.0 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/`__ +- linux 4.2-4.3 => batman-adv 2015.1 (get batctl 2015.1 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 4.4 => batman-adv 2015.2 (get batctl 2015.2 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 4.5 => batman-adv 2016.0 (get batctl 2016.0 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 4.6 => batman-adv 2016.1 (get batctl 2016.1 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 4.7 => batman-adv 2016.2 (get batctl 2016.2 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 4.8 => batman-adv 2016.3 (get batctl 2016.3 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 4.9 => batman-adv 2016.4 (get batctl 2016.4 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 4.10 => batman-adv 2016.5 (get batctl 2016.5 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 4.11 => batman-adv 2017.0.1 (get batctl 2017.0 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 4.12 => batman-adv 2017.1 (get batctl 2017.1 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 4.13 => batman-adv 2017.2 (get batctl 2017.2 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 4.14 => batman-adv 2017.3 (get batctl 2017.3 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 4.15 => batman-adv 2017.4 (get batctl 2017.4 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 4.16 => batman-adv 2018.0 (get batctl 2018.0 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 4.17 => batman-adv 2018.1 (get batctl 2018.1 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 4.18 => batman-adv 2018.2 (get batctl 2018.2 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 4.19 => batman-adv 2018.3 (get batctl 2018.3 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 4.20 => batman-adv 2018.4 (get batctl 2018.4 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 5.0 => batman-adv 2019.0 (get batctl 2019.0 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 5.1 => batman-adv 2019.1 (get batctl 2019.1 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 5.2 => batman-adv 2019.2 (get batctl 2019.2 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 5.3 => batman-adv 2019.3 (get batctl 2019.3 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 5.4 => batman-adv 2019.4 (get batctl 2019.4 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 5.5 => batman-adv 2019.5 (get batctl 2019.5 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ ++- linux 5.6 => batman-adv 2020.0 (get batctl 2020.0 from ++ `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ + +Arch Linux +---------- + +Batman-adv and Batctl are avaible in the +`AUR https://wiki.archlinux.org/index.php/AUR`__ as PKGBUILD: + +- `batctl https://aur.archlinux.org/packages/batctl/`__ - Latest + Batctl +- `batman-adv https://aur.archlinux.org/packages/batman-adv/`__ - + Latest Batman-adv +- `batman-adv-v14 https://aur.archlinux.org/packages/batman-adv-v14/`__ + - Last Batman-adv with compability-version 14 (2013.4) +- `batctl-v14 https://aur.archlinux.org/packages/batctl-v14/`__ - + Last Batctl with compability-version 14 (2013.4) + +Debian +------ + +Use apt-get (or any other dpkg frontend of choice) to install +B.A.T.M.A.N. onto your debian machine. Following packages are available: + +- `alfred https://packages.debian.org/sid/alfred`__ +- `batmand https://packages.debian.org/sid/batmand`__ +- `batctl https://packages.debian.org/sid/batctl`__ +- `linux https://packages.debian.org/source/unstable/linux`__ - + batman-advanced kernel module as `part of the + official https://bugs.debian.org/622361`__ kernel packages + +Similar packages are also available through `Ubuntu +universe https://help.ubuntu.com/community/Repositories/Ubuntu`__ . + +Gentoo +------ + +Use emerge to build B.A.T.M.A.N. on your gentoo machine. Following +ebuilds are available: + +- `net-misc/batctl https://packages.gentoo.org/packages/net-misc/batctl`__ +- `net-misc/batman-adv https://packages.gentoo.org/packages/net-misc/batman-adv`__ + +openSUSE +-------- + +- `network:utilities / + batctl https://build.opensuse.org/package/show?package=batctl&project=network%3Autilities`__ +- the batman-adv module is available as module in the official kernel + packages + +Building OpenWRT packages +------------------------- + +B.A.T.M.A.N. is also included in OpenWRT as a package. Download the +extra package feed, link the batman folder into your main OpenWRT svn +directory and use "make menuconfig" to select the B.A.T.M.A.N. flavor +you intend to use. This enables you to integrate B.A.T.M.A.N. seamlessly +into your builds (see :doc:`this page </batman-adv/Building-with-openwrt>` for +a detailed explanation). + +More information about how to build the OpenWRT toolchain is available +`here https://wiki.openwrt.org/doc/howto/build`__. diff --cc open-mesh/Kernel_hacking_Debian_image.rst index 0797814,0000000..fd12b6a mode 100644,000000..100644 --- a/open-mesh/Kernel_hacking_Debian_image.rst +++ b/open-mesh/Kernel_hacking_Debian_image.rst @@@ -1,431 -1,0 +1,438 @@@ +.. SPDX-License-Identifier: GPL-2.0 + +Kernel hacking Debian image +=========================== + +The :doc:`OpenWrt image <OpenWrt_in_QEMU>` is an easy way to start multiple +virtual instances. But these instances usually don’t provide the +required infrastructure to test kernel modules extensively. And it also +depends on special toolchains to prepare the used tools/modules which +should tested. + +It is often easier to use the same operating system in the virtual +environment and on the host. Only the kernel is modified here to provide +the necessary helpers for in-kernel development. + +An interested reader might even extend this further to only provide a +modified kernel and use the currently running rootfs also in the virtual +environment. Such an approach is used in `hostap’s test +vm https://w1.fi/cgit/hostap/tree/tests/hwsim/vm`__ but it is out of +scope for this document. + +Create an Image +--------------- + +The debian root filesystem is used here to a minimal system to boot and +run the test programs. It is a simple ext4 filesystem with only +userspace components from Debian. The configuration is changed to: + +* automatically mount the shared folder +* automatically set up a static IPv4 address and hostname on bootup +* start a test-init.sh script from the shared folder on bootup +* disable root password +* prefer batctl binary from shared folder’s batctl subdirectory instead + of virtual environment binary + +The installation is also cleaned up at the end to reduce the required +storage space + +.. code-block:: sh + + qemu-img create debian.img 8G + sudo mkfs.ext4 -O '^has_journal' -F debian.img + sudo mkdir debian + sudo mount -o loop debian.img debian + sudo debootstrap buster debian + sudo chroot debian apt update + sudo chroot debian apt install --no-install-recommends build-essential vim openssh-server less \ - pkg-config libnl-3-dev libnl-genl-3-dev libcap-dev tcpdump \ ++ pkg-config libnl-3-dev libnl-genl-3-dev libcap-dev tcpdump rng-tools5 \ + trace-cmd flex bison libelf-dev libdw-dev binutils-dev libunwind-dev libssl-dev libslang2-dev liblzma-dev libperl-dev + + sudo mkdir debian/root/.ssh/ + ssh-add -L | sudo tee debian/root/.ssh/authorized_keys + + sudo mkdir debian/host + sudo sh -c 'cat > debian/etc/fstab << EOF + host /host 9p trans=virtio,version=9p2000.L 0 0 + EOF' + + sudo sh -c 'cat > debian/etc/rc.local << "EOF" + #!/bin/sh -e + + MAC_PART="$(ip link show enp0s1 | awk "/ether/ {print $2}"| sed -e "s/.*://" -e "s/[\n\ ].*//"|awk "{print ("0x"$1)*1 }")" + IP_PART="$(echo $MAC_PART|awk "{ print $1+50 }")" + NODE_NR="$(echo $MAC_PART|awk "{ printf("%02d", $1) }")" + ip addr add 192.168.251.${IP_PART}/24 dev enp0s1 + ip link set up dev enp0s1 + hostname "node"$NODE_NR + ip link set up dev lo + [ ! -x /host/test-init.sh ] || /host/test-init.sh + exit 0 + EOF' + sudo chmod a+x debian/etc/rc.local + + sudo sed -i 's/^root:[^:]*:/root::/' debian/etc/shadow + + ## optionally: allow ssh logins without passwords + # sudo sed -i 's/^#PermitRootLogin.*/PermitRootLogin yes/' debian/etc/ssh/sshd_config + # sudo sed -i 's/^#PermitEmptyPasswords.*/PermitEmptyPasswords yes/' debian/etc/ssh/sshd_config + # sudo sed -i 's/^UsePAM.*/UsePAM no/' debian/etc/ssh/sshd_config + + ## optionally: enable autologin for user root + #sudo mkdir debian/etc/systemd/system/serial-getty@hvc0.service.d/ + #sudo sh -c 'cat > debian/etc/systemd/system/serial-getty@hvc0.service.d/autologin.conf << EOF + #[Service] + #ExecStart= + #ExecStart=-/sbin/agetty --autologin root -s %I 115200,38400,9600 vt102 + #EOF' + + sudo sh -c 'echo '''PATH="/host/batctl/:$PATH"''' >> debian/etc/profile' + sudo rm debian/var/cache/apt/archives/*.deb + sudo rm debian/var/lib/apt/lists/* + sudo e4defrag -v debian/ + sudo umount debian ++ sudo fsck.ext4 -fD debian.img + sudo zerofree -v debian.img + sudo fallocate --dig-holes debian.img + + + ## optionally: convert image to qcow2 + #sudo qemu-img convert -c -f raw -O qcow2 debian.img debian.qcow2 + #sudo mv debian.qcow2 debian.img + +Kernel compile +-------------- + +Any recent kernel can be used for the setup. We will use linux-next here +to get the most recent development kernels. It is also assumed that the +sources are copied to the same directory as the debian.img and a x86_64 +image will be used. + +The kernel will be build to enhance the virtualization and debugging +experience. It is configured with: + +* basic kernel features +* support for necessary drivers +* kernel hacking helpers +* kernel address + undefined sanitizers +* support for hwsim + +.. code-block:: sh + + # make sure that libelf-dev is installed or module build will fail with something like "No rule to make target 'net/batman-adv/bat_algo.o'" + + git clone git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git + cd linux-next + + make allnoconfig + cat >> .config << EOF + + # small configuration + CONFIG_SMP=y + CONFIG_EMBEDDED=n + # CONFIG_EXPERT is not set + CONFIG_MODULES=y + CONFIG_MODULE_UNLOAD=y + CONFIG_MODVERSIONS=y + CONFIG_MODULE_SRCVERSION_ALL=y + CONFIG_64BIT=y + CONFIG_X86_VSYSCALL_EMULATION=n + CONFIG_IA32_EMULATION=n + CONFIG_VOP_BUS=y + CONFIG_VOP=y + CONFIG_HW_RANDOM_VIRTIO=y + CONFIG_NET_9P_VIRTIO=y + CONFIG_VIRTIO_MENU=y + CONFIG_SCSI_VIRTIO=y + CONFIG_VIRTIO_BALLOON=y + CONFIG_VIRTIO_BLK=y + CONFIG_VIRTIO_CONSOLE=y + CONFIG_VIRTIO_INPUT=y + CONFIG_VIRTIO_NET=y + CONFIG_VIRTIO_PCI=y + CONFIG_VIRTIO_PCI_LEGACY=y + CONFIG_VIRTIO_BALLOON=y + CONFIG_VIRTIO_BLK_SCSI=y + CONFIG_VIRTIO_INPUT=y + CONFIG_VIRTIO_MMIO=y + CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y + CONFIG_RPMSG_VIRTIO=y + CONFIG_VSOCKETS=y + CONFIG_VIRTIO_VSOCKETS=y + CONFIG_DRM=y + CONFIG_DRM_VIRTIO_GPU=y + CONFIG_CAIF=y + CONFIG_CAIF_VIRTIO=y + CONFIG_CRYPTO_DEV_VIRTIO=y + CONFIG_FUSE_FS=y + CONFIG_VIRTIO_FS=y + CONFIG_IOMMU_SUPPORT=y + CONFIG_VIRTIO_IOMMU=y + CONFIG_LIBNVDIMM=y + CONFIG_VIRTIO_PMEM=y + CONFIG_CRC16=y + CONFIG_LIBCRC32C=y + CONFIG_CRYPTO_SHA512=y + CONFIG_NET=y + CONFIG_INET=y + CONFIG_DEBUG_FS=y + CONFIG_IPV6=y + CONFIG_BRIDGE=y + CONFIG_VLAN_8021Q=y + CONFIG_WIRELESS=n + CONFIG_NET_9P=y + CONFIG_NETWORK_FILESYSTEMS=y + CONFIG_9P_FS=y + CONFIG_9P_FS_POSIX_ACL=y + CONFIG_9P_FS_SECURITY=y + CONFIG_BLOCK=y + CONFIG_BLK_DEV=y + CONFIG_EXT4_FS=y + CONFIG_EXT4_USE_FOR_EXT23=y + CONFIG_TTY=y + CONFIG_HW_RANDOM=y + CONFIG_VHOST_RING=y + CONFIG_GENERIC_ALLOCATOR=y + CONFIG_SCSI_LOWLEVEL=y + CONFIG_SCSI=y + CONFIG_NETDEVICES=y + CONFIG_NET_CORE=y + CONFIG_DEVTMPFS=y + CONFIG_HYPERVISOR_GUEST=y + CONFIG_PVH=y + CONFIG_PARAVIRT=y + CONFIG_PARAVIRT_TIME_ACCOUNTING=y + CONFIG_PARAVIRT_SPINLOCKS=y + CONFIG_KVM_GUEST=y + CONFIG_BINFMT_ELF=y + CONFIG_BINFMT_SCRIPT=y + CONFIG_BINFMT_MISC=y + CONFIG_PCI=y + CONFIG_SYSVIPC=y + CONFIG_POSIX_MQUEUE=y + CONFIG_CROSS_MEMORY_ATTACH=y + CONFIG_UNIX=y + CONFIG_TMPFS=y + CONFIG_CGROUPS=y + CONFIG_BLK_CGROUP=y + CONFIG_CGROUP_CPUACCT=y + CONFIG_CGROUP_DEVICE=y + CONFIG_CGROUP_FREEZER=y + CONFIG_CGROUP_HUGETLB=y + CONFIG_CGROUP_NET_CLASSID=y + CONFIG_CGROUP_NET_PRIO=y + CONFIG_CGROUP_PERF=y + CONFIG_CGROUP_SCHED=y + CONFIG_DEVPTS_MULTIPLE_INSTANCES=y + CONFIG_INOTIFY_USER=y + CONFIG_FHANDLE=y + CONFIG_CFG80211=y + CONFIG_DUMMY=y + CONFIG_PACKET=y + CONFIG_VETH=y + CONFIG_IP_MULTICAST=y + CONFIG_NET_IPGRE_DEMUX=y + CONFIG_NET_IP_TUNNEL=y + CONFIG_NET_IPGRE=y + CONFIG_NET_IPGRE_BROADCAST=y + # CONFIG_LEGACY_PTYS is not set + CONFIG_NO_HZ_IDLE=y + CONFIG_CPU_IDLE_GOV_HALTPOLL=y + CONFIG_PVPANIC=y + + # makes boot a lot slower but required for shutdown + CONFIG_ACPI=y + + + #debug stuff + CONFIG_CC_STACKPROTECTOR_STRONG=y + CONFIG_LOCKUP_DETECTOR=y + CONFIG_DETECT_HUNG_TASK=y + CONFIG_SCHED_STACK_END_CHECK=y + CONFIG_DEBUG_RT_MUTEXES=y + CONFIG_DEBUG_SPINLOCK=y + CONFIG_DEBUG_MUTEXES=y + CONFIG_PROVE_LOCKING=y + CONFIG_LOCK_STAT=y + CONFIG_DEBUG_LOCKDEP=y + CONFIG_DEBUG_ATOMIC_SLEEP=y + CONFIG_DEBUG_LIST=y + CONFIG_DEBUG_PI_LIST=y + CONFIG_DEBUG_SG=y + CONFIG_DEBUG_NOTIFIERS=y + CONFIG_PROVE_RCU_REPEATEDLY=y + CONFIG_SPARSE_RCU_POINTER=y + CONFIG_DEBUG_STRICT_USER_COPY_CHECKS=y + CONFIG_X86_VERBOSE_BOOTUP=y + CONFIG_DEBUG_RODATA=y + CONFIG_DEBUG_RODATA_TEST=n + CONFIG_DEBUG_SET_MODULE_RONX=y + CONFIG_PAGE_EXTENSION=y + CONFIG_DEBUG_PAGEALLOC=y + CONFIG_DEBUG_OBJECTS=y + CONFIG_DEBUG_OBJECTS_FREE=y + CONFIG_DEBUG_OBJECTS_TIMERS=y + CONFIG_DEBUG_OBJECTS_WORK=y + CONFIG_DEBUG_OBJECTS_RCU_HEAD=y + CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER=y + CONFIG_DEBUG_KMEMLEAK=y + CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE=8000 + CONFIG_DEBUG_STACK_USAGE=y + CONFIG_DEBUG_STACKOVERFLOW=y + CONFIG_DEBUG_INFO=y + CONFIG_DEBUG_INFO_DWARF4=y + CONFIG_GDB_SCRIPTS=y + CONFIG_READABLE_ASM=y + CONFIG_STACK_VALIDATION=y + CONFIG_WQ_WATCHDOG=y + CONFIG_DEBUG_KOBJECT_RELEASE=y + CONFIG_DEBUG_WQ_FORCE_RR_CPU=y + CONFIG_OPTIMIZE_INLINING=y + CONFIG_ENABLE_MUST_CHECK=y + CONFIG_ENABLE_WARN_DEPRECATED=y + CONFIG_DEBUG_SECTION_MISMATCH=y + CONFIG_UNWINDER_ORC=y + CONFIG_FTRACE=y + CONFIG_FUNCTION_TRACER=y + CONFIG_FUNCTION_GRAPH_TRACER=y + CONFIG_FTRACE_SYSCALLS=y + CONFIG_TRACER_SNAPSHOT=y + CONFIG_TRACER_SNAPSHOT_PER_CPU_SWAP=y + CONFIG_STACK_TRACER=y + CONFIG_UPROBE_EVENTS=y + CONFIG_DYNAMIC_FTRACE=y + CONFIG_FUNCTION_PROFILER=y + CONFIG_HIST_TRIGGERS=y ++ CONFIG_SYMBOLIC_ERRNAME=y ++ CONFIG_DYNAMIC_DEBUG=y ++ CONFIG_PRINTK_TIME=y ++ CONFIG_PRINTK_CALLER=y ++ CONFIG_DEBUG_MISC=y ++ CONFIG_PROVE_RCU_LIST=y + + # for GCC 5+ + CONFIG_KASAN=y + CONFIG_KASAN_INLINE=y + CONFIG_UBSAN_SANITIZE_ALL=y + CONFIG_UBSAN=y + CONFIG_UBSAN_NULL=y + EOF + make olddefconfig + + cat >> .config << EOF + # allow to use unsigned regdb with hwsim + CONFIG_EXPERT=y + CONFIG_CFG80211_CERTIFICATION_ONUS=y + # CONFIG_CFG80211_REQUIRE_SIGNED_REGDB is not set + EOF + make olddefconfig + + make all -j$(nproc || echo 1) + +Build the BIOS +-------------- + +The (sea)bios used by qemu is nice to boot all kind of legacy images but +reduces the performance for booting a paravirtualized Linux system. +Something like qboot works better for this purpose: + +.. code-block:: sh + + git clone https://github.com/bonzini/qboot.git + make -C qboot + +.. _open-mesh-kernel-hacking-debian-image-building-the-batman-adv-module: + +Building the batman-adv module +------------------------------ + +The kernel module can be build outside the virtual environment and +shared over the 9p mount. The path to the kernel sources have to be +provided to the make process + +.. code-block:: sh + + make KERNELPATH="$(pwd)/../linux-next" + +The kernel module can also be compiled in a way which creates better +stack traces and increases the usability with (k)gdb: + +.. code-block:: sh + + make EXTRA_CFLAGS="-fno-inline -Og -fno-optimize-sibling-calls" KERNELPATH="$(pwd)/../linux-next" V=1 + +Start of the environment +------------------------ + +virtual network initialization +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The +:ref:`virtual-network.sh from the OpenWrt environment <open-mesh-openwrt-in-qemu-virtual-network-initialization>` +can be reused again. + +VM instances bringup +~~~~~~~~~~~~~~~~~~~~ + +The +:ref:`run.sh from the OpenWrt environment <open-mesh-openwrt-in-qemu-vm-instances-bringup>` +can mostly be reused. There are only minimal +adjustments required. + +The BASE_IMG is of course no longer the same because a new image +“debian.img” was created for our new environment. The image also doesn’t +contain a bootloader or kernel anymore. The kernel must now be supplied +manually to qemu. + +.. code-block:: sh + + BASE_IMG=debian.img + BOOTARGS+=("-bios" "qboot/bios.bin") + BOOTARGS+=("-kernel" "linux-next/arch/x86/boot/bzImage") + BOOTARGS+=("-append" "root=/dev/vda rw console=hvc0 nokaslr tsc=reliable no_timer_check noreplace-smp rootfstype=ext4 rcupdate.rcu_expedited=1 reboot=t pci=lastbus=0 i8042.direct=1 i8042.dumbkbd=1 i8042.nopnp=1 i8042.noaux=1") + BOOTARGS+=("-device" "virtconsole,chardev=charconsole0,id=console0") + +It is also recommended to use linux-next/vmlinux instead of bzImage with +qemu 4.0.0 (or later) + +Automatic test initialization +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The +:ref:`test-init.sh from the OpenWrt environment <open-mesh-openwrt-in-qemu-automatic-test-initialization>` +is always test specific. But its main +functionality is still the same as before. A simple example would be: + +.. code-block:: sh + + cat > test-init.sh << "EOF" + #! /bin/sh + + set -e + + ## get internet access + dhclient enp0s2 + + ## Simple batman-adv setup + + # ip link add dummy0 type dummy + ip link set up dummy0 + + rmmod batman-adv || true + insmod /host/batman-adv/net/batman-adv/batman-adv.ko + /host/batctl/batctl routing_algo BATMAN_IV + /host/batctl/batctl if add dummy0 + /host/batctl/batctl it 5000 + /host/batctl/batctl if add enp0s1 + ip link set up dev enp0s1 + ip link set up dev bat0 + EOF + + chmod +x test-init.sh + +Start +----- + +The startup method +:ref:`from the OpenWrt environment <open-mesh-openwrt-in-qemu-start>` +should be used here. diff --cc open-mesh/News-draft.rst index a63f0fe,0000000..7d84a3a mode 100644,000000..100644 --- a/open-mesh/News-draft.rst +++ b/open-mesh/News-draft.rst @@@ -1,115 -1,0 +1,129 @@@ +.. SPDX-License-Identifier: GPL-2.0 + - DRAFT: Batman-adv 2019.5 released ++DRAFT: Batman-adv 2020.0 released +================================= + - Dec 4th, 2019. Today the B.A.T.M.A.N. team publishes the December 2019 - update to batman-adv, batctl and alfred! This release only contains - bugfixes and code cleanups. ++Feb 25th, 2020. Today the B.A.T.M.A.N. team publishes the February 2020 update ++to batman-adv, batctl and alfred! This release disables the (deprecated) sysfs ++support by default. The next milestone in this process is the removal of ++debugfs and sysfs support next year. The B.A.T.M.A.N. V code can now use the ++PHY transmission rates as another (fallback) source to calculate the expected ++throughput to specific neighbors. The alfred gps daemon gained support for the ++gpsd API 9 (libgps >= 3.20). Also several bugfixes and code cleanups are ++included in this version. + +As the kernel module always depends on the Linux kernel it is compiled +against, it does not make sense to provide binaries on our website. As +usual, you will find the signed tarballs in our download section: + - https://downloads.open-mesh.org/batman/releases/batman-adv-2019.5/ ++https://downloads.open-mesh.org/batman/releases/batman-adv-2020.0/ + +Thanks +------ + +Thanks to all people sending in patches: + - * Christophe JAILLET christophe.jaillet@wanadoo.fr ++* Pankaj Bharadiya pankaj.laxminarayan.bharadiya@intel.com ++* René Treffer treffer@measite.de +* Simon Wunderlich sw@simonwunderlich.de +* Sven Eckelmann sven@narfation.org - * Taehee Yoo ap420073@gmail.com + +and to all those that supported us with good advice or rigorous testing: + - * Antonio Quartulli a@unstable.cc ++* Peter Green plugwash@p10link.net + +batman-adv +---------- + +:: + + $ git describe origin/master - v2019.4-9-g890c6748 - $ range=v2019.4..v2019.4-9-g890c6748 ++ v2019.5-16-g0b7b07f5^M ++ $ range=v2019.5..v2019.5-16-g0b7b07f5 + $ git shortlog --email --no-merges "${range}" + $ git log --no-merges "${range}"|grep -e '(Reported|Tested|Acked|Reviewed-by|Co-authored-by)-by'|sed 's/.*:/*/'|sort|uniq + + new kernel support + ================== + - batman-adv: Use sizeof_member() macro ++ batman-adv: Use sizeof_field() macro ++ batman-adv: Provide backports-like kernel version helpers ++ batman-adv: Drop workaround for Debian's make-kpkg + + coding style cleanup/refactoring + ================================ + - batman-adv: use generic lockdep keys - batman-adv: Use GCC attribute for fallthrough compat - batman-adv: Use 'fallthrough' pseudo keyword - batman-adv: Drop lockdep.h include for soft-interface.c - batman-adv: Simplify 'batadv_v_ogm_aggr_list_free()' - batman-adv: Axe 'aggr_list_lock' ++ batman-adv: Strip dots from variable macro kerneldoc ++ batman-adv: Fix typo metAdata ++ batman-adv: Annotate bitwise integer pointer casts ++ batman-adv: Replace FIELD_SIZEOF with sizeof_field ++ batman-adv: Avoid comment line over 80 characters + + BATMAN V + ========= + ++ batman-adv: ELP - use wifi tx bitrate as fallback throughput + + bugfixes + ======== + ++ various ++ ======= + ++ batman-adv: Disable CONFIG_BATMAN_ADV_SYSFS by default + + + - 2019.5 (2019-12-04) ++ ++ ++ 2020.0 (2020-02-25) + =================== + - * support latest kernels (3.16 - 5.5) ++ * support latest kernels (3.16 - 5.6) + * coding style cleanups and refactoring ++ * use wifi tx rates as fallback for the B.A.T.M.A.N. V throughput estimation ++ * disable deprecated sysfs support by default + * bugs squashed: + - - fix DAT candidate selection on little endian systems ++ - fix crash during the scheduling of OGMs for removed interfaces + +batctl +------ + +:: + + $ git describe origin/master - v2019.4-1-g6046cf9 - $ range=v2019.4..v2019.4-1-g6046cf9 ++ v2019.5-2-g83e319f^M ++ $ range=v2019.5..v2019.5-2-g83e319f + $ git shortlog --email --no-merges "${range}" + $ git log --no-merges "${range}"|grep -e '(Reported|Tested|Acked|Reviewed-by|Co-authored-by)-by'|sed 's/.*:/*/'|sort|uniq + + bugfix + ====== + + - 2019.5 (2019-12-04) ++ 2020.0 (2020-02-25) + =================== + + * (no changes) + +alfred +------ + +:: + + $ git describe origin/master - v2019.4-1-g0e3505c - $ range=v2019.4..v2019.4-1-g0e3505c ++ v2019.5-3-g060d699^M ++ $ range=v2019.5..v2019.5-3-g060d699 + $ git shortlog --email --no-merges "${range}" + $ git log --no-merges "${range}"|grep -e '(Reported|Tested|Acked|Reviewed-by|Co-authored-by)-by'|sed 's/.*:/*/'|sort|uniq + + - 2019.5 (2019-12-04) ++ 2020.0 (2020-02-25) + =================== + - * (no changes) ++ * fix build against gpsd API 9.0 + +Happy routing, + +The B.A.T.M.A.N. team