Add some devices to FDT (Flattened Device Tree) #107
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- { icon: 'π¦', sys: mingw64, mode: dynamic } | |
- { icon: 'π¦', sys: mingw64, mode: static } | |
name: π§${{ matrix.icon }} ${{ matrix.sys }} Build ${{ matrix.mode }} | |
defaults: | |
run: | |
shell: msys2 {0} | |
steps: | |
- name: 'π§° Checkout' | |
uses: actions/checkout@main | |
- name: '${{ matrix.icon }} Setup MSYS2' | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: ${{ matrix.sys }} | |
update: true | |
install: >- | |
git | |
make | |
bison | |
diffutils | |
flex | |
grep | |
sed | |
base-devel | |
python | |
python-setuptools | |
pacboy: >- | |
toolchain:p | |
binutils:p | |
capstone:p | |
ccache:p | |
curl:p | |
cyrus-sasl:p | |
dtc:p | |
gcc:p | |
glib2:p | |
gnutls:p | |
gtk3:p | |
libgcrypt:p | |
libjpeg-turbo:p | |
libnfs:p | |
libpng:p | |
libssh:p | |
libtasn1:p | |
libusb:p | |
lzo2:p | |
nettle:p | |
ninja:p | |
pixman:p | |
pkgconf:p | |
python:p | |
SDL2:p | |
SDL2_image:p | |
snappy:p | |
spice:p | |
usbredir:p | |
zstd:p | |
libslirp:p | |
- name: 'Modify pkgconfig to avoid linker issues' | |
if: ${{ matrix.mode == 'static' }} | |
run: | | |
PKGCONFIG_FILE="$MINGW_PREFIX/lib/pkgconfig/gpg-error.pc" | |
sed -i 's#'$MINGW_PREFIX'/lib/libintl.dll.a#-llibintl#g' "$PKGCONFIG_FILE" | |
sed -i 's#'$MINGW_PREFIX'/lib/libiconv.dll.a#-llibiconv#g' "$PKGCONFIG_FILE" | |
- name: 'π§ Build QEMU (arm & aarch64) ${{ matrix.mode }}' | |
env: | |
arg: ${{ matrix.mode == 'dynamic' && '--enable-gtk --enable-sdl --enable-fdt=system --enable-avx2 --target-list=arm-softmmu,aarch64-softmmu' || '--disable-gtk --disable-spice --disable-usb-redir --disable-smartcard --disable-gnutls --disable-libssh --enable-sdl --enable-fdt=system --enable-avx2 --target-list=arm-softmmu,aarch64-softmmu --static --extra-cflags="-DCURL_STATICLIB -DLIBSSH_STATIC -DLIBSLIRP_STATIC -DCAIRO_WIN32_STATIC_BUILD"' }} | |
run: | | |
./configure ${{ env.arg }} | |
make -j16 | |
- name: Prepare Artifacts | |
shell: cmd | |
run: | | |
md ${{ github.workspace }}\artifacts | |
cd ${{ github.workspace }}\artifacts | |
move D:\a\qemu\qemu\build\*.exe | |
move D:\a\qemu\qemu\build\pc-bios share | |
robocopy D:\a\qemu\qemu\pc-bios share /xn /xo /mov | |
del share\*.bz2 | |
- name: Prepare Artifacts (dynamic only) | |
shell: cmd | |
if: ${{ matrix.mode == 'dynamic' }} | |
run: | | |
cd ${{ github.workspace }}\artifacts | |
copy D:\a\_temp\msys64\mingw64\bin\*.dll | |
md lib\gdk-pixbuf-2.0\2.10.0 | |
fsutil file createNew lib\gdk-pixbuf-2.0\2.10.0\loaders.cache 0 | |
move D:\a\qemu\qemu\build\po share\locale | |
- name: Upload artifact | |
uses: actions/upload-artifact@main | |
with: | |
name: QEMU (${{ matrix.mode }} build) | |
path: ${{ github.workspace }}/artifacts | |
compression-level: 9 | |
build_linux: | |
runs-on: ubuntu-24.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- { arch: x64 } | |
- { arch: aarch64 } | |
name: Build Linux ${{ matrix.arch }} | |
steps: | |
- name: 'π§° Checkout' | |
uses: actions/checkout@main | |
- name: 'Install software packages' | |
if: ${{ matrix.arch == 'x64' }} | |
run: | | |
sudo apt update | |
sudo apt-get install libglib2.0-dev libfdt-dev libpixman-1-dev ninja-build libaio-dev libbluetooth-dev libcapstone-dev libbrlapi-dev libbz2-dev libcap-ng-dev libcurl4-gnutls-dev libgtk-3-dev libibverbs-dev libjpeg8-dev libnuma-dev librbd-dev librdmacm-dev libsasl2-dev libsdl2-dev libseccomp-dev libsnappy-dev libssh-dev libvde-dev libvdeplug-dev libvte-2.91-dev libxen-dev liblzo2-dev valgrind xfslibs-dev libnfs-dev libiscsi-dev | |
- name: 'Install software packages (for cross build)' | |
if: ${{ matrix.arch == 'aarch64' }} | |
run: | | |
sudo apt update | |
sudo apt-get install gcc-aarch64-linux-gnu ninja-build | |
sudo dpkg --add-architecture arm64 | |
sudo sed -i '/Types/{N;N;N;N;N;N;N;N;N;N;N;N;s/\(Types.*\n.*\)archive\(.*\)\/ubuntu\(.*\n.*\n.*\n.*gpg\)\(\n\n.*\n.*\n\)\(Types.*\n.*\)archive\(.*\)\/ubuntu\(.*\n.*\n.*\n.*gpg\)/\1archive\2\/ubuntu\3\nArchitectures: amd64\n\n\1ports\2\/ubuntu-ports\3\nArchitectures: arm64\4\5archive\6\/ubuntu\7\nArchitectures: amd64\n\n\5ports\6\/ubuntu-ports\7\nArchitectures: arm64/}' /etc/apt/sources.list.d/ubuntu.sources | |
sudo apt update | |
sudo apt-get install libglib2.0-dev:arm64 libfdt-dev:arm64 libpixman-1-dev:arm64 libaio-dev:arm64 libbluetooth-dev:arm64 libcapstone-dev:arm64 libbrlapi-dev:arm64 libbz2-dev:arm64 libcap-ng-dev:arm64 libcurl4-gnutls-dev:arm64 libgtk-3-dev:arm64 libibverbs-dev:arm64 libjpeg8-dev:arm64 libnuma-dev:arm64 librbd-dev:arm64 librdmacm-dev:arm64 libsasl2-dev:arm64 libsdl2-dev:arm64 libseccomp-dev:arm64 libsnappy-dev:arm64 libssh-dev:arm64 libvde-dev:arm64 libvdeplug-dev:arm64 libvte-2.91-dev:arm64 libxen-dev:arm64 liblzo2-dev:arm64 valgrind:arm64 xfslibs-dev:arm64 libnfs-dev:arm64 libiscsi-dev:arm64 | |
- name: 'π§ Build QEMU Linux (arm & aarch64) ${{ matrix.mode }}' | |
env: | |
arg: ${{ matrix.arch == 'x64' && '--enable-gtk --enable-sdl --enable-avx2 --target-list=arm-softmmu,aarch64-softmmu' || '--enable-gtk --enable-sdl --enable-kvm --target-list=arm-softmmu,aarch64-softmmu --cross-prefix=aarch64-linux-gnu-' }} | |
run: | | |
./configure ${{ env.arg }} | |
make -j16 | |
- name: Prepare Artifacts | |
run: | | |
mkdir artifacts | |
mv build/* artifacts/ | |
- name: Upload artifact | |
uses: actions/upload-artifact@main | |
with: | |
name: QEMU Linux (${{ matrix.arch }} build) | |
path: ${{ github.workspace }}/artifacts | |
compression-level: 9 |