From 4f24424167aa4d382e2cff17a6fcdcf0680b89d2 Mon Sep 17 00:00:00 2001 From: Dalon Westergreen Date: Wed, 11 Nov 2015 21:00:23 -0800 Subject: Update linux-altera kernel recipes --- conf/machine/arria5.conf | 7 ++ conf/machine/cyclone5.conf | 7 ++ .../config/socfpga-base/bsp/arria10-standard.scc | 5 + .../config/socfpga-base/bsp/arria5-standard.scc | 5 + .../config/socfpga-base/bsp/cyclone5-standard.scc | 5 + .../bsp/include/cyclone5_arria5_arria10.scc | 8 ++ .../linux/config/socfpga-base/cfg/blk.cfg | 5 + .../linux/config/socfpga-base/cfg/fs.cfg | 31 +++++ .../linux/config/socfpga-base/cfg/leds.cfg | 6 + .../linux/config/socfpga-base/cfg/mtd.cfg | 6 + .../linux/config/socfpga-base/cfg/net.cfg | 34 ++++++ .../linux/config/socfpga-base/cfg/rtc.cfg | 6 + .../linux/config/socfpga-base/cfg/usb.cfg | 7 ++ .../socfpga-base/features/altera/altera-ip.cfg | 40 +++++++ .../socfpga-base/features/altera/altera-ip.scc | 5 + .../socfpga-base/features/altera/arria10-ip.cfg | 3 + .../socfpga-base/features/altera/arria10-ip.scc | 5 + .../socfpga-base/features/altera/board-common.cfg | 27 +++++ .../socfpga-base/features/altera/board-common.scc | 5 + .../features/altera/cyclone5_arria5-arm.cfg | 13 +++ .../features/altera/cyclone5_arria5-ip.cfg | 111 ++++++++++++++++++ .../features/altera/cyclone5_arria5-ip.scc | 5 + .../socfpga-base/ktypes/standard/standard.cfg | 128 +++++++++++++++++++++ .../socfpga-base/ktypes/standard/standard.scc | 10 ++ recipes-kernel/linux/linux-altera-configs.inc | 5 + recipes-kernel/linux/linux-altera-latest.inc | 5 - recipes-kernel/linux/linux-altera-ltsi-rt_3.10.bb | 10 +- recipes-kernel/linux/linux-altera-ltsi.inc | 5 - recipes-kernel/linux/linux-altera-ltsi_3.10.bb | 8 +- recipes-kernel/linux/linux-altera.inc | 116 +++---------------- recipes-kernel/linux/linux-altera_3.15.bb | 6 - recipes-kernel/linux/linux-altera_4.0.bb | 2 + recipes-kernel/linux/linux-altera_4.1.bb | 2 + recipes-kernel/linux/linux-altera_4.2.bb | 2 + 34 files changed, 517 insertions(+), 128 deletions(-) create mode 100644 recipes-kernel/linux/config/socfpga-base/bsp/arria10-standard.scc create mode 100644 recipes-kernel/linux/config/socfpga-base/bsp/arria5-standard.scc create mode 100644 recipes-kernel/linux/config/socfpga-base/bsp/cyclone5-standard.scc create mode 100644 recipes-kernel/linux/config/socfpga-base/bsp/include/cyclone5_arria5_arria10.scc create mode 100644 recipes-kernel/linux/config/socfpga-base/cfg/blk.cfg create mode 100644 recipes-kernel/linux/config/socfpga-base/cfg/fs.cfg create mode 100644 recipes-kernel/linux/config/socfpga-base/cfg/leds.cfg create mode 100644 recipes-kernel/linux/config/socfpga-base/cfg/mtd.cfg create mode 100644 recipes-kernel/linux/config/socfpga-base/cfg/net.cfg create mode 100644 recipes-kernel/linux/config/socfpga-base/cfg/rtc.cfg create mode 100644 recipes-kernel/linux/config/socfpga-base/cfg/usb.cfg create mode 100644 recipes-kernel/linux/config/socfpga-base/features/altera/altera-ip.cfg create mode 100644 recipes-kernel/linux/config/socfpga-base/features/altera/altera-ip.scc create mode 100644 recipes-kernel/linux/config/socfpga-base/features/altera/arria10-ip.cfg create mode 100644 recipes-kernel/linux/config/socfpga-base/features/altera/arria10-ip.scc create mode 100644 recipes-kernel/linux/config/socfpga-base/features/altera/board-common.cfg create mode 100644 recipes-kernel/linux/config/socfpga-base/features/altera/board-common.scc create mode 100644 recipes-kernel/linux/config/socfpga-base/features/altera/cyclone5_arria5-arm.cfg create mode 100644 recipes-kernel/linux/config/socfpga-base/features/altera/cyclone5_arria5-ip.cfg create mode 100644 recipes-kernel/linux/config/socfpga-base/features/altera/cyclone5_arria5-ip.scc create mode 100644 recipes-kernel/linux/config/socfpga-base/ktypes/standard/standard.cfg create mode 100644 recipes-kernel/linux/config/socfpga-base/ktypes/standard/standard.scc create mode 100644 recipes-kernel/linux/linux-altera-configs.inc delete mode 100644 recipes-kernel/linux/linux-altera-latest.inc delete mode 100644 recipes-kernel/linux/linux-altera-ltsi.inc delete mode 100644 recipes-kernel/linux/linux-altera_3.15.bb create mode 100644 recipes-kernel/linux/linux-altera_4.0.bb create mode 100644 recipes-kernel/linux/linux-altera_4.1.bb create mode 100644 recipes-kernel/linux/linux-altera_4.2.bb diff --git a/conf/machine/arria5.conf b/conf/machine/arria5.conf index e94d3df..b92b84a 100644 --- a/conf/machine/arria5.conf +++ b/conf/machine/arria5.conf @@ -9,3 +9,10 @@ UBOOT_MACHINE = "socfpga_arria5" KMACHINE = "arria5" +if [ "${KERNEL_PROVIDER}" == "linux-altera-ltsi" ]; then + KERNEL_DEVICETREE ?= "socfpga_arria5.dtb" +elif [ "${KERNEL_PROVIDER}" == "linux-altera-ltsi-rt" ]; then + KERNEL_DEVICETREE ?= "socfpga_arria5.dtb" +else + KERNEL_DEVICETREE ?= "socfpga_arria5_socdk.dtb" +fi diff --git a/conf/machine/cyclone5.conf b/conf/machine/cyclone5.conf index d8f419a..0e9620a 100644 --- a/conf/machine/cyclone5.conf +++ b/conf/machine/cyclone5.conf @@ -9,4 +9,11 @@ UBOOT_MACHINE = "socfpga_cyclone5" KMACHINE = "cyclone5" +if [ "${KERNEL_PROVIDER}" == "linux-altera-ltsi" ]; then + KERNEL_DEVICETREE ?= "socfpga_cyclone5.dtb" +elif [ "${KERNEL_PROVIDER}" == "linux-altera-ltsi-rt" ]; then + KERNEL_DEVICETREE ?= "socfpga_cyclone5.dtb" +else + KERNEL_DEVICETREE ?= "socfpga_cyclone5_socdk.dtb socfpga_cyclone5_sockit.dtb socfpga_cyclone5_socrates.dtb" +fi diff --git a/recipes-kernel/linux/config/socfpga-base/bsp/arria10-standard.scc b/recipes-kernel/linux/config/socfpga-base/bsp/arria10-standard.scc new file mode 100644 index 0000000..f768b01 --- /dev/null +++ b/recipes-kernel/linux/config/socfpga-base/bsp/arria10-standard.scc @@ -0,0 +1,5 @@ +define KMACHINE arria10 +define KTYPE standard +define KARCH arm + +include bsp/include/cyclone5_arria5_arria10.scc diff --git a/recipes-kernel/linux/config/socfpga-base/bsp/arria5-standard.scc b/recipes-kernel/linux/config/socfpga-base/bsp/arria5-standard.scc new file mode 100644 index 0000000..f263369 --- /dev/null +++ b/recipes-kernel/linux/config/socfpga-base/bsp/arria5-standard.scc @@ -0,0 +1,5 @@ +define KMACHINE arria5 +define KTYPE standard +define KARCH arm + +include bsp/include/cyclone5_arria5_arria10.scc diff --git a/recipes-kernel/linux/config/socfpga-base/bsp/cyclone5-standard.scc b/recipes-kernel/linux/config/socfpga-base/bsp/cyclone5-standard.scc new file mode 100644 index 0000000..e9f98eb --- /dev/null +++ b/recipes-kernel/linux/config/socfpga-base/bsp/cyclone5-standard.scc @@ -0,0 +1,5 @@ +define KMACHINE cyclone5 +define KTYPE standard +define KARCH arm + +include bsp/include/cyclone5_arria5_arria10.scc diff --git a/recipes-kernel/linux/config/socfpga-base/bsp/include/cyclone5_arria5_arria10.scc b/recipes-kernel/linux/config/socfpga-base/bsp/include/cyclone5_arria5_arria10.scc new file mode 100644 index 0000000..5f37d3c --- /dev/null +++ b/recipes-kernel/linux/config/socfpga-base/bsp/include/cyclone5_arria5_arria10.scc @@ -0,0 +1,8 @@ +include ktypes/standard/standard.scc + +include features/altera/cyclone5_arria5-ip.scc +include features/altera/arria10-ip.scc +include features/altera/altera-ip.scc +include features/altera/board-common.scc +kconfig hardware features/altera/cyclone5_arria5-arm.cfg + diff --git a/recipes-kernel/linux/config/socfpga-base/cfg/blk.cfg b/recipes-kernel/linux/config/socfpga-base/cfg/blk.cfg new file mode 100644 index 0000000..d7f07a7 --- /dev/null +++ b/recipes-kernel/linux/config/socfpga-base/cfg/blk.cfg @@ -0,0 +1,5 @@ +CONFIG_BLK_DEV_SD=y +CONFIG_BLK_DEV_INITRD=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=16384 diff --git a/recipes-kernel/linux/config/socfpga-base/cfg/fs.cfg b/recipes-kernel/linux/config/socfpga-base/cfg/fs.cfg new file mode 100644 index 0000000..feb8761 --- /dev/null +++ b/recipes-kernel/linux/config/socfpga-base/cfg/fs.cfg @@ -0,0 +1,31 @@ + +CONFIG_VFAT_FS=y +CONFIG_FAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" + +CONFIG_NTFS_FS=y +CONFIG_NTFS_RW=y + + +CONFIG_EXT2_FS=y +CONFIG_EXT2_FS_XATTR=y +CONFIG_EXT2_FS_POSIX_ACL=y +CONFIG_JFFS2_FS=y +CONFIG_JFFS2_SUMMARY=y + +CONFIG_EXT3_FS=y +CONFIG_EXT4_FS=y + +CONFIG_NFS_FS=y +CONFIG_ROOT_NFS=y +CONFIG_NFS_V4=y +CONFIG_NFS_USE_KERNEL_DNS=y +CONFIG_SUNRPC_GSS=y + +CONFIG_TMPFS=y + +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_CONFIGFS_FS=y + diff --git a/recipes-kernel/linux/config/socfpga-base/cfg/leds.cfg b/recipes-kernel/linux/config/socfpga-base/cfg/leds.cfg new file mode 100644 index 0000000..93d1f7e --- /dev/null +++ b/recipes-kernel/linux/config/socfpga-base/cfg/leds.cfg @@ -0,0 +1,6 @@ +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_CPU=y diff --git a/recipes-kernel/linux/config/socfpga-base/cfg/mtd.cfg b/recipes-kernel/linux/config/socfpga-base/cfg/mtd.cfg new file mode 100644 index 0000000..05e6f2a --- /dev/null +++ b/recipes-kernel/linux/config/socfpga-base/cfg/mtd.cfg @@ -0,0 +1,6 @@ +CONFIG_MTD=y +CONFIG_MTD_CMDLINE_PARTS=y +CONFIG_MTD_BLOCK=y +CONFIG_MTD_PHYSMAP=y +CONFIG_MTD_PHYSMAP_OF=y +CONFIG_MTD_NAND=y diff --git a/recipes-kernel/linux/config/socfpga-base/cfg/net.cfg b/recipes-kernel/linux/config/socfpga-base/cfg/net.cfg new file mode 100644 index 0000000..8d27c8d --- /dev/null +++ b/recipes-kernel/linux/config/socfpga-base/cfg/net.cfg @@ -0,0 +1,34 @@ +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +CONFIG_IP_PNP_RARP=y +CONFIG_NET_IPIP=m +CONFIG_VLAN_8021Q=m +CONFIG_XFRM_ALGO=y +CONFIG_XFRM_MIGRATE=y +CONFIG_NET_KEY=y +CONFIG_NET_KEY_MIGRATE=y +CONFIG_NET_IP_TUNNEL=y +CONFIG_INET_TUNNEL=y + +CONFIG_IPV6=y +CONFIG_INET6_XFRM_MODE_TRANSPORT=y +CONFIG_INET6_XFRM_MODE_TUNNEL=y +CONFIG_INET6_XFRM_MODE_BEET=y +CONFIG_IPV6_SIT=y + +CONFIG_NETWORK_PHY_TIMESTAMPING=y + +CONFIG_STP=y +CONFIG_GARP=y +CONFIG_VLAN_8021Q=y +CONFIG_VLAN_8021Q_GVRP=y +CONFIG_LLC=y +CONFIG_DNS_RESOLVER=y + +CONFIG_NETDEVICES=y diff --git a/recipes-kernel/linux/config/socfpga-base/cfg/rtc.cfg b/recipes-kernel/linux/config/socfpga-base/cfg/rtc.cfg new file mode 100644 index 0000000..9e11f40 --- /dev/null +++ b/recipes-kernel/linux/config/socfpga-base/cfg/rtc.cfg @@ -0,0 +1,6 @@ +CONFIG_RTC_CLASS=y +CONFIG_RTC_SYSTOHC=y +CONFIG_RTC_HCTOSYS_DEVICE="rtc0" +CONFIG_RTC_INTF_SYSFS=y +CONFIG_RTC_INTF_PROC=y +CONFIG_RTC_INTF_DEV=y diff --git a/recipes-kernel/linux/config/socfpga-base/cfg/usb.cfg b/recipes-kernel/linux/config/socfpga-base/cfg/usb.cfg new file mode 100644 index 0000000..112a280 --- /dev/null +++ b/recipes-kernel/linux/config/socfpga-base/cfg/usb.cfg @@ -0,0 +1,7 @@ +CONFIG_USB_STORAGE=y +CONFIG_USB_GADGET=y +CONFIG_USB_GADGET_VBUS_DRAW=2 +CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2 +CONFIG_USB_LIBCOMPOSITE=m +CONFIG_USB_MASS_STORAGE=m +CONFIG_USB_ZERO=m diff --git a/recipes-kernel/linux/config/socfpga-base/features/altera/altera-ip.cfg b/recipes-kernel/linux/config/socfpga-base/features/altera/altera-ip.cfg new file mode 100644 index 0000000..c16f049 --- /dev/null +++ b/recipes-kernel/linux/config/socfpga-base/features/altera/altera-ip.cfg @@ -0,0 +1,40 @@ + +# Serial/UART +CONFIG_SERIAL_ALTERA_JTAGUART=m +CONFIG_SERIAL_ALTERA_UART=m +CONFIG_SERIAL_ALTERA_UART_MAXPORTS=4 +CONFIG_SERIAL_ALTERA_UART_BAUDRATE=115200 + +# Watchdog +CONFIG_WATCHDOG=y + +# Ethernet +CONFIG_ALTERA_TSE=m + +# GPIO +CONFIG_GPIOLIB=y +CONFIG_OF_GPIO=y +CONFIG_GPIO_SYSFS=y +CONFIG_GPIO_ALTERA=m + +# SPI +CONFIG_SPI=y +CONFIG_SPI_ALTERA=m +CONFIG_SPI_BITBANG=m + +# Video +CONFIG_FB=y +CONFIG_FB_CFB_FILLRECT=m +CONFIG_FB_CFB_COPYAREA=m +CONFIG_FB_CFB_IMAGEBLIT=m +CONFIG_FB_ALTERA_VIP=m + +# Mailbox +CONFIG_MAILBOX=y +CONFIG_ALTERA_MBOX=m + +# Misc +CONFIG_ALTERA_HWMUTEX=m +CONFIG_ALTERA_SYSID=m +CONFIG_ALTERA_ILC=m + diff --git a/recipes-kernel/linux/config/socfpga-base/features/altera/altera-ip.scc b/recipes-kernel/linux/config/socfpga-base/features/altera/altera-ip.scc new file mode 100644 index 0000000..42ae19c --- /dev/null +++ b/recipes-kernel/linux/config/socfpga-base/features/altera/altera-ip.scc @@ -0,0 +1,5 @@ +define KFEATURE_DESCRIPTION "Altera Soft IP Core Drivers/Support" +define KFEATURE_COMPATIBILITY board + +kconfig hardware altera-ip.cfg + diff --git a/recipes-kernel/linux/config/socfpga-base/features/altera/arria10-ip.cfg b/recipes-kernel/linux/config/socfpga-base/features/altera/arria10-ip.cfg new file mode 100644 index 0000000..5f9fecb --- /dev/null +++ b/recipes-kernel/linux/config/socfpga-base/features/altera/arria10-ip.cfg @@ -0,0 +1,3 @@ +CONFIG_FPGA_MGR_SOCFPGA_A10=y +CONFIG_GPIO_A10SYCON=y +CONFIG_SENSORS_A10SYCON=y diff --git a/recipes-kernel/linux/config/socfpga-base/features/altera/arria10-ip.scc b/recipes-kernel/linux/config/socfpga-base/features/altera/arria10-ip.scc new file mode 100644 index 0000000..0e82bfa --- /dev/null +++ b/recipes-kernel/linux/config/socfpga-base/features/altera/arria10-ip.scc @@ -0,0 +1,5 @@ +define KFEATURE_DESCRIPTION "Altera 20nm SoC IP Core Drivers/Support" +define KFEATURE_COMPATIBILITY board + +kconfig hardware arria10-ip.cfg + diff --git a/recipes-kernel/linux/config/socfpga-base/features/altera/board-common.cfg b/recipes-kernel/linux/config/socfpga-base/features/altera/board-common.cfg new file mode 100644 index 0000000..c5a989d --- /dev/null +++ b/recipes-kernel/linux/config/socfpga-base/features/altera/board-common.cfg @@ -0,0 +1,27 @@ +# Ethernet PHYs +CONFIG_PHYLIB=y +CONFIG_MARVELL_PHY=y +CONFIG_MICREL_PHY=y + +# EEPROM +CONFIG_EEPROM_AT24=y + +# MTD +CONFIG_MTD=y +CONFIG_MTD_OF_PARTS=y + +# RTC drivers +CONFIG_RTC_DRV_DS1307=y + +CONFIG_NEWHAVEN_LCD=y + +CONFIG_PMBUS=y +CONFIG_SENSORS_LTC2978=y + +CONFIG_MTD_M25P80=y +CONFIG_M25PXX_USE_FAST_READ=y + +CONFIG_SENSORS_MAX1619=y + +CONFIG_I2C_CHARDEV=y +CONFIG_SPI_SPIDEV=y diff --git a/recipes-kernel/linux/config/socfpga-base/features/altera/board-common.scc b/recipes-kernel/linux/config/socfpga-base/features/altera/board-common.scc new file mode 100644 index 0000000..15d070c --- /dev/null +++ b/recipes-kernel/linux/config/socfpga-base/features/altera/board-common.scc @@ -0,0 +1,5 @@ +define KFEATURE_DESCRIPTION "Evaluation Board Common Drivers" +define KFEATURE_COMPATIBILITY board + +kconfig hardware board-common.cfg + diff --git a/recipes-kernel/linux/config/socfpga-base/features/altera/cyclone5_arria5-arm.cfg b/recipes-kernel/linux/config/socfpga-base/features/altera/cyclone5_arria5-arm.cfg new file mode 100644 index 0000000..50ddab8 --- /dev/null +++ b/recipes-kernel/linux/config/socfpga-base/features/altera/cyclone5_arria5-arm.cfg @@ -0,0 +1,13 @@ +# ARM +CONFIG_ARCH_SOCFPGA=y +CONFIG_ARM_THUMBEE=y +CONFIG_SWP_EMULATE=y +CONFIG_ARM_CPU_TOPOLOGY=y + +CONFIG_VFP=y +CONFIG_VFPv3=y +CONFIG_NEON=y + +CONFIG_AEABI=y +CONFIG_OABI_COMPAT=y + diff --git a/recipes-kernel/linux/config/socfpga-base/features/altera/cyclone5_arria5-ip.cfg b/recipes-kernel/linux/config/socfpga-base/features/altera/cyclone5_arria5-ip.cfg new file mode 100644 index 0000000..e7ee368 --- /dev/null +++ b/recipes-kernel/linux/config/socfpga-base/features/altera/cyclone5_arria5-ip.cfg @@ -0,0 +1,111 @@ +# FPGA BRIDGE - done +CONFIG_FPGA_BRIDGE=y +CONFIG_ALTERA_SOCFPGA_BRIDGE=y + +# FPGA MANAGER - done +CONFIG_FPGA=y +CONFIG_FPGA_MGR_ALTERA=y + + +# UART - done +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=2 +CONFIG_SERIAL_8250_RUNTIME_UARTS=2 +CONFIG_SERIAL_8250_DW=y +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_CONSOLE_POLL=y + +# SPI +CONFIG_SPI=y +CONFIG_SPI_CADENCE_QSPI=y +CONFIG_SPI_DESIGNWARE=y +CONFIG_SPI_DW_MMIO=y + +# SRAM +CONFIG_SRAM=y + +# DMA - done +# CONFIG_DMADEVICES=y +# CONFIG_PL330_DMA=y + +# PL310 - done +CONFIG_OUTER_CACHE=y +CONFIG_OUTER_CACHE_SYNC=y +CONFIG_CACHE_L2X0=y +CONFIG_CACHE_PL310=y + +# Watchdog - done +CONFIG_WATCHDOG=y +CONFIG_DW_WATCHDOG=y + +# Ethernet - done +CONFIG_NET_VENDOR_STMICRO=y +CONFIG_STMMAC_ETH=y +CONFIG_STMMAC_PLATFORM=y +CONFIG_STMMAC_DEBUG_FS=y +CONFIG_STMMAC_RING=y +CONFIG_FIXED_PHY=y + +# GPIO - done +CONFIG_GPIO_SYSFS=y +CONFIG_GPIOLIB=y +CONFIG_OF_GPIO=y +CONFIG_GPIO_GENERIC=y +CONFIG_GPIO_DWAPB=y + +# I2C - done +CONFIG_I2C=y +CONFIG_I2C_DESIGNWARE_CORE=y +CONFIG_I2C_DESIGNWARE_PLATFORM=y + +# CAN - done +CONFIG_CAN=y +CONFIG_CAN_C_CAN=y +CONFIG_CAN_C_CAN_PLATFORM=y + +# MMC/SD - done +CONFIG_MMC=y +CONFIG_MMC_DW=y +CONFIG_MMC_DW_IDMAC=y +CONFIG_MMC_DW_PLTFM=y +CONFIG_MMC_DW_SOCFPGA=y + +# NAND - done +CONFIG_MTD_NAND=y +CONFIG_MTD_NAND_ECC=y +CONFIG_MTD_NAND_DENALI=y +CONFIG_MTD_NAND_DENALI_DT=y +CONFIG_MTD_NAND_IDS=y + +# USB (+otg) - done +CONFIG_USB_SUPPORT=y +CONFIG_USB_COMMON=y +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB=y +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y +CONFIG_USB_DEFAULT_PERSIST=y +CONFIG_USB_DWC2_PLATFORM=y +CONFIG_USB_DWC2=y +CONFIG_USB_DWC2_DUAL_ROLE=y +CONFIG_USB_PHY=y +CONFIG_NOP_USB_XCEIV=y + + +# Timer + +# SERIAL +CONFIG_SERIAL=y +CONFIG_SERIAL_CONSOLE=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_DMA=y +CONFIG_SERIAL_8250_NR_UARTS=2 +CONFIG_SERIAL_8250_RUNTIME_UARTS=2 + +# CAN - done +CONFIG_CAN=y +CONFIG_CAN_C_CAN=y +CONFIG_CAN_C_CAN_PLATFORM=y diff --git a/recipes-kernel/linux/config/socfpga-base/features/altera/cyclone5_arria5-ip.scc b/recipes-kernel/linux/config/socfpga-base/features/altera/cyclone5_arria5-ip.scc new file mode 100644 index 0000000..ce889cc --- /dev/null +++ b/recipes-kernel/linux/config/socfpga-base/features/altera/cyclone5_arria5-ip.scc @@ -0,0 +1,5 @@ +define KFEATURE_DESCRIPTION "Altera 28nm SoC IP Core Drivers/Support" +define KFEATURE_COMPATIBILITY board + +kconfig hardware cyclone5_arria5-ip.cfg + diff --git a/recipes-kernel/linux/config/socfpga-base/ktypes/standard/standard.cfg b/recipes-kernel/linux/config/socfpga-base/ktypes/standard/standard.cfg new file mode 100644 index 0000000..6fd3094 --- /dev/null +++ b/recipes-kernel/linux/config/socfpga-base/ktypes/standard/standard.cfg @@ -0,0 +1,128 @@ +CONFIG_PRINTK=y +CONFIG_EARLY_PRINTK=y +CONFIG_LOG_BUF_SHIFT=14 + +CONFIG_SYSVIPC=y +CONFIG_SYSCTL_SYSCALL=y + +CONFIG_FHANDLE=y + +CONFIG_PREEMPT_NONE=y + +CONFIG_AUDIT=y + +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y + +CONFIG_EMBEDDED=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_PERF_EVENTS=y +CONFIG_SLAB=y +CONFIG_SWAP=y +CONFIG_TIMER_STATS=y +CONFIG_RCU_CPU_STALL_TIMEOUT=60 + +CONFIG_CPUSETS=y +CONFIG_PROC_PID_CPUSET=y + +CONFIG_NAMESPACES=y +CONFIG_UTS_NS=y +CONFIG_IPC_NS=y +CONFIG_PID_NS=y +CONFIG_NET_NS=y + +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y + +CONFIG_CGROUPS=y + +CONFIG_SLUB_DEBUG=y +CONFIG_SLUB=y +CONFIG_PROFILING=y +CONFIG_TRACEPOINTS=y +CONFIG_OPROFILE=y + +CONFIG_DEFAULT_NOOP=y +CONFIG_DEFAULT_IOSCHED="noop" + +CONFIG_MDIO_BITBANG=y + +CONFIG_CAN_DEBUG_DEVICES=y + +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" + +CONFIG_CONNECTOR=y + +CONFIG_MEMORY=y + +CONFIG_RD_XZ=y + +CONFIG_NLS=y +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=y + +CONFIG_INPUT=y +CONFIG_INPUT_SPARSEKMAP=y +CONFIG_INPUT_EVDEV=y + +CONFIG_CLKSRC_OF=y +CONFIG_COMMON_CLK_DEBUG=y + +CONFIG_SMP=y +CONFIG_SMP_ON_UP=y + +CONFIG_VMSPLIT_2G=y + +CONFIG_LOCAL_TIMERS=y +CONFIG_SCHED_HRTICK=y + +CONFIG_PM_SLEEP_SMP=y + +CONFIG_PROC_DEVICETREE=y + +CONFIG_SCSI=y +CONFIG_SCSI_DMA=y + +CONFIG_SERIO_AMBAKMI=y + +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=16 + +CONFIG_GENERIC_PHY=y + +CONFIG_MAGIC_SYSRQ=y + +CONFIG_DETECT_HUNG_TASK=y +CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120 +CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0 + +CONFIG_STACKTRACE=y + +CONFIG_DEBUG_INFO=y +CONFIG_FRAME_POINTER=y + +CONFIG_RCU_CPU_STALL_TIMEOUT=21 +CONFIG_NOP_TRACER=y +CONFIG_TRACE_CLOCK=y +CONFIG_RING_BUFFER=y +CONFIG_EVENT_TRACING=y +CONFIG_CONTEXT_SWITCH_TRACER=y +CONFIG_RING_BUFFER_ALLOW_SWAP=y +CONFIG_TRACING=y +CONFIG_GENERIC_TRACER=y + +CONFIG_FUNCTION_TRACER=y +CONFIG_FUNCTION_GRAPH_TRACER=y + +CONFIG_DYNAMIC_FTRACE=y +CONFIG_FTRACE_MCOUNT_RECORD=y + +CONFIG_OLD_MCOUNT=y +CONFIG_DEBUG_USER=y + +CONFIG_BINARY_PRINTF=y + + + + diff --git a/recipes-kernel/linux/config/socfpga-base/ktypes/standard/standard.scc b/recipes-kernel/linux/config/socfpga-base/ktypes/standard/standard.scc new file mode 100644 index 0000000..0414a30 --- /dev/null +++ b/recipes-kernel/linux/config/socfpga-base/ktypes/standard/standard.scc @@ -0,0 +1,10 @@ +# Standard linux-xlnx base configuration + +kconf non-hardware standard.cfg +kconf non-hardware cfg/blk.cfg +kconf non-hardware cfg/fs.cfg +kconf non-hardware cfg/leds.cfg +kconf non-hardware cfg/mtd.cfg +kconf non-hardware cfg/net.cfg +kconf non-hardware cfg/rtc.cfg +kconf non-hardware cfg/usb.cfg diff --git a/recipes-kernel/linux/linux-altera-configs.inc b/recipes-kernel/linux/linux-altera-configs.inc new file mode 100644 index 0000000..5354773 --- /dev/null +++ b/recipes-kernel/linux/linux-altera-configs.inc @@ -0,0 +1,5 @@ + +FILESEXTRAPATHS_prepend := "${THISDIR}/config:" +SRC_URI_append += " \ + file://socfpga-base;type=kmeta;destsuffix=socfpga-base \ + " diff --git a/recipes-kernel/linux/linux-altera-latest.inc b/recipes-kernel/linux/linux-altera-latest.inc deleted file mode 100644 index ae76d5e..0000000 --- a/recipes-kernel/linux/linux-altera-latest.inc +++ /dev/null @@ -1,5 +0,0 @@ -KERNEL_BRANCH ?= "socfpga-${PV}" - -require recipes-kernel/linux/linux-altera.inc - - diff --git a/recipes-kernel/linux/linux-altera-ltsi-rt_3.10.bb b/recipes-kernel/linux/linux-altera-ltsi-rt_3.10.bb index 48128a2..379d0ec 100644 --- a/recipes-kernel/linux/linux-altera-ltsi-rt_3.10.bb +++ b/recipes-kernel/linux/linux-altera-ltsi-rt_3.10.bb @@ -1,7 +1,3 @@ -DTB_SUBDIR="dts/" - -KERNEL_BRANCH ?= "socfpga-${PV}-ltsi-rt" - -require recipes-kernel/linux/linux-altera.inc -COMPATIBLE_MACHINE = "(arria5|cyclone5)" - +include linux-altera.inc +LINUX_VERSION = "3.10" +LINUX_VERSION_SUFFIX = "-ltsi-rt" diff --git a/recipes-kernel/linux/linux-altera-ltsi.inc b/recipes-kernel/linux/linux-altera-ltsi.inc deleted file mode 100644 index 196cc54..0000000 --- a/recipes-kernel/linux/linux-altera-ltsi.inc +++ /dev/null @@ -1,5 +0,0 @@ -KERNEL_BRANCH ?= "socfpga-${PV}-ltsi" - -require recipes-kernel/linux/linux-altera.inc - - diff --git a/recipes-kernel/linux/linux-altera-ltsi_3.10.bb b/recipes-kernel/linux/linux-altera-ltsi_3.10.bb index 3749338..ad1bdc0 100644 --- a/recipes-kernel/linux/linux-altera-ltsi_3.10.bb +++ b/recipes-kernel/linux/linux-altera-ltsi_3.10.bb @@ -1,5 +1,3 @@ -DTB_SUBDIR="dts/" - -require recipes-kernel/linux/linux-altera-ltsi.inc -COMPATIBLE_MACHINE = "(arria5|cyclone5)" - +include linux-altera.inc +LINUX_VERSION = "3.10" +LINUX_VERSION_SUFFIX = "-ltsi" diff --git a/recipes-kernel/linux/linux-altera.inc b/recipes-kernel/linux/linux-altera.inc index 0cddc82..3320c82 100644 --- a/recipes-kernel/linux/linux-altera.inc +++ b/recipes-kernel/linux/linux-altera.inc @@ -1,112 +1,28 @@ -PR = "r1" - -KERNEL_REPO ?= "git://git.rocketboards.org/linux-socfpga.git" -KERNEL_PROT ?= "http" -KERNEL_DEFCONFIG ?= "socfpga_defconfig" -KERNEL_TAG ?= "${AUTOREV}" - -SRC_URI = "${KERNEL_REPO};protocol=${KERNEL_PROT};branch=${KERNEL_BRANCH}" - -SRCREV_pn-${PN} = "${KERNEL_TAG}" - -inherit kernel -SECTION = "kernel" DESCRIPTION = "Altera Linux kernel" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" -S = "${WORKDIR}/git" - -MACHINE_DEFCONFIG = "${KERNEL_DEFCONFIG}" - -do_configure() { - export INITRAMFS_IMAGE_FILE="${INITRAMFS_IMAGE}-${MACHINE}.cpio" - - unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE - export CROSS_COMPILE="${TARGET_PREFIX}" - export ARCH=${ARCH} - - oe_runmake -C ${S} O=${B} ${MACHINE_DEFCONFIG} CONFIG_BLK_DEV_INITRD=y - - pushd ${B} - cp .config .config.ori - - grep CONFIG_BLK_DEV_INITRD .config || echo "CONFIG_BLK_DEV_INITRD=y" >> .config - grep CONFIG_INITRAMFS_SOURCE .config || echo "CONFIG_INITRAMFS_SOURCE=\"\"" >> .config - grep CONFIG_INITRAMFS_ROOT_UID .config || echo "CONFIG_INITRAMFS_ROOT_UID=0" >> .config - grep CONFIG_INITRAMFS_ROOT_GID .config || echo "CONFIG_INITRAMFS_ROOT_GID=0" >> .config - grep CONFIG_INITRAMFS_COMPRESSION_NONE .config || echo "CONFIG_INITRAMFS_COMPRESSION_NONE=y" >> .config - - if [ ! -z ${INITRAMFS_IMAGE} ] && [ -e ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_FILE} ]; then - cp ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_FILE} . - echo "Found valid initramfs ${INITRAMFS_IMAGE_FILE}" - sed -i "s|^.*CONFIG_BLK_DEV_INITRD[ =].*$|CONFIG_BLK_DEV_INITRD=y|g" .config - sed -i "s|^.*CONFIG_INITRAMFS_SOURCE[ =].*$|CONFIG_INITRAMFS_SOURCE=\"${INITRAMFS_IMAGE_FILE}\"|g" .config - sed -i "s|^.*CONFIG_INITRAMFS_ROOT_UID[ =].*$|CONFIG_INITRAMFS_ROOT_UID=0|g" .config - sed -i "s|^.*CONFIG_INITRAMFS_ROOT_GID[ =].*$|CONFIG_INITRAMFS_ROOT_GID=0|g" .config - sed -i "s|^.*CONFIG_INITRAMFS_COMPRESSION_NONE[ =].*$|CONFIG_INITRAMFS_COMPRESSION_NONE=y|g" .config - oe_runmake -C ${S} O=${B} oldconfig - else - rm -f *.cpio - echo "Initramfs disabled or can't find valid initramfs ${INITRAMFS_IMAGE_FILE}" - sed -i "s|^CONFIG_BLK_DEV_INITRD=.*$|# CONFIG_BLK_DEV_INITRD is not set|g" .config - sed -i "s|^CONFIG_INITRAMFS_SOURCE=\".*\"$|# CONFIG_INITRAMFS_SOURCE is not set|g" .config - sed -i "s|^CONFIG_INITRAMFS_ROOT_UID=.*$|# CONFIG_INITRAMFS_ROOT_UID is not set|g" .config - sed -i "s|^CONFIG_INITRAMFS_ROOT_GID=.*$|# CONFIG_INITRAMFS_ROOT_GID is not set|g" .config - sed -i "s|^CONFIG_INITRAMFS_COMPRESSION_NONE=.*$|# CONFIG_INITRAMFS_COMPRESSION_NONE is not set|g" .config - oe_runmake -C ${S} O=${B} oldconfig - fi - popd -} - -kernel_do_compile() { - unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE - oe_runmake -C ${S} O=${B} __headers CC="${KERNEL_CC}" LD="${KERNEL_LD}" - oe_runmake -C ${S} O=${B} ${KERNEL_IMAGETYPE_FOR_MAKE} ${KERNEL_ALT_IMAGETYPE} CC="${KERNEL_CC}" LD="${KERNEL_LD}" LOADADDR=0x8000 - if test "${KERNEL_IMAGETYPE_FOR_MAKE}.gz" = "${KERNEL_IMAGETYPE}"; then - gzip -9c < "${KERNEL_IMAGETYPE_FOR_MAKE}" > "${KERNEL_OUTPUT}" - fi -} - -do_compile_dtb() { - unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE - sync - oe_runmake -C ${S} O=${B} ARCH=${ARCH} CROSS_COMPILE="${TARGET_PREFIX}" dtbs || - oe_runmake -C ${S} O=${B} ARCH=${ARCH} CROSS_COMPILE="${TARGET_PREFIX}" dtbs -} +KERNEL_REPO ?= "git://github.com/altera-opensource/linux-socfpga.git" +KERNEL_PROT ?= "https" -addtask compile_dtb after do_compile before do_build +# Kernel CONFIG_LOCALVERSION +LINUX_VERSION_EXTENSION ?= "-altera" -KERNEL_DEVICETREE ?= "socfpga_vt socfpga_cyclone5 socfpga_arria5" +# Build branch name +LINUX_VERSION_PREFIX ?= "socfpga-" +LINUX_VERSION_SUFFIX ?= "" +LINUX_VERSION ?= "4.0" -do_deploy_dtb() { - install -d ${DEPLOY_DIR_IMAGE} - cd ${DEPLOY_DIR_IMAGE} - if test -n "${KERNEL_DEVICETREE}"; then - for DTB_FILE in ${KERNEL_DEVICETREE}; do - DTB_SYMLINK_NAME="${DTB_FILE}.dtb" - DEVICE_TREE_OUTPUT="${B}/arch/${ARCH}/boot/${DTB_SUBDIR}${DTB_FILE}.dtb" - DTB_NAME="${DTB_FILE}-${DATETIME}.dtb" - if [ ! -f ${DEVICE_TREE_OUTPUT} ]; then - echo "Warning: ${DEVICE_TREE_OUTPUT} is not available!" - continue - fi - install -m 0644 ${DEVICE_TREE_OUTPUT} ${DTB_NAME} - rm -f ${DTB_SYMLINK_NAME} - ln -sf ${DTB_NAME} ${DTB_SYMLINK_NAME} - done - fi -} +SRCREV ?= "${AUTOREV}" +SRCREV_machine ?= "${AUTOREV}" +PV = "${LINUX_VERSION}" +PV_append = "+git${SRCPV}" -addtask deploy_dtb after do_compile_dtb before do_build -VMLINUX_NAME ?= "vmlinux-${PV}-${PR}-${MACHINE}-${DATETIME}" +KBRANCH ?= "${LINUX_VERSION_PREFIX}${LINUX_VERSION}${LINUX_VERSION_SUFFIX}" -kernel_do_deploy_append() { - install -m 0644 ${B}/vmlinux ${DEPLOYDIR}/${VMLINUX_NAME} - cd ${DEPLOYDIR} && - rm -f vmlinux && - ln -sf ${VMLINUX_NAME} vmlinux -} +SRC_URI = "${KERNEL_REPO};protocol=${KERNEL_PROT};branch=${KBRANCH}" +require recipes-kernel/linux/linux-yocto.inc +require linux-altera-configs.inc diff --git a/recipes-kernel/linux/linux-altera_3.15.bb b/recipes-kernel/linux/linux-altera_3.15.bb deleted file mode 100644 index 0062378..0000000 --- a/recipes-kernel/linux/linux-altera_3.15.bb +++ /dev/null @@ -1,6 +0,0 @@ -DTB_SUBDIR="dts/" - -KERNEL_DEVICETREE = "socfpga_cyclone5_socdk socfpga_arria5_socdk socfpga_vt" - -require recipes-kernel/linux/linux-altera-latest.inc -COMPATIBLE_MACHINE = "(arria5|cyclone5)" diff --git a/recipes-kernel/linux/linux-altera_4.0.bb b/recipes-kernel/linux/linux-altera_4.0.bb new file mode 100644 index 0000000..d0a85ef --- /dev/null +++ b/recipes-kernel/linux/linux-altera_4.0.bb @@ -0,0 +1,2 @@ +include linux-altera.inc +LINUX_VERSION = "4.0" diff --git a/recipes-kernel/linux/linux-altera_4.1.bb b/recipes-kernel/linux/linux-altera_4.1.bb new file mode 100644 index 0000000..521e846 --- /dev/null +++ b/recipes-kernel/linux/linux-altera_4.1.bb @@ -0,0 +1,2 @@ +include linux-altera.inc +LINUX_VERSION = "4.1" diff --git a/recipes-kernel/linux/linux-altera_4.2.bb b/recipes-kernel/linux/linux-altera_4.2.bb new file mode 100644 index 0000000..e23abac --- /dev/null +++ b/recipes-kernel/linux/linux-altera_4.2.bb @@ -0,0 +1,2 @@ +include linux-altera.inc +LINUX_VERSION = "4.2" -- cgit v1.2.3-54-g00ecf