generated from gaoyang3513/SDK_RK3288
[Mod] First commit
This commit is contained in:
28
boot/Config.in
Normal file
28
boot/Config.in
Normal file
@ -0,0 +1,28 @@
|
||||
menu "Bootloaders"
|
||||
|
||||
source "boot/afboot-stm32/Config.in"
|
||||
source "boot/at91bootstrap/Config.in"
|
||||
source "boot/at91bootstrap3/Config.in"
|
||||
source "boot/at91dataflashboot/Config.in"
|
||||
source "boot/arm-trusted-firmware/Config.in"
|
||||
source "boot/barebox/Config.in"
|
||||
source "boot/beaglev-ddrinit/Config.in"
|
||||
source "boot/beaglev-secondboot/Config.in"
|
||||
source "boot/binaries-marvell/Config.in"
|
||||
source "boot/boot-wrapper-aarch64/Config.in"
|
||||
source "boot/edk2/Config.in"
|
||||
source "boot/grub2/Config.in"
|
||||
source "boot/gummiboot/Config.in"
|
||||
source "boot/lpc32xxcdl/Config.in"
|
||||
source "boot/mv-ddr-marvell/Config.in"
|
||||
source "boot/mxs-bootlets/Config.in"
|
||||
source "boot/optee-os/Config.in"
|
||||
source "boot/opensbi/Config.in"
|
||||
source "boot/s500-bootloader/Config.in"
|
||||
source "boot/shim/Config.in"
|
||||
source "boot/sun20i-d1-spl/Config.in"
|
||||
source "boot/syslinux/Config.in"
|
||||
source "boot/uboot/Config.in"
|
||||
source "boot/vexpress-firmware/Config.in"
|
||||
|
||||
endmenu
|
||||
@ -0,0 +1,46 @@
|
||||
From 9901603e18524c4c52fd1dd47bda4ab4016628fc Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
Date: Thu, 10 Sep 2020 11:37:33 +0200
|
||||
Subject: [PATCH] Pass -fno-builtin to fix build with gcc 10
|
||||
|
||||
gcc 10, if it recognizes some hand-written code that looks like
|
||||
memcpy, will generate a call to memcpy().
|
||||
|
||||
For example:
|
||||
|
||||
while (dst < &_end_data) {
|
||||
*dst++ = *src++;
|
||||
}
|
||||
|
||||
gets recognized as such. However, in the context of bare-metal code,
|
||||
having a call to memcpy() in the C library doesn't work. So we fix
|
||||
that by disabling builtins.
|
||||
|
||||
Fixes:
|
||||
|
||||
/home/thomas/projets/buildroot/output/host/opt/ext-toolchain/bin/../arm-buildroot-uclinux-uclibcgnueabi/bin/ld.real: stm32f429i-disco.o: in function `reset':
|
||||
stm32f429i-disco.c:(.text.reset+0x1a): undefined reference to `memcpy'
|
||||
/home/thomas/projets/buildroot/output/host/opt/ext-toolchain/bin/../arm-buildroot-uclinux-uclibcgnueabi/bin/ld.real: stm32f429i-disco.c:(.text.reset+0x34): undefined reference to `memset'
|
||||
make[1]: *** [Makefile:26: stm32f429i-disco] Error 1
|
||||
|
||||
Upstream: https://github.com/mcoquelin-stm32/afboot-stm32/pull/11
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
---
|
||||
Makefile | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index f699176..1e8557d 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -13,6 +13,7 @@ DTB_ADDR?=0x08004000
|
||||
CFLAGS := -mthumb -mcpu=cortex-m4
|
||||
CFLAGS += -ffunction-sections -fdata-sections
|
||||
CFLAGS += -Os -std=gnu99 -Wall
|
||||
+CFLAGS += -fno-builtin
|
||||
LINKERFLAGS := -nostartfiles --gc-sections
|
||||
|
||||
obj-y += gpio.o mpu.o qspi.o start_kernel.o
|
||||
--
|
||||
2.35.1
|
||||
|
||||
40
boot/afboot-stm32/0002-Makefile-drop-nostartfiles.patch
Normal file
40
boot/afboot-stm32/0002-Makefile-drop-nostartfiles.patch
Normal file
@ -0,0 +1,40 @@
|
||||
From be760c062c5d05bd2223f3916afafd37120d3318 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
Date: Thu, 28 Apr 2022 22:47:09 +0200
|
||||
Subject: [PATCH] Makefile: drop -nostartfiles
|
||||
|
||||
In commit 0f3e61c9dd48fd8b4248ce4672c044c2562e4de1 ("Use ld instead of
|
||||
gcc for linking "), we started using ld instead of gcc for the link
|
||||
step. This worked fine for a while, but recent versions of ld no
|
||||
longer accept the -nostartfiles option, causing the build to break:
|
||||
|
||||
Error: unable to disambiguate: -nostartfiles (did you mean --nostartfiles ?)
|
||||
|
||||
In fact, -nostartfiles was passed to gcc prior to
|
||||
0f3e61c9dd48fd8b4248ce4672c044c2562e4de1, but it is not a ld
|
||||
option. It is only by luck that it was accepted and ignored by older
|
||||
ld versions. Since this option is useless when calling ld directly, we
|
||||
can simply drop it.
|
||||
|
||||
Upstream: https://github.com/mcoquelin-stm32/afboot-stm32/pull/11
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
---
|
||||
Makefile | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 1e8557d..8f42be1 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -14,7 +14,7 @@ CFLAGS := -mthumb -mcpu=cortex-m4
|
||||
CFLAGS += -ffunction-sections -fdata-sections
|
||||
CFLAGS += -Os -std=gnu99 -Wall
|
||||
CFLAGS += -fno-builtin
|
||||
-LINKERFLAGS := -nostartfiles --gc-sections
|
||||
+LINKERFLAGS := --gc-sections
|
||||
|
||||
obj-y += gpio.o mpu.o qspi.o start_kernel.o
|
||||
obj-f4 += $(obj-y) usart-f4.o
|
||||
--
|
||||
2.35.1
|
||||
|
||||
27
boot/afboot-stm32/Config.in
Normal file
27
boot/afboot-stm32/Config.in
Normal file
@ -0,0 +1,27 @@
|
||||
config BR2_TARGET_AFBOOT_STM32
|
||||
bool "afboot-stm32"
|
||||
depends on BR2_arm
|
||||
help
|
||||
afboot-stm32 is a very small bootloader for STM32 platforms
|
||||
|
||||
https://github.com/mcoquelin-stm32/afboot-stm32
|
||||
|
||||
if BR2_TARGET_AFBOOT_STM32
|
||||
|
||||
config BR2_TARGET_AFBOOT_STM32_KERNEL_ADDR
|
||||
hex "Kernel load address"
|
||||
default "0x08008000"
|
||||
help
|
||||
This is the physical address in your flash memory the kernel
|
||||
will be linked for and stored to. This address is dependent on
|
||||
your own flash usage.
|
||||
|
||||
config BR2_TARGET_AFBOOT_STM32_DTB_ADDR
|
||||
hex "Device-tree load address"
|
||||
default "0x08004000"
|
||||
help
|
||||
This is the physical address in your flash memory the
|
||||
device-tree will be stored to. This address is dependent on
|
||||
your own flash usage.
|
||||
|
||||
endif
|
||||
2
boot/afboot-stm32/afboot-stm32.hash
Normal file
2
boot/afboot-stm32/afboot-stm32.hash
Normal file
@ -0,0 +1,2 @@
|
||||
# Locally calculated
|
||||
sha256 2caacd302ab3ed5b70b3b93a6aef04162abf779c758a5be547be3ab01b68ca10 afboot-stm32-3566acd582e5536fb60864281788a30f5527df2d.tar.gz
|
||||
22
boot/afboot-stm32/afboot-stm32.mk
Normal file
22
boot/afboot-stm32/afboot-stm32.mk
Normal file
@ -0,0 +1,22 @@
|
||||
################################################################################
|
||||
#
|
||||
# afboot-stm32
|
||||
#
|
||||
################################################################################
|
||||
|
||||
AFBOOT_STM32_VERSION = 3566acd582e5536fb60864281788a30f5527df2d
|
||||
AFBOOT_STM32_SITE = $(call github,mcoquelin-stm32,afboot-stm32,$(AFBOOT_STM32_VERSION))
|
||||
AFBOOT_STM32_INSTALL_IMAGES = YES
|
||||
AFBOOT_STM32_INSTALL_TARGET = NO
|
||||
|
||||
define AFBOOT_STM32_BUILD_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) CROSS_COMPILE=$(TARGET_CROSS) all \
|
||||
KERNEL_ADDR=$(BR2_TARGET_AFBOOT_STM32_KERNEL_ADDR) \
|
||||
DTB_ADDR=$(BR2_TARGET_AFBOOT_STM32_DTB_ADDR)
|
||||
endef
|
||||
|
||||
define AFBOOT_STM32_INSTALL_IMAGES_CMDS
|
||||
$(INSTALL) -m 0755 -t $(BINARIES_DIR) -D $(@D)/stm32*.bin
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
229
boot/arm-trusted-firmware/Config.in
Normal file
229
boot/arm-trusted-firmware/Config.in
Normal file
@ -0,0 +1,229 @@
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE
|
||||
bool "ARM Trusted Firmware (ATF)"
|
||||
depends on (BR2_ARM_CPU_ARMV8A || BR2_ARM_CPU_ARMV7A)
|
||||
help
|
||||
Enable this option if you want to build the ATF for your ARM
|
||||
based embedded device.
|
||||
|
||||
https://github.com/ARM-software/arm-trusted-firmware
|
||||
|
||||
if BR2_TARGET_ARM_TRUSTED_FIRMWARE
|
||||
choice
|
||||
prompt "ATF Version"
|
||||
help
|
||||
Select the specific ATF version you want to use
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST_VERSION
|
||||
bool "v2.7"
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION
|
||||
bool "Custom version"
|
||||
help
|
||||
This option allows to use a specific official versions
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL
|
||||
bool "Custom tarball"
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT
|
||||
bool "Custom Git repository"
|
||||
|
||||
endchoice
|
||||
|
||||
if BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL_LOCATION
|
||||
string "URL of custom ATF tarball"
|
||||
|
||||
endif
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE
|
||||
string "ATF version"
|
||||
depends on BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_VERSION
|
||||
string
|
||||
default "v2.7" if BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST_VERSION
|
||||
default "custom" if BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL
|
||||
default BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION \
|
||||
if BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT
|
||||
default BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE \
|
||||
if BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION
|
||||
|
||||
if BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL
|
||||
string "URL of custom repository"
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION
|
||||
string "Custom repository version"
|
||||
help
|
||||
Revision to use in the typical format used by Git
|
||||
E.G. a sha id, a tag, ..
|
||||
|
||||
endif
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM
|
||||
string "ATF platform"
|
||||
help
|
||||
Target plaform to build for.
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_TARGET_BOARD
|
||||
string "ATF target board"
|
||||
help
|
||||
Target board to build for. In many cases, this can be left
|
||||
empty.
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_DTS_PATH
|
||||
string "Device Tree Source file paths"
|
||||
help
|
||||
Space-separated list of paths to device tree source files
|
||||
that will be copied to fdts/ before starting the build.
|
||||
|
||||
To use this device tree source file, the ATF configuration
|
||||
file must refer to it.
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP
|
||||
bool "Build FIP image"
|
||||
help
|
||||
This option enables building the FIP image (Firmware Image
|
||||
Package). This is typically the image format used by
|
||||
platforms were ATF encapsulates the second stage bootloader
|
||||
(such as U-Boot).
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31
|
||||
bool "Build BL31 image"
|
||||
help
|
||||
This option enables building the BL31 image. This is
|
||||
typically used on platforms where another bootloader (e.g
|
||||
U-Boot) encapsulates ATF BL31.
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31_UBOOT
|
||||
bool "Build BL31 U-Boot image"
|
||||
select BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31
|
||||
help
|
||||
Generates a U-Boot image named atf-uboot.ub containing
|
||||
bl31.bin. This is used for example by the Xilinx version of
|
||||
U-Boot SPL to load ATF on the ZynqMP SoC.
|
||||
|
||||
choice
|
||||
prompt "BL32"
|
||||
default BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_DEFAULT
|
||||
help
|
||||
Select BL32 stage for the trusted firmware
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_DEFAULT
|
||||
bool "Default"
|
||||
help
|
||||
With this option selected, ATF will not use any BL32 stage,
|
||||
unless if one is explicitly chosen using the SPD (for
|
||||
AArch64) or AARCH32_SP (for AArch32) variables, which can be
|
||||
passed through
|
||||
BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES.
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE
|
||||
bool "OP-TEE OS"
|
||||
depends on BR2_TARGET_OPTEE_OS
|
||||
help
|
||||
This option allows to embed OP-TEE OS as the BL32 part of
|
||||
the ARM Trusted Firmware boot sequence.
|
||||
|
||||
endchoice
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33
|
||||
bool "Use U-Boot as BL33"
|
||||
depends on BR2_TARGET_UBOOT
|
||||
help
|
||||
This option allows to embed u-boot.bin as the BL33 part of
|
||||
the ARM Trusted Firmware. It ensures that the u-boot package
|
||||
gets built before ATF, and that the appropriate BL33
|
||||
variable pointing to u-boot.bin is passed when building ATF.
|
||||
|
||||
if BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE
|
||||
string "U-Boot BL33 image name"
|
||||
default "u-boot.bin"
|
||||
help
|
||||
Name of the U-Boot BL33 image to include in ATF, it must
|
||||
have been installed to BINARIES_DIR by the U-Boot package.
|
||||
|
||||
endif
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_EDK2_AS_BL33
|
||||
bool "Use EDK2 as BL33"
|
||||
depends on BR2_TARGET_EDK2
|
||||
help
|
||||
This option allows to embed EDK2 as the BL33 part of
|
||||
the ARM Trusted Firmware. It ensures that the EDK2 package
|
||||
gets built before ATF, and that the appropriate BL33
|
||||
variable pointing to the EDK2 is passed when building ATF.
|
||||
|
||||
Do not choose this option if you intend to build ATF and EDK2
|
||||
for the 'qemu_sbsa' platform. In this case, due to the EDK2
|
||||
build system, the dependency between ATF and EDK is reversed.
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_TARGETS
|
||||
string "Additional ATF make targets"
|
||||
help
|
||||
Additional targets for the ATF build
|
||||
E.G. When using the QorIQ custom ATF repository from NXP,
|
||||
the target 'pbl' can be used to build the pbl binary.
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES
|
||||
string "Additional ATF build variables"
|
||||
help
|
||||
Additional parameters for the ATF build
|
||||
E.G. 'DEBUG=1 LOG_LEVEL=20'
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_DEBUG
|
||||
bool "Build in debug mode"
|
||||
help
|
||||
Enable this option to build ATF with DEBUG=1.
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES
|
||||
string "Binary boot images"
|
||||
default "*.bin"
|
||||
help
|
||||
Names of generated image files that are installed in the
|
||||
output images/ directory.
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_DTC
|
||||
bool "Needs dtc"
|
||||
select BR2_PACKAGE_HOST_DTC
|
||||
help
|
||||
Select this option if your ATF board configuration
|
||||
requires the Device Tree compiler to be available.
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_ARM32_TOOLCHAIN
|
||||
bool "Needs arm-none-eabi toolchain"
|
||||
depends on BR2_aarch64
|
||||
depends on BR2_HOSTARCH = "x86_64"
|
||||
help
|
||||
Select this option if your ATF board configuration requires
|
||||
an ARM32 bare metal toolchain to be available.
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_SSP
|
||||
bool "Build with SSP"
|
||||
default y
|
||||
depends on BR2_TOOLCHAIN_HAS_SSP
|
||||
depends on !BR2_SSP_NONE
|
||||
help
|
||||
Say 'y' here if you want to build ATF with SSP.
|
||||
|
||||
Your board must have SSP support in ATF: it must have an
|
||||
implementation for plat_get_stack_protector_canary().
|
||||
|
||||
If you say 'y', the SSP level will be the level selected
|
||||
by the global SSP setting.
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_SSP_LEVEL
|
||||
string
|
||||
# While newer versions of TF-A support "none" as
|
||||
# ENABLE_STACK_PROTECTOR value, older versions (e.g 2.0) only
|
||||
# supported "0" to disable SSP.
|
||||
default "0" if !BR2_TARGET_ARM_TRUSTED_FIRMWARE_SSP
|
||||
default "default" if BR2_SSP_REGULAR
|
||||
default "strong" if BR2_SSP_STRONG
|
||||
default "all" if BR2_SSP_ALL
|
||||
|
||||
endif
|
||||
3
boot/arm-trusted-firmware/arm-trusted-firmware.hash
Normal file
3
boot/arm-trusted-firmware/arm-trusted-firmware.hash
Normal file
@ -0,0 +1,3 @@
|
||||
# Locally calculated
|
||||
sha256 327c65b1bc231608a7a808b068b00c1a22310e9fc86158813cd10a9711d5725e arm-trusted-firmware-v2.7.tar.gz
|
||||
sha256 130d0c6e5159fa454b1e969fd281fa1d388819aefb203f65dd282544b5ab7ba9 docs/license.rst
|
||||
218
boot/arm-trusted-firmware/arm-trusted-firmware.mk
Normal file
218
boot/arm-trusted-firmware/arm-trusted-firmware.mk
Normal file
@ -0,0 +1,218 @@
|
||||
################################################################################
|
||||
#
|
||||
# arm-trusted-firmware
|
||||
#
|
||||
################################################################################
|
||||
|
||||
ARM_TRUSTED_FIRMWARE_VERSION = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_VERSION))
|
||||
|
||||
ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL),y)
|
||||
# Handle custom ATF tarballs as specified by the configuration
|
||||
ARM_TRUSTED_FIRMWARE_TARBALL = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL_LOCATION))
|
||||
ARM_TRUSTED_FIRMWARE_SITE = $(patsubst %/,%,$(dir $(ARM_TRUSTED_FIRMWARE_TARBALL)))
|
||||
ARM_TRUSTED_FIRMWARE_SOURCE = $(notdir $(ARM_TRUSTED_FIRMWARE_TARBALL))
|
||||
else ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT),y)
|
||||
ARM_TRUSTED_FIRMWARE_SITE = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL))
|
||||
ARM_TRUSTED_FIRMWARE_SITE_METHOD = git
|
||||
else
|
||||
# Handle stable official ATF versions
|
||||
ARM_TRUSTED_FIRMWARE_SITE = $(call github,ARM-software,arm-trusted-firmware,$(ARM_TRUSTED_FIRMWARE_VERSION))
|
||||
# The licensing of custom or from-git versions is unknown.
|
||||
# This is valid only for the latest (i.e. known) version.
|
||||
ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST_VERSION),y)
|
||||
ARM_TRUSTED_FIRMWARE_LICENSE = BSD-3-Clause
|
||||
ARM_TRUSTED_FIRMWARE_LICENSE_FILES = docs/license.rst
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE)$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST_VERSION),y)
|
||||
BR_NO_CHECK_HASH_FOR += $(ARM_TRUSTED_FIRMWARE_SOURCE)
|
||||
endif
|
||||
|
||||
ARM_TRUSTED_FIRMWARE_INSTALL_IMAGES = YES
|
||||
|
||||
ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_DTC),y)
|
||||
ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-dtc
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_ARM32_TOOLCHAIN),y)
|
||||
ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-arm-gnu-toolchain
|
||||
endif
|
||||
|
||||
ARM_TRUSTED_FIRMWARE_PLATFORM = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM))
|
||||
|
||||
ARM_TRUSTED_FIRMWARE_TARGET_BOARD = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_TARGET_BOARD))
|
||||
|
||||
ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_DEBUG),y)
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_OPTS += DEBUG=1
|
||||
ifneq ($(ARM_TRUSTED_FIRMWARE_TARGET_BOARD),)
|
||||
ARM_TRUSTED_FIRMWARE_IMG_DIR = $(@D)/build/$(ARM_TRUSTED_FIRMWARE_PLATFORM)/$(ARM_TRUSTED_FIRMWARE_TARGET_BOARD)/debug
|
||||
else
|
||||
ARM_TRUSTED_FIRMWARE_IMG_DIR = $(@D)/build/$(ARM_TRUSTED_FIRMWARE_PLATFORM)/debug
|
||||
endif
|
||||
else
|
||||
ifneq ($(ARM_TRUSTED_FIRMWARE_TARGET_BOARD),)
|
||||
ARM_TRUSTED_FIRMWARE_IMG_DIR = $(@D)/build/$(ARM_TRUSTED_FIRMWARE_PLATFORM)/$(ARM_TRUSTED_FIRMWARE_TARGET_BOARD)/release
|
||||
else
|
||||
ARM_TRUSTED_FIRMWARE_IMG_DIR = $(@D)/build/$(ARM_TRUSTED_FIRMWARE_PLATFORM)/release
|
||||
endif
|
||||
endif
|
||||
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_OPTS += \
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||
$(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES)) \
|
||||
PLAT=$(ARM_TRUSTED_FIRMWARE_PLATFORM) \
|
||||
TARGET_BOARD=$(ARM_TRUSTED_FIRMWARE_TARGET_BOARD)
|
||||
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_ENV += \
|
||||
$(TARGET_MAKE_ENV) \
|
||||
$(if $(BR2_PIC_PIE),CFLAGS="-fno-PIE") \
|
||||
ENABLE_STACK_PROTECTOR=$(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_SSP_LEVEL))
|
||||
|
||||
ifeq ($(BR2_ARM_CPU_ARMV7A),y)
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_OPTS += ARM_ARCH_MAJOR=7
|
||||
else ifeq ($(BR2_ARM_CPU_ARMV8A),y)
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_OPTS += ARM_ARCH_MAJOR=8
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_arm),y)
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_OPTS += ARCH=aarch32
|
||||
else ifeq ($(BR2_aarch64),y)
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_OPTS += ARCH=aarch64
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE),y)
|
||||
ARM_TRUSTED_FIRMWARE_DEPENDENCIES += optee-os
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_OPTS += \
|
||||
BL32=$(BINARIES_DIR)/tee-header_v2.bin \
|
||||
BL32_EXTRA1=$(BINARIES_DIR)/tee-pager_v2.bin \
|
||||
BL32_EXTRA2=$(BINARIES_DIR)/tee-pageable_v2.bin
|
||||
ifeq ($(BR2_aarch64),y)
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_OPTS += SPD=opteed
|
||||
endif
|
||||
ifeq ($(BR2_arm),y)
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_OPTS += AARCH32_SP=optee
|
||||
endif
|
||||
endif # BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE
|
||||
|
||||
ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_EDK2_AS_BL33),y)
|
||||
ARM_TRUSTED_FIRMWARE_DEPENDENCIES += edk2
|
||||
# Since the flash device name vary between platforms, we use the variable
|
||||
# provided by the EDK2 package for this. Using this variable here is OK
|
||||
# as it will expand after all dependencies are resolved, inside _BUILD_CMDS.
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_OPTS += \
|
||||
BL33=$(BINARIES_DIR)/$(call qstrip,$(BR2_TARGET_EDK2_FD_NAME).fd)
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33),y)
|
||||
ARM_TRUSTED_FIRMWARE_UBOOT_BIN = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE))
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_OPTS += BL33=$(BINARIES_DIR)/$(ARM_TRUSTED_FIRMWARE_UBOOT_BIN)
|
||||
ARM_TRUSTED_FIRMWARE_DEPENDENCIES += uboot
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_VEXPRESS_FIRMWARE),y)
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_OPTS += SCP_BL2=$(BINARIES_DIR)/scp-fw.bin
|
||||
ARM_TRUSTED_FIRMWARE_DEPENDENCIES += vexpress-firmware
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_BINARIES_MARVELL),y)
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_OPTS += SCP_BL2=$(BINARIES_DIR)/scp-fw.bin
|
||||
ARM_TRUSTED_FIRMWARE_DEPENDENCIES += binaries-marvell
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_MV_DDR_MARVELL),y)
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_OPTS += MV_DDR_PATH=$(MV_DDR_MARVELL_DIR)
|
||||
ARM_TRUSTED_FIRMWARE_DEPENDENCIES += mv-ddr-marvell
|
||||
endif
|
||||
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_TARGETS = all
|
||||
|
||||
ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP),y)
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_TARGETS += fip
|
||||
ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-openssl
|
||||
# fiptool only exists in newer (>= 1.3) versions of ATF, so we build
|
||||
# it conditionally. We need to explicitly build it as it requires
|
||||
# OpenSSL, and therefore needs to be passed proper variables to find
|
||||
# the host OpenSSL.
|
||||
define ARM_TRUSTED_FIRMWARE_BUILD_FIPTOOL
|
||||
if test -d $(@D)/tools/fiptool; then \
|
||||
$(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/tools/fiptool \
|
||||
$(ARM_TRUSTED_FIRMWARE_MAKE_OPTS) \
|
||||
CPPFLAGS="$(HOST_CPPFLAGS)" \
|
||||
LDLIBS="$(HOST_LDFLAGS) -lcrypto" ; \
|
||||
fi
|
||||
endef
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31),y)
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_TARGETS += bl31
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31_UBOOT),y)
|
||||
define ARM_TRUSTED_FIRMWARE_BL31_UBOOT_BUILD
|
||||
# Get the entry point address from the elf.
|
||||
BASE_ADDR=$$($(TARGET_READELF) -h $(ARM_TRUSTED_FIRMWARE_IMG_DIR)/bl31/bl31.elf | \
|
||||
sed -r '/^ Entry point address:\s*(.*)/!d; s//\1/') && \
|
||||
$(MKIMAGE) \
|
||||
-A $(MKIMAGE_ARCH) -O arm-trusted-firmware -C none \
|
||||
-a $${BASE_ADDR} -e $${BASE_ADDR} \
|
||||
-d $(ARM_TRUSTED_FIRMWARE_IMG_DIR)/bl31.bin \
|
||||
$(ARM_TRUSTED_FIRMWARE_IMG_DIR)/atf-uboot.ub
|
||||
endef
|
||||
define ARM_TRUSTED_FIRMWARE_BL31_UBOOT_INSTALL
|
||||
$(INSTALL) -m 0644 $(ARM_TRUSTED_FIRMWARE_IMG_DIR)/atf-uboot.ub \
|
||||
$(BINARIES_DIR)/atf-uboot.ub
|
||||
endef
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_OPTS += RESET_TO_BL31=1
|
||||
ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-uboot-tools
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_UBOOT_NEEDS_ATF_BL31_ELF),y)
|
||||
define ARM_TRUSTED_FIRMWARE_BL31_UBOOT_INSTALL_ELF
|
||||
$(INSTALL) -D -m 0644 $(ARM_TRUSTED_FIRMWARE_IMG_DIR)/bl31/bl31.elf \
|
||||
$(BINARIES_DIR)/bl31.elf
|
||||
endef
|
||||
endif
|
||||
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_TARGETS += \
|
||||
$(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_TARGETS))
|
||||
|
||||
ARM_TRUSTED_FIRMWARE_CUSTOM_DTS_PATH = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_DTS_PATH))
|
||||
|
||||
define ARM_TRUSTED_FIRMWARE_BUILD_CMDS
|
||||
$(if $(ARM_TRUSTED_FIRMWARE_CUSTOM_DTS_PATH),
|
||||
cp -f $(ARM_TRUSTED_FIRMWARE_CUSTOM_DTS_PATH) $(@D)/fdts/
|
||||
)
|
||||
$(ARM_TRUSTED_FIRMWARE_BUILD_FIPTOOL)
|
||||
$(ARM_TRUSTED_FIRMWARE_MAKE_ENV) $(MAKE) -C $(@D) \
|
||||
$(ARM_TRUSTED_FIRMWARE_MAKE_OPTS) \
|
||||
$(ARM_TRUSTED_FIRMWARE_MAKE_TARGETS)
|
||||
$(ARM_TRUSTED_FIRMWARE_BL31_UBOOT_BUILD)
|
||||
endef
|
||||
|
||||
define ARM_TRUSTED_FIRMWARE_INSTALL_IMAGES_CMDS
|
||||
$(foreach f,$(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES)), \
|
||||
cp -dpf $(ARM_TRUSTED_FIRMWARE_IMG_DIR)/$(f) $(BINARIES_DIR)/
|
||||
)
|
||||
$(ARM_TRUSTED_FIRMWARE_BL31_UBOOT_INSTALL)
|
||||
$(ARM_TRUSTED_FIRMWARE_BL31_UBOOT_INSTALL_ELF)
|
||||
endef
|
||||
|
||||
# Configuration check
|
||||
ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE)$(BR_BUILDING),yy)
|
||||
|
||||
ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL),y)
|
||||
ifeq ($(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL_LOCATION)),)
|
||||
$(error No tarball location specified. Please check BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL_LOCATION)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT),y)
|
||||
ifeq ($(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL)),)
|
||||
$(error No repository specified. Please check BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL)
|
||||
endif
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
$(eval $(generic-package))
|
||||
334
boot/at91bootstrap/0001-eabi-fix.patch
Normal file
334
boot/at91bootstrap/0001-eabi-fix.patch
Normal file
@ -0,0 +1,334 @@
|
||||
When using an EABI toolchain, the default compilation generates
|
||||
references to __aeabi_unwind_cpp_pr0(). This symbol is defined in
|
||||
libgcc, but we don't want to use it for a bootloader.
|
||||
|
||||
Therefore, this patch passes some additional CFLAGS to disable the
|
||||
generation of such references by avoiding unwind tables, exceptions,
|
||||
etc.
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
---
|
||||
board/at91cap9adk/dataflash/Makefile | 2 +-
|
||||
board/at91cap9adk/norflash/Makefile | 2 +-
|
||||
board/at91cap9stk/nandflash/Makefile | 2 +-
|
||||
board/at91sam9260ek/dataflash/Makefile | 2 +-
|
||||
board/at91sam9260ek/nandflash/Makefile | 2 +-
|
||||
board/at91sam9261ek/dataflash/Makefile | 2 +-
|
||||
board/at91sam9261ek/nandflash/Makefile | 2 +-
|
||||
board/at91sam9263ek/dataflash/Makefile | 2 +-
|
||||
board/at91sam9263ek/nandflash/Makefile | 2 +-
|
||||
board/at91sam9g10ek/dataflash/Makefile | 2 +-
|
||||
board/at91sam9g10ek/nandflash/Makefile | 2 +-
|
||||
board/at91sam9g20ek/dataflash/Makefile | 2 +-
|
||||
board/at91sam9g20ek/nandflash/Makefile | 2 +-
|
||||
board/at91sam9g45ekes/nandflash/Makefile | 2 +-
|
||||
board/at91sam9m10ekes/dataflash/Makefile | 2 +-
|
||||
board/at91sam9m10ekes/nandflash/Makefile | 2 +-
|
||||
board/at91sam9m10g45ek/dataflash/Makefile | 2 +-
|
||||
board/at91sam9m10g45ek/nandflash/Makefile | 2 +-
|
||||
board/at91sam9rlek/dataflash/Makefile | 2 +-
|
||||
board/at91sam9rlek/nandflash/Makefile | 2 +-
|
||||
board/at91sam9xeek/dataflash/Makefile | 2 +-
|
||||
board/at91sam9xeek/nandflash/Makefile | 2 +-
|
||||
lib/Makefile | 2 +-
|
||||
23 files changed, 23 insertions(+), 23 deletions(-)
|
||||
|
||||
Index: Bootstrap-v1.16/board/at91cap9adk/dataflash/Makefile
|
||||
===================================================================
|
||||
--- Bootstrap-v1.16.orig/board/at91cap9adk/dataflash/Makefile
|
||||
+++ Bootstrap-v1.16/board/at91cap9adk/dataflash/Makefile
|
||||
@@ -34,7 +34,7 @@
|
||||
SIZE=$(CROSS_COMPILE)size
|
||||
OBJCOPY=$(CROSS_COMPILE)objcopy
|
||||
OBJDUMP=$(CROSS_COMPILE)objdump
|
||||
-CCFLAGS=-g -mcpu=arm9 -Os -Wall -D$(TARGET) -D$(BOARD) -I$(INCL)
|
||||
+CCFLAGS=-g -mcpu=arm9 -Os -Wall -D$(TARGET) -D$(BOARD) -I$(INCL) -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables
|
||||
ASFLAGS=-g -mcpu=arm9 -c -Os -Wall -D$(TARGET) -D$(BOARD) -I$(INCL) -DTOP_OF_MEM=$(TOP_OF_MEMORY)
|
||||
|
||||
# Linker flags.
|
||||
Index: Bootstrap-v1.16/board/at91cap9adk/norflash/Makefile
|
||||
===================================================================
|
||||
--- Bootstrap-v1.16.orig/board/at91cap9adk/norflash/Makefile
|
||||
+++ Bootstrap-v1.16/board/at91cap9adk/norflash/Makefile
|
||||
@@ -34,7 +34,7 @@
|
||||
SIZE=$(CROSS_COMPILE)size
|
||||
OBJCOPY=$(CROSS_COMPILE)objcopy
|
||||
OBJDUMP=$(CROSS_COMPILE)objdump
|
||||
-CCFLAGS=-g -mcpu=arm9 -Os -Wall -D$(TARGET) -D$(BOARD) -I$(INCL)
|
||||
+CCFLAGS=-g -mcpu=arm9 -Os -Wall -D$(TARGET) -D$(BOARD) -I$(INCL) -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables
|
||||
ASFLAGS=-g -mcpu=arm9 -c -Os -Wall -D$(TARGET) -D$(BOARD) -I$(INCL) -DTOP_OF_MEM=$(TOP_OF_MEMORY)
|
||||
|
||||
# Linker flags.
|
||||
Index: Bootstrap-v1.16/board/at91cap9stk/nandflash/Makefile
|
||||
===================================================================
|
||||
--- Bootstrap-v1.16.orig/board/at91cap9stk/nandflash/Makefile
|
||||
+++ Bootstrap-v1.16/board/at91cap9stk/nandflash/Makefile
|
||||
@@ -37,7 +37,7 @@
|
||||
SIZE=$(CROSS_COMPILE)size
|
||||
OBJCOPY=$(CROSS_COMPILE)objcopy
|
||||
OBJDUMP=$(CROSS_COMPILE)objdump
|
||||
-CCFLAGS=-g -mcpu=arm9 -Os -Wall -D$(TARGET) -D$(BOARD) -I$(INCL)
|
||||
+CCFLAGS=-g -mcpu=arm9 -Os -Wall -D$(TARGET) -D$(BOARD) -I$(INCL) -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables
|
||||
ASFLAGS=-g -mcpu=arm9 -c -Os -Wall -D$(TARGET) -D$(BOARD) -I$(INCL) -DTOP_OF_MEM=$(TOP_OF_MEMORY)
|
||||
|
||||
|
||||
Index: Bootstrap-v1.16/board/at91sam9260ek/dataflash/Makefile
|
||||
===================================================================
|
||||
--- Bootstrap-v1.16.orig/board/at91sam9260ek/dataflash/Makefile
|
||||
+++ Bootstrap-v1.16/board/at91sam9260ek/dataflash/Makefile
|
||||
@@ -37,7 +37,7 @@
|
||||
SIZE=$(CROSS_COMPILE)size
|
||||
OBJCOPY=$(CROSS_COMPILE)objcopy
|
||||
OBJDUMP=$(CROSS_COMPILE)objdump
|
||||
-CCFLAGS=-g -mcpu=arm926ej-s -Os -Wall -D$(TARGET) -I$(INCL)
|
||||
+CCFLAGS=-g -mcpu=arm926ej-s -Os -Wall -D$(TARGET) -I$(INCL) -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables
|
||||
ASFLAGS=-g -mcpu=arm926ej-s -c -Os -Wall -D$(TARGET) -I$(INCL) -DTOP_OF_MEM=$(TOP_OF_MEMORY)
|
||||
|
||||
# Linker flags.
|
||||
Index: Bootstrap-v1.16/board/at91sam9260ek/nandflash/Makefile
|
||||
===================================================================
|
||||
--- Bootstrap-v1.16.orig/board/at91sam9260ek/nandflash/Makefile
|
||||
+++ Bootstrap-v1.16/board/at91sam9260ek/nandflash/Makefile
|
||||
@@ -37,7 +37,7 @@
|
||||
SIZE=$(CROSS_COMPILE)size
|
||||
OBJCOPY=$(CROSS_COMPILE)objcopy
|
||||
OBJDUMP=$(CROSS_COMPILE)objdump
|
||||
-CCFLAGS=-g -mcpu=arm926ej-s -Os -Wall -D$(TARGET) -I$(INCL)
|
||||
+CCFLAGS=-g -mcpu=arm926ej-s -Os -Wall -D$(TARGET) -I$(INCL) -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables
|
||||
ASFLAGS=-g -mcpu=arm926ej-s -c -Os -Wall -D$(TARGET) -I$(INCL) -DTOP_OF_MEM=$(TOP_OF_MEMORY)
|
||||
|
||||
# Linker flags.
|
||||
Index: Bootstrap-v1.16/board/at91sam9261ek/dataflash/Makefile
|
||||
===================================================================
|
||||
--- Bootstrap-v1.16.orig/board/at91sam9261ek/dataflash/Makefile
|
||||
+++ Bootstrap-v1.16/board/at91sam9261ek/dataflash/Makefile
|
||||
@@ -37,7 +37,7 @@
|
||||
SIZE=$(CROSS_COMPILE)size
|
||||
OBJCOPY=$(CROSS_COMPILE)objcopy
|
||||
OBJDUMP=$(CROSS_COMPILE)objdump
|
||||
-CCFLAGS=-g -mcpu=arm9 -Os -Wall -D$(TARGET) -I$(INCL)
|
||||
+CCFLAGS=-g -mcpu=arm9 -Os -Wall -D$(TARGET) -I$(INCL) -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables
|
||||
ASFLAGS=-g -mcpu=arm9 -c -Os -Wall -D$(TARGET) -I$(INCL) -DTOP_OF_MEM=$(TOP_OF_MEMORY)
|
||||
|
||||
# Linker flags.
|
||||
Index: Bootstrap-v1.16/board/at91sam9261ek/nandflash/Makefile
|
||||
===================================================================
|
||||
--- Bootstrap-v1.16.orig/board/at91sam9261ek/nandflash/Makefile
|
||||
+++ Bootstrap-v1.16/board/at91sam9261ek/nandflash/Makefile
|
||||
@@ -37,7 +37,7 @@
|
||||
SIZE=$(CROSS_COMPILE)size
|
||||
OBJCOPY=$(CROSS_COMPILE)objcopy
|
||||
OBJDUMP=$(CROSS_COMPILE)objdump
|
||||
-CCFLAGS=-g -mcpu=arm9 -Os -Wall -D$(TARGET) -I$(INCL)
|
||||
+CCFLAGS=-g -mcpu=arm9 -Os -Wall -D$(TARGET) -I$(INCL) -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables
|
||||
ASFLAGS=-g -mcpu=arm9 -c -Os -Wall -D$(TARGET) -I$(INCL) -DTOP_OF_MEM=$(TOP_OF_MEMORY)
|
||||
|
||||
# Linker flags.
|
||||
Index: Bootstrap-v1.16/board/at91sam9263ek/dataflash/Makefile
|
||||
===================================================================
|
||||
--- Bootstrap-v1.16.orig/board/at91sam9263ek/dataflash/Makefile
|
||||
+++ Bootstrap-v1.16/board/at91sam9263ek/dataflash/Makefile
|
||||
@@ -34,7 +34,7 @@
|
||||
SIZE=$(CROSS_COMPILE)size
|
||||
OBJCOPY=$(CROSS_COMPILE)objcopy
|
||||
OBJDUMP=$(CROSS_COMPILE)objdump
|
||||
-CCFLAGS=-g -mcpu=arm9 -Os -Wall -D$(TARGET) -I$(INCL)
|
||||
+CCFLAGS=-g -mcpu=arm9 -Os -Wall -D$(TARGET) -I$(INCL) -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables
|
||||
ASFLAGS=-g -mcpu=arm9 -c -Os -Wall -D$(TARGET) -I$(INCL) -DTOP_OF_MEM=$(TOP_OF_MEMORY)
|
||||
|
||||
# Linker flags.
|
||||
Index: Bootstrap-v1.16/board/at91sam9263ek/nandflash/Makefile
|
||||
===================================================================
|
||||
--- Bootstrap-v1.16.orig/board/at91sam9263ek/nandflash/Makefile
|
||||
+++ Bootstrap-v1.16/board/at91sam9263ek/nandflash/Makefile
|
||||
@@ -33,7 +33,7 @@
|
||||
SIZE=$(CROSS_COMPILE)size
|
||||
OBJCOPY=$(CROSS_COMPILE)objcopy
|
||||
OBJDUMP=$(CROSS_COMPILE)objdump
|
||||
-CCFLAGS=-g -mcpu=arm9 -O0 -Wall -D$(TARGET) -I$(INCL)
|
||||
+CCFLAGS=-g -mcpu=arm9 -O0 -Wall -D$(TARGET) -I$(INCL) -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables
|
||||
ASFLAGS=-g -mcpu=arm9 -c -Os -Wall -D$(TARGET) -I$(INCL) -DTOP_OF_MEM=$(TOP_OF_MEMORY)
|
||||
|
||||
# Linker flags.
|
||||
Index: Bootstrap-v1.16/board/at91sam9g10ek/dataflash/Makefile
|
||||
===================================================================
|
||||
--- Bootstrap-v1.16.orig/board/at91sam9g10ek/dataflash/Makefile
|
||||
+++ Bootstrap-v1.16/board/at91sam9g10ek/dataflash/Makefile
|
||||
@@ -37,7 +37,7 @@
|
||||
SIZE=$(CROSS_COMPILE)size
|
||||
OBJCOPY=$(CROSS_COMPILE)objcopy
|
||||
OBJDUMP=$(CROSS_COMPILE)objdump
|
||||
-CCFLAGS=-g -mcpu=arm9 -Os -Wall -D$(TARGET) -I$(INCL)
|
||||
+CCFLAGS=-g -mcpu=arm9 -Os -Wall -D$(TARGET) -I$(INCL) -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables
|
||||
ASFLAGS=-g -mcpu=arm9 -c -Os -Wall -D$(TARGET) -I$(INCL) -DTOP_OF_MEM=$(TOP_OF_MEMORY)
|
||||
|
||||
# Linker flags.
|
||||
Index: Bootstrap-v1.16/board/at91sam9g10ek/nandflash/Makefile
|
||||
===================================================================
|
||||
--- Bootstrap-v1.16.orig/board/at91sam9g10ek/nandflash/Makefile
|
||||
+++ Bootstrap-v1.16/board/at91sam9g10ek/nandflash/Makefile
|
||||
@@ -37,7 +37,7 @@
|
||||
SIZE=$(CROSS_COMPILE)size
|
||||
OBJCOPY=$(CROSS_COMPILE)objcopy
|
||||
OBJDUMP=$(CROSS_COMPILE)objdump
|
||||
-CCFLAGS=-g -mcpu=arm9 -Os -Wall -D$(TARGET) -I$(INCL)
|
||||
+CCFLAGS=-g -mcpu=arm9 -Os -Wall -D$(TARGET) -I$(INCL) -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables
|
||||
ASFLAGS=-g -mcpu=arm9 -c -Os -Wall -D$(TARGET) -I$(INCL) -DTOP_OF_MEM=$(TOP_OF_MEMORY)
|
||||
|
||||
# Linker flags.
|
||||
Index: Bootstrap-v1.16/board/at91sam9g20ek/dataflash/Makefile
|
||||
===================================================================
|
||||
--- Bootstrap-v1.16.orig/board/at91sam9g20ek/dataflash/Makefile
|
||||
+++ Bootstrap-v1.16/board/at91sam9g20ek/dataflash/Makefile
|
||||
@@ -37,7 +37,7 @@
|
||||
SIZE=$(CROSS_COMPILE)size
|
||||
OBJCOPY=$(CROSS_COMPILE)objcopy
|
||||
OBJDUMP=$(CROSS_COMPILE)objdump
|
||||
-CCFLAGS=-g -mcpu=arm926ej-s -Os -Wall -D$(TARGET) -I$(INCL)
|
||||
+CCFLAGS=-g -mcpu=arm926ej-s -Os -Wall -D$(TARGET) -I$(INCL) -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables
|
||||
ASFLAGS=-g -mcpu=arm926ej-s -c -Os -Wall -D$(TARGET) -I$(INCL) -DTOP_OF_MEM=$(TOP_OF_MEMORY)
|
||||
|
||||
# Linker flags.
|
||||
Index: Bootstrap-v1.16/board/at91sam9g20ek/nandflash/Makefile
|
||||
===================================================================
|
||||
--- Bootstrap-v1.16.orig/board/at91sam9g20ek/nandflash/Makefile
|
||||
+++ Bootstrap-v1.16/board/at91sam9g20ek/nandflash/Makefile
|
||||
@@ -37,7 +37,7 @@
|
||||
SIZE=$(CROSS_COMPILE)size
|
||||
OBJCOPY=$(CROSS_COMPILE)objcopy
|
||||
OBJDUMP=$(CROSS_COMPILE)objdump
|
||||
-CCFLAGS=-g -mcpu=arm926ej-s -Os -Wall -D$(TARGET) -I$(INCL)
|
||||
+CCFLAGS=-g -mcpu=arm926ej-s -Os -Wall -D$(TARGET) -I$(INCL) -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables
|
||||
ASFLAGS=-g -mcpu=arm926ej-s -c -Os -Wall -D$(TARGET) -I$(INCL) -DTOP_OF_MEM=$(TOP_OF_MEMORY)
|
||||
|
||||
# Linker flags.
|
||||
Index: Bootstrap-v1.16/board/at91sam9g45ekes/nandflash/Makefile
|
||||
===================================================================
|
||||
--- Bootstrap-v1.16.orig/board/at91sam9g45ekes/nandflash/Makefile
|
||||
+++ Bootstrap-v1.16/board/at91sam9g45ekes/nandflash/Makefile
|
||||
@@ -37,7 +37,7 @@
|
||||
SIZE=$(CROSS_COMPILE)size
|
||||
OBJCOPY=$(CROSS_COMPILE)objcopy
|
||||
OBJDUMP=$(CROSS_COMPILE)objdump
|
||||
-CCFLAGS=-g -mcpu=arm926ej-s -O2 -Wall -D$(TARGET) -I$(INCL)
|
||||
+CCFLAGS=-g -mcpu=arm926ej-s -O2 -Wall -D$(TARGET) -I$(INCL) -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables
|
||||
ASFLAGS=-g -mcpu=arm926ej-s -c -O2 -Wall -D$(TARGET) -I$(INCL) -DTOP_OF_MEM=$(TOP_OF_MEMORY)
|
||||
|
||||
# Linker flags.
|
||||
Index: Bootstrap-v1.16/board/at91sam9m10ekes/dataflash/Makefile
|
||||
===================================================================
|
||||
--- Bootstrap-v1.16.orig/board/at91sam9m10ekes/dataflash/Makefile
|
||||
+++ Bootstrap-v1.16/board/at91sam9m10ekes/dataflash/Makefile
|
||||
@@ -37,7 +37,7 @@
|
||||
SIZE=$(CROSS_COMPILE)size
|
||||
OBJCOPY=$(CROSS_COMPILE)objcopy
|
||||
OBJDUMP=$(CROSS_COMPILE)objdump
|
||||
-CCFLAGS=-g -mcpu=arm926ej-s -O2 -Wall -D$(TARGET) -I$(INCL)
|
||||
+CCFLAGS=-g -mcpu=arm926ej-s -O2 -Wall -D$(TARGET) -I$(INCL) -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables
|
||||
ASFLAGS=-g -mcpu=arm926ej-s -c -O2 -Wall -D$(TARGET) -I$(INCL) -DTOP_OF_MEM=$(TOP_OF_MEMORY)
|
||||
|
||||
# Linker flags.
|
||||
Index: Bootstrap-v1.16/board/at91sam9m10ekes/nandflash/Makefile
|
||||
===================================================================
|
||||
--- Bootstrap-v1.16.orig/board/at91sam9m10ekes/nandflash/Makefile
|
||||
+++ Bootstrap-v1.16/board/at91sam9m10ekes/nandflash/Makefile
|
||||
@@ -37,7 +37,7 @@
|
||||
SIZE=$(CROSS_COMPILE)size
|
||||
OBJCOPY=$(CROSS_COMPILE)objcopy
|
||||
OBJDUMP=$(CROSS_COMPILE)objdump
|
||||
-CCFLAGS=-g -mcpu=arm926ej-s -O2 -Wall -D$(TARGET) -I$(INCL)
|
||||
+CCFLAGS=-g -mcpu=arm926ej-s -O2 -Wall -D$(TARGET) -I$(INCL) -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables
|
||||
ASFLAGS=-g -mcpu=arm926ej-s -c -O2 -Wall -D$(TARGET) -I$(INCL) -DTOP_OF_MEM=$(TOP_OF_MEMORY)
|
||||
|
||||
# Linker flags.
|
||||
Index: Bootstrap-v1.16/board/at91sam9m10g45ek/dataflash/Makefile
|
||||
===================================================================
|
||||
--- Bootstrap-v1.16.orig/board/at91sam9m10g45ek/dataflash/Makefile
|
||||
+++ Bootstrap-v1.16/board/at91sam9m10g45ek/dataflash/Makefile
|
||||
@@ -37,7 +37,7 @@
|
||||
SIZE=$(CROSS_COMPILE)size
|
||||
OBJCOPY=$(CROSS_COMPILE)objcopy
|
||||
OBJDUMP=$(CROSS_COMPILE)objdump
|
||||
-CCFLAGS=-g -mcpu=arm926ej-s -O2 -Wall -D$(TARGET) -I$(INCL)
|
||||
+CCFLAGS=-g -mcpu=arm926ej-s -O2 -Wall -D$(TARGET) -I$(INCL) -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables
|
||||
ASFLAGS=-g -mcpu=arm926ej-s -c -O2 -Wall -D$(TARGET) -I$(INCL) -DTOP_OF_MEM=$(TOP_OF_MEMORY)
|
||||
|
||||
# Linker flags.
|
||||
Index: Bootstrap-v1.16/board/at91sam9m10g45ek/nandflash/Makefile
|
||||
===================================================================
|
||||
--- Bootstrap-v1.16.orig/board/at91sam9m10g45ek/nandflash/Makefile
|
||||
+++ Bootstrap-v1.16/board/at91sam9m10g45ek/nandflash/Makefile
|
||||
@@ -37,7 +37,7 @@
|
||||
SIZE=$(CROSS_COMPILE)size
|
||||
OBJCOPY=$(CROSS_COMPILE)objcopy
|
||||
OBJDUMP=$(CROSS_COMPILE)objdump
|
||||
-CCFLAGS=-g -mcpu=arm926ej-s -O2 -Wall -D$(TARGET) -I$(INCL)
|
||||
+CCFLAGS=-g -mcpu=arm926ej-s -O2 -Wall -D$(TARGET) -I$(INCL) -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables
|
||||
ASFLAGS=-g -mcpu=arm926ej-s -c -O2 -Wall -D$(TARGET) -I$(INCL) -DTOP_OF_MEM=$(TOP_OF_MEMORY)
|
||||
|
||||
# Linker flags.
|
||||
Index: Bootstrap-v1.16/board/at91sam9rlek/dataflash/Makefile
|
||||
===================================================================
|
||||
--- Bootstrap-v1.16.orig/board/at91sam9rlek/dataflash/Makefile
|
||||
+++ Bootstrap-v1.16/board/at91sam9rlek/dataflash/Makefile
|
||||
@@ -37,7 +37,7 @@
|
||||
SIZE=$(CROSS_COMPILE)size
|
||||
OBJCOPY=$(CROSS_COMPILE)objcopy
|
||||
OBJDUMP=$(CROSS_COMPILE)objdump
|
||||
-CCFLAGS=-g -mcpu=arm926ej-s -Os -Wall -D$(TARGET) -I$(INCL)
|
||||
+CCFLAGS=-g -mcpu=arm926ej-s -Os -Wall -D$(TARGET) -I$(INCL) -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables
|
||||
ASFLAGS=-g -mcpu=arm926ej-s -c -Os -Wall -D$(TARGET) -I$(INCL) -DTOP_OF_MEM=$(TOP_OF_MEMORY)
|
||||
|
||||
# Linker flags.
|
||||
Index: Bootstrap-v1.16/board/at91sam9rlek/nandflash/Makefile
|
||||
===================================================================
|
||||
--- Bootstrap-v1.16.orig/board/at91sam9rlek/nandflash/Makefile
|
||||
+++ Bootstrap-v1.16/board/at91sam9rlek/nandflash/Makefile
|
||||
@@ -37,7 +37,7 @@
|
||||
SIZE=$(CROSS_COMPILE)size
|
||||
OBJCOPY=$(CROSS_COMPILE)objcopy
|
||||
OBJDUMP=$(CROSS_COMPILE)objdump
|
||||
-CCFLAGS=-g -mcpu=arm926ej-s -Os -Wall -D$(TARGET) -I$(INCL)
|
||||
+CCFLAGS=-g -mcpu=arm926ej-s -Os -Wall -D$(TARGET) -I$(INCL) -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables
|
||||
ASFLAGS=-g -mcpu=arm926ej-s -c -Os -Wall -D$(TARGET) -I$(INCL) -DTOP_OF_MEM=$(TOP_OF_MEMORY)
|
||||
|
||||
# Linker flags.
|
||||
Index: Bootstrap-v1.16/board/at91sam9xeek/dataflash/Makefile
|
||||
===================================================================
|
||||
--- Bootstrap-v1.16.orig/board/at91sam9xeek/dataflash/Makefile
|
||||
+++ Bootstrap-v1.16/board/at91sam9xeek/dataflash/Makefile
|
||||
@@ -38,7 +38,7 @@
|
||||
SIZE=$(CROSS_COMPILE)size
|
||||
OBJCOPY=$(CROSS_COMPILE)objcopy
|
||||
OBJDUMP=$(CROSS_COMPILE)objdump
|
||||
-CCFLAGS=-g -mcpu=arm9 -Os -Wall -D$(TARGET) -I$(INCL)
|
||||
+CCFLAGS=-g -mcpu=arm9 -Os -Wall -D$(TARGET) -I$(INCL) -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables
|
||||
ASFLAGS=-g -mcpu=arm9 -c -Os -Wall -D$(TARGET) -I$(INCL) -DTOP_OF_MEM=$(TOP_OF_MEMORY)
|
||||
|
||||
# Linker flags.
|
||||
Index: Bootstrap-v1.16/board/at91sam9xeek/nandflash/Makefile
|
||||
===================================================================
|
||||
--- Bootstrap-v1.16.orig/board/at91sam9xeek/nandflash/Makefile
|
||||
+++ Bootstrap-v1.16/board/at91sam9xeek/nandflash/Makefile
|
||||
@@ -38,7 +38,7 @@
|
||||
SIZE=$(CROSS_COMPILE)size
|
||||
OBJCOPY=$(CROSS_COMPILE)objcopy
|
||||
OBJDUMP=$(CROSS_COMPILE)objdump
|
||||
-CCFLAGS=-g -mcpu=arm9 -Os -Wall -D$(TARGET) -I$(INCL)
|
||||
+CCFLAGS=-g -mcpu=arm9 -Os -Wall -D$(TARGET) -I$(INCL) -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables
|
||||
ASFLAGS=-g -mcpu=arm9 -c -Os -Wall -D$(TARGET) -I$(INCL) -DTOP_OF_MEM=$(TOP_OF_MEMORY)
|
||||
|
||||
# Linker flags.
|
||||
Index: Bootstrap-v1.16/lib/Makefile
|
||||
===================================================================
|
||||
--- Bootstrap-v1.16.orig/lib/Makefile
|
||||
+++ Bootstrap-v1.16/lib/Makefile
|
||||
@@ -37,7 +37,7 @@
|
||||
SIZE=$(CROSS_COMPILE)size
|
||||
OBJCOPY=$(CROSS_COMPILE)objcopy
|
||||
OBJDUMP=$(CROSS_COMPILE)objdump
|
||||
-CCFLAGS=-g -mcpu=arm926ej-s -Os -Wall -D$(TARGET) -I$(INCL)
|
||||
+CCFLAGS=-g -mcpu=arm926ej-s -Os -Wall -D$(TARGET) -I$(INCL) -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables
|
||||
ASFLAGS=-g -mcpu=arm926ej-s -c -Os -Wall -D$(TARGET) -I$(INCL) -DTOP_OF_MEM=$(TOP_OF_MEMORY)
|
||||
|
||||
# Linker flags.
|
||||
29
boot/at91bootstrap/0002-gcc-4.6.x-ldscript-fix.patch
Normal file
29
boot/at91bootstrap/0002-gcc-4.6.x-ldscript-fix.patch
Normal file
@ -0,0 +1,29 @@
|
||||
From b783d1f9bf985c0981e755bd2c13e091e9d6837f Mon Sep 17 00:00:00 2001
|
||||
From: Gregory Hermant <gregory.hermant@calao-systems.com>
|
||||
Date: Tue, 6 Nov 2012 09:38:50 +0100
|
||||
Subject: [PATCH] at91bootstrap: fix overlap linker issue
|
||||
|
||||
The linker script of the at91bootstrap package has to be modified when
|
||||
built from gcc-4.6.x version. Indeed a section named text.startup is
|
||||
created and has to be added into the text section.
|
||||
|
||||
Signed-off-by: Gregory Hermant <gregory.hermant@calao-systems.com>
|
||||
---
|
||||
elf32-littlearm.lds | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/elf32-littlearm.lds b/elf32-littlearm.lds
|
||||
index a33952f..4f3ba25 100644
|
||||
--- a/elf32-littlearm.lds
|
||||
+++ b/elf32-littlearm.lds
|
||||
@@ -7,6 +7,7 @@ SECTIONS
|
||||
.text : {
|
||||
_stext = .;
|
||||
*(.text)
|
||||
+ *(.text*)
|
||||
*(.rodata) /* read-only data (constants) */
|
||||
*(.rodata*)
|
||||
. = ALIGN(4);
|
||||
--
|
||||
1.7.9.5
|
||||
|
||||
284
boot/at91bootstrap/0003-u-boot-relocation-fix.patch
Normal file
284
boot/at91bootstrap/0003-u-boot-relocation-fix.patch
Normal file
@ -0,0 +1,284 @@
|
||||
From d4e4a1aad559e35d84b445d1379be94ad036984e Mon Sep 17 00:00:00 2001
|
||||
From: Alexandre Belloni <alexandre.belloni@piout.net>
|
||||
Date: Thu, 25 Oct 2012 22:57:14 +0200
|
||||
Subject: [PATCH] u-boot relocation fix
|
||||
|
||||
Every AT91SAM plaforms were broken between 2010.12 and 2011.03 because
|
||||
of the relocation changes.
|
||||
|
||||
We have to get JUMP_ADDR consistant with what is used by u-boot
|
||||
(CONFIG_SYS_TEXT_BASE).
|
||||
|
||||
I didn't know what to do with at91sam9m10g45ek as it doesn't seems to be
|
||||
converted yet. But anyway, that means that it is either not working or
|
||||
doesn't care so changing it here shouldn't harm.
|
||||
|
||||
We also have to increase the IMG_SIZE as u-boot as grown larger than the
|
||||
default value. As requested on the u-boot ML, we assume that it could
|
||||
be up to 495kB big.
|
||||
|
||||
It means that now, you have to flash your kernel at 0x00084000 instead
|
||||
of 0x00042000. And so you also have to load it from that adress from
|
||||
u-boot.
|
||||
|
||||
Then, remember that you could decrease IMG_SIZE to boot faster.
|
||||
|
||||
Signed-off-by: Alexandre Belloni <alexandre.belloni@piout.net>
|
||||
---
|
||||
board/at91sam9260ek/dataflash/at91sam9260ek.h | 4 ++--
|
||||
board/at91sam9260ek/nandflash/at91sam9260ek.h | 2 +-
|
||||
board/at91sam9261ek/dataflash/at91sam9261ek.h | 4 ++--
|
||||
board/at91sam9261ek/nandflash/at91sam9261ek.h | 2 +-
|
||||
board/at91sam9263ek/dataflash/at91sam9263ek.h | 4 ++--
|
||||
board/at91sam9263ek/nandflash/at91sam9263ek.h | 2 +-
|
||||
board/at91sam9g10ek/dataflash/at91sam9g10ek.h | 4 ++--
|
||||
board/at91sam9g10ek/nandflash/at91sam9g10ek.h | 2 +-
|
||||
board/at91sam9g20ek/dataflash/at91sam9g20ek.h | 4 ++--
|
||||
board/at91sam9g20ek/nandflash/at91sam9g20ek.h | 2 +-
|
||||
board/at91sam9m10ekes/dataflash/at91sam9m10ekes.h | 2 +-
|
||||
.../at91sam9m10g45ek/dataflash/at91sam9m10g45ek.h | 2 +-
|
||||
board/at91sam9rlek/dataflash/at91sam9rlek.h | 4 ++--
|
||||
board/at91sam9rlek/nandflash/at91sam9rlek.h | 2 +-
|
||||
board/at91sam9xeek/dataflash/at91sam9xeek.h | 4 ++--
|
||||
board/at91sam9xeek/nandflash/at91sam9xeek.h | 2 +-
|
||||
16 files changed, 23 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/board/at91sam9260ek/dataflash/at91sam9260ek.h b/board/at91sam9260ek/dataflash/at91sam9260ek.h
|
||||
index 1834246..91081a1 100644
|
||||
--- a/board/at91sam9260ek/dataflash/at91sam9260ek.h
|
||||
+++ b/board/at91sam9260ek/dataflash/at91sam9260ek.h
|
||||
@@ -74,10 +74,10 @@
|
||||
#define AT91C_SPI_PCS_DATAFLASH AT91C_SPI_PCS1_DATAFLASH /* Boot on SPI NCS0 */
|
||||
|
||||
#define IMG_ADDRESS 0x8400 /* Image Address in DataFlash */
|
||||
-#define IMG_SIZE 0x33900 /* Image Size in DataFlash */
|
||||
+#define IMG_SIZE 0x7BC00 /* Image Size in DataFlash */
|
||||
|
||||
#define MACH_TYPE 0x44B /* AT91SAM9260-EK */
|
||||
-#define JUMP_ADDR 0x23F00000 /* Final Jump Address */
|
||||
+#define JUMP_ADDR 0x21F00000 /* Final Jump Address */
|
||||
|
||||
/* ******************************************************************* */
|
||||
/* Application Settings */
|
||||
diff --git a/board/at91sam9260ek/nandflash/at91sam9260ek.h b/board/at91sam9260ek/nandflash/at91sam9260ek.h
|
||||
index 2cac601..f8fdff2 100644
|
||||
--- a/board/at91sam9260ek/nandflash/at91sam9260ek.h
|
||||
+++ b/board/at91sam9260ek/nandflash/at91sam9260ek.h
|
||||
@@ -92,7 +92,7 @@
|
||||
#define IMG_SIZE 0x40000 /* Image Size in NandFlash */
|
||||
|
||||
#define MACH_TYPE 0x44B /* AT91SAM9260-EK */
|
||||
-#define JUMP_ADDR 0x23F00000 /* Final Jump Address */
|
||||
+#define JUMP_ADDR 0x21F00000 /* Final Jump Address */
|
||||
|
||||
/* ******************************************************************* */
|
||||
/* Application Settings */
|
||||
diff --git a/board/at91sam9261ek/dataflash/at91sam9261ek.h b/board/at91sam9261ek/dataflash/at91sam9261ek.h
|
||||
index 8ce30e9..276ba3d 100644
|
||||
--- a/board/at91sam9261ek/dataflash/at91sam9261ek.h
|
||||
+++ b/board/at91sam9261ek/dataflash/at91sam9261ek.h
|
||||
@@ -97,10 +97,10 @@
|
||||
#define AT91C_SPI_PCS_DATAFLASH AT91C_SPI_PCS0_DATAFLASH /* Boot on SPI NCS0 */
|
||||
|
||||
#define IMG_ADDRESS 0x8400 /* Image Address in DataFlash */
|
||||
-#define IMG_SIZE 0x33900 /* Image Size in DataFlash */
|
||||
+#define IMG_SIZE 0x7BC00 /* Image Size in DataFlash */
|
||||
|
||||
#define MACH_TYPE 0x350 /* AT91SAM9261-EK */
|
||||
-#define JUMP_ADDR 0x23F00000 /* Final Jump Address */
|
||||
+#define JUMP_ADDR 0x21F00000 /* Final Jump Address */
|
||||
|
||||
/* ******************************************************************* */
|
||||
/* Application Settings */
|
||||
diff --git a/board/at91sam9261ek/nandflash/at91sam9261ek.h b/board/at91sam9261ek/nandflash/at91sam9261ek.h
|
||||
index badc3ac..e628c97 100644
|
||||
--- a/board/at91sam9261ek/nandflash/at91sam9261ek.h
|
||||
+++ b/board/at91sam9261ek/nandflash/at91sam9261ek.h
|
||||
@@ -114,7 +114,7 @@
|
||||
#define IMG_SIZE 0x40000 /* Image Size in NandFlash */
|
||||
|
||||
#define MACH_TYPE 0x350 /* AT91SAM9261-EK */
|
||||
-#define JUMP_ADDR 0x23F00000 /* Final Jump Address */
|
||||
+#define JUMP_ADDR 0x21F00000 /* Final Jump Address */
|
||||
|
||||
/* ******************************************************************* */
|
||||
/* Application Settings */
|
||||
diff --git a/board/at91sam9263ek/dataflash/at91sam9263ek.h b/board/at91sam9263ek/dataflash/at91sam9263ek.h
|
||||
index 5c9da4b..870f9e2 100644
|
||||
--- a/board/at91sam9263ek/dataflash/at91sam9263ek.h
|
||||
+++ b/board/at91sam9263ek/dataflash/at91sam9263ek.h
|
||||
@@ -96,10 +96,10 @@
|
||||
#define AT91C_SPI_PCS_DATAFLASH AT91C_SPI_PCS0_DATAFLASH /* Boot on SPI NCS0 */
|
||||
|
||||
#define IMG_ADDRESS 0x8400 /* Image Address in DataFlash */
|
||||
-#define IMG_SIZE 0x33900 /* Image Size in DataFlash */
|
||||
+#define IMG_SIZE 0x7BC00 /* Image Size in DataFlash */
|
||||
|
||||
#define MACH_TYPE 0x4B2 /* AT91SAM9263-EK */
|
||||
-#define JUMP_ADDR 0x23F00000 /* Final Jump Address */
|
||||
+#define JUMP_ADDR 0x21F00000 /* Final Jump Address */
|
||||
|
||||
/* ******************************************************************* */
|
||||
/* Application Settings */
|
||||
diff --git a/board/at91sam9263ek/nandflash/at91sam9263ek.h b/board/at91sam9263ek/nandflash/at91sam9263ek.h
|
||||
index 505afc7..8ab4f46 100644
|
||||
--- a/board/at91sam9263ek/nandflash/at91sam9263ek.h
|
||||
+++ b/board/at91sam9263ek/nandflash/at91sam9263ek.h
|
||||
@@ -108,7 +108,7 @@
|
||||
#define IMG_SIZE 0x40000 /* Image Size in NandFlash */
|
||||
|
||||
#define MACH_TYPE 1202 /* AT91SAM9263-EK */
|
||||
-#define JUMP_ADDR 0x23F00000 /* Final Jump Address */
|
||||
+#define JUMP_ADDR 0x21F00000 /* Final Jump Address */
|
||||
|
||||
/* ******************************************************************* */
|
||||
/* Application Settings */
|
||||
diff --git a/board/at91sam9g10ek/dataflash/at91sam9g10ek.h b/board/at91sam9g10ek/dataflash/at91sam9g10ek.h
|
||||
index b2faf44..f4f556b 100644
|
||||
--- a/board/at91sam9g10ek/dataflash/at91sam9g10ek.h
|
||||
+++ b/board/at91sam9g10ek/dataflash/at91sam9g10ek.h
|
||||
@@ -98,10 +98,10 @@
|
||||
#define AT91C_SPI_PCS_DATAFLASH AT91C_SPI_PCS0_DATAFLASH /* Boot on SPI NCS0 */
|
||||
|
||||
#define IMG_ADDRESS 0x8400 /* Image Address in DataFlash */
|
||||
-#define IMG_SIZE 0x33900 /* Image Size in DataFlash */
|
||||
+#define IMG_SIZE 0x7BC00 /* Image Size in DataFlash */
|
||||
|
||||
#define MACH_TYPE 0x350 /* AT91SAM9261-EK */
|
||||
-#define JUMP_ADDR 0x23F00000 /* Final Jump Address */
|
||||
+#define JUMP_ADDR 0x21F00000 /* Final Jump Address */
|
||||
|
||||
/* ******************************************************************* */
|
||||
/* Application Settings */
|
||||
diff --git a/board/at91sam9g10ek/nandflash/at91sam9g10ek.h b/board/at91sam9g10ek/nandflash/at91sam9g10ek.h
|
||||
index 66c40a3..6c3ecda 100644
|
||||
--- a/board/at91sam9g10ek/nandflash/at91sam9g10ek.h
|
||||
+++ b/board/at91sam9g10ek/nandflash/at91sam9g10ek.h
|
||||
@@ -115,7 +115,7 @@
|
||||
#define IMG_SIZE 0x40000 /* Image Size in NandFlash */
|
||||
|
||||
#define MACH_TYPE 0x350 /* AT91SAM9G10-EK */
|
||||
-#define JUMP_ADDR 0x23F00000 /* Final Jump Address */
|
||||
+#define JUMP_ADDR 0x21F00000 /* Final Jump Address */
|
||||
|
||||
/* ******************************************************************* */
|
||||
/* Application Settings */
|
||||
diff --git a/board/at91sam9g20ek/dataflash/at91sam9g20ek.h b/board/at91sam9g20ek/dataflash/at91sam9g20ek.h
|
||||
index eea0439..7fc70d6 100644
|
||||
--- a/board/at91sam9g20ek/dataflash/at91sam9g20ek.h
|
||||
+++ b/board/at91sam9g20ek/dataflash/at91sam9g20ek.h
|
||||
@@ -75,10 +75,10 @@
|
||||
#define AT91C_SPI_PCS_DATAFLASH AT91C_SPI_PCS1_DATAFLASH /* Boot on SPI NCS1 */
|
||||
|
||||
#define IMG_ADDRESS 0x8400 /* Image Address in DataFlash */
|
||||
-#define IMG_SIZE 0x33900 /* Image Size in DataFlash */
|
||||
+#define IMG_SIZE 0x7BC00 /* Image Size in DataFlash */
|
||||
|
||||
#define MACH_TYPE 0x658 /* AT91SAM9G20-EK */
|
||||
-#define JUMP_ADDR 0x23F00000 /* Final Jump Address */
|
||||
+#define JUMP_ADDR 0x21F00000 /* Final Jump Address */
|
||||
|
||||
/* ******************************************************************* */
|
||||
/* Application Settings */
|
||||
diff --git a/board/at91sam9g20ek/nandflash/at91sam9g20ek.h b/board/at91sam9g20ek/nandflash/at91sam9g20ek.h
|
||||
index 31bd499..e797e4d 100644
|
||||
--- a/board/at91sam9g20ek/nandflash/at91sam9g20ek.h
|
||||
+++ b/board/at91sam9g20ek/nandflash/at91sam9g20ek.h
|
||||
@@ -93,7 +93,7 @@
|
||||
#define IMG_SIZE 0x40000 /* Image Size in NandFlash */
|
||||
|
||||
#define MACH_TYPE 0x658 /* AT91SAM9G20-EK */
|
||||
-#define JUMP_ADDR 0x23F00000 /* Final Jump Address */
|
||||
+#define JUMP_ADDR 0x21F00000 /* Final Jump Address */
|
||||
|
||||
/* ******************************************************************* */
|
||||
/* Application Settings */
|
||||
diff --git a/board/at91sam9m10ekes/dataflash/at91sam9m10ekes.h b/board/at91sam9m10ekes/dataflash/at91sam9m10ekes.h
|
||||
index a60fd41..5587a00 100644
|
||||
--- a/board/at91sam9m10ekes/dataflash/at91sam9m10ekes.h
|
||||
+++ b/board/at91sam9m10ekes/dataflash/at91sam9m10ekes.h
|
||||
@@ -89,7 +89,7 @@
|
||||
#define AT91C_SPI_PCS_DATAFLASH AT91C_SPI_PCS0_DATAFLASH /* Boot on SPI NCS0 */
|
||||
|
||||
#define IMG_ADDRESS 0x8400 /* Image Address in DataFlash */
|
||||
-#define IMG_SIZE 0x33900 /* Image Size in DataFlash */
|
||||
+#define IMG_SIZE 0x7BC00 /* Image Size in DataFlash */
|
||||
|
||||
#define MACH_TYPE 0x9CD /* AT91SAM9M10-EKES */
|
||||
#define JUMP_ADDR 0x73F00000 /* Final Jump Address */
|
||||
diff --git a/board/at91sam9m10g45ek/dataflash/at91sam9m10g45ek.h b/board/at91sam9m10g45ek/dataflash/at91sam9m10g45ek.h
|
||||
index 5c726b5..9090097 100644
|
||||
--- a/board/at91sam9m10g45ek/dataflash/at91sam9m10g45ek.h
|
||||
+++ b/board/at91sam9m10g45ek/dataflash/at91sam9m10g45ek.h
|
||||
@@ -85,7 +85,7 @@
|
||||
#define AT91C_SPI_PCS_DATAFLASH AT91C_SPI_PCS0_DATAFLASH /* Boot on SPI NCS0 */
|
||||
|
||||
#define IMG_ADDRESS 0x8400 /* Image Address in DataFlash */
|
||||
-#define IMG_SIZE 0x33900 /* Image Size in DataFlash */
|
||||
+#define IMG_SIZE 0x7BC00 /* Image Size in DataFlash */
|
||||
|
||||
#define MACH_TYPE 0x726 /* AT91SAM9M10G45-EK */
|
||||
#define JUMP_ADDR 0x73F00000 /* Final Jump Address */
|
||||
diff --git a/board/at91sam9rlek/dataflash/at91sam9rlek.h b/board/at91sam9rlek/dataflash/at91sam9rlek.h
|
||||
index 05c42dc..150f17e 100644
|
||||
--- a/board/at91sam9rlek/dataflash/at91sam9rlek.h
|
||||
+++ b/board/at91sam9rlek/dataflash/at91sam9rlek.h
|
||||
@@ -89,10 +89,10 @@
|
||||
#define AT91C_SPI_PCS_DATAFLASH AT91C_SPI_PCS0_DATAFLASH /* Boot on SPI NCS0 */
|
||||
|
||||
#define IMG_ADDRESS 0x8400 /* Image Address in DataFlash */
|
||||
-#define IMG_SIZE 0x33900 /* Image Size in DataFlash */
|
||||
+#define IMG_SIZE 0x7BC00 /* Image Size in DataFlash */
|
||||
|
||||
#define MACH_TYPE 1326 /* AT91SAM9RL-EK */
|
||||
-#define JUMP_ADDR 0x23F00000 /* Final Jump Address */
|
||||
+#define JUMP_ADDR 0x21F00000 /* Final Jump Address */
|
||||
|
||||
/* ******************************************************************* */
|
||||
/* Application Settings */
|
||||
diff --git a/board/at91sam9rlek/nandflash/at91sam9rlek.h b/board/at91sam9rlek/nandflash/at91sam9rlek.h
|
||||
index 656b4ba..594db8f 100644
|
||||
--- a/board/at91sam9rlek/nandflash/at91sam9rlek.h
|
||||
+++ b/board/at91sam9rlek/nandflash/at91sam9rlek.h
|
||||
@@ -112,7 +112,7 @@
|
||||
#define IMG_SIZE 0x40000 /* Image Size in NandFlash */
|
||||
|
||||
#define MACH_TYPE 1326 /* AT91SAM9RL-EK */
|
||||
-#define JUMP_ADDR 0x23F00000 /* Final Jump Address */
|
||||
+#define JUMP_ADDR 0x21F00000 /* Final Jump Address */
|
||||
|
||||
/* ******************************************************************* */
|
||||
/* Application Settings */
|
||||
diff --git a/board/at91sam9xeek/dataflash/at91sam9xeek.h b/board/at91sam9xeek/dataflash/at91sam9xeek.h
|
||||
index 27d1822..08e515d 100644
|
||||
--- a/board/at91sam9xeek/dataflash/at91sam9xeek.h
|
||||
+++ b/board/at91sam9xeek/dataflash/at91sam9xeek.h
|
||||
@@ -74,10 +74,10 @@
|
||||
#define AT91C_SPI_PCS_DATAFLASH AT91C_SPI_PCS1_DATAFLASH /* Boot on SPI NCS1 */
|
||||
|
||||
#define IMG_ADDRESS 0x8400 /* Image Address in DataFlash */
|
||||
-#define IMG_SIZE 0x33900 /* Image Size in DataFlash */
|
||||
+#define IMG_SIZE 0x7BC00 /* Image Size in DataFlash */
|
||||
|
||||
#define MACH_TYPE 0x44B /* AT91SAM9XE-EK same id as AT91SAM9260-EK*/
|
||||
-#define JUMP_ADDR 0x23F00000 /* Final Jump Address */
|
||||
+#define JUMP_ADDR 0x21F00000 /* Final Jump Address */
|
||||
|
||||
/* ******************************************************************* */
|
||||
/* Application Settings */
|
||||
diff --git a/board/at91sam9xeek/nandflash/at91sam9xeek.h b/board/at91sam9xeek/nandflash/at91sam9xeek.h
|
||||
index 5dbc63e..9fac7cb 100644
|
||||
--- a/board/at91sam9xeek/nandflash/at91sam9xeek.h
|
||||
+++ b/board/at91sam9xeek/nandflash/at91sam9xeek.h
|
||||
@@ -94,7 +94,7 @@
|
||||
#define IMG_SIZE 0x40000 /* Image Size in NandFlash */
|
||||
|
||||
#define MACH_TYPE 0x44B /* AT91SAM9XE-EK same id as AT91SAM9260-EK*/
|
||||
-#define JUMP_ADDR 0x23F00000 /* Final Jump Address */
|
||||
+#define JUMP_ADDR 0x21F00000 /* Final Jump Address */
|
||||
|
||||
/* ******************************************************************* */
|
||||
/* Application Settings */
|
||||
--
|
||||
1.7.9.5
|
||||
|
||||
49
boot/at91bootstrap/Config.in
Normal file
49
boot/at91bootstrap/Config.in
Normal file
@ -0,0 +1,49 @@
|
||||
config BR2_TARGET_AT91BOOTSTRAP
|
||||
bool "AT91 Bootstrap"
|
||||
depends on BR2_arm926t
|
||||
help
|
||||
AT91Bootstrap is a first level bootloader for the Atmel AT91
|
||||
devices. It integrates algorithms for:
|
||||
- Device initialization such as clock configuration, PIO
|
||||
settings...
|
||||
- Peripheral drivers such as PIO, PMC or SDRAMC...
|
||||
- Physical media algorithm such as DataFlash, NandFlash, NOR
|
||||
Flash...
|
||||
|
||||
if BR2_TARGET_AT91BOOTSTRAP
|
||||
|
||||
config BR2_TARGET_AT91BOOTSTRAP_CUSTOM_PATCH_DIR
|
||||
string "custom patch dir"
|
||||
help
|
||||
If your board requires custom patches, add the path to the
|
||||
directory containing the patches here. The patches must be
|
||||
named at91bootstrap-<version>-<something>.patch.
|
||||
|
||||
Most users may leave this empty
|
||||
|
||||
config BR2_TARGET_AT91BOOTSTRAP_BOARD
|
||||
string "Bootstrap board"
|
||||
default ""
|
||||
help
|
||||
This is used to do a make <board>_config
|
||||
|
||||
choice
|
||||
prompt "Boot Memory"
|
||||
default BR2_TARGET_AT91BOOTSTRAP_DATAFLASH
|
||||
help
|
||||
Select Chip for which AT91 bootstrap should be built
|
||||
|
||||
config BR2_TARGET_AT91BOOTSTRAP_DATAFLASH
|
||||
bool "Data Flash"
|
||||
|
||||
config BR2_TARGET_AT91BOOTSTRAP_NANDFLASH
|
||||
bool "NAND Flash"
|
||||
|
||||
endchoice
|
||||
|
||||
config BR2_TARGET_AT91BOOTSTRAP_MEMORY
|
||||
string
|
||||
default "dataflash" if BR2_TARGET_AT91BOOTSTRAP_DATAFLASH
|
||||
default "nandflash" if BR2_TARGET_AT91BOOTSTRAP_NANDFLASH
|
||||
|
||||
endif
|
||||
3
boot/at91bootstrap/at91bootstrap.hash
Normal file
3
boot/at91bootstrap/at91bootstrap.hash
Normal file
@ -0,0 +1,3 @@
|
||||
# locally computed
|
||||
sha256 d66192a274247f4baa39fa932eadf903d7add55641d89d30402f967c4f2282a5 AT91Bootstrap1.16.zip
|
||||
sha256 6a3ac5dfcf19e6bac1b1109d30d72818768a3855e2594b84fe2b012b5fe0e77b include/sdramc.h
|
||||
49
boot/at91bootstrap/at91bootstrap.mk
Normal file
49
boot/at91bootstrap/at91bootstrap.mk
Normal file
@ -0,0 +1,49 @@
|
||||
################################################################################
|
||||
#
|
||||
# at91bootstrap
|
||||
#
|
||||
################################################################################
|
||||
|
||||
AT91BOOTSTRAP_VERSION = 1.16
|
||||
AT91BOOTSTRAP_SITE = ftp://www.at91.com/pub/at91bootstrap
|
||||
AT91BOOTSTRAP_SOURCE = AT91Bootstrap$(AT91BOOTSTRAP_VERSION).zip
|
||||
AT91BOOTSTRAP_LICENSE = BSD-Source-Code
|
||||
AT91BOOTSTRAP_LICENSE_FILES = include/sdramc.h
|
||||
|
||||
AT91BOOTSTRAP_BOARD = $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP_BOARD))
|
||||
AT91BOOTSTRAP_MEMORY = $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP_MEMORY))
|
||||
AT91BOOTSTRAP_MAKE_SUBDIR = board/$(AT91BOOTSTRAP_BOARD)/$(AT91BOOTSTRAP_MEMORY)
|
||||
AT91BOOTSTRAP_BINARY = $(AT91BOOTSTRAP_MAKE_SUBDIR)/$(AT91BOOTSTRAP_MEMORY)_$(AT91BOOTSTRAP_BOARD).bin
|
||||
|
||||
AT91BOOTSTRAP_INSTALL_IMAGES = YES
|
||||
AT91BOOTSTRAP_INSTALL_TARGET = NO
|
||||
|
||||
define AT91BOOTSTRAP_EXTRACT_CMDS
|
||||
$(UNZIP) -d $(BUILD_DIR) $(AT91BOOTSTRAP_DL_DIR)/$(AT91BOOTSTRAP_SOURCE)
|
||||
mv $(BUILD_DIR)/Bootstrap-v$(AT91BOOTSTRAP_VERSION)/* $(@D)
|
||||
rmdir $(BUILD_DIR)/Bootstrap-v$(AT91BOOTSTRAP_VERSION)
|
||||
endef
|
||||
|
||||
ifneq ($(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP_CUSTOM_PATCH_DIR)),)
|
||||
define AT91BOOTSTRAP_APPLY_CUSTOM_PATCHES
|
||||
$(APPLY_PATCHES) $(@D) $(BR2_TARGET_AT91BOOTSTRAP_CUSTOM_PATCH_DIR) \*.patch
|
||||
endef
|
||||
|
||||
AT91BOOTSTRAP_POST_PATCH_HOOKS += AT91BOOTSTRAP_APPLY_CUSTOM_PATCHES
|
||||
endif
|
||||
|
||||
define AT91BOOTSTRAP_BUILD_CMDS
|
||||
$(MAKE1) CROSS_COMPILE=$(TARGET_CROSS) -C $(@D)/$(AT91BOOTSTRAP_MAKE_SUBDIR)
|
||||
endef
|
||||
|
||||
define AT91BOOTSTRAP_INSTALL_IMAGES_CMDS
|
||||
cp $(@D)/$(AT91BOOTSTRAP_BINARY) $(BINARIES_DIR)
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
|
||||
ifeq ($(BR2_TARGET_AT91BOOTSTRAP)$(BR_BUILDING),yy)
|
||||
ifeq ($(AT91BOOTSTRAP_BOARD),)
|
||||
$(error No AT91Bootstrap board name set. Check your BR2_TARGET_AT91BOOTSTRAP_BOARD setting)
|
||||
endif
|
||||
endif
|
||||
117
boot/at91bootstrap3/Config.in
Normal file
117
boot/at91bootstrap3/Config.in
Normal file
@ -0,0 +1,117 @@
|
||||
config BR2_TARGET_AT91BOOTSTRAP3
|
||||
bool "AT91 Bootstrap 3+"
|
||||
depends on BR2_arm926t || BR2_cortex_a5 || BR2_cortex_a7
|
||||
help
|
||||
AT91Bootstrap is a first level bootloader for the Atmel AT91
|
||||
devices. It integrates algorithms for:
|
||||
- Device initialization such as clock configuration, PIO
|
||||
settings...
|
||||
- Peripheral drivers such as PIO, PMC or SDRAMC...
|
||||
- Physical media algorithm such as DataFlash, NandFlash, NOR
|
||||
Flash...
|
||||
|
||||
https://www.at91.com/linux4sam/bin/view/Linux4SAM/AT91Bootstrap
|
||||
|
||||
if BR2_TARGET_AT91BOOTSTRAP3
|
||||
|
||||
choice
|
||||
|
||||
prompt "AT91 Bootstrap 3+ version"
|
||||
|
||||
config BR2_TARGET_AT91BOOTSTRAP3_LATEST_VERSION
|
||||
bool "4.0.0"
|
||||
|
||||
config BR2_TARGET_AT91BOOTSTRAP3_LATEST_VERSION_3X
|
||||
bool "3.10.3"
|
||||
|
||||
config BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT
|
||||
bool "Custom Git repository"
|
||||
help
|
||||
This option allows Buildroot to get the AT91 Bootstrap 3
|
||||
source code from a Git repository.
|
||||
|
||||
config BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_SVN
|
||||
bool "Custom SVN repository"
|
||||
help
|
||||
This option allows Buildroot to get the AT91 Bootstrap 3
|
||||
source code from a Subversion repository
|
||||
|
||||
config BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL
|
||||
bool "Custom tarball"
|
||||
|
||||
endchoice
|
||||
|
||||
config BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL_LOCATION
|
||||
string "URL of custom AT91Bootstrap tarball"
|
||||
depends on BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL
|
||||
|
||||
if BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT || BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_SVN
|
||||
|
||||
config BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_URL
|
||||
string "URL of custom repository"
|
||||
|
||||
config BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_VERSION
|
||||
string "Custom repository version"
|
||||
help
|
||||
Revision to use in the typical format used by Git or SVN
|
||||
E.G. a sha id, a tag, branch, ..
|
||||
|
||||
endif
|
||||
|
||||
config BR2_TARGET_AT91BOOTSTRAP3_VERSION
|
||||
string
|
||||
default "v4.0.0" if BR2_TARGET_AT91BOOTSTRAP3_LATEST_VERSION
|
||||
default "v3.10.3" if BR2_TARGET_AT91BOOTSTRAP3_LATEST_VERSION_3X
|
||||
default BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_VERSION \
|
||||
if BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT || BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_SVN
|
||||
default "custom" if BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL
|
||||
|
||||
config BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_PATCH_DIR
|
||||
string "custom patch dir"
|
||||
help
|
||||
If your board requires custom patches, add the path to the
|
||||
directory containing the patches here. The patches must be
|
||||
named at91bootstrap3-<something>.patch.
|
||||
|
||||
Most users may leave this empty
|
||||
|
||||
#
|
||||
# Configuration selection
|
||||
#
|
||||
|
||||
choice
|
||||
prompt "AT91 Bootstrap 3 configuration"
|
||||
default BR2_TARGET_AT91BOOTSTRAP3_USE_DEFCONFIG
|
||||
|
||||
config BR2_TARGET_AT91BOOTSTRAP3_USE_DEFCONFIG
|
||||
bool "Using a defconfig"
|
||||
|
||||
config BR2_TARGET_AT91BOOTSTRAP3_USE_CUSTOM_CONFIG
|
||||
bool "Using a custom config file"
|
||||
|
||||
endchoice
|
||||
|
||||
config BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG
|
||||
string "Defconfig name"
|
||||
depends on BR2_TARGET_AT91BOOTSTRAP3_USE_DEFCONFIG
|
||||
help
|
||||
Name of the at91bootstrap3 defconfig file to use, without the
|
||||
trailing _defconfig. The defconfig is located at
|
||||
board/<processor>/<board>_defconfig in the at91bootstrap3
|
||||
tree.
|
||||
|
||||
config BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE
|
||||
string "Configuration file path"
|
||||
depends on BR2_TARGET_AT91BOOTSTRAP3_USE_CUSTOM_CONFIG
|
||||
help
|
||||
Path to the at91bootstrap3 configuration file
|
||||
|
||||
config BR2_TARGET_AT91BOOTSTRAP3_NEEDS_PYTHON3
|
||||
bool "needs host-python3"
|
||||
help
|
||||
Enable this option if the at91bootstrap build process needs
|
||||
Python 3.x to be available on the host. This is needed in
|
||||
some at91bootstrap configurations to use NAND/PMECC Python
|
||||
scripts.
|
||||
|
||||
endif # BR2_TARGET_AT91BOOTSTRAP3
|
||||
4
boot/at91bootstrap3/at91bootstrap3.hash
Normal file
4
boot/at91bootstrap3/at91bootstrap3.hash
Normal file
@ -0,0 +1,4 @@
|
||||
# Locally calculated
|
||||
sha256 b6ae5bcaacc5a949f400182e036ae053049638444a3ba8b1dd154ec5f7898d8e at91bootstrap3-v3.10.3.tar.gz
|
||||
sha256 08c5b95df28be7f2e0439fb2b77fe27524f97c499850641e4540c07ea0b2c25d at91bootstrap3-v4.0.0.tar.gz
|
||||
sha256 5a3809b1c2ba13b7242572322951311c584419f1f8516f665d6c06f0668d78de LICENSES/MIT.txt
|
||||
109
boot/at91bootstrap3/at91bootstrap3.mk
Normal file
109
boot/at91bootstrap3/at91bootstrap3.mk
Normal file
@ -0,0 +1,109 @@
|
||||
################################################################################
|
||||
#
|
||||
# at91bootstrap3
|
||||
#
|
||||
################################################################################
|
||||
|
||||
AT91BOOTSTRAP3_VERSION = $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_VERSION))
|
||||
|
||||
ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL),y)
|
||||
AT91BOOTSTRAP3_TARBALL = $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL_LOCATION))
|
||||
AT91BOOTSTRAP3_SITE = $(patsubst %/,%,$(dir $(AT91BOOTSTRAP3_TARBALL)))
|
||||
AT91BOOTSTRAP3_SOURCE = $(notdir $(AT91BOOTSTRAP3_TARBALL))
|
||||
BR_NO_CHECK_HASH_FOR += $(AT91BOOTSTRAP3_SOURCE)
|
||||
else ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT),y)
|
||||
AT91BOOTSTRAP3_SITE = $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_URL))
|
||||
AT91BOOTSTRAP3_SITE_METHOD = git
|
||||
BR_NO_CHECK_HASH_FOR += $(AT91BOOTSTRAP3_SOURCE)
|
||||
else ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_SVN),y)
|
||||
AT91BOOTSTRAP3_SITE = $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_URL))
|
||||
AT91BOOTSTRAP3_SITE_METHOD = svn
|
||||
BR_NO_CHECK_HASH_FOR += $(AT91BOOTSTRAP3_SOURCE)
|
||||
else
|
||||
AT91BOOTSTRAP3_SITE = $(call github,linux4sam,at91bootstrap,$(AT91BOOTSTRAP3_VERSION))
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_LATEST_VERSION),y)
|
||||
AT91BOOTSTRAP3_LICENSE = MIT
|
||||
AT91BOOTSTRAP3_LICENSE_FILES = LICENSES/MIT.txt
|
||||
else ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_LATEST_VERSION_3X),y)
|
||||
AT91BOOTSTRAP3_LICENSE = Atmel License
|
||||
endif
|
||||
|
||||
AT91BOOTSTRAP3_CPE_ID_VENDOR = linux4sam
|
||||
AT91BOOTSTRAP3_CPE_ID_PRODUCT = at91bootstrap
|
||||
|
||||
AT91BOOTSTRAP3_INSTALL_IMAGES = YES
|
||||
AT91BOOTSTRAP3_INSTALL_TARGET = NO
|
||||
|
||||
ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_NEEDS_PYTHON3),y)
|
||||
AT91BOOTSTRAP3_DEPENDENCIES += host-python3
|
||||
endif
|
||||
|
||||
AT91BOOTSTRAP3_CUSTOM_PATCH_DIR = \
|
||||
$(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_PATCH_DIR))
|
||||
|
||||
AT91BOOTSTRAP3_MAKE_OPTS = CROSS_COMPILE=$(TARGET_CROSS) DESTDIR=$(BINARIES_DIR)
|
||||
|
||||
ifneq ($(AT91BOOTSTRAP3_CUSTOM_PATCH_DIR),)
|
||||
define AT91BOOTSTRAP3_APPLY_CUSTOM_PATCHES
|
||||
$(APPLY_PATCHES) $(@D) $(AT91BOOTSTRAP3_CUSTOM_PATCH_DIR) \*.patch
|
||||
endef
|
||||
|
||||
AT91BOOTSTRAP3_POST_PATCH_HOOKS += AT91BOOTSTRAP3_APPLY_CUSTOM_PATCHES
|
||||
endif
|
||||
|
||||
define AT91BOOTSTRAP3_BUILD_CMDS
|
||||
$(MAKE) $(AT91BOOTSTRAP3_MAKE_OPTS) -C $(@D)
|
||||
endef
|
||||
|
||||
define AT91BOOTSTRAP3_INSTALL_IMAGES_CMDS
|
||||
cp $(wildcard $(@D)/build/binaries/*.bin $(@D)/binaries/*.bin) $(BINARIES_DIR)
|
||||
endef
|
||||
|
||||
ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_USE_DEFCONFIG),y)
|
||||
AT91BOOTSTRAP3_KCONFIG_DEFCONFIG = $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG))_defconfig
|
||||
else ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_USE_CUSTOM_CONFIG),y)
|
||||
AT91BOOTSTRAP3_KCONFIG_FILE = $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE))
|
||||
endif
|
||||
|
||||
AT91BOOTSTRAP3_KCONFIG_EDITORS = menuconfig xconfig gconfig
|
||||
AT91BOOTSTRAP3_KCONFIG_OPTS = $(AT91BOOTSTRAP3_MAKE_OPTS)
|
||||
|
||||
# Checks to give errors that the user can understand
|
||||
# Must be before we call to kconfig-package
|
||||
ifeq ($(BR_BUILDING),y)
|
||||
|
||||
ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_USE_DEFCONFIG),y)
|
||||
# We must use the user-supplied kconfig value, because
|
||||
# AT91BOOTSTRAP3_KCONFIG_DEFCONFIG will at least contain
|
||||
# the trailing _defconfig
|
||||
ifeq ($(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG)),)
|
||||
$(error No at91bootstrap3 defconfig name specified, check your BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG setting)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_USE_CUSTOM_CONFIG),y)
|
||||
ifeq ($(AT91BOOTSTRAP3_KCONFIG_FILE),)
|
||||
$(error No at91bootstrap3 configuration file specified, check your BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE setting)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT),y)
|
||||
ifeq ($(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_URL)),)
|
||||
$(error No custom at91bootstrap3 repository URL specified. Check your BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_URL setting)
|
||||
endif
|
||||
ifeq ($(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_VERSION)),)
|
||||
$(error No custom at91bootstrap3 repository version specified. Check your BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_VERSION setting)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL),y)
|
||||
ifeq ($(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL_LOCATION)),)
|
||||
$(error No custom AT91Bootstrap3 tarball specified. Check your BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL_LOCATION setting)
|
||||
endif # qstrip BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL_LOCATION
|
||||
endif # BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL
|
||||
|
||||
endif # BR_BUILDING
|
||||
|
||||
$(eval $(kconfig-package))
|
||||
22
boot/at91dataflashboot/0001-do-not-install.patch
Normal file
22
boot/at91dataflashboot/0001-do-not-install.patch
Normal file
@ -0,0 +1,22 @@
|
||||
Disable the automatic installation of at91dataflashboot since it tries
|
||||
to install things to /tftpboot, which is not possible when not
|
||||
building as root.
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
---
|
||||
Makefile | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: at91dataflashboot-1.05/Makefile
|
||||
===================================================================
|
||||
--- at91dataflashboot-1.05.orig/Makefile
|
||||
+++ at91dataflashboot-1.05/Makefile
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
I=config.h com.h dataflash.h embedded_services.h main.h stdio.h include/AT91RM9200.h include/lib_AT91RM9200.h
|
||||
|
||||
-all: clean $(BINNAME) $(LSSNAME) install
|
||||
+all: clean $(BINNAME) $(LSSNAME)
|
||||
$(SIZE) $(OUTNAME)
|
||||
|
||||
# C objects here
|
||||
43
boot/at91dataflashboot/0002-eabi-fixes.patch
Normal file
43
boot/at91dataflashboot/0002-eabi-fixes.patch
Normal file
@ -0,0 +1,43 @@
|
||||
Get at91dataflashboot to build with EABI toolchains, by providing the
|
||||
__aeabi_uidiv and __aeabi_uidivmod symbols. The code is based on
|
||||
U-Boot's code.
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
---
|
||||
_udivsi3.S | 14 ++++++++++++++
|
||||
1 file changed, 14 insertions(+)
|
||||
|
||||
Index: DataflashBoot-1.05/_udivsi3.S
|
||||
===================================================================
|
||||
--- DataflashBoot-1.05.orig/_udivsi3.S
|
||||
+++ DataflashBoot-1.05/_udivsi3.S
|
||||
@@ -12,8 +12,11 @@
|
||||
.text
|
||||
.globl __udivsi3
|
||||
.type __udivsi3 ,function
|
||||
+ .globl __aeabi_uidiv
|
||||
+ .type __aeabi_uidiv ,function
|
||||
.align 0
|
||||
__udivsi3 :
|
||||
+ __aeabi_uidiv:
|
||||
cmp divisor, #0
|
||||
beq Ldiv0
|
||||
mov curbit, #1
|
||||
@@ -68,6 +71,17 @@
|
||||
mov r0, #0 @ about as wrong as it could be
|
||||
ldmia sp!, {pc}
|
||||
.size __udivsi3 , . - __udivsi3
|
||||
+
|
||||
+.globl __aeabi_uidivmod
|
||||
+__aeabi_uidivmod:
|
||||
+
|
||||
+ stmfd sp!, {r0, r1, ip, lr}
|
||||
+ bl __aeabi_uidiv
|
||||
+ ldmfd sp!, {r1, r2, ip, lr}
|
||||
+ mul r3, r0, r2
|
||||
+ sub r1, r1, r3
|
||||
+ mov pc, lr
|
||||
+
|
||||
/* # 235 "libgcc1.S" */
|
||||
/* # 320 "libgcc1.S" */
|
||||
/* # 421 "libgcc1.S" */
|
||||
3
boot/at91dataflashboot/Config.in
Normal file
3
boot/at91dataflashboot/Config.in
Normal file
@ -0,0 +1,3 @@
|
||||
config BR2_TARGET_AT91DATAFLASHBOOT
|
||||
bool "AT91 DataFlashBoot"
|
||||
depends on BR2_arm && BR2_arm926t
|
||||
2
boot/at91dataflashboot/at91dataflashboot.hash
Normal file
2
boot/at91dataflashboot/at91dataflashboot.hash
Normal file
@ -0,0 +1,2 @@
|
||||
# locally computed
|
||||
sha256 2cfeb6a9236e1a743c8010f05e504dbc92169ef42d9a6cf7948954a577bfc386 DataflashBoot-1.05.tar.bz2
|
||||
22
boot/at91dataflashboot/at91dataflashboot.mk
Normal file
22
boot/at91dataflashboot/at91dataflashboot.mk
Normal file
@ -0,0 +1,22 @@
|
||||
################################################################################
|
||||
#
|
||||
# at91dataflashboot
|
||||
#
|
||||
################################################################################
|
||||
|
||||
AT91DATAFLASHBOOT_VERSION = 1.05
|
||||
AT91DATAFLASHBOOT_SOURCE = DataflashBoot-$(AT91DATAFLASHBOOT_VERSION).tar.bz2
|
||||
AT91DATAFLASHBOOT_SITE = ftp://www.at91.com/pub/buildroot
|
||||
|
||||
AT91DATAFLASHBOOT_INSTALL_TARGET = NO
|
||||
AT91DATAFLASHBOOT_INSTALL_IMAGES = YES
|
||||
|
||||
define AT91DATAFLASHBOOT_BUILD_CMDS
|
||||
make -C $(@D) CROSS_COMPILE=$(TARGET_CROSS)
|
||||
endef
|
||||
|
||||
define AT91DATAFLASHBOOT_INSTALL_IMAGES_CMDS
|
||||
cp $(@D)/DataflashBoot-$(AT91DATAFLASHBOOT_VERSION).bin $(BINARIES_DIR)
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
85
boot/barebox/Config.in
Normal file
85
boot/barebox/Config.in
Normal file
@ -0,0 +1,85 @@
|
||||
config BR2_TARGET_BAREBOX
|
||||
bool "Barebox"
|
||||
help
|
||||
The Barebox bootloader, formerly known as U-Boot v2.
|
||||
|
||||
http://www.barebox.org
|
||||
|
||||
if BR2_TARGET_BAREBOX
|
||||
choice
|
||||
prompt "version"
|
||||
help
|
||||
Select the specific Barebox version you want to use
|
||||
|
||||
config BR2_TARGET_BAREBOX_LATEST_VERSION
|
||||
bool "2022.04.0"
|
||||
|
||||
config BR2_TARGET_BAREBOX_CUSTOM_VERSION
|
||||
bool "Custom version"
|
||||
help
|
||||
This option allows to use a specific official versions
|
||||
|
||||
config BR2_TARGET_BAREBOX_CUSTOM_TARBALL
|
||||
bool "Custom tarball"
|
||||
|
||||
config BR2_TARGET_BAREBOX_CUSTOM_GIT
|
||||
bool "Custom Git repository"
|
||||
|
||||
endchoice
|
||||
|
||||
config BR2_TARGET_BAREBOX_CUSTOM_VERSION_VALUE
|
||||
string "Barebox version"
|
||||
depends on BR2_TARGET_BAREBOX_CUSTOM_VERSION
|
||||
|
||||
if BR2_TARGET_BAREBOX_CUSTOM_TARBALL
|
||||
|
||||
config BR2_TARGET_BAREBOX_CUSTOM_TARBALL_LOCATION
|
||||
string "URL of custom Barebox tarball"
|
||||
|
||||
endif
|
||||
|
||||
config BR2_TARGET_BAREBOX_VERSION
|
||||
string
|
||||
default "2022.04.0" if BR2_TARGET_BAREBOX_LATEST_VERSION
|
||||
default BR2_TARGET_BAREBOX_CUSTOM_VERSION_VALUE if BR2_TARGET_BAREBOX_CUSTOM_VERSION
|
||||
default "custom" if BR2_TARGET_BAREBOX_CUSTOM_TARBALL
|
||||
default BR2_TARGET_BAREBOX_CUSTOM_GIT_VERSION if BR2_TARGET_BAREBOX_CUSTOM_GIT
|
||||
|
||||
config BR2_TARGET_BAREBOX_CUSTOM_PATCH_DIR
|
||||
string "custom patch dir"
|
||||
help
|
||||
If your board requires custom patches, add the path to the
|
||||
directory containing the patches here. The patches must be
|
||||
named barebox-<version>-<something>.patch.
|
||||
|
||||
Most users may leave this empty
|
||||
|
||||
if BR2_TARGET_BAREBOX_CUSTOM_GIT
|
||||
|
||||
config BR2_TARGET_BAREBOX_CUSTOM_GIT_REPO_URL
|
||||
string "URL of custom Git repository"
|
||||
|
||||
config BR2_TARGET_BAREBOX_CUSTOM_GIT_VERSION
|
||||
string "Custom Git version"
|
||||
|
||||
endif
|
||||
|
||||
source boot/barebox/barebox/Config.in
|
||||
|
||||
menuconfig BR2_TARGET_BAREBOX_AUX
|
||||
bool "Build barebox with an auxiliary config"
|
||||
help
|
||||
Build barebox with an auxiliary configuration.
|
||||
|
||||
Useful for building an SPL (Secondary Program Loader) in
|
||||
addition to the traditional TPL (Tertiary Program Loader),
|
||||
such as the X-Loader or MLO for Texas Instruments
|
||||
processors.
|
||||
|
||||
if BR2_TARGET_BAREBOX_AUX
|
||||
|
||||
source boot/barebox/barebox-aux/Config.in
|
||||
|
||||
endif
|
||||
|
||||
endif
|
||||
75
boot/barebox/barebox-aux/Config.in
Normal file
75
boot/barebox/barebox-aux/Config.in
Normal file
@ -0,0 +1,75 @@
|
||||
choice
|
||||
prompt "Barebox configuration"
|
||||
default BR2_TARGET_BAREBOX_AUX_USE_DEFCONFIG
|
||||
|
||||
config BR2_TARGET_BAREBOX_AUX_USE_DEFCONFIG
|
||||
bool "Using a defconfig"
|
||||
|
||||
config BR2_TARGET_BAREBOX_AUX_USE_CUSTOM_CONFIG
|
||||
bool "Using a custom config file"
|
||||
|
||||
endchoice
|
||||
|
||||
config BR2_TARGET_BAREBOX_AUX_BOARD_DEFCONFIG
|
||||
string "board defconfig"
|
||||
depends on BR2_TARGET_BAREBOX_AUX_USE_DEFCONFIG
|
||||
help
|
||||
Name of the board for which Barebox should be built, without
|
||||
the _defconfig suffix.
|
||||
|
||||
config BR2_TARGET_BAREBOX_AUX_CUSTOM_CONFIG_FILE
|
||||
string "Configuration file path"
|
||||
depends on BR2_TARGET_BAREBOX_AUX_USE_CUSTOM_CONFIG
|
||||
help
|
||||
Path to the barebox configuration file
|
||||
|
||||
config BR2_TARGET_BAREBOX_AUX_CONFIG_FRAGMENT_FILES
|
||||
string "Additional configuration fragment files"
|
||||
help
|
||||
A space-separated list of configuration fragment files,
|
||||
that will be merged to the main Barebox configuration file.
|
||||
|
||||
config BR2_TARGET_BAREBOX_AUX_IMAGE_FILE
|
||||
string "Image file names"
|
||||
help
|
||||
Space-separated list of barebox images which will be copied to
|
||||
the images directory.
|
||||
|
||||
If left empty, defaults to:
|
||||
- barebox.bin for barebox versions older than 2012.10.
|
||||
- barebox-flash-image for later versions.
|
||||
|
||||
config BR2_TARGET_BAREBOX_AUX_CUSTOM_ENV
|
||||
bool "Generate an environment image"
|
||||
help
|
||||
Generate a custom environment image. This environment will
|
||||
contain the variables and scripts to be used at boot by
|
||||
barebox.
|
||||
|
||||
config BR2_TARGET_BAREBOX_AUX_CUSTOM_ENV_PATH
|
||||
string "Environment path"
|
||||
depends on BR2_TARGET_BAREBOX_AUX_CUSTOM_ENV
|
||||
help
|
||||
Path to the directory containing the custom barebox
|
||||
environment. Depending on your setup, it will probably be
|
||||
based on either the content of the defaultenv or
|
||||
defaultenv-2 directories in the barebox source code, plus
|
||||
the additions needed. The output will be an image in the
|
||||
barebox devfs format, stored in the images directory, with
|
||||
the same name as the directory name given here.
|
||||
|
||||
config BR2_TARGET_BAREBOX_AUX_CUSTOM_EMBEDDED_ENV_PATH
|
||||
string "Embedded environment path"
|
||||
help
|
||||
If this option is not empty, it is the path to a custom
|
||||
embedded barebox environment. This image will be used when
|
||||
the environment found in the environment sector is
|
||||
invalid. This option sets the barebox Kconfig option
|
||||
CONFIG_DEFAULT_ENVIRONMENT_PATH to the specified path. This
|
||||
way it is possible to use Buildroot variables like
|
||||
TOPDIR etc. to refer to the custom environment.
|
||||
|
||||
Depending on your setup, the custom embedded environment
|
||||
will probably be based on either the content of the
|
||||
defaultenv or defaultenv-2 directories in the barebox source
|
||||
code.
|
||||
1
boot/barebox/barebox-aux/barebox-aux.hash
Symbolic link
1
boot/barebox/barebox-aux/barebox-aux.hash
Symbolic link
@ -0,0 +1 @@
|
||||
../barebox.hash
|
||||
8
boot/barebox/barebox-aux/barebox-aux.mk
Normal file
8
boot/barebox/barebox-aux/barebox-aux.mk
Normal file
@ -0,0 +1,8 @@
|
||||
################################################################################
|
||||
#
|
||||
# barebox-aux
|
||||
#
|
||||
################################################################################
|
||||
|
||||
# Instantiate the auxiliary barebox package
|
||||
$(eval $(barebox-package))
|
||||
8
boot/barebox/barebox.hash
Normal file
8
boot/barebox/barebox.hash
Normal file
@ -0,0 +1,8 @@
|
||||
# From https://www.barebox.org/download/barebox-2021.12.0.tar.bz2.md5
|
||||
md5 e4970687cf7943eadf71b1ae6d344ff7 barebox-2022.04.0.tar.bz2
|
||||
|
||||
# Locally calculated
|
||||
sha256 f751b506deb0a5d82682a85cf65e329dd562e48ea057533dc5c8876120a09ebc barebox-2022.04.0.tar.bz2
|
||||
|
||||
# License files, locally computed
|
||||
sha256 ab1122aa9f9073ad1ec824edcd970b16a6a7881a34a18fd56c080debb2dca5d4 COPYING
|
||||
178
boot/barebox/barebox.mk
Normal file
178
boot/barebox/barebox.mk
Normal file
@ -0,0 +1,178 @@
|
||||
################################################################################
|
||||
#
|
||||
# barebox
|
||||
#
|
||||
################################################################################
|
||||
|
||||
################################################################################
|
||||
# inner-barebox-package -- generates the KConfig logic and make targets needed
|
||||
# to support a barebox package. All barebox packages are built from the same
|
||||
# source (origin, version and patches). The remainder of the package
|
||||
# configuration is unique to each barebox package.
|
||||
#
|
||||
# argument 1 is the uppercase package name (used for variable name-space)
|
||||
################################################################################
|
||||
|
||||
define inner-barebox-package
|
||||
|
||||
$(1)_VERSION = $$(call qstrip,$$(BR2_TARGET_BAREBOX_VERSION))
|
||||
|
||||
ifeq ($$(BR2_TARGET_BAREBOX_CUSTOM_TARBALL),y)
|
||||
# Handle custom Barebox tarballs as specified by the configuration
|
||||
$(1)_TARBALL = $$(call qstrip,$$(BR2_TARGET_BAREBOX_CUSTOM_TARBALL_LOCATION))
|
||||
$(1)_SITE = $$(patsubst %/,%,$$(dir $$($(1)_TARBALL)))
|
||||
$(1)_SOURCE = $$(notdir $$($(1)_TARBALL))
|
||||
else ifeq ($$(BR2_TARGET_BAREBOX_CUSTOM_GIT),y)
|
||||
$(1)_SITE = $$(call qstrip,$$(BR2_TARGET_BAREBOX_CUSTOM_GIT_REPO_URL))
|
||||
$(1)_SITE_METHOD = git
|
||||
# Override the default value of _SOURCE to 'barebox-*' so that it is not
|
||||
# downloaded a second time for barebox-aux; also alows avoiding the hash
|
||||
# check:
|
||||
$(1)_SOURCE = barebox-$$($(1)_VERSION)$$(BR_FMT_VERSION_git).tar.gz
|
||||
else
|
||||
# Handle stable official Barebox versions
|
||||
$(1)_SOURCE = barebox-$$($(1)_VERSION).tar.bz2
|
||||
$(1)_SITE = https://www.barebox.org/download
|
||||
endif
|
||||
|
||||
$(1)_DL_SUBDIR = barebox
|
||||
|
||||
$(1)_DEPENDENCIES = host-lzop
|
||||
$(1)_LICENSE = GPL-2.0 with exceptions
|
||||
ifeq ($(BR2_TARGET_BAREBOX_LATEST_VERSION),y)
|
||||
$(1)_LICENSE_FILES = COPYING
|
||||
endif
|
||||
|
||||
$(1)_CUSTOM_EMBEDDED_ENV_PATH = $$(call qstrip,$$(BR2_TARGET_$(1)_CUSTOM_EMBEDDED_ENV_PATH))
|
||||
|
||||
ifneq ($$(call qstrip,$$(BR2_TARGET_BAREBOX_CUSTOM_PATCH_DIR)),)
|
||||
define $(1)_APPLY_CUSTOM_PATCHES
|
||||
$$(APPLY_PATCHES) $$(@D) \
|
||||
$$(BR2_TARGET_BAREBOX_CUSTOM_PATCH_DIR) \*.patch
|
||||
endef
|
||||
|
||||
$(1)_POST_PATCH_HOOKS += $(1)_APPLY_CUSTOM_PATCHES
|
||||
endif
|
||||
|
||||
$(1)_INSTALL_IMAGES = YES
|
||||
ifneq ($$(BR2_TARGET_$(1)_BAREBOXENV),y)
|
||||
$(1)_INSTALL_TARGET = NO
|
||||
endif
|
||||
|
||||
ifeq ($$(NORMALIZED_ARCH),i386)
|
||||
$(1)_ARCH = x86
|
||||
else ifeq ($$(NORMALIZED_ARCH),x86_64)
|
||||
$(1)_ARCH = x86
|
||||
else ifeq ($$(NORMALIZED_ARCH),powerpc)
|
||||
$(1)_ARCH = ppc
|
||||
else ifeq ($$(NORMALIZED_ARCH),arm64)
|
||||
$(1)_ARCH = arm
|
||||
else
|
||||
$(1)_ARCH = $$(NORMALIZED_ARCH)
|
||||
endif
|
||||
|
||||
$(1)_MAKE_FLAGS = ARCH=$$($(1)_ARCH) CROSS_COMPILE="$$(TARGET_CROSS)"
|
||||
$(1)_MAKE_ENV = $$(TARGET_MAKE_ENV)
|
||||
|
||||
ifeq ($$(BR2_TARGET_$(1)_USE_DEFCONFIG),y)
|
||||
$(1)_KCONFIG_DEFCONFIG = $$(call qstrip,$$(BR2_TARGET_$(1)_BOARD_DEFCONFIG))_defconfig
|
||||
else ifeq ($$(BR2_TARGET_$(1)_USE_CUSTOM_CONFIG),y)
|
||||
$(1)_KCONFIG_FILE = $$(call qstrip,$$(BR2_TARGET_$(1)_CUSTOM_CONFIG_FILE))
|
||||
endif
|
||||
|
||||
$(1)_KCONFIG_FRAGMENT_FILES = $$(call qstrip,$$(BR2_TARGET_$(1)_CONFIG_FRAGMENT_FILES))
|
||||
$(1)_KCONFIG_EDITORS = menuconfig xconfig gconfig nconfig
|
||||
$(1)_KCONFIG_OPTS = $$($(1)_MAKE_FLAGS)
|
||||
|
||||
$(1)_KCONFIG_DEPENDENCIES = \
|
||||
$(BR2_BISON_HOST_DEPENDENCY) \
|
||||
$(BR2_FLEX_HOST_DEPENDENCY)
|
||||
|
||||
ifeq ($$(BR2_TARGET_$(1)_CUSTOM_ENV),y)
|
||||
$(1)_ENV_NAME = $$(notdir $$(call qstrip,\
|
||||
$$(BR2_TARGET_$(1)_CUSTOM_ENV_PATH)))
|
||||
define $(1)_BUILD_CUSTOM_ENV
|
||||
$$(@D)/scripts/bareboxenv -s \
|
||||
$$(call qstrip, $$(BR2_TARGET_$(1)_CUSTOM_ENV_PATH)) \
|
||||
$$(@D)/$$($(1)_ENV_NAME)
|
||||
endef
|
||||
define $(1)_INSTALL_CUSTOM_ENV
|
||||
cp $$(@D)/$$($(1)_ENV_NAME) $$(BINARIES_DIR)
|
||||
endef
|
||||
endif
|
||||
|
||||
ifneq ($$($(1)_CUSTOM_EMBEDDED_ENV_PATH),)
|
||||
define $(1)_KCONFIG_FIXUP_CUSTOM_EMBEDDED_ENV_PATH
|
||||
$$(call KCONFIG_ENABLE_OPT,CONFIG_DEFAULT_ENVIRONMENT)
|
||||
$$(call KCONFIG_SET_OPT,CONFIG_DEFAULT_ENVIRONMENT_PATH,"$$($(1)_CUSTOM_EMBEDDED_ENV_PATH)")
|
||||
endef
|
||||
endif
|
||||
|
||||
define $(1)_KCONFIG_FIXUP_BAREBOXENV
|
||||
$$(if $$(BR2_TARGET_$(1)_BAREBOXENV),\
|
||||
$$(call KCONFIG_ENABLE_OPT,CONFIG_BAREBOXENV_TARGET),\
|
||||
$$(call KCONFIG_DISABLE_OPT,CONFIG_BAREBOXENV_TARGET))
|
||||
endef
|
||||
|
||||
define $(1)_KCONFIG_FIXUP_CMDS
|
||||
$$($(1)_KCONFIG_FIXUP_CUSTOM_EMBEDDED_ENV_PATH)
|
||||
$$($(1)_KCONFIG_FIXUP_BAREBOXENV)
|
||||
endef
|
||||
|
||||
define $(1)_BUILD_CMDS
|
||||
$$($(1)_BUILD_BAREBOXENV_CMDS)
|
||||
$$(TARGET_MAKE_ENV) $$(MAKE) $$($(1)_MAKE_FLAGS) -C $$(@D)
|
||||
$$($(1)_BUILD_CUSTOM_ENV)
|
||||
endef
|
||||
|
||||
$(1)_IMAGE_FILES = $$(call qstrip,$$(BR2_TARGET_$(1)_IMAGE_FILE))
|
||||
|
||||
define $(1)_INSTALL_IMAGES_CMDS
|
||||
if test -n "$$($(1)_IMAGE_FILES)"; then \
|
||||
cp -L $$(foreach image,$$($(1)_IMAGE_FILES),$$(@D)/$$(image)) $$(BINARIES_DIR) ; \
|
||||
elif test -h $$(@D)/barebox-flash-image ; then \
|
||||
cp -L $$(@D)/barebox-flash-image $$(BINARIES_DIR)/barebox.bin ; \
|
||||
else \
|
||||
cp $$(@D)/barebox.bin $$(BINARIES_DIR);\
|
||||
fi
|
||||
$$($(1)_INSTALL_CUSTOM_ENV)
|
||||
endef
|
||||
|
||||
# Starting with barebox v2020.09.0, the kconfig used calls the
|
||||
# cross-compiler to check its capabilities. So we need the
|
||||
# toolchain before we can call the configurators.
|
||||
$(1)_KCONFIG_DEPENDENCIES += toolchain
|
||||
|
||||
ifeq ($$(BR2_TARGET_$(1)_BAREBOXENV),y)
|
||||
define $(1)_INSTALL_TARGET_CMDS
|
||||
cp $$(@D)/scripts/bareboxenv-target $$(TARGET_DIR)/usr/bin/bareboxenv
|
||||
endef
|
||||
endif
|
||||
|
||||
# Checks to give errors that the user can understand
|
||||
# Must be before we call to kconfig-package
|
||||
ifeq ($$(BR2_TARGET_$(1))$$(BR_BUILDING),yy)
|
||||
# We must use the user-supplied kconfig value, because
|
||||
# $(1)_KCONFIG_DEFCONFIG will at least contain the
|
||||
# trailing _defconfig
|
||||
ifeq ($$(or $$($(1)_KCONFIG_FILE),$$(call qstrip,$$(BR2_TARGET_$(1)_BOARD_DEFCONFIG))),)
|
||||
$$(error No Barebox config. Check your BR2_TARGET_$(1)_BOARD_DEFCONFIG or BR2_TARGET_$(1)_CUSTOM_CONFIG_FILE settings)
|
||||
endif
|
||||
endif
|
||||
|
||||
$$(eval $$(kconfig-package))
|
||||
|
||||
endef
|
||||
|
||||
################################################################################
|
||||
# barebox-package -- the target generator macro for barebox packages
|
||||
################################################################################
|
||||
|
||||
barebox-package=$(call inner-barebox-package,$(call UPPERCASE,$(pkgname)))
|
||||
|
||||
include boot/barebox/barebox/barebox.mk
|
||||
include boot/barebox/barebox-aux/barebox-aux.mk
|
||||
|
||||
ifeq ($(BR2_TARGET_BAREBOX)$(BR2_TARGET_BAREBOX_LATEST_VERSION),y)
|
||||
BR_NO_CHECK_HASH_FOR += $(BAREBOX_SOURCE)
|
||||
endif
|
||||
80
boot/barebox/barebox/Config.in
Normal file
80
boot/barebox/barebox/Config.in
Normal file
@ -0,0 +1,80 @@
|
||||
choice
|
||||
prompt "Barebox configuration"
|
||||
default BR2_TARGET_BAREBOX_USE_DEFCONFIG
|
||||
|
||||
config BR2_TARGET_BAREBOX_USE_DEFCONFIG
|
||||
bool "Using a defconfig"
|
||||
|
||||
config BR2_TARGET_BAREBOX_USE_CUSTOM_CONFIG
|
||||
bool "Using a custom config file"
|
||||
|
||||
endchoice
|
||||
|
||||
config BR2_TARGET_BAREBOX_BOARD_DEFCONFIG
|
||||
string "board defconfig"
|
||||
depends on BR2_TARGET_BAREBOX_USE_DEFCONFIG
|
||||
help
|
||||
Name of the board for which Barebox should be built, without
|
||||
the _defconfig suffix.
|
||||
|
||||
config BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE
|
||||
string "Configuration file path"
|
||||
depends on BR2_TARGET_BAREBOX_USE_CUSTOM_CONFIG
|
||||
help
|
||||
Path to the barebox configuration file
|
||||
|
||||
config BR2_TARGET_BAREBOX_CONFIG_FRAGMENT_FILES
|
||||
string "Additional configuration fragment files"
|
||||
help
|
||||
A space-separated list of configuration fragment files,
|
||||
that will be merged to the main Barebox configuration file.
|
||||
|
||||
config BR2_TARGET_BAREBOX_IMAGE_FILE
|
||||
string "Image file names"
|
||||
help
|
||||
Space-separated list of barebox images which will be copied to
|
||||
the images directory.
|
||||
|
||||
If left empty, defaults to:
|
||||
- barebox.bin for barebox versions older than 2012.10.
|
||||
- barebox-flash-image for later versions.
|
||||
|
||||
config BR2_TARGET_BAREBOX_BAREBOXENV
|
||||
bool "bareboxenv tool in target"
|
||||
help
|
||||
Install bareboxenv tool in target.
|
||||
|
||||
config BR2_TARGET_BAREBOX_CUSTOM_ENV
|
||||
bool "Generate an environment image"
|
||||
help
|
||||
Generate a custom environment image. This environment will
|
||||
contain the variables and scripts to be used at boot by
|
||||
barebox.
|
||||
|
||||
config BR2_TARGET_BAREBOX_CUSTOM_ENV_PATH
|
||||
string "Environment path"
|
||||
depends on BR2_TARGET_BAREBOX_CUSTOM_ENV
|
||||
help
|
||||
Path to the directory containing the custom barebox
|
||||
environment. Depending on your setup, it will probably be
|
||||
based on either the content of the defaultenv or
|
||||
defaultenv-2 directories in the barebox source code, plus
|
||||
the additions needed. The output will be an image in the
|
||||
barebox devfs format, stored in the images directory, with
|
||||
the same name as the directory name given here.
|
||||
|
||||
config BR2_TARGET_BAREBOX_CUSTOM_EMBEDDED_ENV_PATH
|
||||
string "Embedded environment path"
|
||||
help
|
||||
If this option is not empty, it is the path to a custom
|
||||
embedded barebox environment. This image will be used when
|
||||
the environment found in the environment sector is
|
||||
invalid. This option sets the barebox Kconfig option
|
||||
CONFIG_DEFAULT_ENVIRONMENT_PATH to the specified path. This
|
||||
way it is possible to use Buildroot variables like
|
||||
TOPDIR etc. to refer to the custom environment.
|
||||
|
||||
Depending on your setup, the custom embedded environment
|
||||
will probably be based on either the content of the
|
||||
defaultenv or defaultenv-2 directories in the barebox source
|
||||
code.
|
||||
1
boot/barebox/barebox/barebox.hash
Symbolic link
1
boot/barebox/barebox/barebox.hash
Symbolic link
@ -0,0 +1 @@
|
||||
../barebox.hash
|
||||
8
boot/barebox/barebox/barebox.mk
Normal file
8
boot/barebox/barebox/barebox.mk
Normal file
@ -0,0 +1,8 @@
|
||||
################################################################################
|
||||
#
|
||||
# barebox
|
||||
#
|
||||
################################################################################
|
||||
|
||||
# Instantiate the barebox package
|
||||
$(eval $(barebox-package))
|
||||
9
boot/beaglev-ddrinit/Config.in
Normal file
9
boot/beaglev-ddrinit/Config.in
Normal file
@ -0,0 +1,9 @@
|
||||
config BR2_TARGET_BEAGLEV_DDRINIT
|
||||
bool "beaglev-ddrinit"
|
||||
depends on BR2_riscv
|
||||
depends on BR2_HOSTARCH = "x86_64" # host-riscv64-elf-toolchain
|
||||
help
|
||||
This package builds the DDRinit firmware used on the BeagleV
|
||||
platform.
|
||||
|
||||
https://github.com/starfive-tech/beagle_ddrinit
|
||||
3
boot/beaglev-ddrinit/beaglev-ddrinit.hash
Normal file
3
boot/beaglev-ddrinit/beaglev-ddrinit.hash
Normal file
@ -0,0 +1,3 @@
|
||||
# Locally computed
|
||||
sha256 08a49355f89fc2cb4f5101183339c9c6f86b722545d0abbc319aab26a511dad7 beaglev-ddrinit-8d6318acfe71e790c983b34448c9abfcfcec3ed8.tar.gz
|
||||
sha256 284d26192537710910ec1f112ec5f4c981601ae23702391986d6ce0b8ba90813 LICENSE
|
||||
28
boot/beaglev-ddrinit/beaglev-ddrinit.mk
Normal file
28
boot/beaglev-ddrinit/beaglev-ddrinit.mk
Normal file
@ -0,0 +1,28 @@
|
||||
################################################################################
|
||||
#
|
||||
# beaglev-ddrinit
|
||||
#
|
||||
################################################################################
|
||||
|
||||
# Commit on the 'starfive' branch
|
||||
BEAGLEV_DDRINIT_VERSION = 8d6318acfe71e790c983b34448c9abfcfcec3ed8
|
||||
BEAGLEV_DDRINIT_SITE = $(call github,starfive-tech,beagle_ddrinit,$(BEAGLEV_DDRINIT_VERSION))
|
||||
BEAGLEV_DDRINIT_INSTALL_TARGET = NO
|
||||
BEAGLEV_DDRINIT_INSTALL_IMAGES = YES
|
||||
BEAGLEV_DDRINIT_DEPENDENCIES = host-riscv64-elf-toolchain
|
||||
BEAGLEV_DDRINIT_LICENSE = GPL-2.0+
|
||||
BEAGLEV_DDRINIT_LICENSE_FILES = LICENSE
|
||||
|
||||
define BEAGLEV_DDRINIT_BUILD_CMDS
|
||||
$(MAKE) -C $(@D)/build \
|
||||
CROSS_COMPILE=$(HOST_DIR)/bin/riscv64-unknown-elf- \
|
||||
SUFFIX=buildroot \
|
||||
GIT_VERSION=$(BEAGLEV_DDRINIT_VERSION)
|
||||
endef
|
||||
|
||||
define BEAGLEV_DDRINIT_INSTALL_IMAGES_CMDS
|
||||
$(INSTALL) -D -m 0644 $(@D)/build/ddrinit-2133-buildroot.bin.out \
|
||||
$(BINARIES_DIR)/ddrinit-2133-buildroot.bin.out
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
9
boot/beaglev-secondboot/Config.in
Normal file
9
boot/beaglev-secondboot/Config.in
Normal file
@ -0,0 +1,9 @@
|
||||
config BR2_TARGET_BEAGLEV_SECONDBOOT
|
||||
bool "beaglev-secondboot"
|
||||
depends on BR2_riscv
|
||||
depends on BR2_HOSTARCH = "x86_64" # host-riscv64-elf-toolchain
|
||||
help
|
||||
This package builds the SecondBoot firmware used on the
|
||||
BeagleV platform.
|
||||
|
||||
https://github.com/starfive-tech/beagle_secondBoot
|
||||
3
boot/beaglev-secondboot/beaglev-secondboot.hash
Normal file
3
boot/beaglev-secondboot/beaglev-secondboot.hash
Normal file
@ -0,0 +1,3 @@
|
||||
# Locally computed
|
||||
sha256 bf152500e9f7e467bb1dee95a2291f9ecfaaebe1d64b93f6d403cfaf50e540e0 beaglev-secondboot-e17302063c9a4b74475b18ff24dd149c27257354.tar.gz
|
||||
sha256 284d26192537710910ec1f112ec5f4c981601ae23702391986d6ce0b8ba90813 LICENSE
|
||||
28
boot/beaglev-secondboot/beaglev-secondboot.mk
Normal file
28
boot/beaglev-secondboot/beaglev-secondboot.mk
Normal file
@ -0,0 +1,28 @@
|
||||
################################################################################
|
||||
#
|
||||
# beaglev-secondboot
|
||||
#
|
||||
################################################################################
|
||||
|
||||
# Commit on the 'starfive' branch
|
||||
BEAGLEV_SECONDBOOT_VERSION = e17302063c9a4b74475b18ff24dd149c27257354
|
||||
BEAGLEV_SECONDBOOT_SITE = $(call github,starfive-tech,beagle_secondBoot,$(BEAGLEV_SECONDBOOT_VERSION))
|
||||
BEAGLEV_SECONDBOOT_INSTALL_TARGET = NO
|
||||
BEAGLEV_SECONDBOOT_INSTALL_IMAGES = YES
|
||||
BEAGLEV_SECONDBOOT_DEPENDENCIES = host-riscv64-elf-toolchain
|
||||
BEAGLEV_SECONDBOOT_LICENSE = GPL-2.0+
|
||||
BEAGLEV_SECONDBOOT_LICENSE_FILES = LICENSE
|
||||
|
||||
define BEAGLEV_SECONDBOOT_BUILD_CMDS
|
||||
$(MAKE) -C $(@D)/build \
|
||||
CROSS_COMPILE=$(HOST_DIR)/bin/riscv64-unknown-elf- \
|
||||
SUFFIX=buildroot \
|
||||
GIT_VERSION=$(BEAGLEV_SECONDBOOT_VERSION)
|
||||
endef
|
||||
|
||||
define BEAGLEV_SECONDBOOT_INSTALL_IMAGES_CMDS
|
||||
$(INSTALL) -D -m 0644 $(@D)/build/bootloader-JH7100-buildroot.bin.out \
|
||||
$(BINARIES_DIR)/bootloader-JH7100-buildroot.bin.out
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
12
boot/binaries-marvell/Config.in
Normal file
12
boot/binaries-marvell/Config.in
Normal file
@ -0,0 +1,12 @@
|
||||
config BR2_TARGET_BINARIES_MARVELL
|
||||
bool "binaries-marvell"
|
||||
depends on BR2_aarch64
|
||||
help
|
||||
Some systems, including Marvell Armada SoC, have a separate
|
||||
System Control Processor (SCP) for power management, clocks,
|
||||
reset and system control. ATF Boot Loader stage 2 (BL2) loads
|
||||
optional SCP_BL2 image into a platform-specific region
|
||||
of secure memory. This package downloads and installs such
|
||||
firmware, which is needed to build ATF.
|
||||
|
||||
https://github.com/MarvellEmbeddedProcessors/binaries-marvell/
|
||||
3
boot/binaries-marvell/binaries-marvell.hash
Normal file
3
boot/binaries-marvell/binaries-marvell.hash
Normal file
@ -0,0 +1,3 @@
|
||||
# Locally calculated
|
||||
sha256 d818c95bcd4d5c026238d6e554151184ed7fea15bce1f861f9068b97b4cd320a binaries-marvell-c5d3ef2b63ba66d8717ecbe679fd2e639cde88ee.tar.gz
|
||||
sha256 e6d08ef60068ee72c68835001a24eb832dcba27cac0dde0f179dfb428be050ca README.md
|
||||
20
boot/binaries-marvell/binaries-marvell.mk
Normal file
20
boot/binaries-marvell/binaries-marvell.mk
Normal file
@ -0,0 +1,20 @@
|
||||
################################################################################
|
||||
#
|
||||
# binaries-marvell
|
||||
#
|
||||
################################################################################
|
||||
|
||||
# This is version binaries-marvell-armada-18.12
|
||||
BINARIES_MARVELL_VERSION = c5d3ef2b63ba66d8717ecbe679fd2e639cde88ee
|
||||
BINARIES_MARVELL_SITE = $(call github,MarvellEmbeddedProcessors,binaries-marvell,$(BINARIES_MARVELL_VERSION))
|
||||
|
||||
BINARIES_MARVELL_LICENSE = GPL-2.0 with freertos-exception-2.0
|
||||
BINARIES_MARVELL_LICENSE_FILES = README.md
|
||||
|
||||
BINARIES_MARVELL_INSTALL_IMAGES = YES
|
||||
|
||||
define BINARIES_MARVELL_INSTALL_IMAGES_CMDS
|
||||
$(INSTALL) -D -m 0644 $(@D)/mrvl_scp_bl2.img $(BINARIES_DIR)/scp-fw.bin
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
46
boot/boot-wrapper-aarch64/Config.in
Normal file
46
boot/boot-wrapper-aarch64/Config.in
Normal file
@ -0,0 +1,46 @@
|
||||
comment "boot-wrapper-aarch64 needs a Linux kernel to be built"
|
||||
depends on BR2_aarch64
|
||||
depends on !BR2_LINUX_KERNEL
|
||||
|
||||
config BR2_TARGET_BOOT_WRAPPER_AARCH64
|
||||
bool "boot-wrapper-aarch64"
|
||||
depends on BR2_aarch64
|
||||
depends on BR2_LINUX_KERNEL
|
||||
help
|
||||
The boot-wrapper-aarch64 is a small bootloader that makes it
|
||||
possible to start an Aarch64 kernel inside the available
|
||||
software simulators for the Aarch64 architecture.
|
||||
|
||||
git://git.kernel.org/pub/scm/linux/kernel/git/mark/boot-wrapper-aarch64.git
|
||||
|
||||
if BR2_TARGET_BOOT_WRAPPER_AARCH64
|
||||
|
||||
config BR2_TARGET_BOOT_WRAPPER_AARCH64_DTS
|
||||
string "Device Tree Source name"
|
||||
default ""
|
||||
help
|
||||
Name of the Device Tree Source file to use to generate the
|
||||
Device Tree Blob that will be embedded in the image
|
||||
generated by the boot wrapper. Valid names are the .dts
|
||||
files from arch/arm64/boot/dts/ in the kernel source
|
||||
tree. The name must be specified without the .dts suffix.
|
||||
|
||||
config BR2_TARGET_BOOT_WRAPPER_AARCH64_BOOTARGS
|
||||
string "Kernel bootargs"
|
||||
default ""
|
||||
help
|
||||
Kernel bootargs to embed inside the image generated by the
|
||||
boot wrapper.
|
||||
|
||||
config BR2_TARGET_BOOT_WRAPPER_AARCH64_PSCI
|
||||
bool "Boot secondary SMP cores using PSCI"
|
||||
help
|
||||
Boot secondary SMP cores using PSCI firmware calls. If
|
||||
disabled, the spin-table method is used instead.
|
||||
|
||||
config BR2_TARGET_BOOT_WRAPPER_AARCH64_GICV3
|
||||
bool "Enable GICv3 instead of GICv2"
|
||||
help
|
||||
Boot using GICv3 instead of GICv2.
|
||||
|
||||
endif
|
||||
50
boot/boot-wrapper-aarch64/boot-wrapper-aarch64.mk
Normal file
50
boot/boot-wrapper-aarch64/boot-wrapper-aarch64.mk
Normal file
@ -0,0 +1,50 @@
|
||||
################################################################################
|
||||
#
|
||||
# boot-wrapper-aarch64
|
||||
#
|
||||
################################################################################
|
||||
|
||||
BOOT_WRAPPER_AARCH64_VERSION = 8d5a765251d9113c3c0f9fa14de42a9e7486fe8a
|
||||
BOOT_WRAPPER_AARCH64_SITE = https://git.kernel.org/pub/scm/linux/kernel/git/mark/boot-wrapper-aarch64.git
|
||||
BOOT_WRAPPER_AARCH64_SITE_METHOD = git
|
||||
BOOT_WRAPPER_AARCH64_LICENSE = BSD-3-Clause
|
||||
BOOT_WRAPPER_AARCH64_LICENSE_FILES = LICENSE.txt
|
||||
BOOT_WRAPPER_AARCH64_DEPENDENCIES = linux
|
||||
BOOT_WRAPPER_AARCH64_INSTALL_IMAGES = YES
|
||||
|
||||
# The Git repository does not have the generated configure script and
|
||||
# Makefile.
|
||||
BOOT_WRAPPER_AARCH64_AUTORECONF = YES
|
||||
|
||||
BOOT_WRAPPER_AARCH64_DTB = $(LINUX_DIR)/arch/arm64/boot/dts/$(basename $(call qstrip,$(BR2_TARGET_BOOT_WRAPPER_AARCH64_DTS))).dtb
|
||||
|
||||
BOOT_WRAPPER_AARCH64_CONF_OPTS = \
|
||||
--with-kernel-dir=$(LINUX_DIR) \
|
||||
--with-dtb=$(BOOT_WRAPPER_AARCH64_DTB) \
|
||||
--with-cmdline=$(BR2_TARGET_BOOT_WRAPPER_AARCH64_BOOTARGS)
|
||||
|
||||
ifeq ($(BR2_TARGET_BOOT_WRAPPER_AARCH64_PSCI),y)
|
||||
BOOT_WRAPPER_AARCH64_CONF_OPTS += --enable-psci
|
||||
else
|
||||
BOOT_WRAPPER_AARCH64_CONF_OPTS += --disable-psci
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_BOOT_WRAPPER_AARCH64_GICV3),y)
|
||||
BOOT_WRAPPER_AARCH64_CONF_OPTS += --enable-gicv3
|
||||
endif
|
||||
|
||||
# We need to convince the configure script that the Linux kernel tree
|
||||
# exists, as well as the DTB and the kernel Image. Even though those
|
||||
# are available on the build machine, the configure script uses
|
||||
# AC_CHECK_FILE tests, which are always disabled in cross-compilation
|
||||
# situations.
|
||||
BOOT_WRAPPER_AARCH64_CONF_ENV = \
|
||||
$(call AUTOCONF_AC_CHECK_FILE_VAL,$(LINUX_DIR))=yes \
|
||||
$(call AUTOCONF_AC_CHECK_FILE_VAL,$(LINUX_DIR)$(BOOT_WRAPPER_AARCH64_DTB))=yes \
|
||||
$(call AUTOCONF_AC_CHECK_FILE_VAL,$(LINUX_DIR)/arch/arm64/boot/Image)=yes
|
||||
|
||||
define BOOT_WRAPPER_AARCH64_INSTALL_IMAGES_CMDS
|
||||
cp $(@D)/linux-system.axf $(BINARIES_DIR)
|
||||
endef
|
||||
|
||||
$(eval $(autotools-package))
|
||||
1
boot/common.mk
Normal file
1
boot/common.mk
Normal file
@ -0,0 +1 @@
|
||||
include $(sort $(wildcard boot/*/*.mk))
|
||||
@ -0,0 +1,48 @@
|
||||
From 59aa67f7a4d8efc564b46fe467aaf6eccec17183 Mon Sep 17 00:00:00 2001
|
||||
From: Gerd Hoffmann <kraxel@redhat.com>
|
||||
Date: Mon, 20 Dec 2021 22:32:38 +0800
|
||||
Subject: [PATCH] MdeModulePkg/UsbBusDxe: fix NOOPT build error
|
||||
|
||||
gcc-11 (fedora 35):
|
||||
|
||||
/home/kraxel/projects/edk2/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c: In function ?UsbIoBulkTransfer?:
|
||||
/home/kraxel/projects/edk2/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c:277:12: error: ?UsbHcBulkTransfer? accessing 80 bytes in a region of size 8 [-Werror=stringop-overflow=]
|
||||
|
||||
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
||||
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
|
||||
(cherry picked from commit ae8272ef787d80950803c521a13a308651bdc62e)
|
||||
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
||||
---
|
||||
MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c | 2 +-
|
||||
MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c
|
||||
index 7529e03e85..b2ce97ca37 100644
|
||||
--- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c
|
||||
+++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c
|
||||
@@ -285,7 +285,7 @@ UsbHcBulkTransfer (
|
||||
IN UINT8 DevSpeed,
|
||||
IN UINTN MaxPacket,
|
||||
IN UINT8 BufferNum,
|
||||
- IN OUT VOID *Data[EFI_USB_MAX_BULK_BUFFER_NUM],
|
||||
+ IN OUT VOID *Data[],
|
||||
IN OUT UINTN *DataLength,
|
||||
IN OUT UINT8 *DataToggle,
|
||||
IN UINTN TimeOut,
|
||||
diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h
|
||||
index 1d2b8a6174..1316a5981f 100644
|
||||
--- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h
|
||||
+++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h
|
||||
@@ -149,7 +149,7 @@ UsbHcBulkTransfer (
|
||||
IN UINT8 DevSpeed,
|
||||
IN UINTN MaxPacket,
|
||||
IN UINT8 BufferNum,
|
||||
- IN OUT VOID *Data[EFI_USB_MAX_BULK_BUFFER_NUM],
|
||||
+ IN OUT VOID *Data[],
|
||||
IN OUT UINTN *DataLength,
|
||||
IN OUT UINT8 *DataToggle,
|
||||
IN UINTN TimeOut,
|
||||
--
|
||||
2.35.3
|
||||
|
||||
124
boot/edk2/Config.in
Normal file
124
boot/edk2/Config.in
Normal file
@ -0,0 +1,124 @@
|
||||
config BR2_TARGET_EDK2_ARCH_SUPPORTS
|
||||
bool
|
||||
default y if BR2_aarch64
|
||||
default y if BR2_i386
|
||||
default y if BR2_x86_64
|
||||
|
||||
config BR2_TARGET_EDK2
|
||||
bool "EDK2"
|
||||
depends on BR2_TARGET_EDK2_ARCH_SUPPORTS
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5
|
||||
select BR2_PACKAGE_EDK2_PLATFORMS
|
||||
help
|
||||
EDK II is a modern, feature-rich, cross-platform firmware
|
||||
development environment for the UEFI and PI specifications.
|
||||
|
||||
https://github.com/tianocore/tianocore.github.io/wiki/EDK-II
|
||||
|
||||
if BR2_TARGET_EDK2
|
||||
|
||||
choice
|
||||
prompt "Platform"
|
||||
default BR2_TARGET_EDK2_PLATFORM_OVMF_I386 if BR2_i386
|
||||
default BR2_TARGET_EDK2_PLATFORM_OVMF_X64 if BR2_x86_64
|
||||
default BR2_TARGET_EDK2_PLATFORM_ARM_VIRT_QEMU if BR2_aarch64
|
||||
|
||||
config BR2_TARGET_EDK2_PLATFORM_OVMF_I386
|
||||
bool "i386"
|
||||
depends on BR2_i386 || BR2_x86_64
|
||||
help
|
||||
Platform configuration for a generic i386 target.
|
||||
This platform will boot from flash address 0x0.
|
||||
It should therefore be used as the first bootloader.
|
||||
|
||||
config BR2_TARGET_EDK2_PLATFORM_OVMF_X64
|
||||
bool "x86-64"
|
||||
depends on BR2_x86_64
|
||||
help
|
||||
Platform configuration for a generic x86-64 target.
|
||||
This platform will boot from flash address 0x0.
|
||||
It should therefore be used as the first bootloader.
|
||||
|
||||
config BR2_TARGET_EDK2_PLATFORM_ARM_VIRT_QEMU
|
||||
bool "ARM Virt Qemu (flash)"
|
||||
depends on BR2_aarch64
|
||||
help
|
||||
Platform configuration for QEMU targeting the Virt machine.
|
||||
This platform will only boot from flash address 0x0.
|
||||
It should therefore be used as the first bootloader.
|
||||
|
||||
config BR2_TARGET_EDK2_PLATFORM_ARM_VIRT_QEMU_KERNEL
|
||||
bool "ARM Virt Qemu (kernel)"
|
||||
depends on BR2_aarch64
|
||||
help
|
||||
Platform configuration for QEMU targeting the Virt machine.
|
||||
This platform can boot from either flash address 0x0 or via
|
||||
the Linux boot protocol. It can therefore be loaded by a
|
||||
previous bootloader like ARM Trusted Firmware or OP-TEE.
|
||||
|
||||
config BR2_TARGET_EDK2_PLATFORM_ARM_SGI575
|
||||
bool "ARM SGI-575"
|
||||
depends on BR2_aarch64
|
||||
help
|
||||
Platform configuration for ARM SGI-575 on ARM's
|
||||
Fixed Virtual Platform (FVP).
|
||||
|
||||
config BR2_TARGET_EDK2_PLATFORM_ARM_VEXPRESS_FVP_AARCH64
|
||||
bool "ARM VExpress FVP Aarch64"
|
||||
depends on BR2_aarch64
|
||||
help
|
||||
Platform configuration for ARM Versatile Express targeting
|
||||
the Aarch64 Fixed Virtual Platform (FVP).
|
||||
|
||||
config BR2_TARGET_EDK2_PLATFORM_SOCIONEXT_DEVELOPERBOX
|
||||
bool "Socionext DeveloperBox"
|
||||
depends on BR2_aarch64
|
||||
depends on BR2_TARGET_ARM_TRUSTED_FIRMWARE
|
||||
depends on !BR2_TARGET_ARM_TRUSTED_FIRMWARE_EDK2_AS_BL33
|
||||
select BR2_PACKAGE_HOST_DTC
|
||||
select BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP
|
||||
help
|
||||
Platform configuration for Socionext SynQuacer DeveloperBox
|
||||
(SC2A11).
|
||||
|
||||
comment "Socionext DeveloperBox depends on ATF not using EDK2 as BL33"
|
||||
depends on BR2_TARGET_ARM_TRUSTED_FIRMWARE_EDK2_AS_BL33
|
||||
|
||||
config BR2_TARGET_EDK2_PLATFORM_SOLIDRUN_ARMADA80X0MCBIN
|
||||
bool "SolidRun MacchiatoBin"
|
||||
depends on BR2_aarch64
|
||||
depends on BR2_TARGET_ARM_TRUSTED_FIRMWARE
|
||||
select BR2_PACKAGE_HOST_DTC
|
||||
select BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP
|
||||
help
|
||||
Platform configuration for the SolidRun MacchiatoBin.
|
||||
|
||||
config BR2_TARGET_EDK2_PLATFORM_QEMU_SBSA
|
||||
bool "QEMU SBSA"
|
||||
depends on BR2_aarch64
|
||||
depends on BR2_TARGET_ARM_TRUSTED_FIRMWARE
|
||||
depends on !BR2_TARGET_ARM_TRUSTED_FIRMWARE_EDK2_AS_BL33
|
||||
help
|
||||
Platform configuration for QEMU targeting the SBSA reference
|
||||
machine.
|
||||
|
||||
comment "QEMU SBSA depends on ATF not using EDK2 as BL33"
|
||||
depends on BR2_TARGET_ARM_TRUSTED_FIRMWARE_EDK2_AS_BL33
|
||||
|
||||
endchoice
|
||||
|
||||
config BR2_TARGET_EDK2_FD_NAME
|
||||
string
|
||||
default "OVMF" if BR2_TARGET_EDK2_PLATFORM_OVMF_I386
|
||||
default "OVMF" if BR2_TARGET_EDK2_PLATFORM_OVMF_X64
|
||||
default "QEMU_EFI" if BR2_TARGET_EDK2_PLATFORM_ARM_VIRT_QEMU
|
||||
default "QEMU_EFI" if BR2_TARGET_EDK2_PLATFORM_ARM_VIRT_QEMU_KERNEL
|
||||
default "BL33_AP_UEFI" if BR2_TARGET_EDK2_PLATFORM_ARM_SGI575
|
||||
default "FVP_AARCH64_EFI" if BR2_TARGET_EDK2_PLATFORM_ARM_VEXPRESS_FVP_AARCH64
|
||||
default "FVP_AARCH64_EFI" if BR2_TARGET_EDK2_PLATFORM_SOCIONEXT_DEVELOPERBOX
|
||||
default "ARMADA_EFI" if BR2_TARGET_EDK2_PLATFORM_SOLIDRUN_ARMADA80X0MCBIN
|
||||
|
||||
endif
|
||||
|
||||
comment "EDK2 needs a toolchain w/ gcc >= 5"
|
||||
depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_5
|
||||
3
boot/edk2/edk2.hash
Normal file
3
boot/edk2/edk2.hash
Normal file
@ -0,0 +1,3 @@
|
||||
# Locally calculated
|
||||
sha256 04791c13b414a6d1877182a6d565cb762c30aa63e49bb4d495fca68ef4dd209d edk2-edk2-stable202102-br1.tar.gz
|
||||
sha256 50ce20c9cfdb0e19ee34fe0a51fc0afe961f743697b068359ab2f862b494df80 License.txt
|
||||
159
boot/edk2/edk2.mk
Normal file
159
boot/edk2/edk2.mk
Normal file
@ -0,0 +1,159 @@
|
||||
################################################################################
|
||||
#
|
||||
# edk2
|
||||
#
|
||||
################################################################################
|
||||
|
||||
EDK2_VERSION = edk2-stable202102
|
||||
EDK2_SITE = https://github.com/tianocore/edk2
|
||||
EDK2_SITE_METHOD = git
|
||||
EDK2_LICENSE = BSD-2-Clause
|
||||
EDK2_LICENSE_FILES = License.txt
|
||||
EDK2_CPE_ID_VENDOR = tianocore
|
||||
EDK2_DEPENDENCIES = edk2-platforms host-python3 host-acpica host-util-linux
|
||||
EDK2_INSTALL_TARGET = NO
|
||||
EDK2_INSTALL_IMAGES = YES
|
||||
|
||||
ifeq ($(BR2_ENABLE_DEBUG),y)
|
||||
EDK2_BUILD_TYPE = DEBUG
|
||||
else
|
||||
EDK2_BUILD_TYPE = RELEASE
|
||||
endif
|
||||
|
||||
# Build system notes.
|
||||
#
|
||||
# The EDK2 build system is rather unique, so here are a few useful notes.
|
||||
#
|
||||
# First, builds rely heavily on Git submodules to fetch various dependencies
|
||||
# into specific directory structures. It might be possible to work around this
|
||||
# and rely on Buildroot's infrastructure, but using Git submodules greatly
|
||||
# simplifies this already complicated build system.
|
||||
#
|
||||
# Second, the build system is spread across various commands and stages.
|
||||
# Therefore, all build variables needs to be exported to be available
|
||||
# accordingly. The first stage will build $(@D)/BaseTools which contains
|
||||
# various tools and scripts for the host.
|
||||
#
|
||||
# Third, where applicable, the dependency direction between EDK2 and
|
||||
# ARM Trusted Firmware (ATF) will go in different direction for different
|
||||
# platforms. Most commonly, ATF will depend on EDK2 via the BL33 payload.
|
||||
# But for some platforms (e.g. QEMU SBSA or DeveloperBox) EDK2 will package
|
||||
# the ATF images within its own build system. In such cases, intermediary
|
||||
# "EDK2 packages" will be built in $(EDK2_BUILD_PACKAGES) in order for EDK2
|
||||
# to be able to use them in subsequent build stages.
|
||||
#
|
||||
# For more information about the build setup:
|
||||
# https://edk2-docs.gitbook.io/edk-ii-build-specification/4_edk_ii_build_process_overview
|
||||
|
||||
EDK2_GIT_SUBMODULES = YES
|
||||
EDK2_BUILD_PACKAGES = $(@D)/Build/Buildroot
|
||||
EDK2_PACKAGES_PATH = $(@D):$(EDK2_BUILD_PACKAGES):$(STAGING_DIR)/usr/share/edk2-platforms
|
||||
|
||||
ifeq ($(BR2_TARGET_EDK2_PLATFORM_OVMF_I386),y)
|
||||
EDK2_ARCH = IA32
|
||||
EDK2_DEPENDENCIES += host-nasm
|
||||
EDK2_PACKAGE_NAME = OvmfPkg
|
||||
EDK2_PLATFORM_NAME = OvmfPkgIa32
|
||||
EDK2_BUILD_DIR = OvmfIa32
|
||||
|
||||
else ifeq ($(BR2_TARGET_EDK2_PLATFORM_OVMF_X64),y)
|
||||
EDK2_ARCH = X64
|
||||
EDK2_DEPENDENCIES += host-nasm
|
||||
EDK2_PACKAGE_NAME = OvmfPkg
|
||||
EDK2_PLATFORM_NAME = OvmfPkgX64
|
||||
EDK2_BUILD_DIR = OvmfX64
|
||||
|
||||
else ifeq ($(BR2_TARGET_EDK2_PLATFORM_ARM_VIRT_QEMU),y)
|
||||
EDK2_ARCH = AARCH64
|
||||
EDK2_PACKAGE_NAME = ArmVirtPkg
|
||||
EDK2_PLATFORM_NAME = ArmVirtQemu
|
||||
EDK2_BUILD_DIR = $(EDK2_PLATFORM_NAME)-$(EDK2_ARCH)
|
||||
|
||||
else ifeq ($(BR2_TARGET_EDK2_PLATFORM_ARM_VIRT_QEMU_KERNEL),y)
|
||||
EDK2_ARCH = AARCH64
|
||||
EDK2_PACKAGE_NAME = ArmVirtPkg
|
||||
EDK2_PLATFORM_NAME = ArmVirtQemuKernel
|
||||
EDK2_BUILD_DIR = $(EDK2_PLATFORM_NAME)-$(EDK2_ARCH)
|
||||
|
||||
else ifeq ($(BR2_TARGET_EDK2_PLATFORM_ARM_VEXPRESS_FVP_AARCH64),y)
|
||||
EDK2_ARCH = AARCH64
|
||||
EDK2_PACKAGE_NAME = Platform/ARM/VExpressPkg
|
||||
EDK2_PLATFORM_NAME = ArmVExpress-FVP-AArch64
|
||||
EDK2_BUILD_DIR = $(EDK2_PLATFORM_NAME)
|
||||
|
||||
else ifeq ($(BR2_TARGET_EDK2_PLATFORM_SOCIONEXT_DEVELOPERBOX),y)
|
||||
EDK2_ARCH = AARCH64
|
||||
EDK2_DEPENDENCIES += host-dtc arm-trusted-firmware
|
||||
EDK2_PACKAGE_NAME = Platform/Socionext/DeveloperBox
|
||||
EDK2_PLATFORM_NAME = DeveloperBox
|
||||
EDK2_BUILD_DIR = $(EDK2_PLATFORM_NAME)
|
||||
EDK2_BUILD_ENV += DTC_PREFIX=$(HOST_DIR)/bin/
|
||||
EDK2_BUILD_OPTS += -D DO_X86EMU=TRUE
|
||||
EDK2_PRE_BUILD_HOOKS += EDK2_PRE_BUILD_SOCIONEXT_DEVELOPERBOX
|
||||
|
||||
define EDK2_PRE_BUILD_SOCIONEXT_DEVELOPERBOX
|
||||
mkdir -p $(EDK2_BUILD_PACKAGES)/Platform/Socionext/DeveloperBox
|
||||
$(ARM_TRUSTED_FIRMWARE_DIR)/tools/fiptool/fiptool create \
|
||||
--tb-fw $(BINARIES_DIR)/bl31.bin \
|
||||
--soc-fw $(BINARIES_DIR)/bl31.bin \
|
||||
--scp-fw $(BINARIES_DIR)/bl31.bin \
|
||||
$(EDK2_BUILD_PACKAGES)/Platform/Socionext/DeveloperBox/fip_all_arm_tf.bin
|
||||
endef
|
||||
|
||||
else ifeq ($(BR2_TARGET_EDK2_PLATFORM_SOLIDRUN_ARMADA80X0MCBIN),y)
|
||||
EDK2_ARCH = AARCH64
|
||||
EDK2_DEPENDENCIES += host-dtc arm-trusted-firmware
|
||||
EDK2_PACKAGE_NAME = Platform/SolidRun/Armada80x0McBin
|
||||
EDK2_PLATFORM_NAME = Armada80x0McBin
|
||||
EDK2_BUILD_DIR = $(EDK2_PLATFORM_NAME)-$(EDK2_ARCH)
|
||||
EDK2_BUILD_ENV += DTC_PREFIX=$(HOST_DIR)/bin/
|
||||
EDK2_BUILD_OPTS += -D INCLUDE_TFTP_COMMAND
|
||||
|
||||
else ifeq ($(BR2_TARGET_EDK2_PLATFORM_QEMU_SBSA),y)
|
||||
EDK2_ARCH = AARCH64
|
||||
EDK2_DEPENDENCIES += arm-trusted-firmware
|
||||
EDK2_PACKAGE_NAME = Platform/Qemu/SbsaQemu
|
||||
EDK2_PLATFORM_NAME = SbsaQemu
|
||||
EDK2_BUILD_DIR = $(EDK2_PLATFORM_NAME)
|
||||
EDK2_PRE_BUILD_HOOKS += EDK2_PRE_BUILD_QEMU_SBSA
|
||||
|
||||
define EDK2_PRE_BUILD_QEMU_SBSA
|
||||
mkdir -p $(EDK2_BUILD_PACKAGES)/Platform/Qemu/Sbsa
|
||||
ln -srf $(BINARIES_DIR)/{bl1.bin,fip.bin} $(EDK2_BUILD_PACKAGES)/Platform/Qemu/Sbsa/
|
||||
endef
|
||||
|
||||
endif
|
||||
|
||||
EDK2_BASETOOLS_OPTS = \
|
||||
EXTRA_LDFLAGS="$(HOST_LDFLAGS)" \
|
||||
EXTRA_OPTFLAGS="$(HOST_CPPFLAGS)"
|
||||
|
||||
EDK2_BUILD_ENV += \
|
||||
WORKSPACE=$(@D) \
|
||||
PACKAGES_PATH=$(EDK2_PACKAGES_PATH) \
|
||||
PYTHON_COMMAND=$(HOST_DIR)/bin/python3 \
|
||||
IASL_PREFIX=$(HOST_DIR)/bin/ \
|
||||
NASM_PREFIX=$(HOST_DIR)/bin/ \
|
||||
GCC5_$(EDK2_ARCH)_PREFIX=$(TARGET_CROSS)
|
||||
|
||||
EDK2_BUILD_OPTS += \
|
||||
-t GCC5 \
|
||||
-n $(BR2_JLEVEL) \
|
||||
-a $(EDK2_ARCH) \
|
||||
-b $(EDK2_BUILD_TYPE) \
|
||||
-p $(EDK2_PACKAGE_NAME)/$(EDK2_PLATFORM_NAME).dsc
|
||||
|
||||
define EDK2_BUILD_CMDS
|
||||
mkdir -p $(EDK2_BUILD_PACKAGES)
|
||||
export $(EDK2_BUILD_ENV) && \
|
||||
unset ARCH && \
|
||||
source $(@D)/edksetup.sh && \
|
||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/BaseTools $(EDK2_BASETOOLS_OPTS) && \
|
||||
build $(EDK2_BUILD_OPTS) all
|
||||
endef
|
||||
|
||||
define EDK2_INSTALL_IMAGES_CMDS
|
||||
cp -f $(@D)/Build/$(EDK2_BUILD_DIR)/$(EDK2_BUILD_TYPE)_GCC5/FV/*.fd $(BINARIES_DIR)
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
@ -0,0 +1,45 @@
|
||||
From bb08b723fa7bc56439c7bc166cff361628e73453 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <bb08b723fa7bc56439c7bc166cff361628e73453.1659683176.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Fri, 5 Aug 2022 08:59:52 +0200
|
||||
Subject: [PATCH] Makefile: Make grub_fstest.pp depend on config-util.h
|
||||
|
||||
Warning: This commit does not apply to the GRUB git repository. This
|
||||
patch applies against the release tarballs.
|
||||
|
||||
Upstream status: https://lists.gnu.org/archive/html/grub-devel/2022-08/msg00045.html
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
Makefile.am | 2 +-
|
||||
Makefile.in | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index bf9c1ba..f08cfc0 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -51,7 +51,7 @@ libgrub_a_init.c: libgrub_a_init.lst $(top_srcdir)/geninit.sh
|
||||
CLEANFILES += libgrub_a_init.c
|
||||
|
||||
# For grub-fstest
|
||||
-grub_fstest.pp: $(grub_fstest_SOURCES)
|
||||
+grub_fstest.pp: config-util.h $(grub_fstest_SOURCES)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(grub_fstest_CPPFLAGS) $(CPPFLAGS) \
|
||||
-D'GRUB_MOD_INIT(x)=@MARKER@x@' $^ > $@ || (rm -f $@; exit 1)
|
||||
CLEANFILES += grub_fstest.pp
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index 13f2eef..2c1d20b 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -13312,7 +13312,7 @@ libgrub_a_init.c: libgrub_a_init.lst $(top_srcdir)/geninit.sh
|
||||
sh $(top_srcdir)/geninit.sh `cat $<` > $@ || (rm -f $@; exit 1)
|
||||
|
||||
# For grub-fstest
|
||||
-grub_fstest.pp: $(grub_fstest_SOURCES)
|
||||
+grub_fstest.pp: config-util.h $(grub_fstest_SOURCES)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(grub_fstest_CPPFLAGS) $(CPPFLAGS) \
|
||||
-D'GRUB_MOD_INIT(x)=@MARKER@x@' $^ > $@ || (rm -f $@; exit 1)
|
||||
|
||||
--
|
||||
2.37.1
|
||||
|
||||
164
boot/grub2/Config.in
Normal file
164
boot/grub2/Config.in
Normal file
@ -0,0 +1,164 @@
|
||||
config BR2_TARGET_GRUB2_ARCH_SUPPORTS
|
||||
bool
|
||||
default y if BR2_i386
|
||||
default y if BR2_x86_64
|
||||
default y if BR2_arm
|
||||
default y if BR2_aarch64
|
||||
depends on BR2_USE_MMU
|
||||
|
||||
config BR2_TARGET_GRUB2
|
||||
bool "grub2"
|
||||
depends on BR2_TARGET_GRUB2_ARCH_SUPPORTS
|
||||
depends on BR2_USE_WCHAR
|
||||
select BR2_TARGET_GRUB2_I386_PC if \
|
||||
!BR2_TARGET_GRUB2_HAS_PTF && \
|
||||
(BR2_i386 || BR2_x86_64)
|
||||
select BR2_TARGET_GRUB2_ARM_UBOOT if \
|
||||
!BR2_TARGET_GRUB2_HAS_PTF && \
|
||||
BR2_arm
|
||||
select BR2_TARGET_GRUB2_ARM64_EFI if BR2_aarch64
|
||||
help
|
||||
GNU GRUB is a Multiboot boot loader. It was derived from
|
||||
GRUB, the GRand Unified Bootloader, which was originally
|
||||
designed and implemented by Erich Stefan Boleyn. GRUB 2 has
|
||||
replaced what was formerly known as GRUB (i.e. version
|
||||
0.9x), which has, in turn, become GRUB Legacy.
|
||||
|
||||
Amongst others, GRUB2 offers EFI support, which GRUB Legacy
|
||||
doesn't provide.
|
||||
|
||||
For additional notes on using Grub 2 with Buildroot, see
|
||||
boot/grub2/readme.txt
|
||||
|
||||
http://www.gnu.org/software/grub/
|
||||
|
||||
if BR2_TARGET_GRUB2
|
||||
|
||||
config BR2_TARGET_GRUB2_HAS_LEGACY_BOOT
|
||||
bool
|
||||
|
||||
config BR2_TARGET_GRUB2_HAS_EFI_BOOT
|
||||
bool
|
||||
|
||||
config BR2_TARGET_GRUB2_HAS_PTF
|
||||
bool
|
||||
|
||||
config BR2_TARGET_GRUB2_I386_PC
|
||||
bool "i386-pc"
|
||||
depends on BR2_i386 || BR2_x86_64
|
||||
select BR2_TARGET_GRUB2_HAS_LEGACY_BOOT
|
||||
help
|
||||
Select this option if the platform you're targetting is a
|
||||
x86 or x86-64 legacy BIOS based platform.
|
||||
|
||||
config BR2_TARGET_GRUB2_I386_EFI
|
||||
bool "i386-efi"
|
||||
depends on BR2_i386 || BR2_x86_64
|
||||
select BR2_TARGET_GRUB2_HAS_PTF
|
||||
select BR2_TARGET_GRUB2_HAS_EFI_BOOT
|
||||
help
|
||||
Select this option if the platform you're targetting has a
|
||||
32 bits EFI BIOS. Note that some x86-64 platforms use a 32
|
||||
bits EFI BIOS, and this option should be used in this case.
|
||||
|
||||
config BR2_TARGET_GRUB2_X86_64_EFI
|
||||
bool "x86-64-efi"
|
||||
depends on BR2_x86_64
|
||||
select BR2_TARGET_GRUB2_HAS_PTF
|
||||
select BR2_TARGET_GRUB2_HAS_EFI_BOOT
|
||||
help
|
||||
Select this option if the platform you're targetting has a
|
||||
64 bits EFI BIOS.
|
||||
|
||||
config BR2_TARGET_GRUB2_ARM_UBOOT
|
||||
bool "arm-uboot"
|
||||
depends on BR2_arm
|
||||
select BR2_TARGET_GRUB2_HAS_LEGACY_BOOT
|
||||
help
|
||||
Select this option if the platform you're targetting is an
|
||||
ARM u-boot platform, and you want to boot Grub 2 as an u-boot
|
||||
compatible image.
|
||||
|
||||
config BR2_TARGET_GRUB2_ARM_EFI
|
||||
bool "arm-efi"
|
||||
depends on BR2_arm
|
||||
select BR2_TARGET_GRUB2_HAS_PTF
|
||||
select BR2_TARGET_GRUB2_HAS_EFI_BOOT
|
||||
help
|
||||
Select this option if the platform you're targetting is an
|
||||
ARM platform and you want to boot Grub 2 as an EFI
|
||||
application.
|
||||
|
||||
config BR2_TARGET_GRUB2_ARM64_EFI
|
||||
bool "arm64-efi"
|
||||
depends on BR2_aarch64
|
||||
select BR2_TARGET_GRUB2_HAS_EFI_BOOT
|
||||
help
|
||||
Select this option if the platform you're targetting is an
|
||||
Aarch64 platform and you want to boot Grub 2 as an EFI
|
||||
application.
|
||||
|
||||
if BR2_TARGET_GRUB2_HAS_LEGACY_BOOT
|
||||
|
||||
comment "Options for the x86 legacy BIOS or ARM U-Boot support"
|
||||
|
||||
config BR2_TARGET_GRUB2_BOOT_PARTITION
|
||||
string "boot partition"
|
||||
default "hd0,msdos1"
|
||||
help
|
||||
Specify the partition where the /boot/grub/grub.cfg file is
|
||||
located. Use 'hd0,msdos1' for the first partition of the
|
||||
first disk if using a legacy partition table, or 'hd0,gpt1'
|
||||
if using GPT partition table.
|
||||
|
||||
config BR2_TARGET_GRUB2_BUILTIN_MODULES_PC
|
||||
string "builtin modules"
|
||||
default BR2_TARGET_GRUB2_BUILTIN_MODULES if BR2_TARGET_GRUB2_BUILTIN_MODULES != "" # legacy
|
||||
default "boot linux ext2 fat squash4 part_msdos part_gpt normal biosdisk" if BR2_TARGET_GRUB2_I386_PC
|
||||
default "linux ext2 fat part_msdos normal" if BR2_TARGET_GRUB2_ARM_UBOOT
|
||||
|
||||
config BR2_TARGET_GRUB2_BUILTIN_CONFIG_PC
|
||||
string "builtin config"
|
||||
default BR2_TARGET_GRUB2_BUILTIN_CONFIG if BR2_TARGET_GRUB2_BUILTIN_CONFIG != "" # legacy
|
||||
help
|
||||
Path to a Grub 2 configuration file that will be embedded
|
||||
into the Grub image itself. This allows to set the root
|
||||
device and other configuration parameters, but however menu
|
||||
entries cannot be described in this embedded configuration.
|
||||
|
||||
endif # BR2_TARGET_GRUB2_HAS_LEGACY_BOOT
|
||||
|
||||
if BR2_TARGET_GRUB2_HAS_EFI_BOOT
|
||||
|
||||
comment "Options for the EFI BIOS or ARM EFI support"
|
||||
|
||||
config BR2_TARGET_GRUB2_BUILTIN_MODULES_EFI
|
||||
string "builtin modules"
|
||||
default BR2_TARGET_GRUB2_BUILTIN_MODULES if BR2_TARGET_GRUB2_BUILTIN_MODULES != "" # legacy
|
||||
default "boot linux ext2 fat squash4 part_msdos part_gpt normal efi_gop"
|
||||
|
||||
config BR2_TARGET_GRUB2_BUILTIN_CONFIG_EFI
|
||||
string "builtin config"
|
||||
default BR2_TARGET_GRUB2_BUILTIN_CONFIG if BR2_TARGET_GRUB2_BUILTIN_CONFIG != "" # legacy
|
||||
help
|
||||
Path to a Grub 2 configuration file that will be embedded
|
||||
into the Grub image itself. This allows to set the root
|
||||
device and other configuration parameters, but however menu
|
||||
entries cannot be described in this embedded configuration.
|
||||
|
||||
endif # BR2_TARGET_GRUB2_HAS_EFI_BOOT
|
||||
|
||||
config BR2_TARGET_GRUB2_INSTALL_TOOLS
|
||||
bool "install tools"
|
||||
help
|
||||
Install support tools to interact with GNU GRUB Multiboot
|
||||
boot loader.
|
||||
|
||||
This will also install the Grub 2 loadable modules to the
|
||||
target.
|
||||
|
||||
endif # BR2_TARGET_GRUB2
|
||||
|
||||
comment "grub2 needs a toolchain w/ wchar"
|
||||
depends on BR2_TARGET_GRUB2_ARCH_SUPPORTS
|
||||
depends on !BR2_USE_WCHAR
|
||||
6
boot/grub2/grub.cfg
Normal file
6
boot/grub2/grub.cfg
Normal file
@ -0,0 +1,6 @@
|
||||
set default="0"
|
||||
set timeout="5"
|
||||
|
||||
menuentry "Buildroot" {
|
||||
linux /boot/bzImage root=/dev/sda1 rootwait console=tty1
|
||||
}
|
||||
5
boot/grub2/grub2.hash
Normal file
5
boot/grub2/grub2.hash
Normal file
@ -0,0 +1,5 @@
|
||||
# Locally calculated after checking signature
|
||||
# https://ftp.gnu.org/gnu/grub/grub-2.06.tar.xz.sig
|
||||
sha256 b79ea44af91b93d17cd3fe80bdae6ed43770678a9a5ae192ccea803ebb657ee1 grub-2.06.tar.xz
|
||||
# Locally computed:
|
||||
sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 COPYING
|
||||
193
boot/grub2/grub2.mk
Normal file
193
boot/grub2/grub2.mk
Normal file
@ -0,0 +1,193 @@
|
||||
################################################################################
|
||||
#
|
||||
# grub2
|
||||
#
|
||||
################################################################################
|
||||
|
||||
GRUB2_VERSION = 2.06
|
||||
GRUB2_SITE = http://ftp.gnu.org/gnu/grub
|
||||
GRUB2_SOURCE = grub-$(GRUB2_VERSION).tar.xz
|
||||
GRUB2_LICENSE = GPL-3.0+
|
||||
GRUB2_LICENSE_FILES = COPYING
|
||||
GRUB2_DEPENDENCIES = host-bison host-flex host-grub2
|
||||
HOST_GRUB2_DEPENDENCIES = host-bison host-flex
|
||||
GRUB2_INSTALL_IMAGES = YES
|
||||
|
||||
# 0001-Makefile-Make-grub_fstest.pp-depend-on-config-util.h.patch
|
||||
define GRUB2_AVOID_AUTORECONF
|
||||
$(Q)touch $(@D)/Makefile.in
|
||||
endef
|
||||
GRUB2_POST_PATCH_HOOKS += GRUB2_AVOID_AUTORECONF
|
||||
HOST_GRUB2_POST_PATCH_HOOKS += GRUB2_AVOID_AUTORECONF
|
||||
|
||||
# CVE-2019-14865 is about a flaw in the grub2-set-bootflag tool, which
|
||||
# doesn't exist upstream, but is added by the Redhat/Fedora
|
||||
# packaging. Not applicable to Buildroot.
|
||||
GRUB2_IGNORE_CVES += CVE-2019-14865
|
||||
# CVE-2020-15705 is related to a flaw in the use of the
|
||||
# grub_linuxefi_secure_validate(), which was added by Debian/Ubuntu
|
||||
# patches. The issue doesn't affect upstream Grub, and
|
||||
# grub_linuxefi_secure_validate() is not implemented in the grub2
|
||||
# version available in Buildroot.
|
||||
GRUB2_IGNORE_CVES += CVE-2020-15705
|
||||
|
||||
ifeq ($(BR2_TARGET_GRUB2_INSTALL_TOOLS),y)
|
||||
GRUB2_INSTALL_TARGET = YES
|
||||
else
|
||||
GRUB2_INSTALL_TARGET = NO
|
||||
endif
|
||||
GRUB2_CPE_ID_VENDOR = gnu
|
||||
|
||||
GRUB2_BUILTIN_MODULES_PC = $(call qstrip,$(BR2_TARGET_GRUB2_BUILTIN_MODULES_PC))
|
||||
GRUB2_BUILTIN_MODULES_EFI = $(call qstrip,$(BR2_TARGET_GRUB2_BUILTIN_MODULES_EFI))
|
||||
GRUB2_BUILTIN_CONFIG_PC = $(call qstrip,$(BR2_TARGET_GRUB2_BUILTIN_CONFIG_PC))
|
||||
GRUB2_BUILTIN_CONFIG_EFI = $(call qstrip,$(BR2_TARGET_GRUB2_BUILTIN_CONFIG_EFI))
|
||||
GRUB2_BOOT_PARTITION = $(call qstrip,$(BR2_TARGET_GRUB2_BOOT_PARTITION))
|
||||
|
||||
GRUB2_IMAGE_i386-pc = $(BINARIES_DIR)/grub.img
|
||||
GRUB2_CFG_i386-pc = $(TARGET_DIR)/boot/grub/grub.cfg
|
||||
GRUB2_PREFIX_i386-pc = ($(GRUB2_BOOT_PARTITION))/boot/grub
|
||||
GRUB2_TARGET_i386-pc = i386
|
||||
GRUB2_PLATFORM_i386-pc = pc
|
||||
GRUB2_BUILTIN_CONFIG_i386-pc = $(GRUB2_BUILTIN_CONFIG_PC)
|
||||
GRUB2_BUILTIN_MODULES_i386-pc = $(GRUB2_BUILTIN_MODULES_PC)
|
||||
GRUB2_TUPLES-$(BR2_TARGET_GRUB2_I386_PC) += i386-pc
|
||||
|
||||
GRUB2_IMAGE_i386-efi = $(BINARIES_DIR)/efi-part/EFI/BOOT/bootia32.efi
|
||||
GRUB2_CFG_i386-efi = $(BINARIES_DIR)/efi-part/EFI/BOOT/grub.cfg
|
||||
GRUB2_PREFIX_i386-efi = /EFI/BOOT
|
||||
GRUB2_TARGET_i386-efi = i386
|
||||
GRUB2_PLATFORM_i386-efi = efi
|
||||
GRUB2_BUILTIN_CONFIG_i386-efi = $(GRUB2_BUILTIN_CONFIG_EFI)
|
||||
GRUB2_BUILTIN_MODULES_i386-efi = $(GRUB2_BUILTIN_MODULES_EFI)
|
||||
GRUB2_TUPLES-$(BR2_TARGET_GRUB2_I386_EFI) += i386-efi
|
||||
|
||||
GRUB2_IMAGE_x86_64-efi = $(BINARIES_DIR)/efi-part/EFI/BOOT/bootx64.efi
|
||||
GRUB2_CFG_x86_64-efi = $(BINARIES_DIR)/efi-part/EFI/BOOT/grub.cfg
|
||||
GRUB2_PREFIX_x86_64-efi = /EFI/BOOT
|
||||
GRUB2_TARGET_x86_64-efi = x86_64
|
||||
GRUB2_PLATFORM_x86_64-efi = efi
|
||||
GRUB2_BUILTIN_CONFIG_x86_64-efi = $(GRUB2_BUILTIN_CONFIG_EFI)
|
||||
GRUB2_BUILTIN_MODULES_x86_64-efi = $(GRUB2_BUILTIN_MODULES_EFI)
|
||||
GRUB2_TUPLES-$(BR2_TARGET_GRUB2_X86_64_EFI) += x86_64-efi
|
||||
|
||||
GRUB2_IMAGE_arm-uboot = $(BINARIES_DIR)/boot-part/grub/grub.img
|
||||
GRUB2_CFG_arm-uboot = $(BINARIES_DIR)/boot-part/grub/grub.cfg
|
||||
GRUB2_PREFIX_arm-uboot = ($(GRUB2_BOOT_PARTITION))/boot/grub
|
||||
GRUB2_TARGET_arm-uboot = arm
|
||||
GRUB2_PLATFORM_arm-uboot = uboot
|
||||
GRUB2_BUILTIN_CONFIG_arm-uboot = $(GRUB2_BUILTIN_CONFIG_PC)
|
||||
GRUB2_BUILTIN_MODULES_arm-uboot = $(GRUB2_BUILTIN_MODULES_PC)
|
||||
GRUB2_TUPLES-$(BR2_TARGET_GRUB2_ARM_UBOOT) += arm-uboot
|
||||
|
||||
GRUB2_IMAGE_arm-efi = $(BINARIES_DIR)/efi-part/EFI/BOOT/bootarm.efi
|
||||
GRUB2_CFG_arm-efi = $(BINARIES_DIR)/efi-part/EFI/BOOT/grub.cfg
|
||||
GRUB2_PREFIX_arm-efi = /EFI/BOOT
|
||||
GRUB2_TARGET_arm-efi = arm
|
||||
GRUB2_PLATFORM_arm-efi = efi
|
||||
GRUB2_BUILTIN_CONFIG_arm-efi = $(GRUB2_BUILTIN_CONFIG_EFI)
|
||||
GRUB2_BUILTIN_MODULES_arm-efi = $(GRUB2_BUILTIN_MODULES_EFI)
|
||||
GRUB2_TUPLES-$(BR2_TARGET_GRUB2_ARM_EFI) += arm-efi
|
||||
|
||||
GRUB2_IMAGE_arm64-efi = $(BINARIES_DIR)/efi-part/EFI/BOOT/bootaa64.efi
|
||||
GRUB2_CFG_arm64-efi = $(BINARIES_DIR)/efi-part/EFI/BOOT/grub.cfg
|
||||
GRUB2_PREFIX_arm64-efi = /EFI/BOOT
|
||||
GRUB2_TARGET_arm64-efi = aarch64
|
||||
GRUB2_PLATFORM_arm64-efi = efi
|
||||
GRUB2_BUILTIN_CONFIG_arm64-efi = $(GRUB2_BUILTIN_CONFIG_EFI)
|
||||
GRUB2_BUILTIN_MODULES_arm64-efi = $(GRUB2_BUILTIN_MODULES_EFI)
|
||||
GRUB2_TUPLES-$(BR2_TARGET_GRUB2_ARM64_EFI) += arm64-efi
|
||||
|
||||
# Grub2 is kind of special: it considers CC, LD and so on to be the
|
||||
# tools to build the host programs and uses TARGET_CC, TARGET_CFLAGS,
|
||||
# TARGET_CPPFLAGS, TARGET_LDFLAGS to build the bootloader itself.
|
||||
#
|
||||
# NOTE: TARGET_STRIP is overridden by !BR2_STRIP_strip, so always
|
||||
# use the cross compile variant to ensure grub2 builds
|
||||
|
||||
HOST_GRUB2_CONF_ENV = \
|
||||
CPP="$(HOSTCC) -E"
|
||||
|
||||
GRUB2_CONF_ENV = \
|
||||
CPP="$(TARGET_CC) -E" \
|
||||
TARGET_CC="$(TARGET_CC)" \
|
||||
CFLAGS="$(TARGET_CFLAGS) -Os" \
|
||||
TARGET_CFLAGS="$(TARGET_CFLAGS) -Os" \
|
||||
CPPFLAGS="$(TARGET_CPPFLAGS) -Os -fno-stack-protector" \
|
||||
TARGET_CPPFLAGS="$(TARGET_CPPFLAGS) -Os -fno-stack-protector" \
|
||||
TARGET_LDFLAGS="$(TARGET_LDFLAGS) -Os" \
|
||||
TARGET_NM="$(TARGET_NM)" \
|
||||
TARGET_OBJCOPY="$(TARGET_OBJCOPY)" \
|
||||
TARGET_STRIP="$(TARGET_CROSS)strip"
|
||||
|
||||
HOST_GRUB2_CONF_OPTS = \
|
||||
--with-platform=none \
|
||||
--disable-grub-mkfont \
|
||||
--enable-efiemu=no \
|
||||
ac_cv_lib_lzma_lzma_code=no \
|
||||
--enable-device-mapper=no \
|
||||
--enable-libzfs=no \
|
||||
--disable-werror
|
||||
|
||||
define GRUB2_CONFIGURE_CMDS
|
||||
$(foreach tuple, $(GRUB2_TUPLES-y), \
|
||||
@$(call MESSAGE,Configuring $(tuple))
|
||||
mkdir -p $(@D)/build-$(tuple)
|
||||
cd $(@D)/build-$(tuple) && \
|
||||
$(TARGET_CONFIGURE_OPTS) \
|
||||
$(TARGET_CONFIGURE_ARGS) \
|
||||
$(GRUB2_CONF_ENV) \
|
||||
../configure \
|
||||
--target=$(GRUB2_TARGET_$(tuple)) \
|
||||
--with-platform=$(GRUB2_PLATFORM_$(tuple)) \
|
||||
--host=$(GNU_TARGET_NAME) \
|
||||
--build=$(GNU_HOST_NAME) \
|
||||
--prefix=/ \
|
||||
--exec-prefix=/ \
|
||||
--disable-grub-mkfont \
|
||||
--enable-efiemu=no \
|
||||
ac_cv_lib_lzma_lzma_code=no \
|
||||
--enable-device-mapper=no \
|
||||
--enable-libzfs=no \
|
||||
--disable-werror
|
||||
)
|
||||
endef
|
||||
|
||||
define GRUB2_BUILD_CMDS
|
||||
$(foreach tuple, $(GRUB2_TUPLES-y), \
|
||||
@$(call MESSAGE,Building $(tuple))
|
||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/build-$(tuple)
|
||||
)
|
||||
endef
|
||||
|
||||
define GRUB2_INSTALL_IMAGES_CMDS
|
||||
$(foreach tuple, $(GRUB2_TUPLES-y), \
|
||||
@$(call MESSAGE,Installing $(tuple) to images directory)
|
||||
mkdir -p $(dir $(GRUB2_IMAGE_$(tuple)))
|
||||
$(HOST_DIR)/bin/grub-mkimage \
|
||||
-d $(@D)/build-$(tuple)/grub-core/ \
|
||||
-O $(tuple) \
|
||||
-o $(GRUB2_IMAGE_$(tuple)) \
|
||||
-p "$(GRUB2_PREFIX_$(tuple))" \
|
||||
$(if $(GRUB2_BUILTIN_CONFIG_$(tuple)), \
|
||||
-c $(GRUB2_BUILTIN_CONFIG_$(tuple))) \
|
||||
$(GRUB2_BUILTIN_MODULES_$(tuple))
|
||||
$(INSTALL) -D -m 0644 boot/grub2/grub.cfg $(GRUB2_CFG_$(tuple))
|
||||
$(if $(findstring $(GRUB2_PLATFORM_$(tuple)), pc), \
|
||||
cat $(@D)/build-$(tuple)/grub-core/cdboot.img $(GRUB2_IMAGE_$(tuple)) > \
|
||||
$(BINARIES_DIR)/grub-eltorito.img
|
||||
) \
|
||||
)
|
||||
endef
|
||||
|
||||
ifeq ($(BR2_TARGET_GRUB2_INSTALL_TOOLS),y)
|
||||
define GRUB2_INSTALL_TARGET_CMDS
|
||||
$(foreach tuple, $(GRUB2_TUPLES-y), \
|
||||
@$(call MESSAGE,Installing $(tuple) to target directory)
|
||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/build-$(tuple) DESTDIR=$(TARGET_DIR) install
|
||||
)
|
||||
endef
|
||||
endif
|
||||
|
||||
$(eval $(generic-package))
|
||||
$(eval $(host-autotools-package))
|
||||
192
boot/grub2/readme.txt
Normal file
192
boot/grub2/readme.txt
Normal file
@ -0,0 +1,192 @@
|
||||
Notes on using Grub2 for BIOS-based platforms
|
||||
=============================================
|
||||
|
||||
1. Create a disk image
|
||||
dd if=/dev/zero of=disk.img bs=1M count=32
|
||||
2. Partition it (either legacy or GPT style partitions work)
|
||||
cfdisk disk.img
|
||||
- Create one partition, type Linux, for the root
|
||||
filesystem. The only constraint is to make sure there
|
||||
is enough free space *before* the first partition to
|
||||
store Grub2. Leaving 1 MB of free space is safe.
|
||||
3. Setup loop device and loop partitions
|
||||
sudo losetup -f disk.img
|
||||
sudo partx -a /dev/loop0
|
||||
4. Prepare the root partition
|
||||
sudo mkfs.ext3 -L root /dev/loop0p1
|
||||
sudo mount /dev/loop0p1 /mnt
|
||||
sudo tar -C /mnt -xf output/images/rootfs.tar
|
||||
sudo umount /mnt
|
||||
5. Install Grub2
|
||||
sudo ./output/host/sbin/grub-bios-setup \
|
||||
-b ./output/host/lib/grub/i386-pc/boot.img \
|
||||
-c ./output/images/grub.img -d . /dev/loop0
|
||||
6. Cleanup loop device
|
||||
sudo partx -d /dev/loop0
|
||||
sudo losetup -d /dev/loop0
|
||||
7. Your disk.img is ready!
|
||||
|
||||
Using genimage
|
||||
--------------
|
||||
|
||||
If you use genimage to generate your complete image,
|
||||
installing Grub can be tricky. Here is how to achieve Grub's
|
||||
installation with genimage:
|
||||
|
||||
partition boot {
|
||||
in-partition-table = "no"
|
||||
image = "path_to_boot.img"
|
||||
offset = 0
|
||||
size = 512
|
||||
}
|
||||
partition grub {
|
||||
in-partition-table = "no"
|
||||
image = "path_to_grub.img"
|
||||
offset = 512
|
||||
}
|
||||
|
||||
The result is not byte to byte identical to what
|
||||
grub-bios-setup does but it works anyway.
|
||||
|
||||
To test your BIOS image in Qemu
|
||||
-------------------------------
|
||||
|
||||
qemu-system-{i386,x86-64} -hda disk.img
|
||||
|
||||
Notes on using Grub2 for x86/x86_64 EFI-based platforms
|
||||
=======================================================
|
||||
|
||||
1. Create a disk image
|
||||
dd if=/dev/zero of=disk.img bs=1M count=32
|
||||
2. Partition it with GPT partitions
|
||||
cgdisk disk.img
|
||||
- Create a first partition, type EF00, for the
|
||||
bootloader and kernel image
|
||||
- Create a second partition, type 8300, for the root
|
||||
filesystem.
|
||||
3. Setup loop device and loop partitions
|
||||
sudo losetup -f disk.img
|
||||
sudo partx -a /dev/loop0
|
||||
4. Prepare the boot partition
|
||||
sudo mkfs.vfat -n boot /dev/loop0p1
|
||||
sudo mount /dev/loop0p1 /mnt
|
||||
sudo cp -a output/images/efi-part/* /mnt/
|
||||
sudo cp output/images/bzImage /mnt/
|
||||
sudo umount /mnt
|
||||
5. Prepare the root partition
|
||||
sudo mkfs.ext3 -L root /dev/loop0p2
|
||||
sudo mount /dev/loop0p2 /mnt
|
||||
sudo tar -C /mnt -xf output/images/rootfs.tar
|
||||
sudo umount /mnt
|
||||
6 Cleanup loop device
|
||||
sudo partx -d /dev/loop0
|
||||
sudo losetup -d /dev/loop0
|
||||
7. Your disk.img is ready!
|
||||
|
||||
To test your i386/x86-64 EFI image in Qemu
|
||||
------------------------------------------
|
||||
|
||||
1. Download/install the EFI BIOS for Qemu
|
||||
You can get it using the edk2 package in Buildroot (installed
|
||||
in BINARIES_DIR), grab prebuilt images from the unofficial nightly
|
||||
builds [0], or use one provided by your distribution as OVMF.
|
||||
|
||||
[0] https://github.com/retrage/edk2-nightly
|
||||
|
||||
2. qemu-system-{i386,x86-64} -bios <path-to-OVMF.fd> -hda disk.img
|
||||
|
||||
Notes on using Grub2 for ARM u-boot-based platforms
|
||||
===================================================
|
||||
|
||||
The following steps show how to use the Grub2 arm-uboot platform
|
||||
support in the simplest way possible and with a single
|
||||
buildroot-generated filesystem.
|
||||
|
||||
1. Load qemu_arm_vexpress_defconfig
|
||||
|
||||
2. Enable u-boot with the vexpress_ca9x4 board name and with
|
||||
u-boot.elf image format.
|
||||
|
||||
3. Enable grub2 for the arm-uboot platform.
|
||||
|
||||
4. Enable "Install kernel image to /boot in target" in the kernel
|
||||
menu to populate a /boot directory with zImage in it.
|
||||
|
||||
5. The upstream u-boot vexpress_ca9x4 doesn't have CONFIG_API enabled
|
||||
by default, which is required.
|
||||
|
||||
Before building, patch u-boot (for example, make u-boot-extract to
|
||||
edit the source before building) file
|
||||
include/configs/vexpress_common.h to define:
|
||||
|
||||
#define CONFIG_API
|
||||
#define CONFIG_SYS_MMC_MAX_DEVICE 1
|
||||
|
||||
6. Create a custom grub2 config file with the following contents and
|
||||
set its path in BR2_TARGET_GRUB2_CFG:
|
||||
|
||||
set default="0"
|
||||
set timeout="5"
|
||||
|
||||
menuentry "Buildroot" {
|
||||
set root='(hd0)'
|
||||
linux /boot/zImage root=/dev/mmcblk0 console=ttyAMA0
|
||||
devicetree /boot/vexpress-v2p-ca9.dtb
|
||||
}
|
||||
|
||||
7. Create a custom builtin config file with the following contents
|
||||
and set its path in BR2_TARGET_GRUB2_BUILTIN_CONFIG:
|
||||
|
||||
set root=(hd0)
|
||||
set prefix=/boot/grub
|
||||
|
||||
8. Create a custom post-build script which copies files from
|
||||
${BINARIES_DIR}/boot-part to $(TARGET_DIR)/boot (set its path in
|
||||
BR2_ROOTFS_POST_BUILD_SCRIPT):
|
||||
|
||||
#!/bin/sh
|
||||
cp -r ${BINARIES_DIR}/boot-part/* ${TARGET_DIR}/boot/
|
||||
|
||||
9. make
|
||||
|
||||
10. Run qemu with:
|
||||
|
||||
qemu-system-arm -M vexpress-a9 -kernel output/images/u-boot -m 1024 \
|
||||
-nographic -sd output/images/rootfs.ext2
|
||||
|
||||
11. In u-boot, stop at the prompt and run grub2 with:
|
||||
|
||||
=> ext2load mmc 0:0 ${loadaddr} /boot/grub/grub.img
|
||||
=> bootm
|
||||
|
||||
12. This should bring the grub2 menu, upon which selecting the "Buildroot"
|
||||
entry should boot Linux.
|
||||
|
||||
|
||||
Notes on using Grub2 for Aarch64 EFI-based platforms
|
||||
====================================================
|
||||
|
||||
The following steps show how to use the Grub2 arm64-efi platform,
|
||||
using qemu and EFI firmware built for qemu.
|
||||
|
||||
1. Load aarch64_efi_defconfig
|
||||
|
||||
2. make
|
||||
|
||||
3. Download the EFI firmware for qemu aarch64
|
||||
|
||||
You can get it using the edk2 package in Buildroot (installed
|
||||
in BINARIES_DIR), grab prebuilt images from the unofficial nightly
|
||||
builds [1], or use one provided by your distribution as OVMF-aarch64
|
||||
or AAVMF.
|
||||
|
||||
[1] https://github.com/retrage/edk2-nightly
|
||||
|
||||
4. Run qemu with:
|
||||
|
||||
qemu-system-aarch64 -M virt -cpu cortex-a57 -m 512 -nographic \
|
||||
-bios <path/to/EDK2>/QEMU_EFI.fd -hda output/images/disk.img \
|
||||
-netdev user,id=eth0 -device virtio-net-device,netdev=eth0
|
||||
|
||||
5. This should bring the grub2 menu, upon which selecting the
|
||||
"Buildroot" entry should boot Linux.
|
||||
@ -0,0 +1,31 @@
|
||||
From 40ab4167b5a45c772304a879c71b47d54de3b0e3 Mon Sep 17 00:00:00 2001
|
||||
From: Esben Haabendal <esben@haabendal.dk>
|
||||
Date: Wed, 20 Mar 2019 14:19:40 +0100
|
||||
Subject: [PATCH] Allow building with newer glibc versions
|
||||
|
||||
Newer glibc versions does not include sys/sysmacros.h from sys/types.h
|
||||
anymore. Including it unconditionally should be safe.
|
||||
|
||||
See https://sourceware.org/ml/libc-alpha/2015-11/msg00253.html for why
|
||||
this was done.
|
||||
|
||||
Signed-off-by: Esben Haabendal <esben@haabendal.dk>
|
||||
---
|
||||
src/setup/setup.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/setup/setup.c b/src/setup/setup.c
|
||||
index 6a4275a2ae36..53429375a146 100644
|
||||
--- a/src/setup/setup.c
|
||||
+++ b/src/setup/setup.c
|
||||
@@ -37,6 +37,7 @@
|
||||
#include <ftw.h>
|
||||
#include <stdbool.h>
|
||||
#include <blkid.h>
|
||||
+#include <sys/sysmacros.h>
|
||||
|
||||
#include "efivars.h"
|
||||
|
||||
--
|
||||
2.21.0
|
||||
|
||||
@ -0,0 +1,54 @@
|
||||
From fc05ced797b87286b8ec7303fe32bf200a072972 Mon Sep 17 00:00:00 2001
|
||||
From: Esben Haabendal <esben@haabendal.dk>
|
||||
Date: Mon, 18 Mar 2019 11:14:31 +0100
|
||||
Subject: [PATCH] Fix linking for non-host compatible targets
|
||||
|
||||
Without this, gummiboot build system will use host 'ld' when linking
|
||||
target binary, which is obviously not a good idea.
|
||||
|
||||
Signed-off-by: Esben Haabendal <esben@haabendal.dk>
|
||||
---
|
||||
Makefile.am | 4 ++--
|
||||
configure.ac | 4 ++++
|
||||
2 files changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index 6568a355ed74..9051dd44edd9 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -142,7 +142,7 @@ $(top_builddir)/src/efi/%.o: $(top_srcdir)/src/efi/%.c $(addprefix $(top_srcdir)
|
||||
$(AM_V_CC)$(EFI_CC) $(efi_cppflags) $(efi_cflags) -c $< -o $@
|
||||
|
||||
$(gummiboot_solib): $(gummiboot_objects)
|
||||
- $(AM_V_CCLD)$(LD) $(efi_ldflags) $(gummiboot_objects) \
|
||||
+ $(AM_V_CCLD)$(EFI_LD) $(efi_ldflags) $(gummiboot_objects) \
|
||||
-o $@ -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name); \
|
||||
nm -D -u $@ | grep ' U ' && exit 1 || :
|
||||
.DELETE_ON_ERROR: $(gummboot_solib)
|
||||
@@ -177,7 +177,7 @@ $(top_builddir)/src/efi/%.o: $(top_srcdir)/src/efi/%.c $(addprefix $(top_srcdir)
|
||||
$(AM_V_CC)$(EFI_CC) $(efi_cppflags) $(efi_cflags) -c $< -o $@
|
||||
|
||||
$(stub_solib): $(stub_objects)
|
||||
- $(AM_V_CCLD)$(LD) $(efi_ldflags) $(stub_objects) \
|
||||
+ $(AM_V_CCLD)$(EFI_LD) $(efi_ldflags) $(stub_objects) \
|
||||
-o $@ -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name); \
|
||||
nm -D -u $@ | grep ' U ' && exit 1 || :
|
||||
.DELETE_ON_ERROR: $(gummboot_solib)
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 27bbe1d73396..b948696c220b 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -40,6 +40,10 @@ dnl Don't try to use things like -std=c99 for efi compilation
|
||||
EFI_CC=$CC
|
||||
AC_SUBST([EFI_CC])
|
||||
|
||||
+dnl Allow specifying linker compatible with the compiler
|
||||
+EFI_LD=$LD
|
||||
+AC_SUBST([EFI_LD])
|
||||
+
|
||||
AC_PROG_CC_C99
|
||||
AM_PROG_CC_C_O
|
||||
AC_PROG_GCC_TRADITIONAL
|
||||
--
|
||||
2.21.0
|
||||
|
||||
24
boot/gummiboot/Config.in
Normal file
24
boot/gummiboot/Config.in
Normal file
@ -0,0 +1,24 @@
|
||||
config BR2_TARGET_GUMMIBOOT
|
||||
bool "gummiboot"
|
||||
depends on BR2_i386 || BR2_x86_64
|
||||
depends on BR2_PACKAGE_GNU_EFI_ARCH_SUPPORTS
|
||||
select BR2_PACKAGE_GNU_EFI
|
||||
select BR2_PACKAGE_UTIL_LINUX
|
||||
select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
|
||||
help
|
||||
gummiboot is a simple UEFI boot manager which executes
|
||||
configured EFI images. The default entry is selected by a
|
||||
configured pattern (glob) or an on-screen menu.
|
||||
|
||||
gummiboot operates on the EFI System Partition (ESP)
|
||||
only. Configuration file fragments, kernels, initrds, other
|
||||
EFI images need to reside on the ESP. Linux kernels need to
|
||||
be built with CONFIG_EFI_STUB to be able to be directly
|
||||
executed as an EFI image.
|
||||
|
||||
See the Grub2 help text for details on preparing an EFI
|
||||
capable disk image using Gummiboot: the instructions are
|
||||
exactly the same, except that the Gummiboot configuration
|
||||
files will be located in /loader/ inside the EFI partition.
|
||||
|
||||
http://freedesktop.org/wiki/Software/gummiboot/
|
||||
4
boot/gummiboot/buildroot.conf
Normal file
4
boot/gummiboot/buildroot.conf
Normal file
@ -0,0 +1,4 @@
|
||||
title Buildroot
|
||||
version 1
|
||||
linux /bzImage
|
||||
options console=ttyS0 root=/dev/sda2
|
||||
41
boot/gummiboot/gummiboot.mk
Normal file
41
boot/gummiboot/gummiboot.mk
Normal file
@ -0,0 +1,41 @@
|
||||
################################################################################
|
||||
#
|
||||
# gummiboot
|
||||
#
|
||||
################################################################################
|
||||
|
||||
GUMMIBOOT_SITE = https://gitlab.freedesktop.org/archived-projects/gummiboot.git
|
||||
GUMMIBOOT_SITE_METHOD = git
|
||||
GUMMIBOOT_VERSION = 2bcd919c681c952eb867ef1bdb458f1bc49c2d55
|
||||
GUMMIBOOT_LICENSE = LGPL-2.1+
|
||||
GUMMIBOOT_LICENSE_FILES = LICENSE
|
||||
|
||||
# The git archive does not have the autoconf/automake stuff generated.
|
||||
GUMMIBOOT_AUTORECONF = YES
|
||||
GUMMIBOOT_DEPENDENCIES = gnu-efi host-pkgconf util-linux
|
||||
GUMMIBOOT_INSTALL_TARGET = NO
|
||||
GUMMIBOOT_INSTALL_IMAGES = YES
|
||||
|
||||
ifeq ($(BR2_i386),y)
|
||||
GUMMIBOOT_IMGARCH = ia32
|
||||
else ifeq ($(BR2_x86_64),y)
|
||||
GUMMIBOOT_IMGARCH = x64
|
||||
endif
|
||||
|
||||
GUMMIBOOT_CONF_OPTS = \
|
||||
--host=$(BR2_ARCH) \
|
||||
--with-efi-libdir=$(STAGING_DIR)/usr/lib \
|
||||
--with-efi-ldsdir=$(STAGING_DIR)/usr/lib \
|
||||
--with-efi-includedir=$(STAGING_DIR)/usr/include \
|
||||
--disable-manpages
|
||||
|
||||
define GUMMIBOOT_INSTALL_IMAGES_CMDS
|
||||
$(INSTALL) -D -m 0644 $(@D)/gummiboot$(GUMMIBOOT_IMGARCH).efi \
|
||||
$(BINARIES_DIR)/efi-part/EFI/BOOT/boot$(GUMMIBOOT_IMGARCH).efi
|
||||
$(INSTALL) -D -m 0644 boot/gummiboot/loader.conf \
|
||||
$(BINARIES_DIR)/efi-part/loader/loader.conf
|
||||
$(INSTALL) -D -m 0644 boot/gummiboot/buildroot.conf \
|
||||
$(BINARIES_DIR)/efi-part/loader/entries/buildroot.conf
|
||||
endef
|
||||
|
||||
$(eval $(autotools-package))
|
||||
2
boot/gummiboot/loader.conf
Normal file
2
boot/gummiboot/loader.conf
Normal file
@ -0,0 +1,2 @@
|
||||
timeout 3
|
||||
default buildroot
|
||||
52
boot/lpc32xxcdl/0001-compiler_name.patch
Normal file
52
boot/lpc32xxcdl/0001-compiler_name.patch
Normal file
@ -0,0 +1,52 @@
|
||||
Use CROSS_COMPILE as compiler name and stop using libc
|
||||
|
||||
Signed-off-by: Alexandre Belloni <abelloni@adeneo-embedded.com>
|
||||
---
|
||||
makerule/lpc32xx/make.lpc32xx.gnu | 22 +++++++++++-----------
|
||||
1 files changed, 11 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/makerule/lpc32xx/make.lpc32xx.gnu b/makerule/lpc32xx/make.lpc32xx.gnu
|
||||
index 1014c28..3277d99 100644
|
||||
--- a/makerule/lpc32xx/make.lpc32xx.gnu
|
||||
+++ b/makerule/lpc32xx/make.lpc32xx.gnu
|
||||
@@ -27,19 +27,19 @@ CFLAGS += -mno-sched-prolog -fno-hosted -mno-thumb-interwork -ffunction-sectio
|
||||
CFLAGS += -I$(CSP_INC_DIR) -I$(BSP_INC_DIR) -I$(GEN_INC_DIR)
|
||||
AFLAGS = -mcpu=arm926ej-s
|
||||
AFLAGS += -I$(CSP_INC_DIR) -I$(BSP_INC_DIR) -I$(GEN_INC_DIR)
|
||||
-CC = arm-none-eabi-gcc
|
||||
-AS = arm-none-eabi-as
|
||||
-AR = arm-none-eabi-ar -r
|
||||
-LD = arm-none-eabi-gcc
|
||||
-NM = arm-none-eabi-nm
|
||||
-OBJDUMP = arm-none-eabi-objdump
|
||||
-OBJCOPY = arm-none-eabi-objcopy
|
||||
-READELF = arm-none-eabi-readelf
|
||||
+CC = $(CROSS_COMPILE)gcc
|
||||
+AS = $(CROSS_COMPILE)as
|
||||
+AR = $(CROSS_COMPILE)ar -r
|
||||
+LD = $(CROSS_COMPILE)gcc
|
||||
+NM = $(CROSS_COMPILE)nm
|
||||
+OBJDUMP = $(CROSS_COMPILE)objdump
|
||||
+OBJCOPY = $(CROSS_COMPILE)objcopy
|
||||
+READELF = $(CROSS_COMPILE)readelf
|
||||
LDFLAGS += -Wl,--gc-sections
|
||||
|
||||
LK = -static
|
||||
LK += -Wl,--start-group $(TARGET_CSP_LIB) $(TARGET_BSP_LIB) $(TARGET_GEN_LIB)
|
||||
-LK += -lgcc -lc -lg -lm -lstdc++ -lsupc++
|
||||
+LK += -nostdlib -lgcc #-lc -lg -lm -lstdc++ -lsupc++
|
||||
LK += -Wl,--end-group
|
||||
MAP = -Xlinker -Map -Xlinker
|
||||
LDESC = -Xlinker -T
|
||||
@@ -47,6 +47,6 @@ ENTRY = -e
|
||||
BIN = -bin
|
||||
EXT = .elf
|
||||
LEXT =
|
||||
-ELFTOREC =arm-none-eabi-objcopy -O srec --strip-all --verbose
|
||||
-ELFTOBIN =arm-none-eabi-objcopy -I elf32-littlearm -O binary --strip-all --verbose
|
||||
+ELFTOREC = $(OBJCOPY) -O srec --strip-all --verbose
|
||||
+ELFTOBIN = $(OBJCOPY) -I elf32-littlearm -O binary --strip-all --verbose
|
||||
REC =.srec
|
||||
--
|
||||
1.7.7.3
|
||||
|
||||
969
boot/lpc32xxcdl/0002-delete_redundant_files.patch
Normal file
969
boot/lpc32xxcdl/0002-delete_redundant_files.patch
Normal file
@ -0,0 +1,969 @@
|
||||
Remove duplicated files to stop the linker from complaining about duplicate
|
||||
symbols
|
||||
|
||||
Signed-off-by: Alexandre Belloni <abelloni@adeneo-embedded.com>
|
||||
---
|
||||
--- a/csps/lpc32xx/bsps/fdi3250/startup/examples/s1l/sysapi_timer.c 2011-10-05 19:10:37.000000000 +0200
|
||||
+++ /dev/null 2012-01-01 16:39:47.918907000 +0100
|
||||
@@ -1,212 +0,0 @@
|
||||
-/***********************************************************************
|
||||
- * $Id:: sysapi_timer.c 3394 2010-05-06 17:56:27Z usb10132 $
|
||||
- *
|
||||
- * Project: Time support functions
|
||||
- *
|
||||
- * Description:
|
||||
- * Implements the following functions required for the S1L API
|
||||
- * time_init
|
||||
- * time_reset
|
||||
- * time_start
|
||||
- * time_stop
|
||||
- * time_get
|
||||
- * time_get_rate
|
||||
- *
|
||||
- ***********************************************************************
|
||||
- * Software that is described herein is for illustrative purposes only
|
||||
- * which provides customers with programming information regarding the
|
||||
- * products. This software is supplied "AS IS" without any warranties.
|
||||
- * NXP Semiconductors assumes no responsibility or liability for the
|
||||
- * use of the software, conveys no license or title under any patent,
|
||||
- * copyright, or mask work right to the product. NXP Semiconductors
|
||||
- * reserves the right to make changes in the software without
|
||||
- * notification. NXP Semiconductors also make no representation or
|
||||
- * warranty that such application will be suitable for the specified
|
||||
- * use without further testing or modification.
|
||||
- **********************************************************************/
|
||||
-
|
||||
-#include "s1l_sys_inf.h"
|
||||
-#include "lpc32xx_intc_driver.h"
|
||||
-#include "lpc32xx_timer_driver.h"
|
||||
-
|
||||
-static UNS_64 base_rate;
|
||||
-static INT_32 tdev = 0;
|
||||
-
|
||||
-/***********************************************************************
|
||||
- *
|
||||
- * Function: time_init
|
||||
- *
|
||||
- * Purpose: Initializes time system
|
||||
- *
|
||||
- * Processing: Initializes the system timer.
|
||||
- *
|
||||
- * Parameters: None
|
||||
- *
|
||||
- * Outputs: None
|
||||
- *
|
||||
- * Returns: 0 if the init failed, otherwise non-zero
|
||||
- *
|
||||
- * Notes: None
|
||||
- *
|
||||
- **********************************************************************/
|
||||
-INT_32 time_init(void)
|
||||
-{
|
||||
- TMR_PSCALE_SETUP_T pscale;
|
||||
-
|
||||
- /* Open timer driver */
|
||||
- if (tdev == 0)
|
||||
- {
|
||||
- tdev = timer_open((void *) TIMER_CNTR0, 0);
|
||||
- if (tdev != 0)
|
||||
- {
|
||||
- /* Use a prescale count to 100000 */
|
||||
- pscale.ps_tick_val = 100000;
|
||||
- pscale.ps_us_val = 0; /* Not needed when ps_tick_val != 0 */
|
||||
- timer_ioctl(tdev, TMR_SETUP_PSCALE, (INT_32) &pscale);
|
||||
-
|
||||
- /* Get timer clock rate */
|
||||
- base_rate = (UNS_64) timer_ioctl(tdev, TMR_GET_STATUS,
|
||||
- TMR_GET_CLOCK);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- return tdev;
|
||||
-}
|
||||
-
|
||||
-/***********************************************************************
|
||||
- *
|
||||
- * Function: time_reset
|
||||
- *
|
||||
- * Purpose: Resets system timer
|
||||
- *
|
||||
- * Processing:
|
||||
- * See function.
|
||||
- *
|
||||
- * Parameters: None
|
||||
- *
|
||||
- * Outputs: None
|
||||
- *
|
||||
- * Returns: Nothing
|
||||
- *
|
||||
- * Notes: None
|
||||
- *
|
||||
- **********************************************************************/
|
||||
-void time_reset(void)
|
||||
-{
|
||||
- if (tdev != 0)
|
||||
- {
|
||||
- timer_ioctl(tdev, TMR_RESET, 1);
|
||||
- }
|
||||
-}
|
||||
-
|
||||
-/***********************************************************************
|
||||
- *
|
||||
- * Function: time_start
|
||||
- *
|
||||
- * Purpose: Starts system timer
|
||||
- *
|
||||
- * Processing:
|
||||
- * See function.
|
||||
- *
|
||||
- * Parameters: None
|
||||
- *
|
||||
- * Outputs: None
|
||||
- *
|
||||
- * Returns: Nothing
|
||||
- *
|
||||
- * Notes: None
|
||||
- *
|
||||
- **********************************************************************/
|
||||
-void time_start(void)
|
||||
-{
|
||||
- if (tdev != 0)
|
||||
- {
|
||||
- timer_ioctl(tdev, TMR_ENABLE, 1);
|
||||
- }
|
||||
-}
|
||||
-
|
||||
-/***********************************************************************
|
||||
- *
|
||||
- * Function: time_stop
|
||||
- *
|
||||
- * Purpose: Stops system timer
|
||||
- *
|
||||
- * Processing:
|
||||
- * See function.
|
||||
- *
|
||||
- * Parameters: None
|
||||
- *
|
||||
- * Outputs: None
|
||||
- *
|
||||
- * Returns: Nothing
|
||||
- *
|
||||
- * Notes: None
|
||||
- *
|
||||
- **********************************************************************/
|
||||
-void time_stop(void)
|
||||
-{
|
||||
- if (tdev != 0)
|
||||
- {
|
||||
- timer_ioctl(tdev, TMR_ENABLE, 0);
|
||||
- }
|
||||
-}
|
||||
-
|
||||
-/***********************************************************************
|
||||
- *
|
||||
- * Function: time_get
|
||||
- *
|
||||
- * Purpose: Returns current system time value
|
||||
- *
|
||||
- * Processing:
|
||||
- * See function.
|
||||
- *
|
||||
- * Parameters: None
|
||||
- *
|
||||
- * Outputs: None
|
||||
- *
|
||||
- * Returns: The number of ticks of the timer counter
|
||||
- *
|
||||
- * Notes: None
|
||||
- *
|
||||
- **********************************************************************/
|
||||
-UNS_64 time_get(void)
|
||||
-{
|
||||
- TMR_COUNTS_T tcounts;
|
||||
- UNS_64 ticks = 0;
|
||||
-
|
||||
- if (tdev != 0)
|
||||
- {
|
||||
- timer_ioctl(tdev, TMR_GET_COUNTS, (INT_32) &tcounts);
|
||||
-
|
||||
- /* Compute number of timer ticks */
|
||||
- ticks = (UNS_64) tcounts.count_val * 100000;
|
||||
- ticks = ticks + (UNS_64) tcounts.ps_count_val;
|
||||
- }
|
||||
-
|
||||
- return ticks;
|
||||
-}
|
||||
-
|
||||
-/***********************************************************************
|
||||
- *
|
||||
- * Function: time_get_rate
|
||||
- *
|
||||
- * Purpose:
|
||||
- * Returns base tick rate (ticks per second) of the time counter
|
||||
- *
|
||||
- * Processing:
|
||||
- * See function.
|
||||
- *
|
||||
- * Parameters: None
|
||||
- *
|
||||
- * Outputs: None
|
||||
- *
|
||||
- * Returns: The timer tick rate (in ticks per second)
|
||||
- *
|
||||
- * Notes: None
|
||||
- *
|
||||
- **********************************************************************/
|
||||
-UNS_64 time_get_rate(void)
|
||||
-{
|
||||
- return base_rate;
|
||||
-}
|
||||
-
|
||||
--- a/csps/lpc32xx/bsps/fdi3250/startup/examples/s1l/sys_mmu_cmd_group.c 2011-10-05 19:10:37.000000000 +0200
|
||||
+++ /dev/null 2012-01-01 16:39:47.918907000 +0100
|
||||
@@ -1,746 +0,0 @@
|
||||
-/***********************************************************************
|
||||
- * $Id:: sys_mmu_cmd_group.c 3430 2010-05-07 17:39:08Z usb10132 $
|
||||
- *
|
||||
- * Project: Command processor for peek, poke, dump, and fill
|
||||
- *
|
||||
- * Description:
|
||||
- * Processes commands from the command prompt
|
||||
- *
|
||||
- ***********************************************************************
|
||||
- * Software that is described herein is for illustrative purposes only
|
||||
- * which provides customers with programming information regarding the
|
||||
- * products. This software is supplied "AS IS" without any warranties.
|
||||
- * NXP Semiconductors assumes no responsibility or liability for the
|
||||
- * use of the software, conveys no license or title under any patent,
|
||||
- * copyright, or mask work right to the product. NXP Semiconductors
|
||||
- * reserves the right to make changes in the software without
|
||||
- * notification. NXP Semiconductors also make no representation or
|
||||
- * warranty that such application will be suitable for the specified
|
||||
- * use without further testing or modification.
|
||||
- **********************************************************************/
|
||||
-
|
||||
-#include "lpc_arm922t_cp15_driver.h"
|
||||
-#include "lpc_string.h"
|
||||
-#include "startup.h"
|
||||
-#include "s1l_cmds.h"
|
||||
-#include "s1l_sys_inf.h"
|
||||
-
|
||||
-/* dcache command */
|
||||
-BOOL_32 cmd_dcache(void);
|
||||
-static UNS_32 cmd_dcache_plist[] =
|
||||
-{
|
||||
- (PARSE_TYPE_STR), /* The "dcache" command */
|
||||
- (PARSE_TYPE_DEC | PARSE_TYPE_END)
|
||||
-};
|
||||
-static CMD_ROUTE_T core_dcache_cmd =
|
||||
-{
|
||||
- (UNS_8 *) "dcache",
|
||||
- cmd_dcache,
|
||||
- (UNS_8 *) "Enables, disables, or flushes data cache",
|
||||
- (UNS_8 *) "dcache [0(disable), 1(enable), 2(flush)]",
|
||||
- cmd_dcache_plist,
|
||||
- NULL
|
||||
-};
|
||||
-
|
||||
-/* icache command */
|
||||
-BOOL_32 cmd_icache(void);
|
||||
-static UNS_32 cmd_icache_plist[] =
|
||||
-{
|
||||
- (PARSE_TYPE_STR), /* The "icache" command */
|
||||
- (PARSE_TYPE_DEC | PARSE_TYPE_END)
|
||||
-};
|
||||
-static CMD_ROUTE_T core_icache_cmd =
|
||||
-{
|
||||
- (UNS_8 *) "icache",
|
||||
- cmd_icache,
|
||||
- (UNS_8 *) "Enables or disables instruction cache",
|
||||
- (UNS_8 *) "icache [0(disable), 1(enable)]",
|
||||
- cmd_icache_plist,
|
||||
- NULL
|
||||
-};
|
||||
-
|
||||
-/* inval command */
|
||||
-BOOL_32 cmd_inval(void);
|
||||
-static UNS_32 cmd_inval_plist[] =
|
||||
-{
|
||||
- (PARSE_TYPE_STR | PARSE_TYPE_END) /* The "inval" command */
|
||||
-};
|
||||
-static CMD_ROUTE_T core_inval_cmd =
|
||||
-{
|
||||
- (UNS_8 *) "inval",
|
||||
- cmd_inval,
|
||||
- (UNS_8 *) "Flushes data cache and invalidates instruction cache",
|
||||
- (UNS_8 *) "inval",
|
||||
- cmd_inval_plist,
|
||||
- NULL
|
||||
-};
|
||||
-
|
||||
-/* mmuenab command */
|
||||
-BOOL_32 cmd_mmuenab(void);
|
||||
-static UNS_32 cmd_mmuenab_plist[] =
|
||||
-{
|
||||
- (PARSE_TYPE_STR), /* The "mmuenab" command */
|
||||
- (PARSE_TYPE_DEC | PARSE_TYPE_END)
|
||||
-};
|
||||
-static CMD_ROUTE_T core_mmuenab_cmd =
|
||||
-{
|
||||
- (UNS_8 *) "mmuenab",
|
||||
- cmd_mmuenab,
|
||||
- (UNS_8 *) "Enables or disables the MMU",
|
||||
- (UNS_8 *) "mmuenab [0(disable), 1(enable)]",
|
||||
- cmd_mmuenab_plist,
|
||||
- NULL
|
||||
-};
|
||||
-
|
||||
-/* map command */
|
||||
-BOOL_32 cmd_map(void);
|
||||
-static UNS_32 cmd_map_plist[] =
|
||||
-{
|
||||
- (PARSE_TYPE_STR), /* The "map" command */
|
||||
- (PARSE_TYPE_HEX),
|
||||
- (PARSE_TYPE_HEX),
|
||||
- (PARSE_TYPE_DEC),
|
||||
- (PARSE_TYPE_DEC | PARSE_TYPE_END),
|
||||
-};
|
||||
-static CMD_ROUTE_T core_map_cmd =
|
||||
-{
|
||||
- (UNS_8 *) "map",
|
||||
- cmd_map,
|
||||
- (UNS_8 *) "Maps a range of physical address sections to virtual addresses",
|
||||
- (UNS_8 *) "map [virt hex addr][phy hex addr][sections][0(uncached), 1(cached), 2(unmap)]",
|
||||
- cmd_map_plist,
|
||||
- NULL
|
||||
-};
|
||||
-
|
||||
-/* mmuinfo command */
|
||||
-static BOOL_32 cmd_mmuinfo(void);
|
||||
-static UNS_32 cmd_mmuinfo_plist[] =
|
||||
-{
|
||||
- (PARSE_TYPE_STR | PARSE_TYPE_END) /* The "mmuinfo" command */
|
||||
-};
|
||||
-static CMD_ROUTE_T core_mmuinfo_cmd =
|
||||
-{
|
||||
- (UNS_8 *) "mmuinfo",
|
||||
- cmd_mmuinfo,
|
||||
- (UNS_8 *) "Dumps page table and MMU info",
|
||||
- (UNS_8 *) "mmuinfo",
|
||||
- cmd_mmuinfo_plist,
|
||||
- NULL
|
||||
-};
|
||||
-
|
||||
-/* MMU group */
|
||||
-static GROUP_LIST_T mmu_group =
|
||||
-{
|
||||
- (UNS_8 *) "mmu", /* mmu group */
|
||||
- (UNS_8 *) "MMU command group",
|
||||
- NULL,
|
||||
- NULL
|
||||
-};
|
||||
-
|
||||
-static UNS_8 enabled_msg [] =" enabled";
|
||||
-static UNS_8 disabled_msg [] =" disabled";
|
||||
-static UNS_8 dcache_msg[] = "Data cache";
|
||||
-static UNS_8 icache_msg[] = "Instruction cache";
|
||||
-static UNS_8 pagetab_msg[] = "Page table at address: ";
|
||||
-static UNS_8 slist_msg[] = "Type Virt Phy fl Size";
|
||||
-static UNS_8 mmu_msg [] ="MMU";
|
||||
-static UNS_8 cpage_msg[] = "Coarse page:";
|
||||
-static UNS_8 fpage_msg[] = "Fine page :";
|
||||
-static UNS_8 sect_msg[] = "Section :";
|
||||
-static UNS_8 mbytes_msg[] = "M";
|
||||
-static UNS_8 map1_err_msg[] =
|
||||
- "Error : section addresses must be aligned on a 32-bit boundary";
|
||||
-static UNS_8 map2_err_msg[] =
|
||||
- "Error : Number of sections exceeds address range of device";
|
||||
-static UNS_8 phya_msg[] = "Virtual address ";
|
||||
-static UNS_8 mapped_msg[] = " mapped to physical address ";
|
||||
-static UNS_8 unmapped_msg[] = " unmapped from physical address ";
|
||||
-static UNS_8 cached_msg[] = " (cached)";
|
||||
-static UNS_8 inval_msg[] = " invalidated";
|
||||
-static UNS_8 caches_msg [] ="Caches";
|
||||
-static UNS_8 flushed_msg[] = " flushed";
|
||||
-
|
||||
-/***********************************************************************
|
||||
- *
|
||||
- * Function: show_section
|
||||
- *
|
||||
- * Purpose: Display section information
|
||||
- *
|
||||
- * Processing:
|
||||
- * See function.
|
||||
- *
|
||||
- * Parameters:
|
||||
- * mmu_reg : MMU settings for this section
|
||||
- * virt_addr : Starting virtual address for this section
|
||||
- * segs : Number of 1M segments for this section
|
||||
- *
|
||||
- * Outputs: None
|
||||
- *
|
||||
- * Returns: Nothing
|
||||
- *
|
||||
- * Notes: None
|
||||
- *
|
||||
- **********************************************************************/
|
||||
-static void show_section(UNS_32 mmu_reg,
|
||||
- UNS_32 virt_addr,
|
||||
- UNS_32 segs)
|
||||
-{
|
||||
- UNS_8 straddr [16];
|
||||
- UNS_32 mmu_phy;
|
||||
-
|
||||
- if ((mmu_reg & ARM922T_L1D_TYPE_PG_SN_MASK) !=
|
||||
- ARM922T_L1D_TYPE_FAULT)
|
||||
- {
|
||||
- if ((mmu_reg & ARM922T_L1D_TYPE_PG_SN_MASK) ==
|
||||
- ARM922T_L1D_TYPE_CPAGE)
|
||||
- {
|
||||
- term_dat_out(cpage_msg);
|
||||
- }
|
||||
- else if ((mmu_reg & ARM922T_L1D_TYPE_PG_SN_MASK) ==
|
||||
- ARM922T_L1D_TYPE_FPAGE)
|
||||
- {
|
||||
- term_dat_out(fpage_msg);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- term_dat_out(sect_msg);
|
||||
- }
|
||||
-
|
||||
- /* Compute virtual address */
|
||||
- str_makehex(straddr, virt_addr, 8);
|
||||
- term_dat_out(straddr);
|
||||
- term_dat_out((UNS_8 *) " ");
|
||||
-
|
||||
- /* Compute mapped physical address */
|
||||
- if ((mmu_reg & ARM922T_L1D_TYPE_PG_SN_MASK) ==
|
||||
- ARM922T_L1D_TYPE_SECTION)
|
||||
- {
|
||||
- mmu_phy = mmu_reg & 0xFFF00000;
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- /* Don't compute addresses for non-sections */
|
||||
- mmu_phy = 0;
|
||||
- }
|
||||
- str_makehex(straddr, mmu_phy, 8);
|
||||
- term_dat_out(straddr);
|
||||
- term_dat_out((UNS_8 *) " ");
|
||||
-
|
||||
- /* MMU flags */
|
||||
- if ((mmu_reg & ARM922T_L1D_BUFFERABLE) != 0)
|
||||
- {
|
||||
- term_dat_out((UNS_8 *) "b");
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- term_dat_out((UNS_8 *) " ");
|
||||
- }
|
||||
- if ((mmu_reg & ARM922T_L1D_CACHEABLE) != 0)
|
||||
- {
|
||||
- term_dat_out((UNS_8 *) "c");
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- term_dat_out((UNS_8 *) " ");
|
||||
- }
|
||||
- term_dat_out((UNS_8 *) " ");
|
||||
-
|
||||
- /* Displays used megabytes */
|
||||
- str_makedec(straddr, segs);
|
||||
- term_dat_out(straddr);
|
||||
- term_dat_out_crlf(mbytes_msg);
|
||||
- }
|
||||
-}
|
||||
-
|
||||
-/***********************************************************************
|
||||
- *
|
||||
- * Function: mmu_dumpinfo
|
||||
- *
|
||||
- * Purpose: Display MMU info
|
||||
- *
|
||||
- * Processing:
|
||||
- * Display the MMU information, including enable status, cache
|
||||
- * status, and page table.
|
||||
- *
|
||||
- * Parameters: None
|
||||
- *
|
||||
- * Outputs: None
|
||||
- *
|
||||
- * Returns: TRUE if the command was processed, otherwise FALSE
|
||||
- *
|
||||
- * Notes: None
|
||||
- *
|
||||
- **********************************************************************/
|
||||
-static BOOL_32 mmu_dumpinfo(void)
|
||||
-{
|
||||
- UNS_32 segsz, last_mmu_reg, mmu_vrt, mmu_reg, mmu_vrtsav = 0, *pt;
|
||||
- UNS_32 mlast_mmu_reg, mmmu_reg;
|
||||
- int idx;
|
||||
- UNS_8 hexaddr [16];
|
||||
-
|
||||
- term_dat_out(mmu_msg);
|
||||
- if (cp15_mmu_enabled() == FALSE)
|
||||
- {
|
||||
- term_dat_out_crlf(disabled_msg);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- term_dat_out_crlf(enabled_msg);
|
||||
-
|
||||
- /* Get MMU control register word */
|
||||
- mmu_reg = cp15_get_mmu_control_reg();
|
||||
-
|
||||
- /* Instruction cache status */
|
||||
- term_dat_out(icache_msg);
|
||||
- if ((mmu_reg & ARM922T_MMU_CONTROL_I) == 0)
|
||||
- {
|
||||
- term_dat_out_crlf(disabled_msg);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- term_dat_out_crlf(enabled_msg);
|
||||
- }
|
||||
-
|
||||
- /* Data cache status */
|
||||
- term_dat_out(dcache_msg);
|
||||
- if ((mmu_reg & ARM922T_MMU_CONTROL_C) == 0)
|
||||
- {
|
||||
- term_dat_out_crlf(disabled_msg);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- term_dat_out_crlf(enabled_msg);
|
||||
- }
|
||||
-
|
||||
- term_dat_out(pagetab_msg);
|
||||
- mmu_reg = (UNS_32) cp15_get_ttb();
|
||||
- str_makehex(hexaddr, mmu_reg, 8);
|
||||
- term_dat_out_crlf(hexaddr);
|
||||
- term_dat_out_crlf(slist_msg);
|
||||
-
|
||||
- /* Process MMU table - assume that the physical and
|
||||
- virtual locations of table are the same */
|
||||
- pt = (UNS_32 *) mmu_reg;
|
||||
- mmu_vrt = 0x0;
|
||||
- segsz = 0xFFFFFFFF;
|
||||
- last_mmu_reg = mlast_mmu_reg = 0xFFFFFFFF;
|
||||
- for (idx = 0; idx < 4096; idx++)
|
||||
- {
|
||||
- mmu_reg = *pt;
|
||||
- mmmu_reg = (mmu_reg & (ARM922T_L1D_TYPE_PG_SN_MASK |
|
||||
- ARM922T_L1D_BUFFERABLE | ARM922T_L1D_CACHEABLE));
|
||||
- segsz = segsz + 1;
|
||||
-
|
||||
- if ((last_mmu_reg != 0xFFFFFFFF) &&
|
||||
- (mlast_mmu_reg != mmmu_reg))
|
||||
- {
|
||||
- show_section(last_mmu_reg, mmu_vrtsav, segsz);
|
||||
- segsz = 0;
|
||||
- }
|
||||
-
|
||||
- if (mlast_mmu_reg != mmmu_reg)
|
||||
- {
|
||||
- mmu_vrtsav = mmu_vrt;
|
||||
- last_mmu_reg = mmu_reg;
|
||||
- mlast_mmu_reg = mmmu_reg;
|
||||
- }
|
||||
-
|
||||
- pt++;
|
||||
- mmu_vrt += 0x00100000;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- return TRUE;
|
||||
-}
|
||||
-
|
||||
-/***********************************************************************
|
||||
- *
|
||||
- * Function: mmu_dumpmap
|
||||
- *
|
||||
- * Purpose: Map a virtual address range to a physical range
|
||||
- *
|
||||
- * Processing:
|
||||
- * From the input addresses and number of sections, generate the
|
||||
- * appropriate entries in the page table.
|
||||
- *
|
||||
- * Parameters: None
|
||||
- *
|
||||
- * Outputs: None
|
||||
- *
|
||||
- * Returns: TRUE if the command was processed, otherwise FALSE
|
||||
- *
|
||||
- * Notes: None
|
||||
- *
|
||||
- **********************************************************************/
|
||||
-static BOOL_32 mmu_dumpmap(UNS_32 vrt,
|
||||
- UNS_32 phy,
|
||||
- UNS_32 sections,
|
||||
- UNS_32 cache)
|
||||
-{
|
||||
- BOOL_32 processed = FALSE;
|
||||
- UNS_32 mmu_phy, mmu_vrt, tmp1 = 0, tmp2, *pt;
|
||||
- UNS_8 hexaddr [16];
|
||||
-
|
||||
- /* Verify address boundaries are sectional */
|
||||
- mmu_vrt = vrt & ~ARM922T_L2D_SN_BASE_MASK;
|
||||
- mmu_phy = phy & ~ARM922T_L2D_SN_BASE_MASK;
|
||||
- if ((mmu_vrt != 0) || (mmu_phy != 0))
|
||||
- {
|
||||
- term_dat_out_crlf(map1_err_msg);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- /* Verify that address range and section count will not
|
||||
- exceed address range of device */
|
||||
- tmp1 = vrt >> 20;
|
||||
- tmp1 = (tmp1 + sections) - 1;
|
||||
- tmp2 = phy >> 20;
|
||||
- tmp2 = (tmp2 + sections) - 1;
|
||||
- if ((tmp1 < 4096) && (tmp2 < 4096))
|
||||
- {
|
||||
- /* Good address range and good section count */
|
||||
- processed = TRUE;
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- term_dat_out_crlf(map2_err_msg);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- /* Generate static part of MMU word */
|
||||
- if (cache == 0)
|
||||
- {
|
||||
- /* Section mapped with cache disabled */
|
||||
- tmp1 = ARM922T_L1D_TYPE_SECTION;
|
||||
- }
|
||||
- else if (cache == 1)
|
||||
- {
|
||||
- /* Section mapped with cache enabled */
|
||||
- tmp1 = (ARM922T_L1D_BUFFERABLE | ARM922T_L1D_CACHEABLE |
|
||||
- ARM922T_L1D_TYPE_SECTION);
|
||||
- }
|
||||
- else if (cache == 2)
|
||||
- {
|
||||
- /* Section unmapped */
|
||||
- tmp1 = ARM922T_L1D_TYPE_FAULT;
|
||||
- }
|
||||
- tmp1 |= ARM922T_L1D_AP_ALL;
|
||||
-
|
||||
- /* Offset into page table for virtual address */
|
||||
- tmp2 = (vrt >> 20);
|
||||
- pt = cp15_get_ttb() + tmp2;
|
||||
-
|
||||
- /* Loop until all sections are complete */
|
||||
- while ((sections > 0) && (processed == TRUE))
|
||||
- {
|
||||
- /* Add in physical address */
|
||||
- tmp2 = tmp1 | (phy & ARM922T_L2D_SN_BASE_MASK);
|
||||
-
|
||||
- /* Save new section descriptor for virtual address */
|
||||
- *pt = tmp2;
|
||||
-
|
||||
- /* Output message shown the map */
|
||||
- term_dat_out(phya_msg);
|
||||
- str_makehex(hexaddr, phy, 8);
|
||||
- term_dat_out(hexaddr);
|
||||
- if (cache == 2)
|
||||
- {
|
||||
- term_dat_out(unmapped_msg);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- term_dat_out(mapped_msg);
|
||||
- }
|
||||
- str_makehex(hexaddr, vrt, 8);
|
||||
- term_dat_out(hexaddr);
|
||||
- if (cache == 1)
|
||||
- {
|
||||
- term_dat_out(cached_msg);
|
||||
- }
|
||||
- term_dat_out_crlf((UNS_8 *) "");
|
||||
-
|
||||
- /* Next section and page table entry*/
|
||||
- phy += 0x00100000;
|
||||
- vrt += 0x00100000;
|
||||
- pt++;
|
||||
- sections--;
|
||||
- }
|
||||
-
|
||||
- return processed;
|
||||
-}
|
||||
-
|
||||
-/***********************************************************************
|
||||
- *
|
||||
- * Function: cmd_mmuinfo
|
||||
- *
|
||||
- * Purpose: Display MMU information
|
||||
- *
|
||||
- * Processing:
|
||||
- * See function.
|
||||
- *
|
||||
- * Parameters: None
|
||||
- *
|
||||
- * Outputs: None
|
||||
- *
|
||||
- * Returns: TRUE if the command was processed, otherwise FALSE
|
||||
- *
|
||||
- * Notes: None
|
||||
- *
|
||||
- **********************************************************************/
|
||||
-static BOOL_32 cmd_mmuinfo(void)
|
||||
-{
|
||||
- mmu_dumpinfo();
|
||||
-
|
||||
- return TRUE;
|
||||
-}
|
||||
-
|
||||
-/***********************************************************************
|
||||
- *
|
||||
- * Function: cmd_map
|
||||
- *
|
||||
- * Purpose: Map a physical address region to a virtual region
|
||||
- *
|
||||
- * Processing:
|
||||
- * See function.
|
||||
- *
|
||||
- * Parameters: None
|
||||
- *
|
||||
- * Outputs: None
|
||||
- *
|
||||
- * Returns: TRUE if the command was processed, otherwise FALSE
|
||||
- *
|
||||
- * Notes: None
|
||||
- *
|
||||
- **********************************************************************/
|
||||
-BOOL_32 cmd_map(void)
|
||||
-{
|
||||
- UNS_32 phy, virt, sects, ce = 0;
|
||||
-
|
||||
- /* Get arguments */
|
||||
- virt = cmd_get_field_val(1);
|
||||
- phy = cmd_get_field_val(2);
|
||||
- sects = cmd_get_field_val(3);
|
||||
- ce = cmd_get_field_val(4);
|
||||
-
|
||||
- if (ce <= 2)
|
||||
- {
|
||||
- mmu_dumpmap(virt, phy, sects, ce);
|
||||
- }
|
||||
-
|
||||
- return TRUE;
|
||||
-}
|
||||
-
|
||||
-/***********************************************************************
|
||||
- *
|
||||
- * Function: cmd_inval
|
||||
- *
|
||||
- * Purpose: MMU cache flush and invalidate
|
||||
- *
|
||||
- * Processing:
|
||||
- * See function.
|
||||
- *
|
||||
- * Parameters: None
|
||||
- *
|
||||
- * Outputs: None
|
||||
- *
|
||||
- * Returns: TRUE if the command was processed, otherwise FALSE
|
||||
- *
|
||||
- * Notes: None
|
||||
- *
|
||||
- **********************************************************************/
|
||||
-BOOL_32 cmd_inval(void)
|
||||
-{
|
||||
- dcache_flush();
|
||||
- icache_inval();
|
||||
- term_dat_out(caches_msg);
|
||||
- term_dat_out(inval_msg);
|
||||
-
|
||||
- return TRUE;
|
||||
-}
|
||||
-
|
||||
-/***********************************************************************
|
||||
- *
|
||||
- * Function: cmd_dcache
|
||||
- *
|
||||
- * Purpose: MMU data cache enable and disable
|
||||
- *
|
||||
- * Processing:
|
||||
- * If the value passed in the parser is 1, enable the data cache,
|
||||
- * otherwise disable the data cache.
|
||||
- *
|
||||
- * Parameters: None
|
||||
- *
|
||||
- * Outputs: None
|
||||
- *
|
||||
- * Returns: TRUE if the command was processed, otherwise FALSE
|
||||
- *
|
||||
- * Notes: None
|
||||
- *
|
||||
- **********************************************************************/
|
||||
-BOOL_32 cmd_dcache(void)
|
||||
-{
|
||||
- UNS_32 cenable;
|
||||
- UNS_8 *ppar;
|
||||
-
|
||||
- /* Get argument */
|
||||
- cenable = cmd_get_field_val(1);
|
||||
-
|
||||
- switch (cenable)
|
||||
- {
|
||||
- case 0:
|
||||
- dcache_flush();
|
||||
- cp15_set_dcache(0);
|
||||
- ppar = disabled_msg;
|
||||
- break;
|
||||
-
|
||||
- case 1:
|
||||
- cp15_invalidate_cache();
|
||||
- cp15_set_dcache(1);
|
||||
- ppar = enabled_msg;
|
||||
- break;
|
||||
-
|
||||
- case 2:
|
||||
- default:
|
||||
- dcache_flush();
|
||||
- ppar = flushed_msg;
|
||||
- break;
|
||||
- }
|
||||
-
|
||||
- term_dat_out(dcache_msg);
|
||||
- term_dat_out_crlf(ppar);
|
||||
-
|
||||
- return TRUE;
|
||||
-}
|
||||
-
|
||||
-/***********************************************************************
|
||||
- *
|
||||
- * Function: cmd_icache
|
||||
- *
|
||||
- * Purpose: MMU instruction cache enable and disable
|
||||
- *
|
||||
- * Processing:
|
||||
- * If the value passed in the parser is 1, enable the instruction
|
||||
- * cache, otherwise disable the instruction cache.
|
||||
- *
|
||||
- * Parameters: None
|
||||
- *
|
||||
- * Outputs: None
|
||||
- *
|
||||
- * Returns: TRUE if the command was processed, otherwise FALSE
|
||||
- *
|
||||
- * Notes: None
|
||||
- *
|
||||
- **********************************************************************/
|
||||
-BOOL_32 cmd_icache(void)
|
||||
-{
|
||||
- UNS_32 cenable;
|
||||
- UNS_8 *ppar;
|
||||
-
|
||||
- /* Get argument */
|
||||
- cenable = cmd_get_field_val(1);
|
||||
-
|
||||
- if (cenable == 1)
|
||||
- {
|
||||
- dcache_flush();
|
||||
- cp15_invalidate_cache();
|
||||
- cp15_set_icache(1);
|
||||
- ppar = enabled_msg;
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- cp15_set_icache(0);
|
||||
- ppar = disabled_msg;
|
||||
- }
|
||||
-
|
||||
- term_dat_out(icache_msg);
|
||||
- term_dat_out_crlf(ppar);
|
||||
-
|
||||
- return TRUE;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-/***********************************************************************
|
||||
- *
|
||||
- * Function: cmd_mmuenab
|
||||
- *
|
||||
- * Purpose: Enable or disable MMU
|
||||
- *
|
||||
- * Processing:
|
||||
- * See function.
|
||||
- *
|
||||
- * Parameters: None
|
||||
- *
|
||||
- * Outputs: None
|
||||
- *
|
||||
- * Returns: TRUE if the command was processed, otherwise FALSE
|
||||
- *
|
||||
- * Notes: None
|
||||
- *
|
||||
- **********************************************************************/
|
||||
-BOOL_32 cmd_mmuenab(void)
|
||||
-{
|
||||
- UNS_8 *ppar;
|
||||
- UNS_32 cenable;
|
||||
-
|
||||
- term_dat_out_crlf((UNS_8 *) "Warning: Changing MMU status on "
|
||||
- " cached and buffered code can cause system crashes.");
|
||||
-
|
||||
- /* Get argument */
|
||||
- cenable = cmd_get_field_val(1);
|
||||
-
|
||||
- if (cenable == 1)
|
||||
- {
|
||||
- if ((cp15_get_mmu_control_reg() & ARM922T_MMU_CONTROL_C) != 0)
|
||||
- {
|
||||
- cp15_invalidate_cache();
|
||||
- }
|
||||
-
|
||||
- cp15_set_mmu(1);
|
||||
- ppar = enabled_msg;
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- cp15_dcache_flush();
|
||||
- cp15_write_buffer_flush();
|
||||
- cp15_invalidate_cache();
|
||||
- cp15_set_mmu(0);
|
||||
- ppar = disabled_msg;
|
||||
- }
|
||||
-
|
||||
- term_dat_out(mmu_msg);
|
||||
- term_dat_out_crlf(ppar);
|
||||
-
|
||||
- return TRUE;
|
||||
-}
|
||||
-
|
||||
-/***********************************************************************
|
||||
- *
|
||||
- * Function: mmu_cmd_group_init
|
||||
- *
|
||||
- * Purpose: Initialize MMU command group
|
||||
- *
|
||||
- * Processing:
|
||||
- * See function.
|
||||
- *
|
||||
- * Parameters: None
|
||||
- *
|
||||
- * Outputs: None
|
||||
- *
|
||||
- * Returns: Nothin
|
||||
- *
|
||||
- * Notes: None
|
||||
- *
|
||||
- **********************************************************************/
|
||||
-void mmu_cmd_group_init(void)
|
||||
-{
|
||||
- /* Add MMU group */
|
||||
- cmd_add_group(&mmu_group);
|
||||
-
|
||||
- /* Add commands to the MMU group */
|
||||
- cmd_add_new_command(&mmu_group, &core_dcache_cmd);
|
||||
- cmd_add_new_command(&mmu_group, &core_icache_cmd);
|
||||
- cmd_add_new_command(&mmu_group, &core_inval_cmd);
|
||||
- cmd_add_new_command(&mmu_group, &core_mmuenab_cmd);
|
||||
- cmd_add_new_command(&mmu_group, &core_map_cmd);
|
||||
- cmd_add_new_command(&mmu_group, &core_mmuinfo_cmd);
|
||||
-}
|
||||
188
boot/lpc32xxcdl/0003-libnosys_gnu.patch
Normal file
188
boot/lpc32xxcdl/0003-libnosys_gnu.patch
Normal file
@ -0,0 +1,188 @@
|
||||
Fix compilation and eabi issues
|
||||
|
||||
Since we are not linking with libc anymore, we need to define our own memset,
|
||||
strlen and memcpy. Also, as we are using a *libc compiler, we need to "handle"
|
||||
exceptions (mostly division by 0) by defining raise() and
|
||||
__aeabi_unwind_cpp_pr0.
|
||||
|
||||
Signed-off-by: Alexandre Belloni <abelloni@adeneo-embedded.com>
|
||||
---
|
||||
csps/lpc32xx/bsps/ea3250/source/libnosys_gnu.c | 41 +++++++++++++++++++++++
|
||||
csps/lpc32xx/bsps/fdi3250/source/libnosys_gnu.c | 41 +++++++++++++++++++++++
|
||||
csps/lpc32xx/bsps/phy3250/source/libnosys_gnu.c | 41 +++++++++++++++++++++++
|
||||
3 files changed, 123 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/csps/lpc32xx/bsps/ea3250/source/libnosys_gnu.c b/csps/lpc32xx/bsps/ea3250/source/libnosys_gnu.c
|
||||
index 385b0ab..f1f0a0a 100644
|
||||
--- a/csps/lpc32xx/bsps/ea3250/source/libnosys_gnu.c
|
||||
+++ b/csps/lpc32xx/bsps/ea3250/source/libnosys_gnu.c
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <errno.h>
|
||||
#include <sys/times.h>
|
||||
#include <sys/stat.h>
|
||||
+#include <sys/types.h>
|
||||
|
||||
/* errno definition */
|
||||
#undef errno
|
||||
@@ -125,4 +126,44 @@ int _write(int file, char *ptr, int len){
|
||||
return 0;
|
||||
}
|
||||
|
||||
+void * memset(void * s,int c,size_t count)
|
||||
+{
|
||||
+ char *xs = (char *) s;
|
||||
+
|
||||
+ while (count--)
|
||||
+ *xs++ = c;
|
||||
+
|
||||
+ return s;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+size_t strlen(const char * s)
|
||||
+{
|
||||
+ const char *sc;
|
||||
+
|
||||
+ for (sc = s; *sc != '\0'; ++sc)
|
||||
+ /* nothing */;
|
||||
+ return sc - s;
|
||||
+}
|
||||
+
|
||||
+void * memcpy(void * dest,const void *src,size_t count)
|
||||
+{
|
||||
+ char *tmp = (char *) dest, *s = (char *) src;
|
||||
+
|
||||
+ while (count--)
|
||||
+ *tmp++ = *s++;
|
||||
+
|
||||
+ return dest;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+/* Dummy functions to avoid linker complaints */
|
||||
+void __aeabi_unwind_cpp_pr0(void)
|
||||
+{
|
||||
+};
|
||||
+
|
||||
+void raise(void)
|
||||
+{
|
||||
+};
|
||||
+
|
||||
#endif /*__GNUC__*/
|
||||
diff --git a/csps/lpc32xx/bsps/fdi3250/source/libnosys_gnu.c b/csps/lpc32xx/bsps/fdi3250/source/libnosys_gnu.c
|
||||
index 385b0ab..f1f0a0a 100644
|
||||
--- a/csps/lpc32xx/bsps/fdi3250/source/libnosys_gnu.c
|
||||
+++ b/csps/lpc32xx/bsps/fdi3250/source/libnosys_gnu.c
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <errno.h>
|
||||
#include <sys/times.h>
|
||||
#include <sys/stat.h>
|
||||
+#include <sys/types.h>
|
||||
|
||||
/* errno definition */
|
||||
#undef errno
|
||||
@@ -125,4 +126,44 @@ int _write(int file, char *ptr, int len){
|
||||
return 0;
|
||||
}
|
||||
|
||||
+void * memset(void * s,int c,size_t count)
|
||||
+{
|
||||
+ char *xs = (char *) s;
|
||||
+
|
||||
+ while (count--)
|
||||
+ *xs++ = c;
|
||||
+
|
||||
+ return s;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+size_t strlen(const char * s)
|
||||
+{
|
||||
+ const char *sc;
|
||||
+
|
||||
+ for (sc = s; *sc != '\0'; ++sc)
|
||||
+ /* nothing */;
|
||||
+ return sc - s;
|
||||
+}
|
||||
+
|
||||
+void * memcpy(void * dest,const void *src,size_t count)
|
||||
+{
|
||||
+ char *tmp = (char *) dest, *s = (char *) src;
|
||||
+
|
||||
+ while (count--)
|
||||
+ *tmp++ = *s++;
|
||||
+
|
||||
+ return dest;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+/* Dummy functions to avoid linker complaints */
|
||||
+void __aeabi_unwind_cpp_pr0(void)
|
||||
+{
|
||||
+};
|
||||
+
|
||||
+void raise(void)
|
||||
+{
|
||||
+};
|
||||
+
|
||||
#endif /*__GNUC__*/
|
||||
diff --git a/csps/lpc32xx/bsps/phy3250/source/libnosys_gnu.c b/csps/lpc32xx/bsps/phy3250/source/libnosys_gnu.c
|
||||
index cfdb674..6b50c60 100644
|
||||
--- a/csps/lpc32xx/bsps/phy3250/source/libnosys_gnu.c
|
||||
+++ b/csps/lpc32xx/bsps/phy3250/source/libnosys_gnu.c
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <errno.h>
|
||||
#include <sys/times.h>
|
||||
#include <sys/stat.h>
|
||||
+#include <sys/types.h>
|
||||
|
||||
/* errno definition */
|
||||
#undef errno
|
||||
@@ -125,4 +126,44 @@ int _write(int file, char *ptr, int len){
|
||||
return 0;
|
||||
}
|
||||
|
||||
+void * memset(void * s,int c,size_t count)
|
||||
+{
|
||||
+ char *xs = (char *) s;
|
||||
+
|
||||
+ while (count--)
|
||||
+ *xs++ = c;
|
||||
+
|
||||
+ return s;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+size_t strlen(const char * s)
|
||||
+{
|
||||
+ const char *sc;
|
||||
+
|
||||
+ for (sc = s; *sc != '\0'; ++sc)
|
||||
+ /* nothing */;
|
||||
+ return sc - s;
|
||||
+}
|
||||
+
|
||||
+void * memcpy(void * dest,const void *src,size_t count)
|
||||
+{
|
||||
+ char *tmp = (char *) dest, *s = (char *) src;
|
||||
+
|
||||
+ while (count--)
|
||||
+ *tmp++ = *s++;
|
||||
+
|
||||
+ return dest;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+/* Dummy functions to avoid linker complaints */
|
||||
+void __aeabi_unwind_cpp_pr0(void)
|
||||
+{
|
||||
+};
|
||||
+
|
||||
+void raise(void)
|
||||
+{
|
||||
+};
|
||||
+
|
||||
#endif /*__GNUC__*/
|
||||
--
|
||||
1.7.7.3
|
||||
|
||||
521
boot/lpc32xxcdl/0004-slashes.patch
Normal file
521
boot/lpc32xxcdl/0004-slashes.patch
Normal file
@ -0,0 +1,521 @@
|
||||
Use slashes instead of backslashes
|
||||
|
||||
Signed-off-by: Alexandre Belloni <abelloni@adeneo-embedded.com>
|
||||
---
|
||||
.../bsps/common/examples/buildfiles/makefile | 10 +++---
|
||||
.../startup/examples/burners/makefile.burner | 16 +++++-----
|
||||
csps/lpc32xx/bsps/ea3250/source/makefile | 10 +++---
|
||||
csps/lpc32xx/bsps/fdi3250/source/makefile | 12 ++++----
|
||||
csps/lpc32xx/bsps/phy3250/examples/makefile | 2 +-
|
||||
csps/lpc32xx/bsps/phy3250/source/makefile | 2 +-
|
||||
.../examples/Burners/nor/kickstart/makefile | 2 +-
|
||||
.../startup/examples/Burners/nor/norerase/makefile | 2 +-
|
||||
.../startup/examples/Burners/nor/s1lapp/makefile | 2 +-
|
||||
.../examples/Burners/spi/kickstart/makefile | 2 +-
|
||||
csps/lpc32xx/source/makefile | 10 +++---
|
||||
lpc/source/makefile | 10 +++---
|
||||
makefile | 2 +-
|
||||
makerule/common/make.rules.environment | 30 ++++++++++----------
|
||||
makerule/lpc32xx/make.lpc32xx.gnu | 2 +-
|
||||
makerule/lpc32xx/make.lpc32xx.iar | 12 ++++----
|
||||
makerule/lpc32xx/make.lpc32xx.keil | 6 ++--
|
||||
makerule/lpc32xx/make.lpc32xx.rvw | 2 +-
|
||||
18 files changed, 67 insertions(+), 67 deletions(-)
|
||||
|
||||
diff --git a/csps/lpc32xx/bsps/common/examples/buildfiles/makefile b/csps/lpc32xx/bsps/common/examples/buildfiles/makefile
|
||||
index cf4977c..1da2201 100644
|
||||
--- a/csps/lpc32xx/bsps/common/examples/buildfiles/makefile
|
||||
+++ b/csps/lpc32xx/bsps/common/examples/buildfiles/makefile
|
||||
@@ -25,16 +25,16 @@
|
||||
#
|
||||
########################################################################
|
||||
|
||||
-include $(NXPMCU_SOFTWARE)\makerule\$(CSP)\make.$(CSP).$(TOOL)
|
||||
+include $(NXPMCU_SOFTWARE)/makerule/$(CSP)/make.$(CSP).$(TOOL)
|
||||
|
||||
########################################################################
|
||||
#
|
||||
# Pick up the assembler and C source files in the directory
|
||||
#
|
||||
########################################################################
|
||||
-include $(NXPMCU_SOFTWARE)\makerule\common\make.rules.ftypes
|
||||
-AFLAGS +=-I..\Include
|
||||
-CFLAGS +=-I..\Include
|
||||
+include $(NXPMCU_SOFTWARE)/makerule/common/make.rules.ftypes
|
||||
+AFLAGS +=-I../Include
|
||||
+CFLAGS +=-I../Include
|
||||
|
||||
########################################################################
|
||||
#
|
||||
@@ -42,6 +42,6 @@ CFLAGS +=-I..\Include
|
||||
#
|
||||
########################################################################
|
||||
|
||||
-include $(NXPMCU_SOFTWARE)\makerule\common\make.rules.build
|
||||
+include $(NXPMCU_SOFTWARE)/makerule/common/make.rules.build
|
||||
|
||||
|
||||
diff --git a/csps/lpc32xx/bsps/common/startup/examples/burners/makefile.burner b/csps/lpc32xx/bsps/common/startup/examples/burners/makefile.burner
|
||||
index fca3947..18bd703 100644
|
||||
--- a/csps/lpc32xx/bsps/common/startup/examples/burners/makefile.burner
|
||||
+++ b/csps/lpc32xx/bsps/common/startup/examples/burners/makefile.burner
|
||||
@@ -22,9 +22,9 @@
|
||||
#
|
||||
########################################################################
|
||||
|
||||
-COMMON_BASE := $(NXPMCU_SOFTWARE)\csps\$(CSP)\bsps\common
|
||||
-include $(NXPMCU_SOFTWARE)\makerule\$(CSP)\make.$(CSP).$(TOOL)
|
||||
-include $(COMMON_BASE)\startup\examples\buildfiles\make.env
|
||||
+COMMON_BASE := $(NXPMCU_SOFTWARE)/csps/$(CSP)/bsps/common
|
||||
+include $(NXPMCU_SOFTWARE)/makerule/$(CSP)/make.$(CSP).$(TOOL)
|
||||
+include $(COMMON_BASE)/startup/examples/buildfiles/make.env
|
||||
|
||||
########################################################################
|
||||
# ARM Realview
|
||||
@@ -38,7 +38,7 @@ AFLAGS += --predefine "USE_ALL_STACKS SETL {TRUE}"
|
||||
#AFLAGS += --predefine "RW_RELOC SETL {TRUE}"
|
||||
|
||||
# This runs from IRAM
|
||||
-LDSCRIPT =$(COMMON_BASE)\startup\examples\buildfiles\ldscript_iram_rvw.ld
|
||||
+LDSCRIPT =$(COMMON_BASE)/startup/examples/buildfiles/ldscript_iram_rvw.ld
|
||||
LDFLAGS = --remove
|
||||
MAP = --map --info=totals,sizes,unused --symbols --list
|
||||
endif
|
||||
@@ -55,7 +55,7 @@ AFLAGS += --predefine "USE_ALL_STACKS SETL {TRUE}"
|
||||
#AFLAGS += --predefine "RW_RELOC SETL {TRUE}"
|
||||
|
||||
# This runs from IRAM
|
||||
-LDSCRIPT =$(COMMON_BASE)\startup\examples\buildfiles\ldscript_iram_rvw.ld
|
||||
+LDSCRIPT =$(COMMON_BASE)/startup/examples/buildfiles/ldscript_iram_rvw.ld
|
||||
LDFLAGS = --remove
|
||||
MAP = --map --info=totals,sizes,unused --symbols --list
|
||||
endif
|
||||
@@ -72,7 +72,7 @@ AFLAGS += --defsym USE_ALL_STACKS=1
|
||||
#AFLAGS += --defsym RW_RELOC=1
|
||||
|
||||
# This runs from IRAM
|
||||
-LDSCRIPT =$(COMMON_BASE)\startup\examples\buildfiles\ldscript_iram_gnu.ld
|
||||
+LDSCRIPT =$(COMMON_BASE)/startup/examples/buildfiles/ldscript_iram_gnu.ld
|
||||
|
||||
endif
|
||||
|
||||
@@ -108,7 +108,7 @@ endif
|
||||
# Pick up the assembler and C source files in the directory
|
||||
#
|
||||
########################################################################
|
||||
-include $(NXPMCU_SOFTWARE)\makerule\common\make.rules.ftypes
|
||||
+include $(NXPMCU_SOFTWARE)/makerule/common/make.rules.ftypes
|
||||
|
||||
########################################################################
|
||||
#
|
||||
@@ -157,6 +157,6 @@ endif
|
||||
#
|
||||
########################################################################
|
||||
|
||||
-include $(NXPMCU_SOFTWARE)\makerule\common\make.rules.build
|
||||
+include $(NXPMCU_SOFTWARE)/makerule/common/make.rules.build
|
||||
|
||||
.PHONY: debug bin
|
||||
diff --git a/csps/lpc32xx/bsps/ea3250/source/makefile b/csps/lpc32xx/bsps/ea3250/source/makefile
|
||||
index 7cada25..2899b20 100644
|
||||
--- a/csps/lpc32xx/bsps/ea3250/source/makefile
|
||||
+++ b/csps/lpc32xx/bsps/ea3250/source/makefile
|
||||
@@ -22,16 +22,16 @@
|
||||
#
|
||||
########################################################################
|
||||
|
||||
-include $(NXPMCU_SOFTWARE)\makerule\$(CSP)\make.$(CSP).$(TOOL)
|
||||
+include $(NXPMCU_SOFTWARE)/makerule/$(CSP)/make.$(CSP).$(TOOL)
|
||||
|
||||
########################################################################
|
||||
#
|
||||
# Pick up the assembler and C source files in the directory
|
||||
#
|
||||
########################################################################
|
||||
-include $(NXPMCU_SOFTWARE)\makerule\common\make.rules.ftypes
|
||||
-AFLAGS +=-I..\Include
|
||||
-CFLAGS +=-I..\Include
|
||||
+include $(NXPMCU_SOFTWARE)/makerule/common/make.rules.ftypes
|
||||
+AFLAGS +=-I../Include
|
||||
+CFLAGS +=-I../Include
|
||||
|
||||
########################################################################
|
||||
#
|
||||
@@ -64,7 +64,7 @@ realclean: lib_realclean
|
||||
#
|
||||
########################################################################
|
||||
|
||||
-include $(NXPMCU_SOFTWARE)\makerule\common\make.rules.build
|
||||
+include $(NXPMCU_SOFTWARE)/makerule/common/make.rules.build
|
||||
|
||||
.PHONY: all lib_clean lib_realclean
|
||||
|
||||
diff --git a/csps/lpc32xx/bsps/fdi3250/source/makefile b/csps/lpc32xx/bsps/fdi3250/source/makefile
|
||||
index 4e153bb..11e4b63 100644
|
||||
--- a/csps/lpc32xx/bsps/fdi3250/source/makefile
|
||||
+++ b/csps/lpc32xx/bsps/fdi3250/source/makefile
|
||||
@@ -22,16 +22,16 @@
|
||||
#
|
||||
########################################################################
|
||||
|
||||
-include $(NXPMCU_SOFTWARE)\makerule\$(CSP)\make.$(CSP).$(TOOL)
|
||||
+include $(NXPMCU_SOFTWARE)/makerule/$(CSP)/make.$(CSP).$(TOOL)
|
||||
|
||||
########################################################################
|
||||
#
|
||||
# Pick up the assembler and C source files in the directory
|
||||
#
|
||||
########################################################################
|
||||
-include $(NXPMCU_SOFTWARE)\makerule\common\make.rules.ftypes
|
||||
-AFLAGS +=-I..\Include
|
||||
-CFLAGS +=-I..\Include
|
||||
+include $(NXPMCU_SOFTWARE)/makerule/common/make.rules.ftypes
|
||||
+AFLAGS +=-I../Include
|
||||
+CFLAGS +=-I../Include
|
||||
|
||||
########################################################################
|
||||
#
|
||||
@@ -53,7 +53,7 @@ lib_clean:
|
||||
# delete all targets this Makefile can make and all built libraries
|
||||
# linked in
|
||||
lib_realclean:
|
||||
- -@$(RM) $(BSP_LIB_DIR)\*.a
|
||||
+ -@$(RM) $(BSP_LIB_DIR)/*.a
|
||||
-@$(RMDIR) $(BSP_LIB_DIR)
|
||||
|
||||
clean: lib_clean
|
||||
@@ -65,7 +65,7 @@ realclean: lib_realclean
|
||||
#
|
||||
########################################################################
|
||||
|
||||
-include $(NXPMCU_SOFTWARE)\makerule\common\make.rules.build
|
||||
+include $(NXPMCU_SOFTWARE)/makerule/common/make.rules.build
|
||||
|
||||
.PHONY: all lib_clean lib_realclean
|
||||
|
||||
diff --git a/csps/lpc32xx/bsps/phy3250/examples/makefile b/csps/lpc32xx/bsps/phy3250/examples/makefile
|
||||
index b939252..e7feaa6 100644
|
||||
--- a/csps/lpc32xx/bsps/phy3250/examples/makefile
|
||||
+++ b/csps/lpc32xx/bsps/phy3250/examples/makefile
|
||||
@@ -25,7 +25,7 @@
|
||||
#
|
||||
########################################################################
|
||||
|
||||
-include $(NXPMCU_SOFTWARE)\makerule\$(CSP)\make.$(CSP).$(TOOL)
|
||||
+include $(NXPMCU_SOFTWARE)/makerule/$(CSP)/make.$(CSP).$(TOOL)
|
||||
|
||||
SUBDIRS = adc dram_self_refresh hstimer hsuart i2c kscan lcd_colorbars
|
||||
SUBDIRS += lcd_tsc mi2c mstimer pwm pwm_simple rtc sdcard sdcard_dma
|
||||
diff --git a/csps/lpc32xx/bsps/phy3250/source/makefile b/csps/lpc32xx/bsps/phy3250/source/makefile
|
||||
index 7c48e7d..750b776 100644
|
||||
--- a/csps/lpc32xx/bsps/phy3250/source/makefile
|
||||
+++ b/csps/lpc32xx/bsps/phy3250/source/makefile
|
||||
@@ -32,7 +32,7 @@ include $(NXPMCU_SOFTWARE)/makerule/$(CSP)/make.$(CSP).$(TOOL)
|
||||
# Pick up the assembler and C source files in the directory
|
||||
#
|
||||
########################################################################
|
||||
-include $(NXPMCU_SOFTWARE)\makerule\common\make.rules.ftypes
|
||||
+include $(NXPMCU_SOFTWARE)/makerule/common/make.rules.ftypes
|
||||
AFLAGS +=-I../Include
|
||||
CFLAGS +=-I../Include
|
||||
|
||||
diff --git a/csps/lpc32xx/bsps/phy3250/startup/examples/Burners/nor/kickstart/makefile b/csps/lpc32xx/bsps/phy3250/startup/examples/Burners/nor/kickstart/makefile
|
||||
index 01e2b38..526d6cc 100644
|
||||
--- a/csps/lpc32xx/bsps/phy3250/startup/examples/Burners/nor/kickstart/makefile
|
||||
+++ b/csps/lpc32xx/bsps/phy3250/startup/examples/Burners/nor/kickstart/makefile
|
||||
@@ -78,7 +78,7 @@ endif
|
||||
|
||||
########################################################################
|
||||
#
|
||||
-# Compiler\linker specific stuff
|
||||
+# Compiler/linker specific stuff
|
||||
#
|
||||
########################################################################
|
||||
|
||||
diff --git a/csps/lpc32xx/bsps/phy3250/startup/examples/Burners/nor/norerase/makefile b/csps/lpc32xx/bsps/phy3250/startup/examples/Burners/nor/norerase/makefile
|
||||
index ce329f5..e81b8db 100644
|
||||
--- a/csps/lpc32xx/bsps/phy3250/startup/examples/Burners/nor/norerase/makefile
|
||||
+++ b/csps/lpc32xx/bsps/phy3250/startup/examples/Burners/nor/norerase/makefile
|
||||
@@ -77,7 +77,7 @@ endif
|
||||
|
||||
########################################################################
|
||||
#
|
||||
-# Compiler\linker specific stuff
|
||||
+# Compiler/linker specific stuff
|
||||
#
|
||||
########################################################################
|
||||
|
||||
diff --git a/csps/lpc32xx/bsps/phy3250/startup/examples/Burners/nor/s1lapp/makefile b/csps/lpc32xx/bsps/phy3250/startup/examples/Burners/nor/s1lapp/makefile
|
||||
index 4426fc7..196faec 100644
|
||||
--- a/csps/lpc32xx/bsps/phy3250/startup/examples/Burners/nor/s1lapp/makefile
|
||||
+++ b/csps/lpc32xx/bsps/phy3250/startup/examples/Burners/nor/s1lapp/makefile
|
||||
@@ -77,7 +77,7 @@ endif
|
||||
|
||||
########################################################################
|
||||
#
|
||||
-# Compiler\linker specific stuff
|
||||
+# Compiler/linker specific stuff
|
||||
#
|
||||
########################################################################
|
||||
|
||||
diff --git a/csps/lpc32xx/bsps/phy3250/startup/examples/Burners/spi/kickstart/makefile b/csps/lpc32xx/bsps/phy3250/startup/examples/Burners/spi/kickstart/makefile
|
||||
index dc73b64..39fc304 100644
|
||||
--- a/csps/lpc32xx/bsps/phy3250/startup/examples/Burners/spi/kickstart/makefile
|
||||
+++ b/csps/lpc32xx/bsps/phy3250/startup/examples/Burners/spi/kickstart/makefile
|
||||
@@ -78,7 +78,7 @@ endif
|
||||
|
||||
########################################################################
|
||||
#
|
||||
-# Compiler\linker specific stuff
|
||||
+# Compiler/linker specific stuff
|
||||
#
|
||||
########################################################################
|
||||
|
||||
diff --git a/csps/lpc32xx/source/makefile b/csps/lpc32xx/source/makefile
|
||||
index 8e05456..16bd944 100644
|
||||
--- a/csps/lpc32xx/source/makefile
|
||||
+++ b/csps/lpc32xx/source/makefile
|
||||
@@ -25,16 +25,16 @@
|
||||
#
|
||||
########################################################################
|
||||
|
||||
-include $(NXPMCU_SOFTWARE)\makerule\$(CSP)\make.$(CSP).$(TOOL)
|
||||
+include $(NXPMCU_SOFTWARE)/makerule/$(CSP)/make.$(CSP).$(TOOL)
|
||||
|
||||
########################################################################
|
||||
#
|
||||
# Pick up the assembler and C source files in the directory
|
||||
#
|
||||
########################################################################
|
||||
-include $(NXPMCU_SOFTWARE)\makerule\common\make.rules.ftypes
|
||||
-AFLAGS +=-I..\Include
|
||||
-CFLAGS +=-I..\Include
|
||||
+include $(NXPMCU_SOFTWARE)/makerule/common/make.rules.ftypes
|
||||
+AFLAGS +=-I../Include
|
||||
+CFLAGS +=-I../Include
|
||||
|
||||
|
||||
########################################################################
|
||||
@@ -68,7 +68,7 @@ realclean: lib_realclean
|
||||
#
|
||||
########################################################################
|
||||
|
||||
-include $(NXPMCU_SOFTWARE)\makerule\common\make.rules.build
|
||||
+include $(NXPMCU_SOFTWARE)/makerule/common/make.rules.build
|
||||
|
||||
.PHONY: all lib_clean lib_realclean
|
||||
|
||||
diff --git a/lpc/source/makefile b/lpc/source/makefile
|
||||
index 2860db9..ae7d612 100644
|
||||
--- a/lpc/source/makefile
|
||||
+++ b/lpc/source/makefile
|
||||
@@ -25,16 +25,16 @@
|
||||
#
|
||||
########################################################################
|
||||
|
||||
-include $(NXPMCU_SOFTWARE)\makerule\$(CSP)\make.$(CSP).$(TOOL)
|
||||
+include $(NXPMCU_SOFTWARE)/makerule/$(CSP)/make.$(CSP).$(TOOL)
|
||||
|
||||
########################################################################
|
||||
#
|
||||
# Pick up the assembler and C source files in the directory
|
||||
#
|
||||
########################################################################
|
||||
-include $(NXPMCU_SOFTWARE)\makerule\common\make.rules.ftypes
|
||||
-AFLAGS +=-I..\Include
|
||||
-CFLAGS +=-I..\Include
|
||||
+include $(NXPMCU_SOFTWARE)/makerule/common/make.rules.ftypes
|
||||
+AFLAGS +=-I../Include
|
||||
+CFLAGS +=-I../Include
|
||||
|
||||
########################################################################
|
||||
#
|
||||
@@ -67,7 +67,7 @@ realclean: lib_realclean
|
||||
#
|
||||
########################################################################
|
||||
|
||||
-include $(NXPMCU_SOFTWARE)\makerule\common\make.rules.build
|
||||
+include $(NXPMCU_SOFTWARE)/makerule/common/make.rules.build
|
||||
|
||||
.PHONY: all lib_clean lib_realclean
|
||||
|
||||
diff --git a/makefile b/makefile
|
||||
index 8645fcc..86fa6bc 100644
|
||||
--- a/makefile
|
||||
+++ b/makefile
|
||||
@@ -34,7 +34,7 @@ TARGETS_CLN =gen_clean csp_clean bsp_clean
|
||||
#
|
||||
########################################################################
|
||||
|
||||
-include $(NXPMCU_SOFTWARE)\makerule\$(CSP)\make.$(CSP).$(TOOL)
|
||||
+include $(NXPMCU_SOFTWARE)/makerule/$(CSP)/make.$(CSP).$(TOOL)
|
||||
|
||||
########################################################################
|
||||
#
|
||||
diff --git a/makerule/common/make.rules.environment b/makerule/common/make.rules.environment
|
||||
index d5737fe..4e6df48 100644
|
||||
--- a/makerule/common/make.rules.environment
|
||||
+++ b/makerule/common/make.rules.environment
|
||||
@@ -52,7 +52,7 @@ ASTYLE =astyle --options=$(BUILD_ROOT)/tools/astyle.cfg
|
||||
#
|
||||
########################################################################
|
||||
|
||||
-CSP_LIB_DIR =$(BUILD_ROOT)\csps\$(CSP)\lib
|
||||
+CSP_LIB_DIR =$(BUILD_ROOT)/csps/$(CSP)/lib
|
||||
|
||||
########################################################################
|
||||
#
|
||||
@@ -60,7 +60,7 @@ CSP_LIB_DIR =$(BUILD_ROOT)\csps\$(CSP)\lib
|
||||
#
|
||||
########################################################################
|
||||
|
||||
-BSP_LIB_DIR =$(BUILD_ROOT)\csps\$(CSP)\bsps\$(BSP)\lib
|
||||
+BSP_LIB_DIR =$(BUILD_ROOT)/csps/$(CSP)/bsps/$(BSP)/lib
|
||||
|
||||
########################################################################
|
||||
#
|
||||
@@ -68,7 +68,7 @@ BSP_LIB_DIR =$(BUILD_ROOT)\csps\$(CSP)\bsps\$(BSP)\lib
|
||||
#
|
||||
########################################################################
|
||||
|
||||
-GEN_LIB_DIR =$(BUILD_ROOT)\$(GEN)\lib
|
||||
+GEN_LIB_DIR =$(BUILD_ROOT)/$(GEN)/lib
|
||||
|
||||
########################################################################
|
||||
#
|
||||
@@ -76,9 +76,9 @@ GEN_LIB_DIR =$(BUILD_ROOT)\$(GEN)\lib
|
||||
#
|
||||
########################################################################
|
||||
|
||||
-CSP_DIR =$(BUILD_ROOT)\csps\$(CSP)
|
||||
-CSP_SRC_DIR =$(CSP_DIR)\source
|
||||
-CSP_INC_DIR =$(CSP_DIR)\include
|
||||
+CSP_DIR =$(BUILD_ROOT)/csps/$(CSP)
|
||||
+CSP_SRC_DIR =$(CSP_DIR)/source
|
||||
+CSP_INC_DIR =$(CSP_DIR)/include
|
||||
|
||||
########################################################################
|
||||
#
|
||||
@@ -86,9 +86,9 @@ CSP_INC_DIR =$(CSP_DIR)\include
|
||||
#
|
||||
########################################################################
|
||||
|
||||
-BSP_DIR =$(BUILD_ROOT)\csps\$(CSP)\bsps\$(BSP)
|
||||
-BSP_SRC_DIR =$(BSP_DIR)\source
|
||||
-BSP_INC_DIR =$(BSP_DIR)\include
|
||||
+BSP_DIR =$(BUILD_ROOT)/csps/$(CSP)/bsps/$(BSP)
|
||||
+BSP_SRC_DIR =$(BSP_DIR)/source
|
||||
+BSP_INC_DIR =$(BSP_DIR)/include
|
||||
|
||||
########################################################################
|
||||
#
|
||||
@@ -96,9 +96,9 @@ BSP_INC_DIR =$(BSP_DIR)\include
|
||||
#
|
||||
########################################################################
|
||||
|
||||
-GEN_DIR =$(BUILD_ROOT)\$(GEN)
|
||||
-GEN_SRC_DIR =$(GEN_DIR)\source
|
||||
-GEN_INC_DIR =$(GEN_DIR)\include
|
||||
+GEN_DIR =$(BUILD_ROOT)/$(GEN)
|
||||
+GEN_SRC_DIR =$(GEN_DIR)/source
|
||||
+GEN_INC_DIR =$(GEN_DIR)/include
|
||||
|
||||
########################################################################
|
||||
#
|
||||
@@ -151,6 +151,6 @@ endif
|
||||
#
|
||||
########################################################################
|
||||
|
||||
-TARGET_CSP_LIB =$(CSP_LIB_DIR)\$(CSP_ARCHIVE)
|
||||
-TARGET_BSP_LIB =$(BSP_LIB_DIR)\$(BSP_ARCHIVE)
|
||||
-TARGET_GEN_LIB =$(GEN_LIB_DIR)\$(GEN_ARCHIVE)
|
||||
+TARGET_CSP_LIB =$(CSP_LIB_DIR)/$(CSP_ARCHIVE)
|
||||
+TARGET_BSP_LIB =$(BSP_LIB_DIR)/$(BSP_ARCHIVE)
|
||||
+TARGET_GEN_LIB =$(GEN_LIB_DIR)/$(GEN_ARCHIVE)
|
||||
diff --git a/makerule/lpc32xx/make.lpc32xx.gnu b/makerule/lpc32xx/make.lpc32xx.gnu
|
||||
index 3277d99..d80b98d 100644
|
||||
--- a/makerule/lpc32xx/make.lpc32xx.gnu
|
||||
+++ b/makerule/lpc32xx/make.lpc32xx.gnu
|
||||
@@ -19,7 +19,7 @@
|
||||
# use without further testing or modification.
|
||||
########################################################################
|
||||
|
||||
-include $(NXPMCU_SOFTWARE)\makerule\common\make.rules.environment
|
||||
+include $(NXPMCU_SOFTWARE)/makerule/common/make.rules.environment
|
||||
|
||||
CPU = arm926ej-s
|
||||
CFLAGS = -mcpu=arm926ej-s -Wall -Os
|
||||
diff --git a/makerule/lpc32xx/make.lpc32xx.iar b/makerule/lpc32xx/make.lpc32xx.iar
|
||||
index 238ebbf..27d163f 100644
|
||||
--- a/makerule/lpc32xx/make.lpc32xx.iar
|
||||
+++ b/makerule/lpc32xx/make.lpc32xx.iar
|
||||
@@ -19,12 +19,12 @@
|
||||
# use without further testing or modification.
|
||||
########################################################################
|
||||
|
||||
-include $(NXPMCU_SOFTWARE)\makerule\common\make.rules.environment
|
||||
+include $(NXPMCU_SOFTWARE)/makerule/common/make.rules.environment
|
||||
|
||||
-IARBASE = $(IAR_ROOT)\ARM
|
||||
-IARTOOLS = $(IARBASE)\bin
|
||||
-IAR_LIB = $(IARBASE)\lib
|
||||
-IAR_INC = $(IARBASE)\inc
|
||||
+IARBASE = $(IAR_ROOT)/ARM
|
||||
+IARTOOLS = $(IARBASE)/bin
|
||||
+IAR_LIB = $(IARBASE)/lib
|
||||
+IAR_INC = $(IARBASE)/inc
|
||||
CC = iccarm
|
||||
CCP = iccarm
|
||||
AS = iasmarm
|
||||
@@ -36,7 +36,7 @@ CFLAGS += -I"$(IAR_INC)"
|
||||
AFLAGS = --cpu 5TEJ
|
||||
LDFLAGS =
|
||||
LK = "$(TARGET_GEN_LIB)" "$(TARGET_CSP_LIB)" "$(TARGET_BSP_LIB)"
|
||||
-;LK += "$(IAR_LIB)\dl4tpannl8f.r79"
|
||||
+;LK += "$(IAR_LIB)/dl4tpannl8f.r79"
|
||||
MAP = --map
|
||||
LDESC = --config
|
||||
ENTRY = --entry
|
||||
diff --git a/makerule/lpc32xx/make.lpc32xx.keil b/makerule/lpc32xx/make.lpc32xx.keil
|
||||
index dd27583..7334d3f 100644
|
||||
--- a/makerule/lpc32xx/make.lpc32xx.keil
|
||||
+++ b/makerule/lpc32xx/make.lpc32xx.keil
|
||||
@@ -19,7 +19,7 @@
|
||||
# use without further testing or modification.
|
||||
########################################################################
|
||||
|
||||
-include $(NXPMCU_SOFTWARE)\makerule\common\make.rules.environment
|
||||
+include $(NXPMCU_SOFTWARE)/makerule/common/make.rules.environment
|
||||
|
||||
CC =armcc
|
||||
CCP =armcc
|
||||
@@ -27,11 +27,11 @@ AS =armasm
|
||||
LD =armlink
|
||||
AR =armar -r -s
|
||||
CFLAGS =--arm -O3 -g --device DARMP3 -D__MICROLIB
|
||||
-CFLAGS +=-I$(KEIL_RVCT)\inc -I$(CSP_INC_DIR) -I$(BSP_INC_DIR) -I$(GEN_INC_DIR)
|
||||
+CFLAGS +=-I$(KEIL_RVCT)/inc -I$(CSP_INC_DIR) -I$(BSP_INC_DIR) -I$(GEN_INC_DIR)
|
||||
AFLAGS =--arm --device=DARMP3
|
||||
AFLAGS +=-I$(CSP_INC_DIR) -I$(BSP_INC_DIR) -I$(GEN_INC_DIR)
|
||||
LDFLAGS =--noremove
|
||||
-LK =--device DARMP3 --libpath $(KEIL_RVCT)\lib --scan $(TARGET_CSP_LIB)
|
||||
+LK =--device DARMP3 --libpath $(KEIL_RVCT)/lib --scan $(TARGET_CSP_LIB)
|
||||
LK +=--scan $(TARGET_BSP_LIB)
|
||||
LK +=--scan $(TARGET_GEN_LIB)
|
||||
MAP =--map --list
|
||||
diff --git a/makerule/lpc32xx/make.lpc32xx.rvw b/makerule/lpc32xx/make.lpc32xx.rvw
|
||||
index 59961dd..2419976 100644
|
||||
--- a/makerule/lpc32xx/make.lpc32xx.rvw
|
||||
+++ b/makerule/lpc32xx/make.lpc32xx.rvw
|
||||
@@ -19,7 +19,7 @@
|
||||
# use without further testing or modification.
|
||||
########################################################################
|
||||
|
||||
-include $(NXPMCU_SOFTWARE)\makerule\common\make.rules.environment
|
||||
+include $(NXPMCU_SOFTWARE)/makerule/common/make.rules.environment
|
||||
|
||||
CC =armcc
|
||||
CCP =armcpp
|
||||
--
|
||||
1.7.7.3
|
||||
|
||||
10
boot/lpc32xxcdl/Config.in
Normal file
10
boot/lpc32xxcdl/Config.in
Normal file
@ -0,0 +1,10 @@
|
||||
config BR2_TARGET_LPC32XXCDL
|
||||
bool "LPC32XX CDL (kickstart and S1L)"
|
||||
depends on BR2_arm926t
|
||||
|
||||
if BR2_TARGET_LPC32XXCDL
|
||||
|
||||
config BR2_TARGET_LPC32XXCDL_BOARDNAME
|
||||
string "LPC32xx board name"
|
||||
|
||||
endif #BR2_TARGET_LPC32XXCDL
|
||||
2
boot/lpc32xxcdl/lpc32xxcdl.hash
Normal file
2
boot/lpc32xxcdl/lpc32xxcdl.hash
Normal file
@ -0,0 +1,2 @@
|
||||
# Locally computed
|
||||
sha256 ded3fa936a96d3fb8188ca6214f57b5208bd49e5416bd69f38bfc810b34197bc lpc32xx_cdl-v2.11.zip
|
||||
71
boot/lpc32xxcdl/lpc32xxcdl.mk
Normal file
71
boot/lpc32xxcdl/lpc32xxcdl.mk
Normal file
@ -0,0 +1,71 @@
|
||||
################################################################################
|
||||
#
|
||||
# lpc32xxcdl
|
||||
#
|
||||
################################################################################
|
||||
|
||||
LPC32XXCDL_VERSION = 2.11
|
||||
LPC32XXCDL_SOURCE = lpc32xx_cdl-v$(LPC32XXCDL_VERSION).zip
|
||||
LPC32XXCDL_SITE = https://community.nxp.com/pwmxy87654/attachments/pwmxy87654/lpcware-archive/61/2
|
||||
|
||||
LPC32XXCDL_INSTALL_TARGET = NO
|
||||
LPC32XXCDL_INSTALL_IMAGES = YES
|
||||
|
||||
ifeq ($(BR2_TARGET_LPC32XXCDL_BOARDNAME),"ea3250")
|
||||
LPC32XXCDL_KICKSTART = kickstart/nand
|
||||
LPC32XXCDL_KICKSTART_BURNER = nand/kickstart
|
||||
LPC32XXCDL_S1L = s1l
|
||||
LPC32XXCDL_S1L_BURNER = nand/s1lapp
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_LPC32XXCDL_BOARDNAME),"phy3250")
|
||||
LPC32XXCDL_KICKSTART = kickstart/kickstart_nand
|
||||
LPC32XXCDL_KICKSTART_BURNER = nand/kickstart
|
||||
LPC32XXCDL_S1L = s1l/s1l_nand_boot
|
||||
LPC32XXCDL_S1L_BURNER = nand/s1lapp
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_LPC32XXCDL_BOARDNAME),"fdi3250")
|
||||
LPC32XXCDL_KICKSTART = kickstart/nand
|
||||
LPC32XXCDL_KICKSTART_BURNER = nand/kickstart_jtag
|
||||
LPC32XXCDL_S1L = s1l
|
||||
LPC32XXCDL_S1L_BURNER = nand/s1lapp_jtag
|
||||
endif
|
||||
|
||||
LPC32XXCDL_BUILD_FLAGS = \
|
||||
CROSS_COMPILE=$(TARGET_CROSS) \
|
||||
NXPMCU_WINBASE=$(@D) \
|
||||
NXPMCU_SOFTWARE=$(@D) \
|
||||
BSP=$(BR2_TARGET_LPC32XXCDL_BOARDNAME) \
|
||||
CSP=lpc32xx TOOL=gnu GEN=lpc
|
||||
|
||||
LPC32XXCDL_BOARD_STARTUP_DIR = \
|
||||
csps/lpc32xx/bsps/$(BR2_TARGET_LPC32XXCDL_BOARDNAME)/startup/examples/
|
||||
|
||||
# Source files are with dos newlines, which our patch infrastructure doesn't
|
||||
# handle. Work around it by converting the affected files to unix newlines
|
||||
# before patching
|
||||
define LPC32XXCDL_EXTRACT_CMDS
|
||||
unzip $(LPC32XXCDL_DL_DIR)/$(LPC32XXCDL_SOURCE) -d $(@D)
|
||||
mv $(@D)/lpc3xxx_cdl/* $(@D)
|
||||
rmdir $(@D)/lpc3xxx_cdl/
|
||||
sed -n 's|^[+-]\{3\} [^/]\+\([^ \t]*\)\(.*\)|$(@D)\1|p' \
|
||||
boot/lpc32xxcdl/*.patch| sort -u | xargs $(SED) 's/\x0D$$//'
|
||||
endef
|
||||
|
||||
define LPC32XXCDL_BUILD_CMDS
|
||||
$(MAKE1) $(LPC32XXCDL_BUILD_FLAGS) -C $(@D)
|
||||
$(MAKE1) $(LPC32XXCDL_BUILD_FLAGS) -C $(@D)/$(LPC32XXCDL_BOARD_STARTUP_DIR)/Burners/$(LPC32XXCDL_KICKSTART_BURNER)
|
||||
$(MAKE1) $(LPC32XXCDL_BUILD_FLAGS) -C $(@D)/$(LPC32XXCDL_BOARD_STARTUP_DIR)/$(LPC32XXCDL_KICKSTART)
|
||||
$(MAKE1) $(LPC32XXCDL_BUILD_FLAGS) -C $(@D)/$(LPC32XXCDL_BOARD_STARTUP_DIR)/Burners/$(LPC32XXCDL_S1L_BURNER)
|
||||
$(MAKE1) $(LPC32XXCDL_BUILD_FLAGS) -C $(@D)/$(LPC32XXCDL_BOARD_STARTUP_DIR)/$(LPC32XXCDL_S1L)
|
||||
endef
|
||||
|
||||
define LPC32XXCDL_INSTALL_IMAGES_CMDS
|
||||
cp $(@D)/$(LPC32XXCDL_BOARD_STARTUP_DIR)/Burners/$(LPC32XXCDL_KICKSTART_BURNER)/*gnu.bin $(BINARIES_DIR)
|
||||
cp $(@D)/$(LPC32XXCDL_BOARD_STARTUP_DIR)/$(LPC32XXCDL_KICKSTART)/*gnu.bin $(BINARIES_DIR)
|
||||
cp $(@D)/$(LPC32XXCDL_BOARD_STARTUP_DIR)/Burners/$(LPC32XXCDL_S1L_BURNER)/*gnu.bin $(BINARIES_DIR)
|
||||
cp $(@D)/$(LPC32XXCDL_BOARD_STARTUP_DIR)/$(LPC32XXCDL_S1L)/*gnu.bin $(BINARIES_DIR)
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
10
boot/mv-ddr-marvell/Config.in
Normal file
10
boot/mv-ddr-marvell/Config.in
Normal file
@ -0,0 +1,10 @@
|
||||
config BR2_TARGET_MV_DDR_MARVELL
|
||||
bool "mv-ddr-marvell"
|
||||
depends on BR2_aarch64
|
||||
help
|
||||
Marvell keeps algorithms for DDR training in a separate
|
||||
repository. This code is not built separately, it is needed
|
||||
as a dependency to build ATF firmware for Marvell Armada 7040
|
||||
and 8040 SoCs.
|
||||
|
||||
https://github.com/MarvellEmbeddedProcessors/mv-ddr-marvell/
|
||||
3
boot/mv-ddr-marvell/mv-ddr-marvell.hash
Normal file
3
boot/mv-ddr-marvell/mv-ddr-marvell.hash
Normal file
@ -0,0 +1,3 @@
|
||||
# Locally calculated
|
||||
sha256 16f02232e21a15979b3d9971e28f7e59562484a5c1f99c2b28c248a3b76a63fa mv-ddr-marvell-d5acc10c287e40cc2feeb28710b92e45c93c702c.tar.gz
|
||||
sha256 907a03943ca940790e97620aca8d46b5b04c653dcf2ab6c66a25238b60cf5635 ddr3_init.c
|
||||
13
boot/mv-ddr-marvell/mv-ddr-marvell.mk
Normal file
13
boot/mv-ddr-marvell/mv-ddr-marvell.mk
Normal file
@ -0,0 +1,13 @@
|
||||
################################################################################
|
||||
#
|
||||
# mv-ddr-marvell
|
||||
#
|
||||
################################################################################
|
||||
|
||||
# This is the latest commit on mv-ddr-devel as of 20220529
|
||||
MV_DDR_MARVELL_VERSION = d5acc10c287e40cc2feeb28710b92e45c93c702c
|
||||
MV_DDR_MARVELL_SITE = $(call github,MarvellEmbeddedProcessors,mv-ddr-marvell,$(MV_DDR_MARVELL_VERSION))
|
||||
MV_DDR_MARVELL_LICENSE = GPL-2.0+ or LGPL-2.1 with freertos-exception-2.0, BSD-3-Clause, Marvell Commercial
|
||||
MV_DDR_MARVELL_LICENSE_FILES = ddr3_init.c
|
||||
|
||||
$(eval $(generic-package))
|
||||
90
boot/mxs-bootlets/Config.in
Normal file
90
boot/mxs-bootlets/Config.in
Normal file
@ -0,0 +1,90 @@
|
||||
config BR2_TARGET_MXS_BOOTLETS
|
||||
bool "mxs-bootlets"
|
||||
depends on BR2_arm
|
||||
help
|
||||
Stage1 bootloaders for Freescale iMX23/iMX28 SoCs
|
||||
|
||||
if BR2_TARGET_MXS_BOOTLETS
|
||||
|
||||
choice
|
||||
prompt "Source"
|
||||
default BR2_TARGET_MXS_BOOTLETS_FREESCALE
|
||||
help
|
||||
Select the location of the bootlets you want to use
|
||||
|
||||
config BR2_TARGET_MXS_BOOTLETS_FREESCALE
|
||||
bool "Freescale 10.12.01 version"
|
||||
|
||||
config BR2_TARGET_MXS_BOOTLETS_CUSTOM_TARBALL
|
||||
bool "Custom tarball"
|
||||
|
||||
config BR2_TARGET_MXS_BOOTLETS_CUSTOM_GIT
|
||||
bool "Custom Git repository"
|
||||
|
||||
endchoice
|
||||
|
||||
config BR2_TARGET_MXS_BOOTLETS_CUSTOM_TARBALL_URL
|
||||
string "URL of custom bootlets tarball"
|
||||
depends on BR2_TARGET_MXS_BOOTLETS_CUSTOM_TARBALL
|
||||
|
||||
if BR2_TARGET_MXS_BOOTLETS_CUSTOM_GIT
|
||||
|
||||
config BR2_TARGET_MXS_BOOTLETS_CUSTOM_GIT_URL
|
||||
string "URL of custom Git repository"
|
||||
|
||||
config BR2_TARGET_MXS_BOOTLETS_CUSTOM_GIT_VERSION
|
||||
string "Custom Git version"
|
||||
|
||||
endif
|
||||
|
||||
choice
|
||||
prompt "Bootstream"
|
||||
help
|
||||
Select which bootstream to generate
|
||||
|
||||
config BR2_TARGET_MXS_BOOTLETS_BAREBOX
|
||||
bool "Barebox Bootloader"
|
||||
depends on BR2_TARGET_BAREBOX
|
||||
|
||||
config BR2_TARGET_MXS_BOOTLETS_LINUX
|
||||
bool "Linux Kernel"
|
||||
depends on BR2_LINUX_KERNEL
|
||||
|
||||
config BR2_TARGET_MXS_BOOTLETS_UBOOT
|
||||
bool "U-boot bootloader"
|
||||
depends on BR2_TARGET_UBOOT
|
||||
|
||||
endchoice
|
||||
|
||||
config BR2_TARGET_MXS_BOOTLETS_HAS_IVT
|
||||
bool "HAB Support"
|
||||
help
|
||||
Enable this option if you are building bootlets
|
||||
for the iMX28 platform that needs to include instructions
|
||||
for the secure boot mechanism present on these SoCs
|
||||
|
||||
choice
|
||||
prompt "Board"
|
||||
help
|
||||
Select the board to build the bootlets for
|
||||
|
||||
config BR2_TARGET_MXS_BOOTLETS_STMP37xx
|
||||
bool "Sigmatel ST-MP3-7xx Board"
|
||||
|
||||
config BR2_TARGET_MXS_BOOTLETS_STMP378x
|
||||
bool "Sigmatel ST-MP3-78x Board"
|
||||
|
||||
config BR2_TARGET_MXS_BOOTLETS_IMX28EVK
|
||||
bool "Freescale iMX28 EVK Board"
|
||||
|
||||
config BR2_TARGET_MXS_BOOTLETS_CUSTOM_BOARD
|
||||
bool "Custom board"
|
||||
endchoice
|
||||
|
||||
config BR2_TARGET_MXS_BOOTLETS_CUSTOM_BOARD_NAME
|
||||
string "Custom board name"
|
||||
depends on BR2_TARGET_MXS_BOOTLETS_CUSTOM_BOARD
|
||||
help
|
||||
Name of the board to build the bootlets for
|
||||
|
||||
endif
|
||||
34
boot/mxs-bootlets/barebox_ivt.bd
Normal file
34
boot/mxs-bootlets/barebox_ivt.bd
Normal file
@ -0,0 +1,34 @@
|
||||
// STMP378x ROM command script to load and run U-Boot
|
||||
|
||||
sources {
|
||||
power_prep="./power_prep/power_prep";
|
||||
sdram_prep="./boot_prep/boot_prep";
|
||||
barebox="./barebox";
|
||||
}
|
||||
|
||||
section (0) {
|
||||
|
||||
//----------------------------------------------------------
|
||||
// Power Supply initialization
|
||||
//----------------------------------------------------------
|
||||
|
||||
load power_prep;
|
||||
load ivt (entry = power_prep:_start) > 0x8000;
|
||||
hab call 0x8000;
|
||||
|
||||
//----------------------------------------------------------
|
||||
// SDRAM initialization
|
||||
//----------------------------------------------------------
|
||||
|
||||
load sdram_prep;
|
||||
load ivt (entry = sdram_prep:_start) > 0x8000;
|
||||
hab call 0x8000;
|
||||
//----------------------------------------------------------
|
||||
// Load and call u_boot - ELF ARM image
|
||||
//----------------------------------------------------------
|
||||
|
||||
load barebox;
|
||||
load ivt (entry = barebox:start) > 0x8000;
|
||||
hab call 0x8000;
|
||||
|
||||
}
|
||||
2
boot/mxs-bootlets/mxs-bootlets.hash
Normal file
2
boot/mxs-bootlets/mxs-bootlets.hash
Normal file
@ -0,0 +1,2 @@
|
||||
# locally computed
|
||||
sha256 63f6068ae36884adef4259bbb1fe2591755718f22c46d0a59d854883dfab1ffc imx-bootlets-src-10.12.01.tar.gz
|
||||
106
boot/mxs-bootlets/mxs-bootlets.mk
Normal file
106
boot/mxs-bootlets/mxs-bootlets.mk
Normal file
@ -0,0 +1,106 @@
|
||||
################################################################################
|
||||
#
|
||||
# mxs-bootlets
|
||||
#
|
||||
################################################################################
|
||||
|
||||
ifeq ($(BR2_TARGET_MXS_BOOTLETS_CUSTOM_TARBALL),y)
|
||||
MXS_BOOTLETS_TARBALL = $(call qstrip,$(BR2_TARGET_MXS_BOOTLETS_CUSTOM_TARBALL_URL))
|
||||
MXS_BOOTLETS_SITE = $(patsubst %/,%,$(dir $(MXS_BOOTLETS_TARBALL)))
|
||||
MXS_BOOTLETS_SOURCE = $(notdir $(MXS_BOOTLETS_TARBALL))
|
||||
BR_NO_CHECK_HASH_FOR += $(MXS_BOOTLETS_SOURCE)
|
||||
else ifeq ($(BR2_TARGET_MXS_BOOTLETS_CUSTOM_GIT),y)
|
||||
MXS_BOOTLETS_SITE = $(BR2_TARGET_MXS_BOOTLETS_CUSTOM_GIT_URL)
|
||||
MXS_BOOTLETS_SITE_METHOD = git
|
||||
MXS_BOOTLETS_VERSION = $(call qstrip,$(BR2_TARGET_MXS_BOOTLETS_CUSTOM_GIT_VERSION))
|
||||
BR_NO_CHECK_HASH_FOR += $(MXS_BOOTLETS_SOURCE)
|
||||
else
|
||||
MXS_BOOTLETS_VERSION = 10.12.01
|
||||
MXS_BOOTLETS_SITE = http://download.ossystems.com.br/bsp/freescale/source
|
||||
MXS_BOOTLETS_SOURCE = imx-bootlets-src-$(MXS_BOOTLETS_VERSION).tar.gz
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_MXS_BOOTLETS_STMP37xx),y)
|
||||
MXS_BOOTLETS_BOARD = stmp37xx_dev
|
||||
else ifeq ($(BR2_TARGET_MXS_BOOTLETS_STMP378x),y)
|
||||
MXS_BOOTLETS_BOARD = stmp378x_dev
|
||||
else ifeq ($(BR2_TARGET_MXS_BOOTLETS_IMX28EVK),y)
|
||||
MXS_BOOTLETS_BOARD = iMX28_EVK
|
||||
else ifeq ($(BR2_TARGET_MXS_BOOTLETS_CUSTOM_BOARD),y)
|
||||
MXS_BOOTLETS_BOARD = $(call qstrip,$(BR2_TARGET_MXS_BOOTLETS_CUSTOM_BOARD_NAME))
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_MXS_BOOTLETS_HAS_IVT),y)
|
||||
MXS_BOOTLETS_IVT_SUFFIX = _ivt
|
||||
MXS_BOOTLETS_ELFTOSB_OPTIONS += -f imx28
|
||||
endif
|
||||
|
||||
MXS_BOOTLETS_DEPENDENCIES = host-elftosb
|
||||
MXS_BOOTLETS_LICENSE = GPL-2.0+
|
||||
|
||||
ifeq ($(BR2_TARGET_MXS_BOOTLETS_BAREBOX),y)
|
||||
MXS_BOOTLETS_DEPENDENCIES += barebox
|
||||
MXS_BOOTLETS_BOOTDESC = barebox$(MXS_BOOTLETS_IVT_SUFFIX).bd
|
||||
MXS_BOOTLETS_BOOTSTREAM = $(MXS_BOOTLETS_BOARD)_barebox$(MXS_BOOTLETS_IVT_SUFFIX).sb
|
||||
|
||||
else ifeq ($(BR2_TARGET_MXS_BOOTLETS_LINUX),y)
|
||||
MXS_BOOTLETS_DEPENDENCIES += linux
|
||||
MXS_BOOTLETS_BOOTDESC = linux$(MXS_BOOTLETS_IVT_SUFFIX).bd
|
||||
MXS_BOOTLETS_BOOTSTREAM = $(MXS_BOOTLETS_BOARD)_linux$(MXS_BOOTLETS_IVT_SUFFIX).sb
|
||||
|
||||
else ifeq ($(BR2_TARGET_MXS_BOOTLETS_UBOOT),y)
|
||||
MXS_BOOTLETS_DEPENDENCIES += uboot
|
||||
MXS_BOOTLETS_BOOTDESC = uboot$(MXS_BOOTLETS_IVT_SUFFIX).bd
|
||||
MXS_BOOTLETS_BOOTSTREAM = $(MXS_BOOTLETS_BOARD)_uboot$(MXS_BOOTLETS_IVT_SUFFIX).sb
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_MXS_BOOTLETS_BAREBOX),y)
|
||||
define MXS_BOOTLETS_SED_BAREBOX
|
||||
sed -i 's,[^ *]barebox.*;,\tbarebox="$(BAREBOX_DIR)/barebox";,' $(@D)/$(MXS_BOOTLETS_BOOTDESC)
|
||||
endef
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_MXS_BOOTLETS_LINUX),y)
|
||||
define MXS_BOOTLETS_BUILD_LINUX_PREP
|
||||
BOARD=$(MXS_BOOTLETS_BOARD) CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||
$(MAKE1) -C $(@D) linux_prep
|
||||
endef
|
||||
define MXS_BOOTLETS_SED_LINUX
|
||||
sed -i 's,[^ *]linux_prep.*;,\tlinux_prep="$(@D)/linux_prep/output-target/linux_prep";,' $(@D)/$(MXS_BOOTLETS_BOOTDESC)
|
||||
sed -i 's,[^ *]zImage.*;,\tzImage="$(LINUX_DIR)/arch/arm/boot/zImage";,' $(@D)/$(MXS_BOOTLETS_BOOTDESC)
|
||||
endef
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_MXS_BOOTLETS_UBOOT),y)
|
||||
define MXS_BOOTLETS_SED_UBOOT
|
||||
sed -i 's,[^ *]u_boot.*;,\tu_boot="$(UBOOT_DIR)/u-boot";,' $(@D)/$(MXS_BOOTLETS_BOOTDESC)
|
||||
endef
|
||||
endif
|
||||
|
||||
define MXS_BOOTLETS_INSTALL_BAREBOX_BOOTDESC
|
||||
cp boot/mxs-bootlets/barebox_ivt.bd $(@D)/
|
||||
endef
|
||||
|
||||
MXS_BOOTLETS_POST_EXTRACT_HOOKS += MXS_BOOTLETS_INSTALL_BAREBOX_BOOTDESC
|
||||
|
||||
define MXS_BOOTLETS_BUILD_CMDS
|
||||
BOARD=$(MXS_BOOTLETS_BOARD) CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||
$(MAKE1) -C $(@D) power_prep
|
||||
BOARD=$(MXS_BOOTLETS_BOARD) CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||
$(MAKE1) -C $(@D) boot_prep
|
||||
$(MXS_BOOTLETS_BUILD_LINUX_PREP)
|
||||
sed -i 's,[^ *]power_prep.*;,\tpower_prep="$(@D)/power_prep/power_prep";,' $(@D)/$(MXS_BOOTLETS_BOOTDESC)
|
||||
sed -i 's,[^ *]sdram_prep.*;,\tsdram_prep="$(@D)/boot_prep/boot_prep";,' $(@D)/$(MXS_BOOTLETS_BOOTDESC)
|
||||
$(MXS_BOOTLETS_SED_BAREBOX)
|
||||
$(MXS_BOOTLETS_SED_LINUX)
|
||||
$(MXS_BOOTLETS_SED_UBOOT)
|
||||
$(HOST_DIR)/bin/elftosb $(MXS_BOOTLETS_ELFTOSB_OPTIONS) \
|
||||
-z -c $(@D)/$(MXS_BOOTLETS_BOOTDESC) \
|
||||
-o $(@D)/$(MXS_BOOTLETS_BOOTSTREAM)
|
||||
endef
|
||||
|
||||
define MXS_BOOTLETS_INSTALL_TARGET_CMDS
|
||||
cp $(@D)/$(MXS_BOOTLETS_BOOTSTREAM) $(BINARIES_DIR)/
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
@ -0,0 +1,37 @@
|
||||
From f5871e1f3650d6c8a032928cb5d8ca00c275c377 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Francis <alistair.francis@wdc.com>
|
||||
Date: Fri, 15 Feb 2019 14:57:41 -0800
|
||||
Subject: [PATCH] Makefile: Don't specify mabi or march
|
||||
|
||||
To avoid
|
||||
can't link double-float modules with soft-float modules
|
||||
errors when building 32-bit openSBI don't specify mabi or march.
|
||||
|
||||
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
|
||||
---
|
||||
Makefile | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index ae68f55..10851fc 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -145,7 +145,6 @@ GENFLAGS += $(firmware-genflags-y)
|
||||
CFLAGS = -g -Wall -Werror -nostdlib -fno-strict-aliasing -O2
|
||||
CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
|
||||
CFLAGS += -mno-save-restore -mstrict-align
|
||||
-CFLAGS += -mabi=$(PLATFORM_RISCV_ABI) -march=$(PLATFORM_RISCV_ISA)
|
||||
CFLAGS += -mcmodel=$(PLATFORM_RISCV_CODE_MODEL)
|
||||
CFLAGS += $(GENFLAGS)
|
||||
CFLAGS += $(platform-cflags-y)
|
||||
@@ -158,7 +157,6 @@ CPPFLAGS += $(firmware-cppflags-y)
|
||||
ASFLAGS = -g -Wall -nostdlib -D__ASSEMBLY__
|
||||
ASFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
|
||||
ASFLAGS += -mno-save-restore -mstrict-align
|
||||
-ASFLAGS += -mabi=$(PLATFORM_RISCV_ABI) -march=$(PLATFORM_RISCV_ISA)
|
||||
ASFLAGS += -mcmodel=$(PLATFORM_RISCV_CODE_MODEL)
|
||||
ASFLAGS += $(GENFLAGS)
|
||||
ASFLAGS += $(platform-asflags-y)
|
||||
--
|
||||
2.20.1
|
||||
|
||||
@ -0,0 +1,53 @@
|
||||
From e389d5fbc296e496db15368b2b621e0f178f7f34 Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Sat, 8 May 2021 21:28:10 +0200
|
||||
Subject: [PATCH] Makefile: unconditionally disable SSP
|
||||
|
||||
Though -nostdlib is passed in {C,+AS,DTSCPP}FLAGS, -fno-stack-protector
|
||||
must also be passed to avoid linking errors related to undefined
|
||||
references to '__stack_chk_guard' and '__stack_chk_fail' if toolchain
|
||||
enforces -fstack-protector.
|
||||
|
||||
Fixes:
|
||||
- https://gitlab.com/kubu93/buildroot/-/jobs/1247043359
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
[Upstream status: https://github.com/riscv/opensbi/pull/211]
|
||||
---
|
||||
Makefile | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index eeffe6b..1419360 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -203,7 +203,7 @@ GENFLAGS += $(libsbiutils-genflags-y)
|
||||
GENFLAGS += $(platform-genflags-y)
|
||||
GENFLAGS += $(firmware-genflags-y)
|
||||
|
||||
-CFLAGS = -g -Wall -Werror -ffreestanding -nostdlib -fno-strict-aliasing -O2
|
||||
+CFLAGS = -g -Wall -Werror -ffreestanding -nostdlib -fno-stack-protector -fno-strict-aliasing -O2
|
||||
CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
|
||||
CFLAGS += -mno-save-restore -mstrict-align
|
||||
CFLAGS += -mabi=$(PLATFORM_RISCV_ABI) -march=$(PLATFORM_RISCV_ISA)
|
||||
@@ -217,7 +217,7 @@ CPPFLAGS += $(GENFLAGS)
|
||||
CPPFLAGS += $(platform-cppflags-y)
|
||||
CPPFLAGS += $(firmware-cppflags-y)
|
||||
|
||||
-ASFLAGS = -g -Wall -nostdlib -D__ASSEMBLY__
|
||||
+ASFLAGS = -g -Wall -nostdlib -fno-stack-protector -D__ASSEMBLY__
|
||||
ASFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
|
||||
ASFLAGS += -mno-save-restore -mstrict-align
|
||||
ASFLAGS += -mabi=$(PLATFORM_RISCV_ABI) -march=$(PLATFORM_RISCV_ISA)
|
||||
@@ -236,7 +236,7 @@ MERGEFLAGS += -r
|
||||
MERGEFLAGS += -b elf$(PLATFORM_RISCV_XLEN)-littleriscv
|
||||
MERGEFLAGS += -m elf$(PLATFORM_RISCV_XLEN)lriscv
|
||||
|
||||
-DTSCPPFLAGS = $(CPPFLAGS) -nostdinc -nostdlib -fno-builtin -D__DTS__ -x assembler-with-cpp
|
||||
+DTSCPPFLAGS = $(CPPFLAGS) -nostdinc -nostdlib -fno-stack-protector -fno-builtin -D__DTS__ -x assembler-with-cpp
|
||||
|
||||
# Setup functions for compilation
|
||||
define dynamic_flags
|
||||
--
|
||||
2.30.2
|
||||
|
||||
128
boot/opensbi/Config.in
Normal file
128
boot/opensbi/Config.in
Normal file
@ -0,0 +1,128 @@
|
||||
config BR2_TARGET_OPENSBI
|
||||
bool "opensbi"
|
||||
depends on BR2_riscv
|
||||
help
|
||||
OpenSBI aims to provide an open-source and extensible
|
||||
implementation of the RISC-V SBI specification for a platform
|
||||
specific firmware (M-mode) and a general purpose OS,
|
||||
hypervisor or bootloader (S-mode or HS-mode). OpenSBI
|
||||
implementation can be easily extended by RISC-V platform or
|
||||
System-on-Chip vendors to fit a particular hadware
|
||||
configuration.
|
||||
|
||||
https://github.com/riscv/opensbi.git
|
||||
|
||||
if BR2_TARGET_OPENSBI
|
||||
choice
|
||||
prompt "OpenSBI Version"
|
||||
help
|
||||
Select the specific OpenSBI version you want to use
|
||||
|
||||
config BR2_TARGET_OPENSBI_LATEST_VERSION
|
||||
bool "0.9"
|
||||
|
||||
config BR2_TARGET_OPENSBI_CUSTOM_VERSION
|
||||
bool "Custom version"
|
||||
help
|
||||
This option allows to use a specific official versions
|
||||
|
||||
config BR2_TARGET_OPENSBI_CUSTOM_TARBALL
|
||||
bool "Custom tarball"
|
||||
|
||||
config BR2_TARGET_OPENSBI_CUSTOM_GIT
|
||||
bool "Custom Git repository"
|
||||
|
||||
endchoice
|
||||
|
||||
config BR2_TARGET_OPENSBI_CUSTOM_VERSION_VALUE
|
||||
string "OpenSBI version"
|
||||
depends on BR2_TARGET_OPENSBI_CUSTOM_VERSION
|
||||
|
||||
config BR2_TARGET_OPENSBI_CUSTOM_TARBALL_LOCATION
|
||||
string "URL of custom OpenSBI tarball"
|
||||
depends on BR2_TARGET_OPENSBI_CUSTOM_TARBALL
|
||||
|
||||
if BR2_TARGET_OPENSBI_CUSTOM_GIT
|
||||
|
||||
config BR2_TARGET_OPENSBI_CUSTOM_REPO_URL
|
||||
string "URL of custom repository"
|
||||
|
||||
config BR2_TARGET_OPENSBI_CUSTOM_REPO_VERSION
|
||||
string "Custom repository version"
|
||||
help
|
||||
Revision to use in the typical format used by Git. E.G. a
|
||||
sha id, a tag, branch, ..
|
||||
|
||||
endif
|
||||
|
||||
config BR2_TARGET_OPENSBI_VERSION
|
||||
string
|
||||
default "0.9" if BR2_TARGET_OPENSBI_LATEST_VERSION
|
||||
default BR2_TARGET_OPENSBI_CUSTOM_VERSION_VALUE \
|
||||
if BR2_TARGET_OPENSBI_CUSTOM_VERSION
|
||||
default "custom" if BR2_TARGET_OPENSBI_CUSTOM_TARBALL
|
||||
default BR2_TARGET_OPENSBI_CUSTOM_REPO_VERSION \
|
||||
if BR2_TARGET_OPENSBI_CUSTOM_GIT
|
||||
|
||||
config BR2_TARGET_OPENSBI_PLAT
|
||||
string "OpenSBI Platform"
|
||||
default ""
|
||||
help
|
||||
Specifies the OpenSBI platform to build. If no platform is
|
||||
specified only the OpenSBI platform independent static
|
||||
library libsbi.a is built. If a platform is specified then
|
||||
the platform specific static library libplatsbi.a and firmware
|
||||
examples are built.
|
||||
|
||||
config BR2_TARGET_OPENSBI_INSTALL_DYNAMIC_IMG
|
||||
bool "Install fw_dynamic image"
|
||||
default y if BR2_TARGET_OPENSBI_PLAT != ""
|
||||
help
|
||||
This installs the fw_dynamic image.
|
||||
|
||||
config BR2_TARGET_OPENSBI_INSTALL_JUMP_IMG
|
||||
bool "Install fw_jump image"
|
||||
default y if BR2_TARGET_OPENSBI_PLAT != ""
|
||||
help
|
||||
This installs the fw_jump image.
|
||||
|
||||
config BR2_TARGET_OPENSBI_INSTALL_PAYLOAD_IMG
|
||||
bool "Install fw_payload image"
|
||||
help
|
||||
This option enables the installation of the fw_paylaod
|
||||
image.
|
||||
|
||||
config BR2_TARGET_OPENSBI_LINUX_PAYLOAD
|
||||
bool "Include Linux as OpenSBI Payload"
|
||||
depends on BR2_TARGET_OPENSBI_PLAT != ""
|
||||
depends on BR2_LINUX_KERNEL
|
||||
depends on BR2_LINUX_KERNEL_IMAGE
|
||||
select BR2_TARGET_OPENSBI_INSTALL_PAYLOAD_IMG
|
||||
help
|
||||
Build OpenSBI with the Linux kernel as a Payload.
|
||||
|
||||
config BR2_TARGET_OPENSBI_UBOOT_PAYLOAD
|
||||
bool "Include U-Boot as OpenSBI Payload"
|
||||
depends on BR2_TARGET_OPENSBI_PLAT != ""
|
||||
depends on BR2_TARGET_UBOOT
|
||||
select BR2_TARGET_OPENSBI_INSTALL_PAYLOAD_IMG
|
||||
help
|
||||
Build OpenSBI with the U-Boot as a Payload.
|
||||
|
||||
config BR2_TARGET_OPENSBI_FW_FDT_PATH
|
||||
bool "Include U-Boot DTB in OpenSBI Payload"
|
||||
depends on BR2_TARGET_OPENSBI_UBOOT_PAYLOAD
|
||||
select BR2_TARGET_UBOOT_FORMAT_DTB
|
||||
help
|
||||
Build OpenSBI with FW_FDT_PATH set to
|
||||
$(BINARIES_DIR)/u-boot.dtb. Note that CONFIG_OF_SEPARATE
|
||||
must be set in the U-Boot configuration for this file to be
|
||||
produced.
|
||||
|
||||
config BR2_TARGET_OPENSBI_ADDITIONAL_VARIABLES
|
||||
string "Additional build variables"
|
||||
help
|
||||
Additional parameters for the build, which will be passed on
|
||||
the make command line. E.g: BUILD_INFO=1.
|
||||
|
||||
endif
|
||||
3
boot/opensbi/opensbi.hash
Normal file
3
boot/opensbi/opensbi.hash
Normal file
@ -0,0 +1,3 @@
|
||||
# locally computed
|
||||
sha256 60f995cb3cd03e3cf5e649194d3395d0fe67499fd960a36cf7058a4efde686f0 opensbi-0.9.tar.gz
|
||||
sha256 82d13fb1bf6bb162629deeea9eb9c117e74548d3b707e478967691fe79a68e21 COPYING.BSD
|
||||
90
boot/opensbi/opensbi.mk
Normal file
90
boot/opensbi/opensbi.mk
Normal file
@ -0,0 +1,90 @@
|
||||
################################################################################
|
||||
#
|
||||
# opensbi
|
||||
#
|
||||
################################################################################
|
||||
|
||||
OPENSBI_VERSION = $(call qstrip,$(BR2_TARGET_OPENSBI_VERSION))
|
||||
|
||||
ifeq ($(BR2_TARGET_OPENSBI_CUSTOM_TARBALL),y)
|
||||
# Handle custom OpenSBI tarballs as specified by the configuration
|
||||
OPENSBI_TARBALL = $(call qstrip,$(BR2_TARGET_OPENSBI_CUSTOM_TARBALL_LOCATION))
|
||||
OPENSBI_SITE = $(patsubst %/,%,$(dir $(OPENSBI_TARBALL)))
|
||||
OPENSBI_SOURCE = $(notdir $(OPENSBI_TARBALL))
|
||||
else ifeq ($(BR2_TARGET_OPENSBI_CUSTOM_GIT),y)
|
||||
OPENSBI_SITE = $(call qstrip,$(BR2_TARGET_OPENSBI_CUSTOM_REPO_URL))
|
||||
OPENSBI_SITE_METHOD = git
|
||||
else
|
||||
# Handle official OpenSBI versions
|
||||
OPENSBI_SITE = $(call github,riscv,opensbi,v$(OPENSBI_VERSION))
|
||||
endif
|
||||
|
||||
OPENSBI_LICENSE = BSD-2-Clause
|
||||
ifeq ($(BR2_TARGET_OPENSBI_LATEST_VERSION),y)
|
||||
OPENSBI_LICENSE_FILES = COPYING.BSD
|
||||
endif
|
||||
OPENSBI_INSTALL_TARGET = NO
|
||||
OPENSBI_INSTALL_STAGING = YES
|
||||
|
||||
ifeq ($(BR2_TARGET_OPENSBI)$(BR2_TARGET_OPENSBI_LATEST_VERSION),y)
|
||||
BR_NO_CHECK_HASH_FOR += $(OPENSBI_SOURCE)
|
||||
endif
|
||||
|
||||
OPENSBI_MAKE_ENV = \
|
||||
CROSS_COMPILE=$(TARGET_CROSS) \
|
||||
$(call qstrip,$(BR2_TARGET_OPENSBI_ADDITIONAL_VARIABLES))
|
||||
|
||||
OPENSBI_PLAT = $(call qstrip,$(BR2_TARGET_OPENSBI_PLAT))
|
||||
ifneq ($(OPENSBI_PLAT),)
|
||||
OPENSBI_MAKE_ENV += PLATFORM=$(OPENSBI_PLAT)
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_OPENSBI_LINUX_PAYLOAD),y)
|
||||
OPENSBI_DEPENDENCIES += linux
|
||||
OPENSBI_MAKE_ENV += FW_PAYLOAD_PATH="$(BINARIES_DIR)/Image"
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_OPENSBI_UBOOT_PAYLOAD),y)
|
||||
OPENSBI_DEPENDENCIES += uboot
|
||||
OPENSBI_MAKE_ENV += FW_PAYLOAD_PATH="$(BINARIES_DIR)/u-boot.bin"
|
||||
ifeq ($(BR2_TARGET_OPENSBI_FW_FDT_PATH),y)
|
||||
OPENSBI_MAKE_ENV += FW_FDT_PATH="$(BINARIES_DIR)/u-boot.dtb"
|
||||
endif
|
||||
endif
|
||||
|
||||
define OPENSBI_BUILD_CMDS
|
||||
$(TARGET_MAKE_ENV) $(OPENSBI_MAKE_ENV) $(MAKE) -C $(@D)
|
||||
endef
|
||||
|
||||
ifeq ($(BR2_TARGET_OPENSBI_INSTALL_DYNAMIC_IMG),y)
|
||||
OPENSBI_INSTALL_IMAGES = YES
|
||||
OPENSBI_FW_IMAGES += dynamic
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_OPENSBI_INSTALL_JUMP_IMG),y)
|
||||
OPENSBI_INSTALL_IMAGES = YES
|
||||
OPENSBI_FW_IMAGES += jump
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_OPENSBI_INSTALL_PAYLOAD_IMG),y)
|
||||
OPENSBI_INSTALL_IMAGES = YES
|
||||
OPENSBI_FW_IMAGES += payload
|
||||
endif
|
||||
|
||||
define OPENSBI_INSTALL_IMAGES_CMDS
|
||||
$(foreach f,$(OPENSBI_FW_IMAGES),\
|
||||
$(INSTALL) -m 0644 -D $(@D)/build/platform/$(OPENSBI_PLAT)/firmware/fw_$(f).bin \
|
||||
$(BINARIES_DIR)/fw_$(f).bin
|
||||
$(INSTALL) -m 0644 -D $(@D)/build/platform/$(OPENSBI_PLAT)/firmware/fw_$(f).elf \
|
||||
$(BINARIES_DIR)/fw_$(f).elf
|
||||
)
|
||||
endef
|
||||
|
||||
# libsbi.a is not a library meant to be linked in user-space code, but
|
||||
# with bare metal code, which is why we don't install it in
|
||||
# $(STAGING_DIR)/usr/lib
|
||||
define OPENSBI_INSTALL_STAGING_CMDS
|
||||
$(INSTALL) -m 0644 -D $(@D)/build/lib/libsbi.a $(STAGING_DIR)/usr/share/opensbi/libsbi.a
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
@ -0,0 +1,56 @@
|
||||
From 82becbadd5918ed7ad3c2b651ce479084b5feb2a Mon Sep 17 00:00:00 2001
|
||||
From: Etienne Carriere <etienne.carriere@linaro.org>
|
||||
Date: Mon, 10 May 2021 15:58:41 +0200
|
||||
Subject: core: zlib: fix build warning when _LFS64_LARGEFILE is not defined
|
||||
|
||||
In zlib, _LFS64_LARGEFILE is expected to be a boolean directive, either
|
||||
1 (true) or 0 (false). Depending on toolchain version and directives
|
||||
build may produces warnings (as shown below with gcc 9.3) when the macro
|
||||
is not defined hence this change to default it to value 0 (false).
|
||||
|
||||
core/lib/zlib/zutil.h:196:39: warning: "_LFS64_LARGEFILE" is not defined, evaluates to 0 [-Wundef]
|
||||
196 | (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0)
|
||||
| ^~~~~~~~~~~~~~~~
|
||||
In file included from core/lib/zlib/adler32.c:9:
|
||||
core/lib/zlib/zutil.h:196:39: warning: "_LFS64_LARGEFILE" is not defined, evaluates to 0 [-Wundef]
|
||||
196 | (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0)
|
||||
| ^~~~~~~~~~~~~~~~
|
||||
CC out/core/lib/zlib/zutil.o
|
||||
In file included from core/lib/zlib/inftrees.c:7:
|
||||
core/lib/zlib/zutil.h:196:39: warning: "_LFS64_LARGEFILE" is not defined, evaluates to 0 [-Wundef]
|
||||
196 | (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0)
|
||||
| ^~~~~~~~~~~~~~~~
|
||||
In file included from core/lib/zlib/inflate.c:84:
|
||||
core/lib/zlib/zutil.h:196:39: warning: "_LFS64_LARGEFILE" is not defined, evaluates to 0 [-Wundef]
|
||||
196 | (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0)
|
||||
| ^~~~~~~~~~~~~~~~
|
||||
In file included from core/lib/zlib/zutil.c:9:
|
||||
core/lib/zlib/zutil.h:196:39: warning: "_LFS64_LARGEFILE" is not defined, evaluates to 0 [-Wundef]
|
||||
196 | (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0)
|
||||
| ^~~~~~~~~~~~~~~~
|
||||
|
||||
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
|
||||
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
|
||||
---
|
||||
core/lib/zlib/zconf.h | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/core/lib/zlib/zconf.h b/core/lib/zlib/zconf.h
|
||||
index 0bca18be..a7d13741 100644
|
||||
--- a/core/lib/zlib/zconf.h
|
||||
+++ b/core/lib/zlib/zconf.h
|
||||
@@ -487,6 +487,11 @@ typedef uLong FAR uLongf;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
+/* Other places expect _LFS64_LARGEFILE to be defined with a valid value */
|
||||
+#ifndef _LFS64_LARGEFILE
|
||||
+#define _LFS64_LARGEFILE 0
|
||||
+#endif
|
||||
+
|
||||
#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0
|
||||
# define Z_LFS64
|
||||
#endif
|
||||
--
|
||||
2.17.1
|
||||
|
||||
146
boot/optee-os/Config.in
Normal file
146
boot/optee-os/Config.in
Normal file
@ -0,0 +1,146 @@
|
||||
config BR2_TARGET_OPTEE_OS
|
||||
bool "optee_os"
|
||||
depends on BR2_ARM_CPU_ARMV8A || BR2_ARM_CPU_ARMV7A
|
||||
help
|
||||
OP-TEE OS provides the secure world boot image and the trust
|
||||
application development kit of the OP-TEE project. OP-TEE OS
|
||||
also provides generic trusted application one can embedded
|
||||
into its system.
|
||||
|
||||
http://github.com/OP-TEE/optee_os
|
||||
|
||||
if BR2_TARGET_OPTEE_OS
|
||||
|
||||
choice
|
||||
prompt "OP-TEE OS version"
|
||||
default BR2_TARGET_OPTEE_OS_LATEST if BR2_PACKAGE_HOST_RUSTC_ARCH_SUPPORTS
|
||||
help
|
||||
Select the version of OP-TEE OS you want to use
|
||||
|
||||
config BR2_TARGET_OPTEE_OS_LATEST
|
||||
bool "3.18.0"
|
||||
depends on BR2_PACKAGE_HOST_RUSTC_ARCH_SUPPORTS
|
||||
select BR2_TARGET_OPTEE_OS_NEEDS_PYTHON_CRYPTOGRAPHY
|
||||
help
|
||||
Use the latest release tag from the OP-TEE OS official Git
|
||||
repository.
|
||||
|
||||
config BR2_TARGET_OPTEE_OS_CUSTOM_TARBALL
|
||||
bool "Custom tarball"
|
||||
help
|
||||
This option allows to specify a URL pointing to an OP-TEE OS
|
||||
source tarball. This URL can use any protocol recognized by
|
||||
Buildroot, like http://, ftp://, file:// or scp://.
|
||||
|
||||
When pointing to a local tarball using file://, you may want
|
||||
to use a make variable like $(TOPDIR) to reference the root of
|
||||
the Buildroot tree.
|
||||
|
||||
config BR2_TARGET_OPTEE_OS_CUSTOM_GIT
|
||||
bool "Custom Git repository"
|
||||
help
|
||||
Use a custom version fetched from a Git repository.
|
||||
|
||||
endchoice
|
||||
|
||||
if BR2_TARGET_OPTEE_OS_CUSTOM_TARBALL
|
||||
|
||||
config BR2_TARGET_OPTEE_OS_CUSTOM_TARBALL_LOCATION
|
||||
string "URL of custom OP-TEE OS tarball"
|
||||
|
||||
endif
|
||||
|
||||
if BR2_TARGET_OPTEE_OS_CUSTOM_GIT
|
||||
|
||||
config BR2_TARGET_OPTEE_OS_CUSTOM_REPO_URL
|
||||
string "URL of custom repository"
|
||||
depends on BR2_TARGET_OPTEE_OS_CUSTOM_GIT
|
||||
help
|
||||
Specific location of the reference source tree Git
|
||||
repository.
|
||||
|
||||
config BR2_TARGET_OPTEE_OS_CUSTOM_REPO_VERSION
|
||||
string "Custom repository version"
|
||||
depends on BR2_TARGET_OPTEE_OS_CUSTOM_GIT
|
||||
help
|
||||
Revision to use in the typical format used by Git, i.e a
|
||||
SHA1 or a tag.
|
||||
|
||||
endif
|
||||
|
||||
config BR2_TARGET_OPTEE_OS_VERSION
|
||||
string
|
||||
default "3.18.0" if BR2_TARGET_OPTEE_OS_LATEST
|
||||
default "custom" if BR2_TARGET_OPTEE_OS_CUSTOM_TARBALL
|
||||
default BR2_TARGET_OPTEE_OS_CUSTOM_REPO_VERSION \
|
||||
if BR2_TARGET_OPTEE_OS_CUSTOM_GIT
|
||||
|
||||
config BR2_TARGET_OPTEE_OS_NEEDS_DTC
|
||||
bool "OP-TEE OS needs dtc"
|
||||
select BR2_PACKAGE_HOST_DTC
|
||||
help
|
||||
Select this option if your OP-TEE OS platform configuration
|
||||
requires the Device Tree compiler to be available.
|
||||
|
||||
config BR2_TARGET_OPTEE_OS_NEEDS_PYTHON_CRYPTOGRAPHY
|
||||
bool "OP-TEE OS needs host-python-cryptography"
|
||||
depends on BR2_PACKAGE_HOST_RUSTC_ARCH_SUPPORTS
|
||||
help
|
||||
OP-TEE OS version below 3.16 used python-pycryptodomex
|
||||
package in python scripts. Newer version uses
|
||||
python-cryptography. Select this option if optee-os needs
|
||||
python-cryptography to be built.
|
||||
|
||||
config BR2_TARGET_OPTEE_OS_CORE
|
||||
bool "Build core"
|
||||
default y
|
||||
help
|
||||
This option will build and install the OP-TEE core
|
||||
boot images.
|
||||
|
||||
config BR2_TARGET_OPTEE_OS_SDK
|
||||
bool "Build TA devkit"
|
||||
default y
|
||||
help
|
||||
This option will build and install the OP-TEE development
|
||||
kit for building OP-TEE trusted application images. It is
|
||||
installed in the staging directory /lib/optee.
|
||||
|
||||
config BR2_TARGET_OPTEE_OS_SERVICES
|
||||
bool "Build service TAs and libs"
|
||||
default y
|
||||
select BR2_TARGET_OPTEE_OS_CORE
|
||||
help
|
||||
This option installs the service trusted applications and
|
||||
trusted shared libraries built from OP-TEE OS source tree.
|
||||
These are installed in target /lib/optee_armtz directory
|
||||
as other trusted applications. At runtime OP-TEE OS can
|
||||
load these from this non-secure filesystem/directory into
|
||||
the secure world for execution.
|
||||
|
||||
config BR2_TARGET_OPTEE_OS_PLATFORM
|
||||
string "Target platform (mandatory)"
|
||||
help
|
||||
Value for the mandated PLATFORM build directive provided to
|
||||
OP-TEE OS.
|
||||
|
||||
config BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR
|
||||
string "Target platform flavor (optional)"
|
||||
help
|
||||
Value for the optional PLATFORM_FLAVOR build directive
|
||||
provided to OP-TEE OS.
|
||||
|
||||
config BR2_TARGET_OPTEE_OS_ADDITIONAL_VARIABLES
|
||||
string "Additional build variables"
|
||||
help
|
||||
Additional parameters for the OP-TEE OS build
|
||||
E.g. 'CFG_TEE_CORE_LOG_LEVEL=3 CFG_UNWIND=y'
|
||||
|
||||
config BR2_TARGET_OPTEE_OS_CORE_IMAGES
|
||||
string "Binary boot images"
|
||||
default "tee.bin tee-*_v2.bin"
|
||||
help
|
||||
Names of generated image files that are installed in the
|
||||
output images/ directory.
|
||||
|
||||
endif # BR2_TARGET_OPTEE_OS
|
||||
4
boot/optee-os/optee-os.hash
Normal file
4
boot/optee-os/optee-os.hash
Normal file
@ -0,0 +1,4 @@
|
||||
# From https://github.com/OP-TEE/optee_os/archive/3.18.0/optee-os-3.18.0.tar.gz
|
||||
sha256 bdd309697745ec4406951652094b50d9adb06c3612f01bd8a3d72682ec8e03e8 optee-os-3.18.0.tar.gz
|
||||
# Locally computed
|
||||
sha256 1247ee90858f4037b6cac63cbffddfed435d0d73c631b37d78c1e6e6ab3e5d1a LICENSE
|
||||
151
boot/optee-os/optee-os.mk
Normal file
151
boot/optee-os/optee-os.mk
Normal file
@ -0,0 +1,151 @@
|
||||
################################################################################
|
||||
#
|
||||
# optee-os
|
||||
#
|
||||
################################################################################
|
||||
|
||||
OPTEE_OS_VERSION = $(call qstrip,$(BR2_TARGET_OPTEE_OS_VERSION))
|
||||
OPTEE_OS_LICENSE = BSD-2-Clause
|
||||
ifeq ($(BR2_TARGET_OPTEE_OS_LATEST),y)
|
||||
OPTEE_OS_LICENSE_FILES = LICENSE
|
||||
endif
|
||||
|
||||
OPTEE_OS_INSTALL_STAGING = YES
|
||||
OPTEE_OS_INSTALL_IMAGES = YES
|
||||
|
||||
ifeq ($(BR2_TARGET_OPTEE_OS_CUSTOM_TARBALL),y)
|
||||
OPTEE_OS_TARBALL = $(call qstrip,$(BR2_TARGET_OPTEE_OS_CUSTOM_TARBALL_LOCATION))
|
||||
OPTEE_OS_SITE = $(patsubst %/,%,$(dir $(OPTEE_OS_TARBALL)))
|
||||
OPTEE_OS_SOURCE = $(notdir $(OPTEE_OS_TARBALL))
|
||||
else ifeq ($(BR2_TARGET_OPTEE_OS_CUSTOM_GIT),y)
|
||||
OPTEE_OS_SITE = $(call qstrip,$(BR2_TARGET_OPTEE_OS_CUSTOM_REPO_URL))
|
||||
OPTEE_OS_SITE_METHOD = git
|
||||
else
|
||||
OPTEE_OS_SITE = $(call github,OP-TEE,optee_os,$(OPTEE_OS_VERSION))
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_OPTEE_OS):$(BR2_TARGET_OPTEE_OS_LATEST),y:)
|
||||
BR_NO_CHECK_HASH_FOR += $(OPTEE_OS_SOURCE)
|
||||
endif
|
||||
|
||||
OPTEE_OS_DEPENDENCIES = host-openssl host-python3 host-python-pyelftools
|
||||
|
||||
ifeq ($(BR2_TARGET_OPTEE_OS_NEEDS_PYTHON_CRYPTOGRAPHY),y)
|
||||
OPTEE_OS_DEPENDENCIES += host-python-cryptography
|
||||
else
|
||||
OPTEE_OS_DEPENDENCIES += host-python-pycryptodomex
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_OPTEE_OS_NEEDS_DTC),y)
|
||||
OPTEE_OS_DEPENDENCIES += host-dtc
|
||||
endif
|
||||
|
||||
# On 64bit targets, OP-TEE OS can be built in 32bit mode, or
|
||||
# can be built in 64bit mode and support 32bit and 64bit
|
||||
# trusted applications. Since buildroot currently references
|
||||
# a single cross compiler, build exclusively in 32bit
|
||||
# or 64bit mode.
|
||||
OPTEE_OS_MAKE_OPTS = \
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||
CROSS_COMPILE_core="$(TARGET_CROSS)" \
|
||||
CROSS_COMPILE_ta_arm64="$(TARGET_CROSS)" \
|
||||
CROSS_COMPILE_ta_arm32="$(TARGET_CROSS)" \
|
||||
PYTHON3="$(HOST_DIR)/bin/python3"
|
||||
|
||||
ifeq ($(BR2_aarch64),y)
|
||||
OPTEE_OS_MAKE_OPTS += \
|
||||
CFG_ARM64_core=y \
|
||||
CFG_USER_TA_TARGETS=ta_arm64
|
||||
else
|
||||
OPTEE_OS_MAKE_OPTS += \
|
||||
CFG_ARM32_core=y
|
||||
endif
|
||||
|
||||
# Get mandatory PLAFORM and optional PLATFORM_FLAVOR and additional
|
||||
# variables
|
||||
OPTEE_OS_MAKE_OPTS += PLATFORM=$(call qstrip,$(BR2_TARGET_OPTEE_OS_PLATFORM))
|
||||
ifneq ($(call qstrip,$(BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR)),)
|
||||
OPTEE_OS_MAKE_OPTS += PLATFORM_FLAVOR=$(call qstrip,$(BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR))
|
||||
endif
|
||||
OPTEE_OS_MAKE_OPTS += $(call qstrip,$(BR2_TARGET_OPTEE_OS_ADDITIONAL_VARIABLES))
|
||||
|
||||
# Requests OP-TEE OS to build from subdirectory out/ of its sourcetree
|
||||
# root path otherwise the output directory path depends on the target
|
||||
# platform name.
|
||||
OPTEE_OS_BUILDDIR_OUT = out
|
||||
ifeq ($(BR2_aarch64),y)
|
||||
OPTEE_OS_LOCAL_SDK = $(OPTEE_OS_BUILDDIR_OUT)/export-ta_arm64
|
||||
OPTEE_OS_SDK = $(STAGING_DIR)/lib/optee/export-ta_arm64
|
||||
endif
|
||||
ifeq ($(BR2_arm),y)
|
||||
OPTEE_OS_LOCAL_SDK = $(OPTEE_OS_BUILDDIR_OUT)/export-ta_arm32
|
||||
OPTEE_OS_SDK = $(STAGING_DIR)/lib/optee/export-ta_arm32
|
||||
endif
|
||||
|
||||
OPTEE_OS_IMAGE_FILES = $(call qstrip,$(BR2_TARGET_OPTEE_OS_CORE_IMAGES))
|
||||
|
||||
ifeq ($(BR2_TARGET_OPTEE_OS_CORE),y)
|
||||
define OPTEE_OS_BUILD_CORE
|
||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) O=$(OPTEE_OS_BUILDDIR_OUT) \
|
||||
$(TARGET_CONFIGURE_OPTS) $(OPTEE_OS_MAKE_OPTS) all
|
||||
endef
|
||||
define OPTEE_OS_INSTALL_IMAGES_CORE
|
||||
mkdir -p $(BINARIES_DIR)
|
||||
$(foreach f,$(OPTEE_OS_IMAGE_FILES), \
|
||||
cp -dpf $(wildcard $(@D)/$(OPTEE_OS_BUILDDIR_OUT)/core/$(f)) $(BINARIES_DIR)/
|
||||
)
|
||||
endef
|
||||
endif # BR2_TARGET_OPTEE_OS_CORE
|
||||
|
||||
ifeq ($(BR2_TARGET_OPTEE_OS_SERVICES),y)
|
||||
define OPTEE_OS_INSTALL_TARGET_CMDS
|
||||
$(if $(wildcard $(@D)/$(OPTEE_OS_BUILDDIR_OUT)/ta/*/*.ta),
|
||||
$(INSTALL) -D -m 444 -t $(TARGET_DIR)/lib/optee_armtz \
|
||||
$(@D)/$(OPTEE_OS_BUILDDIR_OUT)/ta/*/*.ta)
|
||||
$(if $(wildcard $(@D)/$(OPTEE_OS_LOCAL_SDK)/lib/*.ta),
|
||||
$(INSTALL) -D -m 444 -t $(TARGET_DIR)/lib/optee_armtz \
|
||||
$(@D)/$(OPTEE_OS_LOCAL_SDK)/lib/*.ta)
|
||||
endef
|
||||
endif # BR2_TARGET_OPTEE_OS_SERVICES
|
||||
|
||||
ifeq ($(BR2_TARGET_OPTEE_OS_SDK),y)
|
||||
define OPTEE_OS_BUILD_SDK
|
||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) O=$(OPTEE_OS_BUILDDIR_OUT) \
|
||||
$(TARGET_CONFIGURE_OPTS) $(OPTEE_OS_MAKE_OPTS) ta_dev_kit
|
||||
endef
|
||||
define OPTEE_OS_INSTALL_STAGING_CMDS
|
||||
mkdir -p $(OPTEE_OS_SDK)
|
||||
cp -ardpf $(@D)/$(OPTEE_OS_LOCAL_SDK)/* $(OPTEE_OS_SDK)
|
||||
endef
|
||||
endif # BR2_TARGET_OPTEE_OS_SDK
|
||||
|
||||
define OPTEE_OS_BUILD_CMDS
|
||||
$(OPTEE_OS_BUILD_CORE)
|
||||
$(OPTEE_OS_BUILD_SDK)
|
||||
endef
|
||||
|
||||
define OPTEE_OS_INSTALL_IMAGES_CMDS
|
||||
$(OPTEE_OS_INSTALL_IMAGES_CORE)
|
||||
$(OPTEE_OS_INSTALL_IMAGES_SERVICES)
|
||||
endef
|
||||
|
||||
ifeq ($(BR2_TARGET_OPTEE_OS)$(BR_BUILDING),yy)
|
||||
ifeq ($(call qstrip,$(BR2_TARGET_OPTEE_OS_PLATFORM)),)
|
||||
$(error No OP-TEE OS platform set. Check your BR2_TARGET_OPTEE_OS_PLATFORM setting)
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_OPTEE_OS_CUSTOM_TARBALL),y)
|
||||
ifeq ($(call qstrip,$(BR2_TARGET_OPTEE_OS_CUSTOM_TARBALL_LOCATION)),)
|
||||
$(error No tarball location specified. Please check BR2_TARGET_OPTEE_OS_CUSTOM_TARBALL_LOCATION)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_OPTEE_OS_CUSTOM_GIT),y)
|
||||
ifeq ($(call qstrip,$(BR2_TARGET_OPTEE_OS_CUSTOM_REPO_URL)),)
|
||||
$(error No repository specified. Please check BR2_TARGET_OPTEE_OS_CUSTOM_REPO_URL)
|
||||
endif
|
||||
endif
|
||||
|
||||
endif # BR2_TARGET_OPTEE_OS && BR2_BUILDING
|
||||
|
||||
$(eval $(generic-package))
|
||||
17
boot/s500-bootloader/Config.in
Normal file
17
boot/s500-bootloader/Config.in
Normal file
@ -0,0 +1,17 @@
|
||||
config BR2_TARGET_S500_BOOTLOADER
|
||||
bool "s500-bootloader"
|
||||
depends on BR2_arm
|
||||
depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
|
||||
select BR2_HOSTARCH_NEEDS_IA32_LIBS
|
||||
help
|
||||
1st level bootloader for Actions Semiconductor S500 SoC.
|
||||
|
||||
https://github.com/xapp-le/owl
|
||||
|
||||
config BR2_TARGET_S500_BOOTLOADER_BOARD
|
||||
string "board to configure for"
|
||||
depends on BR2_TARGET_S500_BOOTLOADER
|
||||
help
|
||||
Specify the board to configure the bootloader for.
|
||||
This should be the name of a directory under s500/boards
|
||||
containing a suitable bootloader.ini file.
|
||||
2
boot/s500-bootloader/s500-bootloader.hash
Normal file
2
boot/s500-bootloader/s500-bootloader.hash
Normal file
@ -0,0 +1,2 @@
|
||||
# Locally calculated
|
||||
sha256 b183024ac69f51ea7befd28d03b2ec35a7280e270405600fb4f37aa91d9c9571 s500-bootloader-a8d7fa1d9a7f353ec4613febf30f4ca99a10a106.tar.gz
|
||||
34
boot/s500-bootloader/s500-bootloader.mk
Normal file
34
boot/s500-bootloader/s500-bootloader.mk
Normal file
@ -0,0 +1,34 @@
|
||||
################################################################################
|
||||
#
|
||||
# s500-bootloader
|
||||
#
|
||||
################################################################################
|
||||
|
||||
S500_BOOTLOADER_VERSION = a8d7fa1d9a7f353ec4613febf30f4ca99a10a106
|
||||
S500_BOOTLOADER_SITE = $(call github,xapp-le,owl,$(S500_BOOTLOADER_VERSION))
|
||||
S500_BOOTLOADER_LICENSE = PROPRIETARY
|
||||
S500_BOOTLOADER_INSTALL_TARGET = NO
|
||||
S500_BOOTLOADER_INSTALL_IMAGES = YES
|
||||
|
||||
S500_BOOTLOADER_BOARD = $(call qstrip,$(BR2_TARGET_S500_BOOTLOADER_BOARD))
|
||||
|
||||
define S500_BOOTLOADER_BUILD_CMDS
|
||||
cd $(@D) && ./tools/utils/bootloader_pack \
|
||||
s500/bootloader/bootloader.bin \
|
||||
s500/boards/$(S500_BOOTLOADER_BOARD)/bootloader.ini \
|
||||
s500-bootloader.bin
|
||||
endef
|
||||
|
||||
define S500_BOOTLOADER_INSTALL_IMAGES_CMDS
|
||||
$(INSTALL) -m 0644 -D $(@D)/s500-bootloader.bin \
|
||||
$(BINARIES_DIR)/s500-bootloader.bin
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
|
||||
ifeq ($(BR2_TARGET_S500_BOOTLOADER)$(BR_BUILDING),yy)
|
||||
# we NEED a board name
|
||||
ifeq ($(S500_BOOTLOADER_BOARD),)
|
||||
$(error No s500-bootloader board specified. Check your BR2_TARGET_S500_BOOTLOADER settings)
|
||||
endif
|
||||
endif
|
||||
25
boot/shim/Config.in
Normal file
25
boot/shim/Config.in
Normal file
@ -0,0 +1,25 @@
|
||||
config BR2_PACKAGE_SHIM_ARCH_SUPPORTS
|
||||
bool
|
||||
default y if BR2_aarch64
|
||||
default y if BR2_arm
|
||||
default y if BR2_i386
|
||||
default y if BR2_x86_64
|
||||
# it includes gnu-efi
|
||||
depends on BR2_PACKAGE_GNU_EFI_ARCH_SUPPORTS
|
||||
|
||||
config BR2_TARGET_SHIM
|
||||
bool "shim"
|
||||
depends on BR2_PACKAGE_SHIM_ARCH_SUPPORTS
|
||||
help
|
||||
Boot loader to chain-load signed boot loaders under Secure
|
||||
Boot.
|
||||
|
||||
This package provides a minimalist boot loader which allows
|
||||
verifying signatures of other UEFI binaries against either
|
||||
the Secure Boot DB/DBX or against a built-in signature
|
||||
database. Its purpose is to allow a small,
|
||||
infrequently-changing binary to be signed by the UEFI CA,
|
||||
while allowing an OS distributor to revision their main
|
||||
bootloader independently of the CA.
|
||||
|
||||
https://github.com/rhboot/shim
|
||||
3
boot/shim/shim.hash
Normal file
3
boot/shim/shim.hash
Normal file
@ -0,0 +1,3 @@
|
||||
# locally computed hash
|
||||
sha256 8344473dd10569588b8238a4656b8fab226714eea9f5363f8c410aa8a5090297 shim-15.4.tar.bz2
|
||||
sha256 15edf527919ddcb2f514ab9d16ad07ef219e4bb490e0b79560be510f0c159cc2 COPYRIGHT
|
||||
29
boot/shim/shim.mk
Normal file
29
boot/shim/shim.mk
Normal file
@ -0,0 +1,29 @@
|
||||
################################################################################
|
||||
#
|
||||
# shim
|
||||
#
|
||||
################################################################################
|
||||
|
||||
SHIM_VERSION = 15.4
|
||||
SHIM_SITE = https://github.com/rhboot/shim/releases/download/$(SHIM_VERSION)
|
||||
SHIM_SOURCE = shim-$(SHIM_VERSION).tar.bz2
|
||||
SHIM_LICENSE = BSD-2-Clause
|
||||
SHIM_LICENSE_FILES = COPYRIGHT
|
||||
SHIM_CPE_ID_VENDOR = redhat
|
||||
SHIM_INSTALL_TARGET = NO
|
||||
SHIM_INSTALL_IMAGES = YES
|
||||
|
||||
SHIM_MAKE_OPTS = \
|
||||
ARCH="$(GNU_EFI_PLATFORM)" \
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||
DASHJ="-j$(PARALLEL_JOBS)"
|
||||
|
||||
define SHIM_BUILD_CMDS
|
||||
$(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) $(SHIM_MAKE_OPTS)
|
||||
endef
|
||||
|
||||
define SHIM_INSTALL_IMAGES_CMDS
|
||||
$(INSTALL) -m 0755 -t $(BINARIES_DIR) $(@D)/*.efi
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
8
boot/sun20i-d1-spl/Config.in
Normal file
8
boot/sun20i-d1-spl/Config.in
Normal file
@ -0,0 +1,8 @@
|
||||
config BR2_TARGET_SUN20I_D1_SPL
|
||||
bool "sun20-d1-spl"
|
||||
depends on BR2_RISCV_64
|
||||
help
|
||||
Allwinner D1 boot0 code with modifications to use as U-Boot
|
||||
SPL.
|
||||
|
||||
https://github.com/smaeul/sun20i_d1_spl
|
||||
2
boot/sun20i-d1-spl/sun20i-d1-spl.hash
Normal file
2
boot/sun20i-d1-spl/sun20i-d1-spl.hash
Normal file
@ -0,0 +1,2 @@
|
||||
# Locally computed
|
||||
sha256 08e2d0574e58c99734cd1d9ea89b86464242bf2db4f6769b23803bf9dcdac3c4 sun20i-d1-spl-882671fcf53137aaafc3a94fa32e682cb7b921f1.tar.gz
|
||||
23
boot/sun20i-d1-spl/sun20i-d1-spl.mk
Normal file
23
boot/sun20i-d1-spl/sun20i-d1-spl.mk
Normal file
@ -0,0 +1,23 @@
|
||||
################################################################################
|
||||
#
|
||||
# sun20i-d1-spl
|
||||
#
|
||||
################################################################################
|
||||
|
||||
# Commit on the 'mainline' branch
|
||||
SUN20I_D1_SPL_VERSION = 882671fcf53137aaafc3a94fa32e682cb7b921f1
|
||||
SUN20I_D1_SPL_SITE = $(call github,smaeul,sun20i_d1_spl,$(SUN20I_D1_SPL_VERSION))
|
||||
SUN20I_D1_SPL_INSTALL_TARGET = NO
|
||||
SUN20I_D1_SPL_INSTALL_IMAGES = YES
|
||||
SUN20I_D1_SPL_LICENSE = GPL-2.0+
|
||||
|
||||
define SUN20I_D1_SPL_BUILD_CMDS
|
||||
$(MAKE) -C $(@D) CROSS_COMPILE="$(TARGET_CROSS)" p=sun20iw1p1 mmc
|
||||
endef
|
||||
|
||||
define SUN20I_D1_SPL_INSTALL_IMAGES_CMDS
|
||||
$(INSTALL) -D -m 0644 $(@D)/nboot/boot0_sdcard_sun20iw1p1.bin \
|
||||
$(BINARIES_DIR)/boot0_sdcard_sun20iw1p1.bin
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
@ -0,0 +1,82 @@
|
||||
From da5cbd1a3b248f2d32281a1766a3d1414c0e8e03 Mon Sep 17 00:00:00 2001
|
||||
From: Sylvain Gault <sylvain.gault@gmail.com>
|
||||
Date: Tue, 29 Sep 2015 02:38:25 +0200
|
||||
Subject: [PATCH] bios: Fix alignment change with gcc 5
|
||||
|
||||
The section aligment specified in the ld scripts have to be greater or
|
||||
equal to those in the .o files generated by gcc.
|
||||
|
||||
Signed-off-by: Sylvain Gault <sylvain.gault@gmail.com>
|
||||
Tested-by: poma <pomidorabelisima@gmail.com>
|
||||
Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
|
||||
Signed-off-by: Frank Hunleth <fhunleth@troodon-software.com>
|
||||
---
|
||||
core/i386/syslinux.ld | 6 +++---
|
||||
core/x86_64/syslinux.ld | 6 +++---
|
||||
2 files changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/core/i386/syslinux.ld b/core/i386/syslinux.ld
|
||||
index 7b4e012..7390451 100644
|
||||
--- a/core/i386/syslinux.ld
|
||||
+++ b/core/i386/syslinux.ld
|
||||
@@ -266,7 +266,7 @@ SECTIONS
|
||||
__text_end = .;
|
||||
}
|
||||
|
||||
- . = ALIGN(16);
|
||||
+ . = ALIGN(32);
|
||||
|
||||
__rodata_vma = .;
|
||||
__rodata_lma = __rodata_vma + __text_lma - __text_vma;
|
||||
@@ -361,7 +361,7 @@ SECTIONS
|
||||
__dynamic_end = .;
|
||||
}
|
||||
|
||||
- . = ALIGN(16);
|
||||
+ . = ALIGN(32);
|
||||
|
||||
__data_vma = .;
|
||||
__data_lma = __data_vma + __text_lma - __text_vma;
|
||||
@@ -377,7 +377,7 @@ SECTIONS
|
||||
__pm_code_dwords = (__pm_code_len + 3) >> 2;
|
||||
|
||||
. = ALIGN(128);
|
||||
-
|
||||
+
|
||||
__bss_vma = .;
|
||||
__bss_lma = .; /* Dummy */
|
||||
.bss (NOLOAD) : AT (__bss_lma) {
|
||||
diff --git a/core/x86_64/syslinux.ld b/core/x86_64/syslinux.ld
|
||||
index 1057112..bf815c4 100644
|
||||
--- a/core/x86_64/syslinux.ld
|
||||
+++ b/core/x86_64/syslinux.ld
|
||||
@@ -266,7 +266,7 @@ SECTIONS
|
||||
__text_end = .;
|
||||
}
|
||||
|
||||
- . = ALIGN(16);
|
||||
+ . = ALIGN(32);
|
||||
|
||||
__rodata_vma = .;
|
||||
__rodata_lma = __rodata_vma + __text_lma - __text_vma;
|
||||
@@ -361,7 +361,7 @@ SECTIONS
|
||||
__dynamic_end = .;
|
||||
}
|
||||
|
||||
- . = ALIGN(16);
|
||||
+ . = ALIGN(32);
|
||||
|
||||
__data_vma = .;
|
||||
__data_lma = __data_vma + __text_lma - __text_vma;
|
||||
@@ -377,7 +377,7 @@ SECTIONS
|
||||
__pm_code_dwords = (__pm_code_len + 3) >> 2;
|
||||
|
||||
. = ALIGN(128);
|
||||
-
|
||||
+
|
||||
__bss_vma = .;
|
||||
__bss_lma = .; /* Dummy */
|
||||
.bss (NOLOAD) : AT (__bss_lma) {
|
||||
--
|
||||
2.7.4
|
||||
|
||||
30
boot/syslinux/0002-Disable-PIE-to-avoid-FTBFS-on-amd64.patch
Normal file
30
boot/syslinux/0002-Disable-PIE-to-avoid-FTBFS-on-amd64.patch
Normal file
@ -0,0 +1,30 @@
|
||||
From 250bf2c921713434627dc7bc8b0918fa0841f9b7 Mon Sep 17 00:00:00 2001
|
||||
From: Graham Inggs <ginggs@ubuntu.com>
|
||||
Date: Wed, 5 Apr 2017 22:03:12 +0200
|
||||
Subject: [PATCH] Disable PIE to avoid FTBFS on amd64
|
||||
|
||||
gcc 6.x has PIE support enabled by default, which causes a build issue
|
||||
with syslinux. This patch disables PIE support in the relevant
|
||||
syslinux Makefile.
|
||||
|
||||
Signed-off-by: Ryan Coe <bluemrp9@gmail.com>
|
||||
---
|
||||
gpxe/src/Makefile | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gpxe/src/Makefile b/gpxe/src/Makefile
|
||||
index cc91d78..077af64 100644
|
||||
--- a/gpxe/src/Makefile
|
||||
+++ b/gpxe/src/Makefile
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
|
||||
CLEANUP :=
|
||||
-CFLAGS :=
|
||||
+CFLAGS := -fno-PIE
|
||||
ASFLAGS :=
|
||||
LDFLAGS :=
|
||||
MAKEDEPS := Makefile
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@ -0,0 +1,32 @@
|
||||
From c0287594239d5af2082cac20817f8e8b11a4b1b2 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Beno=C3=AEt=20Allard?= <benoit.allard@greenbone.net>
|
||||
Date: Wed, 5 Apr 2017 14:18:09 +0200
|
||||
Subject: [PATCH] memdisk: Force ld output format to 32-bits
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
On toolchains where the default output is x86_64, we need to be
|
||||
consistent with the other .o files
|
||||
|
||||
Signed-off-by: Benoît Allard <benoit.allard@greenbone.net>
|
||||
---
|
||||
memdisk/Makefile | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/memdisk/Makefile b/memdisk/Makefile
|
||||
index e6557d8..06613ff 100644
|
||||
--- a/memdisk/Makefile
|
||||
+++ b/memdisk/Makefile
|
||||
@@ -78,7 +78,7 @@ memdisk16.o: memdisk16.asm
|
||||
$(NASM) -f bin $(NASMOPT) $(NFLAGS) $(NINCLUDE) -o $@ -l $*.lst $<
|
||||
|
||||
memdisk_%.o: memdisk_%.bin
|
||||
- $(LD) -r -b binary -o $@ $<
|
||||
+ $(LD) --oformat elf32-i386 -r -b binary -o $@ $<
|
||||
|
||||
memdisk16.elf: $(OBJS16)
|
||||
$(LD) -Ttext 0 -o $@ $^
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@ -0,0 +1,60 @@
|
||||
From e000251144056c99e390a2a4449d06cbd2a19c0a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Beno=C3=AEt=20Allard?= <benoit.allard@greenbone.net>
|
||||
Date: Wed, 5 Apr 2017 14:25:02 +0200
|
||||
Subject: [PATCH] utils: Use the host toolchain to build.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The utilities are meant to run on the host machine, hence must be built using
|
||||
the host toolchain.
|
||||
|
||||
Signed-off-by: Benoît Allard <benoit.allard@greenbone.net>
|
||||
---
|
||||
utils/Makefile | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/utils/Makefile b/utils/Makefile
|
||||
index dfe6259..ac91aaa 100644
|
||||
--- a/utils/Makefile
|
||||
+++ b/utils/Makefile
|
||||
@@ -17,8 +17,8 @@
|
||||
VPATH = $(SRC)
|
||||
include $(MAKEDIR)/syslinux.mk
|
||||
|
||||
-CFLAGS = $(GCCWARN) -Os -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 -I$(SRC)
|
||||
-LDFLAGS = -O2
|
||||
+CFLAGS = $(CFLAGS_FOR_BUILD) $(GCCWARN) -Os -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 -I$(SRC)
|
||||
+LDFLAGS = $(LDFLAGS_FOR_BUILD) -O2
|
||||
|
||||
C_TARGETS = isohybrid gethostip memdiskfind
|
||||
SCRIPT_TARGETS = mkdiskimage
|
||||
@@ -35,7 +35,7 @@ ISOHDPFX = $(addprefix $(OBJ)/,../mbr/isohdpfx.bin ../mbr/isohdpfx_f.bin \
|
||||
all: $(TARGETS)
|
||||
|
||||
%.o: %.c
|
||||
- $(CC) $(UMAKEDEPS) $(CFLAGS) -c -o $@ $<
|
||||
+ $(CC_FOR_BUILD) $(UMAKEDEPS) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
mkdiskimage: mkdiskimage.in ../mbr/mbr.bin bin2hex.pl
|
||||
$(PERL) $(SRC)/bin2hex.pl < $(OBJ)/../mbr/mbr.bin | cat $(SRC)/mkdiskimage.in - > $@
|
||||
@@ -51,13 +51,13 @@ isohdpfx.c: $(ISOHDPFX) isohdpfxarray.pl
|
||||
$(PERL) $(SRC)/isohdpfxarray.pl $(ISOHDPFX) > $@
|
||||
|
||||
isohybrid: isohybrid.o isohdpfx.o
|
||||
- $(CC) $(LDFLAGS) -o $@ $^ -luuid
|
||||
+ $(CC_FOR_BUILD) $(LDFLAGS) -o $@ $^ -luuid
|
||||
|
||||
gethostip: gethostip.o
|
||||
- $(CC) $(LDFLAGS) -o $@ $^
|
||||
+ $(CC_FOR_BUILD) $(LDFLAGS) -o $@ $^
|
||||
|
||||
memdiskfind: memdiskfind.o
|
||||
- $(CC) $(LDFLAGS) -o $@ $^
|
||||
+ $(CC_FOR_BUILD) $(LDFLAGS) -o $@ $^
|
||||
|
||||
tidy dist:
|
||||
rm -f *.o .*.d isohdpfx.c
|
||||
--
|
||||
2.1.4
|
||||
|
||||
@ -0,0 +1,44 @@
|
||||
From 83e1f00990c25554723609bb549e18b987034317 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Beno=C3=AEt=20Allard?= <benoit.allard@greenbone.net>
|
||||
Date: Thu, 6 Apr 2017 09:43:46 +0200
|
||||
Subject: [PATCH] lzo: Use the host toolchain for prepcore
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Benoît Allard <benoit.allard@greenbone.net>
|
||||
---
|
||||
lzo/Makefile | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/lzo/Makefile b/lzo/Makefile
|
||||
index 29f1fa6..c016e5a 100644
|
||||
--- a/lzo/Makefile
|
||||
+++ b/lzo/Makefile
|
||||
@@ -11,10 +11,13 @@
|
||||
## -----------------------------------------------------------------------
|
||||
|
||||
VPATH = $(SRC)
|
||||
-include $(MAKEDIR)/build.mk
|
||||
+include $(MAKEDIR)/syslinux.mk
|
||||
|
||||
INCLUDES += -I$(SRC)/include
|
||||
|
||||
+%.o: %.c
|
||||
+ $(CC_FOR_BUILD) $(UMAKEDEPS) $(CFLAGS_FOR_BUILD) $(INCLUDES) -c -o $@ $<
|
||||
+
|
||||
LIBOBJS = $(patsubst %.c,%.o,$(subst $(SRC)/,,$(wildcard $(SRC)/src/*.c)))
|
||||
LIB = lzo.a
|
||||
BINS = prepcore
|
||||
@@ -30,7 +33,7 @@ $(LIB) : $(LIBOBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
prepcore : prepcore.o $(LIB)
|
||||
- $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
|
||||
+ $(CC_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ $^ $(LIBS)
|
||||
|
||||
tidy dist clean spotless:
|
||||
rm -f $(BINS)
|
||||
--
|
||||
2.1.4
|
||||
|
||||
@ -0,0 +1,37 @@
|
||||
From 39274503292a6003b1b0c93f694e34f11e85ea44 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Beno=C3=AEt=20Allard?= <benoit.allard@greenbone.net>
|
||||
Date: Fri, 9 Jun 2017 11:55:14 +0200
|
||||
Subject: [PATCH] The VPrint definition is now part of the exports of
|
||||
gnu-efi
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Benoît Allard <benoit.allard@greenbone.net>
|
||||
---
|
||||
efi/fio.h | 9 ---------
|
||||
1 file changed, 9 deletions(-)
|
||||
|
||||
diff --git a/efi/fio.h b/efi/fio.h
|
||||
index 65fff8d..a1bfe68 100644
|
||||
--- a/efi/fio.h
|
||||
+++ b/efi/fio.h
|
||||
@@ -11,15 +11,6 @@
|
||||
#define MAX_EFI_ARGS 64
|
||||
#define WS(c16) (c16 == L' ' || c16 == CHAR_TAB)
|
||||
|
||||
-/* VPrint is not in export declarations in gnu-efi lib yet
|
||||
- * although it is a global function; declare it here
|
||||
- */
|
||||
-extern UINTN
|
||||
-VPrint (
|
||||
- IN CHAR16 *fmt,
|
||||
- va_list args
|
||||
- );
|
||||
-
|
||||
extern EFI_STATUS efi_errno;
|
||||
|
||||
void efi_memcpy(unsigned char *dst, unsigned char *src, size_t len);
|
||||
--
|
||||
2.1.4
|
||||
|
||||
@ -0,0 +1,37 @@
|
||||
From 3bd5c2d951421a89f76b2423e5810862f53486c1 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Beno=C3=AEt=20Allard?= <benoit.allard@greenbone.net>
|
||||
Date: Fri, 9 Jun 2017 11:59:43 +0200
|
||||
Subject: [PATCH] Update the longjump calls to fit the new declaration
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Benoît Allard <benoit.allard@greenbone.net>
|
||||
---
|
||||
efi/main.c | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/efi/main.c b/efi/main.c
|
||||
index 208fee4f..71d31a5c 100644
|
||||
--- a/efi/main.c
|
||||
+++ b/efi/main.c
|
||||
@@ -10,7 +10,6 @@
|
||||
#include <syslinux/firmware.h>
|
||||
#include <syslinux/linux.h>
|
||||
#include <sys/ansi.h>
|
||||
-#include <setjmp.h>
|
||||
|
||||
#include "efi.h"
|
||||
#include "fio.h"
|
||||
@@ -30,7 +29,7 @@ uint32_t timer_irq;
|
||||
__export uint8_t KbdMap[256];
|
||||
char aux_seg[256];
|
||||
|
||||
-static jmp_buf load_error_buf;
|
||||
+static jmp_buf *load_error_buf;
|
||||
|
||||
static inline EFI_STATUS
|
||||
efi_close_protocol(EFI_HANDLE handle, EFI_GUID *guid, EFI_HANDLE agent,
|
||||
--
|
||||
2.13.3
|
||||
|
||||
@ -0,0 +1,32 @@
|
||||
From ca8aaded0c7c3900397029bd9520132b62629308 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Beno=C3=AEt=20Allard?= <benoit.allard@greenbone.net>
|
||||
Date: Mon, 12 Jun 2017 14:59:16 +0200
|
||||
Subject: [PATCH] efi/wrapper: build it with the host toolchain.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The wrapper program is executed on the build machine, so it should be
|
||||
built with CC_FOR_BUILD.
|
||||
|
||||
Signed-off-by: Benoît Allard <benoit.allard@greenbone.net>
|
||||
---
|
||||
efi/Makefile | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/efi/Makefile b/efi/Makefile
|
||||
index d5443bd5..d24d16db 100644
|
||||
--- a/efi/Makefile
|
||||
+++ b/efi/Makefile
|
||||
@@ -79,7 +79,7 @@ syslinux.so: $(OBJS) $(CORE_OBJS) $(LIB_OBJS)
|
||||
# cp $^ $@
|
||||
|
||||
wrapper: wrapper.c
|
||||
- $(CC) $^ -o $@
|
||||
+ $(CC_FOR_BUILD) $^ -o $@
|
||||
|
||||
#
|
||||
# Build the wrapper app and wrap our .so to produce a .efi
|
||||
--
|
||||
2.13.3
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user