Skip to content

Unbitrot vmm LionsOS example - #109

Open
wom-bat wants to merge 5 commits into
mainfrom
fix-vmm-example
Open

Unbitrot vmm LionsOS example#109
wom-bat wants to merge 5 commits into
mainfrom
fix-vmm-example

Conversation

@wom-bat

@wom-bat wom-bat commented Aug 30, 2024

Copy link
Copy Markdown
Contributor

-- Ported the console serial system to current sDDF -- Updated system files for current microkit
-- Updated README.md to match system
-- Allow local user replacement of linux and initrd to match local
(passed-through) filesystem

@wom-bat

wom-bat commented Aug 30, 2024

Copy link
Copy Markdown
Contributor Author

Note this requires a minor sddf change to get the libsddf_util_debug.a dependency tracked for serial/virt.elf and uart_driver.elf

@Ivan-Velickovic

Copy link
Copy Markdown
Collaborator

Two more things that come to mind:

  • have the example variants be built in CI, right now it's just the default one.
  • move the README to lionsos.org, I think it makes more sense to have all tutorial/example information there.

@wom-bat

wom-bat commented Aug 30, 2024

Copy link
Copy Markdown
Contributor Author

Two more things that come to mind:

* have the example variants be built in CI, right now it's just the default one.

* move the README to lionsos.org, I think it makes more sense to have all tutorial/example information there.

Sure. I'd keep the README here too though, for quick reference.

@Ivan-Velickovic

Copy link
Copy Markdown
Collaborator

They will quickly diverge though, I'd rather not duplicate it.

@wom-bat

wom-bat commented Aug 30, 2024

Copy link
Copy Markdown
Contributor Author

So the two Linux runs worked, but the MacOSX one did not.
Does MacOSX use GnuMAKE or BSD Make?

@Ivan-Velickovic

Copy link
Copy Markdown
Collaborator

They'll use GNU Make I believe.

This is the error message on macOS:

2024-08-30T05:21:23.7707830Z ld.lld -L/Users/ertos/ts-actions-runner/_work/lionsos/lionsos/microkit-sdk-1.4.1/board/odroidc4/debug/lib serial/meson/uart_driver.o -lmicrokit -Tmicrokit.ld -o uart_driver.elf
2024-08-30T05:21:23.7856290Z ld.lld: error: undefined symbol: sddf_printf_
2024-08-30T05:21:23.7856980Z >>> referenced by uart.c:229 (/Users/ertos/ts-actions-runner/_work/lionsos/lionsos/dep/sddf/drivers/serial/meson/uart.c:229)
2024-08-30T05:21:23.7857550Z >>>               serial/meson/uart_driver.o:(notified)
2024-08-30T05:21:23.7858160Z >>> referenced by uart.c:150 (/Users/ertos/ts-actions-runner/_work/lionsos/lionsos/dep/sddf/drivers/serial/meson/uart.c:150)
2024-08-30T05:21:23.7858720Z >>>               serial/meson/uart_driver.o:(handle_irq)
2024-08-30T05:21:23.7858920Z 
2024-08-30T05:21:23.7859020Z ld.lld: error: undefined symbol: _assert_fail
2024-08-30T05:21:23.7859610Z >>> referenced by uart.c:36 (/Users/ertos/ts-actions-runner/_work/lionsos/lionsos/dep/sddf/drivers/serial/meson/uart.c:36)
2024-08-30T05:21:23.7860120Z >>>               serial/meson/uart_driver.o:(set_baud)
2024-08-30T05:21:23.7860690Z >>> referenced by uart.c:62 (/Users/ertos/ts-actions-runner/_work/lionsos/lionsos/dep/sddf/drivers/serial/meson/uart.c:62)
2024-08-30T05:21:23.7861200Z >>>               serial/meson/uart_driver.o:(set_baud)
2024-08-30T05:21:23.7861870Z make[1]: *** [/Users/ertos/ts-actions-runner/_work/lionsos/lionsos/dep/sddf/drivers/serial/meson/uart_driver.mk:17: uart_driver.elf] Error 1
2024-08-30T05:21:23.7862940Z make[1]: Leaving directory '/Users/ertos/ts-actions-runner/_work/lionsos/lionsos/ci_build/vmm-virtio'
2024-08-30T05:21:23.7863680Z make: *** [Makefile:38: /Users/ertos/ts-actions-runner/_work/lionsos/lionsos/ci_build/vmm-virtio/vmdev.img] Error 2
2024-08-30T05:21:23.7880940Z ##[error]Process completed with exit code 2.

@Ivan-Velickovic

Copy link
Copy Markdown
Collaborator

Looks like the invocation of ld.lld is missing libsddf_util_debug.a.

@wom-bat

wom-bat commented Aug 30, 2024

Copy link
Copy Markdown
Contributor Author

Looks like the invocation of ld.lld is missing libsddf_util_debug.a.

It;s invoked in uart_driver.mk as

uart_driver.elf: serial/meson/uart_driver.o libsddf_util_debug.a
	$(LD) $(LDFLAGS) $^ $(LIBS) -o $@

GNUMake uses $^ to mean all dependencies; So I don't know what;s happening unless hte MacOSX version picked up an earlier sddf without this change.

-- Ported the console serial system to current sDDF
-- Updated system files for current microkit
-- Updated README.md to match system
-- Allow local user replacement of linux and initrd to match local
   (passed-through) filesystem

Signed-off-by: Peter Chubb <Peter.Chubb@unsw.edu.au>
Signed-off-by: Peter Chubb <Peter.Chubb@unsw.edu.au>
The linux and initrd image for the VMM example are inserted from the
user's system, and should not be saved in git.

Signed-off-by: Peter Chubb <Peter.Chubb@unsw.edu.au>
The VMM example changes need the update uart_driver.mk and serial
components make snippets.

Signed-Off-By: Peter Chubb <peter.chubb@unsw.edu.au>
Signed-off-by: Peter Chubb <Peter.Chubb@unsw.edu.au>
Comment thread .gitignore
Comment on lines +5 to +6
examples/vmm/vmm/initrd.img
examples/vmm/vmm/linux

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This shouldn't be necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants