Forums › Reference, Evaluation, and Development Boards › OSD32MP1-RED › How to change or add board name in OSD32MP1 Debian SDK
Tagged: OSD32MP1-RED
The board name defiend in OSD32MP1 Debian SDK is “osd32mp1-red”.
I want to create a new board type (e.g. osd32mp1-xyz) in OSD32MP1 Debian SDK by cloning the osd32mp1-red board device tree (kernel and bootloader) and build files. Later I will modify the devcietree for the new board, but want to make sure it works on OSD32MP1-RED board before any change.
To test this …
I’ve modified the board name to “osd32mp1-xyz” vendor to “xyzTech” in the following files:
../build-tools/Makefile
../build-tools/files/ssbl/boot.scr.cmd
../build-tools/osd32mp1-red-extlinux.sh => osd32mp1-xyz-extlinux.sh
I’ve included the “osd32mp1-red.dts” files generated by patchs into the kernel and bootloader directories and rename them as osd32mp1-xyz.dts
../kernel/linux-4.19.94/arch/arm/boot/dts/osd32mp1-xyz.dts
../bootloader/u-boot-2018.11/arch/arm/dts/osd32mp1-xyz.dts
../bootloader/arm-trusted-firmware-2.0/fdts/osd32mp1-xyz.dts
The image build process is successfull and generated all the dts and binaries for new board in /deploy/ directory.
But failed to flash the eMMC using STM32CubeProgrammer and also did not boot from MicroSD card.
It looks OSD32MP1-RED board failed to start u-boot binary after download.
Any help is much appreciated.
Thank you.
Here are the logs …
farid@u2004dt:~/workspace-osd32mp1/deploy$ STM32_Programmer_CLI -c port=USB1 -log /home/farid/work/emmc_flash.log -vb 1 -w FlashLayout_emmc_osd32mp1-xyz-trusted.tsv
——————————————————————-
STM32CubeProgrammer v2.8.0
——————————————————————-
Log output file: /home/farid/work/emmc_flash.log
USB speed : High Speed (480MBit/s)
Manuf. ID : STMicroelectronics
Product ID : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000
SN : 001800273239511637383434
FW version : 0x0110
Device ID : 0x0500
Device name : STM32MP1
Device type : MPU
Device CPU : Cortex-A7
Start Embedded Flashing service
Memory Programming …
Opening and parsing file: tf-a-osd32mp1-xyz.stm32
File : tf-a-osd32mp1-xyz.stm32
Size : 245360 Bytes
Partition ID : 0x01
Download in Progress:
[==================================================] 100%
File download complete
Time elapsed during download operation: 00:00:00.537
RUNNING Program …
PartID: :0x01
Start operation done successfully at partition 0x01
Flashlayout Programming …
[==================================================] 100%
Running Flashlayout Partition …
Flashlayout partition started successfully
Memory Programming …
Opening and parsing file: u-boot-osd32mp1-xyz-trusted.stm32
File : u-boot-osd32mp1-xyz-trusted.stm32
Size : 804463 Bytes
Partition ID : 0x03
Download in Progress:
[==================================================] 100%
File download complete
Time elapsed during download operation: 00:00:00.866
RUNNING Program …
PartID: :0x03
Reconnecting the device …
Error:
Unable to reconnect the target device: time out expired
Error: Start operation failed at partition 0x03
Error: TSV flashing service failed
farid@u2004dt:~/workspace-osd32mp1/deploy$
*** DEBUG Console Logs ***
Debug port logs:
ÀûÿÒÛ?A AINOTICE: CPU: STM32MP157C?? Rev.?
NOTICE: Model: xyzTech OSD32MP1-XYZ board
INFO: Reset reason (0x15):
INFO: Power-on Reset (rst_por)
INFO: Using USB
INFO: Instance 2
INFO: Boot used partition fsbl1
WARNING: VDD unknownNOTICE: BL2: v2.0-r1.5(debug):bf394cf1
NOTICE: BL2: Built : 18:38:54, Jan 11 2022
INFO: BL2: Doing platform setup
INFO: PMIC version = 0x21
INFO: RAM: DDR3-DDR3L 16bits 533000Khz
INFO: Memory size = 0x20000000 (512 MB)
INFO: BL2 runs SP_MIN setup
INFO: BL2: Loading image id 4
INFO: Loading image id=4 at address 0x2fff0000
INFO: Image id=4 loaded: 0x2fff0000 – 0x30000000
INFO: BL2: Loading image id 5
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: Receive DFU abort
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: UPLOAD :
INFO: Phase ID : 0
INFO: address 0x2ffee774
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: UPLOAD :
INFO: Phase ID : 0
INFO: address 0x2ffee774
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: Start Download partition 0 to address 0xc0000000 length 0
INFO: USB : DFU : end of download partition : 0
INFO: Loading image id=5 at address 0xc0100000
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: UPLOAD :
INFO: Phase ID : 3
INFO: address 0x2ffee774
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: receive request 6
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: UPLOAD :
INFO: Phase ID : 3
INFO: address 0x2ffee774
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: usb_partition_size: partition size : 0xc456f
INFO: Start Download partition 3 to address 0xc0100000 length 804207
INFO: USB : DFU : end of download partition : 3
WARNING: Skip signature check (header option)
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: UPLOAD :
INFO: Phase ID : 0
INFO: address 0xffffffff
INFO: Send detach request
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: Receive Detach
INFO: Image id=5 loaded: 0xc0100000 – 0xc01c456f
INFO: read version 0 current version 0
NOTICE: BL2: Booting BL32
INFO: Entry point address = 0x2fff0000
INFO: SPSR = 0x1d3
INFO: PMIC version = 0x21
NOTICE: SP_MIN: v2.0-r1.5(debug):bf394cf1
NOTICE: SP_MIN: Built : 18:38:54, Jan 11 2022
INFO: ARM GICv2 driver initialized
INFO: stm32mp HSI (18): Secure only
INFO: stm32mp HSE (20): Secure only
INFO: stm32mp PLL2 (27): Secure only
INFO: stm32mp PLL2_R (30): Secure only
INFO: SP_MIN: Initializing runtime services
INFO: SP_MIN: Preparing exit to normal world
ÀÀv&&
You are on the right track because I have done something similar to successfully rename the board.
Since U-Boot seems to be failing, I suggest first checking in ./deploy/bootfs. Make sure the directory layout and files are correct. In particular, make sure the extlinux.conf file points to the right DTB.
If all seems well, then rebuild the file system by running “make bootfs” in the docker container. This will make sure the *.stm32 file is up-to-date. Then try re-flashing.
Lastly, you should always be able to boot off a good SD card regardless of the state of the eMMC. Sometimes I forget to reset the boot switches after flashing.
Hi Carlos, Thanks for your response.
I verified the deploy/bootfs directory has correct extlinux.conf and dtb files.
I also tried “make bootfs” and “make ssbl” and “make clean” but its not working.
I tried both, bothing from SD card and eMMC and they both appears to be failing to start u-boot after flashing u-boot binary (u-boot-osd32mp1-xyz-trusted.stm32).
I’m able to build and flash successfully the card type “osd32mp1-red” but not the new card type “osd32mp1-xyz”, even though all the code and DTS fiels are identical except name change.
I noticed a difference in file size of u-boot binary of new card vs old card, all other file sizes are same.
Something is making the u-boot binary different then OSD32MP1-RED board and that is failing.
Is there a secure build option for u-boot that I’m missing?
804459 Jan 12 12:40 u-boot-osd32mp1-xyz-trusted.stm32 => This one does not work
807692 Jan 12 14:08 u-boot-osd32mp1-red-trusted.stm32 => This one works OK
Another thing to check for is the file arch/arm/dts/osd32mp1-xyz-u-boot.dtsi. I didn’t see it in your original list of files that you copied but is created by 0001-Add-OSD32MP1-RED-Device-Tree-support.patch. This is the “U-Boot DTSI options” file. The build will succeed even if this file does not exist. Even though it is an “include file”, it is not included anywhere and is build separately (if it exists). See line 165 of scripts/Makefile.lib to see what I mean.
Hi carlos,
Thanks for pointing out the osd32mp1-xyz-u-boot.dtsi file. It didn’t show up in my search for files to be updated. I added this file and u-boot works ok.
New board image build is OK and I can flash and boot from both sdcard and emmc.
Thank you for your help.
Octavo Systems LLC all rights reserved
OCTAVO is registered in the U.S. Patent and Trademark Office. OSD, C-SiP, and the Octavo Logo are trademarks of Octavo Systems LLC.
"*" indicates required fields
"*" indicates required fields
"*" indicates required fields
"*" indicates required fields