Differences

This shows you the differences between two versions of the page.

Link to this comparison view

ass:laboratoare:01:tasks:02 [2023/07/17 23:18]
florin.stancu
ass:laboratoare:01:tasks:02 [2024/08/04 22:07] (current)
florin.stancu [02. Creating the Firmware Image Package]
Line 66: Line 66:
 === 02-C. Build U-Boot (both BL2 and BL33) === === 02-C. Build U-Boot (both BL2 and BL33) ===
  
-For the last two components of our Firmware Package we'll be using [[https://​github.com/​TechNexion/​u-boot-tn-imx|U-Boot]] (clone it!).+For the last two components of our Firmware Package we'll be using [[https://​github.com/​TechNexion/​u-boot-tn-imx|this U-Boot ​fork]] (clone it!).
 Each of them has a very specific purpose. Each of them has a very specific purpose.
  
Line 88: Line 88:
 When **BL31** runs its course, **BL33** will be called upon. During this phase we'll finally have an interactive shell and multiple drivers to help interact with the board. With this, we can investigate the board'​s hardware, read and potentially override the partitions in the persistent storage and most importantly,​ boot Linux from any number of sources. When **BL31** runs its course, **BL33** will be called upon. During this phase we'll finally have an interactive shell and multiple drivers to help interact with the board. With this, we can investigate the board'​s hardware, read and potentially override the partitions in the persistent storage and most importantly,​ boot Linux from any number of sources.
  
-== Step 4: Generate the configuration ==+== Step 3: Generate the configuration ==
  
 Alright, let's get to it! Alright, let's get to it!
Line 104: Line 104:
 It's very common across such projects and Kbuild will actually complain if it sees that you're trying to use a x86 compiler. It's very common across such projects and Kbuild will actually complain if it sees that you're trying to use a x86 compiler.
  
-== Step 5: Modify the configuration ==+== Step 4: Modify the configuration ==
  
 The default configuration that you chose (correctly, hopefully) contains a few erroneous values for the USB driver. The default configuration that you chose (correctly, hopefully) contains a few erroneous values for the USB driver.
Line 123: Line 123:
   * **USB_GADGET_PRODUCT_NUM:​** 0x012b   * **USB_GADGET_PRODUCT_NUM:​** 0x012b
  
-== Step 6: Build it! ==+== Step 5: Build it! ==
  
 Run the make command (again, don't forget the cross compiler argument, if you haven'​t exported it already)! Run the make command (again, don't forget the cross compiler argument, if you haven'​t exported it already)!
Line 153: Line 153:
 Since 2022, U-Boot'​s tool of choice for this task is [[https://​u-boot.readthedocs.io/​en/​latest/​develop/​package/​binman.html|binman]]. This tool uses a platform-specific config file that specifies what components should be included and where they should be placed in memory. For our platform (i.e.: i.MX8M Quad) this file would be ''​arch/​arm/​dts/​imx8mq-u-boot.dtsi''​. Since 2022, U-Boot'​s tool of choice for this task is [[https://​u-boot.readthedocs.io/​en/​latest/​develop/​package/​binman.html|binman]]. This tool uses a platform-specific config file that specifies what components should be included and where they should be placed in memory. For our platform (i.e.: i.MX8M Quad) this file would be ''​arch/​arm/​dts/​imx8mq-u-boot.dtsi''​.
  
-**However**,​ since the U-Boot version that we are using is older and the board manufacturer did not add proper support for binman, **we are going to use the older method**, based on [[https://​linux.die.net/​man/​1/​mkimage|mkimage]] (part of the U-Boot repo or as a package on most distros). In order to spare ourselves some pain, we are going to use NXP's [[https://​github.com/​nxp-imx/​imx-mkimage/​tree/​lf-5.15.32_2.0.0|imx-mkimage]] implementation which knows the proper offsets where the images should be loaded.+**However**,​ since the U-Boot version that we are using is older and [[https://​github.com/​TechNexion/​u-boot-tn-imx/​commit/​ca11907c0e7b7efd22f037793295fb0427e05ecb|the board manufacturer did not add proper support for binman]], **we are going to use the older method**, based on [[https://​linux.die.net/​man/​1/​mkimage|mkimage]] (part of the U-Boot repo or as a package on most distros). In order to spare ourselves some pain, we are going to use NXP's [[https://​github.com/​nxp-imx/​imx-mkimage/​tree/​lf-5.15.32_2.0.0|imx-mkimage]] implementation which knows the proper offsets where the images should be loaded.
  
 In their source tree you will find a number of subdirectories corresponding to different versions of the i.MX platform. Select the one which corresponds to our board (remember, the base model is called //iMX8M//). In their source tree you will find a number of subdirectories corresponding to different versions of the i.MX platform. Select the one which corresponds to our board (remember, the base model is called //iMX8M//).
ass/laboratoare/01/tasks/02.1689625125.txt.gz ยท Last modified: 2023/07/17 23:18 by florin.stancu
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0