How to customize LITB image from LSDK

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to customize LITB image from LSDK

How to customize LITB image from LSDK

This topic shows steps to customize LITB by using a different kernel image instead of the existing kernel image.

  1. Browse to the FlexBuild installation directory.
  2. Modify the kernel image in linux_arm64_LS.its.
    $ vi configs/linux/linux_arm64_LS.its

    linux_arm64_LS.png

  3. Save the changes done in the file.
  4. Generate LITB using flex-builder.
    $ source setup.env
    $ flex-builder -i mkitb -r <distro_type>:<distro_scale> -a <arch>

    For example:

    $ source setup.env
    $ flex-builder -i mkitb -r ubuntu:main -a arm64
    
    INSTRUCTION: mkitb
    DISTRO TYPE: ubuntu
    DISTRO SCALE: main
    ....
    ....
    /home/flexbuild_lsdk2004/build/images/lsdk2004_ubuntu_main_LS_arm64.itb     [Done]

     

    Note: To create .itb file directly from .its file, run this command: mkimage -f <xyz.its> <xyz.itb>

  5. Connect to the board console via terminal and run following commands at U-boot to boot the board with customized LITB.
    => ping $serverip
    Using e1000#0 device
    host 192.168.3.1 is alive
    =>
    Using e1000#0 device
    host 192.168.3.1 is alive
    => tftp 0xa0000000 lsdk2004_ubuntu_main_LS_arm64.itb
    Using e1000#0 device
    TFTP from server 192.168.3.1; our IP address is 192.168.3.49
    Filename 'lsdk2004_ubuntu_main_LS_arm64.itb'.
    Load address: 0xa0000000
    Loading: #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             ####################################
             9.8 MiB/s
    done
    Bytes transferred = 683506200 (28bd7a18 hex)
    => bootm 0xa0000000#lx2160ardb
    ## Loading kernel from FIT Image at a0000000 ...
       Using 'lx2160ardb' configuration
       Trying 'kernel' kernel subimage
         Description:  ARM64 Kernel
         Created:      2021-02-03   6:01:29 UTC
         Type:         Kernel Image
         Compression:  gzip compressed
         Data Start:   0xa00000d0
         Data Size:    14086432 Bytes = 13.4 MiB
    

     

  6. Check timestamp in boot log to ensure that the board is booted with the updated kernel image in the customized LITB.

     

    Starting kernel ...
    
    [    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd083]
    [    0.000000] Linux version 5.4.3 (test@Ubuntu-18) (gcc version 7.5.0 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04)) #1 SMP PREEMPT Wed Feb 3 00:04:09 IST 2021
    [    0.000000] Machine model: NXP Layerscape LX2160ARDB
    [    0.000000] earlycon: pl11 at MMIO32 0x00000000021c0000 (options '')
    [    0.000000] printk: bootconsole [pl11] enabled
    [    0.000000] efi: Getting EFI parameters from FDT:
    

     

%3CLINGO-SUB%20id%3D%22lingo-sub-1225457%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EHow%20to%20customize%20LITB%20image%20from%20LSDK%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1225457%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%0A%3CP%3EThis%20topic%20shows%20steps%20to%20customize%20LITB%20by%20using%20a%20different%20kernel%20image%20instead%20of%20the%20existing%20kernel%20image.%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EBrowse%20to%20the%20FlexBuild%20installation%20directory.%3C%2FLI%3E%0A%3CLI%3EModify%20the%20kernel%20image%20in%26nbsp%3B%3CFONT%20face%3D%22courier%20new%2Ccourier%22%3Elinux_arm64_LS.its%3C%2FFONT%3E.%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%24%20vi%20configs%2Flinux%2Flinux_arm64_LS.its%3C%2FCODE%3E%3C%2FPRE%3E%3CBR%20%2F%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22linux_arm64_LS.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22linux_arm64_LS.png%22%20style%3D%22width%3A%20818px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F136409i7EFABC86F099671B%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22linux_arm64_LS.png%22%20alt%3D%22linux_arm64_LS.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%3ESave%20the%20changes%20done%20in%20the%20file.%3C%2FLI%3E%0A%3CLI%3EGenerate%20LITB%20using%26nbsp%3Bflex-builder.%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%24%20source%20setup.env%0A%24%20flex-builder%20-i%20mkitb%20-r%20%3CDISTRO_TYPE%3E%3A%3CDISTRO_SCALE%3E%20-a%20%3CARCH%3E%3C%2FARCH%3E%3C%2FDISTRO_SCALE%3E%3C%2FDISTRO_TYPE%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EFor%20example%3A%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%24%20source%20setup.env%0A%24%20flex-builder%20-i%20mkitb%20-r%20ubuntu%3Amain%20-a%20arm64%0A%0AINSTRUCTION%3A%20mkitb%0ADISTRO%20TYPE%3A%20ubuntu%0ADISTRO%20SCALE%3A%20main%0A....%0A....%0A%2Fhome%2Fflexbuild_lsdk2004%2Fbuild%2Fimages%2Flsdk2004_ubuntu_main_LS_arm64.itb%20%20%20%20%20%5BDone%5D%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSTRONG%3ENote%3A%3C%2FSTRONG%3E%20To%20create%20%3CFONT%20face%3D%22courier%20new%2Ccourier%22%3E.itb%3C%2FFONT%3E%20file%20directly%20from%20%3CFONT%20face%3D%22courier%20new%2Ccourier%22%3E.its%3C%2FFONT%3E%20file%2C%20run%20this%20command%3A%20%3CFONT%20face%3D%22courier%20new%2Ccourier%22%3Emkimage%20-f%20%3CXYZ.ITS%3E%20%3CXYZ.ITB%3E%3C%2FXYZ.ITB%3E%3C%2FXYZ.ITS%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%3EConnect%20to%20the%20board%20console%20via%20terminal%20and%20run%20following%20commands%20at%20U-boot%20to%20boot%20the%20board%20with%20customized%20LITB.%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%3D%26gt%3B%20ping%20%24serverip%0AUsing%20e1000%230%20device%0Ahost%20192.168.3.1%20is%20alive%0A%3D%26gt%3B%0AUsing%20e1000%230%20device%0Ahost%20192.168.3.1%20is%20alive%0A%3D%26gt%3B%20tftp%200xa0000000%20lsdk2004_ubuntu_main_LS_arm64.itb%0AUsing%20e1000%230%20device%0ATFTP%20from%20server%20192.168.3.1%3B%20our%20IP%20address%20is%20192.168.3.49%0AFilename%20'lsdk2004_ubuntu_main_LS_arm64.itb'.%0ALoad%20address%3A%200xa0000000%0ALoading%3A%20%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%0A%20%20%20%20%20%20%20%20%20%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%0A%20%20%20%20%20%20%20%20%20%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%0A%20%20%20%20%20%20%20%20%20%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%0A%20%20%20%20%20%20%20%20%20%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%0A%20%20%20%20%20%20%20%20%20%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%0A%20%20%20%20%20%20%20%20%20%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%0A%20%20%20%20%20%20%20%20%209.8%20MiB%2Fs%0Adone%0ABytes%20transferred%20%3D%20683506200%20(28bd7a18%20hex)%0A%3D%26gt%3B%20bootm%200xa0000000%23lx2160ardb%0A%23%23%20Loading%20kernel%20from%20FIT%20Image%20at%20a0000000%20...%0A%20%20%20Using%20'lx2160ardb'%20configuration%0A%20%20%20Trying%20'kernel'%20kernel%20subimage%0A%20%20%20%20%20Description%3A%20%20ARM64%20Kernel%0A%20%20%20%20%20Created%3A%20%20%20%20%20%202021-02-03%20%20%206%3A01%3A29%20UTC%0A%20%20%20%20%20Type%3A%20%20%20%20%20%20%20%20%20Kernel%20Image%0A%20%20%20%20%20Compression%3A%20%20gzip%20compressed%0A%20%20%20%20%20Data%20Start%3A%20%20%200xa00000d0%0A%20%20%20%20%20Data%20Size%3A%20%20%20%2014086432%20Bytes%20%3D%2013.4%20MiB%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CBR%20%2F%3E%0A%3C%2FLI%3E%0A%3CLI%3ECheck%20timestamp%20in%20boot%20log%20to%20ensure%20that%20the%20board%20is%20booted%20with%20the%20updated%20kernel%20image%20in%20the%20customized%20LITB.%0A%3CBR%20%2F%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3EStarting%20kernel%20...%0A%0A%5B%20%20%20%200.000000%5D%20Booting%20Linux%20on%20physical%20CPU%200x0000000000%20%5B0x410fd083%5D%0A%5B%20%20%20%200.000000%5D%20Linux%20version%205.4.3%20(test%40Ubuntu-18)%20(gcc%20version%207.5.0%20(Ubuntu%2FLinaro%207.5.0-3ubuntu1~18.04))%20%231%20SMP%20PREEMPT%20Wed%20Feb%203%2000%3A04%3A09%20IST%202021%0A%5B%20%20%20%200.000000%5D%20Machine%20model%3A%20NXP%20Layerscape%20LX2160ARDB%0A%5B%20%20%20%200.000000%5D%20earlycon%3A%20pl11%20at%20MMIO32%200x00000000021c0000%20(options%20'')%0A%5B%20%20%20%200.000000%5D%20printk%3A%20bootconsole%20%5Bpl11%5D%20enabled%0A%5B%20%20%20%200.000000%5D%20efi%3A%20Getting%20EFI%20parameters%20from%20FDT%3A%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CBR%20%2F%3E%0A%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3C%2FLINGO-BODY%3E
No ratings
Version history
Last update:
‎02-17-2021 03:04 AM
Updated by: