Yocto Customizing U-Boot AM62: Difference between revisions
No edit summary |
No edit summary |
||
Line 4: | Line 4: | ||
--> {{#vardefine:WORKDIR|~/{{#var:MACHINE_NAME}}-u-boot}} <!-- | --> {{#vardefine:WORKDIR|~/{{#var:MACHINE_NAME}}-u-boot}} <!-- | ||
--> {{#vardefine:WORKDIR_ENV|$WORKDIR}} <!-- | --> {{#vardefine:WORKDIR_ENV|$WORKDIR}} <!-- | ||
--> {{PageHeader|Yocto Customize from source code}} {{DocImage|category1=Yocto|category2={{#var:HARDWARE_NAME}}}} __toc__ | --> {{PageHeader|{{#var:HARDWARE_NAME}} - Yocto Customize from source code}} {{DocImage|category1=Yocto|category2={{#var:HARDWARE_NAME}}}} __toc__ | ||
= Introduction = | = Introduction = |
Revision as of 15:40, 29 July 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 # tispl.bin and u-boot.img $ MACHINE=am62x-var-som bitbake -c deploy mc:k3r5:u-boot-variscite # tiboot3.bin # 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.