ajout de patches pour essayer de compiler U-Boot avec SPL_OF_CONTROL (sans succès)
This commit is contained in:
@@ -6,18 +6,11 @@ require conf/machine/include/ti33x.inc
|
|||||||
|
|
||||||
IMAGE_CLASSES += "sdcard_image-pengwyn"
|
IMAGE_CLASSES += "sdcard_image-pengwyn"
|
||||||
|
|
||||||
#IMAGE_FSTYPES += "ubifs ubi tar.bz2 jffs2 wic wic.bmap"
|
|
||||||
#IMAGE_FSTYPES ?= "tar.bz2 ext4 wic wic.bmap"
|
#IMAGE_FSTYPES ?= "tar.bz2 ext4 wic wic.bmap"
|
||||||
IMAGE_FSTYPES = "tar.bz2 ext4"
|
IMAGE_FSTYPES = "tar.bz2 ext4"
|
||||||
#WKS_FILE ?= "pengwyn.wks"
|
|
||||||
#MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "kernel-image kernel-devicetree"
|
#MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "kernel-image kernel-devicetree"
|
||||||
MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "kernel-image kernel-modules"
|
#MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "kernel-image kernel-modules"
|
||||||
#do_image_wic[depends] += " \
|
MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "kernel-image"
|
||||||
# mtools-native:do_populate_sysroot \
|
|
||||||
# dosfstools-native:do_populate_sysroot \
|
|
||||||
# virtual/bootloader:do_deploy \
|
|
||||||
# virtual/dtb:do_deploy \
|
|
||||||
#"
|
|
||||||
|
|
||||||
# A list of machine-dependent packages not essential for booting the image.
|
# A list of machine-dependent packages not essential for booting the image.
|
||||||
# Thus, the build does not fail if the packages do not exist.
|
# Thus, the build does not fail if the packages do not exist.
|
||||||
@@ -39,11 +32,56 @@ EXTRA_IMAGEDEPENDS += "virtual/bootloader virtual/dtb"
|
|||||||
PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot"
|
PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot"
|
||||||
PREFERRED_VERSION_u-boot ?= "u-boot-ti-staging_2020.07%"
|
PREFERRED_VERSION_u-boot ?= "u-boot-ti-staging_2020.07%"
|
||||||
|
|
||||||
|
# The file type for the Secondary Program Loader (SPL)
|
||||||
SPL_BINARY = "MLO"
|
SPL_BINARY = "MLO"
|
||||||
UBOOT_SUFFIX = "img"
|
UBOOT_SUFFIX = "img"
|
||||||
UBOOT_MACHINE = "pengwyn_defconfig"
|
UBOOT_MACHINE = "pengwyn_defconfig"
|
||||||
UBOOT_ENTRYPOINT = "0x80008000"
|
UBOOT_ENTRYPOINT = "0x80008000"
|
||||||
UBOOT_LOADADDRESS = "0x80008000"
|
UBOOT_LOADADDRESS = "0x80008000"
|
||||||
|
UBOOT_DTB_LOADADDRESS = "0x80F80000"
|
||||||
|
|
||||||
|
# Localtion of the directory containing the RSA key and certificate used for signing image
|
||||||
|
UBOOT_SIGN_KEYDIR = "${PWD}/scle_keys"
|
||||||
|
# keys name in keydir (eg. "dev.crt", "dev.key")
|
||||||
|
UBOOT_SIGN_KEYNAME = "scle"
|
||||||
|
UBOOT_SIGN_ENABLE = "1"
|
||||||
|
|
||||||
|
# Localtion of the directory containing the RSA key and certificate used for signing bootloader
|
||||||
|
SPL_SIGN_KEYDIR = "${PWD}/scle_keys"
|
||||||
|
SPL_SIGN_KEYNAME = "scle"
|
||||||
|
SPL_SIGN_ENABLE = "0"
|
||||||
|
|
||||||
|
##########################################################
|
||||||
|
#
|
||||||
|
# U-Boot FIT Image
|
||||||
|
#
|
||||||
|
##########################################################
|
||||||
|
|
||||||
|
# Enable use of a U-Boot fitImage
|
||||||
|
UBOOT_FITIMAGE_ENABLE = "0"
|
||||||
|
# U-Boot fitImage Hash Algo
|
||||||
|
UBOOT_FIT_HASH_ALG = "sha256"
|
||||||
|
# U-Boot fitImage Signature Algo
|
||||||
|
UBOOT_FIT_SIGN_ALG = "rsa4096"
|
||||||
|
# Generate keys for signing U-Boot fitImage
|
||||||
|
UBOOT_FIT_GENERATE_KEYS = "0"
|
||||||
|
# Size of private keys in number of bits
|
||||||
|
UBOOT_FIT_SIGN_NUMBITS = "4096"
|
||||||
|
|
||||||
|
##########################################################
|
||||||
|
#
|
||||||
|
# Kernel FIT Image
|
||||||
|
#
|
||||||
|
##########################################################
|
||||||
|
|
||||||
|
# Decides whether to generate the keys for signing fitImage if they don’t already exist
|
||||||
|
FIT_GENERATE_KEYS = "1"
|
||||||
|
# Specifies the hash algorithm used in creating the FIT Image
|
||||||
|
FIT_HASH_ALG = "sha256"
|
||||||
|
# Specifies the signature algorithm used in creating the FIT Image
|
||||||
|
FIT_SIGN_ALG = "rsa4096"
|
||||||
|
# Size of private key in number of bits used in fitImage
|
||||||
|
FIT_SIGN_NUMBITS = "4096"
|
||||||
|
|
||||||
##########################################################
|
##########################################################
|
||||||
#
|
#
|
||||||
@@ -60,7 +98,9 @@ KERNEL_CLASSES ?= " kernel-fitimage "
|
|||||||
KERNEL_IMAGETYPE = "fitImage"
|
KERNEL_IMAGETYPE = "fitImage"
|
||||||
# Not necessary => see devicetree recipe
|
# Not necessary => see devicetree recipe
|
||||||
#KERNEL_DEVICETREE = "am335x-pengwyn.dtb"
|
#KERNEL_DEVICETREE = "am335x-pengwyn.dtb"
|
||||||
|
# Remove dtb from ti33x.inc
|
||||||
KERNEL_DEVICETREE:remove = " \
|
KERNEL_DEVICETREE:remove = " \
|
||||||
|
am335x-evm.dtb \
|
||||||
am335x-evmsk.dtb \
|
am335x-evmsk.dtb \
|
||||||
am335x-icev2.dtb \
|
am335x-icev2.dtb \
|
||||||
am335x-pocketbeagle.dtb am335x-bone.dtb am335x-boneblue.dtb \
|
am335x-pocketbeagle.dtb am335x-bone.dtb am335x-boneblue.dtb \
|
||||||
|
|||||||
@@ -174,7 +174,7 @@
|
|||||||
CONFIG_SPL_GPIO_SUPPORT=y
|
CONFIG_SPL_GPIO_SUPPORT=y
|
||||||
CONFIG_SPL_LIBCOMMON_SUPPORT=y
|
CONFIG_SPL_LIBCOMMON_SUPPORT=y
|
||||||
CONFIG_SPL_LIBGENERIC_SUPPORT=y
|
CONFIG_SPL_LIBGENERIC_SUPPORT=y
|
||||||
+CONFIG_SYS_MALLOC_F_LEN=0x1000
|
+CONFIG_SYS_MALLOC_F_LEN=0x2000
|
||||||
CONFIG_ENV_SIZE=0x4000
|
CONFIG_ENV_SIZE=0x4000
|
||||||
+CONFIG_ENV_OFFSET=0x260000
|
+CONFIG_ENV_OFFSET=0x260000
|
||||||
+CONFIG_DM_GPIO=y
|
+CONFIG_DM_GPIO=y
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
--- a/arch/arm/mach-omap2/am33xx/board.c
|
||||||
|
+++ b/arch/arm/mach-omap2/am33xx/board.c
|
||||||
|
@@ -7,6 +7,8 @@
|
||||||
|
* Copyright (C) 2011, Texas Instruments, Incorporated - http://www.ti.com/
|
||||||
|
*/
|
||||||
|
|
||||||
|
+#define DEBUG
|
||||||
|
+
|
||||||
|
#include <common.h>
|
||||||
|
#include <dm.h>
|
||||||
|
#include <debug_uart.h>
|
||||||
|
@@ -573,6 +575,16 @@ void board_init_f(ulong dummy)
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#ifdef CONFIG_SPL_LOAD_FIT
|
||||||
|
+int board_fit_config_name_match(const char *name)
|
||||||
|
+{
|
||||||
|
+ /* Just empty function now - can't decide what to choose */
|
||||||
|
+ debug("%s: %s\n", __func__, name);
|
||||||
|
+
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
int arch_cpu_init_dm(void)
|
||||||
|
{
|
||||||
|
hw_data_init();
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
--- a/common/spl/spl_mmc.c
|
||||||
|
+++ b/common/spl/spl_mmc.c
|
||||||
|
@@ -5,6 +5,9 @@
|
||||||
|
*
|
||||||
|
* Aneesh V <aneesh@ti.com>
|
||||||
|
*/
|
||||||
|
+
|
||||||
|
+#define DEBUG
|
||||||
|
+
|
||||||
|
#include <common.h>
|
||||||
|
#include <dm.h>
|
||||||
|
#include <log.h>
|
||||||
|
--- a/common/board_f.c
|
||||||
|
+++ b/common/board_f.c
|
||||||
|
@@ -9,6 +9,8 @@
|
||||||
|
* Marius Groeger <mgroeger@sysgo.de>
|
||||||
|
*/
|
||||||
|
|
||||||
|
+#define DEBUG
|
||||||
|
+
|
||||||
|
#include <common.h>
|
||||||
|
#include <bloblist.h>
|
||||||
|
#include <bootstage.h>
|
||||||
|
--- a/common/spl/spl.c
|
||||||
|
+++ b/common/spl/spl.c
|
||||||
|
@@ -6,6 +6,8 @@
|
||||||
|
* Aneesh V <aneesh@ti.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
+#define DEBUG
|
||||||
|
+
|
||||||
|
#include <common.h>
|
||||||
|
#include <bloblist.h>
|
||||||
|
#include <binman_sym.h>
|
||||||
|
@@ -715,10 +717,10 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
|
||||||
|
default:
|
||||||
|
debug("Unsupported OS image.. Jumping nevertheless..\n");
|
||||||
|
}
|
||||||
|
-#if CONFIG_VAL(SYS_MALLOC_F_LEN) && !defined(CONFIG_SYS_SPL_MALLOC_SIZE)
|
||||||
|
+//#if CONFIG_VAL(SYS_MALLOC_F_LEN) && !defined(CONFIG_SYS_SPL_MALLOC_SIZE)
|
||||||
|
debug("SPL malloc() used 0x%lx bytes (%ld KB)\n", gd->malloc_ptr,
|
||||||
|
gd->malloc_ptr / 1024);
|
||||||
|
-#endif
|
||||||
|
+//#endif
|
||||||
|
bootstage_mark_name(spl_phase() == PHASE_TPL ? BOOTSTAGE_ID_END_TPL :
|
||||||
|
BOOTSTAGE_ID_END_SPL, "end " SPL_TPL_NAME);
|
||||||
|
#ifdef CONFIG_BOOTSTAGE_STASH
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
--- a/board/ti/am335x/board.c
|
||||||
|
+++ b/board/ti/am335x/board.c
|
||||||
|
@@ -963,32 +963,32 @@ void board_fit_image_post_process(void **p_image, size_t *p_size)
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-#if !CONFIG_IS_ENABLED(OF_CONTROL)
|
||||||
|
-static const struct omap_hsmmc_plat am335x_mmc0_platdata = {
|
||||||
|
- .base_addr = (struct hsmmc *)OMAP_HSMMC1_BASE,
|
||||||
|
- .cfg.host_caps = MMC_MODE_HS_52MHz | MMC_MODE_HS | MMC_MODE_4BIT,
|
||||||
|
- .cfg.f_min = 400000,
|
||||||
|
- .cfg.f_max = 52000000,
|
||||||
|
- .cfg.voltages = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195,
|
||||||
|
- .cfg.b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT,
|
||||||
|
-};
|
||||||
|
-
|
||||||
|
-U_BOOT_DEVICE(am335x_mmc0) = {
|
||||||
|
- .name = "omap_hsmmc",
|
||||||
|
- .platdata = &am335x_mmc0_platdata,
|
||||||
|
-};
|
||||||
|
-
|
||||||
|
-static const struct omap_hsmmc_plat am335x_mmc1_platdata = {
|
||||||
|
- .base_addr = (struct hsmmc *)OMAP_HSMMC2_BASE,
|
||||||
|
- .cfg.host_caps = MMC_MODE_HS_52MHz | MMC_MODE_HS | MMC_MODE_8BIT,
|
||||||
|
- .cfg.f_min = 400000,
|
||||||
|
- .cfg.f_max = 52000000,
|
||||||
|
- .cfg.voltages = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195,
|
||||||
|
- .cfg.b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT,
|
||||||
|
-};
|
||||||
|
-
|
||||||
|
-U_BOOT_DEVICE(am335x_mmc1) = {
|
||||||
|
- .name = "omap_hsmmc",
|
||||||
|
- .platdata = &am335x_mmc1_platdata,
|
||||||
|
-};
|
||||||
|
-#endif
|
||||||
|
+//#if !CONFIG_IS_ENABLED(OF_CONTROL)
|
||||||
|
+//static const struct omap_hsmmc_plat am335x_mmc0_platdata = {
|
||||||
|
+// .base_addr = (struct hsmmc *)OMAP_HSMMC1_BASE,
|
||||||
|
+// .cfg.host_caps = MMC_MODE_HS_52MHz | MMC_MODE_HS | MMC_MODE_4BIT,
|
||||||
|
+// .cfg.f_min = 400000,
|
||||||
|
+// .cfg.f_max = 52000000,
|
||||||
|
+// .cfg.voltages = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195,
|
||||||
|
+// .cfg.b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT,
|
||||||
|
+//};
|
||||||
|
+//
|
||||||
|
+//U_BOOT_DEVICE(am335x_mmc0) = {
|
||||||
|
+// .name = "omap_hsmmc",
|
||||||
|
+// .platdata = &am335x_mmc0_platdata,
|
||||||
|
+//};
|
||||||
|
+//
|
||||||
|
+//static const struct omap_hsmmc_plat am335x_mmc1_platdata = {
|
||||||
|
+// .base_addr = (struct hsmmc *)OMAP_HSMMC2_BASE,
|
||||||
|
+// .cfg.host_caps = MMC_MODE_HS_52MHz | MMC_MODE_HS | MMC_MODE_8BIT,
|
||||||
|
+// .cfg.f_min = 400000,
|
||||||
|
+// .cfg.f_max = 52000000,
|
||||||
|
+// .cfg.voltages = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195,
|
||||||
|
+// .cfg.b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT,
|
||||||
|
+//};
|
||||||
|
+//
|
||||||
|
+//U_BOOT_DEVICE(am335x_mmc1) = {
|
||||||
|
+// .name = "omap_hsmmc",
|
||||||
|
+// .platdata = &am335x_mmc1_platdata,
|
||||||
|
+//};
|
||||||
|
+//#endif
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License version 2 as
|
||||||
|
* published by the Free Software Foundation.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "am33xx-u-boot.dtsi"
|
||||||
|
|
||||||
|
&am33xx_pinmux {
|
||||||
|
u-boot,dm-pre-reloc;
|
||||||
|
};
|
||||||
|
|
||||||
|
&uart0 {
|
||||||
|
u-boot,dm-pre-reloc;
|
||||||
|
};
|
||||||
|
|
||||||
|
&i2c0 {
|
||||||
|
u-boot,dm-pre-reloc;
|
||||||
|
};
|
||||||
|
|
||||||
|
&spi1 {
|
||||||
|
u-boot,dm-pre-reloc;
|
||||||
|
};
|
||||||
@@ -7,7 +7,7 @@ bootcmd=run mmcboot;run nandboot;
|
|||||||
bootdelay=2
|
bootdelay=2
|
||||||
bootdir=/boot
|
bootdir=/boot
|
||||||
bootenv=uEnv.txt
|
bootenv=uEnv.txt
|
||||||
bootfile=uImage
|
bootfile=fitImage
|
||||||
bootpart=0:2
|
bootpart=0:2
|
||||||
console=ttyS0,115200n8
|
console=ttyS0,115200n8
|
||||||
cpu=armv7
|
cpu=armv7
|
||||||
@@ -16,7 +16,7 @@ ethaddr=00:18:30:fc:c0:35
|
|||||||
fdtaddr=0x80F80000
|
fdtaddr=0x80F80000
|
||||||
fdtfile=am335x-pengwyn.dtb
|
fdtfile=am335x-pengwyn.dtb
|
||||||
importbootenv=echo Importing environment from mmc ...; env import -t $loadaddr $filesize
|
importbootenv=echo Importing environment from mmc ...; env import -t $loadaddr $filesize
|
||||||
loadaddr=0x80200000
|
loadaddr=0x80600000
|
||||||
loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}
|
loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}
|
||||||
loadfdt=fatload mmc ${mmcdev} ${fdtaddr} ${fdtfile}
|
loadfdt=fatload mmc ${mmcdev} ${fdtaddr} ${fdtfile}
|
||||||
loadimage=fatload mmc ${mmcdev} ${loadaddr} ${bootfile}
|
loadimage=fatload mmc ${mmcdev} ${loadaddr} ${bootfile}
|
||||||
@@ -41,8 +41,8 @@ partition=nand0,0
|
|||||||
rootpath=/export/rootfs
|
rootpath=/export/rootfs
|
||||||
soc=am33xx
|
soc=am33xx
|
||||||
static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off
|
static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off
|
||||||
stderr=ns16550_serial
|
stderr=serial@44e09000
|
||||||
stdin=ns16550_serial
|
stdin=serial@44e09000
|
||||||
stdout=ns16550_serial
|
stdout=serial@44e09000
|
||||||
vendor=silica
|
vendor=silica
|
||||||
ver=U-Boot 2020.07-g2f5fbb5b39 (Jul 06 2020 - 19:22:53 +0000)
|
ver=U-Boot 2020.07-g2f5fbb5b39 (Jul 06 2020 - 19:22:53 +0000)
|
||||||
|
|||||||
@@ -15,7 +15,11 @@ SRC_URI = " \
|
|||||||
file://0003-pengwyn-add-dts-to-makefile.patch \
|
file://0003-pengwyn-add-dts-to-makefile.patch \
|
||||||
file://0004-redeclaration-compile-error.patch \
|
file://0004-redeclaration-compile-error.patch \
|
||||||
file://0005-activate-spi1-clk.patch \
|
file://0005-activate-spi1-clk.patch \
|
||||||
|
file://0006-spl-load-fit-compile-err.patch \
|
||||||
|
file://0010-log-compile-err.patch \
|
||||||
|
file://0011-board-ti-spl-of-control.patch \
|
||||||
file://am335x-pengwyn.dts \
|
file://am335x-pengwyn.dts \
|
||||||
|
file://am335x-pengwyn-u-boot.dtsi \
|
||||||
file://uEnv.txt \
|
file://uEnv.txt \
|
||||||
"
|
"
|
||||||
|
|
||||||
@@ -29,6 +33,7 @@ S = "${WORKDIR}/git"
|
|||||||
do_configure:append() {
|
do_configure:append() {
|
||||||
install -d ${S}/arch/arm/dts
|
install -d ${S}/arch/arm/dts
|
||||||
install -m 0644 ${WORKDIR}/am335x-pengwyn.dts ${S}/arch/arm/dts
|
install -m 0644 ${WORKDIR}/am335x-pengwyn.dts ${S}/arch/arm/dts
|
||||||
|
install -m 0644 ${WORKDIR}/am335x-pengwyn-u-boot.dtsi ${S}/arch/arm/dts
|
||||||
}
|
}
|
||||||
|
|
||||||
do_deploy:append() {
|
do_deploy:append() {
|
||||||
|
|||||||
Reference in New Issue
Block a user