Post Go back to editing

How to port Yocto U-boot and Linux distro to custom board equipped with SC572 chip

Hi team,

We're in the process of bringing up a custom board that uses an SC572 chip. We've managed to rebuild the init and preload code in $DIR for SC572 (by importing the projects into CCES and rebuilding after changing the processor setting in C/C++ Build) and were able to run a bare-metal application.

We are now trying to run through the linuxdsp quick start guide ($LNK1) but having trouble setting it up for a custom board. Some questions we have are as follows:

  1. The "source setup-environment -m <MACHINE>" command only has a list of ezkits, how do we create one for our custom board?
  2. I've found commands to configure linux-adi and busybox ( bitbake linux-adi -c menuconfig | bitbake -c menuconfig busybox), but how do we configure u-boot settings? We'd like to include some env variables that are built into the u-boot image, as well as getting NetConsole configured at startup so we can nc into it via ethernet.
  3. To rebuild the linux and u-boot images for our custom board, what are the core menuconfig I should change? (e.g. device tree, kernel drivers...)

Thanks for reading and I look forward to hearing from you.

Cheers,
Yan 

DIR: C:\Analog Devices\CrossCore Embedded Studio 2.10.0\SHARC\ldr\init_code\SC57x_Init
LNK1: wiki.analog.com/.../building

Parents
  • Hi Yan,

    You can add conf file for you custom board like below

    github.com/.../machine

    and also specify the image names

    github.com/.../images

    Please let me know if you need more information.

    Thanks
    Vignesh R

  • Hi Vignesh, Thanks for your reply.

    I have a couple of follow up questions:

    For adsp-sc573-ezkit.conf

    The option UBOOT_MACHINE references sc573-ezkit_defconfig. I had found that file in the repo u-boot-sharc under configs folder. I had tried to edit the options as follows:

    • u-boot-sharc/configs/sc573-ezkit_defconfig
      • CONFIG_TARGET_SC573_EZKIT=y
    • u-boot-sharc/include/configs/sc573-ezkit.h
      • #define CONFIG_BOOTCOMMAND "run nc"
      • #define CONFIG_ENV_SPI_BUS 1

    Afterwhich I tried to rebuild via both yocto and make but none of the changes took effect. Commands used:

    Make in dir ~/yocto_sc573/build/tmp/work/adsp_sc573_ezkit-poky-linux-gnueabi/u-boot-adi/1.0+gitAUTOINC+c372d6cadd-r0/git

    • make distclean
    • make menuconfig or ARCH=arm make defconfig KBUILD_DEFCONFIG=sc573-ezkit_defconfig
    • make

    bitbake in root dir

    • bitbake -f -c compile u-boot-adi
    • bitbake u-boot-adi

    Can you please advise in more detail the process to edit u-boot configs?

    Cheers,
    Yan

  • Hi Yan,

    I follow the below steps to add configs to u-boot and compile it.

    You can add the config token to the below defconfig

    build/tmp/work/adsp_sc573_ezkit-poky-linux-gnueabi/u-boot-adi/1.0+gitAUTOINC+c372d6cadd-r0/git/configs/sc573-ezkit_defconfig

    and recompile the u-boot with the below command
    bitbake u-boot-adi -f -c compile

    you should see the config token updated in the below .config
    build/tmp/work/adsp_sc573_ezkit-poky-linux-gnueabi/u-boot-adi/1.0+gitAUTOINC+c372d6cadd-r0/build/.config

    Then you can install the files to the output directory
    bitbake u-boot-adi -f -c deploy

    If you want from scratch you can do as follows
    bitbake u-boot-adi -c cleansstate
    bitbake u-boot-adi -c patch

    Do the modifications

    bitbake u-boot-adi -f -c compile
    bitbake u-boot-adi -f -c deploy / bitbake u-boot-adi


    Thanks
    Vignesh R

  • Hi Vignesh,

    Thanks for getting back to me with the steps for modification. 

    I have found that the environment variables in U-boot don't get updated when I try and reflash the new u-boot image. I have been following the instructions outlined here to reflash it (Installing U-boot), is there another method of flashing that ensures existing environment variables get overwritten? Otherwise, is there a way to wipe the flash clean so that I can flash the u-boot image as if it's a new chip?

    Cheers,
    Yan 

Reply
  • Hi Vignesh,

    Thanks for getting back to me with the steps for modification. 

    I have found that the environment variables in U-boot don't get updated when I try and reflash the new u-boot image. I have been following the instructions outlined here to reflash it (Installing U-boot), is there another method of flashing that ensures existing environment variables get overwritten? Otherwise, is there a way to wipe the flash clean so that I can flash the u-boot image as if it's a new chip?

    Cheers,
    Yan 

Children