After extracting the SDK release package, the directory structure is as follows:
GK7206/
├── build # Core build system
│ ├── base.mk # Base make rules; defines shared variables such as SDK_KO_DIR and compilers
│ ├── root.mk # Top-level make rules, symlinked as the Makefile in the SDK root
│ ├── kernel.mk # Linux kernel build rules
│ ├── bootloader.mk # U-Boot build rules
│ ├── rootfs_image.mk # rootfs image packaging rules (JFFS2/YAFFS2/EXT4)
│ ├── sdk_ko_rules.mk # Build/output rules for .ko driver modules
│ ├── sdk_lib_rules.mk # Build/output rules for SDK shared libraries
│ ├── env.sh # Build environment variable script
│ └── load # Common loader functions used during the build
│
├── run.sh # One-shot build entry script (wrapper around make all)
│ # Usage: ./run.sh [chip_type] [options]
│
├── cfg.mk # Currently active SDK configuration file
│ # Defines chip model, toolchain, kernel version, flash type, etc.
│ # Generated by menuconfig; similar to .config in Linux
│
├── configs # Board/chip configuration directory
│ ├── xm7206v11a/ # Configuration for xm7206v11a
│ │ ├── prebuilts/ # Prebuilt files (partition table XML, bootargs.bin, etc.)
│ │ ├── reg/ # Register configuration files
│ │ └ *_cfg.mk # Configuration Makefile for each EVB board
│ ├── xm7206v12a/ # Configuration for xm7206v12a (same layout)
│ ├── xm7206v11/ # Configuration for other chip variants...
│ └── ...
│
├── develop_env.sh # Development environment initialization script
│ # Installs Ubuntu build dependencies (gperf, automake, etc.)
│ # Requires sudo
│
├── env_tools # Sources for environment tools
│ ├── gperf-3.1/ # gperf hash generator
│ └ automake-1.15.1/ # automake build tool
│ # develop_env.sh builds and installs both
│
├── Makefile -> ./build/root.mk # Top-level Makefile (symlink)
│ # `make` actually invokes build/root.mk
│
├── mcu # MCU / RISC-V subsystem
│ ├── media/ # MCU media processing
│ └ riscv/ # RISC-V core code
│ # Used for low-power modes, AOV, and similar features
│
├── open_source # Third-party open-source components
│ ├── busybox/ # BusyBox (embedded Linux tool set)
│ ├── dropbear/ # SSH server
│ ├── mtd-utils/ # Flash tools (flashcp, nanddump, etc.)
│ ├── e2fsprogs/ # ext2/3/4 filesystem tools
│ ├── zlib/ lz4/ zstd/ # Compression libraries
│ ├── gdb/ # GDB debugger
│ └── ... # 20+ other open-source components
│
├── out # Build output directory (split by chip model)
│ ├── xm7206v11a/ # Build output for xm7206v11a
│ │ ├── ko/ # All .ko driver modules (packed into rootfs/opt/ko)
│ │ ├── lib/ # SDK shared libraries
│ │ ├── rootfs/ # Final rootfs directory tree
│ │ ├── image/ # Flashable images
│ │ │ ├── spi_image/ # SPI-NOR images
│ │ │ ├── emmc_image/ # eMMC images
│ │ │ └── nand_image/ # NAND images
│ │ ├── linux-5.10.y/ # Kernel build directory
│ │ └ boot_builddir/ # U-Boot build directory
│ ├── xm7206v12a/ # Build output for xm7206v12a (same layout)
│ └── spidev_test/ # SPI device test tool
│
├── sample # Official SDK sample programs
│ ├── common/ # Shared code (sample_comm_*.c)
│ ├── vio/ # Video input/output samples
│ ├── venc/ # Video encoding samples
│ ├── audio/ # Audio samples
│ ├── npu/ # NPU neural-network samples
│ ├── vo/ # Video output/HDMI samples
│ ├── fb/ # Framebuffer samples
│ ├── tde/ # TDE 2D acceleration samples
│ ├── ive/ # IVE image processing samples
│ ├── cipher/ # Crypto module samples
│ ├── pm/ # Power management samples
│ ├── quickstart/ # Quick start samples
│ └── ...
│
├── app_sample # Application-layer samples (your own applications)
│ ├── face_recognize/ # Face recognition application
│ └ rpi_detector/ # Raspberry Pi detector
│
├── source # Core source code
│ ├── bootloader/ # U-Boot source
│ │ ├── u-boot-2020.01/ # U-Boot 2020.01
│ │ ├── product/ # XMEDIA product customizations
│ │ └ secureboot/ # Secure boot support
│ ├── kernel/ # Linux kernel source
│ │ ├── linux-4.9.y/ # Kernel 4.9
│ │ ├── linux-5.10.y/ # Kernel 5.10 (currently used)
│ ├── gmp/ # XMEDIA media platform SDK (core!)
│ │ ├── drv/ # Driver source (built into .ko)
│ │ ├── usr/ # User-space library source (built into .so)
│ │ ├── include/ # SDK headers
│ │ └ ko/ # Prebuilt ko directory
│ ├── rootfs/ # rootfs build scripts
│ │ ├── scripts/ # rootfs.tgz source package, Makefile
│ │ ├── busybox/ # BusyBox build configuration
│ │ ├── dropbear/ # SSH build configuration
│ │ └── ...
│ ├── trusted-firmware/ # ARM Trusted Firmware (ATF)
│ ├── initramdisk/ # Initial ramdisk
│ └── app/ # Application source
│ └ factory_test/ # Factory test program
│
├── tools # Tool scripts
│ ├── linux/ # Linux host tools
│ │ ├── toolchains/ # Cross-compilation toolchains
│ │ ├── pq_board/ # PQ picture-quality tuning tools
│ │ ├── aq_board/ # AQ audio-quality tuning tools
│ │ ├── kconfig/ # menuconfig tool
│ │ └ utils/ # Miscellaneous helper tools
│ └── windows/ # Windows host tools
│
├── version_config # SDK version/configuration management
│ ├── main_config # menuconfig main menu entry
│ ├── config.base # Base configuration options
│ ├── config.board # Board-level configuration options
│ ├── config.bootloader # Bootloader configuration options
│ ├── config.kernel # Kernel configuration options
│ ├── config.system # System configuration options
│ └ config.filesystem # Filesystem configuration
│ └ config.flash # Flash type configuration
│ └ config.tools # Tool configuration
│
└── tar_rootfs.sh # Helper script to package rootfs.tgz manually
Tip
The
out/directory is created only after the first build and holds all build artifacts.cfg.mkis the currently selected board configuration and determines the target hardware for the build.