ajout d'une classe permettant de recreer un MLO a partir du spl.bin signé

This commit is contained in:
2023-04-20 10:08:11 +00:00
parent 1586f6939b
commit e9fff8b7f3
7 changed files with 426 additions and 151 deletions

23
classes/uboot-mlo.bbclass Normal file
View File

@@ -0,0 +1,23 @@
# We need some variables from u-boot-sign
inherit uboot-sign
PENGWYN_SPL_LOADADDR ?= "0x402F0400"
PENGWYN_SPL_IMAGE_TYPE ?= "omapimage"
PENGWYN_SPL_BINARYNAME ?= "MLO"
concat_spl_dtb_helper:append() {
bbplain "*** SCLE: UBOOT_MKIMAGE: ${UBOOT_MKIMAGE} ***"
bbplain "*** SCLE: SPL_IMAGE: ${SPL_IMAGE} ***"
# Create MLO after sign uboot-spl.bin and append signature to dtb
deployed_spl_dtb_binary='${DEPLOY_DIR_IMAGE}/${SPL_DTB_IMAGE}'
if [ -e "${DEPLOYDIR}/${SPL_NODTB_IMAGE}" -a -e "$deployed_spl_dtb_binary" ] ; then
deployed_mlo_binary='${DEPLOY_DIR_IMAGE}/${PENGWYN_SPL_BINARYNAME}'
bbplain "*** SCLE: deployed_mlo_binary: $deployed_mlo_binary ***"
${UBOOT_MKIMAGE} \
${@'-D "${SPL_MKIMAGE_DTCOPTS}"' if len('${SPL_MKIMAGE_DTCOPTS}') else ''} \
-T ${PENGWYN_SPL_IMAGE_TYPE} \
-a ${PENGWYN_SPL_LOADADDR} \
-d ${SPL_IMAGE} \
$deployed_mlo_binary
fi
}

View File

@@ -34,23 +34,26 @@ PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot"
PREFERRED_VERSION_u-boot ?= "u-boot-ti-staging_2023.01%"
# The file type for the Secondary Program Loader (SPL)
SPL_BINARY = "MLO"
SPL_BINARY = "spl/u-boot-spl.bin"
SPL_SUFFIX = "bin"
UBOOT_SUFFIX = "img"
UBOOT_MACHINE = "pengwyn_defconfig"
UBOOT_ENTRYPOINT = "0x80008000"
UBOOT_LOADADDRESS = "0x80008000"
#UBOOT_ENTRYPOINT = "0x80008000"
#UBOOT_LOADADDRESS = "0x80008000"
UBOOT_ENTRYPOINT = "0x80800000"
UBOOT_LOADADDRESS = "0x80800000"
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_KEYNAME = "scle_kernel"
UBOOT_SIGN_ENABLE = "1"
# Localtion of the directory containing the RSA key and certificate used for signing bootloader
# 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"
SPL_SIGN_KEYNAME = "scle_uboot"
SPL_SIGN_ENABLE = "1"
##########################################################
#
@@ -65,7 +68,7 @@ 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"
UBOOT_FIT_GENERATE_KEYS = "1"
# Size of private keys in number of bits
UBOOT_FIT_SIGN_NUMBITS = "4096"

View File

@@ -140,6 +140,282 @@
#ifdef USE_HOSTCC
#include "mkimage.h"
#include <time.h>
--- a/boot/image-fit.c
+++ b/boot/image-fit.c
@@ -8,6 +8,8 @@
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*/
+#define DEBUG
+
#define LOG_CATEGORY LOGC_BOOT
#ifdef USE_HOSTCC
@@ -380,8 +382,8 @@ void fit_print_contents(const void *fit)
const char *p;
time_t timestamp;
- if (!CONFIG_IS_ENABLED(FIT_PRINT))
- return;
+// if (!CONFIG_IS_ENABLED(FIT_PRINT))
+// return;
/* Indent string is defined in header image.h */
p = IMAGE_INDENT_STRING;
@@ -485,8 +487,8 @@ void fit_image_print(const void *fit, int image_noffset, const char *p)
int ndepth;
int ret;
- if (!CONFIG_IS_ENABLED(FIT_PRINT))
- return;
+// if (!CONFIG_IS_ENABLED(FIT_PRINT))
+// return;
/* Mandatory properties */
ret = fit_get_desc(fit, image_noffset, &desc);
@@ -601,6 +603,7 @@ int fit_get_desc(const void *fit, int noffset, char **desc)
*desc = (char *)fdt_getprop(fit, noffset, FIT_DESC_PROP, &len);
if (*desc == NULL) {
+ printf("fit_get_desc error\n");
fit_get_debug(fit, noffset, FIT_DESC_PROP, len);
return -1;
}
@@ -630,6 +633,7 @@ int fit_get_timestamp(const void *fit, int noffset, time_t *timestamp)
data = fdt_getprop(fit, noffset, FIT_TIMESTAMP_PROP, &len);
if (data == NULL) {
+ printf("fit_get_timestamp error\n");
fit_get_debug(fit, noffset, FIT_TIMESTAMP_PROP, len);
return -1;
}
@@ -659,6 +663,7 @@ int fit_image_get_node(const void *fit, const char *image_uname)
{
int noffset, images_noffset;
+ printf("fit_image_get_node ... starts (image_uname: %s)\n", image_uname);
images_noffset = fdt_path_offset(fit, FIT_IMAGES_PATH);
if (images_noffset < 0) {
debug("Can't find images parent node '%s' (%s)\n",
@@ -699,9 +704,11 @@ int fit_image_get_os(const void *fit, int noffset, uint8_t *os)
if (data == NULL) {
fit_get_debug(fit, noffset, FIT_OS_PROP, len);
*os = -1;
+ printf("fit_image_get_os - os = -1\n");
return -1;
}
+ printf("fit_image_get_os - os:%d\n", *os);
/* Translate OS name to id */
*os = genimg_get_os_id(data);
return 0;
@@ -729,6 +736,7 @@ int fit_image_get_arch(const void *fit, int noffset, uint8_t *arch)
/* Get architecture name from property data */
data = fdt_getprop(fit, noffset, FIT_ARCH_PROP, &len);
if (data == NULL) {
+ printf("fit_image_get_arch error\n");
fit_get_debug(fit, noffset, FIT_ARCH_PROP, len);
*arch = -1;
return -1;
@@ -761,11 +769,13 @@ int fit_image_get_type(const void *fit, int noffset, uint8_t *type)
/* Get image type name from property data */
data = fdt_getprop(fit, noffset, FIT_TYPE_PROP, &len);
if (data == NULL) {
+ printf("fit_image_get_type error\n");
fit_get_debug(fit, noffset, FIT_TYPE_PROP, len);
*type = -1;
return -1;
}
+ printf("fit_image_get_type: %d\n", *type);
/* Translate image type name to id */
*type = genimg_get_type_id(data);
return 0;
@@ -793,6 +803,7 @@ int fit_image_get_comp(const void *fit, int noffset, uint8_t *comp)
/* Get compression name from property data */
data = fdt_getprop(fit, noffset, FIT_COMP_PROP, &len);
if (data == NULL) {
+ printf("fit_image_get_comp error\n");
fit_get_debug(fit, noffset, FIT_COMP_PROP, len);
return -1;
}
@@ -822,6 +833,7 @@ int fit_image_get_phase(const void *fit, int offset, enum image_phase_t *phasep)
/* Get phase name from property data */
data = fdt_getprop(fit, offset, FIT_PHASE_PROP, &len);
if (!data) {
+ printf("fit_image_get_phase error\n");
fit_get_debug(fit, offset, FIT_PHASE_PROP, len);
*phasep = 0;
return -ENOENT;
@@ -845,6 +857,7 @@ static int fit_image_get_address(const void *fit, int noffset, char *name,
cell = fdt_getprop(fit, noffset, name, &len);
if (cell == NULL) {
+ printf("fit_image_get_address error\n");
fit_get_debug(fit, noffset, name, len);
return -1;
}
@@ -927,6 +940,7 @@ int fit_image_get_data(const void *fit, int noffset,
*data = fdt_getprop(fit, noffset, FIT_DATA_PROP, &len);
if (*data == NULL) {
+ printf("fit_image_get_data error\n");
fit_get_debug(fit, noffset, FIT_DATA_PROP, len);
*size = 0;
return -1;
@@ -1103,6 +1117,7 @@ int fit_image_hash_get_algo(const void *fit, int noffset, const char **algo)
*algo = (const char *)fdt_getprop(fit, noffset, FIT_ALGO_PROP, &len);
if (*algo == NULL) {
+ printf("fit_image_hash_get_algo error\n");
fit_get_debug(fit, noffset, FIT_ALGO_PROP, len);
return -1;
}
@@ -1132,6 +1147,7 @@ int fit_image_hash_get_value(const void *fit, int noffset, uint8_t **value,
*value = (uint8_t *)fdt_getprop(fit, noffset, FIT_VALUE_PROP, &len);
if (*value == NULL) {
+ printf("fit_image_hash_get_value error\n");
fit_get_debug(fit, noffset, FIT_VALUE_PROP, len);
*value_len = 0;
return -1;
@@ -1189,6 +1205,7 @@ int fit_image_cipher_get_algo(const void *fit, int noffset, char **algo)
*algo = (char *)fdt_getprop(fit, noffset, FIT_ALGO_PROP, &len);
if (!*algo) {
+ printf("fit_image_cipher_get_algo error\n");
fit_get_debug(fit, noffset, FIT_ALGO_PROP, len);
return -1;
}
@@ -1540,7 +1557,7 @@ static int fit_image_uncipher(const void *fit, int image_noffset,
int fit_image_check_os(const void *fit, int noffset, uint8_t os)
{
uint8_t image_os;
-
+ printf("fit_image_check_os ... os: %d\n", os);
if (fit_image_get_os(fit, noffset, &image_os))
return 0;
return (os == image_os);
@@ -1596,6 +1613,7 @@ int fit_image_check_type(const void *fit, int noffset, uint8_t type)
{
uint8_t image_type;
+ printf("fit_image_check_type ... type: %d\n", type);
if (fit_image_get_type(fit, noffset, &image_type))
return 0;
return (type == image_type);
@@ -1829,6 +1847,7 @@ int fit_conf_get_node(const void *fit, const char *conf_uname)
const char *s;
char *conf_uname_copy = NULL;
+ debug("fit_conf_get_node ... starts\n");
confs_noffset = fdt_path_offset(fit, FIT_CONFS_PATH);
if (confs_noffset < 0) {
debug("Can't find configurations parent node '%s' (%s)\n",
@@ -1848,6 +1867,7 @@ int fit_conf_get_node(const void *fit, const char *conf_uname)
conf_uname = (char *)fdt_getprop(fit, confs_noffset,
FIT_DEFAULT_PROP, &len);
if (conf_uname == NULL) {
+ printf("fit_conf_get_node error\n");
fit_get_debug(fit, confs_noffset, FIT_DEFAULT_PROP,
len);
return len;
@@ -1876,6 +1896,7 @@ int fit_conf_get_node(const void *fit, const char *conf_uname)
conf_uname, fdt_strerror(noffset));
}
+ debug("fit_conf_get_node ... noffset: %d\n", noffset);
free(conf_uname_copy);
return noffset;
@@ -1894,10 +1915,12 @@ int fit_conf_get_prop_node_index(const void *fit, int noffset,
int len;
/* get kernel image unit name from configuration kernel property */
+ printf("attributes => noffset: %d - index: %d - prop_name: %s\n", noffset, index, prop_name);
uname = fdt_stringlist_get(fit, noffset, prop_name, index, &len);
if (uname == NULL)
return len;
+ printf("ret uname: %s\n", uname);
return fit_image_get_node(fit, uname);
}
@@ -1905,22 +1928,28 @@ int fit_conf_get_prop_node(const void *fit, int noffset, const char *prop_name,
enum image_phase_t sel_phase)
{
int i, count;
-
- if (sel_phase == IH_PHASE_NONE)
+ printf("fit_conf_get_prop_node ... starts\n");
+ if (sel_phase == IH_PHASE_NONE) {
+ printf("fit_conf_get_prop_node ... sel_phase: %d\n", sel_phase);
return fit_conf_get_prop_node_index(fit, noffset, prop_name, 0);
+ }
count = fit_conf_get_prop_node_count(fit, noffset, prop_name);
- if (count < 0)
+ if (count < 0) {
+ printf("fit_conf_get_prop_node ... count: %d\n", count);
return count;
-
+ }
+ printf("fit_conf_get_prop_node - noffset: %d - count: %d - prop_name: %s\n", noffset, count, prop_name);
/* check each image in the list */
for (i = 0; i < count; i++) {
enum image_phase_t phase;
int ret, node;
+ printf("fit_conf_get_prop_node_index ... starts\n");
node = fit_conf_get_prop_node_index(fit, noffset, prop_name, i);
+ printf("fit_conf_get_prop_node_index ... ends && fit_conf_get_phase ... starts\n");
ret = fit_image_get_phase(fit, node, &phase);
-
+ printf("fit_image_get_phase ... ends && node: %d - ret: %d\n", node, ret);
/* if the image is for any phase, let's use it */
if (ret == -ENOENT)
return node;
@@ -2071,6 +2100,7 @@ int fit_image_load(struct bootm_headers *images, ulong addr,
const char *prop_name;
int ret;
+ printf("fit_image_load (ph_type: %d - image_type: %d)...\n", ph_type, image_type);
fit = map_sysmem(addr, 0);
fit_uname = fit_unamep ? *fit_unamep : NULL;
fit_uname_config = fit_uname_configp ? *fit_uname_configp : NULL;
@@ -2104,6 +2134,7 @@ int fit_image_load(struct bootm_headers *images, ulong addr,
} else {
cfg_noffset = fit_conf_get_node(fit, fit_uname_config);
}
+ printf("cfg_noffset : %d\n", cfg_noffset);
if (cfg_noffset < 0) {
puts("Could not find configuration node\n");
bootstage_error(bootstage_id +
@@ -2130,13 +2161,16 @@ int fit_image_load(struct bootm_headers *images, ulong addr,
bootstage_mark(BOOTSTAGE_ID_FIT_CONFIG);
+ printf("attributes => cfg_noffset: %d - prop_name: %s\n", cfg_noffset, prop_name);
noffset = fit_conf_get_prop_node(fit, cfg_noffset, prop_name,
image_ph_phase(ph_type));
+ printf("attributes => noffset: %d\n", noffset);
fit_uname = fit_get_name(fit, noffset, NULL);
}
if (noffset < 0) {
printf("Could not find subimage node type '%s'\n", prop_name);
bootstage_error(bootstage_id + BOOTSTAGE_SUB_SUBNODE);
+ fit_print_contents(fit);
return -ENOENT;
}
@@ -2182,6 +2216,7 @@ int fit_image_load(struct bootm_headers *images, ulong addr,
fit_image_check_os(fit, noffset, IH_OS_EFI) ||
fit_image_check_os(fit, noffset, IH_OS_VXWORKS);
+ printf("=> type_ok: %d - os_ok: %d\n", type_ok, os_ok);
/*
* If either of the checks fail, we should report an error, but
* if the image type is coming from the "loadables" field, we
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -6,6 +6,8 @@
@@ -214,152 +490,16 @@
#ifdef CONFIG_BOOTSTAGE_STASH
ret = bootstage_stash((void *)CONFIG_BOOTSTAGE_STASH_ADDR,
CONFIG_BOOTSTAGE_STASH_SIZE);
@@ -892,8 +903,11 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
@@ -892,8 +903,12 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
debug("Failed to stash bootstage: err=%d\n", ret);
#endif
+ debug("spl: scle2\n");
spl_board_prepare_for_boot();
+ debug("spl: scle3 (%s)\n", spl_image.name);
+ debug("spl: scle3\n");
+ debug("image entry point: 0x%lx\n", spl_image.entry_point);
jump_to_image_no_args(&spl_image);
+ debug("spl: scle4\n");
}
/*
--- a/boot/image-fit.c
+++ b/boot/image-fit.c
@@ -8,6 +8,8 @@
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*/
+#define DEBUG
+
#define LOG_CATEGORY LOGC_BOOT
#ifdef USE_HOSTCC
@@ -380,8 +382,8 @@ void fit_print_contents(const void *fit)
const char *p;
time_t timestamp;
- if (!CONFIG_IS_ENABLED(FIT_PRINT))
- return;
+// if (!CONFIG_IS_ENABLED(FIT_PRINT))
+// return;
/* Indent string is defined in header image.h */
p = IMAGE_INDENT_STRING;
@@ -485,8 +487,8 @@ void fit_image_print(const void *fit, int image_noffset, const char *p)
int ndepth;
int ret;
- if (!CONFIG_IS_ENABLED(FIT_PRINT))
- return;
+// if (!CONFIG_IS_ENABLED(FIT_PRINT))
+// return;
/* Mandatory properties */
ret = fit_get_desc(fit, image_noffset, &desc);
@@ -659,6 +661,7 @@ int fit_image_get_node(const void *fit, const char *image_uname)
{
int noffset, images_noffset;
+ printf("fit_image_get_node ... starts (image_uname: %s)\n", image_uname);
images_noffset = fdt_path_offset(fit, FIT_IMAGES_PATH);
if (images_noffset < 0) {
debug("Can't find images parent node '%s' (%s)\n",
@@ -1829,6 +1832,7 @@ int fit_conf_get_node(const void *fit, const char *conf_uname)
const char *s;
char *conf_uname_copy = NULL;
+ debug("fit_conf_get_node ... starts\n");
confs_noffset = fdt_path_offset(fit, FIT_CONFS_PATH);
if (confs_noffset < 0) {
debug("Can't find configurations parent node '%s' (%s)\n",
@@ -1876,6 +1880,7 @@ int fit_conf_get_node(const void *fit, const char *conf_uname)
conf_uname, fdt_strerror(noffset));
}
+ debug("fit_conf_get_node ... noffset: %d\n", noffset);
free(conf_uname_copy);
return noffset;
@@ -1894,10 +1899,12 @@ int fit_conf_get_prop_node_index(const void *fit, int noffset,
int len;
/* get kernel image unit name from configuration kernel property */
+ printf("attributes => noffset: %d - index: %d - prop_name: %s\n", noffset, index, prop_name);
uname = fdt_stringlist_get(fit, noffset, prop_name, index, &len);
if (uname == NULL)
return len;
+ printf("ret uname: %s\n", uname);
return fit_image_get_node(fit, uname);
}
@@ -1905,22 +1912,28 @@ int fit_conf_get_prop_node(const void *fit, int noffset, const char *prop_name,
enum image_phase_t sel_phase)
{
int i, count;
-
- if (sel_phase == IH_PHASE_NONE)
+ printf("fit_conf_get_prop_node ... starts\n");
+ if (sel_phase == IH_PHASE_NONE) {
+ printf("fit_conf_get_prop_node ... sel_phase: %d\n", sel_phase);
return fit_conf_get_prop_node_index(fit, noffset, prop_name, 0);
+ }
count = fit_conf_get_prop_node_count(fit, noffset, prop_name);
- if (count < 0)
+ if (count < 0) {
+ printf("fit_conf_get_prop_node ... count: %d\n", count);
return count;
-
+ }
+ printf("fit_conf_get_prop_node - noffset: %d - count: %d - prop_name: %s\n", noffset, count, prop_name);
/* check each image in the list */
for (i = 0; i < count; i++) {
enum image_phase_t phase;
int ret, node;
+ printf("fit_conf_get_prop_node_index ... starts\n");
node = fit_conf_get_prop_node_index(fit, noffset, prop_name, i);
+ printf("fit_conf_get_prop_node_index ... ends && fit_conf_get_phase ... starts\n");
ret = fit_image_get_phase(fit, node, &phase);
-
+ printf("fit_image_get_phase ... ends && node: %d - ret: %d\n", node, ret);
/* if the image is for any phase, let's use it */
if (ret == -ENOENT)
return node;
@@ -2071,6 +2084,7 @@ int fit_image_load(struct bootm_headers *images, ulong addr,
const char *prop_name;
int ret;
+ printf("fit_image_load (ph_type: %d - image_type: %d)...\n", ph_type, image_type);
fit = map_sysmem(addr, 0);
fit_uname = fit_unamep ? *fit_unamep : NULL;
fit_uname_config = fit_uname_configp ? *fit_uname_configp : NULL;
@@ -2104,6 +2118,7 @@ int fit_image_load(struct bootm_headers *images, ulong addr,
} else {
cfg_noffset = fit_conf_get_node(fit, fit_uname_config);
}
+ printf("cfg_noffset : %d\n", cfg_noffset);
if (cfg_noffset < 0) {
puts("Could not find configuration node\n");
bootstage_error(bootstage_id +
@@ -2130,13 +2145,16 @@ int fit_image_load(struct bootm_headers *images, ulong addr,
bootstage_mark(BOOTSTAGE_ID_FIT_CONFIG);
+ printf("attributes => cfg_noffset: %d - prop_name: %s\n", cfg_noffset, prop_name);
noffset = fit_conf_get_prop_node(fit, cfg_noffset, prop_name,
image_ph_phase(ph_type));
+ printf("attributes => noffset: %d\n", noffset);
fit_uname = fit_get_name(fit, noffset, NULL);
}
if (noffset < 0) {
printf("Could not find subimage node type '%s'\n", prop_name);
bootstage_error(bootstage_id + BOOTSTAGE_SUB_SUBNODE);
+ fit_print_contents(fit);
return -ENOENT;
}

View File

@@ -0,0 +1,50 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* pengwyn.h
*
* Copyright (C) 2013 Lothar Felten <lothar.felten@gmail.com>
*
* based on am335x_evm.h, Copyright (C) 2011 Texas Instruments Inc.
*/
#ifndef __CONFIG_PENGWYN_H
#define __CONFIG_PENGWYN_H
#include <configs/ti_am335x_common.h>
/* Clock Defines */
#define V_OSCK 24000000 /* Clock output from T2 */
#define V_SCLK (V_OSCK)
/* NAND Configuration. */
#define CONFIG_SYS_NAND_ECCPOS { 2, 3, 4, 5, 6, 7, 8, 9, \
10, 11, 12, 13, 14, 15, 16, 17, 18, 19, \
20, 21, 22, 23, 24, 25, 26, 27, 28, 29, \
30, 31, 32, 33, 34, 35, 36, 37, 38, 39, \
40, 41, 42, 43, 44, 45, 46, 47, 48, 49, \
50, 51, 52, 53, 54, 55, 56, 57, 58, 59, \
60, 61, 62, 63, 64, 65, 66, 67, 68, 69, \
70, 71, 72, 73, 74, 75, 76, 77, 78, 79, \
80, 81, 82, 83, 84, 85, 86, 87, 88, 89, \
90, 91, 92, 93, 94, 95, 96, 97, 98, 99, \
100, 101, 102, 103, 104, 105, 106, 107, 108, 109, \
110, 111, 112, 113, 114, 115, 116, 117, 118, 119, \
120, 121, 122, 123, 124, 125, 126, 127, 128, 129, \
130, 131, 132, 133, 134, 135, 136, 137, 138, 139, \
140, 141, 142, 143, 144, 145, 146, 147, 148, 149, \
150, 151, 152, 153, 154, 155, 156, 157, 158, 159, \
160, 161, 162, 163, 164, 165, 166, 167, 168, 169, \
170, 171, 172, 173, 174, 175, 176, 177, 178, 179, \
180, 181, 182, 183, 184, 185, 186, 187, 188, 189, \
190, 191, 192, 193, 194, 195, 196, 197, 198, 199, \
200, 201, 202, 203, 204, 205, 206, 207, 208, 209, \
}
#define CONFIG_SYS_NAND_ECCSIZE 512
#define CONFIG_SYS_NAND_ECCBYTES 26
/* END NAND Configuration. */
/* NS16550 Configuration: primary UART via FTDI */
#define CONFIG_SYS_NS16550_COM1 0x44e09000
#endif /* ! __CONFIG_PENGWYN_H */

View File

@@ -150,9 +150,9 @@ CONFIG_SHA512=y
CONFIG_SPL_SHA1=y
CONFIG_SPL_SHA256=y
CONFIG_SPL_SHA512=y
#CONFIG_FIT_SIGNATURE=y
#CONFIG_FIT_SIGNATURE_MAX_SIZE=0x10000000
#CONFIG_SPL_FIT_FULL_CHECK=y
CONFIG_FIT_SIGNATURE=y
CONFIG_FIT_SIGNATURE_MAX_SIZE=0x10000000
CONFIG_SPL_FIT_FULL_CHECK=y
CONFIG_SPL_FIT_SIGNATURE=y
CONFIG_SPL_FIT_SIGNATURE_MAX_SIZE=0x10000000
CONFIG_SPL_LOAD_FIT_FULL=y

View File

@@ -1,6 +1,7 @@
# Copyright (C) 2023 Vincent BENOIT <vincent.benoit@scle.fr>
# Release under the MIT license (see COPYING.MIT for the terms)
require u-boot-ti.inc
inherit uboot-mlo
FILESEXTRAPATHS:prepend := "${THISDIR}/files2:"
@@ -25,7 +26,6 @@ SRC_URI = " \
file://0002-add-target-pengwyn.patch \
file://0003-misc-board-failed.patch \
file://0010-log-compile-err.patch \
file://0020-debug.patch \
"
# Tag: v2023.01

View File

@@ -0,0 +1,59 @@
# Copyright (C) 2023 Vincent BENOIT <vincent.benoit@scle.fr>
# Release under the MIT license (see COPYING.MIT for the terms)
require u-boot-ti.inc
inherit uboot-mlo
FILESEXTRAPATHS:prepend := "${THISDIR}/files2:"
LIC_FILES_CHKSUM = "file://Licenses/README;md5=2ca5f2c35c8cc335f0a19756634782f1"
PR = "r33"
BRANCH = "master"
SRC_URI = " \
${UBOOT_GIT_URI};protocol=${UBOOT_GIT_PROTOCOL};branch=${BRANCH} \
file://board.c \
file://board.h \
file://Kconfig \
file://MAINTAINERS \
file://Makefile \
file://mux.c \
file://am335x_pengwyn.h \
file://pengwyn_defconfig \
file://am335x-pengwyn.dts \
file://am335x-pengwyn-u-boot.dtsi \
file://uEnv.txt \
file://0001-add-pengwyn-dts-to-makefile.patch \
file://0002-add-target-pengwyn.patch \
file://0003-misc-board-failed.patch \
file://0010-log-compile-err.patch \
file://0020-debug.patch \
"
# Tag: v2023.01
SRCREV = "62e2ad1ceafbfdf2c44d3dc1b6efc81e768a96b9"
S = "${WORKDIR}/git"
do_configure:prepend() {
install -d ${S}/board/silica/pengwyn
install -m 0644 ${WORKDIR}/board.c ${S}/board/silica/pengwyn
install -m 0644 ${WORKDIR}/board.h ${S}/board/silica/pengwyn
install -m 0644 ${WORKDIR}/Kconfig ${S}/board/silica/pengwyn
install -m 0644 ${WORKDIR}/MAINTAINERS ${S}/board/silica/pengwyn
install -m 0644 ${WORKDIR}/Makefile ${S}/board/silica/pengwyn
install -m 0644 ${WORKDIR}/mux.c ${S}/board/silica/pengwyn
install -d ${S}/configs
install -m 0644 ${WORKDIR}/pengwyn_defconfig ${S}/configs
install -d ${S}/include/configs/
install -m 0644 ${WORKDIR}/am335x_pengwyn.h ${S}/include/configs/
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() {
install -m 0644 ${WORKDIR}/uEnv.txt ${DEPLOY_DIR_IMAGE}
}