This shows you the differences between two versions of the page.
ass:laboratoare:01 [2023/07/17 23:29] florin.stancu |
ass:laboratoare:01 [2024/08/05 14:14] (current) florin.stancu |
||
---|---|---|---|
Line 1: | Line 1: | ||
~~NOTOC~~ | ~~NOTOC~~ | ||
- | ===== Lab 01 - Firmware & Bootloaders ===== | + | ===== 01 - Firmware & Bootloaders ===== |
===== Objectives ===== | ===== Objectives ===== | ||
Line 26: | Line 26: | ||
When everything is ready, you'll get to fire up the board, upload the firmware image package using NXP's specific serial boot protocol and play with it! | When everything is ready, you'll get to fire up the board, upload the firmware image package using NXP's specific serial boot protocol and play with it! | ||
- | |||
- | <hidden> | ||
- | A precompiled kernel and Linux will also be made available for you to fully test the goodies! | ||
- | Don't worry, you'll get to build them from scratch next time ;) | ||
- | </hidden> | ||
<note tip> | <note tip> | ||
- | **Suggestion #1:** After manually solving each task, automate the steps you've taken by writing a [[https://makefiletutorial.com/|Makefile]]. Chances are that you're going to have to rebuild things (at least partially) dozens of times, and you'll also need to reuse your scripts usable for the next labs as well! | + | **Suggestion #1:** After manually solving each task, automate the steps you've taken by writing a [[https://makefiletutorial.com/|Makefile]]. Chances are that you're going to have to rebuild things (at least partially) dozens of times, and you'll also need to reuse your scripts usable for the next labs as well! E.g.: <code Makefile> |
+ | export CROSS_COMPILE = /path/to/your/toolchain/gcc-prefix...- | ||
- | **Suggestion #2:** Since you won't be working alone, run a ''git init'' and add dependent repositories as submodules so that your partner's on the same page. Don't forget to add ''%%--%%depth 1'' to the ''git submodule add'' in order to reduce the cloning tine and size of your subrepos. | + | ATF_DIR = imx-atf |
+ | ATF_MAKE_FLAGS = SPD=none PLAT=TODO... | ||
+ | atf: | ||
+ | cd "$(ATF_DIR)" && \ | ||
+ | make $(ATF_MAKE_FLAGS) | ||
+ | |||
+ | UBOOT_DIR = u-boot-tn-imx | ||
+ | UBOOT_MAKE_FLAGS = | ||
+ | uboot: | ||
+ | cd "$(UBOOT_DIR)" && \ | ||
+ | make $(UBOOT_MAKE_FLAGS) | ||
+ | |||
+ | .PHONY: uboot atf | ||
+ | # ... and so on ! | ||
+ | </code> | ||
+ | |||
+ | **Suggestion #2:** You can use git and add the third party projects as submodules! But beware though: Linux's repo is quite huge (several GBs -- but you'll see it yourself in the next lab)! | ||
</note> | </note> | ||
{{namespace>:ass:laboratoare:01:tasks&nofooter&noeditbutton}} | {{namespace>:ass:laboratoare:01:tasks&nofooter&noeditbutton}} | ||
+ |