Skip to content

Commit e6d9e93

Browse files
kostyakozkokostiantynkozko
authored andcommitted
buildroot: Simplify BeaglePlay boot chain approach
Instead of having Buildroot build the full TI K3 boot chain (ATF, OP-TEE, ti-k3-boot-firmware, binman), which requires complex configuration and TI's downstream U-Boot fork, simplify by: - Providing both tiboot3.bin and tispl.bin as pre-built binaries - Only building u-boot.img through Buildroot - Using BINMAN_ALLOW_MISSING=1 custom make option to let U-Boot build complete without the first-stage firmware blobs This approach is more reliable for students and avoids dependency on TI-specific firmware that may change between releases. The lab explains what each binary does and points to the Embedded Linux course for those who want to build the full chain. Also fixes: trailing dots on commands, tispl.bin_unsigned references, and adds tispl.bin to lab-data.
1 parent 343c776 commit e6d9e93

3 files changed

Lines changed: 33 additions & 59 deletions

File tree

common/beagleplay-sdcard-preparation.tex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ \section{Prepare the SD card}
88
the requirements of the AM62x SoC so that the ROM code can find
99
the bootloader in this partition. It should be a FAT32 partition.
1010
We will store the bootloader files (\code{tiboot3.bin},
11-
\code{tispl.bin} and \code{u-boot.img}), the kernel image
11+
\code{tispl.bin_unsigned} and \code{u-boot.img}), the kernel image
1212
(\code{Image}) and the Device Tree
1313
(\code{k3-am625-beagleplay.dtb}).
1414

@@ -60,10 +60,10 @@ \section{Prepare the SD card}
6060
\end{itemize}
6161

6262
\item Format the first partition as a {\em FAT32} filesystem:\\
63-
\code{sudo mkfs.vfat -F 32 -n boot /dev/mmcblk0p1}.
63+
\code{sudo mkfs.vfat -F 32 -n boot /dev/mmcblk0p1}
6464

6565
\item Format the second partition as an {\em ext4} filesystem:\\
66-
\code{sudo mkfs.ext4 -L rootfs -E nodiscard /dev/mmcblk0p2}.
66+
\code{sudo mkfs.ext4 -L rootfs -E nodiscard /dev/mmcblk0p2}
6767

6868
\begin{itemize}
6969
\item \code{-L} assigns a volume name to the partition
524 KB
Binary file not shown.

labs/buildroot-basic-beagleplay/buildroot-basic-beagleplay.tex

Lines changed: 30 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -192,68 +192,41 @@ \section{Configuring Buildroot}
192192
\code{am62x_beagleplay_a53_defconfig}. So enter
193193
\code{am62x_beagleplay_a53} as the \code{Board defconfig}.
194194
195-
\item U-Boot on AM62x produces two main images for the A53 boot
196-
stage: \code{tispl.bin} (containing the U-Boot SPL and TF-A) and
197-
\code{u-boot.img} (the full U-Boot). Select \code{u-boot.img} as
198-
the \code{U-Boot binary format}, and enable \code{Install U-Boot
199-
SPL binary image} with \code{tispl.bin\_unsigned} as the
200-
\code{U-Boot SPL/TPL binary image name(s)}.
195+
\item Select \code{u-boot.img} as the \code{U-Boot binary format}.
196+
We only need Buildroot to produce \code{u-boot.img} (the second
197+
stage bootloader). The first stage bootloaders are provided
198+
pre-built (see note below).
201199
202-
\end{itemize}
203-
204-
\item Still in the \code{Bootloaders} menu, enable \code{ARM Trusted
205-
Firmware (ATF)}. The U-Boot build for AM62x needs the TF-A BL31
206-
binary. Configure it with:
200+
\item In \code{Custom make options}, enter
201+
\code{BINMAN_ALLOW_MISSING=1}. This allows the U-Boot build to
202+
complete even though we are not building the first-stage boot
203+
images (which require additional firmware blobs).
207204
208-
\begin{itemize}
209-
\item \code{ATF Version}: use the default or a recent version
210-
\item \code{ATF platform}: enter \code{k3}
211-
\item \code{ATF target board}: enter \code{lite}
212-
\end{itemize}
213-
214-
\item Still in the \code{Bootloaders} menu, enable
215-
\code{optee_os}. The AM62x U-Boot expects an OP-TEE binary.
216-
Configure it with:
217-
218-
\begin{itemize}
219-
\item \code{Target platform (mandatory)}: enter \code{k3}
220-
\item \code{Target platform flavor (optional)}: enter \code{am62x}
221-
\end{itemize}
222-
223-
\item Still in the \code{Bootloaders} menu, enable
224-
\code{ti-k3-boot-firmware}. This provides the TI Device Manager
225-
firmware that runs on the Cortex-M4F core.
226-
227-
\item Now go back to the \code{U-Boot} options in the
228-
\code{Bootloaders} menu. You should now see additional options
229-
that appeared after enabling ATF and OP-TEE:
230-
231-
\begin{itemize}
232-
\item Enable \code{U-Boot use binman}. This is required for
233-
AM62x, as U-Boot uses binman to assemble the final boot images.
234-
\item Enable \code{U-Boot needs ATF BL31} and select
235-
\code{bl31.bin} as the \code{U-Boot ATF BL31 format}.
236-
\item Enable \code{U-Boot needs OPTEE TEE} and select
237-
\code{tee.bin} as the format if given a choice.
238205
\end{itemize}
239206
240207
\item {\bf Note:} The AM62x SoC has a complex multi-stage boot
241208
process involving multiple processor cores. Before the Cortex-A53
242209
cores can run U-Boot, a Cortex-R5F core must first initialize the
243210
SoC (configure the DDR memory, load TI Foundational Security
244-
firmware, etc.). This first-stage binary is called
245-
\code{tiboot3.bin} and is a combination of the R5 U-Boot SPL and
246-
TI firmware, packaged together using TI's \code{k3-image-gen}
247-
tool.
248-
249-
Building \code{tiboot3.bin} requires a separate 32-bit ARM
250-
toolchain (\code{arm-none-eabi-}), the TI firmware from
251-
\code{ti-linux-firmware}, and the \code{k3-image-gen} tool. Since
252-
this is outside the scope of Buildroot, we provide a pre-built
253-
\code{tiboot3.bin} in the lab data directory at
211+
firmware, etc.). The first-stage boot chain consists of:
212+
213+
\begin{itemize}
214+
\item \code{tiboot3.bin}: the R5 U-Boot SPL combined with TI
215+
system firmware, which initializes DDR and starts the A53 cores.
216+
\item \code{tispl.bin}: a FIT image containing the A53 U-Boot SPL,
217+
ARM Trusted Firmware (TF-A), OP-TEE, and the TI Device Manager
218+
firmware. This is loaded by \code{tiboot3.bin} and handles the
219+
secure boot chain before loading \code{u-boot.img}.
220+
\end{itemize}
221+
222+
Building these first-stage images requires TI's downstream U-Boot
223+
fork, a separate 32-bit ARM toolchain (\code{arm-none-eabi-}), and
224+
TI firmware from \code{ti-linux-firmware}. Since this is outside
225+
the scope of Buildroot, we provide pre-built \code{tiboot3.bin}
226+
and \code{tispl.bin} in the lab data directory at
254227
\code{$HOME/__SESSION_NAME__-labs/buildroot-basic/data/}.
255228
256-
If you want to learn how to build it yourself, refer to the
229+
If you want to learn how to build them yourself, refer to the
257230
Bootlin {\em Embedded Linux} training course, which covers the
258231
full AM62x boot chain in detail.
259232
@@ -290,20 +263,21 @@ \section{Flash the system}
290263
291264
\begin{itemize}
292265
293-
\item Copy the pre-built \code{tiboot3.bin} from the lab data directory
266+
\item Copy the pre-built \code{tiboot3.bin} and \code{tispl.bin} from
267+
the lab data directory
294268
\code{$HOME/__SESSION_NAME__-labs/buildroot-basic/data/} to the
295269
\code{boot} partition of the SD card.
296270
297-
\item Copy \code{tispl.bin} and \code{u-boot.img} from
298-
\code{output/images/} to the \code{boot} partition of the SD card.
271+
\item Copy \code{u-boot.img} from \code{output/images/} to the
272+
\code{boot} partition of the SD card.
299273
300274
\item Copy the \code{Image} and \code{k3-am625-beagleplay.dtb} files
301275
from \code{output/images/} to the \code{boot} partition of the SD
302276
card.
303277
304278
\item Extract the \code{rootfs.tar} file to the \code{rootfs}
305279
partition of the SD card, using:\\
306-
\inlinebash{sudo tar -C /media/$USER/rootfs/ -xf output/images/rootfs.tar}.
280+
\inlinebash{sudo tar -C /media/$USER/rootfs/ -xf output/images/rootfs.tar}
307281
308282
\item Create a file named \code{extlinux/extlinux.conf} in the
309283
\code{boot} partition. This file should contain the following lines:

0 commit comments

Comments
 (0)