我正在努力迈出嵌入式 Linux 世界的第一步。为此,我找回了一块旧的 STM32F746 Discovery 演示板。我的目标是让 u-boot 加载 Linux 内核并查看它在其上运行;没有文件系统(链接到内核的 initramfs)或特定服务。对于构建和配置,我使用 buildroot。
虽然我只找到了一些关于如何进行的零碎信息,但似乎 Linux 内核和 u-boot 都支持该特定的板(https://github.com/torvalds/linux/blob/master/arch/arm/boot/dts/stm32f746-disco.dts和https://github.com/u-boot/u-boot/blob/master/configs/stm32f746-disco_defconfig)。
U-boot 工作时没有任何特殊问题。一旦我进入引导加载程序,我就会通过以太网将内核映像加载到 SDRAM 中并继续引导它:但是,一旦 uboot 传递控制权,就会出现问题。打印“启动内核”后,不再有任何回显。
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 ...
我正在尝试加载uImage
at 地址0xC0008000
(在 SDRAM 中)。我已启用earlyprintk
查看任何可能的警告标志但无济于事。我也尝试使用该zImage
格式(在同一地址加载),但没有区别。
可能是什么问题?考虑到我在 Linux 配置和加载方面还是新手,我希望我遗漏了一些明显的错误。否则我将不得不求助于更先进的调试技术。
我使用的是 linux 内核 v4.20 和 uboot v2019.07。作为参考,这些是我的 buildroot 和 linux 的 defconfig 文件(我使用 uboot 的所有默认选项)。
构建根目录:
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
答案1
您可以将内核加载到内存中并验证校验和,因此我猜测内存设置正确。
看来您在启动过程中没有加载设备树,所以我猜测 u-bootbootz
命令将使用控制台参数和机器编号来执行。使用 u-bootprintenv
来跟踪启动过程的实际情况。
下面是我自己用来追踪类似症状的链接。就我而言,我有一个自定义设备树文件,并且我在compatible
cpu 值中存在拼写错误,因此 Linux 找不到它的驱动程序。
答案2
也许您的 UART 配置不正确。您是否尝试过gdb
看看它卡在哪里?
对我来说是usart1 clock not enabled
。
我变了
clocks = <&rcc 0 STM32F7_APB2_CLOCK(USART1)>
代替
<&rcc 1 CLK_USART1>
但是当内核配置 usart 门时钟时出现错误,不会停止内核执行。