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

patches: Remove outdated patch #8

Closed

Conversation

StefanJum
Copy link
Member

@StefanJum StefanJum commented Jul 17, 2023

The patch was:

  • Replacing the lua main symbol with lua_main.
  • Removing checking that the given argument was a script, instead
    checking if there is an initrd filesystem present and trying to
    execute it.

The main symbol is already replaced in the preprocessing stage by
adding -Dmain=lua_main in the Makefile.uk flags, so renaming it is
not needed.

Trying to execute the initrd without properly extracting it will
obviously fail, since lua will not be able to read the script properly.
This will result in an malformed number near '0707010..' error.

The check for initrd is not needed at all, since the fs driver is
transparent for the application, and the script can be accessed as an
usual file, regardell of the fs dreiver (initrd, 9pfs, etc.).

app-lua can be run with a script as an argument with one of the following:

/usr/bin/qemu-system-x86_64 \                                                                          
    -fsdev local,id=myid,path="$(pwd)/fs0",security_model=none \
    -device virtio-9p-pci,fsdev=myid,mount_tag=fs0,disable-modern=on,disable-legacy=off \
    -kernel build/app-lua_qemu-x86_64 \
    -nographic -append "helloworld.lua"
/usr/bin/qemu-system-x86_64 \                                                                          
    -initrd initrd.cpio \
    -kernel build/app-lua_qemu-x86_64 \
    -nographic -append "helloworld.lua"

Signed-off-by: Stefan Jumarea stefanjumarea02@gmail.com

@StefanJum StefanJum added the bug Something isn't working label Jul 17, 2023
Copy link
Contributor

@razvand razvand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @StefanJum , this works, in conjunction to PR #7. Once @eduardvintila does his review, I will approve it to have it merged.

Copy link
Member

@eduardvintila eduardvintila left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, @StefanJum, thank you. You know what's greater? This typo from the last phrase of your commit message: regardell of the fs dreiver 😁

The patch was:
* Replacing the lua `main` symbol with `lua_main`.
* Removing checking that the given argument was a script, instead
  checking if there is an initrd filesystem present and trying to
  execute it.

The `main` symbol is already replaced in the preprocessing stage by
adding `-Dmain=lua_main` in the `Makefile.uk` flags, so renaming it is
not needed.

Trying to execute the initrd without properly extracting it will
obviously fail, since `lua` will not be able to read the script properly.
This will result in an `malformed number near '0707010..'` error.

The check for initrd is not needed at all, since the fs driver is
transparent for the application, and the script can be accessed as an
usual file, regardless of the fs driver (initrd, 9pfs, etc.).

Signed-off-by: Stefan Jumarea <stefanjumarea02@gmail.com>
@StefanJum StefanJum force-pushed the StefanJum/remove-faulty-patch branch from ce6c501 to 4eb4e7d Compare July 18, 2023 20:04
@StefanJum
Copy link
Member Author

This is great, @StefanJum, thank you. You know what's greater? This typo from the last phrase of your commit message: regardell of the fs dreiver grin

Wow that was a bad one, fixed 😆

Copy link
Member

@eduardvintila eduardvintila left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good now 😬 , thanks!

Reviewed-by: Eduard Vintilă eduard.vintila47@gmail.com

Copy link
Contributor

@razvand razvand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved-by: Razvan Deaconescu razvand@unikraft.io

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ci/merged
Projects
Status: Done!
Development

Successfully merging this pull request may close these issues.

None yet

4 participants