Skip to content

SDK Directory Description

SDK Directory Guide

1. SDK Directory Structure

Figure 1: SDK Directory Structure

Source Code Description:

sdk: Source code related to sensor drivers and sample codes, as well as the relevant SDK source code that relies on the Linux kernel.

boot: Related source code and compilation environment for Uboot.

kernel: Related source code and compilation environment for the kernel.

project: Configuration files and environment for compiling the entire project.

rtos: Related source code and compilation environment for the real-time operating system (RTOS).

optee: Related source code and compilation environment for Optee.

2. Content Details

2.1. rtos

cd rtos/proj
.
├── add-config.mk // Attention not required on user side
├── build // Directory generated after compilation
│   └── iford_ssc029a_s01a_512_ipc_lh_spinand// Directory generated based on compiled configuration,
|     // where all lib/c files needed for compilation will be copied, and the corresponding link files, such as axf, map, elf, bin, etc., will be generated.
├── clear-config.mk // Attention not required on user side
├── config.mak // Compilation environment configuration
├── configs // Configuration files and script files, which will be processed by the compilation script automatically. Attention not required on user side
├── gen_ext_cfg.sh// make configuration related script
├── hdrs // Header file directory
│   └── iford_ssc029a_s01a_512_ipc_lh_spinand// Header files corresponding to the configuration files
├── Kconfig // menuconfig configuration file
├── libs
│   ├── algo // Algorithm related lib
│   ├── otp // otp related lib
│   ├── product // system, MI, and Mhal libs corresponding to different mak files
│   └── toolchain // Standard C library
├── mak
│   ├── common // Common lib/h file path
│   ├── defconfigs // Configuration files, which requires user's attention. All application configurations are located here.
│   └── Kconfigs // menuconfig configuration files at all levels
│   ├── defconfigs // Configuration file, which requires user's attention. All application configurations are located here.
├── Makefile
├── sc // Source code directory
│   ├── application // Application directory
│   │   ├── bootloader
│   │   ├── ... // Other application
│   │   └── dualos_camera // Mainly focus on streaming application demo
│   ├── customer // Customization module directory
│   └── driver // Driver directory
│       ├── sysdriver // System module driver such as I2C/PWM/UART/earlyinit_fw
│       └── thirdparty // Driver for external module such as wifi
├── scatter // lds file used for link
├── scripts // Compilation script directory. Attention not required on user side
├── tng // Configuration script directory
│   └── configure.pl // The one mainly used
└── tools // Some tools. Attention not required on user side

2.2. boot

The directory structure is consistent with the original U-Boot. The main directories that require user's attention include:

.
├── ....
├── common
│   └── cmd
│       └── mstar // Relevant commands under uboot provided by SigmaStar, among which estar.c involves system upgrade
├── drivers
│   └── mstar // Peripheral drivers provided by SigmaStar
├── configs
│   └──infinity6f_ssm000c_s01a_spinand_lh_defconfig // Project configuration file, which differs depending on the model used
|                                //For details, please refer to the definition of the CONFIG_UBOOT_CONFIG parameter in Alkaid defconfig.
└── ....

2.3. kernel

The directory structure is basically consistent with the original kernel. The main directories that require user's attention include:

.
├── ....
├── arch
│   └── arm
│        ├──boot
│        │    └──dts
│        │        └──iford-ssc029a-s01a-dualos.dts // Device tree file
│        └── configs
│             └── iford_ssc029a_s01a_lh_spinand_defconfig // Project configuration file, which differs depending on the model used
|                            // For details, please refer to the definition of the CONFIG_KERNEL_CONFIG parameter in Alkaid defconfig.
├── drivers
│   └── sstar // Peripheral drivers provided by SigmaStar
└── ....

2.4. sdk

sdk
├── verify
│     └── mi_demo    // Complete MI demo provided by SigmaStar. We recommend that you refer only to RTOS_preload demo.
│     └── sample_code
│          ├──source // Various demo examples. You can also add your own demos here.
│          │    └──Makefile // You have to add the demo name under the judgment of DualOS on here to complete the compilation.
│          └──out // After compilation, you can find the bin file here.
|── driver
|     └──SensorDriver// Sensor driver source code, which is also used by RTOS
|
└── linux // After decoupling SDK from kernel, SDK compiles the required source code. Dualos does not support decoupling SDK from kernel, so there is no need to pay attention to this directory.

2.5. project

.
├── board // Board related
│   ├── iford
│   │   ├── boot
│   │   │   └── nor/nand
│   │   │       ├── ipl-dualos // Used to store the IPL/IPL_CUST required by DualOS. Users who want to switch to other versions can find it here.
│   │   │       │   ├── IPL.bin
│   │   │       │   └── IPL_CUST.bin
│   │   │       └── partition // Used to store flash list file.
│   │   │           ├── flash_list.nri
│   │   │           └── flash.nri
│   │   ├── dla_file // If the chip contains IPU function, there will be corresponding IPU FW bin and model bin.
│   │   ├── iqfile // IQ file
│   │   ├── json // The external parameter json file obtained through MI; whether the RTOS needs to preload video or audio is also configured here.
│   |──rtos // RTOS will read these files; the files in this directory will generally be copied to the /misc directory on the board side.
│   │   ├── 200X131.argb1555 // argb file
│   │   ├── hanzi_16x16 // font file
│   │   ├── rtos.sz // The compiled RTOS bin file. After compiling the project here, it will be automatically copied to the out/image directory.
│   │   └── PreloadSetting.txt // Streaming information file used by RTOS demo
│   └── uboot // Default U-Boot packaging file
├── configs
│   └── verify
│   |   └── defconfigs
|   |       └── ipc-rtos_iford.spinand.glibc-11.1.0-ramdisk.ssc029a.512.bga12_ddr4_defconfig // Project configuration files, such as KERNEL/MMA/SENSORIQ configuration, etc. Different models use different configuration files. Here SSM000C-S01A-S model is taken as an example.
├── image // All configuration files/tools/scripts for image creation
│   ├── build // Pre-compiled image creation tools, like lfs/fwfs
│   ├── busybox // Pre-compiled busybox
│   ├── configs // Partition related configuration files. Please pay special attention to the following:
│   │   └── general
│   │       ├── customer.mk // Determines which files to be packaged into the customer partition (UBI) and output the execution commands to the script
│   │       ├── misc.mk// Determines which files to be packaged into the misc partition (FWFS)
│   │       ├── miservice.mk// Determines which files to be packaged into the miservice partition (UBI). Generally, MI dynamic libraries and kernel KO are stored here.
│   │       ├── ramdisk.mk// Determines which files to be packaged into ramdisk and which applications to execute in the startup script. The ramdisk is also the real first rootfs to be mounted.
│   │       ├── rootfs_fastboot.mk // rootfs fastboot version
│   │       ├── rootfs.mk // Same as above, also used to manage roofs packaging information. This is the second rootfs to be mounted, to ramdisk actually. For details, see ramdisk.mk.
│   │       ├── nor-ramdisk.rtos.partition.config // NOR flash partition script
│   │       └── spinand-ramdisk.rtos.partition.config // NAND flash partition script. All partition information is configured here, including the above mentioned IPL selections.
│   ├── image.mk // The partition creation script, based on the partition table information, will call the corresponding tool to create the corresponding bin file, under images/ directory,
│   │             //and generate partition table images/boot/PARTINFO.pni.
│   ├── ota.mk // If you use the OTA tool provided by SigmaStar, the file here is the corresponding script for making OTA bin.
│   ├── script.mk // The script used to create partition burning is generated in images/scripts. Generally, when uboot is burning, this script will be called to erase/write the flash.
│   ├── etc
│   │   └── init.d // System initialization configuration
│   ├── firmwarefs-fuse // fwfs Linux application
│   ├── fuse // Library required for lfs or fwfs execution
│   ├── littlefs-fuse // lfs Linux application
│   ├── makefiletools // Tool for making rootfs
│   ├── rootfs // rootfs package
│   └── systemtap // kernel debugging tools
├── kbuild
│   └── customize
│       └── 5.10
│           └── iford
│               └── ipc-rtos──nor/nand // Mainly focus on the following script, which determines which ko files will be copied from the kernel to the project and ramdisk
├── release
│   ├── chip
│   │   └── iford // SDK corresponding library file
│   │       └── ipc-rtos // Files mainly for DualOS
│   └── include // SDK header file
├── scripts // Scripts used by the project. Attention not required on user side
└── tools // Debugging tool like iqtool

2.6. Reference

Reference includes power consumption, performance, hardware unit test reports, and hardware information.