당신은 주제를 찾고 있습니까 “u boot serial console – Tutorial: Introduction to the Embedded Boot Loader U-boot – Behan Webster, Converse in Code“? 다음 카테고리의 웹사이트 https://ppa.charoenmotorcycles.com 에서 귀하의 모든 질문에 답변해 드립니다: https://ppa.charoenmotorcycles.com/blog/. 바로 아래에서 답을 찾을 수 있습니다. 작성자 The Linux Foundation 이(가) 작성한 기사에는 조회수 33,651회 및 좋아요 497개 개의 좋아요가 있습니다.
u boot serial console 주제에 대한 동영상 보기
여기에서 이 주제에 대한 비디오를 시청하십시오. 주의 깊게 살펴보고 읽고 있는 내용에 대한 피드백을 제공하세요!
d여기에서 Tutorial: Introduction to the Embedded Boot Loader U-boot – Behan Webster, Converse in Code – u boot serial console 주제에 대한 세부정보를 참조하세요
Tutorial: Introduction to the Embedded Boot Loader U-boot – Behan Webster, Converse in Code
u boot serial console 주제에 대한 자세한 내용은 여기를 참조하세요.
Configuring Serial Port Debug Console (Linux/U-Boot)
On our Toradex modules, the U-Boot boot loader and the Linux kernel use UART_A as serial debug console. The serial console is the primary and most reliable …
Source: developer.toradex.com
Date Published: 5/15/2022
View: 5617
U-boot – Debian Wiki
For debugging u-boot, a serial console is usually required. Accessing the serial console varies greatly by board; …
Source: wiki.debian.org
Date Published: 3/1/2021
View: 7020
u-boot/README.console at master · ARM-software/u … – GitHub
At system startup U-Boot initializes a serial console. When U-Boot. relocates itself to RAM, all console drivers are initialized (they.
Source: github.com
Date Published: 6/27/2021
View: 6572
Kernel no serial console output if started through U-Boot
U-Boot code has no affect on the console because the kernel performs its own, full initialization of the serial port. No kernel output …
Source: stackoverflow.com
Date Published: 8/14/2022
View: 5777
Using a serial console for u-boot and Linux kernel debugging
Note that using a serial console for u-boot and Linux kernel debugging is applicable to just about any SBC, and is the only method really available without …
Source: wiki.loverpi.com
Date Published: 6/9/2022
View: 6838
How to Change the serial console – PHYTEC Products
To change the serial console for u-boot, you’ll need to modify the CONFIG_CONS_INDEX and CONFIG_MXC_UART_BASE definitions in the u-boot …
Source: develop.phytec.com
Date Published: 10/18/2022
View: 6567
Loading Linux Images over UART – Emcraft
This article explains how to load images to the target over UART in U-Boot. Keep in mind that loading via a serial port will take quite a long time (minutes …
Source: www.emcraft.com
Date Published: 6/4/2021
View: 7418
Serial system — Das U-Boot unknown version documentation
This function registers all serial port drivers that are compiled into the U-Boot binary with the serial core, thus making them available to U-Boot to use.
Source: u-boot.readthedocs.io
Date Published: 6/6/2022
View: 4222
linux – How to disable serial console(non-kernel) in u-boot
By default, Edison’s UART port is used for u-boot console. I want to disable this feature, but only on the serial interface(u-boot also listens on USB and …
Source: codeutility.org
Date Published: 9/11/2022
View: 4792
주제와 관련된 이미지 u boot serial console
주제와 관련된 더 많은 사진을 참조하십시오 Tutorial: Introduction to the Embedded Boot Loader U-boot – Behan Webster, Converse in Code. 댓글에서 더 많은 관련 이미지를 보거나 필요한 경우 더 많은 관련 기사를 볼 수 있습니다.
주제에 대한 기사 평가 u boot serial console
- Author: The Linux Foundation
- Views: 조회수 33,651회
- Likes: 좋아요 497개
- Date Published: 2020. 9. 11.
- Video Url link: https://www.youtube.com/watch?v=INWghYZH3hI
Configuring Serial Port Debug Console (Linux/U-Boot)
Version: 5.0
On this page
Is this page helpful?
Configuring Serial Port Debug Console (Linux/U-Boot)
On our Toradex modules, the U-Boot boot loader and the Linux kernel use UART_A as serial debug console. The serial console is the primary and most reliable interface to the boot loader and Linux kernel. This article has two main sections:
How to use (attach to and communicate via) the debug UART, a.k.a serial console.
How to disable the debug UART.
If you are looking for instructions on how to communicate with other devices using the UART, please refer to the article UART (Linux).
caution We do not recommend to use UART_A for any other purpose. Disabling it prevents analyzing errors (e.g. crash of the user interface) or analyzing if the system is in a non-bootable state.
tip This article shows how to disable the debug messages on the serial console only. In case you would like to disable debug messages or the virtual console on graphical output (DVI-I, HDMI, LVDS, or VGA) please refer to the Framebuffer (Linux) article.
You can easily access your Toradex SoM via the serial, in this section, you will find out how to set up the hardware on each of our boards as well as know the parameters. This section applies to both our BSP Layers and Reference Images for Yocto Project and TorizonCore.
Connecting to the board requires some parameters, here they are:
port: it depends on your hardware, often it is /dev/ttyUSBx on Linux , or COMx on Windows , being x a number to be determined in the next section.
on , or on , being a number to be determined in the next section. Baud Rate: 115200
Parity: none
Bits: 8
Stop bits: 1
Flow control: none
Go to Control Panel and find the Device Manager. Your COMx port will be listed under Ports.
Unplug the device from your computer and run:
$ ls /dev/ttyUSB*
Plug the device and run the same command again, your device will be listed:
$ ls /dev/ttyUSB*
To avoid being requested to use sudo all the time, you can add your user to the dialout group. You can find your user name with the whoami command. To do it in a single-line, in your development PC, run:
$ sudo usermod -a -G dialout $(whoami)
To apply the changes, either reboot or log off, and log in.
Select your carrier board from the tabs below:
Verdin Development Board
Dahlia Carrier Board
Ixora Carrier Board
Apalis Evaluation Board
Iris Carrier Board
Aster Carrier Board
Colibri Evaluation Board Connect a USB C to USB Type-A cable to X66 . info Notice that the USB C connector (X66) has an integrated USB-serial converter that provides access to the computer on module’s debug serial port. Verdin has an integrated Serial-to-USB converter that lists 4 serial ports on your computer. The highest index is the Linux serial console. Example, if you see /dev/ttyUSB0 , /dev/ttyUSB1 , /dev/ttyUSB2 and /dev/ttyUSB3 listed, then /dev/ttyUSB3 is the serial console. The same logic applies to Windows COM ports. danger If you connect to the first or the second port (for example /dev/ttyUSB0 or /dev/ttyUSB1 ), you will not be able to use the board. This happens because those ports are dedicated to power/reset control and FTDI JTAG. Just close those connections and reset the board. Connect a USB C to USB Type-A cable to DEBUG . info Notice that the USB C connector (DEBUG) has an integrated USB-serial converter that provides access to the computer on module’s debug serial port. Verdin has an integrated Serial-to-USB converter that lists 4 serial ports on your computer. The highest index is the Linux serial console. Example, if you see /dev/ttyUSB0 , /dev/ttyUSB1 , /dev/ttyUSB2 and /dev/ttyUSB3 listed, then /dev/ttyUSB3 is the serial console. The same logic applies to Windows COM ports. danger If you connect to the first or the second port (for example /dev/ttyUSB0 or /dev/ttyUSB1 ), you will not be able to use the board. This happens because those ports are dedicated to power/reset control and FTDI JTAG. Just close those connections and reset the board. Connect the DB9 to the IDC adapter cable to the X22 connector on the Ixora: info The adapter is included in the Toradex Cable Kit, the standard we used is normally called DTK or Intel standard. Connect your host machine to the adapter cable using a serial cable or Serial to USB converter: Use UART-1 via the USB Type-B connector X29 : Make sure that the jumpers JP10 and JP12 are set to USB mode as shown in the image below: Connect the DB9 to the IDC adapter cable to the X13 connector on the Iris: info The adapter is included in the Toradex Cable Kit, the standard we used is normally called DTK or Intel standard. Connect your host machine to the adapter cable using a serial cable or Serial to USB converter: Connect a USB micro-B to USB Type-A cable to X4 . info Notice that the micro USB connector (X4) can be employed as a means to power the system and also has an integrated USB-serial converter that provides access to the computer on the module’s debug serial port. Use UART A via the USB Type-B connector X27 : Make sure that the jumpers JP19 and JP17 are set to USB mode as shown in the image below:
In case you want to know how to set up a terminal emulator to start accessing your module, please refer to Serial Terminal Emulator article.
To get your board IP address, follow the instructions from the section Find your IP and MAC address on the article Basic Linux Commands.
Examples of why you need your board IP:
You are connecting to the debug UART because you were unable to login via SSH due to missing the board IP.
The DHCP tables from your LAN router were refreshed and now the board has a different IP address.
You want to access a service hosted on the board, for instance, a web server or a remote graphical user interface.
We don’t provide instructions on how to do this. We advise you to use either the default Debug Port defined by Toradex or NXP.
For the i.MX 8/8X SoMs which have a System Controller Unit/System Controller Firmware (SCU/SCFW), or other SoMs from the i.MX 8 family (such as the i.MX 8M Mini) which use a BootROM, it may be nearly or even impossible to change the default UART.
Here are sections for disabling the console on U-Boot and the Linux kernel. Make sure to check on UART (Linux) the name of the UART interfaces available for your specific SoM before proceeding.
To disable the serial console modifying U-Boot, you need to reconfigure it following some basic steps. Before proceding, you have to install a GNU toolchain:
Prerequisites All SoCs Make sure you understand the basic concepts of our Embedded Linux offerings, such as release cycles, distributions and images. Start with the following article: BSP Layers and Reference Images for Yocto Project Software Select from the tabs below the Embedded Linux BSP release for which you want to install a compatible toolchain: Embedded Linux BSP 5
Embedded Linux BSP 4
Embedded Linux BSP 3.0
Embedded Linux BSP 2.8
Older Releases Beginning with BSP 5, as part of our OpenEmbedded Dunfell update we transitioned to using version 9.3 of the gcc compiler. Arm releases well tested binary toolchains which can be used to cross-compile software for our modules. At the time of this writing, Arm has not released gcc 9.3 compilers as of yet. Therefore, just use the version 9.2 ones for now: For 32 bit Arm: gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf.tar.xz
For 64 bit Arm: gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads You have to choose to download either the 32 bit or 64 bit Arm cross-toolchain, according to the architecture of your Computer on Module SoC. Select the correct one from the tabs below: 32 bit Arm
64 bit Arm To install the toolchain on your host machine, download and unpack the tar.xz file. From the command-line: $ cd ~
$ wget -O gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf.tar.xz “https://developer.arm.com/-/media/Files/downloads/gnu-a/9.2-2019.12/binrel/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf.tar.xz?revision=fed31ee5-2ed7-40c8-9e0e-474299a3c4ac&la=en&hash=76DAF56606E7CB66CC5B5B33D8FB90D9F24C9D20″
$ tar xvf gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf.tar.xz
$ ln -s gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf gcc-linaro
The U-Boot and Linux makefiles use the environment variables ARCH/CROSS_COMPILE to configure and call the compiler correctly. Therefore, these environment variables must be exported in any shell instance that will run configure/compile commands to build U-Boot or Linux for the target module. $ export ARCH=arm
$ export DTC_FLAGS=”-@”
$ export PATH=~/gcc-linaro/bin/:$PATH
$ export CROSS_COMPILE=arm-none-linux-gnueabihf-
You can put those commands into a file and source that file to export it more easily, E.g.: $ echo “export ARCH=arm” >> ~/export_compiler
$ echo “export DTC_FLAGS=’-@'” >> ~/export_compiler
$ echo “export PATH=~/gcc-linaro/bin/:$PATH” >> ~/export_compiler
$ echo “export CROSS_COMPILE=arm-none-linux-gnueabihf-” >> ~/export_compiler
$ source ~/export_compiler
To install the toolchain on your host machine, download and unpack the tar.xz file. From the command-line: $ cd ~
$ wget -O gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz “https://developer.arm.com/-/media/Files/downloads/gnu-a/9.2-2019.12/binrel/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz?revision=61c3be5d-5175-4db6-9030-b565aae9f766&la=en&hash=0A37024B42028A9616F56A51C2D20755C5EBBCD7″
$ tar xvf gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz
$ ln -s gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu gcc-linaro
The U-Boot and Linux makefiles use the environment variables ARCH/CROSS_COMPILE to configure and call the compiler correctly. Therefore, these environment variables must be exported in any shell instance that will run configure/compile commands to build U-Boot or Linux for the target module. $ export ARCH=arm64
$ export DTC_FLAGS=”-@”
$ export PATH=~/gcc-linaro/bin/:$PATH
$ export CROSS_COMPILE=aarch64-none-linux-gnu-
You can put those commands into a file and source that file to export it more easily, E.g.: $ echo “export ARCH=arm64” >> ~/export_compiler
$ echo “export DTC_FLAGS=’-@'” >> ~/export_compiler
$ echo “export PATH=~/gcc-linaro/bin/:$PATH” >> ~/export_compiler
$ echo “export CROSS_COMPILE=aarch64-none-linux-gnu-” >> ~/export_compiler
$ source ~/export_compiler
Beginning with BSP 4, as part of our OpenEmbedded Zeus update we transitioned to using version 8.3 of the gcc compiler. Arm releases well tested binary toolchains which can be used to cross-compile software for our modules: For 32 bit Arm: gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf.tar.xz
For 64 bit Arm: gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu.tar.xz https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads You have to choose to download either the 32 bit or 64 bit Arm cross-toolchain, according to the architecture of your Computer on Module SoC. Select the correct one from the tabs below: 32 bit Arm
64 bit Arm To install the toolchain on your host machine, download and unpack the tar.xz file. From the command-line: $ cd ~
$ wget -O gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf.tar.xz “https://developer.arm.com/-/media/Files/downloads/gnu-a/8.3-2019.03/binrel/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf.tar.xz?revision=e09a1c45-0ed3-4a8e-b06b-db3978fd8d56&la=en&hash=93ED4444B8B3A812B893373B490B90BBB28FD2E3”
$ tar xvf gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf.tar.xz
$ ln -s gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf gcc-linaro
The U-Boot and Linux makefiles use the environment variables ARCH/CROSS_COMPILE to configure and call the compiler correctly. Therefore, these environment variables must be exported in any shell instance that will run configure/compile commands to build U-Boot or Linux for the target module. $ export ARCH=arm
$ export PATH=~/gcc-linaro/bin/:$PATH
$ export CROSS_COMPILE=arm-linux-gnueabihf-
You can put those commands into a file and source that file to export it more easily, E.g.: $ echo “export ARCH=arm” >> ~/export_compiler
$ echo “export PATH=~/gcc-linaro/bin/:$PATH” >> ~/export_compiler
$ echo “export CROSS_COMPILE=arm-linux-gnueabihf-” >> ~/export_compiler
$ source ~/export_compiler
To install the toolchain on your host machine, download and unpack the tar.xz file. From the command-line: $ cd ~
$ wget -O gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu.tar.xz “https://developer.arm.com/-/media/Files/downloads/gnu-a/8.3-2019.03/binrel/gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu.tar.xz?revision=2e88a73f-d233-4f96-b1f4-d8b36e9bb0b9&la=en&hash=167687FADA00B73D20EED2A67D0939A197504ACD”
$ tar xvf gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu.tar.xz
$ ln -s gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu gcc-linaro
The U-Boot and Linux makefiles use the environment variables ARCH/CROSS_COMPILE to configure and call the compiler correctly. Therefore, these environment variables must be exported in any shell instance that will run configure/compile commands to build U-Boot or Linux for the target module. $ export ARCH=arm64
$ export PATH=~/gcc-linaro/bin/:$PATH
$ export CROSS_COMPILE=aarch64-linux-gnu-
You can put those commands into a file and source that file to export it more easily, E.g.: $ echo “export ARCH=arm64” >> ~/export_compiler
$ echo “export PATH=~/gcc-linaro/bin/:$PATH” >> ~/export_compiler
$ echo “export CROSS_COMPILE=aarch64-linux-gnu-” >> ~/export_compiler
$ source ~/export_compiler
Beginning with image 3.0, as part of our OpenEmbedded Thud update we transitioned to using version 8.2 of the gcc compiler. Arm releases well tested binary toolchains which can be used to cross-compile software for our modules: For 32 bit Arm: gcc-arm-8.2-2019.01-x86_64-arm-linux-gnueabihf.tar.xz
For 64 bit Arm: gcc-arm-8.2-2019.01-x86_64-aarch64-linux-gnu.tar.xz https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads You have to choose to download either the 32 bit or 64 bit Arm cross-toolchain, according to the architecture of your Computer on Module SoC. Select the correct one from the tabs below: 32 bit Arm
64 bit Arm To install the toolchain on your host machine, download and unpack the tar.xz file. From the command-line: $ cd ~
$ wget -O gcc-arm-8.2-2019.01-x86_64-arm-linux-gnueabihf.tar.xz “https://developer.arm.com/-/media/Files/downloads/gnu-a/8.2-2019.01/gcc-arm-8.2-2019.01-x86_64-arm-linux-gnueabihf.tar.xz?revision=c69ea519-a965-4359-84a4-cbd440ff4130&la=en&hash=09C47C70EEE96D17EA036A7A59AE961972320A31”
$ tar xvf gcc-arm-8.2-2019.01-x86_64-arm-linux-gnueabihf.tar.xz
$ ln -s gcc-arm-8.2-2019.01-x86_64-arm-linux-gnueabihf gcc-linaro
The U-Boot and Linux makefiles use the environment variables ARCH/CROSS_COMPILE to configure and call the compiler correctly. Therefore, these environment variables must be exported in any shell instance that will run configure/compile commands to build U-Boot or Linux for the target module. $ export ARCH=arm
$ export PATH=~/gcc-linaro/bin/:$PATH
$ export CROSS_COMPILE=arm-linux-gnueabihf-
You can put those commands into a file and source that file to export it more easily, E.g.: $ echo “export ARCH=arm” >> ~/export_compiler
$ echo “export PATH=~/gcc-linaro/bin/:$PATH” >> ~/export_compiler
$ echo “export CROSS_COMPILE=arm-linux-gnueabihf-” >> ~/export_compiler
$ source ~/export_compiler
To install the toolchain on your host machine, download and unpack the tar.xz file. From the command-line: $ cd ~
$ wget -O gcc-arm-8.2-2019.01-x86_64-aarch64-linux-gnu.tar.xz “https://developer.arm.com/-/media/Files/downloads/gnu-a/8.2-2019.01/gcc-arm-8.2-2019.01-x86_64-aarch64-linux-gnu.tar.xz?revision=21270570-4ec0-4bad-a9e1-09707614066a&la=en&hash=AFEDF645AF5B94336DB4E1E608806CEC87A02B8A”
$ tar xvf gcc-arm-8.2-2019.01-x86_64-aarch64-linux-gnu.tar.xz
$ ln -s gcc-arm-8.2-2019.01-x86_64-aarch64-linux-gnu gcc-linaro
The U-Boot and Linux makefiles use the environment variables ARCH/CROSS_COMPILE to configure and call the compiler correctly. Therefore, these environment variables must be exported in any shell instance that will run configure/compile commands to build U-Boot or Linux for the target module. $ export ARCH=arm64
$ export PATH=~/gcc-linaro/bin/:$PATH
$ export CROSS_COMPILE=aarch64-linux-gnu-
You can put those commands into a file and source that file to export it more easily, E.g.: $ echo “export ARCH=arm64” >> ~/export_compiler
$ echo “export PATH=~/gcc-linaro/bin/:$PATH” >> ~/export_compiler
$ echo “export CROSS_COMPILE=aarch64-linux-gnu-” >> ~/export_compiler
$ source ~/export_compiler
Beginning with image 2.8, as part of our OpenEmbedded Rocko update we transitioned to using version 7.3 of the gcc compiler. Linaro releases well tested binary toolchains which can be used to cross-compile software for our modules: For 32 bit Arm: gcc-linaro-7.3.1-2018.05-x86_64_arm-linux-gnueabihf.tar.xz
For 64 bit Arm: Embedded Linux BSP 2.8 does not support any 64 bit Arm SoMs by Toradex. https://releases.linaro.org/components/toolchain/binaries/7.3-2018.05/arm-linux-gnueabihf/ To install the toolchain on your host machine, download and unpack the tar.xz file. From the command-line: $ cd ~
$ wget -O gcc-linaro-7.3.1-2018.05-x86_64_arm-linux-gnueabihf.tar.xz “https://releases.linaro.org/components/toolchain/binaries/7.3-2018.05/arm-linux-gnueabihf/gcc-linaro-7.3.1-2018.05-x86_64_arm-linux-gnueabihf.tar.xz”
$ tar xvf gcc-linaro-7.3.1-2018.05-x86_64_arm-linux-gnueabihf.tar.xz
$ ln -s gcc-linaro-7.3.1-2018.05-x86_64_arm-linux-gnueabihf gcc-linaro
The U-Boot and Linux makefiles use the environment variables ARCH/CROSS_COMPILE to configure and call the compiler correctly. Therefore, these environment variables must be exported in any shell instance that will run configure/compile commands to build U-Boot or Linux for the target module. $ export ARCH=arm
$ export PATH=~/gcc-linaro/bin/:$PATH
$ export CROSS_COMPILE=arm-linux-gnueabihf-
You can put those commands into a file and source that file to export it more easily, E.g.: $ echo “export ARCH=arm” >> ~/export_compiler
$ echo “export PATH=~/gcc-linaro/bin/:$PATH” >> ~/export_compiler
$ echo “export CROSS_COMPILE=arm-linux-gnueabihf-” >> ~/export_compiler
$ source ~/export_compiler
Beginning with image 2.7b2, as part of our OpenEmbedded Morty update we transitioned to using version 6.2 of the gcc compiler. Linaro releases well tested binary toolchains which can be used to cross-compile software for our modules (choose gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf.tar.xz): https://releases.linaro.org/components/toolchain/binaries/6.2-2016.11/arm-linux-gnueabihf/ Beginning with image V2.6, as part of our OpenEmbedded Jethro update we transitioned to using version 5.2 of the gcc compiler. Linaro releases well tested binary toolchains which can be used to cross-compile software for our modules (choose gcc-linaro-5.2-2015.11-2-x86_64_arm-linux-gnueabihf.tar.xz): https://releases.linaro.org/components/toolchain/binaries/5.2-2015.11-2/arm-linux-gnueabihf/ Beginning with image V2.0, we transitioned to using the hard-float ABI: https://releases.linaro.org/archive/14.11/components/toolchain/binaries/ Note: Since the 14.11 release Linaro only provides x86_64 toolchains. If you use 32-bit Linux on your host machine (check using uname -m), you can still download the older 14.09 release which is still 32-bit: https://releases.linaro.org/archive/14.09/components/toolchain/binaries/ You have to choose to download either the 32 bit or 64 bit Arm cross-toolchain, according to the architecture of your Computer on Module SoC. Select the correct one from the tabs below: The U-Boot and Linux makefiles use the environment variables ARCH/CROSS_COMPILE to configure and call the compiler correctly. Therefore, these environment variables must be exported in any shell instance that will run configure/compile commands to build U-Boot or Linux for the target module. $ export ARCH=arm
$ export PATH=~/gcc-linaro/bin/:$PATH
$ export CROSS_COMPILE=arm-linux-gnueabihf-
You can put those commands into a file and source that file to export it more easily, E.g.: $ echo “export ARCH=arm” >> ~/export_compiler
$ echo “export PATH=~/gcc-linaro/bin/:$PATH” >> ~/export_compiler
$ echo “export CROSS_COMPILE=arm-linux-gnueabihf-” >> ~/export_compiler
$ source ~/export_compiler
Embedded Linux BSP 5
Older Versions You need some essential build tools to compile the Kernel or DTC. Most are likely part of your distro’s standard install. For Fedora: $ sudo dnf install bc gcc git ncurses-devel lzop make perl openssl-devel bison flex diffutils
For Debian/Ubuntu: $ sudo apt-get install bc build-essential git libncurses5-dev lzop perl libssl-dev bison flex
U-Boot and the device tree overlays compilation for some modules needs a device tree compiler (DTC). We recommend DTC version 1.6.0 or higher. You can build the latest version (DTC 1.6.0 at the time of writing) from the source: $ git clone git://git.kernel.org/pub/scm/utils/dtc/dtc.git -b v1.6.0 ~/dtc
$ cd ~/dtc
$ make
$ export PATH=$HOME/dtc/:$PATH
info on Fedora and on Ubuntu 22.04, there have been reported DTC build errors libfdt/libfdt.h:251:28: warning: array subscript ‘struct fdt_header[0]’ is partly outside array bounds of ‘unsigned char[4]’ [-Warray-bounds] .
To disable treating errors as warnings, you can remove the flag -Werror from the CFLAGS on the Makefile.
We have not evaluated the consequences of doing it, do it at your own risk! The uImage target of the Linux kernel compilation needs a recent mkimage tool. One can install the Fedora package uboot-tools : $ sudo dnf install uboot-tools
Or with the corresponding Debian/Ubuntu package u-boot-tools : $ sudo apt-get install u-boot-tools
Alternatively, mkimage tool is also built during the U-Boot compilation. You can follow the U-Boot building instructions as explained further in this article, and after that, include it in PATH. The uImage target of the Linux kernel compilation needs a recent mkimage tool. One can simply install the Fedora package uboot-tools : $ sudo dnf install uboot-tools
Or with the corresponding Debian/Ubuntu package u-boot-tools : $ sudo apt-get install u-boot-tools
Alternatively, mkimage tool is also built during the U-Boot compilation. You can follow the U-Boot building instructions as explained further in this article, and after that include it in PATH. You need some essential build tools to compile the Kernel. Most are likely part of your distro’s standard install. For Fedora: $ sudo dnf install bc gcc git ncurses-devel lzop make perl openssl-devel
For Debian/Ubuntu: $ sudo apt-get install bc build-essential git libncurses5-dev lzop perl libssl-dev
CONFIG_SILENT_CONSOLE
CONFIG_SYS_DEVICE_NULLDEV
CONFIG_SILENT_CONSOLE_UPDATE_ON_RELOC
CONFIG_SILENT_CONSOLE_UPDATE_ON_SET
Accordingly to the [official documentation of U-boot](https://github.com/ARM-software/u-boot/blob/master/doc/README.silent “Documentation of u-boot”) regarding to silencing the console, the following config options need to be defined in the respective board header file to achieve the goal:
So, follow the next steps to silence the serial terminal:
Get the U-boot source code:
$ mkdir -p ~/workdir
$ cd ~/workdir
$ git clone -b
git://git.toradex.com/u-boot-toradex.git caution Replace
by the U-Boot Git Branch for your specific configuration. You can find the version information here. Go to u-boot-toradex/configs and modify the defconfig file of the respective board (for example, for colibri iMX8X: u-boot-toradex/configs/colibri-imx8x_defconfig ) by adding and setting the variables at the end of the file as shown below:
…
CONFIG_SILENT_CONSOLE=y
CONFIG_SYS_DEVICE_NULLDEV=y
CONFIG_SILENT_CONSOLE_UPDATE_ON_RELOC=y
…
Define the variables at the board’s config header, located at include/configs (for example, for colibri iMX8X: /include/configs/colibri-imx8x.h ):
# define CONFIG_SILENT_CONSOLE
# define CONFIG_SYS_DEVICE_NULLDEV
# define CONFIG_SILENT_CONSOLE_UPDATE_ON_RELOC
# define CONFIG_BOARD_EARLY_INIT_F 1
For enabling silent console, append the environment variable ‘silent=1’ to CONFIG_EXTRA_ENV_SETTINGS in the respective board header file:
# define CONFIG_EXTRA_ENV_SETTINGS \
BOOTENV \
AHAB_ENV \
M4_BOOT_ENV \
MEM_LAYOUT_ENV_SETTINGS \
. . .
“silent=1\0” \
Compile, deploy and integrate the modifications of the U-boot. Please refer to the following article concerning the setup/compilation of the same: Build U-Boot and Linux Kernel from Source Code.
Note: Enabling silent console just bypasses the console messages to null. Depending on the module type and U-Boot version you might still be able to interrupt U-Boot by pressing the specified key which allows you to control the U-Boot at run time.
To get fewer debug messages from the Linux Kernel one can use the “quiet” Kernel parameter.
# setenv tdxargs ‘${tdxargs} quiet’
# saveenv
Disable the console from the kernel completely by setting the console= option on the kernel command line. This can be achieved by doing it from the U-Boot prompt or using U-Boot-envtools under Linux to modify the env variables:
# setenv tdxargs ‘console=null’
# saveenv
or using U-Boot-envtools under Linux:
# fw_setenv tdxargs ‘console=null’
# reboot
After this, no kernel messages/serial login are available on debug serial port anymore. To re-enable the debug serial port console one needs to reset the ‘console’ variable back to the respective serial TTY (e.g: ttyLP0 on Colibri VFxx).
# setenv tdxargs ‘console=ttyLP0’
# saveenv
or using U-Boot-envtools under Linux:
# fw_setenv tdxargs ‘console=ttyLP0’
# reboot
While during boot the serial baudrate is taken from the U-Boot environment variable baudrate , the later login shell baudrate needs to be configured separately if required in respective /etc/systemd/system/getty.target.wants/serial-getty@
.service file: Newer BSPs always start an explicit serial getty on UART_A which can be disabled as follows:
# systemctl disable [email protected]
Starting from Bsp 3.0 (Kernel 4.14), serial getty cannot be disabled anymore. You need to mask it as follows:
# systemctl mask [email protected]
An interesting blog post from Mr. Poettering about the thematic can be found here.
Debian Wiki
General Information
U-boot is a bootloader for embedded boards. Most boards supported in the Debian packages of u-boot are ARM based.
Support in Debian
Since each u-boot target is fairly board-specific, often supporting only a single board, the u-boot maintainers require someone from the Debian community to be listed as a tester for each of the boards included in the Debian package. The list of boards included in the Debian packages are in the debian/targets file:
Ideally each board gets tested every upload to the Debian archive, or at the very least once for each upstream version.
The current status page lists the last known working version for a variety of boards.
You can subscribe to get notifications by subscribing on the package tracker page.
Support for boards enabled in the Debian u-boot packages should be in mainline u-boot, although backporting patches from newer versions of u-boot is a reasonable option:
If you’d like to get a support for a new board into Debian’s u-boot, please get it in mainline u-boot and file a wishlist bug against u-boot:
Please also use the Debian bug tracking system for submitting other fixes to the Debian u-boot packages.
To test u-boot packages from debian, install the u-boot or appropriate u-boot-VARIANT package for your board. There may be instructions for installing u-boot in the corresponding /usr/share/doc/u-boot*/README.Debian* files. Typically, it involves using the “dd” command to write a u-boot image directly a raw SD card, or possibly flashing to NAND or other media.
Troubleshooting, debugging
Using a serial console
For debugging u-boot, a serial console is usually required. Accessing the serial console varies greatly by board; it often requires connecting a USB-TTL adapter to the ground, rx and tx pins on the board, but may instead use a 9-pin serial port with a null-modem cable.
There are several console terminal programs in Debian that can attach to a serial connection, for example GNU Screen.
For a serial port you would use something like (please adapt to your serial adapter name in /dev ):
screen /dev/ttyS0 115200
And for an USB-TTL adapter:
screen /dev/ttyUSB0 115200
When booting u-boot from serial console, you should see output like the following:
U-Boot SPL 2014.10+dfsg1-5~20150407~1 (Apr 07 2015 – 18:39:36) DRAM: 1024 MiB CPU: 1008000000Hz, AXI/AHB/APB: 3/2/2 U-Boot 2014.10+dfsg1-5~20150407~1 (Apr 07 2015 – 18:39:36) Allwinner Technology CPU: Allwinner A10 (SUN4I) I2C: ready DRAM: 1 GiB MMC: SUNXI SD/MMC: 0 *** Warning – bad CRC, using default environment In: serial Out: serial Err: serial SCSI: SUNXI SCSI INIT SATA link 0 timeout. AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode flags: ncq stag pm led clo only pmp pio slum part ccc apst Net: emac Hit any key to stop autoboot: 0 switch to partitions #0, OK mmc0 is current device Scanning mmc 0… Found U-Boot script /boot/boot.scr 2163 bytes read in 303 ms (6.8 KiB/s) ## Executing script at 43100000 Mainline u-boot / new-style environment detected. 3181344 bytes read in 445 ms (6.8 MiB/s) 17835 bytes read in 334 ms (51.8 KiB/s) 12598748 bytes read in 1137 ms (10.6 MiB/s) Booting Debian 3.16.0-4-armmp from mmc 0:1… Kernel image @ 0x42000000 [ 0x000000 – 0x308b20 ] ## Flattened Device Tree blob at 43000000 Booting using the fdt blob at 0x43000000 Loading Ramdisk to 4f3fc000, end 4ffffddc … OK Loading Device Tree to 4f3f4000, end 4f3fb5aa … OK Starting kernel …
This should show you the version of u-boot being loaded.
U-boot prompt, custom kernel arguments
Additional kernel arguments can be given from u-boot before booting into the system by stopping normal boot and dropping to the u-boot prompt.
When started and before booting into the OS u-boot will show a 3 seconds countdown:
Hit any key to stop autoboot: 2
Hit any key from the serial console to interrupt boot to drop to the u-boot prompt: ” => ”
From there you can add custom kernel arguments by adding aguments to the bootargs variable. For example to bypass the installed init system and drop to a root shell you may use:
=> setenv bootargs ${bootargs} init=/bin/bash => boot
or boot an older kernel which is still installed by setting fk_kvers e.g.
=> setenv fk_kvers 4.19.0-18-armmp
More information about available commands can be obtained from the help command.
Checking the environment
You’ll also want to test with the default u-boot environment variables, otherwise bugs in the default environment may go unnoticed. If you see:
*** Warning – bad CRC, using default environment
This should be using the default environment variables. If you’re unsure, you can run env default -a to reset the running environment, followed by boot .
Logging Commands used for Booting
Sometimes it is useful to log the commands and kernel, initrd.img, and DTB addresses which boot a newly installed system to debug the boot system a similar system. A typical usecase is that u-boot breaks for a release/kernel. Installing on a different media a new Debian system might help to get the upgraded system booting again.
Adding the two echos in /etc/flash-kernel/bootscript/bootscr.uboot-generic should reveal the standard u-boot boot commands
rd@bc-text:~$ cat /etc/flash-kernel/bootscript/bootscr.uboot-generic […] for pathprefix in ${fk_image_locations} do if test -e ${devtype} ${devnum}:${partition} ${pathprefix}vmlinuz-${fk_kvers} then echo bootargs: ${bootargs} echo “load ${devtype} ${devnum}:${partition} ${kernel_addr_r} ${pathprefix}vmlinuz-${fk_kvers} \ && load ${devtype} ${devnum}:${partition} ${fdt_addr_r} ${pathprefix}${fdtpath} \ && load ${devtype} ${devnum}:${partition} ${ramdisk_addr_r} ${pathprefix}initrd.img-${fk_kvers} \ && echo Booting Debian ${fk_kvers} from ${devtype} ${devnum}:${partition}… \ && bootz ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r}” load ${devtype} ${devnum}:${partition} ${kernel_addr_r} ${pathprefix}vmlinuz-${fk_kvers} \ && load ${devtype} ${devnum}:${partition} ${fdt_addr_r} ${pathprefix}${fdtpath} \ && load ${devtype} ${devnum}:${partition} ${ramdisk_addr_r} ${pathprefix}initrd.img-${fk_kvers} \ && echo “Booting Debian ${fk_kvers} from ${devtype} ${devnum}:${partition}…” \ && bootz ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r} fi done for pathprefix in ${fk_image_locations} do if test -e ${devtype} ${devnum}:${partition} ${pathprefix}vmlinuz then load ${devtype} ${devnum}:${partition} ${kernel_addr_r} ${pathprefix}vmlinuz \ && load ${devtype} ${devnum}:${partition} ${fdt_addr_r} ${pathprefix}dtb \ && load ${devtype} ${devnum}:${partition} ${ramdisk_addr_r} ${pathprefix}initrd.img \ && echo “Booting Debian from ${devtype} ${devnum}:${partition}…” \ && bootz ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r} fi done rd@bc-text:~$
Recreate /boot/boot.scr
root@bc-text:~# flash-kernel Using DTB: imx6q-cubox-i.dtb Installing /usr/lib/linux-image-5.10.0-10-armmp/imx6q-cubox-i.dtb into /boot/dtbs/5.10.0-10-armmp/./imx6q-cubox-i.dtb Taking backup of imx6q-cubox-i.dtb. Installing new imx6q-cubox-i.dtb. flash-kernel: installing version 5.10.0-10-armmp Generating boot script u-boot image… done. Taking backup of boot.scr. Installing new boot.scr. root@bc-text:~#
Reboot the system and monitor the u-boot output on a serial console
Hit any key to stop autoboot: 0 switch to partitions #0, OK mmc1 is current device Scanning mmc 1:2… Found U-Boot script /boot.scr 4095 bytes read in 2 ms (2 MiB/s) ## Executing script at 12000000 bootargs: console=ttymxc0,115200 load mmc 1:2 0x12000000 /vmlinuz-5.10.0-10-armmp && load mmc 1:2 0x18000000 /dtbs/5.10.0-10-armmp/imx6q-cubox-i.dtb && load mmc 1:2 0x13000000 /initrd.img-5.10.0-10-armmp && echo Booting Debian 5.10.0-10-armmp from mmc 1:2… && bootz 0x12000000 0x13000000:fff 0x18000000 4960768 bytes read in 244 ms (19.4 MiB/s)
The system should boot with purely running
=> setenv bootargs console=ttymxc0,115200 => load mmc 1:2 0x12000000 /vmlinuz-5.10.0-10-armmp && load mmc 1:2 0x18000000 /dtbs/5.10.0-10-armmp/imx6q-cubox-i.dtb && load mmc 1:2 0x13000000 /initrd.img-5.10.0-10-armmp && echo Booting Debian 5.10.0-10-armmp from mmc 1:2… && bootz 0x12000000 0x13000000:fff 0x18000000
in the u-boot shell. The same two commands should also boot the failing system.
Note: Determining the root file system might be required. A recipe for determining the root filesystem is given in for Cubox-i and should apply for similar systems.
u-boot/README.console at master · ARM-software/u-boot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Kernel no serial console output if started through U-Boot
How does U-Boot change how the kernel is communicating through UART?
I’m trying to add U-Boot to our project. We build a custom Linux 64 bit kernel with initRAM linked into the kernel.
I have access to the U-Boot shell but when I’m trying to boot the uncompressed Image
mmc dev 0 fatload mmc 0:1 ${kernel_addr_r} Image fatload mmc 0:1 ${fdt_addr} bcm2710-rpi-cm3.dtb setenv bootargs console=serial0,115200 console=tty1 booti ${kernel_addr_r} – ${fdt_addr}
I get no kernel output after Starting kernel …
What confuses me is that if I start the kernel directly through config.txt I do get the expected behavior.
The kernel command line is in both cases console=serial0,115200 console=tty1 Set either by cmdline.txt or through boot.scr .
Is U-Boot changing somehow the routing of the UART’s? Why would the kernel have different behavior solely by starting it through U-Boot? Shouldn’t U-Boot be completely out of the picture after the kernel is started, thus have no impact on the kernel output?
Using a serial console for u-boot and Linux kernel debugging
Using a serial console for u-boot and Linux kernel debugging
Note that using a serial console for u-boot and Linux kernel debugging is applicable to just about any SBC, and is the only method really available without using expensive hardware to debug the u-boot bootloader.
Basically if you need to know what’s happening during the SBC boot-up, or if your SBC is not displaying the kernel messages on a video screen for whatever reason, you need a serial console. What follows are generic instructions on how to setup and use a serial console on any SBC.
Hardware required
The only piece of hardware required is an inexpensive PL2303 USB-to-serial converter cable. These are available from a number of sellers for as little as $1.20 a piece, so a suggestion is to buy two or three, as the extra ones may come in handy later.
Note the wires are color coded, usually:
Black: GND
White: RX
Green: TX
Red: +5V@ Max. 500mA (WARNING: DO NOT CONNECT THE RED WIRE)
Connecting
Only the GND, RX and TX wires should be connected. DO NOT CONNECT THE +5V (RED WIRE).
Find the UART header on your SBC. Connect the GND wire first, then connect the RX on the cable to the TX on the SBC, and the TX on the cable to the RX on the SBC. Voilà!
Connect the USB end of the cable to any USB port on your workstation/laptop/PC.
Using the serial console
You’ll need a console program that connects to the serial interface. For example, if you are using Linux on your workstation/laptop/PC, the simplest program to use is GNU screen.
# sudo screen /dev/ttyUSB0 115200
If you are using screen and want to dump the entire scrollback buffer to a file (for example, if you have rebooted your SBC and captured the u-boot and Linux kernel messages during boot), check here.
Examples of u-boot and Linux kernel boot messages
Following the instructions above, I connected an Amlogic S905 Android TV Box running Armbian Linux to my Thinkpad T420 laptop, and dumped the u-boot and Linux kernel messages during boot-up.
This file is a dump of all the u-boot and Linux kernel messages from power-on to a Linux prompt. In this file I pressed the space bar after power-on to get to the interactive u-boot mode and typed a few commands.
References
How to Change the serial console
Targeted Hardware phyBOARD-Zeta (i.MX7) Targeted Software BSP Yocto FSL iMX7 PD18.1.1 Date
Summary
The serial console is essential for communication with and development of your design. This how-to guide will demonstrate the steps required to change the default serial debug console configuration.
Specifically, the phyBOARD-Zeta uses UART5 as the default serial console. This requires a breakout cable assembly to expose the RS-232 pins that are available on a pin header on the Zeta board, a null modem cable, and finally a serial cable to the host. The PEB-EVAL-02 board exposes UART1 via RS-232 on a DB9 connector. This will be the target configuration that the how-to guide will demonstrate.
Step-by-step guide
u-boot
To change the serial console for u-boot, you’ll need to modify the CONFIG_CONS_INDEX and CONFIG_MXC_UART_BASE definitions in the u-boot source.
Change CONFIG_CONS_INDEX to indicate the index of the UART that is desired. In this case, we will change it from 5 to 1:
Configured for UART5 /* allow to overwrite serial and ethaddr */ #define CONFIG_ENV_OVERWRITE #undef CONFIG_CONS_INDEX #define CONFIG_CONS_INDEX 5 #define CONFIG_BAUDRATE 115200 CODE
Configured for UART1 /* allow to overwrite serial and ethaddr */ #define CONFIG_ENV_OVERWRITE #undef CONFIG_CONS_INDEX #define CONFIG_CONS_INDEX 1 #define CONFIG_BAUDRATE 115200 CODE
Change CONFIG_MXC_UART_BASE to indicate the UART base address of the UART that is desired. In this case, we will change it from 5 to 1:
Configured for UART5 #define CONFIG_MXC_UART_BASE UART5_IPS_BASE_ADDR CODE
Configured for UART1 #define CONFIG_MXC_UART_BASE UART1_IPS_BASE_ADDR CODE
Verify the desired UART pins are muxed correctly in u-boot:
&uart1 { pinctrl-names = “default”; pinctrl-0 = <&pinctrl_uart1>; assigned-clocks = <&clks IMX7D_UART1_ROOT_SRC>; assigned-clock-parents = <&clks IMX7D_PLL_SYS_MAIN_240M_CLK>; status = “okay”; }; CODE
Linux
Change the SERIAL_CONSOLE to indicate the desired ‘ttymxc’ device in the imx7d_phyboard_zeta_001 machine configuration. In this case, we will change it from a 4 to a 0:
In Linux the devices are zero indexed. For example, UART1 corresponds to ttymxc0 and UART5 corresponds to ttymxc4.
Configured for UART5 SERIAL_CONSOLE = “115200 ttymxc4” CODE
Configured for UART1 SERIAL_CONSOLE = “115200 ttymxc0” CODE
You’ll also want to verify the desired UART pins are muxed in your device tree:
&uart1 { pinctrl-names = “default”; pinctrl-0 = <&pinctrl_uart1>; assigned-clocks = <&clks IMX7D_UART1_ROOT_SRC>; assigned-clock-parents = <&clks IMX7D_PLL_SYS_MAIN_240M_CLK>; status = “okay”; }; CODE
Related articles
Loading Linux Images over UART
This article explains how to load images to the target over UART in U-Boot. Keep in mind that loading via a serial port will take quite a long time (minutes per file!) due to the low speeds (limited to 115.2 Kps). That said, for embedded designs that do not provide an Ethernet port it may be the only reasonable development and software manufacturing option using U-Boot and uClinux.
Using the NXP i.MX RT1050 EVK board, you connect to the target serial console on LPUART1 available on the J30 and J31(refer to Connecting Serial Console to the NXP i.MX RT1050 EVK for details. Assuming you connect to a Linux PC host, on the Linux host the i.MX RT1050 serial console will be visible as a /dev/ttyUSBx device. The U-Boot and Linux software configures the console for 115.2 Kps operation.
There are various serial communication tools available for Linux, the most popular perhaps being kermit. kermit is a very powerful tool that can be run in interactive mode or controlled by a script. There is abundant documentation on kermit available in the Internet, if you require details.
The download procedure is based on the loadb command provided by the U-Boot command interface. loadb implements a download capability over UART using the kermit protocol and has the following synopsis:
loadb [
] If you do not specify a load address, then the value will be taken from the loadaddr environment variable. On the NXP i.MX RT1050 EVK loadaddr is set as follows, placing the download buffer into SDRAM:
=> print loadaddr
loadaddr=0x80007fc0
If you do not specify a baud rate, then the speed the console is currently running at will be used (set to a default value of 115200 on the NXP i.MX RT1050 EVK).
Once the transmission using loadb finishes, the file will be in memory at the specified load address. The loadaddr environment variable will automatically be set to the address the loadb command used. The filesize environment variable will automatically be set to the number of bytes transferred during the load operation.
Then you are free to do whatever you like with the loaded image. You can boot Linux from the image (assuming it is a Linux uImage file), copy it to some other place (for instance, on-module Flash), display the memory, etc.
To automate the download procedure, you might want to put a desired sequence of interactive steps involving interactions with the U-Boot command interface on the target and kermit on the host into a shell script. For instance, here is a sample script to download a Linux bootable image (rootfs.uImage) to SDRAM and boot Linux from it:
$ vi uartboot-imxrt1050.script
#!/usr/local/bin/kermit
set port /dev/ttyUSB0
set speed 115200
set carrier-watch off
set flow-control none
set prefixing all
echo {loading uImage}
PAUSE 1
OUTPUT loadb ${loadaddr} 115200\{13}
send rootfs.uImage
INPUT 180 {\{13}\{10}=> }
IF FAIL STOP 1 INPUT timeout
echo {running kernel}
PAUSE 1
OUTPUT run addip; bootm\{13}
c
Copy the sample Linux image (rootfs.uImage) from the Emcraft software distribution to the host directory you will be running the shell script from.
Then run the script to download the image to the target via UART and boot Linux from it:
$ chmod a+x uartboot-imxrt1050.script $ ./uartboot-imxrt1050.script C-Kermit 9.0.302 OPEN SOURCE:, 20 Aug 2011, ubuntu [192.168.1.102] Current Directory: /mnt/work/imx Communication Device: /dev/ttyUSB0 Communication Speed: 115200 Parity: none RTT/Timeout: 01 / 03 SENDING: rootfs.uImage => ROOTFS.UIMAGE File Type: BINARY File Size: 7749634 Percent Done: 3 /- …10…20…30…40…50…60…70…80…90..100 Estimated Time Left: 00:14:41 Transfer Rate, CPS: 8495 Window Slots: 1 of 1 Packet Type: D Packet Count: 44 Packet Length: 9024 Error Count: 0 Last Error: Last Message: X to cancel file, Z to cancel group,
to resend last packet, E to send Error packet, ^C to quit immediately, ^L to refresh screen. It will take 15+ long minutes to download the image at 115.2Kps but finally it will get to the target and Linux will boot from it:
Serial system — Das U-Boot unknown version documentation
Serial system¶
void serial_null ( void ) ¶
Void registration routine of a serial driver
Parameters
void no arguments
Description
This routine implements a void registration routine of a serial driver. The registration routine of a particular driver is aliased to this empty function in case the driver is not compiled into U-Boot.
int on_baudrate ( const char *name, const char *value, enum env_op op, int flags ) ¶
Update the actual baudrate when the env var changes
Parameters
const char *name changed environment variable const char *value new value of the environment variable enum env_op op operation (create, overwrite, or delete) int flags attributes of environment variable change, see flags H_* in include/search.h
Description
This will check for a valid baudrate and only apply it if valid.
Return
0 on success, 1 on error
serial_initfunc (name)
Forward declare of driver registration routine
Parameters
name Name of the real driver registration routine.
Description
This macro expands onto forward declaration of a driver registration routine, which is then used below in serial_initialize() function. The declaration is made weak and aliases to serial_null() so in case the driver is not compiled in, the function is still declared and can be used, but aliases to serial_null() and thus is optimized away.
void serial_register ( struct serial_device *dev ) ¶
Register serial driver with serial driver core
Parameters
struct serial_device *dev Pointer to the serial driver structure
Description
This function registers the serial driver supplied via dev with serial driver core, thus making U-Boot aware of it and making it available for U-Boot to use. On platforms that still require manual relocation of constant variables, relocation of the supplied structure is performed.
int serial_initialize ( void ) ¶
Register all compiled-in serial port drivers
Parameters
void no arguments
Description
This function registers all serial port drivers that are compiled into the U-Boot binary with the serial core, thus making them available to U-Boot to use. Lastly, this function assigns a default serial port to the serial core. That serial port is then used as a default output.
void serial_stdio_init ( void ) ¶
Register serial ports with STDIO core
Parameters
void no arguments
Description
This function generates a proxy driver for each serial port driver. These proxy drivers then register with the STDIO core, making the serial drivers available as STDIO devices.
int serial_assign ( const char *name ) ¶
Select the serial output device by name
Parameters
const char *name Name of the serial driver to be used as default output
Description
This function configures the serial output multiplexing by selecting which serial device will be used as default. In case the STDIO “serial” device is selected as stdin/stdout/stderr, the serial device previously configured by this function will be used for the particular operation.
Returns 0 on success, negative on error.
void serial_reinit_all ( void ) ¶
Reinitialize all compiled-in serial ports
Parameters
void no arguments
Description
This function reinitializes all serial ports that are compiled into U-Boot by calling their serial_start() functions.
struct serial_device * get_current ( void ) ¶
Return pointer to currently selected serial port
Parameters
void no arguments
Description
This function returns a pointer to currently selected serial port. The currently selected serial port is altered by serial_assign() function.
In case this function is called before relocation or before any serial port is configured, this function calls default_serial_console() to determine the serial port. Otherwise, the configured serial port is returned.
Returns pointer to the currently selected serial port on success, NULL on error.
int serial_init ( void ) ¶
Initialize currently selected serial port
Parameters
void no arguments
Description
This function initializes the currently selected serial port. This usually involves setting up the registers of that particular port, enabling clock and such. This function uses the get_current() call to determine which port is selected.
Returns 0 on success, negative on error.
void serial_setbrg ( void ) ¶
Configure baud-rate of currently selected serial port
Parameters
void no arguments
Description
This function configures the baud-rate of the currently selected serial port. The baud-rate is retrieved from global data within the serial port driver. This function uses the get_current() call to determine which port is selected.
Returns 0 on success, negative on error.
int serial_getc ( void ) ¶
Read character from currently selected serial port
Parameters
void no arguments
Description
This function retrieves a character from currently selected serial port. In case there is no character waiting on the serial port, this function will block and wait for the character to appear. This function uses the get_current() call to determine which port is selected.
Returns the character on success, negative on error.
int serial_tstc ( void ) ¶
Test if data is available on currently selected serial port
Parameters
void no arguments
Description
This function tests if one or more characters are available on currently selected serial port. This function never blocks. This function uses the get_current() call to determine which port is selected.
Returns positive if character is available, zero otherwise.
void serial_putc ( const char c ) ¶
Output character via currently selected serial port
Parameters
const char c Single character to be output from the serial port.
Description
This function outputs a character via currently selected serial port. This character is passed to the serial port driver responsible for controlling the hardware. The hardware may still be in process of transmitting another character, therefore this function may block for a short amount of time. This function uses the get_current() call to determine which port is selected.
void serial_puts ( const char *s ) ¶
Output string via currently selected serial port
Parameters
const char *s Zero-terminated string to be output from the serial port.
Description
This function outputs a zero-terminated string via currently selected serial port. This function behaves as an accelerator in case the hardware can queue multiple characters for transfer. The whole string that is to be output is available to the function implementing the hardware manipulation. Transmitting the whole string may take some time, thus this function may block for some amount of time. This function uses the get_current() call to determine which port is selected.
void default_serial_puts ( const char *s ) ¶
Output string by calling serial_putc() in loop
Parameters
const char *s Zero-terminated string to be output from the serial port.
Description
This function outputs a zero-terminated string by calling serial_putc() in a loop. Most drivers do not support queueing more than one byte for transfer, thus this function precisely implements their serial_puts().
To optimize the number of get_current() calls, this function only calls get_current() once and then directly accesses the putc() call of the struct serial_device .
int uart_post_test ( int flags ) ¶
Test the currently selected serial port using POST
Parameters
int flags POST framework flags
Description
Do a loopback test of the currently selected serial port. This function is only useful in the context of the POST testing framwork. The serial port is first configured into loopback mode and then characters are sent through it.
Returns 0 on success, value otherwise.
linux – How to disable serial console(non-kernel) in u-boot – Code Utility
[I am building a Yocto image for Intel Edison. One of the image’s components is u-boot with an Edison-specific patch. By default, Edison’s UART port is used for u-boot console. I want to disable this feature, but only on the serial interface(u-boot also listens on USB and that needs to stay). My main concern is the “Press any key to stop autoboot” feature on the UART port. I need this port to connect an accessory that might send something during the boot process of the main device. How do I approach this problem? Is there an environment variable for this, or do I need to modify the sources? Thanks in advance!
,
I’m getting back to this issue almost a year later, now I’ve managed to find a proper solution. The board I was working on had a reasonably new u-boot in its BSP. To disable the serial console I had to do the following: Add the following defines to the board’s config header(located in include/configs/board.h ): #define CONFIG_DISABLE_CONSOLE #define CONFIG_SILENT_CONSOLE #define CONFIG_SYS_DEVICE_NULLDEV
Check if your board has early_init_f enabled in the same file: #define CONFIG_BOARD_EARLY_INIT_F 1
Find the arch file(Something like arch/x86/cpu/architecture/architecture.c ) and add this call to its early_init_f function. It actually modifies board’s global data variable to have these flags: gd->flags |= (GD_FLG_SILENT | GD_FLG_DISABLE_CONSOLE);
My board did not have one, so I had to add the whole function int board_early_init_f(void) { gd->flags |= (GD_FLG_SILENT | GD_FLG_DISABLE_CONSOLE); return 0; } Example:
If you are looking for board_early_init_f of Orange Pi 4B it is in /build/cache/sources/u-boot/v2020.10/board/rockchip/evb_rk3399/evb-rk3399.c That’s it. Hope this helps someone else! see also
,
Setting the u-boot environment variable bootdelay to -2 disables the ability for the UART to interrupt the boot process on U-Boot 2017.01 release. It appears that -1 is a special case. See common/autoboot.c from your U-Boot source tree for details.
About U-Boot Environment Variables
,
There’s no way to do this, without modifying the source (configuration) of U-Boot. To disable the serial console in U-Boot, you need to reconfigure U-Boot. The documentation from the master branch of U-Boot: Readme.silent According to that one, you need to set: CONFIG_SILENT_CONSOLE CONFIG_SILENT_CONSOLE_UPDATE_ON_SET CONFIG_SYS_DEVICE_NULLDEV CONFIG_SILENT_U_BOOT_ONLY is also needed if you want only U-Boot to be silent. You might also need to test with CONFIG_SILENT_CONSOLE_UPDATE_ON_RELOC and possibly adding silent 1 to CONFIG_EXTRA_ENV_SETTINGS . == UPDATE == See the following options for a possible workaround: CONFIG_ZERO_BOOTDELAY_CHECK CONFIG_AUTOBOOT_KEYED CONFIG_AUTOBOOT_KEYED_CTRLC CONFIG_AUTOBOOT_PROMPT CONFIG_AUTOBOOT_DELAY_STR CONFIG_AUTOBOOT_STOP_STR These options will at least give you a way of requiring a magic string to stop the boot. It might be enough to help you. See README.autoboot
,
As told by Kyle you can set the bootdelay u-boot environment variable to -2.
This can even be done from a booted system using the fw_setenv utility.
On my mender raspberry pi image this utility was preinstalled. Using sudo fw_printenv bootdelay showed it was set to 2, i set it to -2 with sudo fw_setenv bootdelay — -2 (note the — before the value, so -2 is interpreted as the value, not an option). In my case it was a similar issue than the OP, with a LoraWAN node on a raspberry pi connected over the serial port that interrupted the boot. So remove the serial device causing issue
set bootdelay either from the booted system or from the bootloader
shutdown and add the serial device back
,
Here is the video where it is explained step by step how to prevent U-boot console from interrupting autoboot and sending debug messages on UART on Raspberry Pi – it should work similarly for other boards, provided they use U-boot. You will however need to find the right config files for your board in u-boot source folder. I know links only answers are frowned upon, so here’ s a quick breakdown of a solution: Install the dependencies sudo apt install git make gcc gcc-aarch64-linux-gnu bison flex Git clone the official u-boot repository. Alternatively you can git clone my fork of repository, where I already have the necessary changes for silent autoboot – but if you need the latest version, then you need to clone the official repository and make changes yourself. git clone –depth 1 git://git.denx.de/u-boot.git cd u-boot Find your board config files – they depend on the model, e.g. rpi_3_defconfig for Raspberry Pi 3, rpi_4_defconfig for Raspberry Pi 4 and so on. Add the following lines to the end of the file CONFIG_BOOTDELAY=-2 CONFIG_SILENT_CONSOLE=y CONFIG_SYS_DEVICE_NULLDEV=y CONFIG_SILENT_CONSOLE_UPDATE_ON_SET=y CONFIG_SILENT_U_BOOT_ONLY=y The first line removes the boot delay, so autoboot will not be interrupted by messages sent on UART interface. Next four lines enable silent boot, so U-boot will not send any messages on UART itself, because the messages might in turn confuse your device. One more little thing left, set silent boot environmental variable. Change the header file for your board (for raspberry pi it is include/configs/rpi.h ) by adding the following: #define CONFIG_EXTRA_ENV_SETTINGS \ “dhcpuboot=usb start; dhcp u-boot.uimg; bootm\0” \ “silent=1\0” \ ENV_DEVICE_SETTINGS \ ENV_DFU_SETTINGS \ ENV_MEM_LAYOUT_SETTINGS \ BOOTENV Now configure with make rpi_3_defconfig from repository main folder And build with make CROSS_COMPILE=aarch64-linux-gnu- When the build process finishes you will have a u-boot.bin file, which you need to rename (uboot_rpi_3.bin for Raspberry Pi 3) and copy to Raspberry Pi SD card at /boot/firmware/. Now you Raspberry Pi will not be disturbed by any messages on UART during boot. The UART functionality after boot will not be affected. Relevant docs: https://gitlab.denx.de/u-boot/u-boot/blob/HEAD/doc/README.autoboot https://gitlab.denx.de/u-boot/u-boot/blob/HEAD/doc/README.silent https://wiki.ubuntu.com/ARM/RaspberryPi
]
키워드에 대한 정보 u boot serial console
다음은 Bing에서 u boot serial console 주제에 대한 검색 결과입니다. 필요한 경우 더 읽을 수 있습니다.
이 기사는 인터넷의 다양한 출처에서 편집되었습니다. 이 기사가 유용했기를 바랍니다. 이 기사가 유용하다고 생각되면 공유하십시오. 매우 감사합니다!
사람들이 주제에 대해 자주 검색하는 키워드 Tutorial: Introduction to the Embedded Boot Loader U-boot – Behan Webster, Converse in Code
- 101 Essentials – Embedded
Tutorial: #Introduction #to #the #Embedded #Boot #Loader #U-boot #- #Behan #Webster, #Converse #in #Code
YouTube에서 u boot serial console 주제의 다른 동영상 보기
주제에 대한 기사를 시청해 주셔서 감사합니다 Tutorial: Introduction to the Embedded Boot Loader U-boot – Behan Webster, Converse in Code | u boot serial console, 이 기사가 유용하다고 생각되면 공유하십시오, 매우 감사합니다.