aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.azure-pipelines.yml2
-rw-r--r--.gitlab-ci.yml4
-rw-r--r--.travis.yml18
-rw-r--r--common/board_f.c8
-rw-r--r--common/console.c23
-rw-r--r--doc/board/index.rst1
-rw-r--r--drivers/ram/rockchip/Kconfig1
-rw-r--r--include/pci.h4
-rw-r--r--net/Kconfig10
-rw-r--r--net/net.c3
-rw-r--r--scripts/config_whitelist.txt1
-rw-r--r--test/lib/test_aes.c13
12 files changed, 50 insertions, 38 deletions
diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml
index 052c3aa..c220958 100644
--- a/.azure-pipelines.yml
+++ b/.azure-pipelines.yml
@@ -123,7 +123,7 @@ jobs:
git config --global user.name "Azure Pipelines"
git config --global user.email bmeng.cn@gmail.com
export USER=azure
- virtualenv /tmp/venv
+ virtualenv -p /usr/bin/python3 /tmp/venv
. /tmp/venv/bin/activate
pip install pyelftools
export UBOOT_TRAVIS_BUILD_DIR=/tmp/.bm-work/sandbox_spl
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e20a789..d486e72 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -72,7 +72,7 @@ build all 64bit ARM platforms:
tags: [ 'all' ]
stage: world build
script:
- - virtualenv /tmp/venv
+ - virtualenv -p /usr/bin/python3 /tmp/venv
- . /tmp/venv/bin/activate
- pip install pyelftools
- ret=0;
@@ -157,7 +157,7 @@ Run binman, buildman, dtoc and patman testsuites:
- git config --global user.name "GitLab CI Runner";
git config --global user.email trini@konsulko.com;
export USER=gitlab;
- virtualenv /tmp/venv;
+ virtualenv -p /usr/bin/python3 /tmp/venv;
. /tmp/venv/bin/activate;
pip install pyelftools;
export UBOOT_TRAVIS_BUILD_DIR=/tmp/.bm-work/sandbox_spl;
diff --git a/.travis.yml b/.travis.yml
index 44e5390..e6db9d6 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -133,16 +133,6 @@ script:
cp ~/grub_x64.efi $UBOOT_TRAVIS_BUILD_DIR/;
cp ~/grub2-arm/usr/lib/grub2/arm-efi/grub.efi $UBOOT_TRAVIS_BUILD_DIR/grub_arm.efi;
cp ~/grub2-arm64/usr/lib/grub2/arm64-efi/grub.efi $UBOOT_TRAVIS_BUILD_DIR/grub_arm64.efi;
- if [[ -n "${TEST_PY_TOOLS}" ]]; then
- PYTHONPATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt"
- PATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH}"
- ./tools/binman/binman --toolpath ${UBOOT_TRAVIS_BUILD_DIR}/tools test &&
- ./tools/patman/patman --test &&
- ./tools/buildman/buildman -t &&
- PYTHONPATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt"
- PATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH}"
- ./tools/dtoc/dtoc -t;
- fi;
if [[ "${TEST_PY_BD}" != "" ]]; then
virtualenv -p /usr/bin/python3 /tmp/venv;
. /tmp/venv/bin/activate;
@@ -154,6 +144,14 @@ script:
if [[ $ret -ne 0 ]]; then
exit $ret;
fi;
+ if [[ -n "${TEST_PY_TOOLS}" ]]; then
+ export PYTHONPATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt";
+ export PATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH}";
+ ./tools/binman/binman --toolpath ${UBOOT_TRAVIS_BUILD_DIR}/tools test &&
+ ./tools/patman/patman --test &&
+ ./tools/buildman/buildman -t &&
+ ./tools/dtoc/dtoc -t;
+ fi;
fi
matrix:
diff --git a/common/board_f.c b/common/board_f.c
index 8fa26e3..82a1647 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -867,6 +867,11 @@ __weak int checkcpu(void)
return 0;
}
+__weak int clear_bss(void)
+{
+ return 0;
+}
+
static const init_fnc_t init_sequence_f[] = {
setup_mon_len,
#ifdef CONFIG_OF_CONTROL
@@ -1002,11 +1007,8 @@ static const init_fnc_t init_sequence_f[] = {
#if defined(CONFIG_X86) || defined(CONFIG_ARC)
copy_uboot_to_ram,
do_elf_reloc_fixups,
- clear_bss,
#endif
-#if defined(CONFIG_XTENSA)
clear_bss,
-#endif
#if !defined(CONFIG_ARM) && !defined(CONFIG_SANDBOX) && \
!CONFIG_IS_ENABLED(X86_64)
jump_to_copy,
diff --git a/common/console.c b/common/console.c
index 7681da1..e398530 100644
--- a/common/console.c
+++ b/common/console.c
@@ -401,7 +401,7 @@ int getc(void)
if (gd->console_in.start) {
int ch;
- ch = membuff_getbyte(&gd->console_in);
+ ch = membuff_getbyte((struct membuff *)&gd->console_in);
if (ch != -1)
return 1;
}
@@ -426,7 +426,7 @@ int tstc(void)
return 0;
#ifdef CONFIG_CONSOLE_RECORD
if (gd->console_in.start) {
- if (membuff_peekbyte(&gd->console_in) != -1)
+ if (membuff_peekbyte((struct membuff *)&gd->console_in) != -1)
return 1;
}
#endif
@@ -518,7 +518,7 @@ void putc(const char c)
return;
#ifdef CONFIG_CONSOLE_RECORD
if ((gd->flags & GD_FLG_RECORD) && gd->console_out.start)
- membuff_putbyte(&gd->console_out, c);
+ membuff_putbyte((struct membuff *)&gd->console_out, c);
#endif
#ifdef CONFIG_SILENT_CONSOLE
if (gd->flags & GD_FLG_SILENT) {
@@ -569,7 +569,7 @@ void puts(const char *s)
return;
#ifdef CONFIG_CONSOLE_RECORD
if ((gd->flags & GD_FLG_RECORD) && gd->console_out.start)
- membuff_put(&gd->console_out, s, strlen(s));
+ membuff_put((struct membuff *)&gd->console_out, s, strlen(s));
#endif
#ifdef CONFIG_SILENT_CONSOLE
if (gd->flags & GD_FLG_SILENT) {
@@ -602,18 +602,20 @@ int console_record_init(void)
{
int ret;
- ret = membuff_new(&gd->console_out, CONFIG_CONSOLE_RECORD_OUT_SIZE);
+ ret = membuff_new((struct membuff *)&gd->console_out,
+ CONFIG_CONSOLE_RECORD_OUT_SIZE);
if (ret)
return ret;
- ret = membuff_new(&gd->console_in, CONFIG_CONSOLE_RECORD_IN_SIZE);
+ ret = membuff_new((struct membuff *)&gd->console_in,
+ CONFIG_CONSOLE_RECORD_IN_SIZE);
return ret;
}
void console_record_reset(void)
{
- membuff_purge(&gd->console_out);
- membuff_purge(&gd->console_in);
+ membuff_purge((struct membuff *)&gd->console_out);
+ membuff_purge((struct membuff *)&gd->console_in);
}
void console_record_reset_enable(void)
@@ -624,12 +626,13 @@ void console_record_reset_enable(void)
int console_record_readline(char *str, int maxlen)
{
- return membuff_readline(&gd->console_out, str, maxlen, ' ');
+ return membuff_readline((struct membuff *)&gd->console_out, str,
+ maxlen, ' ');
}
int console_record_avail(void)
{
- return membuff_avail(&gd->console_out);
+ return membuff_avail((struct membuff *)&gd->console_out);
}
#endif
diff --git a/doc/board/index.rst b/doc/board/index.rst
index 00e72f5..b8b956d 100644
--- a/doc/board/index.rst
+++ b/doc/board/index.rst
@@ -14,5 +14,6 @@ Board-specific doc
google/index
intel/index
renesas/index
+ rockchip/index
sifive/index
xilinx/index
diff --git a/drivers/ram/rockchip/Kconfig b/drivers/ram/rockchip/Kconfig
index b75d581..8e97c2f 100644
--- a/drivers/ram/rockchip/Kconfig
+++ b/drivers/ram/rockchip/Kconfig
@@ -13,6 +13,7 @@ config ROCKCHIP_SDRAM_COMMON
config RAM_ROCKCHIP_DEBUG
bool "Rockchip ram drivers debugging"
+ depends on RAM_ROCKCHIP
default y
help
This enables debugging ram driver API's for the platforms
diff --git a/include/pci.h b/include/pci.h
index 50ca249..174ddd4 100644
--- a/include/pci.h
+++ b/include/pci.h
@@ -488,8 +488,8 @@
typedef u64 pci_addr_t;
typedef u64 pci_size_t;
#else
-typedef u32 pci_addr_t;
-typedef u32 pci_size_t;
+typedef unsigned long pci_addr_t;
+typedef unsigned long pci_size_t;
#endif
struct pci_region {
diff --git a/net/Kconfig b/net/Kconfig
index a07f674..96bbce1 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -29,6 +29,16 @@ config IP_DEFRAG
Selecting this will enable IP datagram reassembly according
to the algorithm in RFC815.
+config NET_MAXDEFRAG
+ int "Size of buffer used for IP datagram reassembly"
+ depends on IP_DEFRAG
+ default 16384
+ range 1024 65536
+ help
+ This defines the size of the statically allocated buffer
+ used for reassembly, and thus an upper bound for the size of
+ IP datagrams that can be received.
+
config TFTP_BLOCKSIZE
int "TFTP block size"
default 1468
diff --git a/net/net.c b/net/net.c
index d8a60b6..087d399 100644
--- a/net/net.c
+++ b/net/net.c
@@ -883,9 +883,6 @@ int net_send_ip_packet(uchar *ether, struct in_addr dest, int dport, int sport,
* to the algorithm in RFC815. It returns NULL or the pointer to
* a complete packet, in static storage
*/
-#ifndef CONFIG_NET_MAXDEFRAG
-#define CONFIG_NET_MAXDEFRAG 16384
-#endif
#define IP_PKTSIZE (CONFIG_NET_MAXDEFRAG)
#define IP_MAXUDP (IP_PKTSIZE - IP_HDR_SIZE)
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 874f268..405c62e 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -1212,7 +1212,6 @@ CONFIG_NETSPACE_LITE_V2
CONFIG_NETSPACE_MAX_V2
CONFIG_NETSPACE_MINI_V2
CONFIG_NETSPACE_V2
-CONFIG_NET_MAXDEFRAG
CONFIG_NET_MULTI
CONFIG_NET_RETRY_COUNT
CONFIG_NEVER_ASSERT_ODT_TO_CPU
diff --git a/test/lib/test_aes.c b/test/lib/test_aes.c
index b7b4b77..fb8a0b1 100644
--- a/test/lib/test_aes.c
+++ b/test/lib/test_aes.c
@@ -88,17 +88,17 @@ static int _lib_test_aes_run(struct unit_test_state *uts, int key_len,
/* Allocate all the buffer */
key = malloc(key_len);
- ut_assertnonnull(key);
key_exp = malloc(key_exp_len);
- ut_assertnonnull(key_exp);
iv = malloc(AES_BLOCK_LENGTH);
- ut_assertnonnull(iv);
nocipher = malloc(num_block * AES_BLOCK_LENGTH);
- ut_assertnonnull(nocipher);
ciphered = malloc((num_block + 1) * AES_BLOCK_LENGTH);
- ut_assertnonnull(ciphered);
uncipher = malloc((num_block + 1) * AES_BLOCK_LENGTH);
- ut_assertnonnull(uncipher);
+
+ if (!key || !key_exp || !iv || !nocipher || !ciphered || !uncipher) {
+ printf("%s: can't allocate memory\n", __func__);
+ ret = -1;
+ goto out;
+ }
/* Initialize all buffer */
rand_buf(key, key_len);
@@ -127,6 +127,7 @@ static int _lib_test_aes_run(struct unit_test_state *uts, int key_len,
ret = -1;
};
+ out:
/* Free all the data */
free(key);
free(key_exp);