DHCOM STM32MP1 Bootloader U-Boot: Difference between revisions
From Wiki-DB
Jump to navigationJump to search
Ageisreiter (talk | contribs) Created page with "== How to build U-Boot== {| class="wikitable" align="center" | style="width: 98%; background: #f3f3f3;" valign="top" | | Get sources from Github {| class="wikitable" style="w..." |
Ageisreiter (talk | contribs) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 6: | Line 6: | ||
| | | | ||
1. Start the Console on Linux<br/> | 1. Start the Console on Linux<br/> | ||
2. <tt>''git clone https://github.com/dh-electronics/u-boot-stm32mp1.git --branch | 2. <tt>''git clone https://github.com/dh-electronics/u-boot-stm32mp1.git --branch <<branche-name>>''</tt><br/> | ||
3. <tt>''cd u-boot-stm32mp1''</tt> | 3. <tt>''cd u-boot-stm32mp1''</tt> | ||
|} | |} | ||
Line 15: | Line 15: | ||
5. <tt>''ARCH=arm CROSS_COMPILE=/opt/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- make -j`nproc`</tt> | 5. <tt>''ARCH=arm CROSS_COMPILE=/opt/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- make -j`nproc`</tt> | ||
|} | |} | ||
|} | |||
==U-boot console commands== | |||
=== loady - serial load command === | |||
:'''SPI Flash Init''' | |||
:{| class="wikitable" | |||
|''<code>loady [addr [baud]]</code>'' | |||
|} | |||
:Description: | |||
:The loady command is used to transfer a file to the device via the serial line using the YMODEM protocol. | |||
:The number of transferred bytes is saved in environment variable filesize. | |||
:<code>addr</code> = load address, defaults to environment variable loadaddr or if loadaddr is not set to configuration variable CONFIG_SYS_LOAD_ADDR | |||
:<code>baud</code> = baud rate for the ymodem transmission. After the transmission the baud rate is reset to the original value. | |||
:Example: | |||
:In the example below the terminal emulation program picocom was used to transfer a file to the device. | |||
:After entering the loady command the key sequence <CTRL-A><CTRL-S> is used to let picocom prompt for the file name. Picocom invokes the program sz for the file transfer. | |||
:How to start picocom on your PC: <code>picocom --baud 115200 /dev/ttyUSB0</code> | |||
:How to exit picocom on your PC: Entering the key sequence <CTRL-A><CTRL-X> | |||
STM32MP> loady $loadaddr 115200 | |||
## Ready for binary (ymodem) download to 0xC2000000 at 115200 bps... | |||
CC | |||
*** file: Test_3444bytes.bin | |||
$ sz -vv Test_3444bytes.bin | |||
Sending: Test_3444bytes.bin | |||
Bytes Sent: 3456 BPS:467 | |||
Sending: | |||
Ymodem sectors/kbytes sent: 0/ 0k | |||
Transfer complete | |||
*** exit status: 0 | |||
## Total Size = 0x00000d74 = 3444 Bytes | |||
STM32MP> |
Latest revision as of 13:17, 28 November 2022
How to build U-Boot
Get sources from Github
Configure and build the Device Tree + Kernel
|
U-boot console commands
loady - serial load command
- SPI Flash Init
loady [addr [baud]]
- Description:
- The loady command is used to transfer a file to the device via the serial line using the YMODEM protocol.
- The number of transferred bytes is saved in environment variable filesize.
addr
= load address, defaults to environment variable loadaddr or if loadaddr is not set to configuration variable CONFIG_SYS_LOAD_ADDRbaud
= baud rate for the ymodem transmission. After the transmission the baud rate is reset to the original value.
- Example:
- In the example below the terminal emulation program picocom was used to transfer a file to the device.
- After entering the loady command the key sequence <CTRL-A><CTRL-S> is used to let picocom prompt for the file name. Picocom invokes the program sz for the file transfer.
- How to start picocom on your PC:
picocom --baud 115200 /dev/ttyUSB0
- How to exit picocom on your PC: Entering the key sequence <CTRL-A><CTRL-X>
STM32MP> loady $loadaddr 115200 ## Ready for binary (ymodem) download to 0xC2000000 at 115200 bps... CC *** file: Test_3444bytes.bin $ sz -vv Test_3444bytes.bin Sending: Test_3444bytes.bin Bytes Sent: 3456 BPS:467 Sending: Ymodem sectors/kbytes sent: 0/ 0k Transfer complete *** exit status: 0 ## Total Size = 0x00000d74 = 3444 Bytes STM32MP>