Skip to content

Commit d244e0f

Browse files
committed
Fix VM setup
1 parent 668ade4 commit d244e0f

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

.github/workflows/m68k.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# How to chroot with qemu into a Debian created with debootstrap: https://unix.stackexchange.com/questions/41889/how-can-i-chroot-into-a-filesystem-with-a-different-architechture
2-
# Commands need to be run inside qemu-m68k-static, e.g. qemu-m68k-static /usr/bin/ls.
3-
#
41
# TODO: check if qemu-user-static-binfmt is needed (perhaps to run some tests since it probably calls exec).
52

63
name: m68k CI
@@ -108,6 +105,12 @@ jobs:
108105
#path: rust
109106
#key: ${{ runner.os }}-packages-${{ hashFiles('rust/.git/HEAD') }}
110107

108+
- name: Prepare VM
109+
run: |
110+
mkdir vm
111+
sudo mount debian-m68k.img vm
112+
sudo cp $(which qemu-m68k-static) vm/usr/bin/
113+
111114
- name: Build
112115
run: |
113116
./y.sh prepare --only-libcore --cross

Readme.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,12 +321,10 @@ generate it in [gimple.md](./doc/gimple.md).
321321

322322
#### Configuring rustc_codegen_gcc
323323

324-
* Set `TARGET_TRIPLE="m68k-unknown-linux-gnu"` in config.sh.
325-
* Since rustc doesn't support this architecture yet, set it back to `TARGET_TRIPLE="mips-unknown-linux-gnu"` (or another target having the same attributes). Alternatively, create a [target specification file](https://book.avr-rust.com/005.1-the-target-specification-json-file.html) (note that the `arch` specified in this file must be supported by the rust compiler).
326324
* Run `./y.sh prepare --cross` so that the sysroot is patched for the cross-compiling case.
325+
* If the target is not yet supported by the Rust compiler, create a [target specification file](https://book.avr-rust.com/005.1-the-target-specification-json-file.html) (note that the `arch` specified in this file must be supported by the rust compiler).
327326
* Set `linker='-Clinker=m68k-linux-gcc'`.
328327
* Set the path to the cross-compiling libgccjit in `gcc_path`.
329-
* (might not be necessary) Disable the compilation of libstd.so (and possibly libcore.so?): Remove dylib from build_sysroot/sysroot_src/library/std/Cargo.toml.
330328

331329
If you get the following error:
332330

0 commit comments

Comments
 (0)