Skip to content

Conversation

@anjiahao1
Copy link
Contributor

Summary

This PR replaces the dynamically loaded module_initialize function with the attribute((destructor)) keyword, and optimizes the compilation method for dynamic modules. Now, by simply adding the DYNLIB flag in the Makefile, the apps can be compiled as dynamic modules.

Impact

sotest/modprint

Testing

qemu with arm an547

@nuttxpr
Copy link

nuttxpr commented Oct 4, 2024

[Experimental Bot, please feedback here]

No, this PR does not fully meet the NuttX requirements.

Missing Information:

  • Summary:
    • A clear explanation of why this change is necessary is missing. What specific problems does it solve? Is it a performance improvement, a bug fix, or a new feature?
    • What is the "functional part of the code" being changed? Be specific – mention the files/modules affected.
  • Impact:
    • Many fields are incomplete. Address all impact categories. For example:
      • Is new feature added? (If so, describe the feature)
      • Impact on build: You mention changes in the Makefile. This requires a "YES" and a description of the changes.
      • Impact on documentation: Does this change necessitate documentation updates?
  • Testing:
    • Insufficient detail:
      • Provide specific OS and version information for your build host(s) (e.g., "Linux Ubuntu 20.04").
      • "qemu with arm an547" is too vague. Specify the QEMU version and the exact ARM architecture (e.g., ARMv7-M, ARMv8-A).
      • No testing logs: You must include actual logs from your testing, both before and after the change, to demonstrate the issue and the fix.

Recommendations:

  1. Expand the Summary: Provide a clear and concise rationale for the change.
  2. Complete the Impact Section: Address all impact categories with specific details.
  3. Provide Detailed Testing Information: Include OS versions, QEMU details, and actual testing logs.

By addressing these points, your PR will be more informative and easier for reviewers to evaluate.

@anjiahao1
Copy link
Contributor Author

this pr depends on 13819

@cederom cederom requested a review from patacongo October 4, 2024 15:03
@anjiahao1
Copy link
Contributor Author

depends on 13852

@anjiahao1 anjiahao1 force-pushed the 100402 branch 2 times, most recently from f5657ab to 296686d Compare October 8, 2024 13:45
@anjiahao1
Copy link
Contributor Author

look like ci build break
image

@lupyuen
Copy link
Member

lupyuen commented Oct 8, 2024

I restarted the job, let's see if it works.

Update: Nope it still fails. Why?

@anjiahao1 anjiahao1 force-pushed the 100402 branch 11 times, most recently from d101c4a to c25969f Compare October 12, 2024 03:42
@anjiahao1 anjiahao1 force-pushed the 100402 branch 2 times, most recently from 5c7bd05 to d5a36ab Compare October 12, 2024 10:00
@xiaoxiang781216
Copy link
Contributor

@anjiahao1 please fix:

====================================================================================
Configuration/Tool: canmv230/remote
2024-10-12 10:36:39
------------------------------------------------------------------------------------
  Cleaning...
  Configuring...
  Building NuttX...
/github/workspace/sources/apps /github/workspace/sources/nuttx
riscv-none-elf-ld: cannot open map file /github/workspace/sources/apps/binmap/init.map: No such file or directory
make[3]: *** [/github/workspace/sources/apps/Application.mk:304: /github/workspace/sources/apps/bin/sh] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:53: /github/workspace/sources/apps/system/nsh_install] Error 2
make[1]: *** [Makefile:99: .import] Error 2
make: *** [Makefile:106: import] Error 2
/github/workspace/sources/nuttx

we can build a module like app,
use 'DYNLIB' mark current path is a loadable module

and CFLAGSELF and CMODFLAGS can act on
these compiled as loadable module

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
…ation is completed and linking begin

It is better to package the dynamic module into romfs after it is compiled.

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
… method

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
@xiaoxiang781216 xiaoxiang781216 merged commit bb492e7 into apache:master Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CELFFLAGS and friends are abused in Application.mk

5 participants