Skip to content
Snippets Groups Projects
Commit 597db05f authored by Eduardo Piva's avatar Eduardo Piva Committed by Pekka Enberg
Browse files

lzloader: Build all fastlz related stuff and call the lzloader from boot16.S


On build.mk two image targets are created: lzloader.elf and lzloader-stripped.elf.

The lzloader-stripped.elf is not the imaged included on loader.img. For this process
we need to call the fastlz/lz tool and link it with fastlz/fastlz.o, so those dependencies
are added.

We're calling our lzloader from boot16.S, hence we need to compile all fastlz related
stuff as -m32, so we have 32 bits binary code. This design was used in order to
do as minimal changes to the OSv core as possible and since on boot.S we have
all page tables, GDT and so on, all this are also compressed and remain on the
same address as before lzloader was introduced.

With this design it's easier to revert this patch (if needed) and also
we could add a make target to build OSv without compression (with such scenario exists)
with minimal effort.

The address 0x1800000 is choosen so we still have enough memory to uncompress the kernel
and at the same times make OSv boot with less then 32Mb of memory. If some day this
is not enough to decompress the kernel, build will fail.

Signed-off-by: default avatarEduardo Piva <efpiva@gmail.com>
Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
parent 516816b1
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment