1

I'm trying to move first steps in the embedded Linux world. For this purpose I retrieved an old STM32F746 Discovery demo board. My objective is to have u-boot load a Linux kernel and see it run on it; no file system (initramfs linked into the kernel) or particular services. For building and configuration I'm using buildroot.

Although I found only bits and pieces on how to proceed it seems that both the Linux kernel and u-boot support that specific board (https://github.com/torvalds/linux/blob/master/arch/arm/boot/dts/stm32f746-disco.dts and https://github.com/u-boot/u-boot/blob/master/configs/stm32f746-disco_defconfig).

U-boot works with no particular issues. Once I'm on the bootloader I load the kernel image into SDRAM via ethernet and proceed to boot it: however, it appears something goes wrong as soon as uboot passes control. After printing "starting kernel" nothing is echoed anymore.

U-Boot SPL 2019.07 (Sep 14 2019 - 15:02:13 +0200)
Trying to boot from XIP


U-Boot 2019.07 (Sep 14 2019 - 15:02:13 +0200)

Model: STMicroelectronics STM32F746-DISCO board
DRAM:  8 MiB
set_rate not implemented for clock index 4
set_rate not implemented for clock index 4
set_rate not implemented for clock index 4
Flash: 1 MiB
MMC:   sdio1@40012c00: 0
In:    serial
Out:   serial
Err:   serial
usr button is at LOW LEVEL
Net:
Warning: ethernet@40028000 (eth0) using random MAC address - 6a:e4:5f:05:16:15
eth0: ethernet@40028000
Hit SPACE in 3 seconds to stop autoboot.
U-Boot > setenv serverip 192.168.2.1
U-Boot > dhcp
Speed: 100, full duplex
BOOTP broadcast 1
DHCP client bound to address 192.168.2.10 (3 ms)
Using ethernet@40028000 device
TFTP from server 192.168.2.1; our IP address is 192.168.2.10
Filename 'uImage-stm32f7'.

TFTP error: trying to overwrite reserved memory...
U-Boot > tftp 0xC0008000 uImage-stm32f7
Speed: 100, full duplex
Using ethernet@40028000 device
TFTP from server 192.168.2.1; our IP address is 192.168.2.10
Filename 'uImage-stm32f7'.
Load address: 0xc0008000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ###########
         2.3 MiB/s
done
Bytes transferred = 1718466 (1a38c2 hex)
U-Boot > bootm
## Booting kernel from Legacy Image at c0008000 ...
   Image Name:   Linux-4.20.0
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1718402 Bytes = 1.6 MiB
   Load Address: c0008000
   Entry Point:  c0008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...

I'm trying to load the uImage at address 0xC0008000 (in SDRAM). I have enabled earlyprintk to see any possible warning sign but to no avail. I also tried using the zImage format (loaded at the same address), but with no difference.

What could be the issue? Considering I'm still green when it comes to linux configuration and loading I'm hoping there is some obvious mistake on my part that I'm missing. Otherwise I'll have to resort to more advance debugging techniques.

I'm using linux kernel v4.20 and uboot v2019.07. For reference, these are my defconfig files for buildroot and linux (I'm using all default options for uboot).

buildroot:

BR2_HOST_GCC_AT_LEAST_4_5=y
BR2_HOST_GCC_AT_LEAST_4_6=y
BR2_HOST_GCC_AT_LEAST_4_7=y
BR2_HOST_GCC_AT_LEAST_4_8=y
BR2_HOST_GCC_AT_LEAST_4_9=y
BR2_HOST_GCC_AT_LEAST_5=y
BR2_HOST_GCC_AT_LEAST_6=y
BR2_HOST_GCC_AT_LEAST_7=y
BR2_HOST_GCC_AT_LEAST_8=y

BR2_SOFT_FLOAT=y
BR2_arm=y
BR2_ARCH_HAS_TOOLCHAIN_BUILDROOT=y
BR2_ARCH_NEEDS_GCC_AT_LEAST_4_8=y
BR2_ARCH_NEEDS_GCC_AT_LEAST_4_9=y
BR2_ARCH_NEEDS_GCC_AT_LEAST_5=y
BR2_ARCH="arm"
BR2_ENDIAN="LITTLE"
BR2_GCC_TARGET_ABI="aapcs-linux"
BR2_GCC_TARGET_CPU="cortex-m7"
BR2_GCC_TARGET_FLOAT_ABI="soft"
BR2_GCC_TARGET_MODE="thumb"
BR2_READELF_ARCH_NAME="ARM"
BR2_BINFMT_FLAT=y
BR2_BINFMT_FLAT_ONE=y
BR2_ARM_CPU_MAYBE_HAS_FPU=y
BR2_ARM_CPU_MAYBE_HAS_FPV4=y
BR2_ARM_CPU_MAYBE_HAS_FPV5=y
BR2_ARM_CPU_HAS_THUMB2=y
BR2_ARM_CPU_ARMV7M=y

BR2_cortex_m7=y

BR2_ARM_EABI=y
BR2_ARM_SOFT_FLOAT=y
BR2_ARM_INSTRUCTIONS_THUMB2=y

BR2_WGET="wget --passive-ftp -nd -t 3"
BR2_SVN="svn --non-interactive"
BR2_BZR="bzr"
BR2_GIT="git"
BR2_CVS="cvs"
BR2_LOCALFILES="cp"
BR2_SCP="scp"
BR2_HG="hg"
BR2_ZCAT="gzip -d -c"
BR2_BZCAT="bzcat"
BR2_XZCAT="xzcat"
BR2_LZCAT="lzip -d -c"
BR2_TAR_OPTIONS=""
BR2_DEFCONFIG="$(CONFIG_DIR)/defconfig"
BR2_DL_DIR="$(TOPDIR)/dl"
BR2_HOST_DIR="$(BASE_DIR)/host"

BR2_PRIMARY_SITE=""
BR2_BACKUP_SITE="http://sources.buildroot.net"
BR2_KERNEL_MIRROR="https://cdn.kernel.org/pub"
BR2_GNU_MIRROR="http://ftpmirror.gnu.org"
BR2_LUAROCKS_MIRROR="http://rocks.moonscript.org"
BR2_CPAN_MIRROR="http://cpan.metacpan.org"
BR2_JLEVEL=12
BR2_STRIP_strip=y
BR2_STRIP_EXCLUDE_FILES=""
BR2_STRIP_EXCLUDE_DIRS=""
BR2_OPTIMIZE_S=y
BR2_STATIC_LIBS=y
BR2_PACKAGE_OVERRIDE_FILE="$(CONFIG_DIR)/local.mk"
BR2_GLOBAL_PATCH_DIR=""

BR2_COMPILER_PARANOID_UNSAFE_PATH=y

BR2_TOOLCHAIN=y
BR2_TOOLCHAIN_USES_UCLIBC=y
BR2_TOOLCHAIN_BUILDROOT=y

BR2_TOOLCHAIN_BUILDROOT_VENDOR="buildroot"
BR2_TOOLCHAIN_BUILDROOT_UCLIBC=y
BR2_TOOLCHAIN_BUILDROOT_LIBC="uclibc"

BR2_KERNEL_HEADERS_AS_KERNEL=y
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_20=y
BR2_PACKAGE_LINUX_HEADERS=y

BR2_PACKAGE_UCLIBC=y
BR2_UCLIBC_CONFIG="package/uclibc/uClibc-ng.config"
BR2_UCLIBC_CONFIG_FRAGMENT_FILES=""
BR2_PTHREADS=y
BR2_UCLIBC_INSTALL_UTILS=y
BR2_UCLIBC_TARGET_ARCH="arm"

BR2_PACKAGE_HOST_BINUTILS_SUPPORTS_CFI=y
BR2_BINUTILS_VERSION_2_31_X=y
BR2_BINUTILS_VERSION="2.31.1"
BR2_BINUTILS_EXTRA_CONFIG_OPTIONS=""

BR2_GCC_VERSION_8_X=y
BR2_GCC_VERSION="8.3.0"
BR2_EXTRA_GCC_CONFIG_OPTIONS=""

BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS=y
BR2_TOOLCHAIN_SUPPORTS_VARIADIC_MI_THUNK=y
BR2_TOOLCHAIN_HAS_THREADS=y
BR2_TARGET_OPTIMIZATION=""
BR2_TARGET_LDFLAGS=""
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_16=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_17=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_18=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_20=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST="4.20"
BR2_TOOLCHAIN_GCC_AT_LEAST_4_3=y
BR2_TOOLCHAIN_GCC_AT_LEAST_4_4=y
BR2_TOOLCHAIN_GCC_AT_LEAST_4_5=y
BR2_TOOLCHAIN_GCC_AT_LEAST_4_6=y
BR2_TOOLCHAIN_GCC_AT_LEAST_4_7=y
BR2_TOOLCHAIN_GCC_AT_LEAST_4_8=y
BR2_TOOLCHAIN_GCC_AT_LEAST_4_9=y
BR2_TOOLCHAIN_GCC_AT_LEAST_5=y
BR2_TOOLCHAIN_GCC_AT_LEAST_6=y
BR2_TOOLCHAIN_GCC_AT_LEAST_7=y
BR2_TOOLCHAIN_GCC_AT_LEAST_8=y
BR2_TOOLCHAIN_GCC_AT_LEAST="8"
BR2_TOOLCHAIN_HAS_MNAN_OPTION=y
BR2_TOOLCHAIN_HAS_SYNC_1=y
BR2_TOOLCHAIN_HAS_SYNC_2=y
BR2_TOOLCHAIN_HAS_SYNC_4=y
BR2_TOOLCHAIN_HAS_ATOMIC=y

BR2_ROOTFS_SKELETON_DEFAULT=y
BR2_TARGET_GENERIC_HOSTNAME="goofy"
BR2_TARGET_GENERIC_ISSUE="Welcome to (Maldus) Buildroot"
BR2_TARGET_GENERIC_PASSWD_SHA256=y
BR2_TARGET_GENERIC_PASSWD_METHOD="sha-256"
BR2_INIT_BUSYBOX=y
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y
BR2_ROOTFS_DEVICE_TABLE="system/device_table.txt"
BR2_TARGET_ENABLE_ROOT_LOGIN=y
BR2_TARGET_GENERIC_ROOT_PASSWD=""
BR2_SYSTEM_BIN_SH_BUSYBOX=y

BR2_TARGET_GENERIC_GETTY=y
BR2_TARGET_GENERIC_GETTY_PORT="console"
BR2_TARGET_GENERIC_GETTY_BAUDRATE_KEEP=y
BR2_TARGET_GENERIC_GETTY_BAUDRATE="0"
BR2_TARGET_GENERIC_GETTY_TERM="vt100"
BR2_TARGET_GENERIC_GETTY_OPTIONS=""
BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW=y
BR2_SYSTEM_DHCP=""
BR2_SYSTEM_DEFAULT_PATH="/bin:/sbin:/usr/bin:/usr/sbin"
BR2_ENABLE_LOCALE_PURGE=y
BR2_ENABLE_LOCALE_WHITELIST="C en_US"

BR2_ROOTFS_USERS_TABLES=""
BR2_ROOTFS_OVERLAY=""
BR2_ROOTFS_POST_BUILD_SCRIPT="board/stmicroelectronics/stm32-post-build.sh"
BR2_ROOTFS_POST_FAKEROOT_SCRIPT=""
BR2_ROOTFS_POST_IMAGE_SCRIPT=""
BR2_ROOTFS_POST_SCRIPT_ARGS=""

BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.20"
BR2_LINUX_KERNEL_VERSION="4.20"
BR2_LINUX_KERNEL_PATCH=""
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="linux_defconfig"
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES=""
BR2_LINUX_KERNEL_CUSTOM_LOGO_PATH=""
BR2_LINUX_KERNEL_APPENDED_UIMAGE=y
BR2_LINUX_KERNEL_GZIP=y
BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0xC0008000"
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_APPENDED_DTB=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="stm32f746-disco"
BR2_LINUX_KERNEL_CUSTOM_DTS_PATH=""



BR2_PACKAGE_BUSYBOX=y
BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config"
BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES=""

BR2_PACKAGE_SKELETON=y
BR2_PACKAGE_HAS_SKELETON=y
BR2_PACKAGE_PROVIDES_SKELETON="skeleton-init-sysv"
BR2_PACKAGE_SKELETON_INIT_COMMON=y
BR2_PACKAGE_SKELETON_INIT_SYSV=y

BR2_PACKAGE_PULSEAUDIO_HAS_ATOMIC=y

BR2_PACKAGE_GOOGLE_BREAKPAD_ARCH_SUPPORTS=y

BR2_PACKAGE_LTP_TESTSUITE_ARCH_SUPPORTS=y
BR2_PACKAGE_LTRACE_ARCH_SUPPORTS=y


BR2_PACKAGE_OPROFILE_ARCH_SUPPORTS=y


BR2_PACKAGE_TCF_AGENT_ARCH="arm"
BR2_PACKAGE_TCF_AGENT_ARCH_SUPPORTS=y


BR2_PACKAGE_CMAKE_ARCH_SUPPORTS=y


BR2_PACKAGE_PROVIDES_HOST_GETTEXT="host-gettext-tiny"

BR2_PACKAGE_NETSURF_ARCH_SUPPORTS=y

BR2_PACKAGE_QT5_JSCORE_AVAILABLE=y

BR2_PACKAGE_FLASHROM_ARCH_SUPPORTS=y

BR2_PACKAGE_SEDUTIL_ARCH_SUPPORTS=y

BR2_PACKAGE_HOST_ERLANG_ARCH_SUPPORTS=y
BR2_PACKAGE_ERLANG_ARCH_SUPPORTS=y
BR2_PACKAGE_GAUCHE_ARCH_SUPPORTS=y

BR2_PACKAGE_JAMVM_ARCH_SUPPORTS=y

BR2_PACKAGE_PROVIDES_HOST_LUAINTERPRETER="host-lua"
BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS=y


BR2_PACKAGE_HOST_MONO_ARCH_SUPPORTS=y
BR2_PACKAGE_MONO_ARCH_SUPPORTS=y

BR2_PACKAGE_HOST_OPENJDK_BIN_ARCH_SUPPORTS=y
BR2_PACKAGE_OPENJDK_ARCH_SUPPORTS=y

BR2_PACKAGE_FDK_AAC_ARCH_SUPPORTS=y

BR2_PACKAGE_OPENAL_ARCH_SUPPORTS=y
BR2_PACKAGE_WEBRTC_AUDIO_PROCESSING_ARCH_SUPPORTS=y

BR2_PACKAGE_ZLIB_NG_ARCH_SUPPORTS=y
BR2_PACKAGE_PROVIDES_HOST_ZLIB="host-libzlib"

BR2_PACKAGE_BOTAN_ARCH_SUPPORTS=y


BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS=y
BR2_PACKAGE_LIBGPG_ERROR_SYSCFG="arm-unknown-linux-gnueabi"




BR2_PACKAGE_PROVIDES_HOST_OPENSSL="host-libopenssl"

BR2_PACKAGE_MONGODB_ARCH_SUPPORTS=y

BR2_PACKAGE_LIBOPENH264_ARCH_SUPPORTS=y

BR2_PACKAGE_CANFESTIVAL_ARCH_SUPPORTS=y

BR2_PACKAGE_CLASSPATH_ARCH_SUPPORTS=y

BR2_PACKAGE_JEMALLOC_ARCH_SUPPORTS=y

BR2_PACKAGE_LIBATOMIC_OPS_ARCH_SUPPORTS=y
BR2_PACKAGE_LIBBSD_ARCH_SUPPORTS=y
BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT=y

BR2_PACKAGE_LIBSECCOMP_ARCH_SUPPORTS=y

BR2_PACKAGE_LLVM_ARCH_SUPPORTS=y
BR2_PACKAGE_LLVM_TARGET_ARCH="ARM"

BR2_PACKAGE_QEMU_ARCH_SUPPORTS_TARGET=y

BR2_PACKAGE_HAPROXY_ARCH_SUPPORTS=y

BR2_PACKAGE_IFUPDOWN_SCRIPTS=y

BR2_PACKAGE_MONGREL2_LIBC_SUPPORTS=y

BR2_PACKAGE_AUDIT_ARCH_SUPPORTS=y

BR2_PACKAGE_EFIVAR_ARCH_SUPPORTS=y

BR2_PACKAGE_INITSCRIPTS=y

BR2_PACKAGE_SYSTEMD_ARCH_SUPPORTS=y
BR2_PACKAGE_SYSTEMD_BOOTCHART_ARCH_SUPPORTS=y

BR2_TARGET_ROOTFS_CPIO=y
BR2_TARGET_ROOTFS_CPIO_NONE=y
BR2_TARGET_ROOTFS_INITRAMFS=y

BR2_TARGET_AFBOOT_STM32=y
BR2_TARGET_UBOOT=y
BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
BR2_TARGET_UBOOT_LATEST_VERSION=y
BR2_TARGET_UBOOT_VERSION="2019.07"
BR2_TARGET_UBOOT_PATCH=""
BR2_TARGET_UBOOT_USE_DEFCONFIG=y
BR2_TARGET_UBOOT_BOARD_DEFCONFIG="stm32f746-disco"
BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES=""

BR2_TARGET_UBOOT_FORMAT_BIN=y
BR2_TARGET_UBOOT_FORMAT_DTB_BIN=y
BR2_TARGET_UBOOT_SPL=y
BR2_TARGET_UBOOT_SPL_NAME="spl/u-boot-spl.bin"
BR2_TARGET_UBOOT_CUSTOM_DTS_PATH=""
BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS=""

BR2_PACKAGE_HOST_GO_HOST_ARCH_SUPPORTS=y
BR2_PACKAGE_HOST_GO_BOOTSTRAP_ARCH_SUPPORTS=y
BR2_PACKAGE_HOST_GOOGLE_BREAKPAD_ARCH_SUPPORTS=y
BR2_PACKAGE_HOST_OPENOCD=y
BR2_PACKAGE_HOST_PATCHELF=y
BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS=y
BR2_PACKAGE_HOST_QEMU_SYSTEM_ARCH_SUPPORTS=y
BR2_PACKAGE_HOST_QEMU_USER_ARCH_SUPPORTS=y
BR2_PACKAGE_HOST_RUSTC_ARCH_SUPPORTS=y
BR2_PACKAGE_HOST_RUSTC_ARCH="arm"
BR2_PACKAGE_HOST_RUSTC_ABI="eabi"
BR2_PACKAGE_PROVIDES_HOST_RUSTC="host-rust-bin"
BR2_PACKAGE_HOST_TI_CGT_PRU_ARCH_SUPPORTS=y
BR2_PACKAGE_HOST_UBOOT_TOOLS=y

BR2_XTENSA_OVERLAY_DIR=""
BR2_XTENSA_CUSTOM_NAME=""
BR2_TARGET_ROOTFS_EXT2_BLOCKS=0
BR2_TARGET_ROOTFS_EXT2_EXTRA_INODES=0

BR2_TARGET_ROOTFS_EXT2_EXTRA_BLOCKS=0


BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR=""

BR2_PACKAGE_TZDATA_ZONELIST=""

BR2_TARGET_UBOOT_CUSTOM_GIT_REPO_URL=""
BR2_TARGET_UBOOT_CUSTOM_GIT_VERSION=""
BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL=""
BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION=""

linux:

CONFIG_NO_HZ_IDLE=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_PREEMPT=y
CONFIG_LOG_BUF_SHIFT=16
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE="${BR_BINARIES_DIR}/rootfs.cpio"
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_EMBEDDED=y
CONFIG_ARCH_STM32=y
CONFIG_CPU_V7M_NUM_IRQ=240
CONFIG_SET_MEM_PARAM=y
CONFIG_DRAM_BASE=0x90000000
CONFIG_FLASH_MEM_BASE=0x08000000
CONFIG_FLASH_SIZE=0x00200000
CONFIG_ZBOOT_ROM_TEXT=0x0
CONFIG_ZBOOT_ROM_BSS=0x0
CONFIG_ARM_APPENDED_DTB=y
CONFIG_BINFMT_FLAT=y
CONFIG_BINFMT_SHARED_FLAT=y
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
CONFIG_EEPROM_93CX6=y
CONFIG_KEYBOARD_GPIO=y
CONFIG_SERIAL_NONSTANDARD=y
CONFIG_SERIAL_STM32=y
CONFIG_SERIAL_STM32_CONSOLE=y
CONFIG_I2C=y
CONFIG_I2C_CHARDEV=y
CONFIG_I2C_STM32F4=y
CONFIG_I2C_STM32F7=y
CONFIG_GPIO_STMPE=y
CONFIG_WATCHDOG=y
CONFIG_MFD_STMPE=y
CONFIG_REGULATOR=y
CONFIG_REGULATOR_FIXED_VOLTAGE=y
CONFIG_MMC=y
CONFIG_MMC_ARMMMCI=y
CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=y
CONFIG_LEDS_GPIO=y
CONFIG_LEDS_TRIGGERS=y
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_DRV_STM32=y
CONFIG_DMADEVICES=y
CONFIG_STM32_DMA=y
CONFIG_STM32_DMAMUX=y
CONFIG_STM32_MDMA=y
CONFIG_IIO=y
CONFIG_STM32_ADC_CORE=y
CONFIG_STM32_ADC=y
CONFIG_EXT3_FS=y
CONFIG_NLS=y
CONFIG_CRC_ITU_T=y
CONFIG_CRC7=y
CONFIG_PRINTK_TIME=y
CONFIG_DEBUG_INFO=y
CONFIG_MAGIC_SYSRQ=y
CONFIG_DEBUG_USER=y
CONFIG_DEBUG_LL=y
CONFIG_DEBUG_UNCOMPRESS=y
CONFIG_EARLY_PRINTK=y
3
  • "TFTP error: trying to overwrite reserved memory" doesn't sound like "u-boot works with no particular issues" to me. If your SDRAM is not configured correctly (already at SPL stage, I guess), you'll get that message and a kernel crashing before any output. It's a brave attempt to build your own u-boot, devicetree, kernel and buildroot, even if your are not a linux beginner and have a step-by-step tutorial. If you don't have that, you should at least have a jtag debugger to see what you are doing. – Philippos Sep 19 '19 at 7:28
  • I do admit I am not sure what that error message means; I assumed the DHCP command was trying to load the file by default in an invalid memory address. The point is that there are no such warnings when I actually load the image with the explicit tftp command. If the sdram was not initialized uboot would not happily report that the image checksum was verified... Again, both uboot and Linux internally support the board's dts, I'm doing very little on my own. I already have a jtag debugger on its way, I'm going to dig deeper. Conceptually, is the procedure correct? – Maldus Sep 19 '19 at 7:47
  • You are right, all damage possibly done by the failed automatic load would have prevented one of the further steps, so my remark was irrelavant. I never did this myself, so I'm only asking questions, maybe triggering an idea for you: How does the kernel know where to write the debug output? – Philippos Sep 19 '19 at 12:02
0

You are able to load the kernel into memory and verify the checksum, so I'm guessing that the memory is setup correctly.

It looks like you do not have a device tree loaded in the boot process, so I'm guessing the u-boot bootz command will be executed with a console parameter and a machine number. Use the u-boot printenv to trace what the boot process actually looks like.

Below is a link I've used to track down a similar symptom myself. In my case I had a custom device tree file, and I had a typo in the compatible value for the cpu, so Linux found no driver for it.

Common problems booting Linux (ti.com)

0

Maybe your UART is not correctly configured. Have you tried gdb to see where it is stuck?

For me its usart1 clock not enabled.

I changed

clocks = <&rcc 0 STM32F7_APB2_CLOCK(USART1)>

instead of

<&rcc 1 CLK_USART1>

But there is an error when kernel configure usart gate clock that doesn't stop kernel execution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.