mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 13:45:20 +00:00
scripts: Remove the workaround for "with-serde" build error on AArch64
Signed-off-by: Michael Zhao <michael.zhao@arm.com>
This commit is contained in:
parent
afa8ecc90c
commit
44eccbe1af
2
.github/workflows/cross-build.yaml
vendored
2
.github/workflows/cross-build.yaml
vendored
@ -24,8 +24,6 @@ jobs:
|
|||||||
override: true
|
override: true
|
||||||
- name: Install arm64 libfdt
|
- name: Install arm64 libfdt
|
||||||
run: wget http://ftp.us.debian.org/debian/pool/main/d/device-tree-compiler/libfdt-dev_1.6.0-1_arm64.deb && dpkg-deb -xv libfdt-dev_1.6.0-1_arm64.deb ./tlibfdtdev && sudo mkdir /tmmmp && mkdir target && mkdir target/debug && mkdir target/debug/deps && sudo cp ./tlibfdtdev/usr/lib/aarch64-linux-gnu/libfdt.a target/debug/deps/libfdt.a && echo "libfdt installed"
|
run: wget http://ftp.us.debian.org/debian/pool/main/d/device-tree-compiler/libfdt-dev_1.6.0-1_arm64.deb && dpkg-deb -xv libfdt-dev_1.6.0-1_arm64.deb ./tlibfdtdev && sudo mkdir /tmmmp && mkdir target && mkdir target/debug && mkdir target/debug/deps && sudo cp ./tlibfdtdev/usr/lib/aarch64-linux-gnu/libfdt.a target/debug/deps/libfdt.a && echo "libfdt installed"
|
||||||
- name: Disable "with-serde" in kvm-bindings
|
|
||||||
run: sed -i 's/"with-serde",\ //g' hypervisor/Cargo.toml
|
|
||||||
- name: Build
|
- name: Build
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
|
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -513,7 +513,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "kvm-bindings"
|
name = "kvm-bindings"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
source = "git+https://github.com/cloud-hypervisor/kvm-bindings?branch=ch#3a6780089e0e2d69aaf77666524e81801c814bdd"
|
source = "git+https://github.com/cloud-hypervisor/kvm-bindings?branch=ch#11af42da85f21ac13d7aaebf5765f3ede6252b25"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde",
|
"serde",
|
||||||
"serde_derive",
|
"serde_derive",
|
||||||
|
@ -16,12 +16,6 @@ sudo apt-get install libfdt-dev
|
|||||||
|
|
||||||
## Build
|
## Build
|
||||||
|
|
||||||
Before building, a hack trick need to be performed to get rid of some build error in vmm component. See [this](https://github.com/cloud-hypervisor/kvm-bindings/pull/1) for more info about this temporary workaround.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
sed -i 's/"with-serde",\ //g' hypervisor/Cargo.toml
|
|
||||||
```
|
|
||||||
|
|
||||||
For Virtio devices, you can choose MMIO or PCI as transport option.
|
For Virtio devices, you can choose MMIO or PCI as transport option.
|
||||||
|
|
||||||
### MMIO
|
### MMIO
|
||||||
|
@ -215,11 +215,6 @@ cmd_build() {
|
|||||||
rustflags="-C link-arg=-lgcc -C link_arg=-specs -C link_arg=/usr/lib/aarch64-linux-musl/musl-gcc.specs"
|
rustflags="-C link-arg=-lgcc -C link_arg=-specs -C link_arg=/usr/lib/aarch64-linux-musl/musl-gcc.specs"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# A workaround on Arm64 to avoid build errors in kvm-bindings
|
|
||||||
if [ $(uname -m) = "aarch64" ]; then
|
|
||||||
sed -i 's/"with-serde",\ //g' "$CLH_ROOT_DIR"/hypervisor/Cargo.toml
|
|
||||||
fi
|
|
||||||
|
|
||||||
$DOCKER_RUNTIME run \
|
$DOCKER_RUNTIME run \
|
||||||
--user "$(id -u):$(id -g)" \
|
--user "$(id -u):$(id -g)" \
|
||||||
--workdir "$CTR_CLH_ROOT_DIR" \
|
--workdir "$CTR_CLH_ROOT_DIR" \
|
||||||
|
@ -184,8 +184,6 @@ TARGET_CC="musl-gcc"
|
|||||||
CFLAGS="-I /usr/include/aarch64-linux-musl/ -idirafter /usr/include/"
|
CFLAGS="-I /usr/include/aarch64-linux-musl/ -idirafter /usr/include/"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sed -i 's/"with-serde",\ //g' hypervisor/Cargo.toml
|
|
||||||
|
|
||||||
cargo build --all --release --no-default-features --features pci,kvm --target $BUILD_TARGET
|
cargo build --all --release --no-default-features --features pci,kvm --target $BUILD_TARGET
|
||||||
strip target/$BUILD_TARGET/release/cloud-hypervisor
|
strip target/$BUILD_TARGET/release/cloud-hypervisor
|
||||||
strip target/$BUILD_TARGET/release/vhost_user_net
|
strip target/$BUILD_TARGET/release/vhost_user_net
|
||||||
|
Loading…
Reference in New Issue
Block a user