ajout de patches pour essayer de compiler U-Boot avec SPL_OF_CONTROL (sans succès)

This commit is contained in:
2023-03-14 16:44:25 +00:00
parent 46c88d0ea3
commit 73a447079c
8 changed files with 224 additions and 15 deletions
@@ -174,7 +174,7 @@
CONFIG_SPL_GPIO_SUPPORT=y
CONFIG_SPL_LIBCOMMON_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_OFFSET=0x260000
+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;
};
+5 -5
View File
@@ -7,7 +7,7 @@ bootcmd=run mmcboot;run nandboot;
bootdelay=2
bootdir=/boot
bootenv=uEnv.txt
bootfile=uImage
bootfile=fitImage
bootpart=0:2
console=ttyS0,115200n8
cpu=armv7
@@ -16,7 +16,7 @@ ethaddr=00:18:30:fc:c0:35
fdtaddr=0x80F80000
fdtfile=am335x-pengwyn.dtb
importbootenv=echo Importing environment from mmc ...; env import -t $loadaddr $filesize
loadaddr=0x80200000
loadaddr=0x80600000
loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}
loadfdt=fatload mmc ${mmcdev} ${fdtaddr} ${fdtfile}
loadimage=fatload mmc ${mmcdev} ${loadaddr} ${bootfile}
@@ -41,8 +41,8 @@ partition=nand0,0
rootpath=/export/rootfs
soc=am33xx
static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off
stderr=ns16550_serial
stdin=ns16550_serial
stdout=ns16550_serial
stderr=serial@44e09000
stdin=serial@44e09000
stdout=serial@44e09000
vendor=silica
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://0004-redeclaration-compile-error.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-u-boot.dtsi \
file://uEnv.txt \
"
@@ -29,6 +33,7 @@ S = "${WORKDIR}/git"
do_configure:append() {
install -d ${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() {