EfesX 0 27 августа, 2023 Опубликовано 27 августа, 2023 (изменено) · Жалоба Добрый день. Пытаюсь завести u-boot на процессоре NIOSII (больше для изучения, чем для практических целей). Но при инициализации u-boot зависает. Судя по логам решил, что это как-то связано с serial девайсом. Прошелся отладчиком, увидел, что зависание происходит в функции display_options при вызове printf. int display_options(void) { char buf[DISPLAY_OPTIONS_BANNER_LENGTH]; display_options_get_banner(true, buf, sizeof(buf)); printf("%s", buf); return 0; } Прошу подсказать куда копать дальше. Следовал туториалам отсюда: https://www.rocketboards.org U-boot брал здесь: https://github.com/altera-opensource/u-boot-socfpga Тулчейн собрал с помощью crosstool-ng Лог: Spoiler nios2-terminal: connected to hardware target using JTAG UART on cable nios2-terminal: "USB-Blaster [1-1]", device 1, instance 0 nios2-terminal: (Use the IDE stop button or Ctrl-C to terminate) <debug_uart> size=18, ptr=18, limit=8000: d7ef8000 common/malloc_simple.c:27- alloc_simple() size=18, ptr=30, limit=8000: d7ef8018 common/malloc_simple.c:27- alloc_simple() size=50, ptr=80, limit=8000: d7ef8030 drivers/core/lists.c:201- lists_bind_fdt() bind node cpus drivers/core/lists.c:206- lists_bind_fdt() Device 'cpus' has no compatible string drivers/core/lists.c:201- lists_bind_fdt() bind node memory drivers/core/lists.c:206- lists_bind_fdt() Device 'memory' has no compatible string drivers/core/lists.c:201- lists_bind_fdt() bind node sopc@0 drivers/core/lists.c:222- lists_bind_fdt() - attempt to match compatible string 'altr,avalon' drivers/core/lists.c:222- lists_bind_fdt() - attempt to match compatible string 'simple-bus' drivers/core/lists.c:250- lists_bind_fdt() - found match at 'simple_bus': 'simple-bus' matches 'simple-bus' common/malloc_simple.c:27- alloc_simple() size=18, ptr=98, limit=8000: d7ef8080 common/malloc_simple.c:27- alloc_simple() size=50, ptr=e8, limit=8000: d7ef8098 common/malloc_simple.c:27- alloc_simple() size=c, ptr=f4, limit=8000: d7ef80e8 drivers/core/lists.c:201- lists_bind_fdt() bind node bridge@8000000 drivers/core/lists.c:222- lists_bind_fdt() - attempt to match compatible string 'altr,avalon-22.1' drivers/core/lists.c:222- lists_bind_fdt() - attempt to match compatible string 'simple-bus' drivers/core/lists.c:250- lists_bind_fdt() - found match at 'simple_bus': 'simple-bus' matches 'simple-bus' common/malloc_simple.c:27- alloc_simple() size=50, ptr=144, limit=8000: d7ef80f4 common/malloc_simple.c:27- alloc_simple() size=c, ptr=150, limit=8000: d7ef8144 drivers/core/lists.c:201- lists_bind_fdt() bind node serial@4d50 drivers/core/lists.c:222- lists_bind_fdt() - attempt to match compatible string 'altr,juart-22.1' drivers/core/lists.c:222- lists_bind_fdt() - attempt to match compatible string 'altr,juart-1.0' drivers/core/lists.c:244- lists_bind_fdt() Skipping device pre-relocation drivers/core/lists.c:201- lists_bind_fdt() bind node ethernet@4000 drivers/core/lists.c:222- lists_bind_fdt() - attempt to match compatible string 'altr,tse-22.1' drivers/core/lists.c:222- lists_bind_fdt() - attempt to match compatible string 'altr,tse-1.0' drivers/core/lists.c:244- lists_bind_fdt() Skipping device pre-relocation drivers/core/lists.c:201- lists_bind_fdt() bind node sysid@4d40 drivers/core/lists.c:222- lists_bind_fdt() - attempt to match compatible string 'altr,sysid-22.1' drivers/core/lists.c:222- lists_bind_fdt() - attempt to match compatible string 'altr,sysid-1.0' drivers/core/lists.c:244- lists_bind_fdt() Skipping device pre-relocation drivers/core/lists.c:201- lists_bind_fdt() bind node gpio@4d00 drivers/core/lists.c:222- lists_bind_fdt() - attempt to match compatible string 'altr,pio-22.1' drivers/core/lists.c:222- lists_bind_fdt() - attempt to match compatible string 'altr,pio-1.0' drivers/core/lists.c:244- lists_bind_fdt() Skipping device pre-relocation drivers/core/lists.c:201- lists_bind_fdt() bind node gpio@4ce0 drivers/core/lists.c:222- lists_bind_fdt() - attempt to match compatible string 'altr,pio-22.1' drivers/core/lists.c:222- lists_bind_fdt() - attempt to match compatible string 'altr,pio-1.0' drivers/core/lists.c:244- lists_bind_fdt() Skipping device pre-relocation drivers/core/lists.c:201- lists_bind_fdt() bind node gpio@4cc0 drivers/core/lists.c:222- lists_bind_fdt() - attempt to match compatible string 'altr,pio-22.1' drivers/core/lists.c:222- lists_bind_fdt() - attempt to match compatible string 'altr,pio-1.0' drivers/core/lists.c:244- lists_bind_fdt() Skipping device pre-relocation drivers/core/lists.c:201- lists_bind_fdt() bind node timer@400000 drivers/core/lists.c:222- lists_bind_fdt() - attempt to match compatible string 'altr,timer-22.1' drivers/core/lists.c:222- lists_bind_fdt() - attempt to match compatible string 'altr,timer-1.0' drivers/core/lists.c:244- lists_bind_fdt() Skipping device pre-relocation drivers/core/lists.c:201- lists_bind_fdt() bind node serial@4c80 drivers/core/lists.c:222- lists_bind_fdt() - attempt to match compatible string 'altr,uart-22.1' drivers/core/lists.c:222- lists_bind_fdt() - attempt to match compatible string 'altr,uart-1.0' drivers/core/lists.c:273- lists_bind_fdt() No match for node 'serial@4c80' drivers/core/lists.c:201- lists_bind_fdt() bind node flash@0 drivers/core/lists.c:222- lists_bind_fdt() - attempt to match compatible string 'altr,cfi_flash-22.1' drivers/core/lists.c:222- lists_bind_fdt() - attempt to match compatible string 'cfi-flash' drivers/core/lists.c:244- lists_bind_fdt() Skipping device pre-relocation drivers/core/lists.c:201- lists_bind_fdt() bind node flash@2000000 drivers/core/lists.c:222- lists_bind_fdt() - attempt to match compatible string 'altr,cfi_flash-22.1' drivers/core/lists.c:222- lists_bind_fdt() - attempt to match compatible string 'cfi-flash' drivers/core/lists.c:244- lists_bind_fdt() Skipping device pre-relocation drivers/core/lists.c:201- lists_bind_fdt() bind node chosen drivers/core/lists.c:206- lists_bind_fdt() Device 'chosen' has no compatible string drivers/core/lists.c:201- lists_bind_fdt() bind node __symbols__ drivers/core/lists.c:206- lists_bind_fdt() Device '__symbols__' has no compatible string common/malloc_simple.c:27- alloc_simple() size=18, ptr=168, limit=8000: d7ef8150 drivers/core/lists.c:201- lists_bind_fdt() bind node serial@4d50 drivers/core/lists.c:222- lists_bind_fdt() - attempt to match compatible string 'altr,juart-22.1' drivers/core/lists.c:222- lists_bind_fdt() - attempt to match compatible string 'altr,juart-1.0' drivers/core/lists.c:250- lists_bind_fdt() - found match at 'altera_jtaguart': 'altr,juart-1.0' matches 'altr,juart-1.0' common/malloc_simple.c:27- alloc_simple() size=50, ptr=1b8, limit=8000: d7ef8168 common/malloc_simple.c:27- alloc_simple() size=4, ptr=1bc, limit=8000: d7ef81b8 common/malloc_simple.c:27- alloc_simple() size=10, ptr=1cc, limit=8000: d7ef81bc .config 4sgx230_devboard.dts 4sgx230_fpga.h 4sgx230.h Изменено 27 августа, 2023 пользователем EfesX Цитата Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты Поделиться
EfesX 0 27 августа, 2023 Опубликовано 27 августа, 2023 · Жалоба Хм... Оказалось что в дереве устройств адреса надо указывать учитывая смещение MMU (0xC0000000). Странно, как тогда у авторов статей с rocketboards работало без смещения. Было: Spoiler pb_cpu_to_io: bridge@8000000 { compatible = "altr,avalon-22.1", "simple-bus"; reg = <0x08000000 0x00800000>; #address-cells = <1>; #size-cells = <1>; ranges = <0x00004d50 0x08004d50 0x00000008>, <0x00004000 0x08004000 0x00000400>, <0x00004d40 0x08004d40 0x00000008>, <0x00004400 0x08004400 0x00000040>, <0x00004800 0x08004800 0x00000040>, <0x00004d00 0x08004d00 0x00000010>, <0x00002000 0x08002000 0x00002000>, <0x00004ce0 0x08004ce0 0x00000010>, <0x00004cc0 0x08004cc0 0x00000010>, <0x00400000 0x08400000 0x00000020>, <0x00004c80 0x08004c80 0x00000020>; Стало: Spoiler pb_cpu_to_io: bridge@C8000000 { compatible = "altr,avalon-22.1", "simple-bus"; reg = <0xC8000000 0x00800000>; #address-cells = <1>; #size-cells = <1>; ranges = <0x00004d50 0xC8004d50 0x00000008>, <0x00004000 0xC8004000 0x00000400>, <0x00004d40 0xC8004d40 0x00000008>, <0x00004400 0xC8004400 0x00000040>, <0x00004800 0xC8004800 0x00000040>, <0x00004d00 0xC8004d00 0x00000010>, <0x00002000 0xC8002000 0x00002000>, <0x00004ce0 0xC8004ce0 0x00000010>, <0x00004cc0 0xC8004cc0 0x00000010>, <0x00400000 0xC8400000 0x00000020>, <0x00004c80 0xC8004c80 0x00000020>; Или может быть поддержка MMU включается каким-то конфигом в u-boot? Цитата Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты Поделиться