Yocto Customizing U-Boot AM62: Difference between revisions
(Created page with "<!-- Set release according to "release" parameter in URL and use am62-yocto-dunfell-5.10.168_08.06.00.42-v1.0 as default --> {{INIT_RELEASE_PARAM|am62-yocto-kirkstone-6.1.46_09.01.00.08-v1.0}}<!-- --> {{#lst:Yocto_Platform_Customization|{{#var:RELEASE_PARAM}}}} <!-- --> {{#vardefine:WORKDIR|~/{{#var:MACHINE_NAME}}-u-boot}} <!-- --> {{#vardefine:WORKDIR_ENV|$WORKDIR}} <!-- --> {{PageHeader|Yocto Build U-Boot from source code}} {{DocImage|category1=Yocto|category2={{#var:H...") |
|||
Line 52: | Line 52: | ||
# Build only the U-Boot images: | # Build only the U-Boot images: | ||
$ | $ MACHINE=am62x-var-som bitbake -c deploy u-boot-variscite | ||
$ | $ MACHINE=am62x-var-som bitbake -c deploy mc:k3r5:u-boot-variscite | ||
# Optionally, you may skip building U-Boot and just build your image: | # Optionally, you may skip building U-Boot and just build your image: | ||
$ | $ MACHINE=am62x-var-som bitbake <image name> | ||
The relevant output files are: | The relevant output files are: |
Revision as of 20:27, 4 June 2024
This page is using the default release am62-yocto-kirkstone-6.1.46_09.01.00.08-v1.0.
To view this page for a specific Variscite SoM and software release, please follow these steps:
- Visit variwiki.com
- Select your SoM
- Select the software release
Introduction
This guide demonstrates how to patch and rebuild the VAR-SOM-AM62 U-Boot images using Yocto.
To learn how to build the U-Boot images outside of Yocto, see: Build U-Boot from source code
Before Starting
Before starting this guide, you must have the Yocto environment setup and be able to build images for the VAR-SOM-AM62.
Please see: Build Yocto from source code.
The remainder of the guide assumes the Yocto working directory is ~/var-ti-yocto
Patching Yocto
Fetch the U-Boot source:
$ cd $WORKDIR $ git clone https://github.com/varigit/ti-u-boot -b ti-u-boot-2023.04_var01 ti-u-boot
Checkout the version of U-Boot that is aligned with SRCREV in ~/var-ti-yocto/tisdk/sources/meta-variscite-bsp-ti/recipes-bsp/u-boot/u-boot-variscite_<u-boot version>.bb
For example, if:
SRCREV = "fbbe3117f5daa78d6df922b4f2d33154de1495b1"
Then run:
$ cd ti-u-boot $ git checkout fbbe3117f5daa78d6df922b4f2d33154de1495b1
Next, make the desired changes to the U-Boot source code. After changing the source code, create a diff file:
$ git diff > ~/var-ti-yocto/tisdk/sources/meta-variscite-bsp-ti/recipes-bsp/u-boot/u-boot-variscite/uboot.diff
Finally, configure ~/var-ti-yocto/tisdk/sources/meta-variscite-bsp-ti/recipes-bsp/u-boot/u-boot-variscite_<u-boot version>.bb to apply the patch by appending:
SRC_URI += "file://uboot.diff"
Building U-Boot using Yocto
Build the U-Boot images by running:
$ cd ~/var-ti-yocto/tisdk/build $ . conf/setenv # Build only the U-Boot images: $ MACHINE=am62x-var-som bitbake -c deploy u-boot-variscite $ MACHINE=am62x-var-som bitbake -c deploy mc:k3r5:u-boot-variscite # Optionally, you may skip building U-Boot and just build your image: $ MACHINE=am62x-var-som bitbake <image name>
The relevant output files are:
deploy-ti/images/am62x-var-som/u-boot.img deploy-ti/images/am62x-var-som/tispl.bin deploy-ti/images/am62x-var-som/tiboot3.bin
see: Build U-Boot from source code to learn how to update a running board with these images.