element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Avnet Boards Forums
  • Products
  • Dev Tools
  • Avnet Boards Community
  • Avnet Boards Forums
  • More
  • Cancel
Avnet Boards Forums
Ultrazed Hardware Design AXI Uart as Linux System Console
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Avnet Boards Forums to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 5 replies
  • Subscribers 324 subscribers
  • Views 1717 views
  • Users 0 members are here
  • ultrazed
Related

AXI Uart as Linux System Console

oleb0n
oleb0n over 5 years ago

I've already tried to clarify this on xilinx forum, but it is still pending. I have several UARTs in my system, both PS and PL. The PS UARTs can be designated as petalinux system console without a problem, however every time I try to use PL UARTs for system console, the petalinux build fails with very obscure diagnostic:

 

| make[1]: Leaving directory '/home/ob/pet_prj/h9_2/build/tmp/work/plnx_zynqmp-xilinx-linux/u-boot-xlnx/v2019.01-xilinx-v2019.2+gitAUTOINC+dc61275b1d-r0/build'

| make: *** [Makefile:148: sub-make] Error 2

| make: Leaving directory '/home/ob/pet_prj/h9_2/build/tmp/work/plnx_zynqmp-xilinx-linux/u-boot-xlnx/v2019.01-xilinx-v2019.2+gitAUTOINC+dc61275b1d-r0/git'

| ERROR: oe_runmake failed

| WARNING: exit code 1 from a shell command.

| ERROR: Function failed: do_compile (log file is located at /home/ob/pet_prj/h9_2/build/tmp/work/plnx_zynqmp-xilinx-linux/u-boot-xlnx/v2019.01-xilinx-v2019.2+gitAUTOINC+dc61275b1d-r0/temp/log.do_compile.13996)

ERROR: Task (/tools/Xilinx/petalinux/2019.2/components/yocto/source/aarch64/layers/meta-xilinx/meta-xilinx-bsp/recipes-bsp/u-boot/u-boot-xlnx_2019.2.bb:do_compile) failed with exit code '1'

 

Opening the above mentioned log file gives:

 

/home/ob/pet_prj/h9_2/build/tmp/work/plnx_zynqmp-xilinx-linux/u-boot-xlnx/v2019.01-xilinx-v2019.2+gitAUTOINC+dc61275b1d-r0/git/include/configs/platform-top.h:34:2: error: expected '}' before 'PSSERIAL0'

  PSSERIAL0 \

 

 

I checked the file, ut does not look like I can fix it by adding a missing '}'.

This project was build from scratch (no relicts), if I select PS_UARTx as system it builds fine. If there is a way to fix it please share image

 

 

 

 

This is complete platform-top.h:

 

#include <configs/platform-auto.h>

 

#define CONFIG_NR_DRAM_BANKS 3

 

#define CONFIG_SYS_BOOTM_LEN 0xF000000

#undef  CONFIG_SYS_BOOTMAPSZ

 

#define DFU_ALT_INFO_RAM \

                "dfu_ram_info=" \

        "setenv dfu_alt_info " \

        "image.ub ram $netstart 0x1e00000\0" \

        "dfu_ram=run dfu_ram_info && dfu 0 ram 0\0" \

        "thor_ram=run dfu_ram_info && thordown 0 ram 0\0"

 

#define DFU_ALT_INFO_MMC \

        "dfu_mmc_info=" \

        "set dfu_alt_info " \

        "${kernel_image} fat 0 1\\\\;" \

        "dfu_mmc=run dfu_mmc_info && dfu 0 mmc 0\0" \

        "thor_mmc=run dfu_mmc_info && thordown 0 mmc 0\0"

 

/*Required for uartless designs */

#ifndef CONFIG_BAUDRATE

#define CONFIG_BAUDRATE 115200

#ifdef CONFIG_DEBUG_UART

#undef CONFIG_DEBUG_UART

#endif

#endif

 

/* Extra U-Boot Env settings */

#define CONFIG_EXTRA_ENV_SETTINGS \

    SERIAL_MULTI \

    CONSOLE_ARG \

    PSSERIAL0 \

    "nc=setenv stdout nc;setenv stdin nc;\0" \

    "ethaddr=00:0a:35:00:22:01\0" \

    "importbootenv=echo \"Importing environment from SD ...\"; " \

        "env import -t ${loadbootenv_addr} $filesize\0" \

    "loadbootenv=load mmc $sdbootdev:$partid ${loadbootenv_addr} ${bootenv}\0" \

    "sd_uEnvtxt_existence_test=test -e mmc $sdbootdev:$partid /uEnv.txt\0" \

    "uenvboot=" \

        "if run sd_uEnvtxt_existence_test; then " \

            "run loadbootenv; " \ 

            "echo Loaded environment from ${bootenv}; " \

            "run importbootenv; " \

        "fi\0" \

    "sdboot=echo boot Petalinux; run uenvboot ; mmcinfo && fatload mmc 0 ${netstart} ${kernel_img} && bootm \0" \

    "autoload=no\0" \

    "clobstart=0x10000000\0" \

    "netstart=0x10000000\0" \

    "dtbnetstart=0x11800000\0" \

    "loadaddr=0x10000000\0" \

    "boot_img=BOOT.BIN\0" \

    "load_boot=tftpboot ${clobstart} ${boot_img}\0" \

    "update_boot=setenv img boot; setenv psize ${bootsize}; setenv installcmd \"install_boot\"; run load_boot ${installcmd}; setenv img; setenv psize; setenv installcmd\0" \

    "install_boot=mmcinfo && fatwrite mmc 0 ${clobstart} ${boot_img} ${filesize}\0" \

    "bootenvsize=0x40000\0" \

    "bootenvstart=0x1360000\0" \

    "eraseenv=sf probe 0 && sf erase ${bootenvstart} ${bootenvsize}\0" \

    "jffs2_img=rootfs.jffs2\0" \

    "load_jffs2=tftpboot ${clobstart} ${jffs2_img}\0" \

    "update_jffs2=setenv img jffs2; setenv psize ${jffs2size}; setenv installcmd \"install_jffs2\"; run load_jffs2 test_img; setenv img; setenv psize; setenv installcmd\0" \

    "sd_update_jffs2=echo Updating jffs2 from SD; mmcinfo && fatload mmc 0:1 ${clobstart} ${jffs2_img} && run install_jffs2\0" \

    "install_jffs2=sf probe 0 && sf erase ${jffs2start} ${jffs2size} && " \

        "sf write ${clobstart} ${jffs2start} ${filesize}\0" \

    "kernel_img=image.ub\0" \

    "load_kernel=tftpboot ${clobstart} ${kernel_img}\0" \

    "update_kernel=setenv img kernel; setenv psize ${kernelsize}; setenv installcmd \"install_kernel\"; run load_kernel ${installcmd}; setenv img; setenv psize; setenv installcmd\0" \

    "install_kernel=mmcinfo && fatwrite mmc 0 ${clobstart} ${kernel_img} ${filesize}\0" \

    "cp_kernel2ram=mmcinfo && fatload mmc 0 ${netstart} ${kernel_img}\0" \

    "dtb_img=system.dtb\0" \

    "load_dtb=tftpboot ${clobstart} ${dtb_img}\0" \

    "update_dtb=setenv img dtb; setenv psize ${dtbsize}; setenv installcmd \"install_dtb\"; run load_dtb test_img; setenv img; setenv psize; setenv installcmd\0" \

    "sd_update_dtb=echo Updating dtb from SD; mmcinfo && fatload mmc 0:1 ${clobstart} ${dtb_img} && run install_dtb\0" \

    "fault=echo ${img} image size is greater than allocated place - partition ${img} is NOT UPDATED\0" \

    "test_crc=if imi ${clobstart}; then run test_img; else echo ${img} Bad CRC - ${img} is NOT UPDATED; fi\0" \

    "test_img=setenv var \"if test ${filesize} -gt ${psize}\\; then run fault\\; else run ${installcmd}\\; fi\"; run var; setenv var\0" \

    "netboot=tftpboot ${netstart} ${kernel_img} && bootm\0" \

    "default_bootcmd=run cp_kernel2ram && bootm ${netstart}\0" \

""

  • Sign in to reply
  • Cancel
Parents
  • mahadeva.hn
    mahadeva.hn over 4 years ago

    Hi,

     

    I'm also facing the same problem, when I import custom HDF file. Please help me with the solution.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • drozwood90
    drozwood90 over 4 years ago in reply to mahadeva.hn

    Hi there,

     

    What system are you using?

     

    --Dan

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • drozwood90
    drozwood90 over 4 years ago in reply to mahadeva.hn

    Hi there,

     

    What system are you using?

     

    --Dan

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
  • mahadeva.hn
    mahadeva.hn over 4 years ago in reply to drozwood90

    I am using Ultrazed-3EG IOCC board.

    petalinux version: 2018.3

     

    In file included from include/config.h:5:0,

                     from /media/mahadeva/ubuntu_data/ultrazed/iocc_linux/uz3eg_iocc_dp_2018_3/build/tmp/work/plnx_zynqmp-xilinx-linux/u-boot-xlnx/v2018.01-xilinx-v2018.3+gitAUTOINC+d8fc4b3b70-r0/git/arch/arm/include/asm/string.h:4,

                     from /media/mahadeva/ubuntu_data/ultrazed/iocc_linux/uz3eg_iocc_dp_2018_3/build/tmp/work/plnx_zynqmp-xilinx-linux/u-boot-xlnx/v2018.01-xilinx-v2018.3+gitAUTOINC+d8fc4b3b70-r0/git/include/linux/string.h:21,

                     from /media/mahadeva/ubuntu_data/ultrazed/iocc_linux/uz3eg_iocc_dp_2018_3/build/tmp/work/plnx_zynqmp-xilinx-linux/u-boot-xlnx/v2018.01-xilinx-v2018.3+gitAUTOINC+d8fc4b3b70-r0/git/include/common.h:30,

                     from /media/mahadeva/ubuntu_data/ultrazed/iocc_linux/uz3eg_iocc_dp_2018_3/build/tmp/work/plnx_zynqmp-xilinx-linux/u-boot-xlnx/v2018.01-xilinx-v2018.3+gitAUTOINC+d8fc4b3b70-r0/git/env/common.c:11:

    /media/mahadeva/ubuntu_data/ultrazed/iocc_linux/uz3eg_iocc_dp_2018_3/build/tmp/work/plnx_zynqmp-xilinx-linux/u-boot-xlnx/v2018.01-xilinx-v2018.3+gitAUTOINC+d8fc4b3b70-r0/git/include/configs/platform-top.h:6:2: error: expected '}' before 'SERIAL_MULTI'

      SERIAL_MULTI\

      ^

    /media/mahadeva/ubuntu_data/ultrazed/iocc_linux/uz3eg_iocc_dp_2018_3/build/tmp/work/plnx_zynqmp-xilinx-linux/u-boot-xlnx/v2018.01-xilinx-v2018.3+gitAUTOINC+d8fc4b3b70-r0/git/include/configs/platform-top.h:6:2: note: in definition of macro 'CONFIG_EXTRA_ENV_SETTINGS'

      SERIAL_MULTI\

      ^~~~~~~~~~~~~

      CONSOLE_ARG\

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • drozwood90
    drozwood90 over 4 years ago in reply to mahadeva.hn

    Hi there,

     

    Have you seen the stock files for a comparison?  That might help you determine what is different/missing.

     

    --Dan

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • mahadeva.hn
    mahadeva.hn over 4 years ago in reply to drozwood90

    Hi

    I didn't actually touch the device tree. I just changed petalinux-config (Subsystem AUTO Hardware Settings -> Serial Settings). replacing the definition of PSSERIAL0 by ESERIAL0.

    Solution: I just replaced PSSERIAL0 by ESERIAL0 in platform-top.h. With this workaround I could build the project successfully.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube