Compile SDK

Compile SSD201 SDK

Compile uboot

  • Environment configuration

    export ARCH="arm"
    export CROSS_COMPILE=arm-linux-gnueabihf-
    
  • Select model related config

# Config file directory ssd20x-uboot-open/configs, compile WT2012
make WT2012_defconfig
  • Compile

    make clean
    make -j4
    
  • Replace flash images

    cp ${SDK_PATH}/ssd20x-uboot-open/u-boot_spinand.xz.img.bin ${SDK_PATH}/ssd20x-images-open/WT2012/boot/u-boot_spinand.xz.img.bin
    cp ${SDK_PATH}/ssd20x-uboot-open/u-boot_spinand.xz.img.bin ${SDK_PATH}/ssd20x-images-open/WT2012/uboot_s.bin
    
  • Flash selection

    cd ${SDK_PATH}/ssd20x-images-open/partition
    ./part.sh # The default flash configuration is 128MB (1Gbit). 256MB (2Gbit) flash requires 2G parameters.
    cp cis.bin ${SDK_PATH}/ssd20x-images-open/WT2012
    
  • For a detailed introduction to the binary files involved in UBOOT partition creation, please refer to: Development - Application Development Reference - System Related - SSD_System Partition

Compile kernel

  • Environment configuration

    export ARCH="arm"
    export CROSS_COMPILE=arm-linux-gnueabihf-
    
  • Select model config

    #Config file driectory ssd20x-kernel-open/arch/arm/configs
    cd ${SDK_PATH}/ssd20x-kernel-open
    make WT2012_defconfig
    
  • Compile

    make clean
    make -j4
    
  • Replace images

    cp ./arch/arm/boot/uImage.xz ${SDK_PATH}/ssd20x-images-open/WT2012/kernel
    

Make file system

  • The ubi partition file system is in the ssd20x-rootfs-open/ssd20x directory. Unzip the file system and add custom software to make it effective. It is unnecessary to compile the system image for the second time. Take adding applications in ‘ssd202’ as an example:

    cd ${SDK_PATH}/ssd20x-rootfs-open/ssd201
    tar zxvf root-sstar.tar.gz  # root-sstar.tar.gz is the root-sstar generated by compiling openwrt
    cp ${Youer_Files} ${SDK_PATH}/ssd20x-rootfs-open/ssd201/root-sstar/usr
    
  • After adding the file, execute the packaging scripts of the corresponding partition file system

    sudo apt-get install mtd-utils # Packaging dependencies mtd-utils. You need to install this tool in advance
    cd ${SDK_PATH}/ssd20x-rootfs-open
    ./mk_tools.sh
    ./mk_ubi.sh ssd201
    
  • Replace

    mv root.ubi ${SDK_PATH}/ssd20x-images-open/WT2012
    

Compile openwrt

  • If openwrt supports additional software functions, it is necessary to compile the sdk and replace images. But if you simply develop UI or drivers, you don’t need to perform these steps:

#Get openwrt source code
git clone https://gitee.com/qiming-zhixian/ssd2xx-openwrt-open.git
cd ssd2xx-openwrt-open
git clone https://gitee.com/qiming-zhixian/ssd20x-kernel-open.git
cd 18.06
#Update download package feeds
export GIT_SSL_NO_VERIFY=1
./scripts/feeds update -a
./scripts/feeds install -a
#Make the adapted model config effective -> 18.06/wtconfig/WT2xxx
make WT2012_wt
#Compile and generate images path18.06/bin/targets/sstar/ssd20x/WT2012
make V=s -j4
#Replace flash images
cp bin/targets/sstar/ssd20x/WT2012/WT2012-uImage.xz ${SDK_PATH}/ssd20x-images-open/WT2012/kernel
cp bin/targets/sstar/ssd20x/WT2012/WT2012-root-ubi.img ${SDK_PATH}/ssd20x-images-open/WT2012/root.ubi