Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose len8_dlc field of can_frame struct. #3357

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
13 changes: 6 additions & 7 deletions ci/docker/mipsel-unknown-linux-musl/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,16 @@ RUN mkdir /toolchain
# Linux kernel version: 5.4.154
# See build_dir/target-mipsel_mips32_musl/linux-brcm47xx_generic/linux-5.4.154
# Musl version: 1.1.24
# See staging_dir/toolchain-mipsel_mips32_gcc-8.4.0_musl/info.mk
RUN curl --retry 5 -L https://downloads.openwrt.org/releases/21.02.1/targets/bcm47xx/generic/openwrt-sdk-21.02.1-bcm47xx-generic_gcc-8.4.0_musl.Linux-x86_64.tar.xz | \
# See staging_dir/toolchain-mipsel_mips32_gcc-12.3.0_musl/info.mk
RUN curl --retry 5 -L https://downloads.openwrt.org/releases/23.05.0-rc4/targets/bcm47xx/generic/openwrt-sdk-23.05.0-rc4-bcm47xx-generic_gcc-12.3.0_musl.Linux-x86_64.tar.xz |\
tar xJf - -C /toolchain --strip-components=1

# See https://lkml.org/lkml/2014/3/14/269
COPY sysinfo_guard.patch /toolchain
RUN patch /toolchain/staging_dir/toolchain-mipsel_mips32_gcc-8.4.0_musl/include/linux/kernel.h </toolchain/sysinfo_guard.patch
RUN patch /toolchain/staging_dir/toolchain-mipsel_mips32_gcc-12.3.0_musl/include/linux/kernel.h </toolchain/sysinfo_guard.patch

ENV PATH=$PATH:/rust/bin:/toolchain/staging_dir/toolchain-mipsel_mips32_gcc-8.4.0_musl/bin \
ENV PATH=$PATH:/rust/bin:/toolchain/staging_dir/toolchain-mipsel_mips32_gcc-12.3.0_musl/bin \
STAGING_DIR=/toolchain/staging_dir \
CC_mipsel_unknown_linux_musl=mipsel-openwrt-linux-musl-gcc \
CARGO_TARGET_MIPSEL_UNKNOWN_LINUX_MUSL_LINKER=mipsel-openwrt-linux-musl-gcc \
CARGO_TARGET_MIPSEL_UNKNOWN_LINUX_MUSL_RUNNER="qemu-mipsel -L /toolchain/staging_dir/toolchain-mipsel_mips32_gcc-8.4.0_musl" \
RUSTFLAGS="-L /toolchain/staging_dir/toolchain-mipsel_mips32_gcc-8.4.0_musl/lib"
CARGO_TARGET_MIPSEL_UNKNOWN_LINUX_MUSL_RUNNER="qemu-mipsel -L /toolchain/staging_dir/toolchain-mipsel_mips32_gcc-13.3.0_musl" \
RUSTFLAGS="-L /toolchain/staging_dir/toolchain-mipsel_mips32_gcc-12.3.0_musl/lib"
9 changes: 8 additions & 1 deletion ci/run-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,16 @@

set -ex

CARGO_BIN=$(command -v cargo)

# If cargo is a symlink to rustup, ask rustup where to find the real cargo.
if [ "$(basename "$(readlink "$CARGO_BIN")")" = "rustup" ]; then
CARGO_BIN="$($(readlink "$CARGO_BIN") which cargo)"
fi

# Default to assuming the CARGO_HOME is one directory up (to account for a `bin`
# subdir) from where the `cargo` binary in `$PATH` lives.
DEFAULT_CARGO_HOME="$(dirname "$(dirname "$(command -v cargo)")")"
DEFAULT_CARGO_HOME="$(dirname "$(dirname "$CARGO_BIN")")"
# If the CARGO_HOME env var is already set, use that. If it isn't set use the
# default.
CARGO_HOME="${CARGO_HOME:-$DEFAULT_CARGO_HOME}"
Expand Down
2 changes: 1 addition & 1 deletion src/unix/linux_like/linux/align.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ macro_rules! expand_align {
pub can_dlc: u8,
__pad: u8,
__res0: u8,
__res1: u8,
pub len8_dlc: u8,
pub data: [u8; CAN_MAX_DLEN],
}

Expand Down