26 lines
1.2 KiB
Bash
26 lines
1.2 KiB
Bash
#!/bin/bash
|
|
cd $(dirname "$0")
|
|
|
|
podman build --tag localhost/rust:dev -f dockerfile .
|
|
|
|
podman run \
|
|
--rm --detach \
|
|
--env RUN_NON_ROOT_USER=root --env RUN_NON_ROOT_UID=0 --env RUN_NON_ROOT_GROUP=root --env RUN_NON_ROOT_GID=0 \
|
|
--volume .:/app \
|
|
--name rustup \
|
|
localhost/rust:dev \
|
|
sleep infinity
|
|
|
|
unzip -o cargo.zip
|
|
podman exec --tty --interactive rustup bash -lc 'cargo build --no-default-features --features "os_present,fpu_present" --target "aarch64-unknown-linux-gnu"' --profile dev
|
|
podman exec --tty --interactive rustup bash -lc 'cargo build --no-default-features --features "os_none" --target "thumbv7em-none-eabihf"' --profile dev
|
|
podman exec --tty --interactive rustup bash -lc 'cargo build --no-default-features --features "os_none" --target "thumbv7m-none-eabi"' --profile dev
|
|
# podman exec --tty --interactive rustup cargo build --no-default-features --features "os_present,fpu_present" --target "x86_64-unknown-linux-gnu"
|
|
# podman exec --tty --interactive rustup cargo build --no-default-features --features "os_present,fpu_present" --target "x86_64-pc-windows-gnu"
|
|
|
|
podman stop rustup
|
|
|
|
cp target/thumbv7m-none-eabi/debug/first_arm_demo rust_flash_thumb_ii_v7m.elf
|
|
|
|
|