Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docker/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ services:
- INTERMEDIATE_IMAGE=universalpayload
- GCC_VERSION=9
- PYTHON_PACKAGES=python-is-python3 python2 python3
- PYTHON_VERSION=python3
- NODESOURCE=https://deb.nodesource.com/setup_20.x
edk2-stable202302:
build:
Expand Down
1 change: 1 addition & 0 deletions docker/edk2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -182,5 +182,6 @@ RUN cd Edk2 && \
ARG INTERMEDIATE_IMAGE
FROM ${INTERMEDIATE_IMAGE} AS final

COPY --chown=root:root --chmod=755 scripts/* /bin/
COPY --from=toolchain $TOOLSDIR $TOOLSDIR

12 changes: 12 additions & 0 deletions docker/edk2/scripts/switch-to-python2
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

set -Eeuo pipefail

echo "Switching from Python 3 to Python 2 as default"

# Uninstall python-is-python3 if installed
apt-get remove -y python-is-python3 || true

# Update alternatives
update-alternatives --remove python /usr/bin/python3
update-alternatives --install /usr/local/bin/python python /usr/bin/python2 100
1 change: 1 addition & 0 deletions docker/uboot/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ RUN apt-get update && \
lz4 \
lzma \
lzma-alone \
nodejs \
openssl \
pkg-config \
python3 \
Expand Down
1 change: 1 addition & 0 deletions docker/uroot/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ RUN apt-get update && \
git \
less \
nano \
nodejs \
screen \
tmux \
tree \
Expand Down
1 change: 1 addition & 0 deletions docs/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
- [GitHub CI](firmware-action/usage_github.md)
- [Configuration](firmware-action/config.md)
- [Troubleshooting](firmware-action/troubleshooting.md)
- [Tips and Tricks](firmware-action/tips.md)
- [Features](firmware-action/features.md)
- [Build Docker container on the fly](firmware-action/build_dockerfile_on_the_fly.md)
- [Interactive debugging](firmware-action/interactive.md)
Expand Down
11 changes: 11 additions & 0 deletions docs/src/firmware-action/tips.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Tips and Tricks

## Python2 for building Intel FSP

Intel FSP can be build in the EDK2 containers. However the containers often have `Python3` as default.

Most `EDK2` containers have `Python2` installed and contain script `switch-to-python2` (`/bin/switch-to-python2`) which will let you easily switch to `Python2` as default.

```admonish tip
To see which python version are installed and which python version is used as default, look into our [compose.yaml](https://github.com/9elements/firmware-action/blob/main/docker/compose.yaml). Specifically, look into `edk2` containers and their arguments `PYTHON_PACKAGES` (which python versions are installed) and `PYTHON_VERSION` (which python version is the default).
```
Loading