cancel
Showing results for 
Search instead for 
Did you mean: 

Modifying the U-boot

hochul yoo
Associate III

Hi ~

I'm using STM32MP157C MPU with my custom board

and trying to modify u-boot for my board.

https://wiki.st.com/stm32mpu/wiki/How_to_cross-compile_with_the_Distribution_Package#Modifying_the_U-Boot

This wiki article has been describe about "Modifying the U-boot".

Adding simple log like the example works fine.

​But, If I try to change u-boot prompt string using "make menuconfig"

it seems like that changed prompt string didn't apply.

How to solve it?

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
MJahe.1
Associate

Hi,

I work with it a few days ago with stm32mp1-openstlinux-5.15-yocto-kirkstone-mp1-v22.11.23 (zip file with kernel, FSBL, u-boot downloaded from ST)

1) Build standard configuration.

# my location of compiler
source /opt/st/OpenSTLinux/openstlinux-5.15-yocto-kirkstone-mp1-v22.11.23/environment-setup-cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi
 
cd u-boot-stm32mp-v2021.10-stm32mp-r2-r0/u-boot-stm32mp-v2021.10-stm32mp-r2
 
export FIP_DEPLOYDIR_ROOT=$PWD/../../FIP_artifacts
 
make -f $PWD/../Makefile.sdk UBOOT_CONFIG=trusted UBOOT_DEFCONFIG=stm32mp15_defconfig UBOOT_BINARY=u-boot.dtb DEVICETREE=stm32mp157c-dk2 all -j12

In directory build/stm32mp15_defconfig is .config file

2) copy it to main boot directory (../../u-boot-stm32mp-v2021.10-stm32mp-r2)

run

make menuconfig

modify configuration, write it.

3) copy .config to ../u-boot-stm32mp-v2021.10-stm32mp-r2/configs as yourconfiguration_defconfig

end of name _defconfig is important!

after that clean system with

make mrproper

and build your configuration with

make -f $PWD/../Makefile.sdk UBOOT_CONFIG=trusted UBOOT_DEFCONFIG=yourconfiguration_defconfig UBOOT_BINARY=u-boot.dtb DEVICETREE=stm32mp157c-dk2 all -j12

Michal Jahelka

View solution in original post

3 REPLIES 3
Kevin HUBER
ST Employee

Hello @hochul yoo​ ,

I apologize for the delay in response.

Have you been able to solve your issue?

In your case, is it mandatory to use the Distribution Package?

Otherwise you can make a try with the Developer Package: https://wiki.st.com/stm32mpu/wiki/STM32MP1_Developer_Package#Installing_the_OpenSTLinux_BSP_packages

and

https://wiki.st.com/stm32mpu/wiki/How_to_cross-compile_with_the_Developer_Package#Modifying_the_U-Boot

Best Regards,

Kevin

In order to give better visibility on the answered topics, please click on 'Select as Best' on the reply which solved your issue or answered your question. See also 'Best Answers'

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
MJahe.1
Associate

Hi,

I work with it a few days ago with stm32mp1-openstlinux-5.15-yocto-kirkstone-mp1-v22.11.23 (zip file with kernel, FSBL, u-boot downloaded from ST)

1) Build standard configuration.

# my location of compiler
source /opt/st/OpenSTLinux/openstlinux-5.15-yocto-kirkstone-mp1-v22.11.23/environment-setup-cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi
 
cd u-boot-stm32mp-v2021.10-stm32mp-r2-r0/u-boot-stm32mp-v2021.10-stm32mp-r2
 
export FIP_DEPLOYDIR_ROOT=$PWD/../../FIP_artifacts
 
make -f $PWD/../Makefile.sdk UBOOT_CONFIG=trusted UBOOT_DEFCONFIG=stm32mp15_defconfig UBOOT_BINARY=u-boot.dtb DEVICETREE=stm32mp157c-dk2 all -j12

In directory build/stm32mp15_defconfig is .config file

2) copy it to main boot directory (../../u-boot-stm32mp-v2021.10-stm32mp-r2)

run

make menuconfig

modify configuration, write it.

3) copy .config to ../u-boot-stm32mp-v2021.10-stm32mp-r2/configs as yourconfiguration_defconfig

end of name _defconfig is important!

after that clean system with

make mrproper

and build your configuration with

make -f $PWD/../Makefile.sdk UBOOT_CONFIG=trusted UBOOT_DEFCONFIG=yourconfiguration_defconfig UBOOT_BINARY=u-boot.dtb DEVICETREE=stm32mp157c-dk2 all -j12

Michal Jahelka

Hi, 

To compelete the previous answer, you can also use savedefconfig to simplify your configuration, menuconfig   generate a very long .config.

$> make menuconfig   
$> make savedefconfig
$> cp defconfig to ../u-boot-stm32mp-v2021.10-stm32mp-r2/configs/<yourconfiguration>_defconfig

U-Boot use the Kconfig to configure its configuration,
But .config is overidde at each make command with Makefile.sdk, by using the content of defconfing directoty  (UBOOT_DEFCONFIG=yourconfiguration_defconfig)

https://wiki.st.com/stm32mpu/wiki/Menuconfig_or_how_to_configure_kernel

https://wiki.st.com/stm32mpu/wiki/U-Boot_overview#Kbuild

https://wiki.st.com/stm32mpu/wiki/How_to_configure_U-Boot_for_your_board#Defconfig

Patrick