mirror of
https://github.com/sipeed/LicheeRV-Nano-Build.git
synced 2026-09-11 05:09:56 -05:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
232f2234ff | ||
|
|
ddd40cd715 | ||
|
|
77980ffd0c | ||
|
|
55a54911f7 | ||
|
|
7497e5bc7e | ||
|
|
686c7cb01f | ||
|
|
5e4c168c05 | ||
|
|
262ebabb01 | ||
|
|
a04c837678 | ||
|
|
a5cee7efae | ||
|
|
feda65ed94 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,6 +1,7 @@
|
||||
*~
|
||||
*.swp
|
||||
host-tools/
|
||||
*.sqfs
|
||||
build/tools/common/sd_tools/genimage.cfg.tmp
|
||||
fsbl/build/*
|
||||
install/*
|
||||
|
||||
31
README.md
31
README.md
@@ -1,13 +1,36 @@
|
||||
# LicheeRV-Nano-Build
|
||||
|
||||
# how to build
|
||||
# download source
|
||||
|
||||
```
|
||||
git clone https://github.com/LicheeRV-Nano-Build --depth=1
|
||||
git clone https://github.com/sipeed/LicheeRV-Nano-Build --depth=1
|
||||
cd LicheeRV-Nano-Build
|
||||
wget https://sophon-file.sophon.cn/sophon-prod-s3/drive/23/03/07/16/host-tools.tar.gz
|
||||
tar xf host-tools.tar.gz
|
||||
git clone https://github.com/sophgo/host-tools --depth=1
|
||||
```
|
||||
|
||||
## host environment
|
||||
|
||||
you can use container:
|
||||
|
||||
```
|
||||
cd host/ubuntu
|
||||
docker build -t licheervnano-build-ubuntu .
|
||||
docker run --name licheervnano-build-ubuntu
|
||||
docker export | sqfstar licheervnano-build-ubuntu.sqfs
|
||||
singularity shell -e licheervnano-build-ubuntu.sqfs
|
||||
```
|
||||
|
||||
# build it
|
||||
|
||||
```
|
||||
source build/cvisetup.sh
|
||||
# C906:
|
||||
defconfig sg2002_licheervnano_sd
|
||||
# A53:
|
||||
# defconfig sg2002_licheea53nano_sd
|
||||
build_all
|
||||
```
|
||||
|
||||
# build fail
|
||||
|
||||
on some system, qt5svg or qt5base will build failed on first build, please retryby command build_all
|
||||
|
||||
@@ -559,6 +559,7 @@ br-rootfs-pack:
|
||||
# ${Q}rm -rf $(BR_ROOTFS_DIR)/*
|
||||
# copy rootfs to rawimg dir
|
||||
${Q}cp $(BR_DIR)/output/images/rootfs.ext4 $(OUTPUT_DIR)/rawimages/rootfs.$(STORAGE_TYPE)
|
||||
${Q}tar zcvf $(OUTPUT_DIR)/licheervnano-drivers.tar.gz $(BR_DIR)/output/target/mnt
|
||||
$(call raw2cimg ,rootfs.$(STORAGE_TYPE))
|
||||
|
||||
ifeq ($(CONFIG_BUILDROOT_FS),y)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
},
|
||||
|
||||
"cv181x": {
|
||||
"cv181x": ["cv1811ha", "cv1812cp", "cv1812h", "cv1813h"]
|
||||
"cv181x": ["cv1812cp", "cv1812h", "cv1813h"]
|
||||
},
|
||||
|
||||
"cv180x": {
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
CONFIG_CHIP_cv1811ha=y
|
||||
CONFIG_BOARD_wevb_0007a_spinor=y
|
||||
CONFIG_DDR_CFG_ddr3_1866_x16=y
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
CONFIG_KERNEL_ENTRY_HACK=y
|
||||
CONFIG_KERNEL_ENTRY_HACK_ADDR="0x80108000"
|
||||
CONFIG_TOOLCHAIN_GLIBC_ARM=y
|
||||
CONFIG_FLASH_SIZE_SHRINK=y
|
||||
CONFIG_BOOT_IMAGE_SINGLE_DTB=y
|
||||
CONFIG_STORAGE_TYPE_spinor=y
|
||||
CONFIG_SENSOR_GCORE_GC2053=y
|
||||
CONFIG_SENSOR_GCORE_GC2053_1L=y
|
||||
CONFIG_SENSOR_GCORE_GC2093=y
|
||||
CONFIG_SENSOR_GCORE_GC4653=y
|
||||
CONFIG_SENSOR_PIXELPLUS_PR2020=y
|
||||
CONFIG_SENSOR_SONY_IMX307=y
|
||||
CONFIG_SENSOR_SONY_IMX327=y
|
||||
CONFIG_UBOOT_2021_10=y
|
||||
CONFIG_KERNEL_SRC_5.10=y
|
||||
CONFIG_KERNEL_SRC="linux_5.10"
|
||||
CONFIG_KERNEL_LZMA=y
|
||||
CONFIG_SKIP_RAMDISK=y
|
||||
CONFIG_USE_4K_ERASE_SIZE_FOR_JFFS2=y
|
||||
CONFIG_SENSOR_TUNING_PARAM_cv181x_src_gcore_gc4653=y
|
||||
# CONFIG_ROOTFS_OVERLAYFS is not set
|
||||
CONFIG_TARGET_PACKAGE_DROPBEAR=y
|
||||
CONFIG_TARGET_PACKAGE_MTD-UTILS=y
|
||||
# CONFIG_TARGET_PACKAGE_RSYSLOG is not set
|
||||
# CONFIG_TARGET_PACKAGE_GATORD is not set
|
||||
@@ -1,10 +0,0 @@
|
||||
/dts-v1/;
|
||||
#include "cv181x_base_arm.dtsi"
|
||||
#include "cv181x_asic_bga.dtsi"
|
||||
#include "cv181x_asic_spinor.dtsi"
|
||||
#include "cv181x_default_memmap.dtsi"
|
||||
|
||||
/ {
|
||||
|
||||
};
|
||||
|
||||
@@ -1,282 +0,0 @@
|
||||
CONFIG_KERNEL_XZ=y
|
||||
# CONFIG_SWAP is not set
|
||||
CONFIG_SYSVIPC=y
|
||||
CONFIG_POSIX_MQUEUE=y
|
||||
CONFIG_NO_HZ_IDLE=y
|
||||
CONFIG_HIGH_RES_TIMERS=y
|
||||
CONFIG_PREEMPT=y
|
||||
CONFIG_LOG_BUF_SHIFT=15
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
# CONFIG_UID16 is not set
|
||||
# CONFIG_SYSFS_SYSCALL is not set
|
||||
# CONFIG_FHANDLE is not set
|
||||
# CONFIG_BASE_FULL is not set
|
||||
# CONFIG_AIO is not set
|
||||
CONFIG_EMBEDDED=y
|
||||
# CONFIG_SLUB_DEBUG is not set
|
||||
CONFIG_ARM_LPAE=y
|
||||
CONFIG_SWP_EMULATE=y
|
||||
# CONFIG_VDSO is not set
|
||||
CONFIG_HAVE_ARM_ARCH_TIMER=y
|
||||
CONFIG_ARM_PSCI=y
|
||||
CONFIG_THUMB2_KERNEL=y
|
||||
CONFIG_FORCE_MAX_ZONEORDER=10
|
||||
# CONFIG_ATAGS is not set
|
||||
CONFIG_VFP=y
|
||||
CONFIG_NEON=y
|
||||
# CONFIG_SUSPEND is not set
|
||||
CONFIG_ARCH_CVITEK=y
|
||||
CONFIG_ARCH_CV181X=y
|
||||
CONFIG_ARCH_CVITEK_CHIP="mars"
|
||||
CONFIG_ARCH_CV181X_ASIC=y
|
||||
CONFIG_POWER_RESET=y
|
||||
# CONFIG_STACKPROTECTOR is not set
|
||||
CONFIG_MODULES=y
|
||||
CONFIG_MODULE_FORCE_LOAD=y
|
||||
CONFIG_MODULE_UNLOAD=y
|
||||
# CONFIG_LBDAF is not set
|
||||
# CONFIG_BLK_DEV_BSG is not set
|
||||
# CONFIG_IOSCHED_DEADLINE is not set
|
||||
# CONFIG_IOSCHED_CFQ is not set
|
||||
# CONFIG_MQ_IOSCHED_DEADLINE is not set
|
||||
# CONFIG_MQ_IOSCHED_KYBER is not set
|
||||
# CONFIG_COREDUMP is not set
|
||||
CONFIG_CMA=y
|
||||
CONFIG_NET=y
|
||||
CONFIG_PACKET=y
|
||||
CONFIG_UNIX=y
|
||||
CONFIG_INET=y
|
||||
# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
|
||||
# CONFIG_INET_XFRM_MODE_TUNNEL is not set
|
||||
# CONFIG_INET_XFRM_MODE_BEET is not set
|
||||
# CONFIG_INET_DIAG is not set
|
||||
# CONFIG_IPV6 is not set
|
||||
CONFIG_CFG80211=m
|
||||
CONFIG_RFKILL=y
|
||||
CONFIG_DEVTMPFS=y
|
||||
CONFIG_DEVTMPFS_MOUNT=y
|
||||
# CONFIG_ALLOW_DEV_COREDUMP is not set
|
||||
CONFIG_DMA_CMA=n
|
||||
CONFIG_CMA_SIZE_MBYTES=0
|
||||
CONFIG_MTD=y
|
||||
CONFIG_MTD_CMDLINE_PARTS=y
|
||||
# CONFIG_MTD_OF_PARTS is not set
|
||||
CONFIG_MTD_BLOCK=y
|
||||
CONFIG_MTD_NAND=y
|
||||
CONFIG_MTD_RAW_NAND=y
|
||||
CONFIG_MTD_NAND_PLATFORM=y
|
||||
CONFIG_MTD_NAND_CVSNFC=y
|
||||
CONFIG_MTD_SPI_NOR=y
|
||||
CONFIG_SPI_CVI_SPIF=y
|
||||
CONFIG_MTD_UBI=y
|
||||
CONFIG_MTD_UBI_BLOCK=y
|
||||
CONFIG_NETDEVICES=y
|
||||
# CONFIG_NET_CORE is not set
|
||||
# CONFIG_NET_VENDOR_ALACRITECH is not set
|
||||
# CONFIG_NET_VENDOR_AMAZON is not set
|
||||
# CONFIG_NET_VENDOR_AQUANTIA is not set
|
||||
# CONFIG_NET_VENDOR_ARC is not set
|
||||
# CONFIG_NET_VENDOR_AURORA is not set
|
||||
# CONFIG_NET_VENDOR_BROADCOM is not set
|
||||
# CONFIG_NET_VENDOR_CADENCE is not set
|
||||
# CONFIG_NET_VENDOR_CAVIUM is not set
|
||||
# CONFIG_NET_VENDOR_CIRRUS is not set
|
||||
# CONFIG_NET_VENDOR_CORTINA is not set
|
||||
# CONFIG_NET_VENDOR_EZCHIP is not set
|
||||
# CONFIG_NET_VENDOR_FARADAY is not set
|
||||
# CONFIG_NET_VENDOR_HISILICON is not set
|
||||
# CONFIG_NET_VENDOR_HUAWEI is not set
|
||||
# CONFIG_NET_VENDOR_INTEL is not set
|
||||
# CONFIG_NET_VENDOR_MARVELL is not set
|
||||
# CONFIG_NET_VENDOR_MELLANOX is not set
|
||||
# CONFIG_NET_VENDOR_MICREL is not set
|
||||
# CONFIG_NET_VENDOR_MICROCHIP is not set
|
||||
# CONFIG_NET_VENDOR_MICROSEMI is not set
|
||||
# CONFIG_NET_VENDOR_NATSEMI is not set
|
||||
# CONFIG_NET_VENDOR_NETRONOME is not set
|
||||
# CONFIG_NET_VENDOR_NI is not set
|
||||
# CONFIG_NET_VENDOR_QUALCOMM is not set
|
||||
# CONFIG_NET_VENDOR_RENESAS is not set
|
||||
# CONFIG_NET_VENDOR_ROCKER is not set
|
||||
# CONFIG_NET_VENDOR_SAMSUNG is not set
|
||||
# CONFIG_NET_VENDOR_SEEQ is not set
|
||||
# CONFIG_NET_VENDOR_SOLARFLARE is not set
|
||||
# CONFIG_NET_VENDOR_SMSC is not set
|
||||
# CONFIG_NET_VENDOR_SOCIONEXT is not set
|
||||
CONFIG_STMMAC_ETH=y
|
||||
# CONFIG_DWMAC_GENERIC is not set
|
||||
# CONFIG_NET_VENDOR_SYNOPSYS is not set
|
||||
# CONFIG_NET_VENDOR_VIA is not set
|
||||
# CONFIG_NET_VENDOR_WIZNET is not set
|
||||
CONFIG_CVITEK_PHY=y
|
||||
# CONFIG_USB_NET_DRIVERS is not set
|
||||
# CONFIG_WLAN_VENDOR_ADMTEK is not set
|
||||
# CONFIG_WLAN_VENDOR_ATH is not set
|
||||
# CONFIG_WLAN_VENDOR_ATMEL is not set
|
||||
# CONFIG_WLAN_VENDOR_BROADCOM is not set
|
||||
# CONFIG_WLAN_VENDOR_CISCO is not set
|
||||
# CONFIG_WLAN_VENDOR_INTEL is not set
|
||||
# CONFIG_WLAN_VENDOR_INTERSIL is not set
|
||||
# CONFIG_WLAN_VENDOR_MARVELL is not set
|
||||
# CONFIG_WLAN_VENDOR_MEDIATEK is not set
|
||||
# CONFIG_WLAN_VENDOR_RALINK is not set
|
||||
CONFIG_RTL8188FU=m
|
||||
# CONFIG_WLAN_VENDOR_RSI is not set
|
||||
# CONFIG_WLAN_VENDOR_ST is not set
|
||||
# CONFIG_WLAN_VENDOR_TI is not set
|
||||
# CONFIG_WLAN_VENDOR_ZYDAS is not set
|
||||
CONFIG_INPUT=y
|
||||
# CONFIG_SERIO is not set
|
||||
# CONFIG_VT is not set
|
||||
# CONFIG_LEGACY_PTYS is not set
|
||||
CONFIG_SERIAL_8250=y
|
||||
CONFIG_SERIAL_8250_CONSOLE=y
|
||||
CONFIG_SERIAL_8250_NR_UARTS=5
|
||||
CONFIG_SERIAL_8250_RUNTIME_UARTS=5
|
||||
CONFIG_SERIAL_8250_DW=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_SMBUS=y
|
||||
CONFIG_I2C_CHARDEV=y
|
||||
CONFIG_I2C_DESIGNWARE_PLATFORM=y
|
||||
CONFIG_SPI=y
|
||||
# CONFIG_PTP_1588_CLOCK is not set
|
||||
CONFIG_CVITEK_PINCTRL_CV1835=y
|
||||
CONFIG_GPIOLIB=y
|
||||
CONFIG_GPIO_SYSFS=y
|
||||
CONFIG_GPIO_DWAPB=y
|
||||
CONFIG_THERMAL=y
|
||||
CONFIG_THERMAL_NETLINK=y
|
||||
CONFIG_THERMAL_WRITABLE_TRIPS=y
|
||||
CONFIG_THERMAL_EMULATION=y
|
||||
CONFIG_WATCHDOG=y
|
||||
CONFIG_MEDIA_SUPPORT=n
|
||||
CONFIG_VIDEO_CVITEK=m
|
||||
CONFIG_VIDEO_CVITEK_CIF=m
|
||||
CONFIG_VIDEO_CVITEK_SNS_I2C=m
|
||||
CONFIG_VIDEO_CVITEK_MIPI_TX=m
|
||||
CONFIG_FB=y
|
||||
CONFIG_FB_CVITEK=m
|
||||
CONFIG_SOUND=y
|
||||
CONFIG_SND=y
|
||||
# CONFIG_SND_SUPPORT_OLD_API is not set
|
||||
# CONFIG_SND_PROC_FS is not set
|
||||
# CONFIG_SND_DRIVERS is not set
|
||||
CONFIG_SND_HDA_PREALLOC_SIZE=n
|
||||
# CONFIG_SND_ARM is not set
|
||||
# CONFIG_SND_SPI is not set
|
||||
# CONFIG_SND_USB is not set
|
||||
CONFIG_SND_SOC=y
|
||||
CONFIG_SND_SOC_CV182XA_CV182XAADC=y
|
||||
CONFIG_SND_SOC_CV182XA_CV182XADAC=y
|
||||
CONFIG_SND_CV1835_I2S=y
|
||||
CONFIG_SND_SOC_CV182XAADC=y
|
||||
CONFIG_SND_SOC_CV182XADAC=y
|
||||
# CONFIG_SND_SOC_CV182X_CV182XPDM is not set
|
||||
# CONFIG_SND_SOC_CV1835PDM is not set
|
||||
# CONFIG_SND_SOC_CV1835_CONCURRENT_I2S is not set
|
||||
CONFIG_SND_SOC_CV1835_USE_AUDIO_PLL=y
|
||||
CONFIG_CV1835_I2S_SUBSYS=y
|
||||
CONFIG_WATCHDOG_CORE=y
|
||||
CONFIG_MMC=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_PLTFM=y
|
||||
CONFIG_MMC_SDHCI_CVI=y
|
||||
CONFIG_DMADEVICES=n
|
||||
CONFIG_DW_DMAC_CVITEK=n
|
||||
# CONFIG_VIRTIO_MENU is not set
|
||||
CONFIG_STAGING=y
|
||||
CONFIG_ION=y
|
||||
CONFIG_ION_SYSTEM_HEAP=y
|
||||
CONFIG_ION_CARVEOUT_HEAP=y
|
||||
CONFIG_ION_CMA_HEAP=y
|
||||
# CONFIG_IOMMU_SUPPORT is not set
|
||||
CONFIG_CV1835_SYSDMA_REMAP=n
|
||||
CONFIG_PWM=y
|
||||
CONFIG_ANDROID=y
|
||||
# CONFIG_TEE=y
|
||||
# CONFIG_OPTEE=y
|
||||
# CONFIG_MANDATORY_FILE_LOCKING is not set
|
||||
CONFIG_MSDOS_FS=y
|
||||
CONFIG_VFAT_FS=y
|
||||
# CONFIG_PROC_PAGE_MONITOR is not set
|
||||
CONFIG_TMPFS=y
|
||||
CONFIG_CONFIGFS_FS=m
|
||||
CONFIG_JFFS2_FS=y
|
||||
CONFIG_JFFS2_FS_WBUF_VERIFY=y
|
||||
CONFIG_UBIFS_FS=y
|
||||
CONFIG_SQUASHFS=y
|
||||
CONFIG_SQUASHFS_FILE_DIRECT=y
|
||||
# CONFIG_SQUASHFS_ZLIB is not set
|
||||
CONFIG_SQUASHFS_XZ=y
|
||||
CONFIG_SQUASHFS_EMBEDDED=y
|
||||
CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=1
|
||||
CONFIG_NETWORK_FILESYSTEMS=y
|
||||
CONFIG_NFS_FS=y
|
||||
CONFIG_NFS_V2=y
|
||||
CONFIG_NFS_V3=y
|
||||
CONFIG_ROOT_NFS=y
|
||||
CONFIG_NLS_CODEPAGE_437=y
|
||||
CONFIG_NLS_ISO8859_1=y
|
||||
CONFIG_NLS_ISO8859_2=y
|
||||
CONFIG_NLS_ISO8859_3=y
|
||||
# CONFIG_CRYPTO_ECHAINIV is not set
|
||||
CONFIG_CRYPTO_SHA256=y
|
||||
# CONFIG_CRYPTO_HW is not set
|
||||
# CONFIG_XZ_DEC_X86 is not set
|
||||
# CONFIG_XZ_DEC_POWERPC is not set
|
||||
# CONFIG_XZ_DEC_IA64 is not set
|
||||
# CONFIG_XZ_DEC_ARMTHUMB is not set
|
||||
# CONFIG_XZ_DEC_SPARC is not set
|
||||
CONFIG_PRINTK_TIME=y
|
||||
# CONFIG_ENABLE_MUST_CHECK is not set
|
||||
CONFIG_DEBUG_FS=y
|
||||
# CONFIG_SCHED_DEBUG is not set
|
||||
# CONFIG_DEBUG_PREEMPT is not set
|
||||
# CONFIG_DEBUG_BUGVERBOSE is not set
|
||||
# CONFIG_FTRACE is not set
|
||||
# CONFIG_RUNTIME_TESTING_MENU is not set
|
||||
# CONFIG_MTD_SPI_NOR_USE_4K_SECTORS is not set
|
||||
|
||||
CONFIG_RTC_CLASS=y
|
||||
|
||||
CONFIG_BLK_DEV_LOOP=y
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_CHR_DEV_SG=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_OTG=y
|
||||
CONFIG_USB_OTG_FSM=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
CONFIG_USB_LIBCOMPOSITE=y
|
||||
CONFIG_USB_F_ACM=y
|
||||
CONFIG_USB_U_SERIAL=y
|
||||
CONFIG_USB_U_ETHER=y
|
||||
CONFIG_USB_U_AUDIO=y
|
||||
CONFIG_USB_F_SERIAL=y
|
||||
CONFIG_USB_F_ECM=y
|
||||
CONFIG_USB_F_EEM=y
|
||||
CONFIG_USB_F_RNDIS=y
|
||||
CONFIG_USB_F_MASS_STORAGE=y
|
||||
CONFIG_USB_F_UAC1=y
|
||||
CONFIG_USB_F_UVC=y
|
||||
CONFIG_USB_UAS=y
|
||||
CONFIG_USB_DWC2=m
|
||||
CONFIG_USB_DWC2_DUAL_ROLE=y
|
||||
CONFIG_USB_GADGET=y
|
||||
CONFIG_U_SERIAL_CONSOLE=y
|
||||
CONFIG_USB_CONFIGFS=y
|
||||
CONFIG_USB_CONFIGFS_SERIAL=y
|
||||
CONFIG_USB_CONFIGFS_ACM=y
|
||||
CONFIG_USB_CONFIGFS_ECM=y
|
||||
CONFIG_USB_CONFIGFS_RNDIS=y
|
||||
CONFIG_USB_CONFIGFS_EEM=y
|
||||
CONFIG_USB_CONFIGFS_MASS_STORAGE=y
|
||||
CONFIG_USB_CONFIGFS_F_FS=y
|
||||
CONFIG_USB_CONFIGFS_F_UAC1=y
|
||||
CONFIG_USB_CONFIGFS_F_UVC=y
|
||||
CONFIG_USB_CONFIGFS_F_FS=y
|
||||
CONFIG_USB_CONFIGFS_UEVENT=y
|
||||
CONFIG_USB_PHY=y
|
||||
CONFIG_USB_GPIO_VBUS=y
|
||||
@@ -1,85 +0,0 @@
|
||||
SIZE_1M = 0x100000
|
||||
SIZE_1K = 1024
|
||||
|
||||
|
||||
# Only attributes in class MemoryMap are generated to .h
|
||||
class MemoryMap:
|
||||
# No prefix "CVIMMAP_" for the items in _no_prefix[]
|
||||
_no_prefix = [
|
||||
"CONFIG_SYS_TEXT_BASE" # u-boot's CONFIG_SYS_TEXT_BASE is used without CPP.
|
||||
]
|
||||
|
||||
DRAM_BASE = 0x80000000
|
||||
DRAM_SIZE = 128 * SIZE_1M
|
||||
|
||||
# ==============
|
||||
# C906L FreeRTOS
|
||||
# ==============
|
||||
FREERTOS_SIZE = 768 * SIZE_1K
|
||||
# FreeRTOS is at the end of DRAM
|
||||
FREERTOS_ADDR = DRAM_BASE + DRAM_SIZE - FREERTOS_SIZE
|
||||
FSBL_C906L_START_ADDR = FREERTOS_ADDR
|
||||
|
||||
# ==============================
|
||||
# OpenSBI | arm-trusted-firmware
|
||||
# ==============================
|
||||
# Monitor is at the begining of DRAM
|
||||
MONITOR_ADDR = DRAM_BASE
|
||||
|
||||
ATF_SIZE = 512 * SIZE_1K
|
||||
OPENSBI_SIZE = 512 * SIZE_1K
|
||||
OPENSBI_FDT_ADDR = MONITOR_ADDR + OPENSBI_SIZE
|
||||
|
||||
# =========================
|
||||
# memory@DRAM_BASE in .dts.
|
||||
# =========================
|
||||
# Ignore the area of FreeRTOS in u-boot and kernel
|
||||
KERNEL_MEMORY_ADDR = DRAM_BASE
|
||||
KERNEL_MEMORY_SIZE = DRAM_SIZE - FREERTOS_SIZE
|
||||
|
||||
# =================
|
||||
# Multimedia buffer. Used by u-boot/kernel/FreeRTOS
|
||||
# =================
|
||||
ION_SIZE = 70 * SIZE_1M
|
||||
H26X_BITSTREAM_SIZE = 2 * SIZE_1M
|
||||
H26X_ENC_BUFF_SIZE = 0
|
||||
ISP_MEM_BASE_SIZE = 20 * SIZE_1M
|
||||
FREERTOS_RESERVED_ION_SIZE = H26X_BITSTREAM_SIZE + H26X_ENC_BUFF_SIZE + ISP_MEM_BASE_SIZE
|
||||
|
||||
# ION after FreeRTOS
|
||||
ION_ADDR = FREERTOS_ADDR - ION_SIZE
|
||||
|
||||
# Buffers of the fast image are inside the ION buffer
|
||||
H26X_BITSTREAM_ADDR = ION_ADDR
|
||||
H26X_ENC_BUFF_ADDR = H26X_BITSTREAM_ADDR + H26X_BITSTREAM_SIZE
|
||||
ISP_MEM_BASE_ADDR = H26X_ENC_BUFF_ADDR + H26X_ENC_BUFF_SIZE
|
||||
|
||||
assert ISP_MEM_BASE_ADDR + ISP_MEM_BASE_SIZE <= ION_ADDR + ION_SIZE
|
||||
|
||||
# Boot logo is after the ION buffer
|
||||
# Framebuffer uses boot logo's reserved memory
|
||||
BOOTLOGO_SIZE = 1800 * SIZE_1K
|
||||
BOOTLOGO_ADDR = ION_ADDR - BOOTLOGO_SIZE
|
||||
FRAMEBUFFER_SIZE = BOOTLOGO_SIZE
|
||||
FRAMEBUFFER_ADDR = BOOTLOGO_ADDR
|
||||
|
||||
# ===================
|
||||
# FSBL and u-boot-2021
|
||||
# ===================
|
||||
CVI_UPDATE_HEADER_SIZE = SIZE_1K
|
||||
UIMAG_SIZE = 16 * SIZE_1M
|
||||
|
||||
# kernel image loading buffer
|
||||
UIMAG_ADDR = DRAM_BASE + 24 * SIZE_1M
|
||||
CVI_UPDATE_HEADER_ADDR = UIMAG_ADDR - CVI_UPDATE_HEADER_SIZE
|
||||
|
||||
# FSBL decompress buffer
|
||||
FSBL_UNZIP_ADDR = UIMAG_ADDR
|
||||
FSBL_UNZIP_SIZE = UIMAG_SIZE
|
||||
|
||||
assert UIMAG_ADDR + UIMAG_SIZE <= BOOTLOGO_ADDR
|
||||
|
||||
# u-boot's run address and entry point
|
||||
CONFIG_SYS_TEXT_BASE = DRAM_BASE + 2 * SIZE_1M
|
||||
# u-boot's init stack point is only used before board_init_f()
|
||||
CONFIG_SYS_INIT_SP_ADDR = UIMAG_ADDR + UIMAG_SIZE
|
||||
@@ -1,9 +0,0 @@
|
||||
<physical_partition type="spinor">
|
||||
<partition label="fip" size_in_kb="1024" readonly="false" file="fip.bin"/>
|
||||
<partition label="BOOT" size_in_kb="3072" readonly="false" file="boot.spinor"/>
|
||||
<partition label="ENV" size_in_kb="64" file="" />
|
||||
<partition label="ENV_BAK" size_in_kb="64" file="" />
|
||||
<partition label="ROOTFS" size_in_kb="11264" readonly="false" file="rootfs.spinor" />
|
||||
<partition label="DATA" readonly="false" file="" mountpoint="/mnt/data" type="jffs2" />
|
||||
</physical_partition>
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
CONFIG_ARM=y
|
||||
CONFIG_SYS_MALLOC_F_LEN=0x2000
|
||||
CONFIG_NR_DRAM_BANKS=1
|
||||
CONFIG_DEFAULT_DEVICE_TREE="cv181x_asic"
|
||||
CONFIG_IDENT_STRING=" cvitek_cv181x"
|
||||
CONFIG_ARMV8_SET_SMPEN=y
|
||||
CONFIG_TARGET_CVITEK_CV181X=y
|
||||
CONFIG_CVITEK_SPI_FLASH=y
|
||||
CONFIG_DISTRO_DEFAULTS=y
|
||||
CONFIG_FIT=y
|
||||
# CONFIG_ARCH_FIXUP_FDT_MEMORY is not set
|
||||
CONFIG_BOOTDELAY=1
|
||||
# CONFIG_DISPLAY_CPUINFO is not set
|
||||
# CONFIG_DISPLAY_BOARDINFO is not set
|
||||
CONFIG_SYS_PROMPT="cv181x# "
|
||||
# CONFIG_CMD_CONSOLE is not set
|
||||
# CONFIG_CMD_XIMG is not set
|
||||
# CONFIG_CMD_EDITENV is not set
|
||||
# CONFIG_CMD_CRC32 is not set
|
||||
# CONFIG_CMD_LZMADEC is not set
|
||||
# CONFIG_CMD_UNLZ4 is not set
|
||||
# CONFIG_CMD_UNZIP is not set
|
||||
# CONFIG_CMD_LOADS is not set
|
||||
CONFIG_CMD_MMC=y
|
||||
# CONFIG_CMD_ITEST is not set
|
||||
CONFIG_CMD_CACHE=y
|
||||
CONFIG_CMD_CVI_SD_UPDATE=y
|
||||
# CONFIG_ISO_PARTITION is not set
|
||||
# CONFIG_EFI_PARTITION is not set
|
||||
CONFIG_OF_CONTROL=y
|
||||
CONFIG_NET_RANDOM_ETHADDR=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_SDMA=y
|
||||
CONFIG_MMC_SDHCI_CVITEK=y
|
||||
CONFIG_MTD=y
|
||||
# CONFIG_PHY_SMSC is not set
|
||||
CONFIG_DM_ETH=y
|
||||
CONFIG_ETH_DESIGNWARE=y
|
||||
CONFIG_PHY_CVITEK=y
|
||||
CONFIG_SYS_NS16550=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_LZ4=y
|
||||
CONFIG_LZMA=y
|
||||
# CONFIG_TOOLS_LIBCRYPTO is not set
|
||||
# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
|
||||
@@ -1,320 +0,0 @@
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/reset/cv181x-resets.h>
|
||||
#include <dt-bindings/clock/cv181x-clock.h>
|
||||
#include <dt-bindings/thermal/thermal.h>
|
||||
#include <dt-bindings/dma/cv181x-dmamap.h>
|
||||
#include "cvi_board_memmap.h"
|
||||
|
||||
/memreserve/ CVIMMAP_MONITOR_ADDR CVIMMAP_ATF_SIZE; // ATF (BL31 + BL32) 512KB
|
||||
|
||||
#include "cv181x_base.dtsi"
|
||||
|
||||
/ {
|
||||
model = "SOPHGO ASIC. ARM.";
|
||||
interrupt-parent = <&gic>;
|
||||
|
||||
#size-cells = <0x2>;
|
||||
#address-cells = <0x2>;
|
||||
|
||||
gic: interrupt-controller {
|
||||
compatible = "arm,cortex-a15-gic";
|
||||
ranges;
|
||||
#size-cells = <0x2>;
|
||||
#address-cells = <0x2>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <0x3>;
|
||||
reg = <0x0 0x01F01000 0x0 0x1000>,
|
||||
<0x0 0x01F02000 0x0 0x2000>;
|
||||
};
|
||||
|
||||
pmu_a53 {
|
||||
compatible = "arm,cortex-a53-pmu";
|
||||
interrupts = <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-affinity = <&A53_0>;
|
||||
};
|
||||
|
||||
psci {
|
||||
migrate = <0xc4000005>;
|
||||
cpu_on = <0xc4000003>;
|
||||
cpu_off = <0x84000002>;
|
||||
cpu_suspend = <0xc4000001>;
|
||||
sys_poweroff = <0x84000008>;
|
||||
sys_reset = <0x84000009>;
|
||||
method = "smc";
|
||||
compatible = "arm,psci-0.2", "arm,psci";
|
||||
};
|
||||
|
||||
cpus {
|
||||
#size-cells = <0x0>;
|
||||
#address-cells = <0x1>;
|
||||
|
||||
A53_0: cpu@0 {
|
||||
reg = <0x0>;
|
||||
enable-method = "psci";
|
||||
compatible = "arm,cortex-a53";
|
||||
device_type = "cpu";
|
||||
next-level-cache = <&CA53_L2>;
|
||||
};
|
||||
|
||||
CA53_L2: l2-cache0 {
|
||||
compatible = "cache";
|
||||
};
|
||||
};
|
||||
|
||||
timer {
|
||||
interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
|
||||
<GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
|
||||
<GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
|
||||
<GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>;
|
||||
always-on;
|
||||
clock-frequency = <25000000>;
|
||||
compatible = "arm,armv8-timer";
|
||||
};
|
||||
|
||||
firmware {
|
||||
optee {
|
||||
compatible = "linaro,optee-tz";
|
||||
method = "smc";
|
||||
};
|
||||
};
|
||||
|
||||
cooling:cooling {
|
||||
clocks = <&clk CV181X_CLK_A53>, <&clk CV181X_CLK_TPU>;
|
||||
clock-names = "clk_cpu", "clk_tpu_axi";
|
||||
dev-freqs = <800000000 500000000>,
|
||||
<400000000 375000000>,
|
||||
<400000000 300000000>;
|
||||
compatible = "sophgo,cooling";
|
||||
#cooling-cells = <2>;
|
||||
};
|
||||
|
||||
tpu {
|
||||
interrupts = <GIC_SPI 59 IRQ_TYPE_EDGE_RISING>,
|
||||
<GIC_SPI 60 IRQ_TYPE_EDGE_RISING>;
|
||||
};
|
||||
|
||||
mon {
|
||||
interrupts = <GIC_SPI 77 IRQ_TYPE_EDGE_RISING>;
|
||||
};
|
||||
|
||||
wiegand0 {
|
||||
interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
wiegand1 {
|
||||
interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
wiegand2 {
|
||||
interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
saradc {
|
||||
interrupts = <GIC_SPI 84 IRQ_TYPE_EDGE_RISING>;
|
||||
};
|
||||
|
||||
rtc {
|
||||
interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
sysdma_remap {
|
||||
int_mux = <0x1FF>; /* enable bit [0..8] for CPU0(CA53) */
|
||||
};
|
||||
|
||||
dmac: dma@0x4330000 {
|
||||
interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
#if 0
|
||||
watchdog0: cv-wd@0x3010000 {
|
||||
interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
#endif
|
||||
|
||||
spinand:cv-spinf@4060000 {
|
||||
interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
spif:cvi-spif@10000000 {
|
||||
interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
spi0:spi0@04180000 {
|
||||
interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
spi1:spi1@04190000 {
|
||||
interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
spi2:spi2@041A0000 {
|
||||
interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
spi3:spi3@041B0000 {
|
||||
interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
uart0: serial@04140000 {
|
||||
interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
uart1: serial@04150000 {
|
||||
interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
uart2: serial@04160000 {
|
||||
interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
uart3: serial@04170000 {
|
||||
interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
uart4: serial@041C0000 {
|
||||
interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
gpio0: gpio@03020000 {
|
||||
porta: gpio-controller@0 {
|
||||
interrupt-controller;
|
||||
interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
gpio1: gpio@03021000 {
|
||||
portb: gpio-controller@1 {
|
||||
interrupt-controller;
|
||||
interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
gpio2: gpio@03022000 {
|
||||
portc: gpio-controller@2 {
|
||||
interrupt-controller;
|
||||
interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
gpio3: gpio@03023000 {
|
||||
portd: gpio-controller@3 {
|
||||
interrupt-controller;
|
||||
interrupts = <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
gpio4: gpio@05021000 {
|
||||
porte: gpio-controller@4 {
|
||||
interrupt-controller;
|
||||
interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
i2c0: i2c@04000000 {
|
||||
interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
i2c1: i2c@04010000 {
|
||||
interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
i2c2: i2c@04020000 {
|
||||
interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
i2c3: i2c@04030000 {
|
||||
interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
i2c4: i2c@04040000 {
|
||||
interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
ethernet0: ethernet@4070000 {
|
||||
interrupt-names = "macirq";
|
||||
interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
emmc:cv-emmc@4300000 {
|
||||
interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
sd:cv-sd@4310000 {
|
||||
interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
i2s0: i2s@04100000 {
|
||||
interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
i2s1: i2s@04110000 {
|
||||
interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
i2s2: i2s@04120000 {
|
||||
interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
i2s3: i2s@04130000 {
|
||||
interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
wifisd:wifi-sd@4320000 {
|
||||
interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
mipi_rx: cif {
|
||||
interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "csi0", "csi1";
|
||||
};
|
||||
|
||||
vi {
|
||||
interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "isp";
|
||||
};
|
||||
|
||||
ive {
|
||||
interrupt-names = "ive_irq";
|
||||
interrupts = <GIC_SPI 81 IRQ_TYPE_EDGE_RISING>;
|
||||
};
|
||||
|
||||
vpss {
|
||||
interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "sc";
|
||||
};
|
||||
|
||||
dwa {
|
||||
interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "dwa";
|
||||
};
|
||||
|
||||
vcodec {
|
||||
interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "h265","h264","sbm";
|
||||
};
|
||||
|
||||
jpu {
|
||||
interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "jpeg";
|
||||
};
|
||||
|
||||
rtos_cmdqu {
|
||||
interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "mailbox";
|
||||
};
|
||||
|
||||
usb: usb@04340000 {
|
||||
interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
thermal:thermal@030E0000 {
|
||||
interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "tempsen";
|
||||
};
|
||||
|
||||
};
|
||||
@@ -1,12 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
files=`find . -name "cv181x_*.dtsi"`
|
||||
|
||||
for i in $files
|
||||
do
|
||||
echo $i
|
||||
filename=${i#*cv181x_}
|
||||
echo $filename
|
||||
mv $i soph_$filename
|
||||
|
||||
done
|
||||
@@ -865,13 +865,13 @@
|
||||
|
||||
trips {
|
||||
soc_thermal_trip_0: soc_thermal_trip_0 {
|
||||
temperature = <100000>; /* millicelsius */
|
||||
temperature = <110000>; /* millicelsius */
|
||||
hysteresis = <5000>; /* millicelsius */
|
||||
type = "passive";
|
||||
};
|
||||
|
||||
soc_thermal_trip_1: soc_thermal_trip_1 {
|
||||
temperature = <110000>; /* millicelsius */
|
||||
temperature = <120000>; /* millicelsius */
|
||||
hysteresis = <5000>; /* millicelsius */
|
||||
type = "passive";
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/dts-v1/;
|
||||
#include "soph_base_riscv.dtsi"
|
||||
#include "soph_asic_bga.dtsi"
|
||||
#include "soph_asic_emmc.dtsi"
|
||||
#include "soph_asic_sd.dtsi"
|
||||
#include "soph_default_memmap.dtsi"
|
||||
|
||||
/ {
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
<physical_partition type="emmc">
|
||||
<partition label="BOOT" size_in_kb="8192" file="boot.emmc" />
|
||||
<partition label="MISC" size_in_kb="512" file="logo.jpg" />
|
||||
<!-- Beware that in emmc u-boot environment should be 0x40000 alignment -->
|
||||
<partition label="ENV" size_in_kb="128" file="" />
|
||||
<partition label="ROOTFS" size_in_kb="70656" file="rootfs.emmc" />
|
||||
<partition label="SYSTEM" size_in_kb="40960" file="system.emmc" type="ext4" />
|
||||
<partition label="CFG" size_in_kb="15240" file="cfg.emmc" mountpoint="/mnt/cfg" type="ext4" />
|
||||
<partition label="DATA" size_in_kb="3145728" file="" mountpoint="/mnt/data" type="ext4"/>
|
||||
</physical_partition>
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
<physical_partition type="sd">
|
||||
<partition label="BOOT" size_in_kb="80960" readonly="false" file="boot.sd"/>
|
||||
<partition label="ROOTFS" size_in_kb="204800" readonly="false" file="rootfs.sd" />
|
||||
<partition label="DATA" size_in_kb="512000" readonly="false" file="data.sd" mountpoint="/mnt/data" type="ext4" />
|
||||
</physical_partition>
|
||||
@@ -1,5 +1,5 @@
|
||||
CONFIG_CHIP_sg2000=y
|
||||
CONFIG_BOARD_wevb_emmc=y
|
||||
CONFIG_BOARD_duo_sd=y
|
||||
CONFIG_DDR_CFG_ddr3_1866_x16=y
|
||||
CONFIG_ARCH="riscv"
|
||||
CONFIG_CROSS_COMPILE="riscv64-unknown-linux-gnu-"
|
||||
@@ -9,7 +9,7 @@ CONFIG_KERNEL_ENTRY_HACK_ADDR="0x80200000"
|
||||
CONFIG_TOOLCHAIN_MUSL_RISCV64=y
|
||||
CONFIG_FLASH_SIZE_SHRINK=y
|
||||
CONFIG_BOOT_IMAGE_SINGLE_DTB=y
|
||||
CONFIG_STORAGE_TYPE_emmc=y
|
||||
CONFIG_STORAGE_TYPE_sd=y
|
||||
CONFIG_SENSOR_GCORE_GC4653=y
|
||||
CONFIG_SENSOR_SMS_SC3335=y
|
||||
CONFIG_SENSOR_SMS_SC500AI=y
|
||||
|
||||
@@ -40,4 +40,4 @@ CONFIG_SPI=y
|
||||
CONFIG_LZ4=y
|
||||
CONFIG_LZMA=y
|
||||
# CONFIG_TOOLS_LIBCRYPTO is not set
|
||||
CONFIG_ENV_IS_IN_MMC=y
|
||||
CONFIG_ENV_IS_NOWHERE=y
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
/dts-v1/;
|
||||
#include "soph_base_arm.dtsi"
|
||||
#include "soph_asic_bga.dtsi"
|
||||
#include "soph_asic_sd.dtsi"
|
||||
#include "soph_default_memmap.dtsi"
|
||||
|
||||
/ {
|
||||
|
||||
sd:cv-sd@4310000 {
|
||||
max-frequency = <10000000>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -0,0 +1,284 @@
|
||||
CONFIG_KERNEL_XZ=y
|
||||
# CONFIG_SWAP is not set
|
||||
CONFIG_SYSVIPC=y
|
||||
CONFIG_POSIX_MQUEUE=y
|
||||
CONFIG_NO_HZ_IDLE=y
|
||||
CONFIG_HIGH_RES_TIMERS=y
|
||||
CONFIG_PREEMPT=y
|
||||
CONFIG_LOG_BUF_SHIFT=15
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
# CONFIG_UID16 is not set
|
||||
# CONFIG_SYSFS_SYSCALL is not set
|
||||
# CONFIG_FHANDLE is not set
|
||||
# CONFIG_BASE_FULL is not set
|
||||
# CONFIG_AIO is not set
|
||||
CONFIG_EMBEDDED=y
|
||||
# CONFIG_SLUB_DEBUG is not set
|
||||
CONFIG_ARM_LPAE=y
|
||||
CONFIG_SWP_EMULATE=y
|
||||
# CONFIG_VDSO is not set
|
||||
CONFIG_HAVE_ARM_ARCH_TIMER=y
|
||||
CONFIG_ARM_PSCI=y
|
||||
CONFIG_THUMB2_KERNEL=y
|
||||
CONFIG_FORCE_MAX_ZONEORDER=10
|
||||
# CONFIG_ATAGS is not set
|
||||
CONFIG_VFP=y
|
||||
CONFIG_NEON=y
|
||||
# CONFIG_SUSPEND is not set
|
||||
CONFIG_ARCH_CVITEK=y
|
||||
CONFIG_ARCH_CV181X=y
|
||||
CONFIG_ARCH_CVITEK_CHIP="mars"
|
||||
CONFIG_ARCH_CV181X_ASIC=y
|
||||
CONFIG_POWER_RESET=y
|
||||
# CONFIG_STACKPROTECTOR is not set
|
||||
CONFIG_MODULES=y
|
||||
CONFIG_MODULE_FORCE_LOAD=y
|
||||
CONFIG_MODULE_UNLOAD=y
|
||||
# CONFIG_LBDAF is not set
|
||||
# CONFIG_BLK_DEV_BSG is not set
|
||||
# CONFIG_IOSCHED_DEADLINE is not set
|
||||
# CONFIG_IOSCHED_CFQ is not set
|
||||
# CONFIG_MQ_IOSCHED_DEADLINE is not set
|
||||
# CONFIG_MQ_IOSCHED_KYBER is not set
|
||||
# CONFIG_COREDUMP is not set
|
||||
CONFIG_CMA=y
|
||||
CONFIG_NET=y
|
||||
CONFIG_PACKET=y
|
||||
CONFIG_UNIX=y
|
||||
CONFIG_INET=y
|
||||
# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
|
||||
# CONFIG_INET_XFRM_MODE_TUNNEL is not set
|
||||
# CONFIG_INET_XFRM_MODE_BEET is not set
|
||||
# CONFIG_INET_DIAG is not set
|
||||
# CONFIG_IPV6 is not set
|
||||
CONFIG_CFG80211=m
|
||||
CONFIG_RFKILL=y
|
||||
CONFIG_DEVTMPFS=y
|
||||
CONFIG_DEVTMPFS_MOUNT=y
|
||||
# CONFIG_ALLOW_DEV_COREDUMP is not set
|
||||
CONFIG_DMA_CMA=n
|
||||
CONFIG_CMA_SIZE_MBYTES=0
|
||||
CONFIG_MTD=y
|
||||
CONFIG_MTD_CMDLINE_PARTS=y
|
||||
# CONFIG_MTD_OF_PARTS is not set
|
||||
CONFIG_MTD_BLOCK=y
|
||||
CONFIG_MTD_NAND=y
|
||||
CONFIG_MTD_RAW_NAND=y
|
||||
CONFIG_MTD_NAND_PLATFORM=y
|
||||
CONFIG_MTD_NAND_CVSNFC=y
|
||||
CONFIG_MTD_SPI_NOR=y
|
||||
CONFIG_SPI_CVI_SPIF=y
|
||||
CONFIG_MTD_UBI=y
|
||||
CONFIG_MTD_UBI_BLOCK=y
|
||||
CONFIG_NETDEVICES=y
|
||||
# CONFIG_NET_CORE is not set
|
||||
# CONFIG_NET_VENDOR_ALACRITECH is not set
|
||||
# CONFIG_NET_VENDOR_AMAZON is not set
|
||||
# CONFIG_NET_VENDOR_AQUANTIA is not set
|
||||
# CONFIG_NET_VENDOR_ARC is not set
|
||||
# CONFIG_NET_VENDOR_AURORA is not set
|
||||
# CONFIG_NET_VENDOR_BROADCOM is not set
|
||||
# CONFIG_NET_VENDOR_CADENCE is not set
|
||||
# CONFIG_NET_VENDOR_CAVIUM is not set
|
||||
# CONFIG_NET_VENDOR_CIRRUS is not set
|
||||
# CONFIG_NET_VENDOR_CORTINA is not set
|
||||
# CONFIG_NET_VENDOR_EZCHIP is not set
|
||||
# CONFIG_NET_VENDOR_FARADAY is not set
|
||||
# CONFIG_NET_VENDOR_HISILICON is not set
|
||||
# CONFIG_NET_VENDOR_HUAWEI is not set
|
||||
# CONFIG_NET_VENDOR_INTEL is not set
|
||||
# CONFIG_NET_VENDOR_MARVELL is not set
|
||||
# CONFIG_NET_VENDOR_MELLANOX is not set
|
||||
# CONFIG_NET_VENDOR_MICREL is not set
|
||||
# CONFIG_NET_VENDOR_MICROCHIP is not set
|
||||
# CONFIG_NET_VENDOR_MICROSEMI is not set
|
||||
# CONFIG_NET_VENDOR_NATSEMI is not set
|
||||
# CONFIG_NET_VENDOR_NETRONOME is not set
|
||||
# CONFIG_NET_VENDOR_NI is not set
|
||||
# CONFIG_NET_VENDOR_QUALCOMM is not set
|
||||
# CONFIG_NET_VENDOR_RENESAS is not set
|
||||
# CONFIG_NET_VENDOR_ROCKER is not set
|
||||
# CONFIG_NET_VENDOR_SAMSUNG is not set
|
||||
# CONFIG_NET_VENDOR_SEEQ is not set
|
||||
# CONFIG_NET_VENDOR_SOLARFLARE is not set
|
||||
# CONFIG_NET_VENDOR_SMSC is not set
|
||||
# CONFIG_NET_VENDOR_SOCIONEXT is not set
|
||||
CONFIG_STMMAC_ETH=y
|
||||
# CONFIG_DWMAC_GENERIC is not set
|
||||
# CONFIG_NET_VENDOR_SYNOPSYS is not set
|
||||
# CONFIG_NET_VENDOR_VIA is not set
|
||||
# CONFIG_NET_VENDOR_WIZNET is not set
|
||||
CONFIG_CVITEK_PHY=y
|
||||
# CONFIG_USB_NET_DRIVERS is not set
|
||||
# CONFIG_WLAN_VENDOR_ADMTEK is not set
|
||||
# CONFIG_WLAN_VENDOR_ATH is not set
|
||||
# CONFIG_WLAN_VENDOR_ATMEL is not set
|
||||
# CONFIG_WLAN_VENDOR_BROADCOM is not set
|
||||
# CONFIG_WLAN_VENDOR_CISCO is not set
|
||||
# CONFIG_WLAN_VENDOR_INTEL is not set
|
||||
# CONFIG_WLAN_VENDOR_INTERSIL is not set
|
||||
# CONFIG_WLAN_VENDOR_MARVELL is not set
|
||||
# CONFIG_WLAN_VENDOR_MEDIATEK is not set
|
||||
# CONFIG_WLAN_VENDOR_RALINK is not set
|
||||
CONFIG_RTL8188FU=m
|
||||
# CONFIG_WLAN_VENDOR_RSI is not set
|
||||
# CONFIG_WLAN_VENDOR_ST is not set
|
||||
# CONFIG_WLAN_VENDOR_TI is not set
|
||||
# CONFIG_WLAN_VENDOR_ZYDAS is not set
|
||||
CONFIG_INPUT=y
|
||||
# CONFIG_SERIO is not set
|
||||
# CONFIG_VT is not set
|
||||
# CONFIG_LEGACY_PTYS is not set
|
||||
CONFIG_SERIAL_8250=y
|
||||
CONFIG_SERIAL_8250_CONSOLE=y
|
||||
CONFIG_SERIAL_8250_NR_UARTS=5
|
||||
CONFIG_SERIAL_8250_RUNTIME_UARTS=5
|
||||
CONFIG_SERIAL_8250_DW=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_SMBUS=y
|
||||
CONFIG_I2C_CHARDEV=y
|
||||
CONFIG_I2C_DESIGNWARE_PLATFORM=y
|
||||
CONFIG_SPI=y
|
||||
# CONFIG_PTP_1588_CLOCK is not set
|
||||
CONFIG_CVITEK_PINCTRL_CV1835=y
|
||||
CONFIG_GPIOLIB=y
|
||||
CONFIG_GPIO_SYSFS=y
|
||||
CONFIG_GPIO_DWAPB=y
|
||||
CONFIG_THERMAL=y
|
||||
CONFIG_THERMAL_NETLINK=y
|
||||
CONFIG_THERMAL_WRITABLE_TRIPS=y
|
||||
CONFIG_THERMAL_EMULATION=y
|
||||
CONFIG_WATCHDOG=y
|
||||
CONFIG_MEDIA_SUPPORT=n
|
||||
CONFIG_VIDEO_CVITEK=m
|
||||
CONFIG_VIDEO_CVITEK_CIF=m
|
||||
CONFIG_VIDEO_CVITEK_SNS_I2C=m
|
||||
CONFIG_VIDEO_CVITEK_MIPI_TX=m
|
||||
CONFIG_FB=y
|
||||
CONFIG_FB_CVITEK=m
|
||||
CONFIG_SOUND=y
|
||||
CONFIG_SND=y
|
||||
# CONFIG_SND_SUPPORT_OLD_API is not set
|
||||
# CONFIG_SND_PROC_FS is not set
|
||||
# CONFIG_SND_DRIVERS is not set
|
||||
CONFIG_SND_HDA_PREALLOC_SIZE=n
|
||||
# CONFIG_SND_ARM is not set
|
||||
# CONFIG_SND_SPI is not set
|
||||
# CONFIG_SND_USB is not set
|
||||
CONFIG_SND_SOC=y
|
||||
CONFIG_SND_SOC_CV182XA_CV182XAADC=y
|
||||
CONFIG_SND_SOC_CV182XA_CV182XADAC=y
|
||||
CONFIG_SND_CV1835_I2S=y
|
||||
CONFIG_SND_SOC_CV182XAADC=y
|
||||
CONFIG_SND_SOC_CV182XADAC=y
|
||||
# CONFIG_SND_SOC_CV182X_CV182XPDM is not set
|
||||
# CONFIG_SND_SOC_CV1835PDM is not set
|
||||
# CONFIG_SND_SOC_CV1835_CONCURRENT_I2S is not set
|
||||
CONFIG_SND_SOC_CV1835_USE_AUDIO_PLL=y
|
||||
CONFIG_CV1835_I2S_SUBSYS=y
|
||||
CONFIG_WATCHDOG_CORE=y
|
||||
CONFIG_MMC=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_PLTFM=y
|
||||
CONFIG_MMC_SDHCI_CVI=y
|
||||
CONFIG_DMADEVICES=n
|
||||
CONFIG_DW_DMAC_CVITEK=n
|
||||
# CONFIG_VIRTIO_MENU is not set
|
||||
CONFIG_STAGING=y
|
||||
CONFIG_ION=y
|
||||
CONFIG_ION_SYSTEM_HEAP=y
|
||||
CONFIG_ION_CARVEOUT_HEAP=y
|
||||
CONFIG_ION_CMA_HEAP=y
|
||||
# CONFIG_IOMMU_SUPPORT is not set
|
||||
CONFIG_CV1835_SYSDMA_REMAP=n
|
||||
CONFIG_PWM=y
|
||||
CONFIG_ANDROID=y
|
||||
# CONFIG_TEE=y
|
||||
# CONFIG_OPTEE=y
|
||||
# CONFIG_MANDATORY_FILE_LOCKING is not set
|
||||
CONFIG_EXT3_FS=y
|
||||
CONFIG_EXT4_FS=y
|
||||
CONFIG_MSDOS_FS=y
|
||||
CONFIG_VFAT_FS=y
|
||||
# CONFIG_PROC_PAGE_MONITOR is not set
|
||||
CONFIG_TMPFS=y
|
||||
CONFIG_CONFIGFS_FS=m
|
||||
CONFIG_JFFS2_FS=y
|
||||
CONFIG_JFFS2_FS_WBUF_VERIFY=y
|
||||
CONFIG_UBIFS_FS=y
|
||||
CONFIG_SQUASHFS=y
|
||||
CONFIG_SQUASHFS_FILE_DIRECT=y
|
||||
# CONFIG_SQUASHFS_ZLIB is not set
|
||||
CONFIG_SQUASHFS_XZ=y
|
||||
CONFIG_SQUASHFS_EMBEDDED=y
|
||||
CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=1
|
||||
CONFIG_NETWORK_FILESYSTEMS=y
|
||||
CONFIG_NFS_FS=y
|
||||
CONFIG_NFS_V2=y
|
||||
CONFIG_NFS_V3=y
|
||||
CONFIG_ROOT_NFS=y
|
||||
CONFIG_NLS_CODEPAGE_437=y
|
||||
CONFIG_NLS_ISO8859_1=y
|
||||
CONFIG_NLS_ISO8859_2=y
|
||||
CONFIG_NLS_ISO8859_3=y
|
||||
# CONFIG_CRYPTO_ECHAINIV is not set
|
||||
CONFIG_CRYPTO_SHA256=y
|
||||
# CONFIG_CRYPTO_HW is not set
|
||||
# CONFIG_XZ_DEC_X86 is not set
|
||||
# CONFIG_XZ_DEC_POWERPC is not set
|
||||
# CONFIG_XZ_DEC_IA64 is not set
|
||||
# CONFIG_XZ_DEC_ARMTHUMB is not set
|
||||
# CONFIG_XZ_DEC_SPARC is not set
|
||||
CONFIG_PRINTK_TIME=y
|
||||
# CONFIG_ENABLE_MUST_CHECK is not set
|
||||
CONFIG_DEBUG_FS=y
|
||||
# CONFIG_SCHED_DEBUG is not set
|
||||
# CONFIG_DEBUG_PREEMPT is not set
|
||||
# CONFIG_DEBUG_BUGVERBOSE is not set
|
||||
# CONFIG_FTRACE is not set
|
||||
# CONFIG_RUNTIME_TESTING_MENU is not set
|
||||
# CONFIG_MTD_SPI_NOR_USE_4K_SECTORS is not set
|
||||
|
||||
CONFIG_RTC_CLASS=y
|
||||
|
||||
CONFIG_BLK_DEV_LOOP=y
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_CHR_DEV_SG=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_OTG=y
|
||||
CONFIG_USB_OTG_FSM=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
CONFIG_USB_LIBCOMPOSITE=y
|
||||
CONFIG_USB_F_ACM=y
|
||||
CONFIG_USB_U_SERIAL=y
|
||||
CONFIG_USB_U_ETHER=y
|
||||
CONFIG_USB_U_AUDIO=y
|
||||
CONFIG_USB_F_SERIAL=y
|
||||
CONFIG_USB_F_ECM=y
|
||||
CONFIG_USB_F_EEM=y
|
||||
CONFIG_USB_F_RNDIS=y
|
||||
CONFIG_USB_F_MASS_STORAGE=y
|
||||
CONFIG_USB_F_UAC1=y
|
||||
CONFIG_USB_F_UVC=y
|
||||
CONFIG_USB_UAS=y
|
||||
CONFIG_USB_DWC2=m
|
||||
CONFIG_USB_DWC2_DUAL_ROLE=y
|
||||
CONFIG_USB_GADGET=y
|
||||
CONFIG_U_SERIAL_CONSOLE=y
|
||||
CONFIG_USB_CONFIGFS=y
|
||||
CONFIG_USB_CONFIGFS_SERIAL=y
|
||||
CONFIG_USB_CONFIGFS_ACM=y
|
||||
CONFIG_USB_CONFIGFS_ECM=y
|
||||
CONFIG_USB_CONFIGFS_RNDIS=y
|
||||
CONFIG_USB_CONFIGFS_EEM=y
|
||||
CONFIG_USB_CONFIGFS_MASS_STORAGE=y
|
||||
CONFIG_USB_CONFIGFS_F_FS=y
|
||||
CONFIG_USB_CONFIGFS_F_UAC1=y
|
||||
CONFIG_USB_CONFIGFS_F_UVC=y
|
||||
CONFIG_USB_CONFIGFS_F_FS=y
|
||||
CONFIG_USB_CONFIGFS_UEVENT=y
|
||||
CONFIG_USB_PHY=y
|
||||
CONFIG_USB_GPIO_VBUS=y
|
||||
85
build/boards/sg200x/sg2000_wevb_sd/memmap.py
Normal file
85
build/boards/sg200x/sg2000_wevb_sd/memmap.py
Normal file
@@ -0,0 +1,85 @@
|
||||
SIZE_1M = 0x100000
|
||||
SIZE_1K = 1024
|
||||
|
||||
|
||||
# Only attributes in class MemoryMap are generated to .h
|
||||
class MemoryMap:
|
||||
# No prefix "CVIMMAP_" for the items in _no_prefix[]
|
||||
_no_prefix = [
|
||||
"CONFIG_SYS_TEXT_BASE" # u-boot's CONFIG_SYS_TEXT_BASE is used without CPP.
|
||||
]
|
||||
|
||||
DRAM_BASE = 0x80000000
|
||||
DRAM_SIZE = 512 * SIZE_1M
|
||||
|
||||
# ==============
|
||||
# C906L FreeRTOS
|
||||
# ==============
|
||||
FREERTOS_SIZE = 768 * SIZE_1K
|
||||
# FreeRTOS is at the end of DRAM
|
||||
FREERTOS_ADDR = DRAM_BASE + DRAM_SIZE - FREERTOS_SIZE
|
||||
FSBL_C906L_START_ADDR = FREERTOS_ADDR
|
||||
|
||||
# ==============================
|
||||
# OpenSBI | arm-trusted-firmware
|
||||
# ==============================
|
||||
# Monitor is at the begining of DRAM
|
||||
MONITOR_ADDR = DRAM_BASE
|
||||
|
||||
ATF_SIZE = 512 * SIZE_1K
|
||||
OPENSBI_SIZE = 512 * SIZE_1K
|
||||
OPENSBI_FDT_ADDR = MONITOR_ADDR + OPENSBI_SIZE
|
||||
|
||||
# =========================
|
||||
# memory@DRAM_BASE in .dts.
|
||||
# =========================
|
||||
# Ignore the area of FreeRTOS in u-boot and kernel
|
||||
KERNEL_MEMORY_ADDR = DRAM_BASE
|
||||
KERNEL_MEMORY_SIZE = DRAM_SIZE - FREERTOS_SIZE
|
||||
|
||||
# =================
|
||||
# Multimedia buffer. Used by u-boot/kernel/FreeRTOS
|
||||
# =================
|
||||
ION_SIZE = 70 * SIZE_1M
|
||||
H26X_BITSTREAM_SIZE = 2 * SIZE_1M
|
||||
H26X_ENC_BUFF_SIZE = 0
|
||||
ISP_MEM_BASE_SIZE = 20 * SIZE_1M
|
||||
FREERTOS_RESERVED_ION_SIZE = H26X_BITSTREAM_SIZE + H26X_ENC_BUFF_SIZE + ISP_MEM_BASE_SIZE
|
||||
|
||||
# ION after FreeRTOS
|
||||
ION_ADDR = FREERTOS_ADDR - ION_SIZE
|
||||
|
||||
# Buffers of the fast image are inside the ION buffer
|
||||
H26X_BITSTREAM_ADDR = ION_ADDR
|
||||
H26X_ENC_BUFF_ADDR = H26X_BITSTREAM_ADDR + H26X_BITSTREAM_SIZE
|
||||
ISP_MEM_BASE_ADDR = H26X_ENC_BUFF_ADDR + H26X_ENC_BUFF_SIZE
|
||||
|
||||
assert ISP_MEM_BASE_ADDR + ISP_MEM_BASE_SIZE <= ION_ADDR + ION_SIZE
|
||||
|
||||
# Boot logo is after the ION buffer
|
||||
# Framebuffer uses boot logo's reserved memory
|
||||
BOOTLOGO_SIZE = 1800 * SIZE_1K
|
||||
BOOTLOGO_ADDR = ION_ADDR - BOOTLOGO_SIZE
|
||||
FRAMEBUFFER_SIZE = BOOTLOGO_SIZE
|
||||
FRAMEBUFFER_ADDR = BOOTLOGO_ADDR
|
||||
|
||||
# ===================
|
||||
# FSBL and u-boot-2021
|
||||
# ===================
|
||||
CVI_UPDATE_HEADER_SIZE = SIZE_1K
|
||||
UIMAG_SIZE = 16 * SIZE_1M
|
||||
|
||||
# kernel image loading buffer
|
||||
UIMAG_ADDR = DRAM_BASE + 24 * SIZE_1M
|
||||
CVI_UPDATE_HEADER_ADDR = UIMAG_ADDR - CVI_UPDATE_HEADER_SIZE
|
||||
|
||||
# FSBL decompress buffer
|
||||
FSBL_UNZIP_ADDR = UIMAG_ADDR
|
||||
FSBL_UNZIP_SIZE = UIMAG_SIZE
|
||||
|
||||
assert UIMAG_ADDR + UIMAG_SIZE <= BOOTLOGO_ADDR
|
||||
|
||||
# u-boot's run address and entry point
|
||||
CONFIG_SYS_TEXT_BASE = DRAM_BASE + 2 * SIZE_1M
|
||||
# u-boot's init stack point is only used before board_init_f()
|
||||
CONFIG_SYS_INIT_SP_ADDR = UIMAG_ADDR + UIMAG_SIZE
|
||||
@@ -0,0 +1,5 @@
|
||||
<physical_partition type="sd">
|
||||
<partition label="BOOT" size_in_kb="80960" readonly="false" file="boot.sd"/>
|
||||
<partition label="ROOTFS" size_in_kb="204800" readonly="false" file="rootfs.sd" />
|
||||
<partition label="DATA" size_in_kb="512000" readonly="false" file="data.sd" mountpoint="/mnt/data" type="ext4" />
|
||||
</physical_partition>
|
||||
30
build/boards/sg200x/sg2000_wevb_sd/sg2000_wevb_sd_defconfig
Normal file
30
build/boards/sg200x/sg2000_wevb_sd/sg2000_wevb_sd_defconfig
Normal file
@@ -0,0 +1,30 @@
|
||||
CONFIG_CHIP_sg2000=y
|
||||
CONFIG_BOARD_wevb_sd=y
|
||||
CONFIG_DDR_CFG_ddr3_1866_x16=y
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
CONFIG_KERNEL_ENTRY_HACK=y
|
||||
CONFIG_KERNEL_ENTRY_HACK_ADDR="0x80108000"
|
||||
CONFIG_TOOLCHAIN_GLIBC_ARM=y
|
||||
CONFIG_FLASH_SIZE_SHRINK=y
|
||||
CONFIG_BOOT_IMAGE_SINGLE_DTB=y
|
||||
CONFIG_STORAGE_TYPE_sd=y
|
||||
CONFIG_SENSOR_GCORE_GC2053=y
|
||||
CONFIG_SENSOR_GCORE_GC2053_1L=y
|
||||
CONFIG_SENSOR_GCORE_GC2093=y
|
||||
CONFIG_SENSOR_GCORE_GC4653=y
|
||||
CONFIG_SENSOR_PIXELPLUS_PR2020=y
|
||||
CONFIG_SENSOR_SONY_IMX307=y
|
||||
CONFIG_SENSOR_SONY_IMX327=y
|
||||
CONFIG_UBOOT_2021_10=y
|
||||
CONFIG_KERNEL_SRC_5.10=y
|
||||
CONFIG_KERNEL_SRC="linux_5.10"
|
||||
CONFIG_KERNEL_LZMA=y
|
||||
CONFIG_SKIP_RAMDISK=y
|
||||
CONFIG_USE_4K_ERASE_SIZE_FOR_JFFS2=y
|
||||
CONFIG_SENSOR_TUNING_PARAM_cv181x_src_gcore_gc4653=y
|
||||
# CONFIG_ROOTFS_OVERLAYFS is not set
|
||||
CONFIG_TARGET_PACKAGE_DROPBEAR=y
|
||||
CONFIG_TARGET_PACKAGE_MTD-UTILS=y
|
||||
# CONFIG_TARGET_PACKAGE_RSYSLOG is not set
|
||||
# CONFIG_TARGET_PACKAGE_GATORD is not set
|
||||
@@ -0,0 +1,49 @@
|
||||
CONFIG_ARM=y
|
||||
CONFIG_SYS_MALLOC_F_LEN=0x2000
|
||||
CONFIG_NR_DRAM_BANKS=1
|
||||
CONFIG_DEFAULT_DEVICE_TREE="cv181x_asic"
|
||||
CONFIG_IDENT_STRING=" cvitek_cv181x"
|
||||
CONFIG_ARMV8_SET_SMPEN=y
|
||||
CONFIG_TARGET_CVITEK_CV181X=y
|
||||
#CONFIG_CVITEK_SPI_FLASH=y
|
||||
CONFIG_DISTRO_DEFAULTS=y
|
||||
CONFIG_FIT=y
|
||||
# CONFIG_ARCH_FIXUP_FDT_MEMORY is not set
|
||||
CONFIG_BOOTDELAY=1
|
||||
# CONFIG_DISPLAY_CPUINFO is not set
|
||||
# CONFIG_DISPLAY_BOARDINFO is not set
|
||||
CONFIG_SYS_PROMPT="soph# "
|
||||
# CONFIG_CMD_CONSOLE is not set
|
||||
# CONFIG_CMD_XIMG is not set
|
||||
# CONFIG_CMD_EDITENV is not set
|
||||
# CONFIG_CMD_CRC32 is not set
|
||||
# CONFIG_CMD_LZMADEC is not set
|
||||
# CONFIG_CMD_UNLZ4 is not set
|
||||
# CONFIG_CMD_UNZIP is not set
|
||||
# CONFIG_CMD_LOADS is not set
|
||||
CONFIG_CMD_MMC=y
|
||||
# CONFIG_CMD_ITEST is not set
|
||||
CONFIG_CMD_CACHE=y
|
||||
CONFIG_CMD_CVI_SD_UPDATE=y
|
||||
# CONFIG_ISO_PARTITION is not set
|
||||
# CONFIG_EFI_PARTITION is not set
|
||||
CONFIG_OF_CONTROL=y
|
||||
CONFIG_NET_RANDOM_ETHADDR=y
|
||||
CONFIG_DM=y
|
||||
CONFIG_DM_MMC=y
|
||||
CONFIG_MMC=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_SDMA=y
|
||||
CONFIG_MMC_SDHCI_CVITEK=y
|
||||
CONFIG_MTD=y
|
||||
# CONFIG_PHY_SMSC is not set
|
||||
CONFIG_DM_ETH=y
|
||||
CONFIG_ETH_DESIGNWARE=y
|
||||
CONFIG_PHY_CVITEK=y
|
||||
CONFIG_SYS_NS16550=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_LZ4=y
|
||||
CONFIG_LZMA=y
|
||||
# CONFIG_TOOLS_LIBCRYPTO is not set
|
||||
# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
|
||||
CONFIG_ENV_IS_NOWHERE=y
|
||||
8
build/boards/sg200x/sg2002_licheea53nano_sd/config.json
Normal file
8
build/boards/sg200x/sg2002_licheea53nano_sd/config.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"ddr_cfg_list": [
|
||||
"ddr3_1866_x16",
|
||||
"ddr3_2133_x16",
|
||||
"ddr_auto_x16"
|
||||
],
|
||||
"board_information": "CA53"
|
||||
}
|
||||
@@ -0,0 +1,185 @@
|
||||
/dts-v1/;
|
||||
#include "soph_base_arm.dtsi"
|
||||
#include "soph_asic_qfn.dtsi"
|
||||
#include "soph_asic_sd.dtsi"
|
||||
#include "soph_default_memmap.dtsi"
|
||||
|
||||
#include <dt-bindings/input/linux-event-codes.h>
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
|
||||
&i2c0 {
|
||||
status = "disabled";
|
||||
/delete-property/ scl-pinmux;
|
||||
/delete-property/ sda-pinmux;
|
||||
/delete-property/ scl-gpios;
|
||||
/delete-property/ sda-gpios;
|
||||
};
|
||||
|
||||
&i2c1 {
|
||||
status = "disabled";
|
||||
/delete-property/ scl-pinmux;
|
||||
/delete-property/ sda-pinmux;
|
||||
/delete-property/ scl-gpios;
|
||||
/delete-property/ sda-gpios;
|
||||
};
|
||||
|
||||
&sd {
|
||||
min-frequency = <400000>; // 400Khz
|
||||
//max-frequency = <50000000>; // 50Mhz
|
||||
max-frequency = <25000000>; // 25Mhz
|
||||
//max-frequency = <10000000>; // 10Mhz
|
||||
//max-frequency = <5000000>; // 5Mhz
|
||||
};
|
||||
|
||||
&cvi_vo {
|
||||
#ifndef __UBOOT__
|
||||
/delete-property/ reset-gpio;
|
||||
/delete-property/ pwm-gpio;
|
||||
#else
|
||||
// for uboot
|
||||
reset-gpio = <&porte 0 1>;
|
||||
pwm-gpio = <&porte 2 1>;
|
||||
#endif
|
||||
/delete-property/ power-ct-gpio;
|
||||
|
||||
};
|
||||
|
||||
&mipi_tx {
|
||||
#ifndef __UBOOT__
|
||||
// for linux kernel
|
||||
reset-gpio = <&porte 0 1>;
|
||||
pwm-gpio = <&porte 2 1>;
|
||||
#else
|
||||
/delete-property/ reset-gpio;
|
||||
/delete-property/ pwm-gpio;
|
||||
#endif
|
||||
/delete-property/ power-ct-gpio;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pwm0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pwm1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pwm2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c2 {
|
||||
status = "disabled";
|
||||
/delete-property/ scl-pinmux;
|
||||
/delete-property/ sda-pinmux;
|
||||
/delete-property/ scl-gpios;
|
||||
/delete-property/ sda-gpios;
|
||||
};
|
||||
|
||||
&i2c3 {
|
||||
status = "disabled";
|
||||
/delete-property/ scl-pinmux;
|
||||
/delete-property/ sda-pinmux;
|
||||
/delete-property/ scl-gpios;
|
||||
/delete-property/ sda-gpios;
|
||||
};
|
||||
|
||||
&i2c4 {
|
||||
statuc = "okay";
|
||||
gt9xx: gt9xx@14 {
|
||||
compatible = "goodix,gt9xx";
|
||||
reg = <0x14>;
|
||||
goodix,irq-gpio = <&porte 3 0>;
|
||||
goodix,rst-gpio = <&porte 4 0>;
|
||||
status = "okay";
|
||||
};
|
||||
hytr: hynitron@5a {
|
||||
compatible = "hynitron,hyn_ts";
|
||||
reg = <0x5a>;
|
||||
hynitron,irq-gpio = <&porte 3 0>;
|
||||
hynitron,reset-gpio = <&porte 4 0>;
|
||||
hynitron,max-touch-number = <5>;
|
||||
hynitron,display-coords = <368 552>;
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
&dac {
|
||||
status = "okay";
|
||||
/delete-property/ mute-gpio-r;
|
||||
};
|
||||
|
||||
&fb_reserved {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&cvi_fb {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mipi_rx {
|
||||
snsr-reset = <&porte 1 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
/ {
|
||||
model = "LicheeRv Nano";
|
||||
|
||||
gpio-keys {
|
||||
compatible = "gpio-keys";
|
||||
key-user {
|
||||
label = "User Key";
|
||||
linux,code = <KEY_DISPLAYTOGGLE>;
|
||||
debounce-interval = <1>;
|
||||
gpios = <&porta 30 1>;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led-user {
|
||||
gpios = <&porta 14 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "activity";
|
||||
};
|
||||
};
|
||||
|
||||
lcd0_backlight: pwm-backlight@0 {
|
||||
compatible = "pwm-backlight";
|
||||
pwms = <&pwm2 2 50000000>; // 20Khz
|
||||
brightness-levels = <0 2 4 8 16 32 64 128 255>;
|
||||
default-brightness-level = <4>;
|
||||
};
|
||||
|
||||
wifisd:wifi-sd@4320000 {
|
||||
compatible = "cvitek,cv181x-sdio";
|
||||
bus-width = <4>;
|
||||
reg = <0x0 0x4320000 0x0 0x1000>;
|
||||
reg_names = "core_mem";
|
||||
src-frequency = <375000000>;
|
||||
min-frequency = <400000>; // 400Khz
|
||||
//max-frequency = <50000000>; // 50Mhz
|
||||
//max-frequency = <45000000>; // 45Mhz
|
||||
//max-frequency = <40000000>; // 40Mhz
|
||||
//max-frequency = <35000000>; // 35Mhz
|
||||
//max-frequency = <30000000>; // 30Mhz
|
||||
max-frequency = <25000000>; // 25Mhz
|
||||
//max-frequency = <20000000>; // 20Mhz
|
||||
//max-frequency = <15000000>; // 15Mhz
|
||||
//max-frequency = <10000000>; // 10Mhz
|
||||
//max-frequency = <5000000>; // 5Mhz
|
||||
64_addressing;
|
||||
reset_tx_rx_phy;
|
||||
non-removable;
|
||||
pll_index = <0x7>;
|
||||
pll_reg = <0x300207C>;
|
||||
no-mmc;
|
||||
no-sd;
|
||||
status = "okay";
|
||||
interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,370 @@
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
# CONFIG_SWAP is not set
|
||||
CONFIG_SYSVIPC=y
|
||||
CONFIG_POSIX_MQUEUE=y
|
||||
CONFIG_NO_HZ_IDLE=y
|
||||
CONFIG_HIGH_RES_TIMERS=y
|
||||
CONFIG_PREEMPT=y
|
||||
CONFIG_LOG_BUF_SHIFT=15
|
||||
CONFIG_BLK_DEV_INITRD=n
|
||||
# CONFIG_UID16 is not set
|
||||
# CONFIG_SYSFS_SYSCALL is not set
|
||||
# CONFIG_FHANDLE is not set
|
||||
# CONFIG_BASE_FULL is not set
|
||||
# CONFIG_AIO is not set
|
||||
CONFIG_EMBEDDED=y
|
||||
# CONFIG_SLUB_DEBUG is not set
|
||||
CONFIG_ARM_LPAE=y
|
||||
CONFIG_SWP_EMULATE=y
|
||||
# CONFIG_VDSO is not set
|
||||
CONFIG_HAVE_ARM_ARCH_TIMER=y
|
||||
CONFIG_ARM_PSCI=y
|
||||
CONFIG_THUMB2_KERNEL=y
|
||||
CONFIG_FORCE_MAX_ZONEORDER=10
|
||||
# CONFIG_ATAGS is not set
|
||||
CONFIG_VFP=y
|
||||
CONFIG_NEON=y
|
||||
# CONFIG_SUSPEND is not set
|
||||
CONFIG_ARCH_CVITEK=y
|
||||
CONFIG_ARCH_CV181X=y
|
||||
CONFIG_ARCH_CVITEK_CHIP="mars"
|
||||
CONFIG_ARCH_CV181X_ASIC=y
|
||||
CONFIG_POWER_RESET=y
|
||||
# CONFIG_STACKPROTECTOR is not set
|
||||
CONFIG_MODULES=y
|
||||
CONFIG_MODULE_FORCE_LOAD=y
|
||||
CONFIG_MODULE_UNLOAD=y
|
||||
# CONFIG_LBDAF is not set
|
||||
# CONFIG_BLK_DEV_BSG is not set
|
||||
# CONFIG_IOSCHED_DEADLINE is not set
|
||||
# CONFIG_IOSCHED_CFQ is not set
|
||||
# CONFIG_MQ_IOSCHED_DEADLINE is not set
|
||||
# CONFIG_MQ_IOSCHED_KYBER is not set
|
||||
# CONFIG_COREDUMP is not set
|
||||
CONFIG_CMA=y
|
||||
CONFIG_NET=y
|
||||
CONFIG_PACKET=y
|
||||
CONFIG_UNIX=y
|
||||
CONFIG_INET=y
|
||||
# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
|
||||
# CONFIG_INET_XFRM_MODE_TUNNEL is not set
|
||||
# CONFIG_INET_XFRM_MODE_BEET is not set
|
||||
# CONFIG_INET_DIAG is not set
|
||||
# CONFIG_IPV6 is not set
|
||||
CONFIG_CFG80211=m
|
||||
CONFIG_RFKILL=y
|
||||
CONFIG_DEVTMPFS=y
|
||||
CONFIG_DEVTMPFS_MOUNT=y
|
||||
# CONFIG_ALLOW_DEV_COREDUMP is not set
|
||||
CONFIG_DMA_CMA=n
|
||||
CONFIG_CMA_SIZE_MBYTES=0
|
||||
CONFIG_MTD=y
|
||||
CONFIG_MTD_CMDLINE_PARTS=y
|
||||
# CONFIG_MTD_OF_PARTS is not set
|
||||
CONFIG_MTD_BLOCK=y
|
||||
CONFIG_MTD_NAND=y
|
||||
CONFIG_MTD_RAW_NAND=y
|
||||
CONFIG_MTD_NAND_PLATFORM=y
|
||||
CONFIG_MTD_NAND_CVSNFC=y
|
||||
CONFIG_MTD_SPI_NOR=y
|
||||
CONFIG_SPI_CVI_SPIF=y
|
||||
CONFIG_MTD_UBI=y
|
||||
CONFIG_MTD_UBI_BLOCK=y
|
||||
CONFIG_NETDEVICES=y
|
||||
# CONFIG_NET_CORE is not set
|
||||
# CONFIG_NET_VENDOR_ALACRITECH is not set
|
||||
# CONFIG_NET_VENDOR_AMAZON is not set
|
||||
# CONFIG_NET_VENDOR_AQUANTIA is not set
|
||||
# CONFIG_NET_VENDOR_ARC is not set
|
||||
# CONFIG_NET_VENDOR_AURORA is not set
|
||||
# CONFIG_NET_VENDOR_BROADCOM is not set
|
||||
# CONFIG_NET_VENDOR_CADENCE is not set
|
||||
# CONFIG_NET_VENDOR_CAVIUM is not set
|
||||
# CONFIG_NET_VENDOR_CIRRUS is not set
|
||||
# CONFIG_NET_VENDOR_CORTINA is not set
|
||||
# CONFIG_NET_VENDOR_EZCHIP is not set
|
||||
# CONFIG_NET_VENDOR_FARADAY is not set
|
||||
# CONFIG_NET_VENDOR_HISILICON is not set
|
||||
# CONFIG_NET_VENDOR_HUAWEI is not set
|
||||
# CONFIG_NET_VENDOR_INTEL is not set
|
||||
# CONFIG_NET_VENDOR_MARVELL is not set
|
||||
# CONFIG_NET_VENDOR_MELLANOX is not set
|
||||
# CONFIG_NET_VENDOR_MICREL is not set
|
||||
# CONFIG_NET_VENDOR_MICROCHIP is not set
|
||||
# CONFIG_NET_VENDOR_MICROSEMI is not set
|
||||
# CONFIG_NET_VENDOR_NATSEMI is not set
|
||||
# CONFIG_NET_VENDOR_NETRONOME is not set
|
||||
# CONFIG_NET_VENDOR_NI is not set
|
||||
# CONFIG_NET_VENDOR_QUALCOMM is not set
|
||||
# CONFIG_NET_VENDOR_RENESAS is not set
|
||||
# CONFIG_NET_VENDOR_ROCKER is not set
|
||||
# CONFIG_NET_VENDOR_SAMSUNG is not set
|
||||
# CONFIG_NET_VENDOR_SEEQ is not set
|
||||
# CONFIG_NET_VENDOR_SOLARFLARE is not set
|
||||
# CONFIG_NET_VENDOR_SMSC is not set
|
||||
# CONFIG_NET_VENDOR_SOCIONEXT is not set
|
||||
CONFIG_STMMAC_ETH=y
|
||||
# CONFIG_DWMAC_GENERIC is not set
|
||||
# CONFIG_NET_VENDOR_SYNOPSYS is not set
|
||||
# CONFIG_NET_VENDOR_VIA is not set
|
||||
# CONFIG_NET_VENDOR_WIZNET is not set
|
||||
CONFIG_CVITEK_PHY=y
|
||||
# CONFIG_USB_NET_DRIVERS is not set
|
||||
# CONFIG_WLAN_VENDOR_ADMTEK is not set
|
||||
# CONFIG_WLAN_VENDOR_ATH is not set
|
||||
# CONFIG_WLAN_VENDOR_ATMEL is not set
|
||||
# CONFIG_WLAN_VENDOR_BROADCOM is not set
|
||||
# CONFIG_WLAN_VENDOR_CISCO is not set
|
||||
# CONFIG_WLAN_VENDOR_INTEL is not set
|
||||
# CONFIG_WLAN_VENDOR_INTERSIL is not set
|
||||
# CONFIG_WLAN_VENDOR_MARVELL is not set
|
||||
# CONFIG_WLAN_VENDOR_MEDIATEK is not set
|
||||
# CONFIG_WLAN_VENDOR_RALINK is not set
|
||||
# CONFIG_RTL8188FU is not set
|
||||
# CONFIG_WLAN_VENDOR_RSI is not set
|
||||
# CONFIG_WLAN_VENDOR_ST is not set
|
||||
# CONFIG_WLAN_VENDOR_TI is not set
|
||||
# CONFIG_WLAN_VENDOR_ZYDAS is not set
|
||||
CONFIG_INPUT=y
|
||||
CONFIG_INPUT_EVDEV=y
|
||||
# CONFIG_SERIO is not set
|
||||
CONFIG_SERIAL_8250=y
|
||||
CONFIG_SERIAL_8250_CONSOLE=y
|
||||
CONFIG_SERIAL_8250_NR_UARTS=5
|
||||
CONFIG_SERIAL_8250_RUNTIME_UARTS=5
|
||||
CONFIG_SERIAL_8250_DW=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_SMBUS=y
|
||||
CONFIG_I2C_CHARDEV=y
|
||||
CONFIG_I2C_DESIGNWARE_PLATFORM=y
|
||||
CONFIG_SPI=y
|
||||
# CONFIG_PTP_1588_CLOCK is not set
|
||||
CONFIG_CVITEK_PINCTRL_CV1835=y
|
||||
CONFIG_GPIOLIB=y
|
||||
CONFIG_GPIO_SYSFS=y
|
||||
CONFIG_GPIO_DWAPB=y
|
||||
CONFIG_THERMAL=y
|
||||
CONFIG_THERMAL_NETLINK=y
|
||||
CONFIG_THERMAL_WRITABLE_TRIPS=y
|
||||
CONFIG_THERMAL_EMULATION=y
|
||||
CONFIG_WATCHDOG=y
|
||||
CONFIG_MEDIA_SUPPORT=n
|
||||
CONFIG_VIDEO_CVITEK=m
|
||||
CONFIG_VIDEO_CVITEK_CIF=m
|
||||
CONFIG_VIDEO_CVITEK_SNS_I2C=m
|
||||
CONFIG_VIDEO_CVITEK_MIPI_TX=m
|
||||
CONFIG_FB=y
|
||||
CONFIG_FB_CVITEK=m
|
||||
CONFIG_SOUND=y
|
||||
CONFIG_SND=y
|
||||
# CONFIG_SND_SUPPORT_OLD_API is not set
|
||||
# CONFIG_SND_PROC_FS is not set
|
||||
# CONFIG_SND_DRIVERS is not set
|
||||
CONFIG_SND_HDA_PREALLOC_SIZE=n
|
||||
# CONFIG_SND_ARM is not set
|
||||
# CONFIG_SND_SPI is not set
|
||||
# CONFIG_SND_USB is not set
|
||||
CONFIG_SND_SOC=y
|
||||
CONFIG_SND_SOC_CV182XA_CV182XAADC=y
|
||||
CONFIG_SND_SOC_CV182XA_CV182XADAC=y
|
||||
CONFIG_SND_CV1835_I2S=y
|
||||
CONFIG_SND_SOC_CV182XAADC=y
|
||||
CONFIG_SND_SOC_CV182XADAC=y
|
||||
# CONFIG_SND_SOC_CV182X_CV182XPDM is not set
|
||||
# CONFIG_SND_SOC_CV1835PDM is not set
|
||||
# CONFIG_SND_SOC_CV1835_CONCURRENT_I2S is not set
|
||||
CONFIG_SND_SOC_CV1835_USE_AUDIO_PLL=y
|
||||
CONFIG_CV1835_I2S_SUBSYS=y
|
||||
CONFIG_WATCHDOG_CORE=y
|
||||
CONFIG_MMC=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_PLTFM=y
|
||||
CONFIG_MMC_SDHCI_CVI=y
|
||||
CONFIG_DMADEVICES=n
|
||||
CONFIG_DW_DMAC_CVITEK=n
|
||||
# CONFIG_VIRTIO_MENU is not set
|
||||
CONFIG_STAGING=y
|
||||
CONFIG_ION=y
|
||||
CONFIG_ION_SYSTEM_HEAP=y
|
||||
CONFIG_ION_CARVEOUT_HEAP=y
|
||||
CONFIG_ION_CMA_HEAP=y
|
||||
# CONFIG_IOMMU_SUPPORT is not set
|
||||
CONFIG_CV1835_SYSDMA_REMAP=n
|
||||
CONFIG_PWM=y
|
||||
CONFIG_ANDROID=y
|
||||
# CONFIG_TEE=y
|
||||
# CONFIG_OPTEE=y
|
||||
# CONFIG_MANDATORY_FILE_LOCKING is not set
|
||||
CONFIG_EXT3_FS=y
|
||||
CONFIG_EXT4_FS=y
|
||||
CONFIG_MSDOS_FS=y
|
||||
CONFIG_VFAT_FS=y
|
||||
# CONFIG_PROC_PAGE_MONITOR is not set
|
||||
CONFIG_TMPFS=y
|
||||
CONFIG_CONFIGFS_FS=m
|
||||
CONFIG_JFFS2_FS=y
|
||||
CONFIG_JFFS2_FS_WBUF_VERIFY=y
|
||||
CONFIG_UBIFS_FS=y
|
||||
CONFIG_SQUASHFS=y
|
||||
CONFIG_SQUASHFS_FILE_DIRECT=y
|
||||
# CONFIG_SQUASHFS_ZLIB is not set
|
||||
CONFIG_SQUASHFS_XZ=y
|
||||
CONFIG_SQUASHFS_EMBEDDED=y
|
||||
CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=1
|
||||
CONFIG_NETWORK_FILESYSTEMS=y
|
||||
CONFIG_NFS_FS=y
|
||||
CONFIG_NFS_V2=y
|
||||
CONFIG_NFS_V3=y
|
||||
CONFIG_ROOT_NFS=y
|
||||
CONFIG_NLS_CODEPAGE_437=y
|
||||
CONFIG_NLS_ISO8859_1=y
|
||||
CONFIG_NLS_ISO8859_2=y
|
||||
CONFIG_NLS_ISO8859_3=y
|
||||
# CONFIG_CRYPTO_ECHAINIV is not set
|
||||
CONFIG_CRYPTO_SHA256=y
|
||||
# CONFIG_CRYPTO_HW is not set
|
||||
# CONFIG_XZ_DEC_X86 is not set
|
||||
# CONFIG_XZ_DEC_POWERPC is not set
|
||||
# CONFIG_XZ_DEC_IA64 is not set
|
||||
# CONFIG_XZ_DEC_ARMTHUMB is not set
|
||||
# CONFIG_XZ_DEC_SPARC is not set
|
||||
CONFIG_PRINTK_TIME=y
|
||||
# CONFIG_ENABLE_MUST_CHECK is not set
|
||||
CONFIG_DEBUG_FS=y
|
||||
# CONFIG_SCHED_DEBUG is not set
|
||||
# CONFIG_DEBUG_PREEMPT is not set
|
||||
# CONFIG_DEBUG_BUGVERBOSE is not set
|
||||
# CONFIG_FTRACE is not set
|
||||
# CONFIG_RUNTIME_TESTING_MENU is not set
|
||||
# CONFIG_MTD_SPI_NOR_USE_4K_SECTORS is not set
|
||||
|
||||
CONFIG_RTC_CLASS=y
|
||||
|
||||
CONFIG_BLK_DEV_LOOP=y
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_CHR_DEV_SG=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_OTG=y
|
||||
CONFIG_USB_OTG_FSM=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
CONFIG_USB_LIBCOMPOSITE=y
|
||||
CONFIG_USB_F_ACM=y
|
||||
CONFIG_USB_U_SERIAL=y
|
||||
CONFIG_USB_U_ETHER=y
|
||||
CONFIG_USB_U_AUDIO=y
|
||||
CONFIG_USB_F_SERIAL=y
|
||||
CONFIG_USB_F_ECM=y
|
||||
CONFIG_USB_F_EEM=y
|
||||
CONFIG_USB_F_RNDIS=y
|
||||
CONFIG_USB_F_MASS_STORAGE=y
|
||||
CONFIG_USB_F_UAC1=y
|
||||
CONFIG_USB_F_UVC=y
|
||||
CONFIG_USB_UAS=y
|
||||
CONFIG_USB_DWC2=y
|
||||
CONFIG_USB_DWC2_DUAL_ROLE=y
|
||||
CONFIG_USB_GADGET=y
|
||||
CONFIG_U_SERIAL_CONSOLE=y
|
||||
CONFIG_USB_CONFIGFS=y
|
||||
CONFIG_USB_CONFIGFS_SERIAL=y
|
||||
CONFIG_USB_CONFIGFS_ACM=y
|
||||
CONFIG_USB_CONFIGFS_ECM=y
|
||||
CONFIG_USB_CONFIGFS_RNDIS=y
|
||||
CONFIG_USB_CONFIGFS_EEM=y
|
||||
CONFIG_USB_CONFIGFS_MASS_STORAGE=y
|
||||
CONFIG_USB_CONFIGFS_F_FS=y
|
||||
CONFIG_USB_CONFIGFS_F_UAC1=y
|
||||
CONFIG_USB_CONFIGFS_F_UVC=y
|
||||
CONFIG_USB_CONFIGFS_F_FS=y
|
||||
CONFIG_USB_CONFIGFS_UEVENT=y
|
||||
CONFIG_USB_PHY=y
|
||||
CONFIG_USB_GPIO_VBUS=y
|
||||
|
||||
# for licheervnano
|
||||
CONFIG_FB_SIMPLE=y
|
||||
CONFIG_IP_MULTICAST=y
|
||||
CONFIG_SND_PROC_FS=y
|
||||
CONFIG_BT=y
|
||||
CONFIG_BT_RFCOMM=y
|
||||
CONFIG_BT_RFCOMM_TTY=y
|
||||
CONFIG_BT_BREDR=y
|
||||
CONFIG_BT_BNEP=y
|
||||
CONFIG_BT_HIDP=y
|
||||
CONFIG_BT_HS=y
|
||||
CONFIG_BT_LE=y
|
||||
CONFIG_BT_HCIUART=y
|
||||
CONFIG_BT_HCIUART_BCSP=y
|
||||
CONFIG_SERIAL_DEV_BUS=y
|
||||
CONFIG_SERIAL_DEV_CTRL_TTYPORT=y
|
||||
CONFIG_SWAP=y
|
||||
CONFIG_USB_LIBCOMPOSITE=y
|
||||
CONFIG_USB_CONFIGFS=y
|
||||
CONFIG_USB_CONFIGFS_EEM=y
|
||||
CONFIG_USB_CONFIGFS_ACM=y
|
||||
CONFIG_USB_F_ACM=y
|
||||
CONFIG_USB_F_EEM=y
|
||||
CONFIG_USB_GADGET_VBUS_DRAW=500
|
||||
CONFIG_IPV6=y
|
||||
# CONFIG_IPV6_SIT is not set
|
||||
CONFIG_PACKET_DIAG=y
|
||||
CONFIG_UNIX_DIAG=y
|
||||
CONFIG_NETLINK_DIAG=y
|
||||
CONFIG_AIC_WLAN_SUPPORT=y
|
||||
CONFIG_KEYBOARD_GPIO=y
|
||||
CONFIG_INPUT_TOUCHSCREEN=y
|
||||
CONFIG_TOUCHSCREEN_HYNITRON_TS=y
|
||||
CONFIG_MAGIC_SYSRQ=y
|
||||
# CONFIG_MAGIC_SYSRQ_SERIAL is not set
|
||||
CONFIG_NEW_LEDS=y
|
||||
CONFIG_LEDS_CLASS=y
|
||||
CONFIG_LEDS_CLASS_FLASH=y
|
||||
CONFIG_LEDS_USER=y
|
||||
CONFIG_LEDS_GPIO=y
|
||||
CONFIG_LEDS_TRIGGERS=y
|
||||
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
|
||||
CONFIG_LEDS_TRIGGER_CPU=y
|
||||
CONFIG_LEDS_TRIGGER_CAMERA=y
|
||||
CONFIG_LEDS_TRIGGER_ACTIVITY=y
|
||||
CONFIG_LEDS_TRIGGER_NETDEV=y
|
||||
CONFIG_LEDS_TRIGGER_PANIC=y
|
||||
CONFIG_V4L2_FLASH_LED_CLASS=y
|
||||
CONFIG_MEDIA_USB_SUPPORT=y
|
||||
CONFIG_USB_VIDEO_CLASS=y
|
||||
CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
|
||||
CONFIG_AIC_WLAN_SUPPORT=y
|
||||
CONFIG_INPUT_EVDEV=y
|
||||
CONFIG_KEYBOARD_GPIO=y
|
||||
CONFIG_INPUT_TOUCHSCREEN=y
|
||||
CONFIG_TOUCHSCREEN_HYNITRON_TS=y
|
||||
CONFIG_USB_DWC2=y
|
||||
CONFIG_VT=y
|
||||
# CONFIG_LEGACY_PTYS is not set
|
||||
CONFIG_BACKLIGHT_CLASS_DEVICE=m
|
||||
CONFIG_BACKLIGHT_PWM=m
|
||||
|
||||
|
||||
|
||||
# these driver may broken codec driver
|
||||
# CONFIG_FUSE_FS is not set
|
||||
# CONFIG_CUSE is not set
|
||||
# CONFIG_OVERLAY_FS is not set
|
||||
# CONFIG_NAMESPACES is not set
|
||||
# CONFIG_UTS_NS is not set
|
||||
# CONFIG_IPC_NS is not set
|
||||
# CONFIG_USER_NS is not set
|
||||
# CONFIG_PID_NS is not set
|
||||
# CONFIG_NET_NS is not set
|
||||
# CONFIG_CGROUPS is not set
|
||||
# CONFIG_MEMCG is not set
|
||||
# CONFIG_BLK_CGROUP is not set
|
||||
# CONFIG_CGROUP_SCHED is not set
|
||||
# CONFIG_FAIR_GROUP_SCHED is not set
|
||||
# CONFIG_CFS_BANDWIDTH is not set
|
||||
# CONFIG_RT_GROUP_SCHED is not set
|
||||
# CONFIG_CGROUP_PIDS is not set
|
||||
# CONFIG_CGROUP_DEVICE is not set
|
||||
# CONFIG_CHECKPOINT_RESTORE is not set
|
||||
CONFIG_EPOLL=y
|
||||
CONFIG_IO_URING=y
|
||||
CONFIG_SIGNALFD=y
|
||||
85
build/boards/sg200x/sg2002_licheea53nano_sd/memmap.py
Normal file
85
build/boards/sg200x/sg2002_licheea53nano_sd/memmap.py
Normal file
@@ -0,0 +1,85 @@
|
||||
SIZE_1M = 0x100000
|
||||
SIZE_1K = 1024
|
||||
|
||||
|
||||
# Only attributes in class MemoryMap are generated to .h
|
||||
class MemoryMap:
|
||||
# No prefix "CVIMMAP_" for the items in _no_prefix[]
|
||||
_no_prefix = [
|
||||
"CONFIG_SYS_TEXT_BASE" # u-boot's CONFIG_SYS_TEXT_BASE is used without CPP.
|
||||
]
|
||||
|
||||
DRAM_BASE = 0x80000000
|
||||
DRAM_SIZE = 256 * SIZE_1M
|
||||
|
||||
# ==============
|
||||
# C906L FreeRTOS
|
||||
# ==============
|
||||
FREERTOS_SIZE = 768 * SIZE_1K
|
||||
# FreeRTOS is at the end of DRAM
|
||||
FREERTOS_ADDR = DRAM_BASE + DRAM_SIZE - FREERTOS_SIZE
|
||||
FSBL_C906L_START_ADDR = FREERTOS_ADDR
|
||||
|
||||
# ==============================
|
||||
# OpenSBI | arm-trusted-firmware
|
||||
# ==============================
|
||||
# Monitor is at the begining of DRAM
|
||||
MONITOR_ADDR = DRAM_BASE
|
||||
|
||||
ATF_SIZE = 512 * SIZE_1K
|
||||
OPENSBI_SIZE = 512 * SIZE_1K
|
||||
OPENSBI_FDT_ADDR = MONITOR_ADDR + OPENSBI_SIZE
|
||||
|
||||
# =========================
|
||||
# memory@DRAM_BASE in .dts.
|
||||
# =========================
|
||||
# Ignore the area of FreeRTOS in u-boot and kernel
|
||||
KERNEL_MEMORY_ADDR = DRAM_BASE
|
||||
KERNEL_MEMORY_SIZE = DRAM_SIZE - FREERTOS_SIZE
|
||||
|
||||
# =================
|
||||
# Multimedia buffer. Used by u-boot/kernel/FreeRTOS
|
||||
# =================
|
||||
ION_SIZE = 70 * SIZE_1M
|
||||
H26X_BITSTREAM_SIZE = 2 * SIZE_1M
|
||||
H26X_ENC_BUFF_SIZE = 0
|
||||
ISP_MEM_BASE_SIZE = 20 * SIZE_1M
|
||||
FREERTOS_RESERVED_ION_SIZE = H26X_BITSTREAM_SIZE + H26X_ENC_BUFF_SIZE + ISP_MEM_BASE_SIZE
|
||||
|
||||
# ION after FreeRTOS
|
||||
ION_ADDR = FREERTOS_ADDR - ION_SIZE
|
||||
|
||||
# Buffers of the fast image are inside the ION buffer
|
||||
H26X_BITSTREAM_ADDR = ION_ADDR
|
||||
H26X_ENC_BUFF_ADDR = H26X_BITSTREAM_ADDR + H26X_BITSTREAM_SIZE
|
||||
ISP_MEM_BASE_ADDR = H26X_ENC_BUFF_ADDR + H26X_ENC_BUFF_SIZE
|
||||
|
||||
assert ISP_MEM_BASE_ADDR + ISP_MEM_BASE_SIZE <= ION_ADDR + ION_SIZE
|
||||
|
||||
# Boot logo is after the ION buffer
|
||||
# Framebuffer uses boot logo's reserved memory
|
||||
BOOTLOGO_SIZE = 8000 * SIZE_1K
|
||||
BOOTLOGO_ADDR = ION_ADDR - BOOTLOGO_SIZE
|
||||
FRAMEBUFFER_SIZE = BOOTLOGO_SIZE
|
||||
FRAMEBUFFER_ADDR = BOOTLOGO_ADDR
|
||||
|
||||
# ===================
|
||||
# FSBL and u-boot-2021
|
||||
# ===================
|
||||
CVI_UPDATE_HEADER_SIZE = SIZE_1K
|
||||
UIMAG_SIZE = 16 * SIZE_1M
|
||||
|
||||
# kernel image loading buffer
|
||||
UIMAG_ADDR = DRAM_BASE + 24 * SIZE_1M
|
||||
CVI_UPDATE_HEADER_ADDR = UIMAG_ADDR - CVI_UPDATE_HEADER_SIZE
|
||||
|
||||
# FSBL decompress buffer
|
||||
FSBL_UNZIP_ADDR = UIMAG_ADDR
|
||||
FSBL_UNZIP_SIZE = UIMAG_SIZE
|
||||
|
||||
assert UIMAG_ADDR + UIMAG_SIZE <= BOOTLOGO_ADDR
|
||||
|
||||
# u-boot's run address and entry point
|
||||
CONFIG_SYS_TEXT_BASE = DRAM_BASE + 2 * SIZE_1M
|
||||
# u-boot's init stack point is only used before board_init_f()
|
||||
CONFIG_SYS_INIT_SP_ADDR = UIMAG_ADDR + UIMAG_SIZE
|
||||
@@ -0,0 +1,4 @@
|
||||
<physical_partition type="sd">
|
||||
<partition label="BOOT" size_in_kb="80960" readonly="false" file="boot.sd"/>
|
||||
<partition label="ROOTFS" size_in_kb="1048576" readonly="false" file="rootfs.sd" />
|
||||
</physical_partition>
|
||||
@@ -0,0 +1,23 @@
|
||||
CONFIG_CHIP_sg2002=y
|
||||
CONFIG_BOARD_licheea53nano_sd=y
|
||||
CONFIG_DDR_CFG_ddr3_1866_x16=y
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
CONFIG_KERNEL_ENTRY_HACK=y
|
||||
CONFIG_KERNEL_ENTRY_HACK_ADDR="0x80108000"
|
||||
CONFIG_TOOLCHAIN_GLIBC_ARM=y
|
||||
# CONFIG_FLASH_SIZE_SHRINK is not set
|
||||
CONFIG_CP_EXT_WIRELESS=y
|
||||
CONFIG_BOOT_IMAGE_SINGLE_DTB=y
|
||||
CONFIG_STORAGE_TYPE_sd=y
|
||||
CONFIG_SENSOR_GCORE_GC4653=y
|
||||
CONFIG_UBOOT_2021_10=y
|
||||
CONFIG_KERNEL_SRC_5.10=y
|
||||
CONFIG_KERNEL_SRC="linux_5.10"
|
||||
CONFIG_KERNEL_LZMA=y
|
||||
CONFIG_SKIP_RAMDISK=y
|
||||
CONFIG_SENSOR_TUNING_PARAM_cv181x_src_gcore_gc4653=y
|
||||
# CONFIG_ROOTFS_OVERLAYFS is not set
|
||||
# CONFIG_TARGET_PACKAGE_RSYSLOG is not set
|
||||
# CONFIG_TARGET_PACKAGE_GATORD is not set
|
||||
CONFIG_ENABLE_FREERTOS=y
|
||||
@@ -0,0 +1,137 @@
|
||||
__attribute__((optimize("O0")))
|
||||
// 1.26ms
|
||||
void suck_loop(uint64_t loop) {
|
||||
loop = loop * 50 * 100;
|
||||
uint64_t a;
|
||||
while (loop > 0) {
|
||||
a = loop / (uint64_t)99;
|
||||
a = loop / (uint64_t)77;
|
||||
a = loop / (uint64_t)55;
|
||||
a = loop / (uint64_t)33;
|
||||
a = loop / (uint64_t)11;
|
||||
a = loop / (uint64_t)999;
|
||||
a = loop / (uint64_t)777;
|
||||
a = loop / (uint64_t)555;
|
||||
a = loop / (uint64_t)333;
|
||||
a = loop / (uint64_t)111;
|
||||
a = loop / (uint64_t)9999;
|
||||
a = loop / (uint64_t)7777;
|
||||
a = loop / (uint64_t)5555;
|
||||
a = loop / (uint64_t)3333;
|
||||
a = loop / (uint64_t)1111;
|
||||
a = loop / (uint64_t)99999;
|
||||
a = loop / (uint64_t)77777;
|
||||
a = loop / (uint64_t)55555;
|
||||
a = loop / (uint64_t)33333;
|
||||
a = loop / (uint64_t)11111;
|
||||
loop--;
|
||||
}
|
||||
}
|
||||
|
||||
static inline void user_led_on(void) {
|
||||
uint32_t val;
|
||||
|
||||
val = mmio_read_32(0x03020000);
|
||||
val |= (1 << 14);
|
||||
mmio_write_32(0x03020000, val);
|
||||
}
|
||||
|
||||
static inline void user_led_off(void) {
|
||||
uint32_t val;
|
||||
|
||||
val = mmio_read_32(0x03020000);
|
||||
val &= ~(1 << 14);
|
||||
mmio_write_32(0x03020000, val);
|
||||
}
|
||||
|
||||
static inline void user_led_toggle(void) {
|
||||
uint32_t val;
|
||||
|
||||
val = mmio_read_32(0x03020000);
|
||||
val ^= (1 << 14);
|
||||
mmio_write_32(0x03020000, val);
|
||||
}
|
||||
|
||||
int cvi_board_init(void)
|
||||
{
|
||||
uint32_t val;
|
||||
|
||||
// user led
|
||||
mmio_write_32(0x03001038, 0x3); // GPIOA 14 GPIO_MODE
|
||||
val = mmio_read_32(0x03020004); // GPIOA DIR
|
||||
val |= (1 << 14); // output
|
||||
mmio_write_32(0x03020004, val);
|
||||
user_led_toggle();
|
||||
|
||||
// wifi power reset
|
||||
mmio_write_32(0x0300104C, 0x3); // GPIOA 26
|
||||
val = mmio_read_32(0x03020004); // GPIOA DIR
|
||||
val |= (1 << 26); // output
|
||||
mmio_write_32(0x03020004, val);
|
||||
|
||||
val = mmio_read_32(0x03020000); // signal level
|
||||
val &= ~(1 << 26); // set level to low
|
||||
mmio_write_32(0x03020000, val);
|
||||
|
||||
suck_loop(50);
|
||||
user_led_toggle();
|
||||
|
||||
val = mmio_read_32(0x03020000); // signal level
|
||||
val |= (1 << 26); // set level to high
|
||||
mmio_write_32(0x03020000, val);
|
||||
|
||||
// wifi sdio pinmux
|
||||
mmio_write_32(0x030010D0, 0x0); // D3
|
||||
mmio_write_32(0x030010D4, 0x0); // D2
|
||||
mmio_write_32(0x030010D8, 0x0); // D1
|
||||
mmio_write_32(0x030010DC, 0x0); // D0
|
||||
mmio_write_32(0x030010E0, 0x0); // CMD
|
||||
mmio_write_32(0x030010E4, 0x0); // CLK
|
||||
|
||||
// uart bluetooth
|
||||
mmio_write_32(0x03001070, 0x1); // GPIOA 28 UART1 TX
|
||||
mmio_write_32(0x03001074, 0x1); // GPIOA 29 UART1 RX
|
||||
mmio_write_32(0x03001068, 0x4); // GPIOA 18 UART1 CTS
|
||||
mmio_write_32(0x03001064, 0x4); // GPIOA 19 UART1 RTS
|
||||
|
||||
// PWM
|
||||
//mmio_write_32(0x03001068, 0x2); // GPIOA 18 PWM 6
|
||||
|
||||
// lcd reset
|
||||
mmio_write_32(0x030010A4, 0x0); // PWRGPIO 0 GPIO_MODE
|
||||
|
||||
user_led_toggle();
|
||||
// lcd backlight
|
||||
//mmio_write_32(0x030010EC, 0x0); // GPIOB 0 PWM0_BUCK
|
||||
// for licheervnano alpha
|
||||
val = mmio_read_32(0x03021000); // signal level
|
||||
val |= (1 << 0); // set level to high
|
||||
mmio_write_32(0x03021000, val);
|
||||
val = mmio_read_32(0x03021004); // GPIOB DIR
|
||||
val |= (1 << 0); // output
|
||||
mmio_write_32(0x03021004, val);
|
||||
mmio_write_32(0x030010EC, 0x3); // GPIOB 0 GPIO_MODE
|
||||
|
||||
// for licheervnano beta
|
||||
//mmio_write_32(0x030010ac, 0x4); // PWRGPIO 2 PWM 10
|
||||
mmio_write_32(0x030010ac, 0x0); // PWRGPIO 2 GPIO_MODE
|
||||
|
||||
// camera function
|
||||
//mmio_write_32(0x0300116C, 0x5); // RX4N CAM_MCLK0 for alpha
|
||||
mmio_write_32(0x0300118C, 0x5); // RX0N CAM_MCLK1 for beta
|
||||
|
||||
// camera/tp i2c
|
||||
mmio_write_32(0x03001090, 0x5); // PWR_GPIO6 IIC4_SCL
|
||||
mmio_write_32(0x03001098, 0x5); // PWR_GPIO8 IIC4_SDA
|
||||
|
||||
// tp function
|
||||
mmio_write_32(0x03001084, 0x3); // PWR_SEQ1 PWR_GPIO[3]
|
||||
mmio_write_32(0x03001088, 0x3); // PWR_SEQ2 PWR_GPIO[4]
|
||||
mmio_write_32(0x05027078, 0x11);// Unlock PWR_GPIO[3]
|
||||
mmio_write_32(0x0502707c, 0x11);// Unlock PWR_GPIO[4]
|
||||
|
||||
// wait hardware bootup
|
||||
suck_loop(50);
|
||||
user_led_off();
|
||||
return 0;
|
||||
}
|
||||
13
build/boards/sg200x/sg2002_licheea53nano_sd/u-boot/cvitek.h
Normal file
13
build/boards/sg200x/sg2002_licheea53nano_sd/u-boot/cvitek.h
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
*VO control GPIOs
|
||||
*/
|
||||
#define VO_GPIO_RESET_PORT portb
|
||||
#define VO_GPIO_RESET_INDEX 5
|
||||
#define VO_GPIO_RESET_ACTIVE GPIO_ACTIVE_LOW
|
||||
#define VO_GPIO_PWM_PORT portb
|
||||
#define VO_GPIO_PWM_INDEX 4
|
||||
#define VO_GPIO_PWM_ACTIVE GPIO_ACTIVE_HIGH
|
||||
#define VO_GPIO_POWER_CT_PORT portb
|
||||
#define VO_GPIO_POWER_CT_INDEX 3
|
||||
#define VO_GPIO_POWER_CT_ACTIVE GPIO_ACTIVE_HIGH
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
CONFIG_ARM=y
|
||||
CONFIG_SYS_MALLOC_F_LEN=0x2000
|
||||
CONFIG_NR_DRAM_BANKS=1
|
||||
CONFIG_DEFAULT_DEVICE_TREE="soph_asic"
|
||||
CONFIG_IDENT_STRING=" soph"
|
||||
CONFIG_ARMV8_SET_SMPEN=y
|
||||
CONFIG_TARGET_CVITEK_CV181X=y
|
||||
#CONFIG_CVITEK_SPI_FLASH=y
|
||||
CONFIG_DISTRO_DEFAULTS=y
|
||||
CONFIG_FIT=y
|
||||
# CONFIG_ARCH_FIXUP_FDT_MEMORY is not set
|
||||
CONFIG_BOOTDELAY=0
|
||||
# CONFIG_DISPLAY_CPUINFO is not set
|
||||
# CONFIG_DISPLAY_BOARDINFO is not set
|
||||
CONFIG_SYS_PROMPT="soph# "
|
||||
# CONFIG_CMD_CONSOLE is not set
|
||||
# CONFIG_CMD_XIMG is not set
|
||||
# CONFIG_CMD_EDITENV is not set
|
||||
# CONFIG_CMD_CRC32 is not set
|
||||
# CONFIG_CMD_LZMADEC is not set
|
||||
# CONFIG_CMD_UNLZ4 is not set
|
||||
# CONFIG_CMD_UNZIP is not set
|
||||
# CONFIG_CMD_LOADS is not set
|
||||
CONFIG_CMD_MMC=y
|
||||
# CONFIG_CMD_ITEST is not set
|
||||
CONFIG_CMD_CACHE=y
|
||||
CONFIG_CMD_CVI_SD_UPDATE=y
|
||||
# CONFIG_ISO_PARTITION is not set
|
||||
# CONFIG_EFI_PARTITION is not set
|
||||
CONFIG_OF_CONTROL=y
|
||||
CONFIG_NET_RANDOM_ETHADDR=y
|
||||
CONFIG_DM=y
|
||||
CONFIG_DM_MMC=y
|
||||
CONFIG_MMC=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_SDMA=y
|
||||
CONFIG_MMC_SDHCI_CVITEK=y
|
||||
CONFIG_MTD=y
|
||||
# CONFIG_PHY_SMSC is not set
|
||||
CONFIG_DM_ETH=y
|
||||
CONFIG_ETH_DESIGNWARE=y
|
||||
CONFIG_PHY_CVITEK=y
|
||||
CONFIG_SYS_NS16550=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_LZ4=y
|
||||
CONFIG_LZMA=y
|
||||
# CONFIG_TOOLS_LIBCRYPTO is not set
|
||||
# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
|
||||
CONFIG_ENV_IS_NOWHERE=y
|
||||
|
||||
# for licheervnano
|
||||
CONFIG_UDP_FUNCTION_FASTBOOT=y
|
||||
CONFIG_FASTBOOT_FLASH=y
|
||||
CONFIG_FASTBOOT_BUF_ADDR=0x81800000
|
||||
CONFIG_FASTBOOT_BUF_SIZE=0x1000000
|
||||
CONFIG_FASTBOOT_FLASH_MMC_DEV=0
|
||||
CONFIG_DISPLAY=y
|
||||
CONFIG_DM_VIDEO=y
|
||||
CONFIG_DM_GPIO=y
|
||||
CONFIG_DWAPB_GPIO=y
|
||||
CONFIG_CMD_VIDCONSOLE=y
|
||||
CONFIG_VIDEO_BPP16=y
|
||||
CONFIG_VIDEO_BPP32=y
|
||||
CONFIG_VIDEO_CVITEK=y
|
||||
CONFIG_DISPLAY_CVITEK_MIPI=y
|
||||
CONFIG_BMP_16BPP=y
|
||||
CONFIG_BMP_24BPP=y
|
||||
CONFIG_BMP_32BPP=y
|
||||
CONFIG_BOOTLOGO=y
|
||||
CONFIG_CMD_CVI_VO=y
|
||||
CONFIG_CMD_GPIO=y
|
||||
@@ -34,22 +34,24 @@
|
||||
&cvi_vo {
|
||||
#ifndef __UBOOT__
|
||||
/delete-property/ reset-gpio;
|
||||
/delete-property/ pwm-gpio;
|
||||
#else
|
||||
// for uboot
|
||||
reset-gpio = <&porte 0 1>;
|
||||
pwm-gpio = <&porte 2 1>;
|
||||
#endif
|
||||
/delete-property/ pwm-gpio;
|
||||
/delete-property/ power-ct-gpio;
|
||||
|
||||
};
|
||||
|
||||
&mipi_tx {
|
||||
/delete-property/ pwm-gpio;
|
||||
#ifndef __UBOOT__
|
||||
// for linux kernel
|
||||
reset-gpio = <&porte 0 1>;
|
||||
pwm-gpio = <&porte 2 1>;
|
||||
#else
|
||||
/delete-property/ reset-gpio;
|
||||
/delete-property/ pwm-gpio;
|
||||
#endif
|
||||
/delete-property/ power-ct-gpio;
|
||||
status = "okay";
|
||||
@@ -146,6 +148,13 @@
|
||||
};
|
||||
};
|
||||
|
||||
lcd0_backlight: pwm-backlight@0 {
|
||||
compatible = "pwm-backlight";
|
||||
pwms = <&pwm2 2 50000000>; // 20Khz
|
||||
brightness-levels = <0 2 4 8 16 32 64 128 255>;
|
||||
default-brightness-level = <4>;
|
||||
};
|
||||
|
||||
wifisd:wifi-sd@4320000 {
|
||||
compatible = "cvitek,cv181x-sdio";
|
||||
bus-width = <4>;
|
||||
|
||||
@@ -8,7 +8,7 @@ CONFIG_PREEMPT=y
|
||||
CONFIG_IKCONFIG=y
|
||||
CONFIG_IKCONFIG_PROC=y
|
||||
CONFIG_LOG_BUF_SHIFT=15
|
||||
CONFIG_BLK_DEV_INITRD=n
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
# CONFIG_SYSFS_SYSCALL is not set
|
||||
# CONFIG_FHANDLE is not set
|
||||
# CONFIG_BASE_FULL is not set
|
||||
@@ -107,14 +107,8 @@ CONFIG_CVITEK_PHY=y
|
||||
# CONFIG_WLAN_VENDOR_TI is not set
|
||||
# CONFIG_WLAN_VENDOR_ZYDAS is not set
|
||||
CONFIG_INPUT=y
|
||||
CONFIG_INPUT_MOUSEDEV=y
|
||||
CONFIG_INPUT_MOUSEDEV_PSAUX=y
|
||||
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
|
||||
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
|
||||
CONFIG_INPUT_EVDEV=y
|
||||
# CONFIG_SERIO is not set
|
||||
# CONFIG_VT is not set
|
||||
# CONFIG_LEGACY_PTYS is not set
|
||||
CONFIG_SERIAL_8250=y
|
||||
CONFIG_SERIAL_8250_CONSOLE=y
|
||||
CONFIG_SERIAL_8250_NR_UARTS=5
|
||||
@@ -450,7 +444,17 @@ CONFIG_RCU_TRACE=n
|
||||
# CONFIG_DEBUG_PREEMPT is not set
|
||||
# CONFIG_FTRACE is not set
|
||||
# CONFIG_RUNTIME_TESTING_MENU is not set
|
||||
CONFIG_USB_ROLE_SWITCH=y
|
||||
|
||||
CONFIG_RTC_CLASS=y
|
||||
|
||||
CONFIG_BLK_DEV_LOOP=y
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_CHR_DEV_SG=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_OTG=y
|
||||
CONFIG_USB_OTG_FSM=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
CONFIG_USB_LIBCOMPOSITE=y
|
||||
CONFIG_USB_F_ACM=y
|
||||
CONFIG_USB_U_SERIAL=y
|
||||
@@ -463,6 +467,7 @@ CONFIG_USB_F_RNDIS=y
|
||||
CONFIG_USB_F_MASS_STORAGE=y
|
||||
CONFIG_USB_F_FS=y
|
||||
CONFIG_USB_F_UAC1=y
|
||||
CONFIG_USB_ROLE_SWITCH=y
|
||||
# buggy driver, need fix
|
||||
# CONFIG_USB_F_UVC is not set
|
||||
CONFIG_USB_CONFIGFS=y
|
||||
@@ -539,6 +544,10 @@ CONFIG_V4L2_FLASH_LED_CLASS=y
|
||||
CONFIG_MEDIA_USB_SUPPORT=y
|
||||
CONFIG_USB_VIDEO_CLASS=y
|
||||
CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
|
||||
CONFIG_VT=y
|
||||
# CONFIG_LEGACY_PTYS is not set
|
||||
CONFIG_BACKLIGHT_CLASS_DEVICE=m
|
||||
CONFIG_BACKLIGHT_PWM=m
|
||||
|
||||
# these driver may broken codec driver
|
||||
# CONFIG_FUSE_FS is not set
|
||||
|
||||
@@ -14,11 +14,13 @@ CONFIG_CP_EXT_WIRELESS=y
|
||||
CONFIG_STORAGE_TYPE_sd=y
|
||||
CONFIG_MIPI_PANEL_ZCT2133V1=y
|
||||
CONFIG_SENSOR_GCORE_GC4653=y
|
||||
CONFIG_SENSOR_OV_OS04A10=y
|
||||
CONFIG_UBOOT_2021_10=y
|
||||
CONFIG_KERNEL_SRC_5.10=y
|
||||
CONFIG_KERNEL_LZMA=y
|
||||
CONFIG_SKIP_RAMDISK=y
|
||||
CONFIG_KERNEL_UNCOMPRESSED=y
|
||||
# CONFIG_SKIP_RAMDISK is not set
|
||||
CONFIG_SENSOR_TUNING_PARAM_cv181x_src_gcore_gc4653=y
|
||||
# CONFIG_SENSOR_TUNING_PARAM_sg200x_src_ov_os04a10=y
|
||||
# CONFIG_ROOTFS_OVERLAYFS is not set
|
||||
# CONFIG_ENABLE_FREERTOS is not set
|
||||
CONFIG_ENABLE_FREERTOS=y
|
||||
# CONFIG_TARGET_PACKAGE_GATORD is not set
|
||||
|
||||
@@ -73,7 +73,7 @@ int cvi_board_init(void)
|
||||
val &= ~(1 << 26); // set level to low
|
||||
mmio_write_32(0x03020000, val);
|
||||
|
||||
suck_loop(200);
|
||||
suck_loop(50);
|
||||
user_led_toggle();
|
||||
|
||||
val = mmio_read_32(0x03020000); // signal level
|
||||
@@ -113,10 +113,12 @@ int cvi_board_init(void)
|
||||
mmio_write_32(0x030010EC, 0x3); // GPIOB 0 GPIO_MODE
|
||||
|
||||
// for licheervnano beta
|
||||
mmio_write_32(0x030010ac, 0x4); // PWRGPIO 2 PWM 10
|
||||
//mmio_write_32(0x030010ac, 0x4); // PWRGPIO 2 PWM 10
|
||||
mmio_write_32(0x030010ac, 0x0); // PWRGPIO 2 GPIO_MODE
|
||||
|
||||
// camera function
|
||||
mmio_write_32(0x0300116C, 0x5); // RX4N CAM_MCLK0
|
||||
//mmio_write_32(0x0300116C, 0x5); // RX4N CAM_MCLK0 for alpha
|
||||
mmio_write_32(0x0300118C, 0x5); // RX0N CAM_MCLK1 for beta
|
||||
|
||||
// camera/tp i2c
|
||||
mmio_write_32(0x03001090, 0x5); // PWR_GPIO6 IIC4_SCL
|
||||
@@ -129,7 +131,7 @@ int cvi_board_init(void)
|
||||
mmio_write_32(0x0502707c, 0x11);// Unlock PWR_GPIO[4]
|
||||
|
||||
// wait hardware bootup
|
||||
suck_loop(100);
|
||||
suck_loop(50);
|
||||
user_led_off();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ CONFIG_TARGET_CVITEK_CV181X=y
|
||||
CONFIG_DISTRO_DEFAULTS=y
|
||||
CONFIG_FIT=y
|
||||
# CONFIG_ARCH_FIXUP_FDT_MEMORY is not set
|
||||
CONFIG_BOOTDELAY=1
|
||||
CONFIG_BOOTDELAY=0
|
||||
CONFIG_SYS_PROMPT="soph# "
|
||||
# CONFIG_CMD_CONSOLE is not set
|
||||
# CONFIG_CMD_XIMG is not set
|
||||
@@ -63,3 +63,4 @@ CONFIG_BMP_32BPP=y
|
||||
CONFIG_BOOTLOGO=y
|
||||
CONFIG_CMD_CVI_VO=y
|
||||
CONFIG_CMD_GPIO=y
|
||||
CONFIG_CMD_MBR=y
|
||||
|
||||
@@ -242,6 +242,28 @@ function pack_burn_image
|
||||
popd
|
||||
)}
|
||||
|
||||
function pack_usbdl_image
|
||||
{(
|
||||
pushd "$OUTPUT_DIR"
|
||||
[ -d tmp ] && rm -rf tmp
|
||||
set -eux
|
||||
cp -rf $TOOLS_PATH/cv181x/usb_dl $OUTPUT_DIR
|
||||
cd usb_dl
|
||||
unzip -o $OUTPUT_DIR/upgrade.zip
|
||||
cp $OUTPUT_DIR/fip.bin ./
|
||||
set +eux
|
||||
echo "========================================="
|
||||
echo ""
|
||||
echo "usb flash command:"
|
||||
echo ""
|
||||
echo "cd $OUTPUT_DIR/usb_dl && python3 cv181x_dl.py"
|
||||
echo ""
|
||||
echo ""
|
||||
echo "========================================="
|
||||
|
||||
popd
|
||||
)}
|
||||
|
||||
function pack_prog_img
|
||||
{(
|
||||
local tmp_dir
|
||||
|
||||
@@ -621,6 +621,7 @@ function build_all()
|
||||
pack_data || return $?
|
||||
pack_system || return $?
|
||||
pack_upgrade || return $?
|
||||
pack_usbdl_image || return $?
|
||||
pack_burn_image || return $?
|
||||
)}
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ fsbl%: export FSBL_SECURE_BOOT_SUPPORT=${CONFIG_FSBL_SECURE_BOOT_SUPPORT}
|
||||
fsbl%: export ARCH=$(call qstrip,${CONFIG_ARCH})
|
||||
fsbl%: export OD_CLK_SEL=${CONFIG_OD_CLK_SEL}
|
||||
fsbl%: export VC_CLK_OVERDRIVE=${CONFIG_VC_CLK_OVERDRIVE}
|
||||
fsbl%: export TPU_PERF_MODE=$(shell if [ "${CONFIG_CHIP_cv1812cp}" = "y" ] || [ "${CONFIG_CHIP_sg2002}" = "y" ]; then echo "y";else echo "n";fi)
|
||||
fsbl-build: u-boot-build memory-map
|
||||
$(call print_target)
|
||||
${Q}mkdir -p ${FSBL_PATH}/build
|
||||
|
||||
@@ -6,8 +6,8 @@ image boot.vfat {
|
||||
"rawimages/boot.sd",
|
||||
"usb.dev",
|
||||
"usb.rndis0",
|
||||
"fb",
|
||||
"wifi.sta",
|
||||
"ver",
|
||||
}
|
||||
}
|
||||
size = 16M
|
||||
|
||||
@@ -16,7 +16,8 @@ fi
|
||||
output_dir=$1
|
||||
echo ${output_dir}
|
||||
set -eu
|
||||
image=`LC_ALL=C date | tr -d '( ):'`.img
|
||||
git_id=$(git rev-parse HEAD | head -c 6)
|
||||
image=$(LC_ALL=C date +%F-%R | sed -e 's/:/-/g' | tr -d '( ):')-${git_id}.img
|
||||
THISDIR=$(dirname $(realpath $0))
|
||||
mkdir -pv ${output_dir}/tmp/
|
||||
mkdir -pv ${output_dir}/root/
|
||||
@@ -27,9 +28,9 @@ cp -fv ${output_dir}/rawimages/boot.sd ${output_dir}/input/rawimages/
|
||||
cp -fv ${output_dir}/rawimages/rootfs.sd ${output_dir}/input/
|
||||
touch ${output_dir}/input/usb.dev
|
||||
touch ${output_dir}/input/usb.rndis0
|
||||
touch ${output_dir}/input/fb
|
||||
touch ${output_dir}/input/wifi.sta
|
||||
touch ${output_dir}/input/gt9xx
|
||||
echo ${image} > ${output_dir}/input/ver
|
||||
cp -fv ${THISDIR}/genimage_rootless.cfg ${output_dir}/genimage.cfg
|
||||
sed -i -e "s/duo.img/${image}/g" ${output_dir}/genimage.cfg
|
||||
cd ${output_dir}/
|
||||
|
||||
@@ -83,6 +83,8 @@ class XmlParser:
|
||||
|
||||
if self.storage == "emmc":
|
||||
self.__calEmmcOffset(parts)
|
||||
if self.storage == "sd":
|
||||
self.__calEmmcOffset(parts)
|
||||
elif self.storage == "spinor":
|
||||
self.__calNorOffset(parts)
|
||||
elif self.storage == "spinand":
|
||||
|
||||
@@ -41,8 +41,8 @@ def parse_Args():
|
||||
type=str)
|
||||
parser.add_argument(
|
||||
'--pid',
|
||||
metavar='1001',
|
||||
default='1001',
|
||||
metavar='1000',
|
||||
default='1000',
|
||||
type=str)
|
||||
parser.add_argument(
|
||||
"-v",
|
||||
|
||||
@@ -30,7 +30,7 @@ use-ipv6=yes
|
||||
#use-iff-running=no
|
||||
#enable-dbus=yes
|
||||
#disallow-other-stacks=no
|
||||
allow-point-to-point=yes
|
||||
#allow-point-to-point=no
|
||||
#cache-entries-max=4096
|
||||
#clients-max=4096
|
||||
#objects-per-client-max=1024
|
||||
@@ -45,7 +45,7 @@ enable-wide-area=yes
|
||||
#disable-publishing=no
|
||||
#disable-user-service-publishing=no
|
||||
#add-service-cookie=no
|
||||
#publish-addresses=yes
|
||||
publish-addresses=yes
|
||||
publish-hinfo=yes
|
||||
publish-workstation=yes
|
||||
#publish-domain=yes
|
||||
|
||||
@@ -29,9 +29,6 @@ then
|
||||
insmod soph_pwm.ko
|
||||
insmod soph_saradc.ko
|
||||
insmod soph_wiegand.ko
|
||||
insmod cfg80211.ko
|
||||
insmod 3rd/aic8800_bsp.ko
|
||||
insmod 3rd/aic8800_fdrv.ko
|
||||
echo "OK"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@@ -26,5 +26,27 @@ then
|
||||
then
|
||||
cp /boot/ttyGS0_handler.sh /etc/ttyGS0_handler.sh
|
||||
fi
|
||||
if [ -e /boot/alpha ]
|
||||
then
|
||||
if [ ! -e /mnt/data/sensor_cfg.ini ]
|
||||
then
|
||||
cp /mnt/data/sensor_cfg.ini.alpha /mnt/data/sensor_cfg.ini
|
||||
fi
|
||||
# MIPI RX 4N PINMUX MCLK0
|
||||
devmem 0x0300116C 32 0x5
|
||||
# MIPI RX 0N PINMUX MIPIP RX 0N
|
||||
devmem 0x0300118C 32 0x3
|
||||
echo " alpha "
|
||||
else
|
||||
if [ ! -e /mnt/data/sensor_cfg.ini ]
|
||||
then
|
||||
cp /mnt/data/sensor_cfg.ini.beta /mnt/data/sensor_cfg.ini
|
||||
fi
|
||||
# MIPI RX 4N PINMUX MIPI RX 4N
|
||||
devmem 0x0300116C 32 0x3
|
||||
# MIPI RX 0N PINMUX MCLK1
|
||||
devmem 0x0300118C 32 0x5
|
||||
echo -n " beta "
|
||||
fi
|
||||
echo "OK"
|
||||
fi
|
||||
|
||||
13
buildroot/board/cvitek/SG200X/overlay/etc/init.d/S25wifimod
Executable file
13
buildroot/board/cvitek/SG200X/overlay/etc/init.d/S25wifimod
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "$1" = "start" ]
|
||||
then
|
||||
. /etc/profile
|
||||
printf "load wifi kernel module: "
|
||||
cd /mnt/system/ko/
|
||||
insmod cfg80211.ko
|
||||
insmod 3rd/aic8800_bsp.ko
|
||||
insmod 3rd/aic8800_fdrv.ko
|
||||
echo "OK"
|
||||
exit 0
|
||||
fi
|
||||
@@ -62,7 +62,7 @@ start() {
|
||||
wpa_passphrase "$ssid" "$pass" >> /etc/wpa_supplicant.conf
|
||||
fi
|
||||
wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf
|
||||
if [ -e /boot/wifi.dhcp ]
|
||||
if [ ! -e /boot/wifi.nodhcp ]
|
||||
then
|
||||
(udhcpc -i wlan0 -t 10 -T 1 -A 5 -b -p /run/udhcpc.wlan0.pid) &
|
||||
fi
|
||||
|
||||
39
buildroot/board/cvitek/SG200X/overlay/etc/init.d/S99ednctest
Executable file
39
buildroot/board/cvitek/SG200X/overlay/etc/init.d/S99ednctest
Executable file
@@ -0,0 +1,39 @@
|
||||
#!/bin/sh
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
printf "Starting ednctest: "
|
||||
if [ -e /boot/ednctest ]
|
||||
then
|
||||
touch /tmp/ednctest
|
||||
fi
|
||||
. /etc/profile
|
||||
(
|
||||
while true
|
||||
do
|
||||
if [ ! -e /tmp/ednctest ]
|
||||
then
|
||||
break
|
||||
fi
|
||||
if [ ! -e /tmp/rand.h264 ]
|
||||
then
|
||||
dd if=/dev/urandom of=/tmp/rand.yuv bs=1M count=2
|
||||
/mnt/system/usr/bin/sample_venc -h 1080 -w 1080 -c 264 -i rand.yuv -o /tmp/rand
|
||||
fi
|
||||
/mnt/system/usr/bin/sample_vcodec sample_vdec -c 264 -i rand.h264 -o rand
|
||||
done
|
||||
) &
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
;;
|
||||
stop)
|
||||
printf "Stopping ednctest: "
|
||||
rm /tmp/ednctest
|
||||
echo "OK"
|
||||
;;
|
||||
restart)
|
||||
printf "Restart ednctest: "
|
||||
$(realpath ${0}) stop
|
||||
$(realpath ${0}) start
|
||||
echo "OK"
|
||||
;;
|
||||
esac
|
||||
35
buildroot/board/cvitek/SG200X/overlay/etc/init.d/S99modeltest
Executable file
35
buildroot/board/cvitek/SG200X/overlay/etc/init.d/S99modeltest
Executable file
@@ -0,0 +1,35 @@
|
||||
#!/bin/sh
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
printf "Starting modeltest: "
|
||||
if [ -e /boot/modeltest ]
|
||||
then
|
||||
touch /tmp/modeltest
|
||||
fi
|
||||
(
|
||||
while true
|
||||
do
|
||||
if [ ! -e /tmp/modeltest ]
|
||||
then
|
||||
break
|
||||
fi
|
||||
cd /usr/bin/
|
||||
nice -n 19 model_runner_test 10000
|
||||
done
|
||||
) &
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
;;
|
||||
stop)
|
||||
printf "Stopping modeltest: "
|
||||
rm /tmp/modeltest
|
||||
killall model_runner
|
||||
echo "OK"
|
||||
;;
|
||||
restart)
|
||||
printf "Restart modeltest: "
|
||||
$(realpath ${0}) stop
|
||||
$(realpath ${0}) start
|
||||
echo "OK"
|
||||
;;
|
||||
esac
|
||||
@@ -15,9 +15,10 @@
|
||||
#ListenAddress 0.0.0.0
|
||||
#ListenAddress ::
|
||||
|
||||
#HostKey /etc/ssh/ssh_host_rsa_key
|
||||
#HostKey /etc/ssh/ssh_host_ecdsa_key
|
||||
#HostKey /etc/ssh/ssh_host_ed25519_key
|
||||
# some old ssh utils need rsa & ecdsa
|
||||
HostKey /etc/ssh/ssh_host_rsa_key
|
||||
HostKey /etc/ssh/ssh_host_ecdsa_key
|
||||
HostKey /etc/ssh/ssh_host_ed25519_key
|
||||
|
||||
# Ciphers and keying
|
||||
#RekeyLimit default none
|
||||
|
||||
BIN
buildroot/board/cvitek/SG200X/overlay/mnt/cfg/param/cvi_sdr_bin
Normal file
BIN
buildroot/board/cvitek/SG200X/overlay/mnt/cfg/param/cvi_sdr_bin
Normal file
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,34 @@
|
||||
[source]
|
||||
|
||||
;type = SOURCE_USER_FE
|
||||
|
||||
dev_num = 1
|
||||
|
||||
; section for sensor
|
||||
|
||||
[sensor]
|
||||
|
||||
; sensor name
|
||||
name = GCORE_GC4653_MIPI_4M_30FPS_10BIT
|
||||
|
||||
bus_id = 4
|
||||
|
||||
sns_i2c_addr = 29
|
||||
|
||||
mipi_dev = 0
|
||||
|
||||
lane_id = 2, 1, 0, -1, -1
|
||||
|
||||
pn_swap = 0, 0, 0, 0, 0
|
||||
|
||||
mclk_en = 1
|
||||
|
||||
mclk = 0
|
||||
|
||||
;port = 0
|
||||
|
||||
;pin = 2
|
||||
|
||||
;pol = 1
|
||||
|
||||
;fps = 30
|
||||
@@ -0,0 +1,34 @@
|
||||
[source]
|
||||
|
||||
;type = SOURCE_USER_FE
|
||||
|
||||
dev_num = 1
|
||||
|
||||
; section for sensor
|
||||
|
||||
[sensor]
|
||||
|
||||
; sensor name
|
||||
name = GCORE_GC4653_MIPI_4M_30FPS_10BIT
|
||||
|
||||
bus_id = 4
|
||||
|
||||
sns_i2c_addr = 29
|
||||
|
||||
mipi_dev = 0
|
||||
|
||||
lane_id = 4, 3, 2, -1, -1
|
||||
|
||||
pn_swap = 0, 0, 0, 0, 0
|
||||
|
||||
mclk_en = 1
|
||||
|
||||
mclk = 1
|
||||
|
||||
;port = 0
|
||||
|
||||
;pin = 2
|
||||
|
||||
;pol = 1
|
||||
|
||||
;fps = 30
|
||||
383
buildroot/configs/cvitek_SG200X_32bit_defconfig
Normal file
383
buildroot/configs/cvitek_SG200X_32bit_defconfig
Normal file
@@ -0,0 +1,383 @@
|
||||
BR2_arm=y
|
||||
BR2_cortex_a53=y
|
||||
BR2_ARM_EABIHF=y
|
||||
BR2_ARM_FPU_FP_ARMV8=y
|
||||
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_ARM_ARM=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY=y
|
||||
BR2_OPTIMIZE_2=y
|
||||
|
||||
BR2_CCACHE=y
|
||||
BR2_REPRODUCIBLE=y
|
||||
BR2_PER_PACKAGE_DIRECTORIES=y
|
||||
|
||||
BR2_TARGET_GENERIC_HOSTNAME="licheea53nano"
|
||||
BR2_TARGET_GENERIC_ISSUE="Welcome to Linux"
|
||||
BR2_TARGET_GENERIC_ROOT_PASSWD="root"
|
||||
|
||||
BR2_PACKAGE_AIC8800_SDIO_FIRMWARE=y
|
||||
|
||||
BR2_INIT_SYSV=y
|
||||
BR2_ROOTFS_MERGED_USR=y
|
||||
BR2_ENABLE_LOCALE_WHITELIST="C en_US en_US.utf8"
|
||||
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
|
||||
BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
|
||||
BR2_PACKAGE_KMOD=y
|
||||
# dont rename network card,
|
||||
# BR2_PACKAGE_EUDEV_RULES_GEN is not set
|
||||
BR2_PACKAGE_EUDEV_ENABLE_HWDB=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS_TOOLS=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS_DEPRECATED=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_HID=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_NETWORK=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS_TOOLS_HID2HCI=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS_MONITOR=y
|
||||
BR2_PACKAGE_BLUEZ_ALSA=y
|
||||
BR2_PACKAGE_BLUEZ_ALSA_RFCOMM=y
|
||||
BR2_PACKAGE_BLUEZ_ALSA_HCITOP=y
|
||||
BR2_PACKAGE_NTP=y
|
||||
BR2_PACKAGE_NTP_NTPD=y
|
||||
BR2_PACKAGE_NTP_NTPDATE=y
|
||||
BR2_PACKAGE_MACCHANGER=y
|
||||
BR2_PACKAGE_AVAHI=y
|
||||
BR2_PACKAGE_AVAHI_AUTOIPD=y
|
||||
# avahi mdns is buggy
|
||||
# BR2_PACKAGE_AVAHI_DAEMON is not set
|
||||
# BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY is not set
|
||||
# BR2_PACKAGE_AVAHI_DEFAULT_SERVICES is not set
|
||||
BR2_PACKAGE_MDNSD=y
|
||||
BR2_PACKAGE_MDNSD_MQUERY=y
|
||||
BR2_PACKAGE_MDNSD_HTTP_SERVICE=y
|
||||
BR2_PACKAGE_MDNSD_SSH_SERVICE=y
|
||||
BR2_PACKAGE_WIRELESS_TOOLS=y
|
||||
BR2_PACKAGE_WIRELESS_TOOLS_IFRENAME=y
|
||||
BR2_PACKAGE_WIRELESS_TOOLS_IWCONFIG=y
|
||||
BR2_PACKAGE_WIRELESS_TOOLS_LIB=y
|
||||
BR2_PACKAGE_AIRCRACK_NG=y
|
||||
BR2_PACKAGE_UTIL_LINUX_RFKILL=y
|
||||
BR2_PACKAGE_IPERF3=y
|
||||
BR2_PACKAGE_ETHTOOL=y
|
||||
BR2_PACKAGE_DNSMASQ=y
|
||||
BR2_PACKAGE_DNSMASQ_DHCP=y
|
||||
BR2_PACKAGE_RSYNC=y
|
||||
BR2_PACKAGE_SOCAT=y
|
||||
BR2_PACKAGE_TINC=y
|
||||
BR2_PACKAGE_WIRELESS_REGDB=y
|
||||
BR2_PACKAGE_MOSH=y
|
||||
BR2_PACKAGE_LRZSZ=y
|
||||
BR2_PACKAGE_IW=y
|
||||
BR2_PACKAGE_WIREGUARD_TOOLS=y
|
||||
BR2_PACKAGE_WPA_SUPPLICANT=y
|
||||
BR2_PACKAGE_WPA_SUPPLICANT_NL80211=y
|
||||
BR2_PACKAGE_WPA_SUPPLICANT_WPA3=y
|
||||
BR2_PACKAGE_WPA_SUPPLICANT_AUTOSCAN=y
|
||||
BR2_PACKAGE_WPA_SUPPLICANT_AP_SUPPORT=y
|
||||
BR2_PACKAGE_WPA_SUPPLICANT_OVERRIDES=y
|
||||
BR2_PACKAGE_WPA_SUPPLICANT_WIFI_DISPLAY=y
|
||||
BR2_PACKAGE_WPA_SUPPLICANT_MESH_NETWORKING=y
|
||||
BR2_PACKAGE_WPA_SUPPLICANT_IBSS_RSN=y
|
||||
BR2_PACKAGE_WPA_SUPPLICANT_WEXT=y
|
||||
BR2_PACKAGE_WPA_SUPPLICANT_EAP=y
|
||||
BR2_PACKAGE_WPA_SUPPLICANT_HOTSPOT=y
|
||||
BR2_PACKAGE_WPA_SUPPLICANT_DEBUG_SYSLOG=y
|
||||
BR2_PACKAGE_WPA_SUPPLICANT_WPS=y
|
||||
BR2_PACKAGE_WPA_SUPPLICANT_CLI=y
|
||||
BR2_PACKAGE_WPA_SUPPLICANT_WPA_CLIENT_SO=y
|
||||
BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE=y
|
||||
BR2_PACKAGE_WPA_SUPPLICANT_CTRL_IFACE=y
|
||||
BR2_PACKAGE_WPA_SUPPLICANT_DBUS=y
|
||||
BR2_PACKAGE_HOSTAPD=y
|
||||
BR2_PACKAGE_HOSTAPD_DRIVER_HOSTAP=y
|
||||
BR2_PACKAGE_HOSTAPD_DRIVER_NL80211=y
|
||||
BR2_PACKAGE_HOSTAPD_ACS=y
|
||||
BR2_PACKAGE_HOSTAPD_EAP=y
|
||||
BR2_PACKAGE_HOSTAPD_WPS=y
|
||||
BR2_PACKAGE_HOSTAPD_WPA3=y
|
||||
# BR2_PACKAGE_HOSTAPD_VLAN is not set
|
||||
BR2_PACKAGE_OPENSSH=y
|
||||
BR2_PACKAGE_OPENSSH_CLIENT=y
|
||||
BR2_PACKAGE_OPENSSH_SERVER=y
|
||||
BR2_PACKAGE_OPENSSH_KEY_UTILS=y
|
||||
BR2_PACKAGE_HAVEGED=y
|
||||
BR2_PACKAGE_LIBOPENSSL_BIN=y
|
||||
BR2_PACKAGE_LIBOPENSSL_ENGINES=y
|
||||
BR2_PACKAGE_PARTED=y
|
||||
BR2_PACKAGE_MEMTESTER=y
|
||||
BR2_PACKAGE_CACHE_CALIBRATOR=y
|
||||
BR2_PACKAGE_DHRYSTONE=y
|
||||
BR2_PACKAGE_RAMSPEED=y
|
||||
BR2_PACKAGE_SPIDEV_TEST=y
|
||||
BR2_PACKAGE_STRESS_NG=y
|
||||
BR2_PACKAGE_STRACE=y
|
||||
BR2_PACKAGE_VMTOUCH=y
|
||||
BR2_PACKAGE_ALSA_UTILS=y
|
||||
BR2_PACKAGE_ALSA_UTILS_ALSACTL=y
|
||||
BR2_PACKAGE_ALSA_UTILS_ALSAMIXER=y
|
||||
BR2_PACKAGE_ALSA_UTILS_APLAY=y
|
||||
BR2_PACKAGE_MPG123=y
|
||||
BR2_PACKAGE_BZIP2=y
|
||||
BR2_PACKAGE_LRZIP=y
|
||||
BR2_PACKAGE_LZIP=y
|
||||
BR2_PACKAGE_P7ZIP=y
|
||||
BR2_PACKAGE_PIGZ=y
|
||||
BR2_PACKAGE_PIXZ=y
|
||||
BR2_PACKAGE_UNRAR=y
|
||||
BR2_PACKAGE_UNZIP=y
|
||||
BR2_PACKAGE_ZIP=y
|
||||
BR2_PACKAGE_ZSTD=y
|
||||
BR2_PACKAGE_LZOP=y
|
||||
BR2_PACKAGE_BROTLI=y
|
||||
BR2_PACKAGE_LIBZIP=y
|
||||
BR2_PACKAGE_LZ4_PROGS=y
|
||||
BR2_PACKAGE_SZIP=y
|
||||
BR2_PACKAGE_CA_CERTIFICATES=y
|
||||
BR2_PACKAGE_EVTEST=y
|
||||
BR2_PACKAGE_FILE=y
|
||||
BR2_PACKAGE_EMPTY=y
|
||||
BR2_PACKAGE_E2FSPROGS=y
|
||||
BR2_PACKAGE_E2FSPROGS_RESIZE2FS=y
|
||||
BR2_PACKAGE_TMUX=y
|
||||
BR2_PACKAGE_HTOP=y
|
||||
BR2_PACKAGE_LIBCURL=y
|
||||
BR2_PACKAGE_LIBCURL_CURL=y
|
||||
BR2_PACKAGE_LIBCURL_VERBOSE=y
|
||||
BR2_PACKAGE_LIBCURL_PROXY_SUPPORT=y
|
||||
BR2_PACKAGE_LIBCURL_COOKIES_SUPPORT=y
|
||||
BR2_PACKAGE_LIBCURL_WEBSOCKETS_SUPPORT=y
|
||||
BR2_PACKAGE_LIBCURL_EXTRA_PROTOCOLS_FEATURES=y
|
||||
BR2_PACKAGE_LIBCURL_OPENSSL=y
|
||||
BR2_PACKAGE_LIBWEBSOCKETS=y
|
||||
BR2_PACKAGE_WATCHDOG=y
|
||||
BR2_PACKAGE_SQUASHFS=y
|
||||
BR2_PACKAGE_SQUASHFS_GZIP=y
|
||||
BR2_PACKAGE_SQUASHFS_LZ4=y
|
||||
BR2_PACKAGE_SQUASHFS_LZMA=y
|
||||
BR2_PACKAGE_SQUASHFS_LZO=y
|
||||
BR2_PACKAGE_SQUASHFS_XZ=y
|
||||
BR2_PACKAGE_SQUASHFS_ZSTD=y
|
||||
BR2_PACKAGE_LCDTEST=y
|
||||
BR2_PACKAGE_ASCII_INVADERS=y
|
||||
BR2_PACKAGE_GNUCHESS=y
|
||||
BR2_PACKAGE_SL=y
|
||||
BR2_PACKAGE_XORCURSES=y
|
||||
BR2_PACKAGE_INPUT_EVENT_DAEMON=y
|
||||
BR2_PACKAGE_BLUEZ_TOOLS=y
|
||||
BR2_PACKAGE_TPUDEMO_SG200X=y
|
||||
BR2_PACKAGE_SG2002_CODEC_FIRMWARE=y
|
||||
BR2_PACKAGE_TCPDUMP=y
|
||||
BR2_PACKAGE_SSDP_RESPONDER=y
|
||||
BR2_PACKAGE_PPPD=y
|
||||
BR2_PACKAGE_NFTABLES=y
|
||||
BR2_PACKAGE_IPTABLES=y
|
||||
BR2_PACKAGE_IPTABLES_NFTABLES=y
|
||||
BR2_PACKAGE_NCURSES_WCHAR=y
|
||||
BR2_PACKAGE_LIBEDIT=y
|
||||
BR2_PACKAGE_NGINX=y
|
||||
BR2_PACKAGE_NGINX_HTTP=y
|
||||
BR2_PACKAGE_NGINX_HTTP_DAV_MODULE=y
|
||||
BR2_PACKAGE_NGINX_HTTP_MP4_MODULE=y
|
||||
BR2_PACKAGE_NGINX_HTTP_FLV_MODULE=y
|
||||
BR2_PACKAGE_NGINX_HTTP_GUNZIP_MODULE=y
|
||||
BR2_PACKAGE_NGINX_STREAM=y
|
||||
BR2_PACKAGE_NGINX_SELECT_MODULE=y
|
||||
BR2_PACKAGE_NGINX_HTTP_FASTCGI_MODULE=y
|
||||
BR2_PACKAGE_NGINX_HTTP_UWSGI_MODULE=y
|
||||
BR2_PACKAGE_NGINX_HTTP_SCGI_MODULE=y
|
||||
BR2_PACKAGE_RTC_TOOLS=y
|
||||
BR2_PACKAGE_PICOCOM=y
|
||||
BR2_PACKAGE_FBGRAB=y
|
||||
BR2_PACKAGE_MHZ=y
|
||||
BR2_PACKAGE_SETSERIAL=y
|
||||
BR2_PACKAGE_UBOOT_TOOLS=y
|
||||
BR2_PACKAGE_UBOOT_TOOLS_FIT_SUPPORT=y
|
||||
BR2_PACKAGE_UBOOT_TOOLS_MKIMAGE=y
|
||||
BR2_PACKAGE_UBOOT_TOOLS_DUMPIMAGE=y
|
||||
|
||||
# if your sdnand is small, you can delete some package
|
||||
|
||||
BR2_PACKAGE_IMAGEMAGICK=y
|
||||
BR2_PACKAGE_OCRAD=y
|
||||
BR2_PACKAGE_SDL=y
|
||||
BR2_PACKAGE_SDL_FBCON=y
|
||||
BR2_PACKAGE_SDL_GFX=y
|
||||
BR2_PACKAGE_SDL_IMAGE=y
|
||||
BR2_PACKAGE_SDL_IMAGE_BMP=y
|
||||
BR2_PACKAGE_SDL_IMAGE_GIF=y
|
||||
BR2_PACKAGE_SDL_IMAGE_JPEG=y
|
||||
BR2_PACKAGE_SDL_IMAGE_PNG=y
|
||||
BR2_PACKAGE_SDL_IMAGE_WEBP=y
|
||||
BR2_PACKAGE_SDL_MIXER=y
|
||||
BR2_PACKAGE_SDL_NET=y
|
||||
BR2_PACKAGE_SDL_SOUND=y
|
||||
BR2_PACKAGE_SDL_SOUND_PLAYSOUND=y
|
||||
BR2_PACKAGE_LBREAKOUT2=y
|
||||
BR2_PACKAGE_LBREAKOUT2_AUDIO=y
|
||||
BR2_PACKAGE_LBREAKOUT2_NET=y
|
||||
BR2_PACKAGE_LTRIS=y
|
||||
BR2_PACKAGE_LTRIS_AUDIO=y
|
||||
BR2_PACKAGE_PRBOOM=y
|
||||
BR2_PACKAGE_DOOM_WAD=y
|
||||
BR2_PACKAGE_TCL=y
|
||||
# BR2_PACKAGE_TCL_SHLIB_ONLY is not set
|
||||
# BR2_PACKAGE_TCL_DEL_ENCODINGS is not set
|
||||
BR2_PACKAGE_EXPECT=y
|
||||
BR2_PACKAGE_TCLLIB=y
|
||||
BR2_PACKAGE_OPENCV4=y
|
||||
BR2_PACKAGE_OPENCV4_LIB_CALIB3D=y
|
||||
BR2_PACKAGE_OPENCV4_LIB_DNN=y
|
||||
BR2_PACKAGE_OPENCV4_LIB_HIGHGUI=y
|
||||
BR2_PACKAGE_OPENCV4_LIB_OBJDETECT=y
|
||||
BR2_PACKAGE_OPENCV4_LIB_PHOTO=y
|
||||
BR2_PACKAGE_OPENCV4_LIB_SHAPE=y
|
||||
BR2_PACKAGE_OPENCV4_LIB_STITCHING=y
|
||||
BR2_PACKAGE_OPENCV4_LIB_SUPERRES=y
|
||||
BR2_PACKAGE_OPENCV4_LIB_TS=y
|
||||
BR2_PACKAGE_OPENCV4_LIB_VIDEOSTAB=y
|
||||
BR2_PACKAGE_OPENCV4_BUILD_TESTS=y
|
||||
BR2_PACKAGE_OPENCV4_BUILD_PERF_TESTS=y
|
||||
BR2_PACKAGE_OPENCV4_WITH_FFMPEG=y
|
||||
BR2_PACKAGE_OPENCV4_WITH_JPEG=y
|
||||
BR2_PACKAGE_OPENCV4_WITH_PNG=y
|
||||
BR2_PACKAGE_OPENCV4_WITH_TBB=y
|
||||
BR2_PACKAGE_OPENCV4_WITH_TIFF=y
|
||||
BR2_PACKAGE_OPENCV4_WITH_V4L=y
|
||||
BR2_PACKAGE_OPENCV4_WITH_WEBP=y
|
||||
BR2_PACKAGE_OPENCV4_INSTALL_DATA=y
|
||||
BR2_PACKAGE_LIBQRENCODE=y
|
||||
BR2_PACKAGE_LIBQRENCODE_TOOLS=y
|
||||
BR2_PACKAGE_FFMPEG=y
|
||||
BR2_PACKAGE_FFMPEG_FFMPEG=y
|
||||
BR2_PACKAGE_FFMPEG_FFPROBE=y
|
||||
BR2_PACKAGE_FFMPEG_GPL=y
|
||||
BR2_PACKAGE_FFMPEG_NONFREE=y
|
||||
BR2_PACKAGE_FFMPEG_POSTPROC=y
|
||||
BR2_PACKAGE_MULTICAT=y
|
||||
BR2_PACKAGE_WQY_ZENHEI=y
|
||||
BR2_PACKAGE_DEJAVU=y
|
||||
BR2_PACKAGE_GNUPLOT=y
|
||||
BR2_PACKAGE_TESSERACT_OCR=y
|
||||
BR2_PACKAGE_TESSERACT_OCR_LANG_ENG=y
|
||||
BR2_PACKAGE_TESSERACT_OCR_LANG_CHI_SIM=y
|
||||
BR2_PACKAGE_TESSERACT_OCR_LANG_CHI_TRA=y
|
||||
BR2_PACKAGE_QT5=y
|
||||
BR2_PACKAGE_QT5BASE_SQLITE_SYSTEM=y
|
||||
BR2_PACKAGE_QT5BASE_GUI=y
|
||||
BR2_PACKAGE_QT5BASE_LINUXFB=y
|
||||
BR2_PACKAGE_QT5BASE_WIDGETS=y
|
||||
BR2_PACKAGE_QT5BASE_DEFAULT_QPA="linuxfb"
|
||||
BR2_PACKAGE_QT5BASE_FONTCONFIG=y
|
||||
BR2_PACKAGE_QT5BASE_GIF=y
|
||||
BR2_PACKAGE_QT5BASE_PNG=y
|
||||
BR2_PACKAGE_QT5BASE_JPEG=y
|
||||
BR2_PACKAGE_QT5BASE_SYSLOG=y
|
||||
BR2_PACKAGE_QT5BASE_DBUS=y
|
||||
BR2_PACKAGE_QT5BASE_TSLIB=y
|
||||
BR2_PACKAGE_QT5BASE_EXAMPLES=y
|
||||
BR2_PACKAGE_QT5BASE_CONCURRENT=y
|
||||
BR2_PACKAGE_QT5CONNECTIVITY=y
|
||||
BR2_PACKAGE_QT5IMAGEFORMATS=y
|
||||
BR2_PACKAGE_QT5MULTIMEDIA=y
|
||||
BR2_PACKAGE_QT5SENSORS=y
|
||||
BR2_PACKAGE_QT5SERIALBUS=y
|
||||
BR2_PACKAGE_QT5CHARTS=y
|
||||
BR2_PACKAGE_QT5COAP=y
|
||||
BR2_PACKAGE_QT5ENGINIO=y
|
||||
BR2_PACKAGE_QT5KNX=y
|
||||
BR2_PACKAGE_QT5LOCATION=y
|
||||
BR2_PACKAGE_QT5MQTT=y
|
||||
BR2_PACKAGE_QT5OPCUA=y
|
||||
BR2_PACKAGE_QT5REMOTEOBJECTS=y
|
||||
BR2_PACKAGE_QT5SPEECH=y
|
||||
BR2_PACKAGE_QT5SVG=y
|
||||
BR2_PACKAGE_QT5WEBSOCKETS=y
|
||||
BR2_PACKAGE_QT5WEBCHANNEL=y
|
||||
BR2_PACKAGE_QEXTSERIALPORT=y
|
||||
BR2_PACKAGE_QT5X11EXTRAS=y
|
||||
BR2_PACKAGE_QT5XMLPATTERNS=y
|
||||
BR2_PACKAGE_QT5BASE_MYSQL=y
|
||||
BR2_PACKAGE_QJSON=y
|
||||
BR2_PACKAGE_QUAZIP=y
|
||||
BR2_PACKAGE_PYTHON3=y
|
||||
BR2_PACKAGE_PYTHON3_2TO3=y
|
||||
BR2_PACKAGE_PYTHON3_BZIP2=y
|
||||
BR2_PACKAGE_PYTHON3_CODECSCJK=y
|
||||
BR2_PACKAGE_PYTHON3_CURSES=y
|
||||
BR2_PACKAGE_PYTHON3_SSL=y
|
||||
BR2_PACKAGE_PYTHON3_UNICODEDATA=y
|
||||
BR2_PACKAGE_PYTHON3_SQLITE=y
|
||||
BR2_PACKAGE_PYTHON3_XZ=y
|
||||
BR2_PACKAGE_PYTHON3_ZLIB=y
|
||||
BR2_PACKAGE_PYTHON_NUMPY=y
|
||||
BR2_PACKAGE_OPENCV4_LIB_PYTHON=y
|
||||
BR2_PACKAGE_OPENCV4_WITH_QT5=y
|
||||
BR2_PACKAGE_PYTHON_BSDIFF4=y
|
||||
BR2_PACKAGE_PYTHON_BEAUTIFULSOUP4=y
|
||||
BR2_PACKAGE_PYTHON_CFFI=y
|
||||
BR2_PACKAGE_PYTHON_CRC16=y
|
||||
BR2_PACKAGE_PYTHON_DBUS_FAST=y
|
||||
BR2_PACKAGE_PYTHON_DATEUTIL=y
|
||||
BR2_PACKAGE_PYTHON_DBUS_NEXT=y
|
||||
BR2_PACKAGE_PYTHON_DJANGO=y
|
||||
BR2_PACKAGE_PYTHON_FLASK=y
|
||||
BR2_PACKAGE_PYTHON_EVDEV=y
|
||||
BR2_PACKAGE_PYTHON_FLASK_BABEL=y
|
||||
BR2_PACKAGE_PYTHON_FLASK_CORS=y
|
||||
BR2_PACKAGE_PYTHON_FLASK_JSONRPC=y
|
||||
BR2_PACKAGE_PYTHON_FLASK_LOGIN=y
|
||||
BR2_PACKAGE_PYTHON_FLASK_SMOREST=y
|
||||
BR2_PACKAGE_PYTHON_FLASK_SQLALCHEMY=y
|
||||
BR2_PACKAGE_PYTHON_FLASK_WTF=y
|
||||
BR2_PACKAGE_PYTHON_HWDATA=y
|
||||
BR2_PACKAGE_PYTHON_PIP=y
|
||||
BR2_PACKAGE_PYTHON_PEXPECT=y
|
||||
BR2_PACKAGE_PYTHON_PSUTIL=y
|
||||
BR2_PACKAGE_PYTHON_PYAES=y
|
||||
BR2_PACKAGE_PYTHON_PYALSA=y
|
||||
BR2_PACKAGE_PYTHON_PYDEVMEM=y
|
||||
BR2_PACKAGE_PYTHON_PYUSB=y
|
||||
BR2_PACKAGE_PYTHON_REQUESTS=y
|
||||
BR2_PACKAGE_PYTHON_REQUESTS_OAUTHLIB=y
|
||||
BR2_PACKAGE_PYTHON_REQUESTS_TOOLBELT=y
|
||||
BR2_PACKAGE_PYTHON_SERIAL=y
|
||||
BR2_PACKAGE_PYTHON_SERIAL_ASYNCIO=y
|
||||
BR2_PACKAGE_PYTHON_WEBSOCKETS=y
|
||||
BR2_PACKAGE_PYTHON_WEBSOCKET_CLIENT=y
|
||||
BR2_PACKAGE_PYTHON_XMODEM=y
|
||||
BR2_PACKAGE_PYTHON3_PY_PYC=y
|
||||
BR2_PACKAGE_PYTHON_PYQT5=y
|
||||
BR2_PACKAGE_PYTHON_PYQRCODE=y
|
||||
BR2_PACKAGE_PYTHON_PYLIBFDT=y
|
||||
BR2_PACKAGE_PYTHON3_READLINE=y
|
||||
BR2_PACKAGE_PYTHON_JEDI=y
|
||||
BR2_PACKAGE_PYTHON_LIBUSB1=y
|
||||
BR2_PACKAGE_PYTHON_LXML=y
|
||||
BR2_PACKAGE_PYTHON_MARKDOWN=y
|
||||
BR2_PACKAGE_PYTHON_MSGPACK=y
|
||||
BR2_PACKAGE_PYTHON_PERIPHERY=y
|
||||
BR2_PACKAGE_PYTHON_PILLOW=y
|
||||
BR2_PACKAGE_PYTHON_POSIX_IPC=y
|
||||
BR2_PACKAGE_PYTHON_PROTOBUF=y
|
||||
BR2_PACKAGE_PYTHON_PYGAME=y
|
||||
BR2_PACKAGE_PYTHON_PYGAME_IMAGE=y
|
||||
BR2_PACKAGE_PYTHON_PYGAME_EXAMPLES=y
|
||||
BR2_PACKAGE_PYTHON_PYGAME_FONT=y
|
||||
BR2_PACKAGE_PYTHON_PYGAME_MIXER=y
|
||||
BR2_PACKAGE_PYTHON_PYUDEV=y
|
||||
BR2_PACKAGE_PYTHON_PYYAML=y
|
||||
BR2_PACKAGE_PYTHON_QRCODE=y
|
||||
BR2_PACKAGE_PYTHON_QRCODE_PIL=y
|
||||
BR2_PACKAGE_PYTHON_INTELHEX=y
|
||||
|
||||
BR2_PACKAGE_VIM=y
|
||||
BR2_PACKAGE_VIM_RUNTIME=y
|
||||
|
||||
BR2_TARGET_ROOTFS_EXT2=y
|
||||
BR2_TARGET_ROOTFS_EXT2_4=y
|
||||
BR2_TARGET_ROOTFS_EXT2_SIZE="900M"
|
||||
|
||||
BR2_ROOTFS_OVERLAY="$(TOPDIR)/board/cvitek/SG200X/overlay"
|
||||
BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES="$(TOPDIR)/board/cvitek/SG200X/busybox-extra.config"
|
||||
@@ -47,7 +47,8 @@ BR2_ENABLE_LOCALE_WHITELIST="C en_US en_US.utf8"
|
||||
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
|
||||
BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
|
||||
BR2_PACKAGE_KMOD=y
|
||||
BR2_PACKAGE_EUDEV_RULES_GEN=y
|
||||
# dont rename network card,
|
||||
# BR2_PACKAGE_EUDEV_RULES_GEN is not set
|
||||
BR2_PACKAGE_EUDEV_ENABLE_HWDB=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y
|
||||
@@ -65,10 +66,14 @@ BR2_PACKAGE_NTP_NTPD=y
|
||||
BR2_PACKAGE_NTP_NTPDATE=y
|
||||
BR2_PACKAGE_MACCHANGER=y
|
||||
BR2_PACKAGE_AVAHI=y
|
||||
BR2_PACKAGE_AVAHI_AUTOIPD=y
|
||||
# BR2_PACKAGE_AVAHI_AUTOIPD is not set
|
||||
BR2_PACKAGE_AVAHI_DAEMON=y
|
||||
BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY=y
|
||||
# BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY is not set
|
||||
BR2_PACKAGE_AVAHI_DEFAULT_SERVICES=y
|
||||
# BR2_PACKAGE_MDNSD is not set
|
||||
# BR2_PACKAGE_MDNSD_MQUERY is not set
|
||||
# BR2_PACKAGE_MDNSD_HTTP_SERVICE is not set
|
||||
# BR2_PACKAGE_MDNSD_SSH_SERVICE is not set
|
||||
BR2_PACKAGE_WIRELESS_TOOLS=y
|
||||
BR2_PACKAGE_WIRELESS_TOOLS_IFRENAME=y
|
||||
BR2_PACKAGE_WIRELESS_TOOLS_IWCONFIG=y
|
||||
@@ -134,6 +139,7 @@ BR2_PACKAGE_ALSA_UTILS=y
|
||||
BR2_PACKAGE_ALSA_UTILS_ALSACTL=y
|
||||
BR2_PACKAGE_ALSA_UTILS_ALSAMIXER=y
|
||||
BR2_PACKAGE_ALSA_UTILS_APLAY=y
|
||||
BR2_PACKAGE_ALSA_UTILS_AMIXER=y
|
||||
BR2_PACKAGE_MPG123=y
|
||||
BR2_PACKAGE_BZIP2=y
|
||||
BR2_PACKAGE_LRZIP=y
|
||||
@@ -191,18 +197,6 @@ BR2_PACKAGE_NFTABLES=y
|
||||
BR2_PACKAGE_IPTABLES=y
|
||||
BR2_PACKAGE_IPTABLES_NFTABLES=y
|
||||
BR2_PACKAGE_NCURSES_WCHAR=y
|
||||
BR2_PACKAGE_LIBEDIT=y
|
||||
BR2_PACKAGE_NGINX=y
|
||||
BR2_PACKAGE_NGINX_HTTP=y
|
||||
BR2_PACKAGE_NGINX_HTTP_DAV_MODULE=y
|
||||
BR2_PACKAGE_NGINX_HTTP_MP4_MODULE=y
|
||||
BR2_PACKAGE_NGINX_HTTP_FLV_MODULE=y
|
||||
BR2_PACKAGE_NGINX_HTTP_GUNZIP_MODULE=y
|
||||
BR2_PACKAGE_NGINX_STREAM=y
|
||||
BR2_PACKAGE_NGINX_SELECT_MODULE=y
|
||||
BR2_PACKAGE_NGINX_HTTP_FASTCGI_MODULE=y
|
||||
BR2_PACKAGE_NGINX_HTTP_UWSGI_MODULE=y
|
||||
BR2_PACKAGE_NGINX_HTTP_SCGI_MODULE=y
|
||||
BR2_PACKAGE_RTC_TOOLS=y
|
||||
BR2_PACKAGE_PICOCOM=y
|
||||
BR2_PACKAGE_FBGRAB=y
|
||||
@@ -387,6 +381,8 @@ BR2_PACKAGE_PYTHON_PYYAML=y
|
||||
BR2_PACKAGE_PYTHON_QRCODE=y
|
||||
BR2_PACKAGE_PYTHON_QRCODE_PIL=y
|
||||
BR2_PACKAGE_PYTHON_INTELHEX=y
|
||||
BR2_PACKAGE_MGBA=y
|
||||
BR2_PACKAGE_GB_TEST_ROMS=y
|
||||
|
||||
BR2_PACKAGE_VIM=y
|
||||
BR2_PACKAGE_VIM_RUNTIME=y
|
||||
|
||||
@@ -2808,6 +2808,8 @@ menu "Sipeed"
|
||||
source "package/tpudemo-sg200x/Config.in"
|
||||
source "package/xuantie-gdb/Config.in"
|
||||
source "package/sg2002-codec-firmware/Config.in"
|
||||
source "package/mgba/Config.in"
|
||||
source "package/gb-test-roms/Config.in"
|
||||
endmenu
|
||||
|
||||
|
||||
|
||||
4
buildroot/package/gb-test-roms/Config.in
Normal file
4
buildroot/package/gb-test-roms/Config.in
Normal file
@@ -0,0 +1,4 @@
|
||||
config BR2_PACKAGE_GB_TEST_ROMS
|
||||
bool "gb-test-roms"
|
||||
help
|
||||
game boy test roms
|
||||
20
buildroot/package/gb-test-roms/gb-test-roms.mk
Normal file
20
buildroot/package/gb-test-roms/gb-test-roms.mk
Normal file
@@ -0,0 +1,20 @@
|
||||
################################################################################
|
||||
#
|
||||
# gb-test-roms
|
||||
#
|
||||
################################################################################
|
||||
|
||||
GB_TEST_ROMS_VERSION = 7.0
|
||||
GB_TEST_ROMS_SOURCE = game-boy-test-roms-v$(GB_TEST_ROMS_VERSION).zip
|
||||
GB_TEST_ROMS_SITE = https://github.com/c-sp/gameboy-test-roms/releases/download/v$(GB_TEST_ROMS_VERSION)
|
||||
|
||||
define GB_TEST_ROMS_EXTRACT_CMDS
|
||||
unzip $(GB_TEST_ROMS_DL_DIR)/$(GB_TEST_ROMS_SOURCE) -d $(@D)
|
||||
endef
|
||||
|
||||
define GB_TEST_ROMS_INSTALL_TARGET_CMDS
|
||||
mkdir -pv $(TARGET_DIR)/usr/share/gb-test-roms/
|
||||
rsync -r --verbose --copy-dirlinks --copy-links --hard-links ${@D}/* $(TARGET_DIR)/usr/share/gb-test-roms/
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
8
buildroot/package/mgba/Config.in
Normal file
8
buildroot/package/mgba/Config.in
Normal file
@@ -0,0 +1,8 @@
|
||||
config BR2_PACKAGE_MGBA
|
||||
bool "mgba"
|
||||
depends on BR2_PACKAGE_SDL
|
||||
depends on BR2_PACKAGE_QT5
|
||||
help
|
||||
game boy advance emulator
|
||||
|
||||
https://github.com/mgba-emu/mgba
|
||||
18
buildroot/package/mgba/mgba.mk
Normal file
18
buildroot/package/mgba/mgba.mk
Normal file
@@ -0,0 +1,18 @@
|
||||
################################################################################
|
||||
#
|
||||
# mgba
|
||||
#
|
||||
################################################################################
|
||||
|
||||
MGBA_VERSION = a2587cb8cff265d9f327a9413b4f2c5e607850fb
|
||||
MGBA_SITE = $(call github,mgba-emu,mgba,$(MGBA_VERSION))
|
||||
MGBA_DEPENDENCIES = qt5base qt5svg qt5multimedia sdl
|
||||
|
||||
MGBA_CONF_OPTS += -DBUILD_SDL=ON
|
||||
MGBA_CONF_OPTS += -DBUILD_QT=OFF
|
||||
MGBA_CONF_OPTS += -DBUILD_GL=OFF
|
||||
MGBA_CONF_OPTS += -DBUILD_GLES2=OFF
|
||||
MGBA_CONF_OPTS += -DBUILD_GLES2=OFF
|
||||
MGBA_CONF_OPTS += -DUSE_PNG=OFF
|
||||
|
||||
$(eval $(cmake-package))
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
TPUDEMO_SG200X_VERSION = 118431aa403322f040dcad8ccd7f9fd7c07b9923
|
||||
TPUDEMO_SG200X_VERSION = 345541b2f2a30e4efaa7505aa3b911826ec78505
|
||||
TPUDEMO_SG200X_SITE = $(call github,0x754C,tpudemo-sg200x,$(TPUDEMO_SG200X_VERSION))
|
||||
|
||||
define TPUDEMO_SG200X_INSTALL_TARGET_CMDS
|
||||
|
||||
39
freertos/Source/.github/CODEOWNERS
vendored
Normal file
39
freertos/Source/.github/CODEOWNERS
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
# Each line is a file pattern followed by one or more owners.
|
||||
|
||||
# These owners will be the default owners for everything in
|
||||
# the repo. Unless a later match takes precedence,
|
||||
# @global-owner1 and @global-owner2 will be requested for
|
||||
# review when someone opens a pull request.
|
||||
* @FreeRTOS/pr-bar-raiser
|
||||
|
||||
# Order is important; the last matching pattern takes the most
|
||||
# precedence. When someone opens a pull request that only
|
||||
# modifies JS files, only @js-owner and not the global
|
||||
# owner(s) will be requested for a review.
|
||||
# *.c FreeRTOS/pr-bar-raiser
|
||||
|
||||
# You can also use email addresses if you prefer. They'll be
|
||||
# used to look up users just like we do for commit author
|
||||
# emails.
|
||||
# *.go docs@example.com
|
||||
|
||||
# In this example, @doctocat owns any files in the build/logs
|
||||
# directory at the root of the repository and any of its
|
||||
# subdirectories.
|
||||
# /build/logs/ @doctocat
|
||||
|
||||
# The `docs/*` pattern will match files like
|
||||
# `docs/getting-started.md` but not further nested files like
|
||||
# `docs/build-app/troubleshooting.md`.
|
||||
# docs/* docs@example.com
|
||||
|
||||
# In this example, @octocat owns any file in an apps directory
|
||||
# anywhere in your repository.
|
||||
# apps/ @octocat
|
||||
|
||||
# In this example, @doctocat owns any file in the `/docs`
|
||||
# directory in the root of your repository and any of its
|
||||
# subdirectories.
|
||||
# /docs/ @doctocat
|
||||
|
||||
|
||||
70
freertos/Source/.github/CONTRIBUTING.md
vendored
Normal file
70
freertos/Source/.github/CONTRIBUTING.md
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
# Contribution guidelines
|
||||
|
||||
Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, code, or
|
||||
documentation, we welcome our community to be involved in this project.
|
||||
|
||||
Please read through this document before submitting any issues or pull requests to ensure we are able to help you and all members of the community as effectively as possible.
|
||||
|
||||
## Code of conduct
|
||||
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
|
||||
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
|
||||
opensource-codeofconduct@amazon.com with any additional questions or comments.
|
||||
|
||||
|
||||
## Security issue notifications
|
||||
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](https://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue.
|
||||
|
||||
|
||||
## Submitting a bugs/feature request
|
||||
Have a bug to report or feature to request? Follow these steps:
|
||||
1. Search on the [FreeRTOS Community Support Forums](https://forums.freertos.org/) and [GitHub issue tracker](https://github.com/FreeRTOS/FreeRTOS/issues?utf8=%E2%9C%93&q=is%3Aissue) to be sure this hasn't been already reported or discussed.
|
||||
2. If your search turns up empty, create a new topic in the [forums](https://forums.freertos.org/) and work with the community to help clarify issues or refine the idea. Include as many of the details listed below.
|
||||
3. Once the community has had time to discuss and digest, we welcome you to create an [issue](https://github.com/FreeRTOS/FreeRTOS/issues) to report bugs or suggest features.
|
||||
|
||||
When creating a new topic on the forums or filing an issue, please include as many relevant details as possible. Examples include:
|
||||
|
||||
* A clear description of the situation - what you observe, what you expect, and your view on how the two differ.
|
||||
* A reproducible test case or sequence of steps.
|
||||
* The version of our code being used.
|
||||
* Any modifications you've made relevant to the bug.
|
||||
* Details of your environment or deployment. Highlight anything unusual.
|
||||
|
||||
|
||||
## Contributing via pull request
|
||||
Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:
|
||||
|
||||
1. You are working against the latest source on the *main* branch.
|
||||
2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already.
|
||||
3. You open an issue to discuss any significant work - we would hate for your time to be wasted.
|
||||
|
||||
To send us a pull request, please:
|
||||
|
||||
1. Fork the repository.
|
||||
2. Modify the source; focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
|
||||
3. Follow the [coding style guide](https://www.FreeRTOS.org/FreeRTOS-Coding-Standard-and-Style-Guide.html).
|
||||
4. Commit to your fork using clear commit messages.
|
||||
5. Send us a pull request, answering any default questions in the pull request interface.
|
||||
NOTE: Please make sure the default option (Allow edits from maintainers) is left checked.
|
||||
6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.
|
||||
|
||||
GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
|
||||
[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).
|
||||
|
||||
## Coding style
|
||||
* Please ensure that your code complies to the [FreeRTOS coding style guidelines](https://www.FreeRTOS.org/FreeRTOS-Coding-Standard-and-Style-Guide.html).
|
||||
|
||||
|
||||
## Getting your pull request merged
|
||||
All pull requests must be approved by our review team before it can be merged in. We appreciate your patience while pull requests are reviewed. The time it takes to review will depend on complexity and consideration of wider implications.
|
||||
|
||||
|
||||
## Finding contributions to work on
|
||||
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), tackling open 'help wanted' issues is a great place to start.
|
||||
|
||||
|
||||
## Licensing
|
||||
The FreeRTOS kernel is released under the MIT open source license, the text of which can be found [here](https://github.com/FreeRTOS/FreeRTOS/blob/main/FreeRTOS/License/license.txt)
|
||||
|
||||
Additional license files can be found in the folders containing any supplementary libraries licensed by their respective copyright owners where applicable.
|
||||
|
||||
We may ask you to sign a [Contributor License Agreement (CLA)](https://en.wikipedia.org/wiki/Contributor_License_Agreement) for larger changes.
|
||||
40
freertos/Source/.github/ISSUE_TEMPLATE/bug-report.md
vendored
Normal file
40
freertos/Source/.github/ISSUE_TEMPLATE/bug-report.md
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve FreeRTOS. This should only be used for confirmed
|
||||
bugs. If you suspect something it is best to first discuss it on the FreeRTOS community
|
||||
support forums linked below.
|
||||
title: "[BUG]"
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A concise description of what the bug is.
|
||||
|
||||
**Target**
|
||||
- Development board: [e.g. HiFive11 RevB]
|
||||
- Instruction Set Architecture: [e.g. RV32IMAC]
|
||||
- IDE and version: [e.g. Freedom Studio 4.12.0.2019-08-2]
|
||||
- Toolchain and version: [e.g. riscv64-unknown-elf-gcc-8.3.0-2019.08.0]
|
||||
|
||||
**Host**
|
||||
- Host OS: [e.g. MacOS]
|
||||
- Version: [e.g. Mojave 10.14.6]
|
||||
|
||||
**To Reproduce**
|
||||
- Use project ... and configure with ...
|
||||
- Run on ... and could observe ...
|
||||
|
||||
**Expected behavior**
|
||||
A concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
e.g. code snippet to reproduce the issue.
|
||||
e.g. stack trace, memory dump, debugger log, and many etc.
|
||||
|
||||
<!-- For general inquiries, please post in [FreeRTOS forum](https://forums.FreeRTOS.org) for community support. -->
|
||||
6
freertos/Source/.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
6
freertos/Source/.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: FreeRTOS Community Support Forum
|
||||
url: https://forums.freertos.org/
|
||||
about: Please ask and answer questions about FreeRTOS here.
|
||||
|
||||
23
freertos/Source/.github/ISSUE_TEMPLATE/documentation-issue.md
vendored
Normal file
23
freertos/Source/.github/ISSUE_TEMPLATE/documentation-issue.md
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
name: Documentation issue
|
||||
about: Create a report to help us improve our documentation.
|
||||
title: "[DOC]"
|
||||
labels: documentation
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the issue**
|
||||
Please describe the issue and expected clarification in concise language.
|
||||
|
||||
**Reference**
|
||||
Please attach the URL at which you are experiencing the issue.
|
||||
|
||||
**Screenshot**
|
||||
If applicable, please attach screenshot.
|
||||
|
||||
**Browser**
|
||||
- Browser: [e.g. Chrome]
|
||||
- Version: [e.g. 80.0.3987.132]
|
||||
|
||||
<!-- For general inquiries, please post in [FreeRTOS forum](https://forums.FreeRTOS.org) for community support. -->
|
||||
20
freertos/Source/.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
20
freertos/Source/.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest a new feature for this project
|
||||
title: "[Feature Request] <replace with your title>"
|
||||
labels: enhancement
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
5
freertos/Source/.github/SECURITY.md
vendored
Normal file
5
freertos/Source/.github/SECURITY.md
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
## Reporting a Vulnerability
|
||||
|
||||
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security
|
||||
via our [vulnerability reporting page](https://aws.amazon.com/security/vulnerability-reporting/) or directly via email to aws-security@amazon.com.
|
||||
Please do **not** create a public github issue.
|
||||
63
freertos/Source/.github/actions/url_verifier.sh
vendored
Executable file
63
freertos/Source/.github/actions/url_verifier.sh
vendored
Executable file
@@ -0,0 +1,63 @@
|
||||
#!/bin/bash -
|
||||
|
||||
PROJECT=$1
|
||||
echo "Verifying url links of: ${PROJECT}"
|
||||
if [ ! -d "$PROJECT" ]
|
||||
then
|
||||
echo "Directory passed does not exist"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
USER_AGENT="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.146 Safari/537.36"
|
||||
SCRIPT_RET=0
|
||||
|
||||
set -o nounset # Treat unset variables as an error
|
||||
|
||||
declare -A dict
|
||||
|
||||
function test {
|
||||
while IFS= read -r LINE; do
|
||||
FILE=$(echo $LINE | cut -f 1 -d ':')
|
||||
URL=$(echo $LINE | grep -IoE '\b(https?|ftp|file)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]*[-A-Za-z0-9+&@#/%=~_|]')
|
||||
|
||||
# remove trailing / if it exists curl diferenciate between links with
|
||||
# and without / at the end
|
||||
# URL=`echo "$URL" | sed 's,/$,,'`
|
||||
dict+=(["$URL"]="$FILE ")
|
||||
done < <(grep -e 'https\?://' ${PROJECT} -RIa --exclude='*.exe' --exclude-dir=.git | tr '*' ' ')
|
||||
|
||||
for UNIQ_URL in ${!dict[@]} # loop urls
|
||||
do
|
||||
CURL_RES=$(curl -si --user-agent "$(USER_AGENT)" ${UNIQ_URL} 2>/dev/null| head -n 1 | cut -f 2 -d ' ')
|
||||
RES=$?
|
||||
|
||||
if [ "${CURL_RES}" == '' -o "${CURL_RES}" != '200' ]
|
||||
then
|
||||
echo "URL is: ${UNIQ_URL}"
|
||||
echo "File names: ${dict[$UNIQ_URL]}"
|
||||
if [ "${CURL_RES}" == '' ] # curl returned an error
|
||||
then
|
||||
CURL_RES=$RES
|
||||
SCRIPT_RET=1
|
||||
echo ERROR: Result is: "${CURL_RES}"
|
||||
elif [ "${CURL_RES}" == '403' ]
|
||||
then
|
||||
SCRIPT_RET=1
|
||||
echo ERROR: Result is: "${CURL_RES}"
|
||||
else
|
||||
echo WARNING: Result is: "${CURL_RES}"
|
||||
fi
|
||||
echo "================================="
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "${SCRIPT_RET}" -eq 0 ]
|
||||
then
|
||||
exit 0
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
test
|
||||
|
||||
3103
freertos/Source/.github/lexicon.txt
vendored
Normal file
3103
freertos/Source/.github/lexicon.txt
vendored
Normal file
File diff suppressed because it is too large
Load Diff
16
freertos/Source/.github/pull_request_template.md
vendored
Normal file
16
freertos/Source/.github/pull_request_template.md
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
<!--- Title -->
|
||||
|
||||
Description
|
||||
-----------
|
||||
<!--- Describe your changes in detail. -->
|
||||
|
||||
Test Steps
|
||||
-----------
|
||||
<!-- Describe the steps to reproduce. -->
|
||||
|
||||
Related Issue
|
||||
-----------
|
||||
<!-- If any, please provide issue ID. -->
|
||||
|
||||
|
||||
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
|
||||
7
freertos/Source/.github/scripts/find_replace.sh
vendored
Executable file
7
freertos/Source/.github/scripts/find_replace.sh
vendored
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
old_text=$1
|
||||
new_text=$2
|
||||
echo "Old text: ${old_text}"
|
||||
echo "New text: ${new_text}"
|
||||
grep -rl "${old_text}" . | xargs gsed -i -e '1h;2,$H;$!d;g' -e "s/${old_text}/${new_text}/g"
|
||||
|
||||
152
freertos/Source/.github/scripts/kernel_checker.py
vendored
Executable file
152
freertos/Source/.github/scripts/kernel_checker.py
vendored
Executable file
@@ -0,0 +1,152 @@
|
||||
#!/usr/bin/env python3
|
||||
#/*
|
||||
# * FreeRTOS Kernel V10.4.6
|
||||
# * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
# *
|
||||
# * SPDX-License-Identifier: MIT
|
||||
# *
|
||||
# * Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
# * this software and associated documentation files (the "Software"), to deal in
|
||||
# * the Software without restriction, including without limitation the rights to
|
||||
# * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
# * the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
# * subject to the following conditions:
|
||||
# *
|
||||
# * The above copyright notice and this permission notice shall be included in all
|
||||
# * copies or substantial portions of the Software.
|
||||
# *
|
||||
# * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
# * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
# * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
# * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
# * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
# *
|
||||
# * https://www.FreeRTOS.org
|
||||
# * https://github.com/FreeRTOS
|
||||
# *
|
||||
# */
|
||||
|
||||
import os
|
||||
from common.header_checker import HeaderChecker
|
||||
|
||||
#--------------------------------------------------------------------------------------------------
|
||||
# CONFIG
|
||||
#--------------------------------------------------------------------------------------------------
|
||||
KERNEL_IGNORED_FILES = [
|
||||
'FreeRTOS-openocd.c',
|
||||
'Makefile',
|
||||
'.DS_Store'
|
||||
]
|
||||
|
||||
KERNEL_IGNORED_EXTENSIONS = [
|
||||
'.yml',
|
||||
'.css',
|
||||
'.idx',
|
||||
'.md',
|
||||
'.url',
|
||||
'.sty',
|
||||
'.0-rc2',
|
||||
'.s82',
|
||||
'.js',
|
||||
'.out',
|
||||
'.pack',
|
||||
'.2',
|
||||
'.1-kernel-only',
|
||||
'.0-kernel-only',
|
||||
'.0-rc1',
|
||||
'.readme',
|
||||
'.tex',
|
||||
'.png',
|
||||
'.bat',
|
||||
'.sh',
|
||||
'.txt',
|
||||
'.cmake'
|
||||
]
|
||||
|
||||
KERNEL_ASM_EXTENSIONS = [
|
||||
'.s',
|
||||
'.S',
|
||||
'.src',
|
||||
'.inc',
|
||||
'.s26',
|
||||
'.s43',
|
||||
'.s79',
|
||||
'.s85',
|
||||
'.s87',
|
||||
'.s90',
|
||||
'.asm',
|
||||
'.h'
|
||||
]
|
||||
|
||||
KERNEL_PY_EXTENSIONS = [
|
||||
'.py'
|
||||
]
|
||||
|
||||
KERNEL_IGNORED_PATTERNS = [
|
||||
r'.*\.git.*',
|
||||
r'.*portable/IAR/AtmelSAM7S64/.*AT91SAM7.*',
|
||||
r'.*portable/GCC/ARM7_AT91SAM7S/.*',
|
||||
r'.*portable/MPLAB/PIC18F/stdio.h'
|
||||
]
|
||||
|
||||
KERNEL_THIRD_PARTY_PATTERNS = [
|
||||
r'.*portable/ThirdParty/GCC/Posix/port*',
|
||||
r'.*portable/ThirdParty/*',
|
||||
r'.*portable/IAR/AVR32_UC3/.*',
|
||||
r'.*portable/GCC/AVR32_UC3/.*',
|
||||
]
|
||||
|
||||
KERNEL_HEADER = [
|
||||
'/*\n',
|
||||
' * FreeRTOS Kernel V10.4.6\n',
|
||||
' * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n',
|
||||
' *\n',
|
||||
' * SPDX-License-Identifier: MIT\n',
|
||||
' *\n',
|
||||
' * Permission is hereby granted, free of charge, to any person obtaining a copy of\n',
|
||||
' * this software and associated documentation files (the "Software"), to deal in\n',
|
||||
' * the Software without restriction, including without limitation the rights to\n',
|
||||
' * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n',
|
||||
' * the Software, and to permit persons to whom the Software is furnished to do so,\n',
|
||||
' * subject to the following conditions:\n',
|
||||
' *\n',
|
||||
' * The above copyright notice and this permission notice shall be included in all\n',
|
||||
' * copies or substantial portions of the Software.\n',
|
||||
' *\n',
|
||||
' * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n',
|
||||
' * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n',
|
||||
' * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n',
|
||||
' * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n',
|
||||
' * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n',
|
||||
' * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n',
|
||||
' *\n',
|
||||
' * https://www.FreeRTOS.org\n',
|
||||
' * https://github.com/FreeRTOS\n',
|
||||
' *\n',
|
||||
' */\n',
|
||||
]
|
||||
|
||||
def main():
|
||||
parser = HeaderChecker.configArgParser()
|
||||
args = parser.parse_args()
|
||||
|
||||
# Configure the checks then run
|
||||
checker = HeaderChecker(KERNEL_HEADER,
|
||||
ignored_files=KERNEL_IGNORED_FILES,
|
||||
ignored_ext=KERNEL_IGNORED_EXTENSIONS,
|
||||
ignored_patterns=KERNEL_IGNORED_PATTERNS,
|
||||
third_party_patterns=KERNEL_THIRD_PARTY_PATTERNS,
|
||||
py_ext=KERNEL_PY_EXTENSIONS,
|
||||
asm_ext=KERNEL_ASM_EXTENSIONS)
|
||||
checker.ignoreFile(os.path.split(__file__)[-1])
|
||||
|
||||
rc = checker.processArgs(args)
|
||||
if rc:
|
||||
checker.showHelp(__file__)
|
||||
|
||||
return rc
|
||||
|
||||
if __name__ == '__main__':
|
||||
exit(main())
|
||||
|
||||
160
freertos/Source/.github/uncrustify.cfg
vendored
Normal file
160
freertos/Source/.github/uncrustify.cfg
vendored
Normal file
@@ -0,0 +1,160 @@
|
||||
# Uncrustify-0.67
|
||||
input_tab_size = 4 # unsigned number
|
||||
output_tab_size = 4 # unsigned number
|
||||
sp_arith = force # ignore/add/remove/force
|
||||
sp_assign = force # ignore/add/remove/force
|
||||
sp_assign_default = force # ignore/add/remove/force
|
||||
sp_before_assign = force # ignore/add/remove/force
|
||||
sp_after_assign = force # ignore/add/remove/force
|
||||
sp_enum_assign = force # ignore/add/remove/force
|
||||
sp_enum_before_assign = force # ignore/add/remove/force
|
||||
sp_enum_after_assign = force # ignore/add/remove/force
|
||||
sp_pp_stringify = add # ignore/add/remove/force
|
||||
sp_bool = force # ignore/add/remove/force
|
||||
sp_compare = force # ignore/add/remove/force
|
||||
sp_inside_paren = force # ignore/add/remove/force
|
||||
sp_paren_paren = force # ignore/add/remove/force
|
||||
sp_paren_brace = force # ignore/add/remove/force
|
||||
sp_before_ptr_star = force # ignore/add/remove/force
|
||||
sp_before_unnamed_ptr_star = force # ignore/add/remove/force
|
||||
sp_between_ptr_star = remove # ignore/add/remove/force
|
||||
sp_after_ptr_star = force # ignore/add/remove/force
|
||||
sp_before_byref = force # ignore/add/remove/force
|
||||
sp_after_byref = remove # ignore/add/remove/force
|
||||
sp_after_byref_func = remove # ignore/add/remove/force
|
||||
sp_before_angle = remove # ignore/add/remove/force
|
||||
sp_inside_angle = remove # ignore/add/remove/force
|
||||
sp_after_angle = force # ignore/add/remove/force
|
||||
sp_before_sparen = remove # ignore/add/remove/force
|
||||
sp_inside_sparen = force # ignore/add/remove/force
|
||||
sp_after_sparen = force # ignore/add/remove/force
|
||||
sp_sparen_brace = force # ignore/add/remove/force
|
||||
sp_before_semi_for = remove # ignore/add/remove/force
|
||||
sp_before_semi_for_empty = add # ignore/add/remove/force
|
||||
sp_after_semi_for_empty = force # ignore/add/remove/force
|
||||
sp_before_square = remove # ignore/add/remove/force
|
||||
sp_before_squares = remove # ignore/add/remove/force
|
||||
sp_inside_square = force # ignore/add/remove/force
|
||||
sp_after_comma = force # ignore/add/remove/force
|
||||
sp_after_cast = force # ignore/add/remove/force
|
||||
sp_inside_paren_cast = force # ignore/add/remove/force
|
||||
sp_sizeof_paren = remove # ignore/add/remove/force
|
||||
sp_inside_braces_enum = force # ignore/add/remove/force
|
||||
sp_inside_braces_struct = force # ignore/add/remove/force
|
||||
sp_inside_braces = force # ignore/add/remove/force
|
||||
sp_inside_braces_empty = remove # ignore/add/remove/force
|
||||
sp_type_func = force # ignore/add/remove/force
|
||||
sp_func_proto_paren = remove # ignore/add/remove/force
|
||||
sp_func_def_paren = remove # ignore/add/remove/force
|
||||
sp_inside_fparens = remove # ignore/add/remove/force
|
||||
sp_inside_fparen = force # ignore/add/remove/force
|
||||
sp_fparen_brace = add # ignore/add/remove/force
|
||||
sp_func_call_paren = remove # ignore/add/remove/force
|
||||
sp_func_class_paren = remove # ignore/add/remove/force
|
||||
sp_return_paren = remove # ignore/add/remove/force
|
||||
sp_attribute_paren = remove # ignore/add/remove/force
|
||||
sp_defined_paren = remove # ignore/add/remove/force
|
||||
sp_macro = force # ignore/add/remove/force
|
||||
sp_macro_func = force # ignore/add/remove/force
|
||||
sp_brace_typedef = force # ignore/add/remove/force
|
||||
sp_before_dc = remove # ignore/add/remove/force
|
||||
sp_after_dc = remove # ignore/add/remove/force
|
||||
sp_cond_colon = force # ignore/add/remove/force
|
||||
sp_cond_question = force # ignore/add/remove/force
|
||||
sp_case_label = force # ignore/add/remove/force
|
||||
sp_endif_cmt = force # ignore/add/remove/force
|
||||
sp_before_tr_emb_cmt = force # ignore/add/remove/force
|
||||
sp_num_before_tr_emb_cmt = 1 # unsigned number
|
||||
indent_columns = 4 # unsigned number
|
||||
indent_with_tabs = 0 # unsigned number
|
||||
indent_align_string = true # false/true
|
||||
indent_class = true # false/true
|
||||
indent_class_colon = true # false/true
|
||||
indent_member = 3 # unsigned number
|
||||
indent_switch_case = 4 # unsigned number
|
||||
indent_case_brace = 3 # number
|
||||
nl_assign_leave_one_liners = true # false/true
|
||||
nl_class_leave_one_liners = true # false/true
|
||||
nl_start_of_file = remove # ignore/add/remove/force
|
||||
nl_end_of_file = force # ignore/add/remove/force
|
||||
nl_end_of_file_min = 1 # unsigned number
|
||||
nl_assign_brace = add # ignore/add/remove/force
|
||||
nl_func_var_def_blk = 1 # unsigned number
|
||||
nl_fcall_brace = add # ignore/add/remove/force
|
||||
nl_enum_brace = force # ignore/add/remove/force
|
||||
nl_struct_brace = force # ignore/add/remove/force
|
||||
nl_union_brace = force # ignore/add/remove/force
|
||||
nl_if_brace = add # ignore/add/remove/force
|
||||
nl_brace_else = add # ignore/add/remove/force
|
||||
nl_else_brace = add # ignore/add/remove/force
|
||||
nl_getset_brace = force # ignore/add/remove/force
|
||||
nl_for_brace = add # ignore/add/remove/force
|
||||
nl_while_brace = add # ignore/add/remove/force
|
||||
nl_do_brace = add # ignore/add/remove/force
|
||||
nl_switch_brace = add # ignore/add/remove/force
|
||||
nl_multi_line_define = true # false/true
|
||||
nl_before_case = true # false/true
|
||||
nl_after_case = true # false/true
|
||||
nl_func_type_name = remove # ignore/add/remove/force
|
||||
nl_func_proto_type_name = remove # ignore/add/remove/force
|
||||
nl_func_paren = remove # ignore/add/remove/force
|
||||
nl_func_def_paren = remove # ignore/add/remove/force
|
||||
nl_func_decl_start = remove # ignore/add/remove/force
|
||||
nl_func_def_start = remove # ignore/add/remove/force
|
||||
nl_func_decl_args = add # ignore/add/remove/force
|
||||
nl_func_def_args = add # ignore/add/remove/force
|
||||
nl_func_decl_end = remove # ignore/add/remove/force
|
||||
nl_func_def_end = remove # ignore/add/remove/force
|
||||
nl_fdef_brace = add # ignore/add/remove/force
|
||||
nl_after_semicolon = true # false/true
|
||||
nl_after_brace_open = true # false/true
|
||||
nl_after_brace_close = true # false/true
|
||||
nl_squeeze_ifdef = true # false/true
|
||||
nl_before_if = force # ignore/add/remove/force
|
||||
nl_after_if = force # ignore/add/remove/force
|
||||
nl_before_for = force # ignore/add/remove/force
|
||||
nl_after_for = force # ignore/add/remove/force
|
||||
nl_before_while = force # ignore/add/remove/force
|
||||
nl_after_while = force # ignore/add/remove/force
|
||||
nl_before_switch = force # ignore/add/remove/force
|
||||
nl_after_switch = force # ignore/add/remove/force
|
||||
nl_before_do = force # ignore/add/remove/force
|
||||
nl_after_do = force # ignore/add/remove/force
|
||||
nl_max = 4 # unsigned number
|
||||
nl_after_func_proto_group = 1 # unsigned number
|
||||
nl_after_func_body_class = 2 # unsigned number
|
||||
nl_before_block_comment = 2 # unsigned number
|
||||
eat_blanks_after_open_brace = true # false/true
|
||||
eat_blanks_before_close_brace = true # false/true
|
||||
nl_after_return = true # false/true
|
||||
pos_bool = trail # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force
|
||||
align_var_def_amp_style = 1 # unsigned number
|
||||
align_var_def_thresh = 16 # unsigned number
|
||||
align_assign_thresh = 12 # unsigned number
|
||||
align_struct_init_span = 3 # unsigned number
|
||||
align_typedef_gap = 3 # unsigned number
|
||||
align_typedef_span = 5 # unsigned number
|
||||
align_typedef_star_style = 1 # unsigned number
|
||||
align_typedef_amp_style = 1 # unsigned number
|
||||
align_right_cmt_span = 3 # unsigned number
|
||||
align_nl_cont = true # false/true
|
||||
align_pp_define_gap = 4 # unsigned number
|
||||
align_pp_define_span = 3 # unsigned number
|
||||
cmt_cpp_to_c = true # false/true
|
||||
cmt_star_cont = true # false/true
|
||||
mod_full_brace_do = add # ignore/add/remove/force
|
||||
mod_full_brace_for = add # ignore/add/remove/force
|
||||
mod_full_brace_if = add # ignore/add/remove/force
|
||||
mod_full_brace_while = add # ignore/add/remove/force
|
||||
mod_full_paren_if_bool = true # false/true
|
||||
mod_remove_extra_semicolon = true # false/true
|
||||
mod_add_long_ifdef_endif_comment = 10 # unsigned number
|
||||
mod_add_long_ifdef_else_comment = 10 # unsigned number
|
||||
mod_case_brace = remove # ignore/add/remove/force
|
||||
mod_remove_empty_return = true # false/true
|
||||
pp_indent = force # ignore/add/remove/force
|
||||
pp_indent_at_level = true # false/true
|
||||
pp_indent_count = 4 # unsigned number
|
||||
pp_space = remove # ignore/add/remove/force
|
||||
pp_if_indent_code = true # false/true
|
||||
# option(s) with 'not default' value: 158
|
||||
57
freertos/Source/.github/workflows/auto-release.yml
vendored
Normal file
57
freertos/Source/.github/workflows/auto-release.yml
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
name: Kernel-Auto-Release
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
commit_id:
|
||||
description: 'Commit ID'
|
||||
required: true
|
||||
default: 'HEAD'
|
||||
version_number:
|
||||
description: 'Version Number (Ex. 10.4.4)'
|
||||
required: true
|
||||
default: '10.4.4'
|
||||
main_br_version:
|
||||
description: "Version String for task.h on main branch (leave empty to leave as-is)."
|
||||
require: false
|
||||
default: ''
|
||||
|
||||
jobs:
|
||||
release-packager:
|
||||
name: Release Packager
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Install python 3
|
||||
- name: Tool Setup
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.7.10
|
||||
architecture: x64
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# Currently FreeRTOS/.github/scripts houses the release script. Download it for upcoming usage
|
||||
- name: Checkout FreeRTOS Release Tools
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: FreeRTOS/FreeRTOS
|
||||
path: tools
|
||||
|
||||
# Simpler git auth if we use checkout action and forward the repo to release script
|
||||
- name: Checkout FreeRTOS Kernel
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: local_kernel
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Release
|
||||
run: |
|
||||
# Configure repo for push
|
||||
git config --global user.name ${{ github.actor }}
|
||||
git config --global user.email ${{ github.actor }}@users.noreply.github.com
|
||||
# Install deps and run
|
||||
pip install -r ./tools/.github/scripts/release-requirements.txt
|
||||
./tools/.github/scripts/release.py FreeRTOS --kernel-repo-path=local_kernel --kernel-commit=${{ github.event.inputs.commit_id }} --new-kernel-version=${{ github.event.inputs.version_number }} --new-kernel-main-br-version=${{ github.event.inputs.main_br_version }}
|
||||
exit $?
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
68
freertos/Source/.github/workflows/ci.yml
vendored
Normal file
68
freertos/Source/.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
name: CI Checks
|
||||
on:
|
||||
push:
|
||||
branches: ["**"]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
spell-check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Parent Repo
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: main
|
||||
repository: aws/aws-iot-device-sdk-embedded-C
|
||||
path: main
|
||||
- name: Clone This Repo
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: ./kernel
|
||||
- name: Install spell
|
||||
run: |
|
||||
sudo apt-get install spell
|
||||
sudo apt-get install util-linux
|
||||
- name: Check spelling
|
||||
run: |
|
||||
PATH=$PATH:main/tools/spell
|
||||
# Make sure that the portable directory is not included in the spellcheck.
|
||||
sed -i 's/find $DIRNAME/find $DIRNAME -not -path '*portable*'/g' main/tools/spell/find-unknown-comment-words
|
||||
find-unknown-comment-words --directory kernel/ --lexicon ./kernel/.github/lexicon.txt
|
||||
if [ "$?" = "0" ]; then
|
||||
exit 0
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
formatting:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install Uncrustify
|
||||
run: sudo apt-get install uncrustify
|
||||
- name: Run Uncrustify
|
||||
run: |
|
||||
uncrustify --version
|
||||
find . \( -name portable \) -prune -false -o -iname "*.[hc]" -exec uncrustify --check -c .github/uncrustify.cfg {} +
|
||||
- name: Check For Trailing Whitespace
|
||||
run: |
|
||||
set +e
|
||||
grep --exclude="README.md" --exclude-dir="portable" -rnI -e "[[:blank:]]$" .
|
||||
if [ "$?" = "0" ]; then
|
||||
echo "Files have trailing whitespace."
|
||||
exit 1
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
|
||||
url-check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Clone This Repo
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: ./kernel
|
||||
- name: URL Checker
|
||||
run: |
|
||||
bash kernel/.github/actions/url_verifier.sh kernel
|
||||
|
||||
24
freertos/Source/.github/workflows/git-secrets.yml
vendored
Normal file
24
freertos/Source/.github/workflows/git-secrets.yml
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
name: git-secrets Check
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
git-secrets:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Checkout awslabs/git-secrets
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: awslabs/git-secrets
|
||||
ref: master
|
||||
path: git-secrets
|
||||
- name: Install git-secrets
|
||||
run: cd git-secrets && sudo make install && cd ..
|
||||
- name: Run git-secrets
|
||||
run: |
|
||||
git-secrets --register-aws
|
||||
git-secrets --scan
|
||||
72
freertos/Source/.github/workflows/kernel-checks.yml
vendored
Normal file
72
freertos/Source/.github/workflows/kernel-checks.yml
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
name: Kernel-Checker
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
kernel-checker:
|
||||
name: FreeRTOS Kernel Header Checks
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Install python 3
|
||||
- name: Tool Setup
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.7.10
|
||||
architecture: x64
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# There is shared code, hosted by FreeRTOS/FreeRTOS, with deps needed by header checker
|
||||
- name: Checkout FreeRTOS Tools
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: FreeRTOS/FreeRTOS
|
||||
ref: main
|
||||
path: tools
|
||||
|
||||
# Checkout user pull request changes
|
||||
- name: Checkout Pull Request
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
path: inspect
|
||||
|
||||
# Collect all affected files
|
||||
- name: Collecting changed files
|
||||
uses: lots0logs/gh-action-get-changed-files@2.1.4
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# Run checks
|
||||
- name: Check File Headers
|
||||
run: |
|
||||
mv tools/.github/scripts/common inspect/.github/scripts
|
||||
pip install -r inspect/.github/scripts/common/requirements.txt
|
||||
cd inspect
|
||||
.github/scripts/kernel_checker.py --json ${HOME}/files_modified.json ${HOME}/files_added.json ${HOME}/files_renamed.json
|
||||
exit $?
|
||||
build-checker:
|
||||
name: FreeRTOS Posix Build Check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout the parent repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: main
|
||||
repository: FreeRTOS/FreeRTOS
|
||||
submodules: 'recursive'
|
||||
fetch-depth: 1
|
||||
path: ./workspace
|
||||
- name: Checkout the current repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: ./workspace/FreeRTOS/Source
|
||||
- name: Posix Build Checker
|
||||
run: |
|
||||
bash workspace/.github/scripts/posix_build_checker.sh workspace
|
||||
- name: Install lib pcap dev
|
||||
run: |
|
||||
sudo apt-get install libpcap-dev
|
||||
- name: Posix Network Build Checker
|
||||
run: |
|
||||
bash workspace/.github/scripts/posix_network_build_checker.sh workspace
|
||||
56
freertos/Source/.github/workflows/unit-tests.yml
vendored
Normal file
56
freertos/Source/.github/workflows/unit-tests.yml
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
name: CMock Unit Tests
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
run:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Parent Repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: main
|
||||
repository: FreeRTOS/FreeRTOS
|
||||
submodules: 'recursive'
|
||||
fetch-depth: 1
|
||||
- name: Clone This Repo
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: ./FreeRTOS/Source
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@master
|
||||
with:
|
||||
python-version: 3.8
|
||||
|
||||
- name: Install packages
|
||||
run: |
|
||||
sudo apt-get install lcov cflow ruby doxygen build-essential
|
||||
- name: Run Unit Tests with ENABLE_SANITIZER=1
|
||||
run: |
|
||||
make -C FreeRTOS/Test/CMock clean
|
||||
make -C FreeRTOS/Test/CMock ENABLE_SANITIZER=1 run_col_formatted
|
||||
- name: Run Unit Tests for coverage
|
||||
run: |
|
||||
make -C FreeRTOS/Test/CMock clean
|
||||
make -C FreeRTOS/Test/CMock lcovhtml
|
||||
lcov --config-file FreeRTOS/Test/CMock/lcovrc --summary FreeRTOS/Test/CMock/build/cmock_test.info > FreeRTOS/Test/CMock/build/cmock_test_summary.txt
|
||||
- name: Upload coverage to Codecov
|
||||
uses: codecov/codecov-action@v1
|
||||
with:
|
||||
files: FreeRTOS/Test/CMock/build/cmock_test.info
|
||||
working-directory: .
|
||||
root_dir: FreeRTOS/Source
|
||||
flags: unittests
|
||||
fail_ci_if_error: false
|
||||
path_to_write_report: coverage/codecov_report.txt
|
||||
verbose: false
|
||||
- name: Archive code coverage data
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: coverage-data
|
||||
path: FreeRTOS/Test/CMock/build/cmock_test*
|
||||
- name: Archive code coverage html report
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: coverage-report
|
||||
path: FreeRTOS/Test/CMock/build/coverage
|
||||
6
freertos/Source/.gitmodules
vendored
Normal file
6
freertos/Source/.gitmodules
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
[submodule "ThirdParty/FreeRTOS-Kernel-Partner-Supported-Ports"]
|
||||
path = portable/ThirdParty/Partner-Supported-Ports
|
||||
url = https://github.com/FreeRTOS/FreeRTOS-Kernel-Partner-Supported-Ports
|
||||
[submodule "ThirdParty/FreeRTOS-Kernel-Community-Supported-Ports"]
|
||||
path = portable/ThirdParty/Community-Supported-Ports
|
||||
url = https://github.com/FreeRTOS/FreeRTOS-Kernel-Community-Supported-Ports
|
||||
70
freertos/Source/CONTRIBUTING.md
Normal file
70
freertos/Source/CONTRIBUTING.md
Normal file
@@ -0,0 +1,70 @@
|
||||
# Contribution guidelines
|
||||
|
||||
Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, code, or
|
||||
documentation, we welcome our community to be involved in this project.
|
||||
|
||||
Please read through this document before submitting any issues or pull requests to ensure we are able to help you and all members of the community as effectively as possible.
|
||||
|
||||
## Code of conduct
|
||||
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
|
||||
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
|
||||
opensource-codeofconduct@amazon.com with any additional questions or comments.
|
||||
|
||||
|
||||
## Security issue notifications
|
||||
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue.
|
||||
|
||||
|
||||
## Submitting a bugs/feature request
|
||||
Have a bug to report or feature to request? Follow these steps:
|
||||
1. Search on the [FreeRTOS Community Support Forums](https://forums.freertos.org/) and [GitHub issue tracker](https://github.com/FreeRTOS/FreeRTOS/issues?utf8=%E2%9C%93&q=is%3Aissue) to be sure this hasn't been already reported or discussed.
|
||||
2. If your search turns up empty, create a new topic in the [forums](https://forums.freertos.org/) and work with the community to help clarify issues or refine the idea. Include as many of the details listed below.
|
||||
3. Once the community has had time to discuss and digest, we welcome you to create an [issue](https://github.com/FreeRTOS/FreeRTOS/issues) to report bugs or suggest features.
|
||||
|
||||
When creating a new topic on the forums or filing an issue, please include as many relevant details as possible. Examples include:
|
||||
|
||||
* A clear description of the situation — what you observe, what you expect, and your view on how the two differ.
|
||||
* A reproducible test case or sequence of steps.
|
||||
* The version of our code being used.
|
||||
* Any modifications you've made relevant to the bug.
|
||||
* Details of your environment or deployment. Highlight anything unusual.
|
||||
|
||||
|
||||
## Contributing via pull request
|
||||
Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:
|
||||
|
||||
1. You are working against the latest source on the *master* branch.
|
||||
2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already.
|
||||
3. You open an issue to discuss any significant work - we would hate for your time to be wasted.
|
||||
|
||||
To send us a pull request, please:
|
||||
|
||||
1. Fork the repository.
|
||||
2. Modify the source; focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
|
||||
3. Follow the [coding style guide](https://www.FreeRTOS.org/FreeRTOS-Coding-Standard-and-Style-Guide.html).
|
||||
4. Commit to your fork using clear commit messages.
|
||||
5. Send us a pull request, answering any default questions in the pull request interface.
|
||||
NOTE: Please make sure the default option (Allow edits from maintainers) is left checked.
|
||||
6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.
|
||||
|
||||
GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
|
||||
[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).
|
||||
|
||||
## Coding style
|
||||
* Please ensure that your code complies to the [FreeRTOS coding style guidelines](https://www.FreeRTOS.org/FreeRTOS-Coding-Standard-and-Style-Guide.html).
|
||||
|
||||
|
||||
## Getting your pull request merged
|
||||
All pull requests must be approved by our review team before it can be merged in. We appreciate your patience while pull requests are reviewed. The time it takes to review will depend on complexity and consideration of wider implications.
|
||||
|
||||
|
||||
## Finding contributions to work on
|
||||
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), tackling open 'help wanted' issues is a great place to start.
|
||||
|
||||
|
||||
## Licensing
|
||||
The FreeRTOS kernel is released under the MIT open source license, the text of which can be found [here](https://github.com/FreeRTOS/FreeRTOS/blob/master/FreeRTOS/License/license.txt)
|
||||
|
||||
Additional license files can be found in the folders containing any supplementary libraries licensed by their respective copyright owners where applicable.
|
||||
|
||||
We may ask you to sign a [Contributor License Agreement (CLA)](http://en.wikipedia.org/wiki/Contributor_License_Agreement) for larger changes.
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Amazon FreeRTOS POSIX V1.1.0
|
||||
* Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* http://aws.amazon.com/freertos
|
||||
* http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file FreeRTOS_POSIX.h
|
||||
* @brief FreeRTOS+POSIX header.
|
||||
*
|
||||
* This file must be included before all other FreeRTOS+POSIX includes.
|
||||
*/
|
||||
|
||||
#ifndef _FREERTOS_POSIX_H_
|
||||
#define _FREERTOS_POSIX_H_
|
||||
|
||||
/* FreeRTOS+POSIX platform-specific configuration headers. */
|
||||
#include "FreeRTOS_POSIX_portable.h"
|
||||
#include "FreeRTOS_POSIX_portable_default.h"
|
||||
|
||||
/* FreeRTOS includes. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "event_groups.h"
|
||||
#include "semphr.h"
|
||||
#include "task.h"
|
||||
|
||||
/* FreeRTOS+POSIX data types and internal structs. */
|
||||
#include "FreeRTOS_POSIX/sys/types.h"
|
||||
#include "FreeRTOS_POSIX_internal.h"
|
||||
|
||||
#endif /* _FREERTOS_POSIX_H_ */
|
||||
@@ -0,0 +1,129 @@
|
||||
/*
|
||||
* Amazon FreeRTOS POSIX V1.1.0
|
||||
* Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* http://aws.amazon.com/freertos
|
||||
* http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
#ifndef _FREERTOS_POSIX_INTERNAL_H_
|
||||
#define _FREERTOS_POSIX_INTERNAL_H_
|
||||
|
||||
/**
|
||||
* @file FreeRTOS_POSIX_internal.h
|
||||
* @brief Internal structs and initializers for FreeRTOS+POSIX.
|
||||
*/
|
||||
|
||||
/* Amazon FreeRTOS includes. */
|
||||
#include "iot_doubly_linked_list.h"
|
||||
|
||||
/**
|
||||
* @brief Mutex attribute object.
|
||||
*/
|
||||
#if posixconfigENABLE_PTHREAD_MUTEXATTR_T == 1
|
||||
typedef struct pthread_mutexattr_internal
|
||||
{
|
||||
int iType; /**< Mutex type. */
|
||||
} pthread_mutexattr_internal_t;
|
||||
#endif
|
||||
|
||||
#if posixconfigENABLE_PTHREAD_MUTEX_T == 1
|
||||
|
||||
/**
|
||||
* @brief Mutex.
|
||||
*/
|
||||
typedef struct pthread_mutex_internal
|
||||
{
|
||||
BaseType_t xIsInitialized; /**< Set to pdTRUE if this mutex is initialized, pdFALSE otherwise. */
|
||||
StaticSemaphore_t xMutex; /**< FreeRTOS mutex. */
|
||||
TaskHandle_t xTaskOwner; /**< Owner; used for deadlock detection and permission checks. */
|
||||
pthread_mutexattr_internal_t xAttr; /**< Mutex attributes. */
|
||||
} pthread_mutex_internal_t;
|
||||
|
||||
/**
|
||||
* @brief Compile-time initializer of pthread_mutex_internal_t.
|
||||
*/
|
||||
#define FREERTOS_POSIX_MUTEX_INITIALIZER \
|
||||
( ( ( pthread_mutex_internal_t ) \
|
||||
{ \
|
||||
.xIsInitialized = pdFALSE, \
|
||||
.xMutex = { { 0 } }, \
|
||||
.xTaskOwner = NULL, \
|
||||
.xAttr = { .iType = 0 } \
|
||||
} \
|
||||
) \
|
||||
)
|
||||
#endif /* if posixconfigENABLE_PTHREAD_MUTEX_T == 1 */
|
||||
|
||||
#if posixconfigENABLE_PTHREAD_COND_T == 1
|
||||
|
||||
/**
|
||||
* @brief Condition variable.
|
||||
*/
|
||||
typedef struct pthread_cond_internal
|
||||
{
|
||||
BaseType_t xIsInitialized; /**< Set to pdTRUE if this condition variable is initialized, pdFALSE otherwise. */
|
||||
StaticSemaphore_t xCondWaitSemaphore; /**< Threads block on this semaphore in pthread_cond_wait. */
|
||||
unsigned iWaitingThreads; /**< The number of threads currently waiting on this condition variable. */
|
||||
} pthread_cond_internal_t;
|
||||
|
||||
/**
|
||||
* @brief Compile-time initializer of pthread_cond_internal_t.
|
||||
*/
|
||||
|
||||
#define FREERTOS_POSIX_COND_INITIALIZER \
|
||||
( ( ( pthread_cond_internal_t ) \
|
||||
{ \
|
||||
.xIsInitialized = pdFALSE, \
|
||||
.xCondWaitSemaphore = { { 0 } }, \
|
||||
.iWaitingThreads = 0 \
|
||||
} \
|
||||
) \
|
||||
)
|
||||
|
||||
#endif /* if posixconfigENABLE_PTHREAD_COND_T == 1 */
|
||||
|
||||
#if posixconfigENABLE_SEM_T == 1
|
||||
|
||||
/**
|
||||
* @brief Semaphore type.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
StaticSemaphore_t xSemaphore; /**< FreeRTOS semaphore. */
|
||||
int value; /**< POSIX semaphore count. */
|
||||
} sem_internal_t;
|
||||
#endif /* if posixconfigENABLE_SEM_T == 1 */
|
||||
|
||||
#if posixconfigENABLE_PTHREAD_BARRIER_T == 1
|
||||
|
||||
/**
|
||||
* @brief Barrier object.
|
||||
*/
|
||||
typedef struct pthread_barrier_internal
|
||||
{
|
||||
unsigned uThreadCount; /**< Current number of threads that have entered barrier. */
|
||||
unsigned uThreshold; /**< The count argument of pthread_barrier_init. */
|
||||
StaticSemaphore_t xThreadCountSemaphore; /**< Prevents more than uThreshold threads from exiting pthread_barrier_wait at once. */
|
||||
StaticEventGroup_t xBarrierEventGroup; /**< FreeRTOS event group that blocks to wait on threads entering barrier. */
|
||||
} pthread_barrier_internal_t;
|
||||
#endif /* if posixconfigENABLE_PTHREAD_BARRIER_T == 1 */
|
||||
|
||||
#endif /* _FREERTOS_POSIX_INTERNAL_H_ */
|
||||
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* Amazon FreeRTOS POSIX V1.1.0
|
||||
* Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* http://aws.amazon.com/freertos
|
||||
* http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
#ifndef _FREERTOS_POSIX_INTERNAL_TYPES_H_
|
||||
#define _FREERTOS_POSIX_INTERNAL_TYPES_H_
|
||||
|
||||
#include "FreeRTOS_POSIX_internal.h"
|
||||
|
||||
/*
|
||||
* sys/types.h defines a POSIX type when posixconfigENABLE_PTHREAD_<TYPE>_T
|
||||
* is not defined AND when posixconfigENABLE_PTHREAD_<TYPE>_T is set to 1.
|
||||
* FreeRTOS_POSIX_internal.h defines internal type ONLY when
|
||||
* posixconfigENABLE_PTHREAD_<TYPE>_T is set to 1.
|
||||
* #else part below is to have a type defined, so the code compiles, when
|
||||
* posixconfigENABLE_PTHREAD_<TYPE>_T is not defined.
|
||||
*/
|
||||
#if posixconfigENABLE_PTHREAD_MUTEX_T == 1
|
||||
typedef pthread_mutex_internal_t PthreadMutexType_t;
|
||||
#else
|
||||
typedef void * PthreadMutexType_t;
|
||||
#endif
|
||||
|
||||
#if posixconfigENABLE_PTHREAD_COND_T == 1
|
||||
typedef pthread_cond_internal_t PthreadCondType_t;
|
||||
#else
|
||||
typedef void * PthreadCondType_t;
|
||||
#endif
|
||||
|
||||
#if posixconfigENABLE_SEM_T == 1
|
||||
typedef sem_internal_t PosixSemType_t;
|
||||
#else
|
||||
typedef void * PosixSemType_t;
|
||||
#endif
|
||||
|
||||
#if posixconfigENABLE_PTHREAD_MUTEXATTR_T == 1
|
||||
typedef struct pthread_mutexattr
|
||||
{
|
||||
uint32_t ulpthreadMutexAttrStorage;
|
||||
} PthreadMutexAttrType_t;
|
||||
#else
|
||||
typedef void * PthreadMutexAttrType_t;
|
||||
#endif
|
||||
|
||||
#if posixconfigENABLE_PTHREAD_ATTR_T == 1
|
||||
typedef struct pthread_attr
|
||||
{
|
||||
uint32_t ulpthreadAttrStorage;
|
||||
} PthreadAttrType_t;
|
||||
#else
|
||||
typedef void * PthreadAttrType_t;
|
||||
#endif
|
||||
|
||||
#if posixconfigENABLE_PTHREAD_BARRIER_T == 1
|
||||
typedef pthread_barrier_internal_t PthreadBarrierType_t;
|
||||
#else
|
||||
typedef void * PthreadBarrierType_t;
|
||||
#endif
|
||||
|
||||
#endif /* _FREERTOS_POSIX_INTERNAL_TYPES_H_ */
|
||||
@@ -0,0 +1,145 @@
|
||||
/*
|
||||
* Amazon FreeRTOS POSIX V1.1.0
|
||||
* Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* http://aws.amazon.com/freertos
|
||||
* http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file FreeRTOS_POSIX_portable_default.h
|
||||
* @brief Defaults for port-specific configuration of FreeRTOS+POSIX.
|
||||
*/
|
||||
|
||||
#ifndef _FREERTOS_POSIX_PORTABLE_DEFAULT_H_
|
||||
#define _FREERTOS_POSIX_PORTABLE_DEFAULT_H_
|
||||
|
||||
/**
|
||||
* @name The FreeRTOS task name given to pthreads.
|
||||
*/
|
||||
/**@{ */
|
||||
#ifndef posixconfigPTHREAD_TASK_NAME
|
||||
#define posixconfigPTHREAD_TASK_NAME "pthread" /**< Task name. */
|
||||
#endif
|
||||
/**@} */
|
||||
|
||||
/**
|
||||
* @name the FreeRTOS timer name given to POSIX timers.
|
||||
*/
|
||||
/**@{ */
|
||||
#ifndef posixconfigTIMER_NAME
|
||||
#define posixconfigTIMER_NAME "timer" /**< Timer name. */
|
||||
#endif
|
||||
/**@} */
|
||||
|
||||
/**
|
||||
* @name Defaults for POSIX message queue implementation.
|
||||
*/
|
||||
/**@{ */
|
||||
#ifndef posixconfigMQ_MAX_MESSAGES
|
||||
#define posixconfigMQ_MAX_MESSAGES 10 /**< Maximum number of messages in an mq at one time. */
|
||||
#endif
|
||||
|
||||
#ifndef posixconfigMQ_MAX_SIZE
|
||||
#define posixconfigMQ_MAX_SIZE 128 /**< Maximum size (in bytes) of each message. */
|
||||
#endif
|
||||
/**@} */
|
||||
|
||||
/**
|
||||
* @name POSIX implementation-dependent constants usually defined in limits.h.
|
||||
*
|
||||
* They are defined here to provide portability between platforms.
|
||||
*/
|
||||
/**@{ */
|
||||
#ifndef PTHREAD_STACK_MIN
|
||||
#define PTHREAD_STACK_MIN configMINIMAL_STACK_SIZE * sizeof( StackType_t ) /**< Minimum size in bytes of thread stack storage. */
|
||||
#endif
|
||||
#ifndef NAME_MAX
|
||||
#define NAME_MAX 64 /**< Maximum number of bytes in a filename (not including terminating null). */
|
||||
#endif
|
||||
#ifndef SEM_VALUE_MAX
|
||||
#define SEM_VALUE_MAX 0x7FFFU /**< Maximum value of a sem_t. */
|
||||
#endif
|
||||
/**@} */
|
||||
|
||||
/**
|
||||
* @name Enable typedefs of POSIX types.
|
||||
*
|
||||
* Set these values to 1 or 0 to enable or disable the typedefs, respectively.
|
||||
* These typedefs should only be disabled if they conflict with system typedefs.
|
||||
*/
|
||||
/**@{ */
|
||||
#ifndef posixconfigENABLE_CLOCK_T
|
||||
#define posixconfigENABLE_CLOCK_T 1 /**< clock_t in sys/types.h */
|
||||
#endif
|
||||
#ifndef posixconfigENABLE_CLOCKID_T
|
||||
#define posixconfigENABLE_CLOCKID_T 1 /**< clockid_t in sys/types.h */
|
||||
#endif
|
||||
#ifndef posixconfigENABLE_MODE_T
|
||||
#define posixconfigENABLE_MODE_T 1 /**< mode_t in sys/types.h */
|
||||
#endif
|
||||
#ifndef posixconfigENABLE_PID_T
|
||||
#define posixconfigENABLE_PID_T 1 /**< pid_t in sys/types.h */
|
||||
#endif
|
||||
#ifndef posixconfigENABLE_PTHREAD_ATTR_T
|
||||
#define posixconfigENABLE_PTHREAD_ATTR_T 1 /**< pthread_attr_t in sys/types.h */
|
||||
#endif
|
||||
#ifndef posixconfigENABLE_PTHREAD_COND_T
|
||||
#define posixconfigENABLE_PTHREAD_COND_T 1 /**< pthread_cond_t in sys/types.h */
|
||||
#endif
|
||||
#ifndef posixconfigENABLE_PTHREAD_CONDATTR_T
|
||||
#define posixconfigENABLE_PTHREAD_CONDATTR_T 1 /**< pthread_condattr_t in sys/types.h */
|
||||
#endif
|
||||
#ifndef posixconfigENABLE_PTHREAD_MUTEX_T
|
||||
#define posixconfigENABLE_PTHREAD_MUTEX_T 1 /**< pthread_mutex_t in sys/types.h */
|
||||
#endif
|
||||
#ifndef posixconfigENABLE_PTHREAD_MUTEXATTR_T
|
||||
#define posixconfigENABLE_PTHREAD_MUTEXATTR_T 1 /**< pthread_mutexattr_t in sys/types.h */
|
||||
#endif
|
||||
#ifndef posixconfigENABLE_PTHREAD_T
|
||||
#define posixconfigENABLE_PTHREAD_T 1 /**< pthread_t in sys/types.h */
|
||||
#endif
|
||||
#ifndef posixconfigENABLE_SSIZE_T
|
||||
#define posixconfigENABLE_SSIZE_T 1 /**< ssize_t in sys/types.h */
|
||||
#endif
|
||||
#ifndef posixconfigENABLE_TIME_T
|
||||
#define posixconfigENABLE_TIME_T 1 /**< time_t in sys/types.h */
|
||||
#endif
|
||||
#ifndef posixconfigENABLE_TIMER_T
|
||||
#define posixconfigENABLE_TIMER_T 1 /**< timer_t in sys/types.h */
|
||||
#endif
|
||||
#ifndef posixconfigENABLE_USECONDS_T
|
||||
#define posixconfigENABLE_USECONDS_T 1 /**< useconds_t in sys/types.h */
|
||||
#endif
|
||||
#ifndef posixconfigENABLE_TIMESPEC
|
||||
#define posixconfigENABLE_TIMESPEC 1 /**< struct timespec in time.h */
|
||||
#endif
|
||||
#ifndef posixconfigENABLE_ITIMERSPEC
|
||||
#define posixconfigENABLE_ITIMERSPEC 1 /**< struct itimerspec in time.h */
|
||||
#endif
|
||||
#ifndef posixconfigENABLE_SEM_T
|
||||
#define posixconfigENABLE_SEM_T 1 /**< struct sem_t in semaphore.h */
|
||||
#endif
|
||||
#ifndef posixconfigENABLE_PTHREAD_BARRIER_T
|
||||
#define posixconfigENABLE_PTHREAD_BARRIER_T 1 /**< pthread_barrier_t in sys/types.h */
|
||||
#endif
|
||||
/**@} */
|
||||
|
||||
#endif /* ifndef _FREERTOS_POSIX_PORTABLE_DEFAULT_H_ */
|
||||
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Amazon FreeRTOS+POSIX V1.0.4
|
||||
* Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* http://aws.amazon.com/freertos
|
||||
* http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file FreeRTOS_POSIX_portable.h
|
||||
* @brief Port-specific configuration of FreeRTOS+POSIX.
|
||||
*/
|
||||
|
||||
#ifndef _FREERTOS_POSIX_PORTABLE_H_
|
||||
#define _FREERTOS_POSIX_PORTABLE_H_
|
||||
|
||||
/* ESP-IDF already defines the following types. */
|
||||
#define posixconfigENABLE_CLOCK_T 0
|
||||
#define posixconfigENABLE_CLOCKID_T 0
|
||||
#define posixconfigENABLE_MODE_T 0
|
||||
#define posixconfigENABLE_PTHREAD_ATTR_T 0
|
||||
#define posixconfigENABLE_PTHREAD_COND_T 0
|
||||
#define posixconfigENABLE_PTHREAD_CONDATTR_T 0
|
||||
#define posixconfigENABLE_PTHREAD_MUTEX_T 0
|
||||
#define posixconfigENABLE_PTHREAD_MUTEXATTR_T 0
|
||||
#define posixconfigENABLE_PTHREAD_T 0
|
||||
#define posixconfigENABLE_TIME_T 0
|
||||
#define posixconfigENABLE_TIMESPEC 0
|
||||
#define posixconfigENABLE_ITIMERSPEC 0
|
||||
|
||||
/* ESP-IDF already provides the header sched.h. Exclude FreeRTOS+POSIX sched.h by
|
||||
* defining its double inclusion guard. */
|
||||
#define _FREERTOS_POSIX_SCHED_H_
|
||||
|
||||
/* Use the FreeRTOS+POSIX time.h header instead of the ESP-IDF time.h. Disable
|
||||
* ESP-IDF time.h by defining its double inclusion guard. */
|
||||
#define _TIME_H_
|
||||
|
||||
/* Disable the timer_t type defined by ESP-IDF. */
|
||||
#define __timer_t_defined
|
||||
#include <sys/types.h>
|
||||
|
||||
#endif /* _FREERTOS_POSIX_PORTABLE_H_ */
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Amazon FreeRTOS+POSIX V1.0.4
|
||||
* Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* http://aws.amazon.com/freertos
|
||||
* http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file FreeRTOS_POSIX_portable.h
|
||||
* @brief Port-specific configuration of FreeRTOS+POSIX.
|
||||
*/
|
||||
|
||||
#ifndef _FREERTOS_POSIX_PORTABLE_H_
|
||||
#define _FREERTOS_POSIX_PORTABLE_H_
|
||||
|
||||
/* Microchip includes. */
|
||||
#include <sys/types.h>
|
||||
|
||||
/* Microchip already typedefs the following types. */
|
||||
#define posixconfigENABLE_MODE_T 0
|
||||
#define posixconfigENABLE_PID_T 0
|
||||
#define posixconfigENABLE_SSIZE_T 0
|
||||
#define posixconfigENABLE_USECONDS_T 0
|
||||
/* Microchip -mnewlib compiler option supports these types. */
|
||||
#define posixconfigENABLE_TIMESPEC 0
|
||||
#define posixconfigENABLE_ITIMERSPEC 0
|
||||
#define posixconfigENABLE_CLOCKID_T 0
|
||||
#define posixconfigENABLE_TIME_T 0
|
||||
#define posixconfigENABLE_TIMER_T 0
|
||||
|
||||
|
||||
#endif /* _FREERTOS_POSIX_PORTABLE_H_ */
|
||||
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Amazon FreeRTOS+POSIX V1.0.4
|
||||
* Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* http://aws.amazon.com/freertos
|
||||
* http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file FreeRTOS_POSIX_portable.h
|
||||
* @brief Port-specific configuration of FreeRTOS+POSIX.
|
||||
*/
|
||||
|
||||
#ifndef _FREERTOS_POSIX_PORTABLE_H_
|
||||
#define _FREERTOS_POSIX_PORTABLE_H_
|
||||
|
||||
/* This port uses the defaults in FreeRTOS_POSIX_portable_default.h, so this
|
||||
* file is empty. */
|
||||
|
||||
#endif /* _FREERTOS_POSIX_PORTABLE_H_ */
|
||||
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Amazon FreeRTOS+POSIX V1.0.4
|
||||
* Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* http://aws.amazon.com/freertos
|
||||
* http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file FreeRTOS_POSIX_portable.h
|
||||
* @brief Port-specific configuration of FreeRTOS+POSIX.
|
||||
*/
|
||||
|
||||
#ifndef _FREERTOS_POSIX_PORTABLE_H_
|
||||
#define _FREERTOS_POSIX_PORTABLE_H_
|
||||
|
||||
/* This port uses the defaults in FreeRTOS_POSIX_portable_default.h, so this
|
||||
* file is empty. */
|
||||
|
||||
#endif /* _FREERTOS_POSIX_PORTABLE_H_ */
|
||||
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Amazon FreeRTOS+POSIX V1.0.4
|
||||
* Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* http://aws.amazon.com/freertos
|
||||
* http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file FreeRTOS_POSIX_portable.h
|
||||
* @brief Port-specific configuration of FreeRTOS+POSIX.
|
||||
*/
|
||||
|
||||
#ifndef _FREERTOS_POSIX_PORTABLE_H_
|
||||
#define _FREERTOS_POSIX_PORTABLE_H_
|
||||
|
||||
/* This port uses the defaults in FreeRTOS_POSIX_portable_default.h, so this
|
||||
* file is empty. */
|
||||
|
||||
#endif /* _FREERTOS_POSIX_PORTABLE_H_ */
|
||||
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Amazon FreeRTOS+POSIX V1.0.4
|
||||
* Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* http://aws.amazon.com/freertos
|
||||
* http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file FreeRTOS_POSIX_portable.h
|
||||
* @brief Port-specific configuration of FreeRTOS+POSIX.
|
||||
*/
|
||||
|
||||
#ifndef _FREERTOS_POSIX_PORTABLE_H_
|
||||
#define _FREERTOS_POSIX_PORTABLE_H_
|
||||
|
||||
/* This port uses the defaults in FreeRTOS_POSIX_portable_default.h, so this
|
||||
* file is empty. */
|
||||
|
||||
#endif /* _FREERTOS_POSIX_PORTABLE_H_ */
|
||||
@@ -0,0 +1,240 @@
|
||||
/*
|
||||
* Amazon FreeRTOS POSIX V1.1.0
|
||||
* Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* http://aws.amazon.com/freertos
|
||||
* http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file FreeRTOS_POSIX_clock.c
|
||||
* @brief Implementation of clock functions in time.h
|
||||
*/
|
||||
|
||||
/* C standard library includes. */
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
|
||||
/* FreeRTOS+POSIX includes. */
|
||||
#include "FreeRTOS_POSIX.h"
|
||||
#include "FreeRTOS_POSIX/errno.h"
|
||||
#include "FreeRTOS_POSIX/time.h"
|
||||
#include "FreeRTOS_POSIX/utils.h"
|
||||
|
||||
/* Declaration of snprintf. The header stdio.h is not included because it
|
||||
* includes conflicting symbols on some platforms. */
|
||||
extern int snprintf( char * s,
|
||||
size_t n,
|
||||
const char * format,
|
||||
... );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
clock_t clock( void )
|
||||
{
|
||||
/* This function is currently unsupported. It will always return -1. */
|
||||
|
||||
return ( clock_t ) -1;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
int clock_getcpuclockid( pid_t pid,
|
||||
clockid_t * clock_id )
|
||||
{
|
||||
/* Silence warnings about unused parameters. */
|
||||
( void ) pid;
|
||||
( void ) clock_id;
|
||||
|
||||
/* This function is currently unsupported. It will always return EPERM. */
|
||||
return EPERM;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
int clock_getres( clockid_t clock_id,
|
||||
struct timespec * res )
|
||||
{
|
||||
/* Silence warnings about unused parameters. */
|
||||
( void ) clock_id;
|
||||
|
||||
/* Convert FreeRTOS tick resolution as timespec. */
|
||||
if( res != NULL )
|
||||
{
|
||||
res->tv_sec = 0;
|
||||
res->tv_nsec = NANOSECONDS_PER_TICK;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
int clock_gettime( clockid_t clock_id,
|
||||
struct timespec * tp )
|
||||
{
|
||||
TimeOut_t xCurrentTime = { 0 };
|
||||
|
||||
/* Intermediate variable used to convert TimeOut_t to struct timespec.
|
||||
* Also used to detect overflow issues. It must be unsigned because the
|
||||
* behavior of signed integer overflow is undefined. */
|
||||
uint64_t ullTickCount = 0ULL;
|
||||
|
||||
/* Silence warnings about unused parameters. */
|
||||
( void ) clock_id;
|
||||
|
||||
/* Get the current tick count and overflow count. vTaskSetTimeOutState()
|
||||
* is used to get these values because they are both static in tasks.c. */
|
||||
vTaskSetTimeOutState( &xCurrentTime );
|
||||
|
||||
/* Adjust the tick count for the number of times a TickType_t has overflowed.
|
||||
* portMAX_DELAY should be the maximum value of a TickType_t. */
|
||||
ullTickCount = ( uint64_t ) ( xCurrentTime.xOverflowCount ) << ( sizeof( TickType_t ) * 8 );
|
||||
|
||||
/* Add the current tick count. */
|
||||
ullTickCount += xCurrentTime.xTimeOnEntering;
|
||||
|
||||
/* Convert ullTickCount to timespec. */
|
||||
UTILS_NanosecondsToTimespec( ( int64_t ) ullTickCount * NANOSECONDS_PER_TICK, tp );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
int clock_nanosleep( clockid_t clock_id,
|
||||
int flags,
|
||||
const struct timespec * rqtp,
|
||||
struct timespec * rmtp )
|
||||
{
|
||||
int iStatus = 0;
|
||||
TickType_t xSleepTime = 0;
|
||||
struct timespec xCurrentTime = { 0 };
|
||||
|
||||
/* Silence warnings about unused parameters. */
|
||||
( void ) clock_id;
|
||||
( void ) rmtp;
|
||||
( void ) flags; /* This is only ignored if INCLUDE_vTaskDelayUntil is 0. */
|
||||
|
||||
/* Check rqtp. */
|
||||
if( UTILS_ValidateTimespec( rqtp ) == false )
|
||||
{
|
||||
iStatus = EINVAL;
|
||||
}
|
||||
|
||||
/* Get current time */
|
||||
if( ( iStatus == 0 ) && ( clock_gettime( CLOCK_REALTIME, &xCurrentTime ) != 0 ) )
|
||||
{
|
||||
iStatus = EINVAL;
|
||||
}
|
||||
|
||||
if( iStatus == 0 )
|
||||
{
|
||||
/* Check for absolute time sleep. */
|
||||
if( ( flags & TIMER_ABSTIME ) == TIMER_ABSTIME )
|
||||
{
|
||||
/* Get current time */
|
||||
if( clock_gettime( CLOCK_REALTIME, &xCurrentTime ) != 0 )
|
||||
{
|
||||
iStatus = EINVAL;
|
||||
}
|
||||
|
||||
/* Get number of ticks until absolute time. */
|
||||
if( ( iStatus == 0 ) && ( UTILS_AbsoluteTimespecToDeltaTicks( rqtp, &xCurrentTime, &xSleepTime ) == 0 ) )
|
||||
{
|
||||
/* Delay until absolute time if vTaskDelayUntil is available. */
|
||||
#if ( INCLUDE_vTaskDelayUntil == 1 )
|
||||
|
||||
/* Get the current tick count. This variable isn't declared
|
||||
* at the top of the function because it's only used and needed
|
||||
* if vTaskDelayUntil is available. */
|
||||
TickType_t xCurrentTicks = xTaskGetTickCount();
|
||||
|
||||
/* Delay until absolute time. */
|
||||
vTaskDelayUntil( &xCurrentTicks, xSleepTime );
|
||||
#else
|
||||
|
||||
/* If vTaskDelayUntil isn't available, ignore the TIMER_ABSTIME flag
|
||||
* and sleep for a relative time. */
|
||||
vTaskDelay( xSleepTime );
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* If TIMER_ABSTIME isn't specified, convert rqtp to ticks and
|
||||
* sleep for a relative time. */
|
||||
if( UTILS_TimespecToTicks( rqtp, &xSleepTime ) == 0 )
|
||||
{
|
||||
vTaskDelay( xSleepTime );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return iStatus;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
int clock_settime( clockid_t clock_id,
|
||||
const struct timespec * tp )
|
||||
{
|
||||
/* Silence warnings about unused parameters. */
|
||||
( void ) clock_id;
|
||||
( void ) tp;
|
||||
|
||||
/* This function is currently unsupported. It will always return -1 and
|
||||
* set errno to EPERM. */
|
||||
errno = EPERM;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
int nanosleep( const struct timespec * rqtp,
|
||||
struct timespec * rmtp )
|
||||
{
|
||||
int iStatus = 0;
|
||||
TickType_t xSleepTime = 0;
|
||||
|
||||
/* Silence warnings about unused parameters. */
|
||||
( void ) rmtp;
|
||||
|
||||
/* Check rqtp. */
|
||||
if( UTILS_ValidateTimespec( rqtp ) == false )
|
||||
{
|
||||
errno = EINVAL;
|
||||
iStatus = -1;
|
||||
}
|
||||
|
||||
if( iStatus == 0 )
|
||||
{
|
||||
/* Convert rqtp to ticks and delay. */
|
||||
if( UTILS_TimespecToTicks( rqtp, &xSleepTime ) == 0 )
|
||||
{
|
||||
vTaskDelay( xSleepTime );
|
||||
}
|
||||
}
|
||||
|
||||
return iStatus;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user