Added better DMA, images files, results, for ZCu106 10G

main
FPGALover 2023-10-20 21:33:05 -07:00
parent fc03ac055e
commit 82e0d5b905
173 changed files with 166790 additions and 9331 deletions

View File

@ -0,0 +1,11 @@
#Virtual Providers
#defconfigs
UBOOT_DEFAULT_DEFCONFIG="xilinx_zynqmp_virt_defconfig"
#atf
CONFIG_SUBSYSTEM_PRELOADED_BL33_BASE=0x10080000

View File

@ -0,0 +1,22 @@
#/etc/inetd.conf: see inetd(8) for further informations.
#
# Internet server configuration database
#
# If you want to disable an entry so it isn't touched during
# package updates just comment it out with a single '#' character.
#
# <service_name> <sock_type> <proto> <flags> <user> <server_path> <args>
#
#:INTERNAL: Internal services
#echo stream tcp nowait root internal
#echo dgram udp wait root internal
#chargen stream tcp nowait root internal
#chargen dgram udp wait root internal
#discard stream tcp nowait root internal
#discard dgram udp wait root internal
#daytime stream tcp nowait root internal
#daytime dgram udp wait root internal
#time stream tcp nowait root internal
#time dgram udp wait root internal
telnet stream tcp nowait root telnetd telnetd -i
ftp stream tcp nowait root ftpd ftpd -w

View File

@ -0,0 +1,304 @@
#
# Automatically generated file; DO NOT EDIT.
# misc/config System Configuration
#
CONFIG_SUBSYSTEM_TYPE_LINUX=y
CONFIG_SYSTEM_ZYNQMP=y
#
# Linux Components Selection
#
CONFIG_SUBSYSTEM_COMPONENT_DEVICE__TREE_NAME_DEVICE__TREE__GENERATOR=y
# CONFIG_SUBSYSTEM_COMPONENT_PRE_FSBL is not set
CONFIG_SUBSYSTEM_COMPONENT_BOOTLOADER_AUTO_FSBL=y
CONFIG_SUBSYSTEM_COMPONENT_BOOTLOADER_NAME_ZYNQMP_FSBL=y
CONFIG_SUBSYSTEM_COMPONENT_BOOTLOADER_AUTO_PS_INIT=y
CONFIG_SUBSYSTEM_COMPONENT_PMU_FIRMWARE=y
CONFIG_SUBSYSTEM_COMPONENT_U__BOOT_NAME_U__BOOT__XLNX=y
# CONFIG_SUBSYSTEM_COMPONENT_U__BOOT_NAME_REMOTE is not set
# CONFIG_SUBSYSTEM_COMPONENT_U__BOOT_NAME_EXT__LOCAL__SRC is not set
CONFIG_SUBSYSTEM_COMPONENT_ARM__TRUSTED__FIRMWARE_NAME_ARM__TRUSTED__FIRMWARE=y
# CONFIG_SUBSYSTEM_COMPONENT_ARM__TRUSTED__FIRMWARE_NAME_REMOTE is not set
# CONFIG_SUBSYSTEM_COMPONENT_ARM__TRUSTED__FIRMWARE_NAME_EXT__LOCAL__SRC is not set
CONFIG_SUBSYSTEM_COMPONENT_LINUX__KERNEL_NAME_LINUX__XLNX=y
# CONFIG_SUBSYSTEM_COMPONENT_LINUX__KERNEL_NAME_REMOTE is not set
# CONFIG_SUBSYSTEM_COMPONENT_LINUX__KERNEL_NAME_EXT__LOCAL__SRC is not set
#
# Auto Config Settings
#
CONFIG_SUBSYSTEM_AUTOCONFIG_DEVICE__TREE=y
# CONFIG_SUBSYSTEM_DEVICE_TREE_MANUAL_INCLUDE is not set
# CONFIG_SUBSYSTEM_AUTOCONFIG_KERNEL is not set
# CONFIG_SUBSYSTEM_AUTOCONFIG_U__BOOT is not set
CONFIG_SUBSYSTEM_HARDWARE_AUTO=y
CONFIG_SUBSYSTEM_PROCESSOR0_IP_NAME="psu_cortexa53_0"
CONFIG_SUBSYSTEM_PROCESSOR_psu_cortexa53_0_SELECT=y
CONFIG_SUBSYSTEM_ARCH_AARCH64=y
#
# Memory Settings
#
CONFIG_SUBSYSTEM_MEMORY_PSU_DDR_0_BANKLESS_SELECT=y
# CONFIG_SUBSYSTEM_MEMORY_PSU_DDR_1_BANKLESS_SELECT is not set
# CONFIG_SUBSYSTEM_MEMORY_MANUAL_SELECT is not set
CONFIG_SUBSYSTEM_MEMORY_PSU_DDR_0_BANKLESS_BASEADDR=0x0
CONFIG_SUBSYSTEM_MEMORY_PSU_DDR_0_BANKLESS_SIZE=0x80000000
CONFIG_SUBSYSTEM_MEMORY_PSU_DDR_0_BANKLESS_KERNEL_BASEADDR=0x0
CONFIG_SUBSYSTEM_MEMORY_PSU_DDR_0_BANKLESS_U__BOOT_TEXTBASE_OFFSET=0x100000
CONFIG_SUBSYSTEM_MEMORY_IP_NAME="PSU_DDR_0"
#
# Serial Settings
#
# CONFIG_SUBSYSTEM_PMUFW_SERIAL_PSU_UART_1_SELECT is not set
CONFIG_SUBSYSTEM_PMUFW_SERIAL_PSU_UART_0_SELECT=y
# CONFIG_SUBSYSTEM_PMUFW_SERIAL_MANUAL_SELECT is not set
# CONFIG_SUBSYSTEM_FSBL_SERIAL_PSU_UART_1_SELECT is not set
CONFIG_SUBSYSTEM_FSBL_SERIAL_PSU_UART_0_SELECT=y
# CONFIG_SUBSYSTEM_FSBL_SERIAL_MANUAL_SELECT is not set
# CONFIG_SUBSYSTEM_ATF_SERIAL_PSU_UART_1_SELECT is not set
CONFIG_SUBSYSTEM_ATF_SERIAL_PSU_UART_0_SELECT=y
# CONFIG_SUBSYSTEM_ATF_SERIAL_MANUAL_SELECT is not set
# CONFIG_SUBSYSTEM_SERIAL_PSU_UART_1_SELECT is not set
CONFIG_SUBSYSTEM_SERIAL_PSU_UART_0_SELECT=y
# CONFIG_SUBSYSTEM_SERIAL_MANUAL_SELECT is not set
# CONFIG_SUBSYSTEM_SERIAL_PSU_UART_1_BAUDRATE_600 is not set
# CONFIG_SUBSYSTEM_SERIAL_PSU_UART_1_BAUDRATE_9600 is not set
# CONFIG_SUBSYSTEM_SERIAL_PSU_UART_1_BAUDRATE_28800 is not set
CONFIG_SUBSYSTEM_SERIAL_PSU_UART_1_BAUDRATE_115200=y
# CONFIG_SUBSYSTEM_SERIAL_PSU_UART_1_BAUDRATE_230400 is not set
# CONFIG_SUBSYSTEM_SERIAL_PSU_UART_1_BAUDRATE_460800 is not set
# CONFIG_SUBSYSTEM_SERIAL_PSU_UART_1_BAUDRATE_921600 is not set
# CONFIG_SUBSYSTEM_SERIAL_PSU_UART_0_BAUDRATE_600 is not set
# CONFIG_SUBSYSTEM_SERIAL_PSU_UART_0_BAUDRATE_9600 is not set
# CONFIG_SUBSYSTEM_SERIAL_PSU_UART_0_BAUDRATE_28800 is not set
CONFIG_SUBSYSTEM_SERIAL_PSU_UART_0_BAUDRATE_115200=y
# CONFIG_SUBSYSTEM_SERIAL_PSU_UART_0_BAUDRATE_230400 is not set
# CONFIG_SUBSYSTEM_SERIAL_PSU_UART_0_BAUDRATE_460800 is not set
# CONFIG_SUBSYSTEM_SERIAL_PSU_UART_0_BAUDRATE_921600 is not set
CONFIG_SUBSYSTEM_SERIAL_PMUFW_IP_NAME="psu_uart_0"
CONFIG_SUBSYSTEM_SERIAL_FSBL_IP_NAME="psu_uart_0"
CONFIG_SUBSYSTEM_SERIAL_ATF_IP_NAME="cadence"
CONFIG_SUBSYSTEM_SERIAL_IP_NAME="psu_uart_0"
#
# Ethernet Settings
#
CONFIG_SUBSYSTEM_ETHERNET_PSU_ETHERNET_3_SELECT=y
# CONFIG_SUBSYSTEM_ETHERNET_MANUAL_SELECT is not set
# CONFIG_SUBSYSTEM_ETHERNET_PSU_ETHERNET_3_MAC_AUTO is not set
CONFIG_SUBSYSTEM_ETHERNET_PSU_ETHERNET_3_MAC="00:0a:35:00:22:01"
CONFIG_SUBSYSTEM_ETHERNET_PSU_ETHERNET_3_USE_DHCP=y
#
# Flash Settings
#
CONFIG_SUBSYSTEM_FLASH_PSU_QSPI_0_BANKLESS_SELECT=y
# CONFIG_SUBSYSTEM_FLASH_MANUAL_SELECT is not set
# CONFIG_SUBSYSTEM_FLASH__ADVANCED_AUTOCONFIG is not set
#
# partition 0
#
CONFIG_SUBSYSTEM_FLASH_PSU_QSPI_0_BANKLESS_PART0_NAME="boot"
CONFIG_SUBSYSTEM_FLASH_PSU_QSPI_0_BANKLESS_PART0_SIZE=0x01e00000
#
# partition 1
#
CONFIG_SUBSYSTEM_FLASH_PSU_QSPI_0_BANKLESS_PART1_NAME="bootenv"
CONFIG_SUBSYSTEM_FLASH_PSU_QSPI_0_BANKLESS_PART1_SIZE=0x40000
#
# partition 2
#
CONFIG_SUBSYSTEM_FLASH_PSU_QSPI_0_BANKLESS_PART2_NAME="kernel"
CONFIG_SUBSYSTEM_FLASH_PSU_QSPI_0_BANKLESS_PART2_SIZE=0x3c00000
#
# partition 3
#
CONFIG_SUBSYSTEM_FLASH_PSU_QSPI_0_BANKLESS_PART3_NAME=""
CONFIG_SUBSYSTEM_FLASH_IP_NAME="psu_qspi_0"
#
# SD/SDIO Settings
#
CONFIG_SUBSYSTEM_PRIMARY_SD_PSU_SD_1_SELECT=y
# CONFIG_SUBSYSTEM_PRIMARY_SD_MANUAL_SELECT is not set
CONFIG_SUBSYSTEM_SD_PSU_SD_1_SELECT=y
#
# RTC Settings
#
CONFIG_SUBSYSTEM_RTC_PSU_RTC_SELECT=y
# CONFIG_SUBSYSTEM_RTC_MANUAL_SELECT is not set
CONFIG_SUBSYSTEM_SATA_PSU_SATA_SELECT=y
CONFIG_SUBSYSTEM_I2C_PSU_I2C_1_SELECT=y
CONFIG_SUBSYSTEM_I2C_PSU_I2C_0_SELECT=y
CONFIG_SUBSYSTEM_USB_PSU_USB_0_SELECT=y
CONFIG_SUBSYSTEM_DP_PSU_DP_SELECT=y
CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG=y
#
# boot image settings
#
# CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_BOOT_MEDIA_FLASH_SELECT is not set
CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_BOOT_MEDIA_SD_SELECT=y
# CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_BOOT_MEDIA_MANUAL_SELECT is not set
CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_BOOT_IMAGE_NAME="BOOT.BIN"
#
# u-boot env partition settings
#
CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_BOOTENV_MEDIA_FLASH_SELECT=y
# CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_BOOTENV_MEDIA_SD_SELECT is not set
# CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_BOOTENV_MEDIA_MANUAL_SELECT is not set
CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_BOOTENV_PART_NAME="bootenv"
#
# kernel image settings
#
# CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_KERNEL_MEDIA_FLASH_SELECT is not set
CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_KERNEL_MEDIA_SD_SELECT=y
# CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_KERNEL_MEDIA_ETHERNET_SELECT is not set
# CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_KERNEL_MEDIA_MANUAL_SELECT is not set
CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_KERNEL_IMAGE_NAME="image.ub"
#
# jffs2 rootfs image settings
#
CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_JFFS2_MEDIA_FLASH_SELECT=y
# CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_JFFS2_MEDIA_MANUAL_SELECT is not set
CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_JFFS2_PART_NAME="jffs2"
CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_JFFS2_IMAGE_NAME="rootfs.jffs2"
#
# dtb image settings
#
CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_DTB_MEDIA_BOOTIMAGE_SELECT=y
# CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_DTB_MEDIA_FLASH_SELECT is not set
# CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_DTB_MEDIA_SD_SELECT is not set
# CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_DTB_MEDIA_ETHERNET_SELECT is not set
# CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_DTB_MEDIA_MANUAL_SELECT is not set
CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_DTB_IMAGE_NAME="system.dtb"
CONFIG_SUBSYSTEM_ENDIAN_LITTLE=y
#
# DTG Settings
#
CONFIG_SUBSYSTEM_MACHINE_NAME="zcu106-reva"
CONFIG_SUBSYSTEM_EXTRA_DT_FILES=""
#
# Kernel Bootargs
#
CONFIG_SUBSYSTEM_BOOTARGS_AUTO=y
CONFIG_SUBSYSTEM_BOOTARGS_EARLYPRINTK=y
CONFIG_SUBSYSTEM_BOOTARGS_GENERATED=" earlycon console=ttyPS0,115200 clk_ignore_unused root=/dev/ram0 rw"
CONFIG_SUBSYSTEM_DEVICETREE_COMPILER_FLAGS="-@"
# CONFIG_SUBSYSTEM_DTB_OVERLAY is not set
# CONFIG_SUBSYSTEM_REMOVE_PL_DTB is not set
#
# PMUFW Configuration
#
CONFIG_SUBSYSTEM_PMUFW_COMPILER_EXTRA_FLAGS=""
#
# FSBL Configuration
#
CONFIG_SUBSYSTEM_FSBL_BSPCOMPILER_FLAGS=""
CONFIG_SUBSYSTEM_FSBL_COMPILER_EXTRA_FLAGS=""
#
# ARM Trusted Firmware Configuration
#
# CONFIG_SUBSYSTEM_ATF_MEMORY_SETTINGS is not set
CONFIG_SUBSYSTEM_ATF_EXTRA_COMPILER_FLAGS=""
CONFIG_SUBSYSTEM_PRELOADED_BL33_BASE=0x10080000
# CONFIG_SUBSYSTEM_ATF_DEBUG is not set
#
# FPGA Manager
#
# CONFIG_SUBSYSTEM_FPGA_MANAGER is not set
#
# u-boot Configuration
#
CONFIG_SUBSYSTEM_UBOOT_CONFIG_TARGET=""
# CONFIG_SUBSYSTEM_UBOOT_EXT_DTB is not set
#
# Linux Configuration
#
CONFIG_SUBSYSTEM_LINUX_CONFIG_TARGET=""
#
# Image Packaging Configuration
#
# CONFIG_SUBSYSTEM_ROOTFS_INITRAMFS is not set
CONFIG_SUBSYSTEM_ROOTFS_INITRD=y
# CONFIG_SUBSYSTEM_ROOTFS_JFFS2 is not set
# CONFIG_SUBSYSTEM_ROOTFS_NFS is not set
# CONFIG_SUBSYSTEM_ROOTFS_EXT4 is not set
# CONFIG_SUBSYSTEM_ROOTFS_OTHER is not set
CONFIG_SUBSYSTEM_INITRD_RAMDISK_LOADADDR=0x0
CONFIG_SUBSYSTEM_INITRAMFS_IMAGE_NAME="petalinux-image-minimal"
CONFIG_SUBSYSTEM_UIMAGE_NAME="image.ub"
CONFIG_SUBSYSTEM_RFS_FORMATS="cpio cpio.gz cpio.gz.u-boot tar.gz jffs2"
CONFIG_SUBSYSTEM_DTB_PADDING_SIZE=0x1000
CONFIG_SUBSYSTEM_COPY_TO_TFTPBOOT=y
CONFIG_SUBSYSTEM_TFTPBOOT_DIR="/tftpboot"
#
# Firmware Version Configuration
#
CONFIG_SUBSYSTEM_HOSTNAME="petalinux-photonic"
CONFIG_SUBSYSTEM_PRODUCT="petalinux-photonic"
CONFIG_SUBSYSTEM_FW_VERSION="1.00"
#
# Yocto Settings
#
CONFIG_YOCTO_MACHINE_NAME="zynqmp-generic"
#
# TMPDIR Location
#
CONFIG_TMP_DIR_LOCATION="${PROOT}/build/tmp"
#
# Devtool Workspace Location
#
CONFIG_DEVTOOL_WORKSPACE_LOCATION="${PROOT}/components/yocto/workspace"
#
# Parallel thread execution
#
CONFIG_YOCTO_BB_NUMBER_THREADS=""
CONFIG_YOCTO_PARALLEL_MAKE=""
#
# Add pre-mirror url
#
CONFIG_PRE_MIRROR_URL="http://petalinux.xilinx.com/sswreleases/rel-v${PETALINUX_VER%%.*}/downloads"
#
# Local sstate feeds settings
#
CONFIG_YOCTO_LOCAL_SSTATE_FEEDS_URL=""
CONFIG_YOCTO_NETWORK_SSTATE_FEEDS=y
#
# Network sstate feeds URL
#
CONFIG_YOCTO_NETWORK_SSTATE_FEEDS_URL="http://petalinux.xilinx.com/sswreleases/rel-v${PETALINUX_VER%%.*}/aarch64/sstate-cache"
# CONFIG_YOCTO_BB_NO_NETWORK is not set
#
# User Layers
#
CONFIG_USER_LAYER_0=""

View File

@ -0,0 +1,305 @@
#
# Automatically generated file; DO NOT EDIT.
# misc/config System Configuration
#
CONFIG_SUBSYSTEM_TYPE_LINUX=y
CONFIG_SYSTEM_ZYNQMP=y
#
# Linux Components Selection
#
CONFIG_SUBSYSTEM_COMPONENT_DEVICE__TREE_NAME_DEVICE__TREE__GENERATOR=y
# CONFIG_SUBSYSTEM_COMPONENT_PRE_FSBL is not set
CONFIG_SUBSYSTEM_COMPONENT_BOOTLOADER_AUTO_FSBL=y
CONFIG_SUBSYSTEM_COMPONENT_BOOTLOADER_NAME_ZYNQMP_FSBL=y
CONFIG_SUBSYSTEM_COMPONENT_BOOTLOADER_AUTO_PS_INIT=y
CONFIG_SUBSYSTEM_COMPONENT_PMU_FIRMWARE=y
CONFIG_SUBSYSTEM_COMPONENT_U__BOOT_NAME_U__BOOT__XLNX=y
# CONFIG_SUBSYSTEM_COMPONENT_U__BOOT_NAME_REMOTE is not set
# CONFIG_SUBSYSTEM_COMPONENT_U__BOOT_NAME_EXT__LOCAL__SRC is not set
CONFIG_SUBSYSTEM_COMPONENT_ARM__TRUSTED__FIRMWARE_NAME_ARM__TRUSTED__FIRMWARE=y
# CONFIG_SUBSYSTEM_COMPONENT_ARM__TRUSTED__FIRMWARE_NAME_REMOTE is not set
# CONFIG_SUBSYSTEM_COMPONENT_ARM__TRUSTED__FIRMWARE_NAME_EXT__LOCAL__SRC is not set
CONFIG_SUBSYSTEM_COMPONENT_LINUX__KERNEL_NAME_LINUX__XLNX=y
# CONFIG_SUBSYSTEM_COMPONENT_LINUX__KERNEL_NAME_REMOTE is not set
# CONFIG_SUBSYSTEM_COMPONENT_LINUX__KERNEL_NAME_EXT__LOCAL__SRC is not set
#
# Auto Config Settings
#
CONFIG_SUBSYSTEM_AUTOCONFIG_DEVICE__TREE=y
# CONFIG_SUBSYSTEM_DEVICE_TREE_MANUAL_INCLUDE is not set
# CONFIG_SUBSYSTEM_AUTOCONFIG_KERNEL is not set
# CONFIG_SUBSYSTEM_AUTOCONFIG_U__BOOT is not set
CONFIG_SUBSYSTEM_HARDWARE_AUTO=y
CONFIG_SUBSYSTEM_PROCESSOR0_IP_NAME="psu_cortexa53_0"
CONFIG_SUBSYSTEM_PROCESSOR_psu_cortexa53_0_SELECT=y
CONFIG_SUBSYSTEM_ARCH_AARCH64=y
#
# Memory Settings
#
CONFIG_SUBSYSTEM_MEMORY_PSU_DDR_0_BANKLESS_SELECT=y
# CONFIG_SUBSYSTEM_MEMORY_PSU_DDR_1_BANKLESS_SELECT is not set
# CONFIG_SUBSYSTEM_MEMORY_MANUAL_SELECT is not set
CONFIG_SUBSYSTEM_MEMORY_PSU_DDR_0_BANKLESS_BASEADDR=0x0
CONFIG_SUBSYSTEM_MEMORY_PSU_DDR_0_BANKLESS_SIZE=0x80000000
CONFIG_SUBSYSTEM_MEMORY_PSU_DDR_0_BANKLESS_KERNEL_BASEADDR=0x0
CONFIG_SUBSYSTEM_MEMORY_PSU_DDR_0_BANKLESS_U__BOOT_TEXTBASE_OFFSET=0x100000
CONFIG_SUBSYSTEM_MEMORY_IP_NAME="PSU_DDR_0"
#
# Serial Settings
#
# CONFIG_SUBSYSTEM_PMUFW_SERIAL_PSU_UART_1_SELECT is not set
CONFIG_SUBSYSTEM_PMUFW_SERIAL_PSU_UART_0_SELECT=y
# CONFIG_SUBSYSTEM_PMUFW_SERIAL_MANUAL_SELECT is not set
# CONFIG_SUBSYSTEM_FSBL_SERIAL_PSU_UART_1_SELECT is not set
CONFIG_SUBSYSTEM_FSBL_SERIAL_PSU_UART_0_SELECT=y
# CONFIG_SUBSYSTEM_FSBL_SERIAL_MANUAL_SELECT is not set
# CONFIG_SUBSYSTEM_ATF_SERIAL_PSU_UART_1_SELECT is not set
CONFIG_SUBSYSTEM_ATF_SERIAL_PSU_UART_0_SELECT=y
# CONFIG_SUBSYSTEM_ATF_SERIAL_MANUAL_SELECT is not set
# CONFIG_SUBSYSTEM_SERIAL_PSU_UART_1_SELECT is not set
CONFIG_SUBSYSTEM_SERIAL_PSU_UART_0_SELECT=y
# CONFIG_SUBSYSTEM_SERIAL_MANUAL_SELECT is not set
# CONFIG_SUBSYSTEM_SERIAL_PSU_UART_1_BAUDRATE_600 is not set
# CONFIG_SUBSYSTEM_SERIAL_PSU_UART_1_BAUDRATE_9600 is not set
# CONFIG_SUBSYSTEM_SERIAL_PSU_UART_1_BAUDRATE_28800 is not set
CONFIG_SUBSYSTEM_SERIAL_PSU_UART_1_BAUDRATE_115200=y
# CONFIG_SUBSYSTEM_SERIAL_PSU_UART_1_BAUDRATE_230400 is not set
# CONFIG_SUBSYSTEM_SERIAL_PSU_UART_1_BAUDRATE_460800 is not set
# CONFIG_SUBSYSTEM_SERIAL_PSU_UART_1_BAUDRATE_921600 is not set
# CONFIG_SUBSYSTEM_SERIAL_PSU_UART_0_BAUDRATE_600 is not set
# CONFIG_SUBSYSTEM_SERIAL_PSU_UART_0_BAUDRATE_9600 is not set
# CONFIG_SUBSYSTEM_SERIAL_PSU_UART_0_BAUDRATE_28800 is not set
CONFIG_SUBSYSTEM_SERIAL_PSU_UART_0_BAUDRATE_115200=y
# CONFIG_SUBSYSTEM_SERIAL_PSU_UART_0_BAUDRATE_230400 is not set
# CONFIG_SUBSYSTEM_SERIAL_PSU_UART_0_BAUDRATE_460800 is not set
# CONFIG_SUBSYSTEM_SERIAL_PSU_UART_0_BAUDRATE_921600 is not set
CONFIG_SUBSYSTEM_SERIAL_PMUFW_IP_NAME="psu_uart_0"
CONFIG_SUBSYSTEM_SERIAL_FSBL_IP_NAME="psu_uart_0"
CONFIG_SUBSYSTEM_SERIAL_ATF_IP_NAME="cadence"
CONFIG_SUBSYSTEM_SERIAL_IP_NAME="psu_uart_0"
#
# Ethernet Settings
#
CONFIG_SUBSYSTEM_ETHERNET_PSU_ETHERNET_3_SELECT=y
# CONFIG_SUBSYSTEM_ETHERNET_MANUAL_SELECT is not set
# CONFIG_SUBSYSTEM_ETHERNET_PSU_ETHERNET_3_MAC_AUTO is not set
CONFIG_SUBSYSTEM_ETHERNET_PSU_ETHERNET_3_MAC="00:0a:35:00:22:01"
CONFIG_SUBSYSTEM_ETHERNET_PSU_ETHERNET_3_USE_DHCP=y
#
# Flash Settings
#
CONFIG_SUBSYSTEM_FLASH_PSU_QSPI_0_BANKLESS_SELECT=y
# CONFIG_SUBSYSTEM_FLASH_MANUAL_SELECT is not set
# CONFIG_SUBSYSTEM_FLASH__ADVANCED_AUTOCONFIG is not set
#
# partition 0
#
CONFIG_SUBSYSTEM_FLASH_PSU_QSPI_0_BANKLESS_PART0_NAME="boot"
CONFIG_SUBSYSTEM_FLASH_PSU_QSPI_0_BANKLESS_PART0_SIZE=0x01e00000
#
# partition 1
#
CONFIG_SUBSYSTEM_FLASH_PSU_QSPI_0_BANKLESS_PART1_NAME="bootenv"
CONFIG_SUBSYSTEM_FLASH_PSU_QSPI_0_BANKLESS_PART1_SIZE=0x40000
#
# partition 2
#
CONFIG_SUBSYSTEM_FLASH_PSU_QSPI_0_BANKLESS_PART2_NAME="kernel"
CONFIG_SUBSYSTEM_FLASH_PSU_QSPI_0_BANKLESS_PART2_SIZE=0x3c00000
#
# partition 3
#
CONFIG_SUBSYSTEM_FLASH_PSU_QSPI_0_BANKLESS_PART3_NAME=""
CONFIG_SUBSYSTEM_FLASH_IP_NAME="psu_qspi_0"
#
# SD/SDIO Settings
#
CONFIG_SUBSYSTEM_PRIMARY_SD_PSU_SD_1_SELECT=y
# CONFIG_SUBSYSTEM_PRIMARY_SD_MANUAL_SELECT is not set
CONFIG_SUBSYSTEM_SD_PSU_SD_1_SELECT=y
#
# RTC Settings
#
CONFIG_SUBSYSTEM_RTC_PSU_RTC_SELECT=y
# CONFIG_SUBSYSTEM_RTC_MANUAL_SELECT is not set
CONFIG_SUBSYSTEM_SATA_PSU_SATA_SELECT=y
CONFIG_SUBSYSTEM_I2C_PSU_I2C_1_SELECT=y
CONFIG_SUBSYSTEM_I2C_PSU_I2C_0_SELECT=y
CONFIG_SUBSYSTEM_USB_PSU_USB_0_SELECT=y
CONFIG_SUBSYSTEM_DP_PSU_DP_SELECT=y
CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG=y
#
# boot image settings
#
# CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_BOOT_MEDIA_FLASH_SELECT is not set
CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_BOOT_MEDIA_SD_SELECT=y
# CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_BOOT_MEDIA_MANUAL_SELECT is not set
CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_BOOT_IMAGE_NAME="BOOT.BIN"
#
# u-boot env partition settings
#
CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_BOOTENV_MEDIA_FLASH_SELECT=y
# CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_BOOTENV_MEDIA_SD_SELECT is not set
# CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_BOOTENV_MEDIA_MANUAL_SELECT is not set
CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_BOOTENV_PART_NAME="bootenv"
#
# kernel image settings
#
# CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_KERNEL_MEDIA_FLASH_SELECT is not set
CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_KERNEL_MEDIA_SD_SELECT=y
# CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_KERNEL_MEDIA_ETHERNET_SELECT is not set
# CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_KERNEL_MEDIA_MANUAL_SELECT is not set
CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_KERNEL_IMAGE_NAME="image.ub"
#
# jffs2 rootfs image settings
#
CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_JFFS2_MEDIA_FLASH_SELECT=y
# CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_JFFS2_MEDIA_MANUAL_SELECT is not set
CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_JFFS2_PART_NAME="jffs2"
CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_JFFS2_IMAGE_NAME="rootfs.jffs2"
#
# dtb image settings
#
CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_DTB_MEDIA_BOOTIMAGE_SELECT=y
# CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_DTB_MEDIA_FLASH_SELECT is not set
# CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_DTB_MEDIA_SD_SELECT is not set
# CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_DTB_MEDIA_ETHERNET_SELECT is not set
# CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_DTB_MEDIA_MANUAL_SELECT is not set
CONFIG_SUBSYSTEM_IMAGES_ADVANCED_AUTOCONFIG_DTB_IMAGE_NAME="system.dtb"
CONFIG_SUBSYSTEM_ENDIAN_LITTLE=y
#
# DTG Settings
#
CONFIG_SUBSYSTEM_MACHINE_NAME="zcu106-reva"
CONFIG_SUBSYSTEM_EXTRA_DT_FILES=""
#
# Kernel Bootargs
#
CONFIG_SUBSYSTEM_BOOTARGS_AUTO=y
CONFIG_SUBSYSTEM_BOOTARGS_EARLYPRINTK=y
CONFIG_SUBSYSTEM_DEVICETREE_COMPILER_FLAGS="-@"
# CONFIG_SUBSYSTEM_DTB_OVERLAY is not set
# CONFIG_SUBSYSTEM_REMOVE_PL_DTB is not set
#
# PMUFW Configuration
#
CONFIG_SUBSYSTEM_PMUFW_COMPILER_EXTRA_FLAGS=""
#
# FSBL Configuration
#
CONFIG_SUBSYSTEM_FSBL_BSPCOMPILER_FLAGS=""
CONFIG_SUBSYSTEM_FSBL_COMPILER_EXTRA_FLAGS=""
#
# ARM Trusted Firmware Configuration
#
# CONFIG_SUBSYSTEM_ATF_MEMORY_SETTINGS is not set
CONFIG_SUBSYSTEM_ATF_EXTRA_COMPILER_FLAGS=""
CONFIG_SUBSYSTEM_PRELOADED_BL33_BASE=0x10080000
# CONFIG_SUBSYSTEM_ATF_DEBUG is not set
#
# FPGA Manager
#
# CONFIG_SUBSYSTEM_FPGA_MANAGER is not set
#
# u-boot Configuration
#
CONFIG_SUBSYSTEM_UBOOT_CONFIG_TARGET=""
# CONFIG_SUBSYSTEM_UBOOT_EXT_DTB is not set
#
# Linux Configuration
#
CONFIG_SUBSYSTEM_LINUX_CONFIG_TARGET=""
#
# Image Packaging Configuration
#
# CONFIG_SUBSYSTEM_ROOTFS_INITRAMFS is not set
CONFIG_SUBSYSTEM_ROOTFS_INITRD=y
# CONFIG_SUBSYSTEM_ROOTFS_JFFS2 is not set
# CONFIG_SUBSYSTEM_ROOTFS_NFS is not set
# CONFIG_SUBSYSTEM_ROOTFS_EXT4 is not set
# CONFIG_SUBSYSTEM_ROOTFS_OTHER is not set
CONFIG_SUBSYSTEM_INITRD_RAMDISK_LOADADDR=0x0
CONFIG_SUBSYSTEM_INITRAMFS_IMAGE_NAME="petalinux-image-minimal"
CONFIG_SUBSYSTEM_UIMAGE_NAME="image.ub"
CONFIG_SUBSYSTEM_RFS_FORMATS="cpio cpio.gz cpio.gz.u-boot tar.gz jffs2"
CONFIG_SUBSYSTEM_DTB_PADDING_SIZE=0x1000
CONFIG_SUBSYSTEM_COPY_TO_TFTPBOOT=y
CONFIG_SUBSYSTEM_TFTPBOOT_DIR="/tftpboot"
#
# Firmware Version Configuration
#
CONFIG_SUBSYSTEM_HOSTNAME="petalinux-photonic"
CONFIG_SUBSYSTEM_PRODUCT="petalinux-photonic"
CONFIG_SUBSYSTEM_FW_VERSION="1.00"
#
# Yocto Settings
#
CONFIG_YOCTO_MACHINE_NAME="zynqmp-generic"
#
# TMPDIR Location
#
CONFIG_TMP_DIR_LOCATION="${PROOT}/build/tmp"
#
# Devtool Workspace Location
#
CONFIG_DEVTOOL_WORKSPACE_LOCATION="${PROOT}/components/yocto/workspace"
#
# Parallel thread execution
#
CONFIG_YOCTO_BB_NUMBER_THREADS=""
CONFIG_YOCTO_PARALLEL_MAKE=""
#
# Add pre-mirror url
#
CONFIG_PRE_MIRROR_URL="http://petalinux.xilinx.com/sswreleases/rel-v${PETALINUX_VER%%.*}/downloads"
#
# Local sstate feeds settings
#
CONFIG_YOCTO_LOCAL_SSTATE_FEEDS_URL=""
CONFIG_YOCTO_NETWORK_SSTATE_FEEDS=y
#
# Network sstate feeds URL
#
CONFIG_YOCTO_NETWORK_SSTATE_FEEDS_URL="http://petalinux.xilinx.com/sswreleases/rel-v${PETALINUX_VER%%.*}/aarch64/sstate-cache"
# CONFIG_YOCTO_BB_NO_NETWORK is not set
#
# User Layers
#
CONFIG_USER_LAYER_0=""
CONFIG_SUBSYSTEM_BOOTARGS_GENERATED=" earlycon console=ttyPS0,115200 clk_ignore_unused root=/dev/ram0 rw"

View File

@ -0,0 +1,31 @@
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
# The loopback interface
auto lo
iface lo inet loopback
# Wireless interfaces
iface wlan0 inet dhcp
wireless_mode managed
wireless_essid any
wpa-driver wext
wpa-conf /etc/wpa_supplicant.conf
iface atml0 inet dhcp
# Wired or wireless interfaces
auto eth0
iface eth0 inet dhcp
iface eth1 inet dhcp
# Ethernet/RNDIS gadget (g_ether)
# ... or on host side, usbnet and random hwaddr
iface usb0 inet static
address 192.168.7.2
netmask 255.255.255.0
network 192.168.7.0
gateway 192.168.7.1
# Bluetooth networking
iface bnep0 inet dhcp

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,17 @@
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.

View File

@ -0,0 +1,64 @@
This README file contains information on the contents of the
meta-user layer.
Please see the corresponding sections below for details.
Dependencies
============
This layer depends on:
URI: git://git.openembedded.org/bitbake
branch: master
URI: git://git.openembedded.org/openembedded-core
layers: meta
branch: master
URI: git://git.yoctoproject.org/xxxx
layers: xxxx
branch: master
Patches
=======
Please submit any patches against the meta-user layer to the
xxxx mailing list (xxxx@zzzz.org) and cc: the maintainer:
Maintainer: XXX YYYYYY <xxx.yyyyyy@zzzzz.com>
Table of Contents
=================
I. Adding the meta-user layer to your build
II. Misc
I. Adding the meta-user layer to your build
=================================================
--- replace with specific instructions for the meta-user layer ---
In order to use this layer, you need to make the build system aware of
it.
Assuming the meta-user layer exists at the top-level of your
yocto build tree, you can add it to the build system by adding the
location of the meta-user layer to bblayers.conf, along with any
other layers needed. e.g.:
BBLAYERS ?= " \
/path/to/yocto/meta \
/path/to/yocto/meta-poky \
/path/to/yocto/meta-yocto-bsp \
/path/to/yocto/meta-meta-user \
"
II. Misc
========
--- replace with specific information about the meta-user layer ---

View File

@ -0,0 +1,11 @@
# We have a conf and classes directory, add to BBPATH
BBPATH .= ":${LAYERDIR}"
# We have recipes-* directories, add to BBFILES
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS += "meta-user"
BBFILE_PATTERN_meta-user = "^${LAYERDIR}/"
BBFILE_PRIORITY_meta-user = "6"
LAYERSERIES_COMPAT_meta-user = "zeus"

View File

@ -0,0 +1,5 @@
#User Configuration
#OE_TERMINAL = "tmux"
IMAGE_BOOT_FILES_zynqmp = "BOOT.BIN boot.scr Image rootfs.cpio.gz.u-boot"

View File

@ -0,0 +1,11 @@
#Note: Mention Each package in individual line
#These packages will get added into rootfs menu entry
CONFIG_gpio-demo
CONFIG_peekpoke
CONFIG_myapp-init
CONFIG_iperf3
CONFIG_ethtool
CONFIG_phytool

View File

@ -0,0 +1,14 @@
APP = gpio-demo
# Add any other object files to this list below
APP_OBJS = gpio-demo.o
all: $(APP)
$(APP): $(APP_OBJS)
$(CC) $(LDFLAGS) -o $@ $(APP_OBJS) $(LDLIBS)
clean:
-rm -f $(APP) *.elf *.gdb *.o

View File

@ -0,0 +1,355 @@
/*
*
* gpio-demo app
*
* Copyright (C) 2013 - 2016 Xilinx, Inc. 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 XILINX 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.
*
* Except as contained in this notice, the name of the Xilinx shall not be used
* in advertising or otherwise to promote the sale, use or other dealings in this
* Software without prior written authorization from Xilinx.
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
#include <signal.h>
#define GPIO_ROOT "/sys/class/gpio"
#define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0]))
static enum {NONE, IN, OUT, CYLON, KIT} gpio_opt = NONE;
static const unsigned long cylon[] = {
0x00000080, 0x00000040, 0x00000020, 0x00000010,
0x00000008, 0x00000004, 0x00000002, 0x00000001,
0x00000002, 0x00000004, 0x00000008,
0x00000010, 0x00000020, 0x00000040, 0x00000080,
};
static const unsigned long kit[] = {
0x000000e0, 0x00000070, 0x00000038, 0x0000001c,
0x0000000e, 0x00000007, 0x00000003, 0x00000001,
0x00000003, 0x00000007, 0x0000000e,
0x0000001c, 0x00000038, 0x00000070, 0x000000e0,
};
static int gl_gpio_base = 0;
static void usage (char *argv0)
{
char *basename = strrchr(argv0, '/');
if (!basename)
basename = argv0;
fprintf(stderr,
"Usage: %s [-g GPIO_BASE] COMMAND\n"
"\twhere COMMAND is one of:\n"
"\t\t-i\t\tInput value from GPIO and print it\n"
"\t\t-o\tVALUE\tOutput value to GPIO\n"
"\t\t-c\t\tCylon test pattern\n"
"\t\t-k\t\t KIT test pattern\n"
"\tGPIO_BASE indicates which GPIO chip to talk to (The number can be \n"
"\tfound at /sys/class/gpio/gpiochipN).\n"
"\tThe highest gpiochipN is the first gpio listed in the dts file, \n"
"\tand the lowest gpiochipN is the last gpio listed in the dts file.\n"
"\tE.g.If the gpiochip240 is the LED_8bit gpio, and I want to output '1' \n"
"\tto the LED_8bit gpio, the command should be:\n"
"\t\tgpio-demo -g 240 -o 1\n"
"\n"
"\tgpio-demo written by Xilinx Inc.\n"
"\n"
, basename);
exit(-2);
}
static int open_gpio_channel(int gpio_base)
{
char gpio_nchan_file[128];
int gpio_nchan_fd;
int gpio_max;
int nchannel;
char nchannel_str[5];
char *cptr;
int c;
char channel_str[5];
char *gpio_export_file = "/sys/class/gpio/export";
int export_fd=0;
/* Check how many channels the GPIO chip has */
sprintf(gpio_nchan_file, "%s/gpiochip%d/ngpio", GPIO_ROOT, gpio_base);
gpio_nchan_fd = open(gpio_nchan_file, O_RDONLY);
if (gpio_nchan_fd < 0) {
fprintf(stderr, "Failed to open %s: %s\n", gpio_nchan_file, strerror(errno));
return -1;
}
read(gpio_nchan_fd, nchannel_str, sizeof(nchannel_str));
close(gpio_nchan_fd);
nchannel=(int)strtoul(nchannel_str, &cptr, 0);
if (cptr == nchannel_str) {
fprintf(stderr, "Failed to change %s into GPIO channel number\n", nchannel_str);
exit(1);
}
/* Open files for each GPIO channel */
export_fd=open(gpio_export_file, O_WRONLY);
if (export_fd < 0) {
fprintf(stderr, "Cannot open GPIO to export %d\n", gpio_base);
return -1;
}
gpio_max = gpio_base + nchannel;
for(c = gpio_base; c < gpio_max; c++) {
sprintf(channel_str, "%d", c);
write(export_fd, channel_str, (strlen(channel_str)+1));
}
close(export_fd);
return nchannel;
}
static int close_gpio_channel(int gpio_base)
{
char gpio_nchan_file[128];
int gpio_nchan_fd;
int gpio_max;
int nchannel;
char nchannel_str[5];
char *cptr;
int c;
char channel_str[5];
char *gpio_unexport_file = "/sys/class/gpio/unexport";
int unexport_fd=0;
/* Check how many channels the GPIO chip has */
sprintf(gpio_nchan_file, "%s/gpiochip%d/ngpio", GPIO_ROOT, gpio_base);
gpio_nchan_fd = open(gpio_nchan_file, O_RDONLY);
if (gpio_nchan_fd < 0) {
fprintf(stderr, "Failed to open %s: %s\n", gpio_nchan_file, strerror(errno));
return -1;
}
read(gpio_nchan_fd, nchannel_str, sizeof(nchannel_str));
close(gpio_nchan_fd);
nchannel=(int)strtoul(nchannel_str, &cptr, 0);
if (cptr == nchannel_str) {
fprintf(stderr, "Failed to change %s into GPIO channel number\n", nchannel_str);
exit(1);
}
/* Close opened files for each GPIO channel */
unexport_fd=open(gpio_unexport_file, O_WRONLY);
if (unexport_fd < 0) {
fprintf(stderr, "Cannot close GPIO by writing unexport %d\n", gpio_base);
return -1;
}
gpio_max = gpio_base + nchannel;
for(c = gpio_base; c < gpio_max; c++) {
sprintf(channel_str, "%d", c);
write(unexport_fd, channel_str, (strlen(channel_str)+1));
}
close(unexport_fd);
return 0;
}
static int set_gpio_direction(int gpio_base, int nchannel, char *direction)
{
char gpio_dir_file[128];
int direction_fd=0;
int gpio_max;
int c;
gpio_max = gpio_base + nchannel;
for(c = gpio_base; c < gpio_max; c++) {
sprintf(gpio_dir_file, "/sys/class/gpio/gpio%d/direction",c);
direction_fd=open(gpio_dir_file, O_RDWR);
if (direction_fd < 0) {
fprintf(stderr, "Cannot open the direction file for GPIO %d\n", c);
return 1;
}
write(direction_fd, direction, (strlen(direction)+1));
close(direction_fd);
}
return 0;
}
static int set_gpio_value(int gpio_base, int nchannel, int value)
{
char gpio_val_file[128];
int val_fd=0;
int gpio_max;
char val_str[2];
int c;
gpio_max = gpio_base + nchannel;
for(c = gpio_base; c < gpio_max; c++) {
sprintf(gpio_val_file, "/sys/class/gpio/gpio%d/value",c);
val_fd=open(gpio_val_file, O_RDWR);
if (val_fd < 0) {
fprintf(stderr, "Cannot open the value file of GPIO %d\n", c);
return -1;
}
sprintf(val_str,"%d", (value & 1));
write(val_fd, val_str, sizeof(val_str));
close(val_fd);
value >>= 1;
}
return 0;
}
static int get_gpio_value(int gpio_base, int nchannel)
{
char gpio_val_file[128];
int val_fd=0;
int gpio_max;
char val_str[2];
char *cptr;
int value = 0;
int c;
gpio_max = gpio_base + nchannel;
for(c = gpio_max-1; c >= gpio_base; c--) {
sprintf(gpio_val_file, "/sys/class/gpio/gpio%d/value",c);
val_fd=open(gpio_val_file, O_RDWR);
if (val_fd < 0) {
fprintf(stderr, "Cannot open GPIO to export %d\n", c);
return -1;
}
read(val_fd, val_str, sizeof(val_str));
value <<= 1;
value += (int)strtoul(val_str, &cptr, 0);
if (cptr == optarg) {
fprintf(stderr, "Failed to change %s into integer", val_str);
}
close(val_fd);
}
return value;
}
void signal_handler(int sig)
{
switch (sig) {
case SIGTERM:
case SIGHUP:
case SIGQUIT:
case SIGINT:
close_gpio_channel(gl_gpio_base);
exit(0) ;
default:
break;
}
}
int main(int argc, char *argv[])
{
extern char *optarg;
char *cptr;
int gpio_value = 0;
int nchannel = 0;
int c;
int i;
opterr = 0;
while ((c = getopt(argc, argv, "g:io:ck")) != -1) {
switch (c) {
case 'g':
gl_gpio_base = (int)strtoul(optarg, &cptr, 0);
if (cptr == optarg)
usage(argv[0]);
break;
case 'i':
gpio_opt = IN;
break;
case 'o':
gpio_opt = OUT;
gpio_value = (int)strtoul(optarg, &cptr, 0);
if (cptr == optarg)
usage(argv[0]);
break;
case 'c':
gpio_opt = CYLON;
break;
case 'k':
gpio_opt = KIT;
break;
case '?':
usage(argv[0]);
default:
usage(argv[0]);
}
}
if (gl_gpio_base == 0) {
usage(argv[0]);
}
nchannel = open_gpio_channel(gl_gpio_base);
signal(SIGTERM, signal_handler); /* catch kill signal */
signal(SIGHUP, signal_handler); /* catch hang up signal */
signal(SIGQUIT, signal_handler); /* catch quit signal */
signal(SIGINT, signal_handler); /* catch a CTRL-c signal */
switch (gpio_opt) {
case IN:
set_gpio_direction(gl_gpio_base, nchannel, "in");
gpio_value=get_gpio_value(gl_gpio_base, nchannel);
fprintf(stdout,"0x%08X\n", gpio_value);
break;
case OUT:
set_gpio_direction(gl_gpio_base, nchannel, "out");
set_gpio_value(gl_gpio_base, nchannel, gpio_value);
break;
case CYLON:
#define CYLON_DELAY_USECS (10000)
set_gpio_direction(gl_gpio_base, nchannel, "out");
for (;;) {
for(i=0; i < ARRAY_SIZE(cylon); i++) {
gpio_value=(int)cylon[i];
set_gpio_value(gl_gpio_base, nchannel, gpio_value);
}
usleep(CYLON_DELAY_USECS);
}
case KIT:
#define KIT_DELAY_USECS (10000)
set_gpio_direction(gl_gpio_base, nchannel, "out");
for (;;) {
for (i=0; i<ARRAY_SIZE(kit); i++) {
gpio_value=(int)kit[i];
set_gpio_value(gl_gpio_base, nchannel, gpio_value);
}
usleep(KIT_DELAY_USECS);
}
default:
break;
}
close_gpio_channel(gl_gpio_base);
return 0;
}

View File

@ -0,0 +1,23 @@
#
# This is the GPIO-DEMO apllication recipe
#
#
SUMMARY = "gpio-demo application"
SECTION = "PETALINUX/apps"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
SRC_URI = "file://gpio-demo.c \
file://Makefile \
"
S = "${WORKDIR}"
CFLAGS_prepend = "-I ${S}/include"
do_compile() {
oe_runmake
}
do_install() {
install -d ${D}${bindir}
install -m 0755 ${S}/gpio-demo ${D}${bindir}
}

View File

@ -0,0 +1,3 @@
# Load the PetaLinux SDK main gdbinit script
source plnx_gdbinit

View File

@ -0,0 +1,30 @@
PetaLinux User Application Template
===================================
This directory contains a PetaLinux user application created from a template.
You can easily import any already built application or script by copying
it into this directory, and editing the automatically generated Makefile
as described below.
Modify the "install:" target in Makefile to use $(TARGETINST) to install your
prebuilt application or script to the host copy of the target file system
referring to the comments of the "install:" target.
Before building the application, you will need to enable the application
from PetaLinux menuconfig by running:
"petalinux-config -c rootfs"
You will see your application in the "apps --->" submenu.
To install your prebuilt application or script to the target file system
copy on the host, simply run the command.
"petalinux-build -c rootfs/myapp-init"
You will also need to rebuild PetaLinux bootable images so that the images
is updated with the updated target filesystem copy, run this command:
"petalinux-build -c rootfs"
You can also run one PetaLinux command to install the application to the
target filesystem host copy and update the bootable images as follows:
"petalinux-build"

View File

@ -0,0 +1,5 @@
#!/bin/sh
echo "booting from sd card, in myapp"
cd /mnt/sd-mmcblk0p1
./startup_script.cmd

View File

@ -0,0 +1,63 @@
#!/bin/sh
echo "Hello PetaLinux World This is an example startup script, ver 4"
reset_counters() {
# Read the file into an associative array
declare -A counters
while read line; do
# Split the line into key and value
key=$(echo "$line" | cut -d= -f1)
value=$(echo "$line" | cut -d= -f2)
# Store the key-value pair in the array
counters["$key"]=$value
done < counter_env
# Reset the values in the array
counters["nu_nw_upgrade_counter"]=0
counters["nu_nw_global_counter"]=0
counters["nu_lc_boot_counter"]=0
counters["nu_lc_backup_counter"]=0
# Write the array back to the file
for key in "${!counters[@]}"; do
echo "$key=${counters[$key]}" >> counter_env.tmp
done
# Replace the original file with the updated file
mv counter_env.tmp counter_env
}
# get the user boot mode pins
boot_mode_reg=`peek 0x00FF5E0204`
boot_from_sd_card_reg_val="0x00000555"
boot_from_emmc_reg_val="0x00000666"
if [ "$boot_mode_reg" = "$boot_from_sd_card_reg_val" ]; then
#
# SD BOOT
#
echo "booting from sd card based on user boot mode"
cd /mnt/sd-mmcblk1p1
echo "Starting Crashkernel Service"
kexec -p /mnt/sd-mmcblk1p1/crashkernel/vmlinux --initrd=/mnt/sd-mmcblk1p1/crashkernel/rootfs.cpio
echo "Resetting U-Boot Counters"
reset_counters
./startup_script.cmd
elif [ "$boot_mode_reg" = "$boot_from_emmc_reg_val" ]; then
#
# EMMC BOOT
#
echo "booting from emmc based on boot mode"
cd /mnt/sd-mmcblk0p1
echo "Starting Crashkernel Service"
kexec -p /mnt/sd-mmcblk0p1/crashkernel/vmlinux --initrd=/mnt/sd-mmcblk0p1/crashkernel/rootfs.cpio
echo "Resetting U-Boot Counters"
reset_counters
./startup_script.cmd
else
#
# Should never be here
#
echo "[ERROR] user boot mode unsupported, waiting for system reset..."
fi

View File

@ -0,0 +1,26 @@
#
# This file is the myapp-init recipe.
#
SUMMARY = "Simple myapp-init application"
SECTION = "PETALINUX/apps"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
SRC_URI = "file://myapp-init \
"
S = "${WORKDIR}"
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
inherit update-rc.d
INITSCRIPT_NAME = "myapp-init"
INITSCRIPT_PARAMS = "start 99 S ."
do_install() {
install -d ${D}${sysconfdir}/init.d
install -m 0755 ${S}/myapp-init ${D}${sysconfdir}/init.d/myapp-init
}
FILES_${PN} += "${sysconfdir}/*"

View File

@ -0,0 +1,18 @@
#
# This file is the myapp-init recipe.
#
SUMMARY = "Simple myapp-init application"
SECTION = "PETALINUX/apps"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
SRC_URI = "file://myapp-init \
"
S = "${WORKDIR}"
do_install() {
install -d ${D}/${bindir}
install -m 0755 ${S}/myapp-init ${D}/${bindir}
}

View File

@ -0,0 +1,19 @@
PEEK = peek
POKE = poke
# Add any other object files to this list below
PEEK_OBJS = peek.o
POKE_OBJS = poke.o
all: $(PEEK) $(POKE)
$(POKE): $(POKE_OBJS)
$(CC) $(LDFLAGS) -o $@ $(POKE_OBJS) $(LDLIBS)
$(PEEK): $(PEEK_OBJS)
$(CC) $(LDFLAGS) -o $@ $(PEEK_OBJS) $(LDLIBS)
clean:
-rm -f $(POKE) $(PEEK) *.elf *.gdb *.o

View File

@ -0,0 +1,77 @@
/*
* peek utility - for those who remember the good old days!
*
*
* Copyright (C) 2013 - 2016 Xilinx, Inc. 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 XILINX 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.
*
* Except as contained in this notice, the name of the Xilinx shall not be used
* in advertising or otherwise to promote the sale, use or other dealings in this
* Software without prior written authorization from Xilinx.
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/mman.h>
#include <fcntl.h>
void usage(char *prog)
{
printf("usage: %s ADDR\n",prog);
printf("\n");
printf("ADDR may be specified as hex values\n");
}
int main(int argc, char *argv[])
{
int fd;
void *ptr;
unsigned addr, page_addr, page_offset;
unsigned page_size=sysconf(_SC_PAGESIZE);
if(argc!=2) {
usage(argv[0]);
exit(-1);
}
fd=open("/dev/mem",O_RDONLY);
if(fd<1) {
perror(argv[0]);
exit(-1);
}
addr=strtoul(argv[1],NULL,0);
page_addr=(addr & ~(page_size-1));
page_offset=addr-page_addr;
ptr=mmap(NULL,page_size,PROT_READ,MAP_SHARED,fd,(addr & ~(page_size-1)));
if((int)ptr==-1) {
perror(argv[0]);
exit(-1);
}
printf("0x%08x\n",*((unsigned *)(ptr+page_offset)));
return 0;
}

View File

@ -0,0 +1,77 @@
/*
* poke utility - for those who remember the good old days!
*
* Copyright (C) 2013 - 2016 Xilinx, Inc. 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 XILINX 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.
*
* Except as contained in this notice, the name of the Xilinx shall not be used
* in advertising or otherwise to promote the sale, use or other dealings in this
* Software without prior written authorization from Xilinx.
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/mman.h>
#include <fcntl.h>
void usage(char *prog)
{
printf("usage: %s ADDR VAL\n",prog);
printf("\n");
printf("ADDR and VAL may be specified as hex values\n");
}
int main(int argc, char *argv[])
{
int fd;
void *ptr;
unsigned val;
unsigned addr, page_addr, page_offset;
unsigned page_size=sysconf(_SC_PAGESIZE);
fd=open("/dev/mem",O_RDWR);
if(fd<1) {
perror(argv[0]);
exit(-1);
}
if(argc!=3) {
usage(argv[0]);
exit(-1);
}
addr=strtoul(argv[1],NULL,0);
val=strtoul(argv[2],NULL,0);
page_addr=(addr & ~(page_size-1));
page_offset=addr-page_addr;
ptr=mmap(NULL,page_size,PROT_READ|PROT_WRITE,MAP_SHARED,fd,(addr & ~(page_size-1)));
if((int)ptr==-1) {
perror(argv[0]);
exit(-1);
}
*((unsigned *)(ptr+page_offset))=val;