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

Implement system image loader #51

Closed
jserv opened this issue Sep 14, 2013 · 9 comments
Closed

Implement system image loader #51

jserv opened this issue Sep 14, 2013 · 9 comments
Assignees

Comments

@jserv
Copy link
Member

jserv commented Sep 14, 2013

After Issue #11 is done, it means F9 Microkernel could have a separate userspace environment, which might be initialized by certain system loader. Upon the ideas of @georgekang, here are the expected features of system loader:

  • F9 microkernel itself should be minimized, and the 1st stage image only includes low level parts + system loader
  • system loader locates the address which points the image of userspace environment
  • system loader, included in 1st stage image, attempts to load F9 Microkernel to memory (RamLoc, 0x20000000) and then userspace environment to other area according to its descriptor.
  • loader switches the mapping configuration and jump to __l4_start, which is the entry of F9 Microkernel.
  • all userspace environment is initialized by F9 microkernel.
@ghost ghost assigned georgekang Sep 14, 2013
@georgekang
Copy link
Member

WIP: https://github.com/georgekang/f9-kernel/commits/loader
Here are the build instructions:

  • Build f9 without KProbes
  • cd loader
  • make; make flash

@jserv
Copy link
Member Author

jserv commented Sep 20, 2013

The reference boot messages:

loading kernel ...
elf check result = 0
Number of program headers: 1
Elf file pheader physical: 0x20000000
Elf file
====================================================
      Copyright(C) 2013 The F9 Microkernel Project  
====================================================
Git head: 17069e043b9c3a0d02712382ae447772093dd728
Host: x86_64
Build: 2013-09-20T21:39:37+0800

@georgekang
Copy link
Member

WIP(V2): e3d5809
Support breakpoint in kernel.

@BohuTANG
Copy link

BohuTANG commented Oct 2, 2013

How to run F9 in qemu?
Thanks.

@jserv
Copy link
Member Author

jserv commented Oct 2, 2013

@shuttler Currently, QEMU doesn't support enough features that F9 Microkernel requires, such as MPU.
Therefore, F9 can only run on STM32F4-Discovery board.

@georgekang
Copy link
Member

Now loader can load kernel and l4 user space to sram and run them.
Please reference it. https://github.com/georgekang/f9-kernel/tree/loader/loader
However, there are some hard works to merge build system and some duplicated codes.

@jserv
Copy link
Member Author

jserv commented Oct 30, 2013

Per the discussion between @georgekang and me, WIP is expected to accomplish the following:

  • clarify the branch name to elf-loader
  • adapt the unified common parts for linker scripts
  • revise build system to avoid the duplicated
  • Kconfig entries

@jserv
Copy link
Member Author

jserv commented Dec 1, 2013

Take! I'm working on splitting the changes into smaller and dedicated ones.

@jserv
Copy link
Member Author

jserv commented Jan 7, 2014

It is supposedly done.

@jserv jserv closed this as completed Jan 7, 2014
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

No branches or pull requests

3 participants