-
Notifications
You must be signed in to change notification settings - Fork 115
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
egg run
can't find disk image, egg run foo.iso
exits immediately after grub
#92
Comments
Sorry, useful information; I have tried installing via both methods in the README- Same thing happens in both instance edit: similarly, if I clone this repo, build egg with |
Sorry for responding so late. What's the version of go compiler? Currently only the 1.16.x version of the go compiler works. |
Thanks @icexin , and no worries- you're not here to be my unpaid tech support; I can wait as long as you need me to. I completely missed that part of the docs, and so that's completely my fault. I've installed 1.16.13 via How do you build locally? I can see the github workflow sets the toolchain to I can think of a couple of ways which could work here, either performing a local build in a container, or by tweaking cmd/egg/build/builder.go to accept a different go binary (in the same way it accepts a different go root). Containers would require a change to the readme (which I'm happy to submit a PR for), whereas a change to Do you have any recommendations? edit1: I've written a simple dockerfile to use as a builder, which looks like: FROM golang:1.16.3
RUN go install github.com/icexin/eggos/cmd/egg@latest If I build this, then run it as per: $ docker build -t egg . && docker run -v $(pwd):/app -w /app egg build -o kernel.elf And then run that locally with I can't see anything in the command that suggests it's trying to rebuild that image (when passing an argument containing the kernel) in the newer go I have installed (and timestamps suggest this is not the case, too), so I can't see where the issue is. |
The GOROOT=`go1.16.13 env GOROOT` egg build Maybe it would be better to add a FAQ to the README. |
Of course, sorry- I saw the Interestingly, when I do it that way I get the same error from
But building an iso and running the same with the iso path works fine. I'll open a PR later today which:
Does that work? |
Perhaps I compiled and ran your project as follows: $ git clone https://github.com/jspc/primes.git
$ cd primes
$ GOROOT=`go1.16.13 env GOROOT` egg build -o primes.elf
$ egg run -p 11111:11111 primes.elf
# another terminal tab
$ nc 127.0.0.1 11111
{"i":10407932194664399081925240327364085538615262247266704805319112350403608059673360298012239441732324184842421613954281007791383566248323464908139906605677320762924129509389220345773183349661583550472959420547689811211693677147548478866962501384438260291732348885311160828538416585028255604666224831890918801847068222203140521026698435488732958028878050869736186900714720710555703168729087,"v":10407932194664399081925240327364085538615262247266704805319112350403608059673360298012239441732324184842421613954281007791383566248323464908139906605677320762924129509389220345773183349661583550472959420547689811211693677147548478866962501384438260291732348885311160828538416585028255604666224831890918801847068222203140521026698435488732958028878050869736186900714720710555703168729087,"len(v)":386}
Your proposal is very good, welcome to submit PR! Thanks! |
Closing this issue now, we can track the changes/ work in this issue in #95 |
Should we open an issue to track implementing support for newer versions of Go in eggos? I am guessing that the calling convention changes in Go 1.17 will be the biggest hurdle, but since there is relatively little assmbly code in eggos, it should be fine to handle those functions with special cases. |
@mewmew I personally think it's well worth planning and doing. At the very least, the lessons learned will help if the compiler changes how binaries work as dramatically. |
Good suggestion, I will open a separate issue about supporting go1.17 to track the progress |
I've written a really simple app at https://github.com/jspc/primes which I'd like to package and run via eggos.
(The app calculates primes- it seemed like a simple use case to play with eggos).
The problem I'm facing is that trying to run the app directly with
egg run
gives me:I've read #91, and so I get that the first two lines can be ignored, but the fact qemu can't find the boot disk is worrying.
If I compile an
iso
file, then I get the grub menu, then just the lineLoading /boot/kernel.elf...
and then it all quits.Am I doing something wrong? I can see a segfault when I run
gdb kernel.elf
, but I'm not sure whether that's just because running a ring0 app on linux fails fast and loud, or whether there's a different reason.Any pointers you can give me toward figuring this out would be really appreciated!
The text was updated successfully, but these errors were encountered: