Customize the F&S install script

  • Hi there,


    I would like to customize the install.scr provided by F&S, in my special case, I want to install a bitmap to UserDef partition and setup the display settings in UBoot.

    Doing this manually worked great. However, placing the commands in install.scr will fail the installation.


    I did some research and found, the install.scr needs to be compiled to an image script with a certain CRC in its header. I did this using mkimage:

    Code
    1. $ mkimage -A arm -O u-boot -T script -C none -n "F&S install script" -d install.cmd install.scr


    So I have generated a new install.scr from a install.cmd, which includes my changes. I can check, that the script is compiled correctly

    Code
    1. $ mkimage -l install.scr
    2. Image Name: F&S install script
    3. Created: Mon Sep 15 12:17:15 2025
    4. Image Type: ARM U-Boot Script (uncompressed)
    5. Data Size: 3039 Bytes = 2.97 KiB = 0.00 MiB
    6. Load Address: 00000000
    7. Entry Point: 00000000
    8. Contents:
    9. Image 0: 3031 Bytes = 2.96 KiB = 0.00 MiB


    But when placing it onto a USB drive alongside with my files to install, it fails:

    Code
    1. ---- Trying install from usb 0 with install.scr ----
    2. Loading /install.scr ... done!
    3. Failed!
    4. ---- No install script found ----


    I have attached the install.cmd file to this post. I can see, that the header in my new install.scr shows a lot of NULs (when opened in VS code or Notepad++). I also made sure, the install.cmd is written in Unix-style (using dos2unix command).

    Any suggestions on how to get a custom install.scr running?

    Thanks!

  • Ok, I found, that the mkimage command is done in fs-installscript.bb.

    I have created a fs-installscript.bbappend:


    I placed my_install.txt with my custom changes to /home/developer/fsimx6-Y2024.04/build/yocto-fus/sources/meta-fus/recipes-config/images/files.


    it works now. Issue closed (or maybe there is a more elegant solution?).


    Thanks.

  • In the documentation LinuxOnF&SBoards, you'll find the command to compile the U-Boot Script file in chapter 6.4.7 "Creating an Appropriate U-Boot Script Image". You can use this to create a script image from a text file by hand.


    Your F&S Support Team

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Hello,


    I can successfully use my custom install script with the SINTF base board for eFus. However, in my target device, I use a custom PCB, where the Hub Controller of SINTF board (USB2514) is not placed. The USB P/N lines are directly connected to pins 214 and 216 of the goldfinger adapter:



    Inside UBoot on SINTF board, the hub and my USB flash (SanDisk Cruzer Blade) are deteced as follows:

    Code
    1. efusA9r2 # usb tree
    2. USB device tree:
    3. 1 Hub (480 Mb/s, 0mA)
    4. | u-boot EHCI Host Controller
    5. |
    6. +-2 Hub (480 Mb/s, 2mA)
    7. |
    8. +-3 Mass Storage (480 Mb/s, 200mA)
    9. SanDisk Cruzer Blade 00015032032525212029

    On my custom PCB, it is not recognized by UBoot:

    Code
    1. efusA9r2 # usb tree
    2. USB device tree:
    3. 1 Hub (480 Mb/s, 0mA)
    4. u-boot EHCI Host Controller


    I reckon, there is a way to tell UBoot to look for my USB Stick and not for the Hub? Do you have any hint, where to check and patch the UBoot build in Yocto?


    Thanks!

  • Hello,


    an USB Hub does should not make a difference, software-wise.


    Did you check if your 5V USB voltage is present when running "usb start"?

    You do not seem too have connected USB_A_POWERON, so you would need a static 5V USB power supply on your baseboard.


    Your F&S Support Team

  • Hello,


    thanks for your response!


    There was an issue in my schematic: The +5V only go into the IN line of the MIC2026, but not on the OUTA line (as it is in the case of your SINTF board).


    I fixed it by connecting the 5V to the OUTA line. It works now.



    Thanks!


    Issue solved.