
Hey there,
I have several issues with the newer U-Boot versions on my Banana Pi.
I recently decided to upgrade some of my Banana Pis to the latest U-Boot, the last version I had there was 2015.04. Unfortunately the upgrade to 2017.05 caused weird packet-losses on the ethernet interface in Linux (took me several days to find out, that it's actually u-boot causing the problems). When downgrading to my old 2015.04, everythings works fine.
The packet loss only occurs in low-load situations, for example with ping or ssh. I have successfully transfered some large files over the network with netcat without any issues. So maybe it's some powersaving-issue with Linux. But obviously, keeping the network interface under full load at all times can't be the right solution to the problem. About 10-20% of all packets get lost with ping.
So I had hoped, it is some kind of "temporary issue" fixed in the next version and today decided to try again with a newer version. Unfortunately 2017.07 has even more issues:
First, the packet-loss issue hasn't disappeared. Sad.
Second, this version is no longer able to turn on the hdmi interface on the pi but seems to boot the system (after a minute or so it is "reachable" via network).
The same applies to 2017.09-rc2.
So I thought, the problem is probably caused, because the newer U-Boot versions turn on the network interface and configure it (and then linux fails to reconfigure it correctly, or something).
I therefore tried to compile U-Boot 2017.05 without network support:
I disabled CONFIG_CMD_NET in order to disable CONFIG_NET:
make CROSS_COMPILE=armv7l-linux-gnueabihf- Bananapi_defconfig sed -re 's/^CONFIG_NET=y$/CONFIG_NET=n/' \ -e 's/^CONFIG_CMD_NET=y$/CONFIG_CMD_NET=n/' -i .config make CROSS_COMPILE=armv7l-linux-gnueabihf- oldconfig make CROSS_COMPILE=armv7l-linux-gnueabihf- -j6
This caused linker errors:
[...] LD u-boot board/sunxi/built-in.o: In function `setup_environment': /tmp/u-boot-2017.05/board/sunxi/board.c:700: undefined reference to `eth_setenv_enetaddr' armv7l-linux-gnueabihf-ld.bfd: BFD (GNU Binutils) 2.29 assertion fail ../../binutils-2.29/bfd/elf32-arm.c:9509 make: *** [Makefile:1211: u-boot] Error 1
So, some kind of dependency issue. I checked the .config file and found several more network-related options and disabled all of them:
CONFIG_CMD_DHCP CONFIG_CMD_PXE CONFIG_CMD_NFS CONFIG_CMD_MII CONFIG_CMD_PING
In order to make this work, I also had to set: CONFIG_DISTRO_DEFAULTS=n
Then I ran oldconfig again, double checked the .config and tried compilation again:
[...] CC common/env_common.o In file included from include/configs/sunxi-common.h:461:0, from include/configs/sun7i.h:28, from include/config.h:5, from include/common.h:21, from common/env_common.c:11: include/config_distro_bootcmd.h:305:2: error: expected '}' before 'BOOT_TARGET_DEVICES_references_PXE_without_CONFIG_CMD_DHCP_or_PXE' BOOT_TARGET_DEVICES_references_PXE_without_CONFIG_CMD_DHCP_or_PXE ^ include/config_distro_bootcmd.h:305:2: note: in definition of macro 'BOOTENV_DEV_NAME_PXE' BOOT_TARGET_DEVICES_references_PXE_without_CONFIG_CMD_DHCP_or_PXE ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/configs/sunxi-common.h:442:2: note: in expansion of macro 'BOOTENV_DEV_NAME' func(PXE, pxe, na) \ ^~~~ include/config_distro_bootcmd.h:311:18: note: in expansion of macro 'BOOT_TARGET_DEVICES' "boot_targets=" BOOT_TARGET_DEVICES(BOOTENV_DEV_NAME) "\0" ^~~~~~~~~~~~~~~~~~~ include/config_distro_bootcmd.h:328:2: note: in expansion of macro 'BOOTENV_BOOT_TARGETS' BOOTENV_BOOT_TARGETS \ ^~~~~~~~~~~~~~~~~~~~ include/configs/sunxi-common.h:515:2: note: in expansion of macro 'BOOTENV' BOOTENV ^~~~~~~ include/env_default.h:108:2: note: in expansion of macro 'CONFIG_EXTRA_ENV_SETTINGS' CONFIG_EXTRA_ENV_SETTINGS ^~~~~~~~~~~~~~~~~~~~~~~~~ make[1]: *** [scripts/Makefile.build:281: common/env_common.o] Error 1 make: *** [Makefile:1234: common] Error 2
Now I'm out of ideas. Looks like disabling CONFIG_DISTRO_DEFAULTS was a step in the wrong direction.
So my questions are:
1. Is there a way to compile U-Boot without networking support?
2. Or is there a way to fix my package-loss problems in Linux (maybe the problem lies within the kernel, not U-Boot and U-Boot is just triggering it).
3. How can I enable the HDMI in the latest U-Boot versions (2017.07 and 2017.09-rc2) on the Banana Pi?
Kind regards Urs