intermezzOS / kernel

A hobby operating system, in Rust
http://intermezzos.github.io/
Apache License 2.0
1.39k stars 90 forks source link

erronious output in WSL #123

Closed steveklabnik closed 6 years ago

steveklabnik commented 6 years ago

I'm getting this error output:

$ make run
/bin/sh: 1: grub2-mkrescue: not found
xargo build --release --target x86_64-unknown-intermezzos-gnu
....
grub2-mkrescue -o target/os.iso target/isofiles
make: grub2-mkrescue: Command not found

grub-mkrescue does exist, so I'm not sure why it's testing for grub2-mkrescue;

steveklabnik commented 6 years ago

https://github.com/intermezzOS/kernel/pull/73 was the PR that added this, it works well enough for travis and such. I wonder if this is WSL specific.

steveklabnik commented 6 years ago

Yeah, given travis still builds, I bet this is specific to the WSL. Hrm.

johnterickson commented 6 years ago

I got it working with this, but haven't tested it on a system with grub2-mkrescue:

ifeq ($(shell which grub-mkrescue >/dev/null; echo $$?),0)
    grub-mkrescue = grub-mkrescue
else
    ifeq ($(shell which grub2-mkrescue >/dev/null; echo $$?),0)
        grub-mkrescue = grub2-mkrescue
    else
      $(error "grub-mkrescue is not found.")
    endif
endif