]> git.baikalelectronics.ru Git - uboot.git/commitdiff
comment openssl functions in image-host, increase relocations table size, remove...
authorBaikal Electronics <support@baikalelectronics.ru>
Fri, 19 Aug 2022 16:38:17 +0000 (19:38 +0300)
committerBaikal Electronics <support@baikalelectronics.ru>
Fri, 19 Aug 2022 16:38:17 +0000 (19:38 +0300)
configs/baikal_bfk3_defconfig
include/configs/baikal_mips.h
tools/image-host.c

index 0b9d8a67495eb88f923677d977e8fa56512ac176..485006476ef59b0eb17e47fcc233723fa63d8e6e 100644 (file)
@@ -106,7 +106,7 @@ CONFIG_ENV_ADDR=0x9C0C0000
 CONFIG_ENV_OFFSET=0x000C0000
 CONFIG_ENV_SIZE=0x00010000
 CONFIG_ENV_SECT_SIZE=0x00010000
-CONFIG_MIPS_RELOCATION_TABLE_SIZE=0x8700
+CONFIG_MIPS_RELOCATION_TABLE_SIZE=0x9000
 CONFIG_SYS_LOAD_ADDR=0x80100000
 CONFIG_TOOLS_LIBCRYPTO=n
-CONFIG_SYS_CLK_FREQ=1200000000
\ No newline at end of file
+CONFIG_SYS_CLK_FREQ=1200000000
index ad4ac148c55752e775d348ec62d995e138ee29b5..87a3f0b5b6af80f2c9122d80c4a150dfaf3f9547 100644 (file)
@@ -28,7 +28,6 @@ extern unsigned long baikal_clk_freq;
  * U-Boot initial parameters
  *-----------------------------------------------
  */
-#define CONFIG_SYS_MONITOR_BASE                CONFIG_SYS_TEXT_BASE
 #define CONFIG_SYS_MONITOR_LEN         (1 << 20)   /* 1 MB */
 #define CONFIG_SYS_BOOTPARAMS_LEN      (128 << 10) /* 128 KB */
 #define CONFIG_SYS_BOOTM_LEN           0x01000000
index 698adfb3e1d4db1372778a978bb8d5760ce9f10b..e3ea82a1e2ff76b18e1200eb1eb1b31518945d36 100644 (file)
 #include <image.h>
 #include <version.h>
 
+/*
 #include <openssl/pem.h>
 #include <openssl/evp.h>
+*/
 
 #define IMAGE_PRE_LOAD_PATH                             "/image/pre-load/sig"
 
@@ -1122,6 +1124,8 @@ static int fit_config_add_verification_data(const char *keydir,
  * 2) get public key (X509_get_pubkey)
  * 3) provide der format (d2i_RSAPublicKey)
  */
+
+/*
 static int read_pub_key(const char *keydir, const void *name,
                        unsigned char **pubkey, int *pubkey_len)
 {
@@ -1134,7 +1138,7 @@ static int read_pub_key(const char *keydir, const void *name,
        memset(path, 0, 1024);
        snprintf(path, sizeof(path), "%s/%s.crt", keydir, (char *)name);
 
-       /* Open certificate file */
+       // Open certificate file
        f = fopen(path, "r");
        if (!f) {
                fprintf(stderr, "Couldn't open RSA certificate: '%s': %s\n",
@@ -1142,7 +1146,7 @@ static int read_pub_key(const char *keydir, const void *name,
                return -EACCES;
        }
 
-       /* Read the certificate */
+       // Read the certificate
        cert = NULL;
        if (!PEM_read_X509(f, &cert, NULL, NULL)) {
                printf("Couldn't read certificate");
@@ -1150,7 +1154,7 @@ static int read_pub_key(const char *keydir, const void *name,
                goto err_cert;
        }
 
-       /* Get the public key from the certificate. */
+       // Get the public key from the certificate.
        key = X509_get_pubkey(cert);
        if (!key) {
                printf("Couldn't read public key\n");
@@ -1158,7 +1162,7 @@ static int read_pub_key(const char *keydir, const void *name,
                goto err_pubkey;
        }
 
-       /* Get DER form */
+       // Get DER form
        ret = i2d_PublicKey(key, pubkey);
        if (ret < 0) {
                printf("Couldn't get DER form\n");
@@ -1175,14 +1179,16 @@ err_cert:
        fclose(f);
        return ret;
 }
+*/
 
 int fit_pre_load_data(const char *keydir, void *keydest, void *fit)
 {
        int pre_load_noffset;
        const void *algo_name;
        const void *key_name;
-       unsigned char *pubkey = NULL;
-       int ret, pubkey_len;
+       //unsigned char *pubkey = NULL;
+       //int pubkey_len;
+       int ret;
 
        if (!keydir || !keydest || !fit)
                return 0;
@@ -1209,18 +1215,21 @@ int fit_pre_load_data(const char *keydir, void *keydest, void *fit)
                goto out;
        }
 
-       /* Read public key */
+       ret = 0;
+
+       /*
+       // Read public key
        ret = read_pub_key(keydir, key_name, &pubkey, &pubkey_len);
        if (ret < 0)
                goto out;
 
-       /* Add the public key to the device tree */
+       // Add the public key to the device tree
        ret = fdt_setprop(keydest, pre_load_noffset, "public-key",
                          pubkey, pubkey_len);
        if (ret)
                printf("Can't set public-key in node %s (ret = %d)\n",
                       IMAGE_PRE_LOAD_PATH, ret);
-
+       */
  out:
        return ret;
 }