Giter VIP home page Giter VIP logo

efify's Introduction

This tool makes an efi format kernel from an elf format kernel input.

Usage

  1. copy your elf kernel file here named 'kernel'
  2. modify these variables in Makefile according to your kernel:
KERNEL_LOAD_ADDRESS ?= 0x9000000000200000
KERNEL_ENTRY_ADDRESS ?= 0x90000000011b7000
  1. make sure there are loongarch cross tools in your path;make and you will get kernel.efi, it is the efi kernel you need
    make
  1. use kernel.efi with qemu like this:
    ./qemu-system-loongarch64 -bios ./QEMU_EFI.fd -kernel kernel.efi ...

about efi stub

The libefistub.a here is generated from a build of upstream linux kernel source:

    cd driver/firmware/efi/libstub
    loongarch64-linux-gnu-ar rcs libefistub.a *.stub.o
    loongarch64-linux-gnu-strip -d libefistub.a

Use the efi stub your kernel can interact with UEFI bios.

Refer to kernel EFI stub doc for more information.

The kernel.efi will be loaded and executed by UEFI bios, just like elf binary loaded and executed by linux kernel. It is in PE file format, and its entry point is set to efi_pe_entry, which is in libefistub.a. efi_pe_entry will call back to decompress_kernel function in string.c, which just copy kernel.bin to its linked address.

TODO

To make things simple, the decompress process is not integrated yet.

efify's People

Contributors

foxsen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.