From 44eccbe1af1c49aff2dce1cd51530b5449e3f276 Mon Sep 17 00:00:00 2001 From: Michael Zhao Date: Fri, 31 Jul 2020 15:53:23 +0800 Subject: [PATCH] scripts: Remove the workaround for "with-serde" build error on AArch64 Signed-off-by: Michael Zhao --- .github/workflows/cross-build.yaml | 2 -- Cargo.lock | 2 +- docs/arm64.md | 6 ------ scripts/dev_cli.sh | 5 ----- scripts/run_integration_tests_aarch64.sh | 2 -- 5 files changed, 1 insertion(+), 16 deletions(-) diff --git a/.github/workflows/cross-build.yaml b/.github/workflows/cross-build.yaml index a7fec037e..b7bce7f31 100644 --- a/.github/workflows/cross-build.yaml +++ b/.github/workflows/cross-build.yaml @@ -24,8 +24,6 @@ jobs: override: true - 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" - - name: Disable "with-serde" in kvm-bindings - run: sed -i 's/"with-serde",\ //g' hypervisor/Cargo.toml - name: Build uses: actions-rs/cargo@v1 with: diff --git a/Cargo.lock b/Cargo.lock index bd38f9ad2..3554744ad 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -513,7 +513,7 @@ dependencies = [ [[package]] name = "kvm-bindings" 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 = [ "serde", "serde_derive", diff --git a/docs/arm64.md b/docs/arm64.md index 2b5ed7ae0..27e698f9b 100644 --- a/docs/arm64.md +++ b/docs/arm64.md @@ -16,12 +16,6 @@ sudo apt-get install libfdt-dev ## 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. ### MMIO diff --git a/scripts/dev_cli.sh b/scripts/dev_cli.sh index 37f4ff486..8e8f2c803 100755 --- a/scripts/dev_cli.sh +++ b/scripts/dev_cli.sh @@ -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" 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 \ --user "$(id -u):$(id -g)" \ --workdir "$CTR_CLH_ROOT_DIR" \ diff --git a/scripts/run_integration_tests_aarch64.sh b/scripts/run_integration_tests_aarch64.sh index 0a0296751..82eb7301b 100755 --- a/scripts/run_integration_tests_aarch64.sh +++ b/scripts/run_integration_tests_aarch64.sh @@ -184,8 +184,6 @@ TARGET_CC="musl-gcc" CFLAGS="-I /usr/include/aarch64-linux-musl/ -idirafter /usr/include/" fi -sed -i 's/"with-serde",\ //g' hypervisor/Cargo.toml - 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/vhost_user_net