forked from coreboot/coreboot
-
Notifications
You must be signed in to change notification settings - Fork 0
WIP: payloads/bareflank: initial commit #5
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
Open
krystian-hebel
wants to merge
14
commits into
lp64
Choose a base branch
from
bareflank_payload
base: lp64
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
b9d2fc2
coreinfo: small changes to produce 64-bit code
krystian-hebel 75b6e05
mmax.config: config file for building 64-bit test image
krystian-hebel 058de4b
mmax.config: fix the config file
miczyg1 fd7b089
libpayload/x86_64/coreboot.c: add hardcoded address to coreboot tables
krystian-hebel 6426e27
payload/coreinfo: make cbfs_module.c work with x86_64
krystian-hebel bc58355
mmax.config: do not be so verbose
krystian-hebel a37f5c5
Revert "libpayload/x86_64/coreboot.c: add hardcoded address to corebo…
krystian-hebel a2d414b
payloads/bareflank: initial commit
krystian-hebel ae95019
payloads/bareflank: load and start next payload
krystian-hebel 3d41c2b
payloads/bareflank: load Bareflank before main payload
krystian-hebel 8625d30
src/lib/bootmem.c,selfboot.c: permanently reserve memory for payload
krystian-hebel 9061847
mmax.config: add settings for memory reservation
krystian-hebel 1b7601c
Merge pull request #6 from 3mdeb/wip_mem_rsv
miczyg1 d72f5a5
libpayload: add code for x86_64 exceptions
krystian-hebel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| ## | ||
| ## This program is free software; you can redistribute it and/or modify | ||
| ## it under the terms of the GNU General Public License as published by | ||
| ## the Free Software Foundation; version 2 of the License. | ||
| ## | ||
| ## This program is distributed in the hope that it will be useful, | ||
| ## but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| ## GNU General Public License for more details. | ||
| ## | ||
|
|
||
| # | ||
| # For a description of the syntax of this configuration file, | ||
| # see http://lxr.linux.no/source/Documentation/kbuild/kconfig-language.txt. | ||
| # | ||
|
|
||
| mainmenu "Bareflank Configuration" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,144 @@ | ||
| ## | ||
| ## This file is part of the coreinfo project. | ||
| ## | ||
| ## Copyright (C) 2008 Advanced Micro Devices, Inc. | ||
| ## Copyright (C) 2008 Uwe Hermann <[email protected]> | ||
| ## | ||
| ## This program is free software; you can redistribute it and/or modify | ||
| ## it under the terms of the GNU General Public License as published by | ||
| ## the Free Software Foundation; version 2 of the License. | ||
| ## | ||
| ## This program is distributed in the hope that it will be useful, | ||
| ## but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| ## GNU General Public License for more details. | ||
| ## | ||
|
|
||
| src := $(CURDIR) | ||
| srctree := $(src) | ||
| srck := $(src)/../../util/kconfig | ||
| coreinfo_obj := $(src)/build | ||
| objk := $(src)/build/util/kconfig | ||
|
|
||
| ifeq ($(filter %clean,$(MAKECMDGOALS)),) | ||
| export KERNELVERSION := 0.1.0 | ||
| export KCONFIG_AUTOHEADER := $(coreinfo_obj)/config.h | ||
| export KCONFIG_AUTOCONFIG := $(coreinfo_obj)/auto.conf | ||
| export KCONFIG_DEPENDENCIES := $(coreinfo_obj)/auto.conf.cmd | ||
| export KCONFIG_SPLITCONFIG := $(coreinfo_obj)/config | ||
| export KCONFIG_TRISTATE := $(coreinfo_obj)/tristate.conf | ||
| export KCONFIG_CONFIG := $(CURDIR)/.config | ||
| export KCONFIG_NEGATIVES := 1 | ||
| export Kconfig := Kconfig | ||
|
|
||
| export V := $(V) | ||
|
|
||
| CONFIG_SHELL := sh | ||
| KBUILD_DEFCONFIG := configs/defconfig | ||
| UNAME_RELEASE := $(shell uname -r) | ||
| HAVE_DOTCONFIG := $(wildcard .config) | ||
| MAKEFLAGS += -rR --no-print-directory | ||
|
|
||
| # Make is silent per default, but 'make V=1' will show all compiler calls. | ||
| ifneq ($(V),1) | ||
| .SILENT: | ||
| endif | ||
|
|
||
| HOSTCC ?= gcc | ||
| HOSTCXX ?= g++ | ||
| HOSTCFLAGS := -I$(srck) -I$(objk) | ||
| HOSTCXXFLAGS := -I$(srck) -I$(objk) | ||
|
|
||
| LIBPAYLOAD_PATH := $(realpath ../libpayload) | ||
| LIBPAYLOAD_OBJ := $(coreinfo_obj)/libpayload | ||
| HAVE_LIBPAYLOAD := $(wildcard $(LIBPAYLOAD_OBJ)/lib/libpayload.a) | ||
| LIBPAYLOAD_CONFIG ?= configs/defconfig-tinycurses-64 | ||
| OBJCOPY ?= objcopy | ||
|
|
||
| INCLUDES = -I$(coreinfo_obj) -include $(LIBPAYLOAD_OBJ)/include/kconfig.h -I$(src)/../../src/commonlib/include -I$(src)/include -I$(src) | ||
| OBJECTS = common.o entry.o platform.o | ||
| OBJS = $(patsubst %,$(coreinfo_obj)/%,$(OBJECTS)) | ||
| TARGET = $(coreinfo_obj)/bareflank.elf | ||
|
|
||
| all: real-all | ||
|
|
||
| # in addition to the dependency below, create the file if it doesn't exist | ||
| # to silence warnings about a file that would be generated anyway. | ||
| $(if $(wildcard .xcompile),,$(eval $(shell ../../util/xcompile/xcompile $(XGCCPATH) > .xcompile || rm -f .xcompile))) | ||
| .xcompile: ../../util/xcompile/xcompile | ||
| $< $(XGCCPATH) > [email protected] | ||
| \mv -f [email protected] $@ 2> /dev/null || rm -f [email protected] $@ | ||
|
|
||
| CONFIG_COMPILER_GCC := y | ||
| ARCH-y := x86_64 | ||
|
|
||
| include .xcompile | ||
|
|
||
| CC := $(CC_$(ARCH-y)) | ||
| AS := $(AS_$(ARCH-y)) | ||
| OBJCOPY := $(OBJCOPY_$(ARCH-y)) | ||
|
|
||
| LPCC := CC="$(CC)" $(LIBPAYLOAD_OBJ)/bin/lpgcc | ||
| LPAS := AS="$(AS)" $(LIBPAYLOAD_OBJ)/bin/lpas | ||
|
|
||
| CFLAGS += -Wall -Werror -Os -fno-builtin $(CFLAGS_$(ARCH-y)) $(INCLUDES) | ||
|
|
||
| ifneq ($(strip $(HAVE_DOTCONFIG)),) | ||
| include $(src)/.config | ||
| real-all: $(TARGET) | ||
|
|
||
| $(TARGET): $(src)/.config $(coreinfo_obj)/config.h $(OBJS) libpayload | ||
| printf " LPCC $(subst $(CURDIR)/,,$(@)) (LINK)\n" | ||
| $(LPCC) -o $@ $(OBJS) | ||
| $(OBJCOPY) --only-keep-debug $@ $(TARGET).debug | ||
| $(OBJCOPY) --strip-debug $@ | ||
| $(OBJCOPY) --add-gnu-debuglink=$(TARGET).debug $@ | ||
|
|
||
| $(coreinfo_obj)/%.S.o: $(src)/%.S libpayload | ||
| printf " LPAS $(subst $(CURDIR)/,,$(@))\n" | ||
| $(LPAS) -o $@ $< | ||
|
|
||
| $(coreinfo_obj)/%.o: $(src)/%.c libpayload | ||
| printf " LPCC $(subst $(CURDIR)/,,$(@))\n" | ||
| $(LPCC) $(CFLAGS) -c -o $@ $< -DCONFIG_CBFS_PREFIX=\"$(CONFIG_CBFS_PREFIX)\" | ||
|
|
||
| else | ||
| real-all: config | ||
| endif | ||
|
|
||
| defaultbuild: | ||
| $(MAKE) olddefconfig | ||
| $(MAKE) all | ||
|
|
||
| ifneq ($(strip $(HAVE_LIBPAYLOAD)),) | ||
| libpayload: | ||
| printf "Found Libpayload $(LIBPAYLOAD_OBJ).\n" | ||
| else | ||
| LPOPTS=obj="$(CURDIR)/lpbuild" DOTCONFIG="$(CURDIR)/lp.config" | ||
| libpayload: | ||
| printf "Building libpayload @ $(LIBPAYLOAD_PATH).\n" | ||
| $(MAKE) -C $(LIBPAYLOAD_PATH) $(LPOPTS) distclean coreinfo_obj=$(coreinfo_obj)/libptmp | ||
| $(MAKE) -C $(LIBPAYLOAD_PATH) $(LPOPTS) defconfig KBUILD_DEFCONFIG=$(LIBPAYLOAD_CONFIG) | ||
| $(MAKE) -C $(LIBPAYLOAD_PATH) $(LPOPTS) install DESTDIR=$(coreinfo_obj) | ||
| endif | ||
|
|
||
| $(coreinfo_obj)/config.h: | ||
| $(MAKE) oldconfig | ||
|
|
||
| $(shell mkdir -p $(coreinfo_obj) $(objk)/lxdialog $(KCONFIG_SPLITCONFIG)) | ||
|
|
||
| include $(srck)/Makefile | ||
|
|
||
| .PHONY: $(PHONY) prepare | ||
|
|
||
| else | ||
|
|
||
| clean: | ||
| rm -rf build/*.elf build/*.o .xcompile | ||
|
|
||
| distclean: clean | ||
| rm -rf build lpbuild | ||
| rm -f .config* lp.config* | ||
|
|
||
| .PHONY: clean distclean | ||
| endif | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@krystian-hebel this coreinfo_obj stuff looks weird. Does it have any relation to coreinfo payload?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@miczyg1 I've copied this MAkefile from coreinfo, there may be more leftovers, I guess I should clear it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do, This looks confusing