Skip to content

Commit 55b330b

Browse files
committed
Merge remote-tracking branch 'up/master'
2 parents 79afdc1 + ebbc278 commit 55b330b

8 files changed

Lines changed: 245 additions & 69 deletions

vm-ubuntu-24.04/install-p4dev-v8.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ echo "+ behavioral-model: github.com/p4lang/behavioral-model latest version"
411411
echo " which, as of 2023-Sep-22, also installs these things:"
412412
echo " + thrift version 0.16.0"
413413
echo " + nanomsg version 1.0.0"
414-
echo " + nnpy latest version available via 'pip install'"
414+
echo " + pynng version 0.9.0"
415415
echo "+ p4c: github.com/p4lang/p4c latest version"
416416
echo "+ ptf: github.com/p4lang/ptf latest version"
417417
echo "+ Mininet: github.com/mininet/mininet latest version as of 2024-Sep-18"
@@ -850,7 +850,7 @@ else
850850
TIME_BEHAVIORAL_MODEL_INSTALL_START=$(date +%s)
851851
PATCH_DIR="${THIS_SCRIPT_DIR_ABSOLUTE}/patches"
852852
patch -p1 < "${PATCH_DIR}/behavioral-model-support-fedora.patch"
853-
patch -p1 < "${PATCH_DIR}/behavioral-model-support-venv.patch"
853+
patch -p1 < "${PATCH_DIR}/behavioral-model-support-venv-2026-apr.patch"
854854
# This command installs Thrift, which I want to include in my build of
855855
# simple_switch_grpc
856856
./install_deps.sh

vm-ubuntu-24.04/install.sh

Lines changed: 6 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,7 @@ print_usage() {
2929
1>&2 echo "usage: $0 [ latest | <date> ]"
3030
1>&2 echo ""
3131
1>&2 echo "Dates supported:"
32-
1>&2 echo " 2026-Apr-01"
33-
1>&2 echo " 2026-Mar-01"
34-
1>&2 echo " 2026-Feb-01"
35-
1>&2 echo " 2026-Jan-01"
36-
1>&2 echo " 2025-Nov-01"
37-
1>&2 echo " 2025-Oct-01"
38-
1>&2 echo " 2025-Sep-01"
39-
1>&2 echo " 2025-Aug-01"
32+
1>&2 echo " 2026-May-01"
4033
}
4134

4235
if [ $# -eq 0 ]
@@ -52,53 +45,11 @@ else
5245
fi
5346

5447
case ${VERSION} in
55-
2026-Apr-01)
56-
export INSTALL_BEHAVIORAL_MODEL_SOURCE_VERSION="392f801e0b4057bbe75ee0e89415b5539882926b"
57-
export INSTALL_PI_SOURCE_VERSION="5689c91a8a7423781267b27d8b166c49a53904ff"
58-
export INSTALL_P4C_SOURCE_VERSION="4536e011b17c00e72749eeaa759d72f4a8d7ce86"
59-
export INSTALL_PTF_SOURCE_VERSION="46da7eb9373216c72bbb4342894416f5448559a0"
60-
;;
61-
2026-Mar-01)
62-
export INSTALL_BEHAVIORAL_MODEL_SOURCE_VERSION="6c7c93e5484e069c539b5c990bf37c531599894a"
63-
export INSTALL_PI_SOURCE_VERSION="5689c91a8a7423781267b27d8b166c49a53904ff"
64-
export INSTALL_P4C_SOURCE_VERSION="d59f5b2e9bb49e211cfca4831077e3d76f0fb70b"
65-
export INSTALL_PTF_SOURCE_VERSION="05f46c3873feb2213df29743be3d9a9e34d5559b"
66-
;;
67-
2026-Feb-01)
68-
export INSTALL_BEHAVIORAL_MODEL_SOURCE_VERSION="4cc1333cd51be5675a9bbeeb432d9b647061a817"
69-
export INSTALL_PI_SOURCE_VERSION="5689c91a8a7423781267b27d8b166c49a53904ff"
70-
export INSTALL_P4C_SOURCE_VERSION="7d367760701056cfa4fe0321f62914c0e79a6214"
71-
export INSTALL_PTF_SOURCE_VERSION="05f46c3873feb2213df29743be3d9a9e34d5559b"
72-
;;
73-
2026-Jan-01)
74-
export INSTALL_BEHAVIORAL_MODEL_SOURCE_VERSION="2bdd0b7b2b2ae89faf2720f2158e9842bc6d2dd2"
75-
export INSTALL_PI_SOURCE_VERSION="5689c91a8a7423781267b27d8b166c49a53904ff"
76-
export INSTALL_P4C_SOURCE_VERSION="11d746d94a45694968802675bd9444dfcd029545"
77-
export INSTALL_PTF_SOURCE_VERSION="05f46c3873feb2213df29743be3d9a9e34d5559b"
78-
;;
79-
2025-Nov-01)
80-
export INSTALL_BEHAVIORAL_MODEL_SOURCE_VERSION="2bdd0b7b2b2ae89faf2720f2158e9842bc6d2dd2"
81-
export INSTALL_PI_SOURCE_VERSION="5689c91a8a7423781267b27d8b166c49a53904ff"
82-
export INSTALL_P4C_SOURCE_VERSION="a97290474ce3d183b1f6bc4ca4959ebbcdb09b3b"
83-
export INSTALL_PTF_SOURCE_VERSION="05f46c3873feb2213df29743be3d9a9e34d5559b"
84-
;;
85-
2025-Oct-01)
86-
export INSTALL_BEHAVIORAL_MODEL_SOURCE_VERSION="68f4a978f465fd76e98fcdecb762981843fb7310"
87-
export INSTALL_PI_SOURCE_VERSION="5689c91a8a7423781267b27d8b166c49a53904ff"
88-
export INSTALL_P4C_SOURCE_VERSION="2265f80459e06a89ffba26cb51c42cc05b1c023e"
89-
export INSTALL_PTF_SOURCE_VERSION="05f46c3873feb2213df29743be3d9a9e34d5559b"
90-
;;
91-
2025-Sep-01)
92-
export INSTALL_BEHAVIORAL_MODEL_SOURCE_VERSION="c8081706b38aa6c7e26e8aa78513ac0ac1c17975"
93-
export INSTALL_PI_SOURCE_VERSION="5689c91a8a7423781267b27d8b166c49a53904ff"
94-
export INSTALL_P4C_SOURCE_VERSION="1965b4b523ef5c70e7676145f106ccf9fbba8027"
95-
export INSTALL_PTF_SOURCE_VERSION="346ff01a7b28f7f478130b1eea11e440f1801307"
96-
;;
97-
2025-Aug-01)
98-
export INSTALL_BEHAVIORAL_MODEL_SOURCE_VERSION="4f84a09f217665f84471e8cef74c0b46b873bbe5"
99-
export INSTALL_PI_SOURCE_VERSION="d28b31e4fa05b51f93b9810f5a3ef4a57fbfb8a8"
100-
export INSTALL_P4C_SOURCE_VERSION="4d926d0723c42175c960dd72c762b92de70e5b58"
101-
export INSTALL_PTF_SOURCE_VERSION="6af750831ffe14512c5195383f2b39691744503e"
48+
2026-May-01)
49+
export INSTALL_BEHAVIORAL_MODEL_SOURCE_VERSION="08bba268ecf3c92e53778b9605696c1e2c46d9e8"
50+
export INSTALL_PI_SOURCE_VERSION="51805c0108cb49e85e4812dd05bb6693b1f48f85"
51+
export INSTALL_P4C_SOURCE_VERSION="fe95abfa3318512732776a1ad0aa83b4f2192216"
52+
export INSTALL_PTF_SOURCE_VERSION="c67ca73692fb1ec23e0b11c7f5b03f1633da09a2"
10253
;;
10354
latest)
10455
echo "Using the latest version of all p4lang repository source code."

vm-ubuntu-24.04/patches/behavioral-model-support-venv.patch renamed to vm-ubuntu-24.04/patches/behavioral-model-support-venv-2026-apr.patch

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
diff --git a/ci/install-nnpy.sh b/ci/install-nnpy.sh
2-
index 558d2a0..b7d0d76 100644
3-
--- a/ci/install-nnpy.sh
4-
+++ b/ci/install-nnpy.sh
5-
@@ -1,3 +1,3 @@
6-
#!/bin/sh
7-
set -e
8-
-sudo pip3 install nnpy cffi
9-
+pip3 install nnpy cffi
101
diff --git a/ci/install-thrift.sh b/ci/install-thrift.sh
112
index 1316476..ea6203c 100644
123
--- a/ci/install-thrift.sh
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
SPDX-FileCopyrightText: 2026 Andy Fingerhut
2+
3+
SPDX-License-Identifier: Apache-2.0

vm-ubuntu-24.04/patches/behavioral-model-support-venv.patch.license

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
<!--
2+
SPDX-FileCopyrightText: 2024 Andy Fingerhut
3+
4+
SPDX-License-Identifier: Apache-2.0
5+
-->
6+
7+
# Creating a VM using VirtualBox and an ISO disk image with an Ubuntu Desktop Linux 26.04 installer
8+
9+
In the initial boot menu, the default choice "Try or Install Ubuntu"
10+
should be highlighted. Press return to continue.
11+
12+
Choose your language. Click Next button.
13+
14+
In "Accessibility", I usually do not change any of the defaults. You
15+
might want to. Click Next button when ready to continue.
16+
17+
Select your keyboard layout. Click Next button.
18+
19+
In "Internet connection" screen, you will likely see the default
20+
choice as "Use wired connection", and there is a greyed-out
21+
unselectable choice "No Wi-Fi devices connected". This is the case
22+
even if the host system has no wired network connection, only Wi-Fi.
23+
The reason you see these choices is that as far as the VM is
24+
concerned, it detects only a virtual wired Ethernet adapter, created
25+
by VirtualBox, and does not see the host system's physical Wi-Fi
26+
device. This is normal. Click the Next button to proceed.
27+
28+
In "Try or Install Ubuntu", select "Install Ubuntu". Click the Next
29+
button.
30+
31+
In "Type of installation", select "Interactive Installation". At
32+
least, that is what these instructions are written for. If you want
33+
to try an Automated installation, feel free to do so, but don't expect
34+
the steps to be documented here. Click the Next button.
35+
36+
In "Applications" window, select "Default selection", and click Next.
37+
38+
In "Optimise your computer" window, I leave the boxes unchecked, and
39+
click Next.
40+
41+
In "Disk setup" window, select "Erase disk and install Ubuntu", and
42+
click Next. Note that it is only the new virtual disk you created for
43+
this VM that is going to be erased and written over, _not_ the entire
44+
file storage of the host OS.
45+
46+
In "Encryption and file system" window, I check "No encryption", but
47+
you may choose otherwise. Click Next.
48+
49+
In "Create your account" window, enter your own name (if you wish --
50+
feel free to use pseudonyms if that floats your boat), desired system
51+
name, user name, and password. I prefer to uncheck the box next to
52+
"Require my password to log in", as my host system is intended to keep
53+
the computer secure with requiring a password to log in, with screen
54+
lock after a timeout if you desire. Repeating that for the guest OS
55+
is just annoying to me. Click Next button to continue.
56+
57+
In "Select your timezone" window, click on the map your approximate
58+
location, or edit the contents of the text boxes labeled "Location" or
59+
"Timezone". Click Next to continue.
60+
61+
In "Ready to install" window, click "Install" button.
62+
63+
Installation can take several minutes. Be patient. Eventually you
64+
should see a window titled "Installation complete". Click the
65+
"Restart now" button.
66+
67+
If in a boot screen you see the message "Please remove the
68+
installation medium, then press ENTER:", just press return to
69+
continue.
70+
71+
Proceed to the section titled [Installing open source P4 development
72+
tools on the
73+
VM](README.md#installing-open-source-p4-development-tools-on-the-vm).
Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
<!--
2+
SPDX-FileCopyrightText: 2024 Andy Fingerhut
3+
4+
SPDX-License-Identifier: Apache-2.0
5+
-->
6+
7+
# Create VM using ISO installer
8+
9+
Host OS versions these instructions have been tested with:
10+
+ MacBook Pro M3 - Apple Silicon / arm64 processor
11+
+ macOS 26.4.1
12+
+ VirtualBox 7.2.6
13+
14+
## Finding the Linux installer image you want
15+
16+
Download the `.iso` file that installs the version of Linux that you
17+
are interested in. An Internet search for terms like these works for
18+
me. You should only pay attention to search results that are on the
19+
ubuntu.com web site.
20+
21+
+ If your system has a 64-bit Intel or AMD CPU
22+
+ Search terms: Ubuntu 26.04 amd64
23+
+ Names of files I found on 2026-Apr-23:
24+
+ `ubuntu-26.04-desktop-amd64.iso`
25+
+ If you have an Apple Silicon Mac:
26+
+ Search terms: Ubuntu 26.04 arm64
27+
+ Names of files I found on 2026-Apr-23:
28+
+ `ubuntu-26.04-desktop-arm64.iso`
29+
30+
An installer for Ubuntu Desktop leads to fewer steps you need to do in
31+
order to get a GUI Desktop. As of 2026, Ubuntu releases Ubuntu
32+
Desktop installers for both amd64 and arm64 systems. If you want a
33+
system with a GUI desktop, there is little reason to install from an
34+
Ubuntu Server installer first.
35+
36+
37+
## Creating a new VM
38+
39+
Start VirtualBox. While there are command line ways to do all of this
40+
with VirtualBox (I believe), I have never used those. The VirtualBox
41+
GUI takes a few minutes to use when creating a new VM, and installing
42+
the VM takes the computer a while longer. I estimate around 30 to 45
43+
minutes total time to create a new VM where you install Linux from an
44+
`.iso` file.
45+
46+
A nice thing about VirtualBox is that once you create a VM for the
47+
operating system you want, if you have enough free disk space to keep
48+
around that original VM (which I typically include "base OS" somewhere
49+
in its name), it is very quick (30 seconds or less) to create a copy
50+
of the base OS VM, and then install a bunch of software on that copy.
51+
As long as you leave the original base OS VM there, it will not
52+
change, and you can create copies of it whenever you want to try
53+
experimenting with it. Did you accidentally mess up the state of some
54+
VM's system-wide configuration files, or install some weird
55+
combination of software that seems to conflict with each other? You
56+
can abandon that VM image, deleting it whenever you no longer find its
57+
contents useful, and create more clones of the original base OS VM for
58+
further experiments.
59+
60+
In the VirtualBox GUI window:
61+
62+
+ Click the button "New"
63+
+ In the window that appears, give a unique name to your VM,
64+
e.g. "Ubuntu 26.04 base OS".
65+
+ To the right of the "ISO Image" text box, click the down-arrow icon
66+
and if you do not see the `.iso` installer file you downloaded,
67+
click "Other..." and find it.
68+
+ I prefer to _uncheck_ the box "Proceed with Unattended
69+
Installation", and these instructions will assume you are doing so,
70+
too.
71+
+ Click on the ">" symbol to the left of "Specify virtual hardware" to
72+
specify the amount of RAM, number of virtual CPUs, and hard disk
73+
space you want.
74+
+ In 2026, I rarely want to create a VM with less than 8 GBytes
75+
(8192 MBytes) of RAM. I typically select 4 processors.
76+
+ With VirtualBox, changing the RAM available to a VM, or its number
77+
of processors, after you create it is quick and easy, either
78+
increasing it, or decreasing it. Simply shut down the VM, select
79+
the VM in the GUI, click "Settings", change the RAM/number-of-CPU
80+
settings, and start the VM image again. As long as your host OS
81+
has enough free RAM, VirtualBox can use it for the running VM
82+
image. Thus, you do not need to think too hard when choosing the
83+
initial RAM size while creating the VM image.
84+
+ Click on the ">" symbol to the left of "Specify virtual hard disk"
85+
to specify the size of the virtual disk.
86+
+ I typically specify 60 GBytes of disk space. I do _not_ click the
87+
"Pre-allocate Full Size" check box, since then it would
88+
immediately create a file that was 60 GBytes in size. If you do
89+
not check that box, VirtualBox creates a disk image file that is
90+
only as large as it needs to be to store the files currently
91+
existing within the VM's file system, not the full size it might
92+
grow to later.
93+
+ Leave the other settings as: VDI format for disk image, and the
94+
boxes unchecked next to "Use an Existing Virtual Hard Disk File"
95+
and "Create Virtual Machine Without a Virtual Hard Disk".
96+
+ I believe it is possible to increase the disk space allocated to
97+
the VM later, but I have not personally done so, and you will not
98+
find instructions to do so here. It is definitely more steps than
99+
changing the RAM size later. It also might be possible to
100+
decrease it later, but only if you can find and run the proper
101+
utility programs in the guest VM to shrink its files into a subset
102+
of the available physical disk space. It is thus more important
103+
to think of the maximum disk space you expect to use within the
104+
VM, _or_ copy files out of it to another system to free up disk
105+
space during the lifetime of that VM. Fortunately you can pick a
106+
large size, and choose the option not to preallocate it all when
107+
the VM is created. It might be easier to create a new VM and copy
108+
files from the old one to the new one vs. increasing the disk
109+
space available to an old one.
110+
+ Click the "Finish" button. This closes the window you were working
111+
on, and a new VM image with the name you gave it has now been
112+
created. It does _not_ have the OS installed yet.
113+
+ Select that new image and click on the button "Settings".
114+
+ Click "General".
115+
+ Under the "Features" tab, change "Shared Clipboard" to
116+
"Bidirectional".
117+
+ Click "Display".
118+
+ Under the "Screen" tab, change "Video Memory" from 16 MB to 32 MB.
119+
+ If you want to create a shared folder on your host OS that is
120+
readable and writable from the guest OS, too, click "Shared Folder".
121+
+ Click on the icon that looks like a folder with a "+" symbol on it.
122+
+ Change "Folder Path" to choose the host OS folder you want to share.
123+
+ Check the box for "Auto-mount".
124+
+ If you want the guest OS to only be able to read this folder, but
125+
not write to it, check the box for "Read-only".
126+
+ Click "OK" button.
127+
+ Back in the main settings window for the VM image, click the OK
128+
button.
129+
130+
131+
# Common steps for starting any VM image, including a new installer one
132+
133+
+ Select the VM image and click the "Start" button.
134+
+ If the text is uncomfortably small for reading, select the
135+
VirtualBox menu item View -> Virtual Screen 1 -> Scale to 200%.
136+
Adjust the scale choice to your reading comfort.
137+
138+
139+
# Creating a VM using VirtualBox and an ISO disk image with an Ubuntu Desktop Linux installer
140+
141+
Follow the steps
142+
[here](README-create-vm-using-iso-installer-for-ubuntu-desktop.md).

vm-ubuntu-26.04/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!--
2+
SPDX-FileCopyrightText: 2026 Andy Fingerhut
3+
4+
SPDX-License-Identifier: Apache-2.0
5+
-->
6+
7+
# Introduction
8+
9+
Ubuntu 26.04 was released on 2026-Apr-23. The open source P4
10+
development tools have not yet been updated and tested working on
11+
Ubuntu 26.04. Be patient. Ubuntu 26.04 includes more recent versions
12+
of GCC and other build tools as the default versions, and some P4 code
13+
requires changes in order to compile successfully when using the new
14+
versions.
15+
16+
In the mean time, Ubuntu 22.04 and 24.04 are actively supported, and
17+
you can find instructions for installing the open source P4
18+
development tools on Ubuntu 24.04
19+
[here](../vm-ubuntu-24.04/README.md).

0 commit comments

Comments
 (0)