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

xtensa: xt-sim: CONFIG_BOOTARGS support #87295

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

williamtcdns
Copy link
Contributor

The 2nd change enables the use of argc and argv with main().

The 1st change is the prerequisite that makes prepare_main_args() a weak function,
as it offers a more flexible approach in comparison to CONFIG_DYNAMIC_BOOTARGS,
because the bootloader environment, as is in the case of Xtensa sim, has already done
the work that get_bootargs() does.

This change offers a more flexible approach in comparison
to CONFIG_DYNAMIC_BOOTARGS, because the bootloader environment,
as is in the case of Xtensa sim, has already done the work that
get_bootargs() does.

Signed-off-by: William Tambe <[email protected]>
This change enables the use of argc and argv with `main()`.

Signed-off-by: William Tambe <[email protected]>
@williamtcdns
Copy link
Contributor Author

@dcpleung
This PR adds CONFIG_BOOTARGS support for xt-sim, but the twister step is using qemu_xtensa/dc233c .
That config does not have CONFIG_BOOTARGS support; hence with or without this change, the app samples/kernel/bootargs will always fail on qemu_xtensa/dc233c.
I think the twister step for qemu_xtensa/dc233c should be skipped or replaced with xt-sim .

@dcpleung
Copy link
Member

You can always exclude the board from the test.

Comment on lines +94 to +96
// Reserve stack space for
// - argv array
// - argument strings
Copy link
Member

Choose a reason for hiding this comment

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

As for comments, we do /* */ style and not //. Please replace all of these.

@williamtcdns
Copy link
Contributor Author

You can always exclude the board from the test.

Which file should I change to exclude the board from the test ?

@dcpleung
Copy link
Member

There should be a sample.yaml where you can do that.

@@ -188,6 +226,23 @@ _start:

#endif /* !XCHAL_HAVE_BOOTLOADER */

#if defined(CONFIG_BOARD_XT_SIM)
Copy link
Contributor

Choose a reason for hiding this comment

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

FYI both SYS_iss_set_argv and SYS_iss_argc are available in QEMU

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Kernel area: Xtensa Xtensa Architecture
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants