This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TI BLAZE(4430) MDP dtb(device tree blob) support

Hi,

For signing image, I am following below procedure (not using M-shield  tool).

To create the FIT:

   $ mkimage -f kernel.its kernel.fit

Then to sign it :

    $ mkimage -F kernel.fit -k keys -K kernel.dtb -c "ravi.hoal@stc 5-may-2014" -r

But, the kernel which we are using is not supporting DTS (not having dts file like omap4-sdp.dts) for BLAZE MDP(omap 4430) platform.

Can we get DTS patch for omap4430 BLAZE MDP platform?


thanks
Raj
  • Hello Raj,

    About your question - Can we get DTS patch for omap4430 BLAZE MDP platform?

    Yes, you can use DTS patch for OMAP4430 Blaze.

    See file omap4-sdp.dts in: 4AJ.2.5P2/kernel/android-3.4/arch/arm/boot/dts omap4-sdp.dts

    See the following:

    [PATCH v2] ARM: DTS: OMAP4: Add OMAP4 Blaze Tablet support

    https://groups.google.com/forum/#!msg/linux.kernel/7j-RN6uwY3U/yt459yt_Bv0J

    Best regards,

    Yanko

  • hi Yanko,

    We are using TI-BLAZE MDP board (not TI-BLAZE Tablet) and used below link to download the source. 

    http://omappedia.org/wiki/4AJ.2.2_OMAP4_Jelly_Bean_Release_Notes

    After downloading, we found there is no arch/arm/boot/dts folder

    Can you provide the link to download u-boot and kernel with DTS support?

    Can we use omap4-sdp.dts file for TI-BLAZE MDP platform?

    thanks

    Raj

  • Hello Raj,

    Q1: Can you provide the link to download u-boot and kernel with DTS support?

    Did you build your Kernel in 4AJ.2.2_OMAP4_Jelly_Bean_Release_Notes?

    Follow the build Instructions in release notes.

    I use Jelly Bean release 4AJ.2.5P2.

    The omap4-sdp.dts file is located in 4AJ.2.5P2/kernel/android-3.4/arch/arm/boot/dts 0726.omap4-sdp.dts.zip

    Q2: Can we use omap4-sdp.dts file for TI-BLAZE MDP platform?

    - Yes, you can use this file.

    Best regards,

    Yanko

  • Hi yanko,

    We downloaded 4AJ.2.5P2/kernel/android-3.4 kernel source, but, in that we could not find config file blaze_defconfig  in arch/arm/configs. Can you tell us, which defconfig we supposed use for BLAZE MDP platform?

    thanks

    Raj

  • Hi Yanko,

    We downloaded kernel and u-boot of release 4AJ.2.5P2 from the link http://www.omappedia.com/wiki/4AJ.2.5P2_OMAP4_Jelly_Bean_Release_Notes. We have to support secure boot support for u-boot(to load sighned kernel image) as well uImage. We have the following quaries,

    • In the u-boot, in order to enable signature verification of FIT uImage CONFIG_FIT & CONFIG_FIT_SIGNATURE flag should be enabled. But, we are not seeing such config flags in the u-boot source and also no dts files available for omap platform.
    • In the 4AJ.2.5P2/kernel/android-3.4 kernel source, we could not find config file blaze_defconfig  inarch/arm/configs. Can you tell us, which defconfig we supposed use for BLAZE MDP platform?

    Please clarify.

    thanks

    raj

     

     

  • Hello Raj,

    You don't find blaze_defconfig file. There is no such file. You must use omap2plus_defconfig, available in 4AJ.2.5P2/kernel/android-3.4/arch/arm/configs.


    When you make omap2plus_defconfig, you will get .config file in 4AJ.2.5P2/kernel/android-3.4

    Best regards,

    Yanko

  • Hi yanko,

    Thanks for quick repy. We have one more quary on u-boot.

    Since we are creating FIT signed kernel image,  in order to load the FIT kernel image, the u-boot should have support for FIT images. i.e

    - FIT image support:

    CONFIG_FIT
    Enable support for the FIT uImage format.

    CONFIG_FIT_BEST_MATCH
    When no configuration is explicitly selected, default to the
    one whose fdt's compatibility field best matches that of
    U-Boot itself. A match is considered "best" if it matches the
    most specific compatibility entry of U-Boot's fdt's root node.
    The order of entries in the configuration's fdt is ignored.

    CONFIG_FIT_SIGNATURE
    This option enables signature verification of FIT uImages,
    using a hash signed and verified using RSA. See

    But, the u-boot source downloaded from 4AJ.2.5P2 release doesnot have the support for FIT images.

    Where to get u-boot source with FIT image support for TI BLAZE platform?

     

    thanks

    Raj

  • Hi yanko,

    Thanks for the reply.

    I am unable to open links 1 & 2.

    I downloaded u-boot-ti source. By referring patches, I enabled following config flags in omap4_sdp4430.h file,

     #ifndef CONFIG_SPL_BUILD
     # define CONFIG_FIT
     # define CONFIG_OF_CONTROL
     # define CONFIG_OF_SEPARATE
     # define CONFIG_DEFAULT_DEVICE_TREE omap4_sdp4430
    #endif

    I have disabled CONFIG_SPL_BUILD in the spl/Makefile since the above flags will be enabled if CONFIG_SPL_BUILD is not enabled.

    Command used to build the u-boot

    make ARCH=arm CROSS_COMPILE=arm-eabi- omap4_sdp4430_config
    make ARCH=arm CROSS_COMPILE=arm-eabi-

    But, getting the following error,

    OBJCOPY examples/standalone/hello_world.srec
    OBJCOPY examples/standalone/hello_world.bin
    LDS u-boot.lds
    LD u-boot
    OBJCOPY u-boot.bin
    MKIMAGE u-boot.img
    OBJCOPY u-boot.srec
    GEN include/spl-autoconf.mk
    make[1]: *** No rule to make target `checkarmreloc', needed by `all'. Stop.
    make: *** [spl/u-boot-spl] Error 2

    Are we missing to enable any flags?

    thanks

    Raj



  • Hi yanko,

     

    We downloaded u-boot source from mainline git://git.denx.de/u-boot-ti.git 


    Initially we followed 4AJ.2.5P2_OMAP4_Jelly_Bean_Release_Notes to download the u-boot. But, that source is not supporting fit images.

    Our use case is: We are making linux kernel image as signed FIT image and we want to load that signed FIT kernel image from the u-boot. 

    By referring README of u-boot-ti, we understood that, in order to load FIT signed image we need to enable

    CONFIG_FIT & CONFIG_FIT_SIGNATURE flags in config file i.e 

    - FIT image support:
    CONFIG_FIT
    Enable support for the FIT uImage format.

    CONFIG_FIT_BEST_MATCH
    When no configuration is explicitly selected, default to the
    one whose fdt's compatibility field best matches that of
    U-Boot itself. A match is considered "best" if it matches the
    most specific compatibility entry of U-Boot's fdt's root node.
    The order of entries in the configuration's fdt is ignored.

    CONFIG_FIT_SIGNATURE
    This option enables signature verification of FIT uImages,
    using a hash signed and verified using RSA. See
    doc/uImage.FIT/signature.txt for more details.

    We tried following scenarios: 

    scenario 1:

    Included following flags in "include/configs/omap4_sdp4430.h" 

    #define CONFIG_FIT
    #define CONFIG_OF_CONTROL
    #define CONFIG_OF_SEPARATE
    #define CONFIG_DEFAULT_DEVICE_TREE omap4_sdp4430
    #define CONFIG_FIT_SIGNATURE
    #define CONFIG_RSA

    But, u-boot build is failed and error as follow,

    LD spl/lib/built-in.o
    LD spl/u-boot-spl
    OBJCOPY spl/u-boot-spl.bin
    MKIMAGE MLO

    Device Tree Source is not correctly specified.
    Please define 'CONFIG_DEFAULT_DEVICE_TREE'
    or build with 'DEVICE_TREE=<device_tree>' argument

    make[1]: *** [arch/arm/dts/omap4_sdp4430.dtb] Error 1
    make: *** [dts/dt.dtb] Error 2

    Because u-boot source is not having omap4_sdp4430.dts file.

    scanario 2:

    Included following flags in "include/configs/omap4_sdp4430.h" 

    #define CONFIG_FIT

    #define CONFIG_FIT_SIGNATURE

    and build erros is:

    LDS u-boot.lds
    LD u-boot
    common/built-in.o:(.data.image_sig_algos+0xc): undefined reference to `rsa_verify'
    make: *** [u-boot] Error 1

    scanario 3:

    Included following flags in "include/configs/omap4_sdp4430.h" 

    #define CONFIG_FIT

    #define CONFIG_FIT_SIGNATURE

    #define CONFIG_RSA

    and build erros is:

    OBJCOPY examples/standalone/hello_world.bin
    LDS u-boot.lds
    LD u-boot
    lib/built-in.o: In function `rsa_verify_with_keynode':
    /home/sveettil/raviH/4AJ.2.5P2/u-boot-ti/lib/rsa/rsa-verify.c:284: undefined reference to `fdtdec_get_int'
    /home/sveettil/raviH/4AJ.2.5P2/u-boot-ti/lib/rsa/rsa-verify.c:285: undefined reference to `fdtdec_get_int'
    arm-eabi-ld.bfd: BFD (GNU Binutils) 2.21 assertion fail /tmp/android-15472/src/build/../binutils/binutils-2.21/bfd/elf32-arm.c:12241
    arm-eabi-ld.bfd: BFD (GNU Binutils) 2.21 assertion fail /tmp/android-15472/src/build/../binutils/binutils-2.21/bfd/elf32-arm.c:12478
    Segmentation fault
    make: *** [u-boot] Error 139

     

    Quaries:

    • In order to load singed FIT kernel images, what are the configs flags we need to add in omap4_sdp4430.h config file of u-boot?
    • What is the build procedure?

     

    Note:

    config file used : omap3_sdp4430.h

    build procedure used:

    make ARCH=arm distclean

    make ARCH=arm CROSS_COMPILE=arm-eabi- omap4_sdp4430_config

    make ARCH=arm CROSS_COMPILE=arm-eabi- 

     

    thanks

    Raj

  • Hi !

    any luck with booting using the FIT images??

    I have followed the below mentioned procedure.

    U-Boot Source:
    The latest source code from denx. 2014-07.rc1
     patman: Suppress duplicate signoffs only for real patches on 05/17/2014
    Procedure:
    Followed the exact same process mentioned in
    I created a device tree and was able to generate a u-boot-dtb.bin file.
    Create a single device tree in arch/arm/dts folder and mention in the Makefile.
    to the config file: added these:
    /* Open Firmware flat tree */
    #define CONFIG_OF_LIBFDT

    /* FIT support */
    #define CONFIG_FIT
    #define CONFIG_FIT_VERBOSE    1 /* enable fit_format_{error,warning}() */
    #define CONFIG_FIT_BEST_MATCH

    /* FDT support */
    #define CONFIG_OF_CONTROL
    #define CONFIG_OF_SEPARATE
    #define CONFIG_DISPLAY_BOARDINFO_LATE

    /* RSA support */
    #define CONFIG_FIT_SIGNATURE
    #define CONFIG_RSA
    SD CARD:
    1) copied the MLO in /boot
    2) copied the u-boot-dtb.bin in /boot
    3) coped the kernel_fdt.itb file
    4) uEnv has
    console=ttyO0,115200n8
    fitfdt=/boot/kernel_fdt.itb
    setenv loadaddr 0x82000000; run mmcargs; ext2load mmc ${mmcdev}:2 ${loadaddr} ${fitfdt};
    I loaded the u-boot-dtb.bin file but gives the eror "No valid FDT found - please append one to U-Boot binary, use u-boot-dtb.bin or define CONFIG_OF_EMBED." error message
    Thanks,
    Harsha

  • Hi !

    I have been in the same path and these are the things i did and it solved the errors you are getting.

    I am working on the am335x-evmsk board.


    Solution to the device tree problem:

    1) make sure your device tree omap4_sdp4430.dts is in the arch/arm/dts. put the file here and add the same in its Make file!

    This solved my below problem !

    Device Tree Source is not correctly specified.
    Please define 'CONFIG_DEFAULT_DEVICE_TREE'
    or build with 'DEVICE_TREE=<device_tree>' argument

    i created a simple device tree since the one i got it from kernel/arch/arm/dts folder didnt work.

    Thanks,

    Harsha