Lines Matching +full:libwayland +full:- +full:dev
18 ARCH="$(uname -m)"
19 : ${OUTPUT_DIR:="$(pwd)/${ARCH}-linux-gnu"}
28 set -e
29 set -x
39 rm -rf .cargo
41 retry curl -L \
42 --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o rustup-init
43 chmod +x rustup-init
44 ./rustup-init -y --no-modify-path --default-toolchain ${RUST_TOOLCHAIN_VER}
46 if [[ -n "$1" ]]; then
49 rm -f rustup-init
51 if [[ -n "$1" ]]; then
54 linker = "${1/-unknown-/-}"
62 sudo dpkg --add-architecture arm64
63 sudo apt-get update
64 sudo apt-get install -y \
68 build-essential \
76 libcap-dev \
77 libegl1-mesa-dev \
78 libfdt-dev \
79 libgl1-mesa-dev \
80 libgles2-mesa-dev \
81 libpciaccess-dev \
82 libssl-dev \
84 libusb-1.0-0-dev \
85 libwayland-bin \
86 libwayland-dev \
87 libxml2-dev \
90 ninja-build \
91 pkg-config \
92 protobuf-compiler \
94 python3-pip \
96 wayland-protocols \
98 xutils-dev # Needed to pacify autogen.sh for libepoxy
99 mkdir -p "${TOOLS_DIR}"
101 # Repo needs python3 but python-is-python3 package not available:
102 sudo ln -s -f /usr/bin/python3 /usr/bin/python
104 curl https://storage.googleapis.com/git-repo-downloads/repo > "${TOOLS_DIR}/repo"
107 # Gfxstream needs a new-ish version of CMake
108 mkdir -p "${TOOLS_DIR}/cmake"
110 curl -O -L https://cmake.org/files/v3.22/cmake-3.22.1-linux-$(uname -m).sh
111 chmod +x cmake-3.22.1-linux-$(uname -m).sh
112 sudo ./cmake-3.22.1-linux-$(uname -m).sh --skip-license --exclude-subdir --prefix=/usr/local
113 cmake --version
117 pip3 install --no-warn-script-location meson
120 pip3 install absl-py
123 case "$(uname -m)" in
128 # Cross-compilation is x86_64 specific
129 sudo apt install -y crossbuild-essential-arm64
130 prepare_cargo aarch64-unknown-linux-gnu
146 mkdir -p "${SOURCE_DIR}"
150 git config --global user.name "AOSP Crosvm Builder"
151 git config --global user.email "[email protected]"
152 git config --global color.ui false
155 if [[ -z "${CUSTOM_MANIFEST}" ]]; then
163 repo init --depth=1 -q -u https://android.googlesource.com/platform/manifest -m $PWD/manifest.xml
168 if [ "$(ls -A $SOURCE_DIR)" ]; then
177 rm -rf "${SOURCE_DIR}/.*"
178 rm -rf "${SOURCE_DIR}/*"
184 objcopy --only-keep-debug "${OUTPUT_BIN_DIR}/$1" "${OUTPUT_BIN_DIR}/$1.debug"
185 strip --strip-debug "${OUTPUT_BIN_DIR}/$1"
187 objcopy --add-gnu-debuglink="$1.debug" "$1"
188 cd -
194 # Ensure pkg-config file supplies rpath to dependent libraries
196 sed -i "s|install : true,|install : true, install_rpath : '\$ORIGIN',|" meson.build
199 --libdir="${WORKING_DIR}/usr/lib" \
200 --prefix="${WORKING_DIR}/usr" \
201 -Damdgpu=false \
202 -Dfreedreno=false \
203 -Dintel=false \
204 -Dlibkms=false \
205 -Dnouveau=false \
206 -Dradeon=false \
207 -Dvc4=false \
208 -Dvmwgfx=false
213 cp -a "${WORKING_DIR}"/usr/lib/libdrm.so* "${OUTPUT_BIN_DIR}"
222 if ! grep '^# cuttlefish_vmm-rebuild-mark' Makefile; then
223 # Link minijail-sys rust crate dynamically to minijail
224 sed -i '/BUILD_STATIC_LIBS/d' rust/minijail-sys/build.rs
225 sed -i 's,static=minijail.pic,dylib=minijail,' rust/minijail-sys/build.rs
228 sed -i 's,\(.*\.gen\.c: \),DISABLED_\1,' Makefile
230 libconstants.gen.c: \$(SRC)/linux-x86/libconstants.gen.c
232 libsyscalls.gen.c: \$(SRC)/linux-x86/libsyscalls.gen.c
234 # cuttlefish_vmm-rebuild-mark
238 make -j OUT="${WORKING_DIR}"
241 cp -a "${WORKING_DIR}"/usr/lib/libminijail.so "${OUTPUT_BIN_DIR}"
250 # Minigbm's package config file has a default hard-coded path. Update here so
252 sed -i "s|prefix=/usr\$|prefix=${WORKING_DIR}/usr|" gbm.pc
256 local cpp_flags=(-I/working/usr/include -I/working/usr/include/libdrm)
257 local ld_flags=(-Wl,-soname,libgbm.so.1 -Wl,-rpath,\\\$\$ORIGIN -L/working/usr/lib)
261 cpp_flags+=(-D"DRV_${drv}")
265 make -j install \
272 cp -a "${WORKING_DIR}"/usr/lib/libminigbm.so* "${OUTPUT_BIN_DIR}"
273 cp -a "${WORKING_DIR}"/usr/lib/libgbm.so* "${OUTPUT_BIN_DIR}"
281 --libdir="${WORKING_DIR}/usr/lib" \
282 --prefix="${WORKING_DIR}/usr" \
283 -Dglx=no \
284 -Dx11=false \
285 -Degl=yes
290 cp -a "${WORKING_DIR}"/usr/lib/libepoxy.so* "${OUTPUT_BIN_DIR}"
301 …sed -i "s|cc.has_header('epoxy/egl.h')|cc.has_header('epoxy/egl.h', dependencies: epoxy_dep)|" mes…
303 # Ensure pkg-config file supplies rpath to dependent libraries
305 sed -i "s|install : true|install : true, install_rpath : '\$ORIGIN'|" src/meson.build
308 --libdir="${WORKING_DIR}/usr/lib" \
309 --prefix="${WORKING_DIR}/usr" \
310 -Dplatforms=egl \
311 -Dminigbm_allocation=false
316 cp -a "${WORKING_DIR}"/usr/lib/libvirglrenderer.so* "${OUTPUT_BIN_DIR}"
325 --prefix="${WORKING_DIR}/usr" \
326 --libdir="${WORKING_DIR}/usr/lib"
329 cp -a "${WORKING_DIR}"/usr/lib/libffi.so* "${OUTPUT_BIN_DIR}"
337 sed -i "s|install: true\$|install: true, install_rpath : '\$ORIGIN'|" src/meson.build
340 --libdir="${WORKING_DIR}/usr/lib" \
341 --prefix="${WORKING_DIR}/usr"
342 ninja -C build/ install
344 cp -a "${WORKING_DIR}"/usr/lib/libwayland-client.so* "${OUTPUT_BIN_DIR}"
345 debuglink libwayland-client.so.0.3.0
352 [ -d "${dist_dir}" ] && rm -rf "${dist_dir}"
357 -G Ninja \
358 -DBUILD_GRAPHICS_DETECTOR=ON \
359 -DDEPENDENCY_RESOLUTION=AOSP
364 cp -a "${dist_dir}"/gfxstream_graphics_detector "${OUTPUT_BIN_DIR}"
368 cp -a "${dist_dir}"/libgfxstream_backend.so "${WORKING_DIR}"/usr/lib
369 cp -a "${WORKING_DIR}"/usr/lib/libgfxstream_backend.so "${OUTPUT_BIN_DIR}"
377 [ -d "${dist_dir}" ] && rm -rf "${dist_dir}"
378 mkdir -p "${dist_dir}"
384 -G Ninja \
385 -DSWIFTSHADER_BUILD_TESTS=FALSE \
386 -DSWIFTSHADER_LLVM_VERSION=16.0
390 cp -a "${dist_dir}"/libvk_swiftshader.so "${OUTPUT_BIN_DIR}"
393 cp -a "${dist_dir}"/Linux/vk_swiftshader_icd.json "${OUTPUT_BIN_DIR}"
410 sed -i "s/pub use cdisk_spec_proto::cdisk_spec/pub use generated::cdisk_spec/" lib.rs
414 # Workaround for minijail-sys prepending -L/usr/lib/$arch dir
416 …sed -i '0,/pkg_config::Config::new().probe("libdrm")?;/{/pkg_config::Config::new().probe("libdrm")…
419 sed -i 's/atleast_version("1.0.0")/atleast_version("0.10.0")/g' rutabaga_gfx/build.rs
421 local crosvm_features=audio,gdb,gpu,composite-disk,usb,virgl_renderer
422 if [[ $BUILD_GFXSTREAM -eq 1 ]]; then
430 RUSTFLAGS="-C link-arg=-Wl,-rpath,\$ORIGIN -C link-arg=${WORKING_DIR}/usr/lib/libdrm.so" \
431 cargo build --features ${crosvm_features}
438 cargo --version --verbose > "${OUTPUT_DIR}/cargo_version.txt"
467 jail/seccomp/policy-inliner.sh $inlined_policy_list <"$policy_file" | \
468 grep -ve "^@frequency" \
475 mkdir -p \
482 if [[ $BUILD_CROSVM -eq 1 ]]; then
492 if [[ $BUILD_GFXSTREAM -eq 1 ]]; then
499 if [[ $BUILD_SWIFTSHADER -eq 1 ]]; then
503 dpkg-query -W > "${OUTPUT_DIR}/builder-packages.txt"
512 rm -rf "${WORKING_DIR}/*"
521 rm -rf "${WORKING_DIR}/*"
525 if [[ $# -lt 1 ]]; then
547 …install_packages|prepare_source|resync_source|fetch_source|$(uname -m)_build|$(uname -m)_retry' 1>…