Skip to content

Commit 3600fef

Browse files
authored
Clone dpdk-kmods repo for igb_uio (#10)
1 parent e73967c commit 3600fef

File tree

2 files changed

+19
-11
lines changed

2 files changed

+19
-11
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ e.g.:
3535
```
3636
packer build \
3737
-var kubernetes_version=1.32 \
38-
-var source_ami_id=ami-0f114867066b78822
38+
-var source_ami_id=ami-0f114867066b78822 \
39+
amazon-ebs.pkr.hcl
3940
```
4041

4142
Arbitrary additional tags can be added to the AMI by specifying a JSON
@@ -44,7 +45,8 @@ map of tags as the `tags` variable, e.g.:
4445
```
4546
packer build \
4647
-var kubernetes_version=1.32 \
47-
-var 'tags={"mykey": "myvalue", "myotherkey": "myothervalue"}'
48+
-var 'tags={"mykey": "myvalue", "myotherkey": "myothervalue"}' \
49+
amazon-ebs.pkr.hcl
4850
```
4951

5052
## Using AMIs

install.sh

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
#!/usr/bin/env bash
22
# This script must be run as the root user.
33

4-
set -x
4+
set -ex
55

6-
# Download and build the igb_uio driver, and load it into the kernel.
7-
yum install -y "kernel-devel-$(uname -r)"
6+
yum install -y \
7+
"kernel-devel-$(uname -r)" \
8+
git
89

9-
mkdir igb_uio
10-
curl https://git.dpdk.org/dpdk-kmods/snapshot/dpdk-kmods-e721c733cd24206399bebb8f0751b0387c4c1595.tar.gz | tar -xz -C igb_uio --strip-components 1
11-
make -C igb_uio/linux/igb_uio
12-
cp igb_uio/linux/igb_uio/igb_uio.ko "/lib/modules/$(uname -r)/kernel/drivers/uio"
10+
# Download and build the igb_uio driver, and load it into the kernel.
11+
git clone git://dpdk.org/dpdk-kmods
12+
cd dpdk-kmods
13+
git switch e721c733cd24206399bebb8f0751b0387c4c1595 --detach
14+
make -C linux/igb_uio
15+
cp linux/igb_uio/igb_uio.ko "/lib/modules/$(uname -r)/kernel/drivers/uio"
1316
depmod "$(uname -r)"
14-
rm -rf igb_uio
17+
cd ../
18+
rm -rf dpdk-kmods
1519

1620
# Download a much newer version of TuneD that available from the
1721
# Amazon Linux 2 repositories. This fixes several issues with the old
@@ -37,7 +41,9 @@ mkdir tuned
3741
curl -L https://github.com/redhat-performance/tuned/archive/refs/tags/v2.20.0.tar.gz | tar -xz -C tuned --strip-components 1
3842
# N.B. The 'desktop-file-install' action is expected to fail. This doesn't
3943
# affect the installation of the tuned service.
40-
make -C tuned PYTHON=/usr/bin/python2 install
44+
if ! make -C tuned PYTHON=/usr/bin/python2 install; then
45+
echo "desktop-file-install failure is expected. Continuing with installation..."
46+
fi
4147
rm -rf tuned
4248

4349
# Set up the sysctls.

0 commit comments

Comments
 (0)