diff options
38 files changed, 588 insertions, 126 deletions
diff --git a/conf/machine/arria10.conf b/conf/machine/arria10.conf new file mode 100644 index 0000000..3bfcfe8 --- /dev/null +++ b/conf/machine/arria10.conf | |||
@@ -0,0 +1,12 @@ | |||
1 | #@TYPE: Machine | ||
2 | #@NAME: arria5 | ||
3 | #@DESCRIPTION: Machine configuration for the Arria 10 SoC" | ||
4 | |||
5 | require conf/machine/include/socfpga.inc | ||
6 | |||
7 | PREFERRED_VERSION_u-boot-socfpga ?= "2014.10" | ||
8 | UBOOT_MACHINE = "socfpga_arria10_defconfig" | ||
9 | |||
10 | KMACHINE = "arria10" | ||
11 | |||
12 | |||
diff --git a/conf/machine/arria5.conf b/conf/machine/arria5.conf index d3983ea..8589f94 100644 --- a/conf/machine/arria5.conf +++ b/conf/machine/arria5.conf | |||
@@ -1,8 +1,11 @@ | |||
1 | #@TYPE: Machine | 1 | #@TYPE: Machine |
2 | #@NAME: arria5 | 2 | #@NAME: arria5 |
3 | #@DESCRIPTION: Machine configuration for the Cyclone V SoC" | 3 | #@DESCRIPTION: Machine configuration for the Arria V SoC" |
4 | 4 | ||
5 | require conf/machine/include/socfpga.inc | 5 | require conf/machine/include/socfpga.inc |
6 | 6 | ||
7 | PREFERRED_VERSION_u-boot-socfpga ?= "2013.01.01" | ||
7 | UBOOT_MACHINE = "socfpga_arria5" | 8 | UBOOT_MACHINE = "socfpga_arria5" |
8 | 9 | ||
10 | KMACHINE = "arria5" | ||
11 | |||
diff --git a/conf/machine/cyclone5.conf b/conf/machine/cyclone5.conf index 060e92f..fd74005 100644 --- a/conf/machine/cyclone5.conf +++ b/conf/machine/cyclone5.conf | |||
@@ -4,5 +4,8 @@ | |||
4 | 4 | ||
5 | require conf/machine/include/socfpga.inc | 5 | require conf/machine/include/socfpga.inc |
6 | 6 | ||
7 | PREFERRED_VERSION_u-boot-socfpga ?= "2013.01.01" | ||
7 | UBOOT_MACHINE = "socfpga_cyclone5" | 8 | UBOOT_MACHINE = "socfpga_cyclone5" |
8 | 9 | ||
10 | KMACHINE = "cyclone5" | ||
11 | |||
diff --git a/conf/machine/include/socfpga.inc b/conf/machine/include/socfpga.inc index 706c583..6932620 100644 --- a/conf/machine/include/socfpga.inc +++ b/conf/machine/include/socfpga.inc | |||
@@ -6,9 +6,9 @@ require conf/machine/include/tune-cortexa9.inc | |||
6 | # this affects the PREFERRED_PROVIDER of virtual/kernel | 6 | # this affects the PREFERRED_PROVIDER of virtual/kernel |
7 | # it can be overriden from the environment, using BB_ENV_EXTRAWHITE | 7 | # it can be overriden from the environment, using BB_ENV_EXTRAWHITE |
8 | KERNEL_PROVIDER ?= "linux-altera-ltsi" | 8 | KERNEL_PROVIDER ?= "linux-altera-ltsi" |
9 | PREFERRED_PROVIDER_virtual/kernel = "${KERNEL_PROVIDER}" | 9 | PREFERRED_PROVIDER_virtual/kernel ?= "${KERNEL_PROVIDER}" |
10 | 10 | ||
11 | PREFERRED_PROVIDER_virtual/bootloader = "u-boot-socfpga" | 11 | PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-socfpga" |
12 | 12 | ||
13 | # Increase this everytime you change something in the kernel | 13 | # Increase this everytime you change something in the kernel |
14 | MACHINE_KERNEL_PR = "r1" | 14 | MACHINE_KERNEL_PR = "r1" |
diff --git a/recipes-bsp/u-boot/u-boot-socfpga_2013.01.01.bb b/recipes-bsp/u-boot/u-boot-socfpga_2013.01.01.bb index 1beca44..f2f4328 100755 --- a/recipes-bsp/u-boot/u-boot-socfpga_2013.01.01.bb +++ b/recipes-bsp/u-boot/u-boot-socfpga_2013.01.01.bb | |||
@@ -1 +1,4 @@ | |||
1 | # SoCEDS 15.1 u-Boot release | ||
2 | UBOOT_TAG = "353283b6e75eabdcc48dadf08507b4b86c229d78" | ||
3 | |||
1 | require u-boot-socfpga.inc | 4 | require u-boot-socfpga.inc |
diff --git a/recipes-bsp/u-boot/u-boot-socfpga_2014.10.bb b/recipes-bsp/u-boot/u-boot-socfpga_2014.10.bb new file mode 100755 index 0000000..cecd191 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-socfpga_2014.10.bb | |||
@@ -0,0 +1,50 @@ | |||
1 | UBOOT_SUFFIX ?= "img" | ||
2 | UBOOT_RAW_BINARY ?= "u-boot-dtb.bin" | ||
3 | UBOOT_DTB ?= "u-boot.dtb" | ||
4 | |||
5 | require ${COREBASE}/meta/recipes-bsp/u-boot/u-boot.inc | ||
6 | |||
7 | FILESEXTRAPATHS_prepend := "${THISDIR}/u-boot:" | ||
8 | |||
9 | LICENSE = "GPLv2+" | ||
10 | LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb" | ||
11 | |||
12 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
13 | |||
14 | PROVIDES += "u-boot" | ||
15 | PKG_${PN} = "u-boot" | ||
16 | PKG_${PN}-dev = "u-boot-dev" | ||
17 | PKG_${PN}-dbg = "u-boot-dbg" | ||
18 | |||
19 | S = "${WORKDIR}/git" | ||
20 | |||
21 | # SPL (Second Program Loader) to be loaded over UART | ||
22 | SPL_UART_BINARY ?= "" | ||
23 | SPL_UART_IMAGE ?= "${SPL_UART_BINARY}-${MACHINE}-${PV}-${PR}" | ||
24 | SPL_UART_SYMLINK ?= "${SPL_UART_BINARY}-${MACHINE}" | ||
25 | |||
26 | do_deploy_append () { | ||
27 | install ${S}/${UBOOT_RAW_BINARY} ${DEPLOYDIR}/${UBOOT_RAW_BINARY} | ||
28 | install ${S}/${UBOOT_DTB} ${DEPLOYDIR}/${UBOOT_DTB} | ||
29 | } | ||
30 | |||
31 | # DEPEND on dtc-native for mainline u-boot because the mainline u-boot depends | ||
32 | # on some of the latest syntax constructs for an appended in dtb used for | ||
33 | # items like secure boot/image signing. | ||
34 | DEPENDS += "dtc-native" | ||
35 | |||
36 | DESCRIPTION = "Mainline u-boot bootloader" | ||
37 | |||
38 | LIC_FILES_CHKSUM = "file://Licenses/README;md5=c7383a594871c03da76b3707929d2919" | ||
39 | |||
40 | PV = "2014.10" | ||
41 | |||
42 | UBOOT_BRANCH ?= "socfpga_v${PV}_arria10_bringup" | ||
43 | UBOOT_REPO ?= "git://github.com/altera-opensource/u-boot-socfpga.git" | ||
44 | UBOOT_PROT ?= "https" | ||
45 | |||
46 | SRC_URI = "${UBOOT_REPO};protocol=${UBOOT_PROT};branch=${UBOOT_BRANCH}" | ||
47 | |||
48 | #SoCEDS 15.1 release | ||
49 | SRCREV = "21d6a65d68d84efba88ff21ceae9bc8f2aa06857" | ||
50 | |||
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 @@ | |||
1 | define KMACHINE arria10 | ||
2 | define KTYPE standard | ||
3 | define KARCH arm | ||
4 | |||
5 | 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 @@ | |||
1 | define KMACHINE arria5 | ||
2 | define KTYPE standard | ||
3 | define KARCH arm | ||
4 | |||
5 | 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 @@ | |||
1 | define KMACHINE cyclone5 | ||
2 | define KTYPE standard | ||
3 | define KARCH arm | ||
4 | |||
5 | 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 @@ | |||
1 | include ktypes/standard/standard.scc | ||
2 | |||
3 | include features/altera/cyclone5_arria5-ip.scc | ||
4 | include features/altera/arria10-ip.scc | ||
5 | include features/altera/altera-ip.scc | ||
6 | include features/altera/board-common.scc | ||
7 | kconfig hardware features/altera/cyclone5_arria5-arm.cfg | ||
8 | |||
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 @@ | |||
1 | CONFIG_BLK_DEV_SD=y | ||
2 | CONFIG_BLK_DEV_INITRD=y | ||
3 | CONFIG_BLK_DEV_LOOP=y | ||
4 | CONFIG_BLK_DEV_RAM=y | ||
5 | 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 @@ | |||
1 | |||
2 | CONFIG_VFAT_FS=y | ||
3 | CONFIG_FAT_FS=y | ||
4 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
5 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | ||
6 | |||
7 | CONFIG_NTFS_FS=y | ||
8 | CONFIG_NTFS_RW=y | ||
9 | |||
10 | |||
11 | CONFIG_EXT2_FS=y | ||
12 | CONFIG_EXT2_FS_XATTR=y | ||
13 | CONFIG_EXT2_FS_POSIX_ACL=y | ||
14 | CONFIG_JFFS2_FS=y | ||
15 | CONFIG_JFFS2_SUMMARY=y | ||
16 | |||
17 | CONFIG_EXT3_FS=y | ||
18 | CONFIG_EXT4_FS=y | ||
19 | |||
20 | CONFIG_NFS_FS=y | ||
21 | CONFIG_ROOT_NFS=y | ||
22 | CONFIG_NFS_V4=y | ||
23 | CONFIG_NFS_USE_KERNEL_DNS=y | ||
24 | CONFIG_SUNRPC_GSS=y | ||
25 | |||
26 | CONFIG_TMPFS=y | ||
27 | |||
28 | CONFIG_DEVTMPFS=y | ||
29 | CONFIG_DEVTMPFS_MOUNT=y | ||
30 | CONFIG_CONFIGFS_FS=y | ||
31 | |||
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 @@ | |||
1 | CONFIG_NEW_LEDS=y | ||
2 | CONFIG_LEDS_CLASS=y | ||
3 | CONFIG_LEDS_GPIO=y | ||
4 | CONFIG_LEDS_TRIGGERS=y | ||
5 | CONFIG_LEDS_TRIGGER_TIMER=y | ||
6 | 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 @@ | |||
1 | CONFIG_MTD=y | ||
2 | CONFIG_MTD_CMDLINE_PARTS=y | ||
3 | CONFIG_MTD_BLOCK=y | ||
4 | CONFIG_MTD_PHYSMAP=y | ||
5 | CONFIG_MTD_PHYSMAP_OF=y | ||
6 | 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 @@ | |||
1 | CONFIG_NET=y | ||
2 | CONFIG_PACKET=y | ||
3 | CONFIG_UNIX=y | ||
4 | CONFIG_INET=y | ||
5 | CONFIG_IP_MULTICAST=y | ||
6 | CONFIG_IP_PNP=y | ||
7 | CONFIG_IP_PNP_DHCP=y | ||
8 | CONFIG_IP_PNP_BOOTP=y | ||
9 | CONFIG_IP_PNP_RARP=y | ||
10 | CONFIG_NET_IPIP=m | ||
11 | CONFIG_VLAN_8021Q=m | ||
12 | CONFIG_XFRM_ALGO=y | ||
13 | CONFIG_XFRM_MIGRATE=y | ||
14 | CONFIG_NET_KEY=y | ||
15 | CONFIG_NET_KEY_MIGRATE=y | ||
16 | CONFIG_NET_IP_TUNNEL=y | ||
17 | CONFIG_INET_TUNNEL=y | ||
18 | |||
19 | CONFIG_IPV6=y | ||
20 | CONFIG_INET6_XFRM_MODE_TRANSPORT=y | ||
21 | CONFIG_INET6_XFRM_MODE_TUNNEL=y | ||
22 | CONFIG_INET6_XFRM_MODE_BEET=y | ||
23 | CONFIG_IPV6_SIT=y | ||
24 | |||
25 | CONFIG_NETWORK_PHY_TIMESTAMPING=y | ||
26 | |||
27 | CONFIG_STP=y | ||
28 | CONFIG_GARP=y | ||
29 | CONFIG_VLAN_8021Q=y | ||
30 | CONFIG_VLAN_8021Q_GVRP=y | ||
31 | CONFIG_LLC=y | ||
32 | CONFIG_DNS_RESOLVER=y | ||
33 | |||
34 | 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 @@ | |||
1 | CONFIG_RTC_CLASS=y | ||
2 | CONFIG_RTC_SYSTOHC=y | ||
3 | CONFIG_RTC_HCTOSYS_DEVICE="rtc0" | ||
4 | CONFIG_RTC_INTF_SYSFS=y | ||
5 | CONFIG_RTC_INTF_PROC=y | ||
6 | 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 @@ | |||
1 | CONFIG_USB_STORAGE=y | ||
2 | CONFIG_USB_GADGET=y | ||
3 | CONFIG_USB_GADGET_VBUS_DRAW=2 | ||
4 | CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2 | ||
5 | CONFIG_USB_LIBCOMPOSITE=m | ||
6 | CONFIG_USB_MASS_STORAGE=m | ||
7 | 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 @@ | |||
1 | |||
2 | # Serial/UART | ||
3 | CONFIG_SERIAL_ALTERA_JTAGUART=m | ||
4 | CONFIG_SERIAL_ALTERA_UART=m | ||
5 | CONFIG_SERIAL_ALTERA_UART_MAXPORTS=4 | ||
6 | CONFIG_SERIAL_ALTERA_UART_BAUDRATE=115200 | ||
7 | |||
8 | # Watchdog | ||
9 | CONFIG_WATCHDOG=y | ||
10 | |||
11 | # Ethernet | ||
12 | CONFIG_ALTERA_TSE=m | ||
13 | |||
14 | # GPIO | ||
15 | CONFIG_GPIOLIB=y | ||
16 | CONFIG_OF_GPIO=y | ||
17 | CONFIG_GPIO_SYSFS=y | ||
18 | CONFIG_GPIO_ALTERA=m | ||
19 | |||
20 | # SPI | ||
21 | CONFIG_SPI=y | ||
22 | CONFIG_SPI_ALTERA=m | ||
23 | CONFIG_SPI_BITBANG=m | ||
24 | |||
25 | # Video | ||
26 | CONFIG_FB=y | ||
27 | CONFIG_FB_CFB_FILLRECT=m | ||
28 | CONFIG_FB_CFB_COPYAREA=m | ||
29 | CONFIG_FB_CFB_IMAGEBLIT=m | ||
30 | CONFIG_FB_ALTERA_VIP=m | ||
31 | |||
32 | # Mailbox | ||
33 | CONFIG_MAILBOX=y | ||
34 | CONFIG_ALTERA_MBOX=m | ||
35 | |||
36 | # Misc | ||
37 | CONFIG_ALTERA_HWMUTEX=m | ||
38 | CONFIG_ALTERA_SYSID=m | ||
39 | CONFIG_ALTERA_ILC=m | ||
40 | |||
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 @@ | |||
1 | define KFEATURE_DESCRIPTION "Altera Soft IP Core Drivers/Support" | ||
2 | define KFEATURE_COMPATIBILITY board | ||
3 | |||
4 | kconfig hardware altera-ip.cfg | ||
5 | |||
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 @@ | |||
1 | CONFIG_FPGA_MGR_SOCFPGA_A10=y | ||
2 | CONFIG_GPIO_A10SYCON=y | ||
3 | 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 @@ | |||
1 | define KFEATURE_DESCRIPTION "Altera 20nm SoC IP Core Drivers/Support" | ||
2 | define KFEATURE_COMPATIBILITY board | ||
3 | |||
4 | kconfig hardware arria10-ip.cfg | ||
5 | |||
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 @@ | |||
1 | # Ethernet PHYs | ||
2 | CONFIG_PHYLIB=y | ||
3 | CONFIG_MARVELL_PHY=y | ||
4 | CONFIG_MICREL_PHY=y | ||
5 | |||
6 | # EEPROM | ||
7 | CONFIG_EEPROM_AT24=y | ||
8 | |||
9 | # MTD | ||
10 | CONFIG_MTD=y | ||
11 | CONFIG_MTD_OF_PARTS=y | ||
12 | |||
13 | # RTC drivers | ||
14 | CONFIG_RTC_DRV_DS1307=y | ||
15 | |||
16 | CONFIG_NEWHAVEN_LCD=y | ||
17 | |||
18 | CONFIG_PMBUS=y | ||
19 | CONFIG_SENSORS_LTC2978=y | ||
20 | |||
21 | CONFIG_MTD_M25P80=y | ||
22 | CONFIG_M25PXX_USE_FAST_READ=y | ||
23 | |||
24 | CONFIG_SENSORS_MAX1619=y | ||
25 | |||
26 | CONFIG_I2C_CHARDEV=y | ||
27 | 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 @@ | |||
1 | define KFEATURE_DESCRIPTION "Evaluation Board Common Drivers" | ||
2 | define KFEATURE_COMPATIBILITY board | ||
3 | |||
4 | kconfig hardware board-common.cfg | ||
5 | |||
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 @@ | |||
1 | # ARM | ||
2 | CONFIG_ARCH_SOCFPGA=y | ||
3 | CONFIG_ARM_THUMBEE=y | ||
4 | CONFIG_SWP_EMULATE=y | ||
5 | CONFIG_ARM_CPU_TOPOLOGY=y | ||
6 | |||
7 | CONFIG_VFP=y | ||
8 | CONFIG_VFPv3=y | ||
9 | CONFIG_NEON=y | ||
10 | |||
11 | CONFIG_AEABI=y | ||
12 | CONFIG_OABI_COMPAT=y | ||
13 | |||
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 @@ | |||
1 | # FPGA BRIDGE - done | ||
2 | CONFIG_FPGA_BRIDGE=y | ||
3 | CONFIG_ALTERA_SOCFPGA_BRIDGE=y | ||
4 | |||
5 | # FPGA MANAGER - done | ||
6 | CONFIG_FPGA=y | ||
7 | CONFIG_FPGA_MGR_ALTERA=y | ||
8 | |||
9 | |||
10 | # UART - done | ||
11 | CONFIG_SERIAL_8250=y | ||
12 | CONFIG_SERIAL_8250_CONSOLE=y | ||
13 | CONFIG_SERIAL_8250_NR_UARTS=2 | ||
14 | CONFIG_SERIAL_8250_RUNTIME_UARTS=2 | ||
15 | CONFIG_SERIAL_8250_DW=y | ||
16 | CONFIG_SERIAL_CORE=y | ||
17 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
18 | CONFIG_CONSOLE_POLL=y | ||
19 | |||
20 | # SPI | ||
21 | CONFIG_SPI=y | ||
22 | CONFIG_SPI_CADENCE_QSPI=y | ||
23 | CONFIG_SPI_DESIGNWARE=y | ||
24 | CONFIG_SPI_DW_MMIO=y | ||
25 | |||
26 | # SRAM | ||
27 | CONFIG_SRAM=y | ||
28 | |||
29 | # DMA - done | ||
30 | # CONFIG_DMADEVICES=y | ||
31 | # CONFIG_PL330_DMA=y | ||
32 | |||
33 | # PL310 - done | ||
34 | CONFIG_OUTER_CACHE=y | ||
35 | CONFIG_OUTER_CACHE_SYNC=y | ||
36 | CONFIG_CACHE_L2X0=y | ||
37 | CONFIG_CACHE_PL310=y | ||
38 | |||
39 | # Watchdog - done | ||
40 | CONFIG_WATCHDOG=y | ||
41 | CONFIG_DW_WATCHDOG=y | ||
42 | |||
43 | # Ethernet - done | ||
44 | CONFIG_NET_VENDOR_STMICRO=y | ||
45 | CONFIG_STMMAC_ETH=y | ||
46 | CONFIG_STMMAC_PLATFORM=y | ||
47 | CONFIG_STMMAC_DEBUG_FS=y | ||
48 | CONFIG_STMMAC_RING=y | ||
49 | CONFIG_FIXED_PHY=y | ||
50 | |||
51 | # GPIO - done | ||
52 | CONFIG_GPIO_SYSFS=y | ||
53 | CONFIG_GPIOLIB=y | ||
54 | CONFIG_OF_GPIO=y | ||
55 | CONFIG_GPIO_GENERIC=y | ||
56 | CONFIG_GPIO_DWAPB=y | ||
57 | |||
58 | # I2C - done | ||
59 | CONFIG_I2C=y | ||
60 | CONFIG_I2C_DESIGNWARE_CORE=y | ||
61 | CONFIG_I2C_DESIGNWARE_PLATFORM=y | ||
62 | |||
63 | # CAN - done | ||
64 | CONFIG_CAN=y | ||
65 | CONFIG_CAN_C_CAN=y | ||
66 | CONFIG_CAN_C_CAN_PLATFORM=y | ||
67 | |||
68 | # MMC/SD - done | ||
69 | CONFIG_MMC=y | ||
70 | CONFIG_MMC_DW=y | ||
71 | CONFIG_MMC_DW_IDMAC=y | ||
72 | CONFIG_MMC_DW_PLTFM=y | ||
73 | CONFIG_MMC_DW_SOCFPGA=y | ||
74 | |||
75 | # NAND - done | ||
76 | CONFIG_MTD_NAND=y | ||
77 | CONFIG_MTD_NAND_ECC=y | ||
78 | CONFIG_MTD_NAND_DENALI=y | ||
79 | CONFIG_MTD_NAND_DENALI_DT=y | ||
80 | CONFIG_MTD_NAND_IDS=y | ||
81 | |||
82 | # USB (+otg) - done | ||
83 | CONFIG_USB_SUPPORT=y | ||
84 | CONFIG_USB_COMMON=y | ||
85 | CONFIG_USB_ARCH_HAS_HCD=y | ||
86 | CONFIG_USB=y | ||
87 | CONFIG_USB_ANNOUNCE_NEW_DEVICES=y | ||
88 | CONFIG_USB_DEFAULT_PERSIST=y | ||
89 | CONFIG_USB_DWC2_PLATFORM=y | ||
90 | CONFIG_USB_DWC2=y | ||
91 | CONFIG_USB_DWC2_DUAL_ROLE=y | ||
92 | CONFIG_USB_PHY=y | ||
93 | CONFIG_NOP_USB_XCEIV=y | ||
94 | |||
95 | |||
96 | # Timer | ||
97 | |||
98 | # SERIAL | ||
99 | CONFIG_SERIAL=y | ||
100 | CONFIG_SERIAL_CONSOLE=y | ||
101 | CONFIG_SERIAL_8250=y | ||
102 | CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y | ||
103 | CONFIG_SERIAL_8250_CONSOLE=y | ||
104 | CONFIG_SERIAL_8250_DMA=y | ||
105 | CONFIG_SERIAL_8250_NR_UARTS=2 | ||
106 | CONFIG_SERIAL_8250_RUNTIME_UARTS=2 | ||
107 | |||
108 | # CAN - done | ||
109 | CONFIG_CAN=y | ||
110 | CONFIG_CAN_C_CAN=y | ||
111 | 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 @@ | |||
1 | define KFEATURE_DESCRIPTION "Altera 28nm SoC IP Core Drivers/Support" | ||
2 | define KFEATURE_COMPATIBILITY board | ||
3 | |||
4 | kconfig hardware cyclone5_arria5-ip.cfg | ||
5 | |||
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 @@ | |||
1 | CONFIG_PRINTK=y | ||
2 | CONFIG_EARLY_PRINTK=y | ||
3 | CONFIG_LOG_BUF_SHIFT=14 | ||
4 | |||
5 | CONFIG_SYSVIPC=y | ||
6 | CONFIG_SYSCTL_SYSCALL=y | ||
7 | |||
8 | CONFIG_FHANDLE=y | ||
9 | |||
10 | CONFIG_PREEMPT_NONE=y | ||
11 | |||
12 | CONFIG_AUDIT=y | ||
13 | |||
14 | CONFIG_IKCONFIG=y | ||
15 | CONFIG_IKCONFIG_PROC=y | ||
16 | |||
17 | CONFIG_EMBEDDED=y | ||
18 | CONFIG_HIGH_RES_TIMERS=y | ||
19 | CONFIG_PERF_EVENTS=y | ||
20 | CONFIG_SLAB=y | ||
21 | CONFIG_SWAP=y | ||
22 | CONFIG_TIMER_STATS=y | ||
23 | CONFIG_RCU_CPU_STALL_TIMEOUT=60 | ||
24 | |||
25 | CONFIG_CPUSETS=y | ||
26 | CONFIG_PROC_PID_CPUSET=y | ||
27 | |||
28 | CONFIG_NAMESPACES=y | ||
29 | CONFIG_UTS_NS=y | ||
30 | CONFIG_IPC_NS=y | ||
31 | CONFIG_PID_NS=y | ||
32 | CONFIG_NET_NS=y | ||
33 | |||
34 | CONFIG_MODULES=y | ||
35 | CONFIG_MODULE_UNLOAD=y | ||
36 | |||
37 | CONFIG_CGROUPS=y | ||
38 | |||
39 | CONFIG_SLUB_DEBUG=y | ||
40 | CONFIG_SLUB=y | ||
41 | CONFIG_PROFILING=y | ||
42 | CONFIG_TRACEPOINTS=y | ||
43 | CONFIG_OPROFILE=y | ||
44 | |||
45 | CONFIG_DEFAULT_NOOP=y | ||
46 | CONFIG_DEFAULT_IOSCHED="noop" | ||
47 | |||
48 | CONFIG_MDIO_BITBANG=y | ||
49 | |||
50 | CONFIG_CAN_DEBUG_DEVICES=y | ||
51 | |||
52 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
53 | |||
54 | CONFIG_CONNECTOR=y | ||
55 | |||
56 | CONFIG_MEMORY=y | ||
57 | |||
58 | CONFIG_RD_XZ=y | ||
59 | |||
60 | CONFIG_NLS=y | ||
61 | CONFIG_NLS_CODEPAGE_437=y | ||
62 | CONFIG_NLS_ASCII=y | ||
63 | CONFIG_NLS_ISO8859_1=y | ||
64 | |||
65 | CONFIG_INPUT=y | ||
66 | CONFIG_INPUT_SPARSEKMAP=y | ||
67 | CONFIG_INPUT_EVDEV=y | ||
68 | |||
69 | CONFIG_CLKSRC_OF=y | ||
70 | CONFIG_COMMON_CLK_DEBUG=y | ||
71 | |||
72 | CONFIG_SMP=y | ||
73 | CONFIG_SMP_ON_UP=y | ||
74 | |||
75 | CONFIG_VMSPLIT_2G=y | ||
76 | |||
77 | CONFIG_LOCAL_TIMERS=y | ||
78 | CONFIG_SCHED_HRTICK=y | ||
79 | |||
80 | CONFIG_PM_SLEEP_SMP=y | ||
81 | |||
82 | CONFIG_PROC_DEVICETREE=y | ||
83 | |||
84 | CONFIG_SCSI=y | ||
85 | CONFIG_SCSI_DMA=y | ||
86 | |||
87 | CONFIG_SERIO_AMBAKMI=y | ||
88 | |||
89 | CONFIG_LEGACY_PTYS=y | ||
90 | CONFIG_LEGACY_PTY_COUNT=16 | ||
91 | |||
92 | CONFIG_GENERIC_PHY=y | ||
93 | |||
94 | CONFIG_MAGIC_SYSRQ=y | ||
95 | |||
96 | CONFIG_DETECT_HUNG_TASK=y | ||
97 | CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120 | ||
98 | CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0 | ||
99 | |||
100 | CONFIG_STACKTRACE=y | ||
101 | |||
102 | CONFIG_DEBUG_INFO=y | ||
103 | CONFIG_FRAME_POINTER=y | ||
104 | |||
105 | CONFIG_RCU_CPU_STALL_TIMEOUT=21 | ||
106 | CONFIG_NOP_TRACER=y | ||
107 | CONFIG_TRACE_CLOCK=y | ||
108 | CONFIG_RING_BUFFER=y | ||
109 | CONFIG_EVENT_TRACING=y | ||
110 | CONFIG_CONTEXT_SWITCH_TRACER=y | ||
111 | CONFIG_RING_BUFFER_ALLOW_SWAP=y | ||
112 | CONFIG_TRACING=y | ||
113 | CONFIG_GENERIC_TRACER=y | ||
114 | |||
115 | CONFIG_FUNCTION_TRACER=y | ||
116 | CONFIG_FUNCTION_GRAPH_TRACER=y | ||
117 | |||
118 | CONFIG_DYNAMIC_FTRACE=y | ||
119 | CONFIG_FTRACE_MCOUNT_RECORD=y | ||
120 | |||
121 | CONFIG_OLD_MCOUNT=y | ||
122 | CONFIG_DEBUG_USER=y | ||
123 | |||
124 | CONFIG_BINARY_PRINTF=y | ||
125 | |||
126 | |||
127 | |||
128 | |||
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 @@ | |||
1 | # Standard linux-xlnx base configuration | ||
2 | |||
3 | kconf non-hardware standard.cfg | ||
4 | kconf non-hardware cfg/blk.cfg | ||
5 | kconf non-hardware cfg/fs.cfg | ||
6 | kconf non-hardware cfg/leds.cfg | ||
7 | kconf non-hardware cfg/mtd.cfg | ||
8 | kconf non-hardware cfg/net.cfg | ||
9 | kconf non-hardware cfg/rtc.cfg | ||
10 | 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 @@ | |||
1 | |||
2 | FILESEXTRAPATHS_prepend := "${THISDIR}/config:" | ||
3 | SRC_URI_append += " \ | ||
4 | file://socfpga-base;type=kmeta;destsuffix=socfpga-base \ | ||
5 | " | ||
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 @@ | |||
1 | KERNEL_BRANCH ?= "socfpga-${PV}" | ||
2 | |||
3 | require recipes-kernel/linux/linux-altera.inc | ||
4 | |||
5 | |||
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..6897a28 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,7 @@ | |||
1 | DTB_SUBDIR="dts/" | 1 | LINUX_VERSION = "3.10" |
2 | LINUX_VERSION_SUFFIX = "-ltsi-rt" | ||
2 | 3 | ||
3 | KERNEL_BRANCH ?= "socfpga-${PV}-ltsi-rt" | 4 | KERNEL_DEVICETREE_cyclone5 ?= "socfpga_cyclone5.dtb" |
4 | 5 | KERNEL_DEVICETREE_arria5 ?= "socfpga_arria5.dtb" | |
5 | require recipes-kernel/linux/linux-altera.inc | ||
6 | COMPATIBLE_MACHINE = "(arria5|cyclone5)" | ||
7 | 6 | ||
7 | include linux-altera.inc | ||
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 @@ | |||
1 | KERNEL_BRANCH ?= "socfpga-${PV}-ltsi" | ||
2 | |||
3 | require recipes-kernel/linux/linux-altera.inc | ||
4 | |||
5 | |||
diff --git a/recipes-kernel/linux/linux-altera-ltsi_3.10.bb b/recipes-kernel/linux/linux-altera-ltsi_3.10.bb index 3749338..33c7d4c 100644 --- a/recipes-kernel/linux/linux-altera-ltsi_3.10.bb +++ b/recipes-kernel/linux/linux-altera-ltsi_3.10.bb | |||
@@ -1,5 +1,7 @@ | |||
1 | DTB_SUBDIR="dts/" | 1 | LINUX_VERSION = "3.10" |
2 | LINUX_VERSION_SUFFIX = "-ltsi" | ||
2 | 3 | ||
3 | require recipes-kernel/linux/linux-altera-ltsi.inc | 4 | KERNEL_DEVICETREE_cyclone5 ?= "socfpga_cyclone5.dtb" |
4 | COMPATIBLE_MACHINE = "(arria5|cyclone5)" | 5 | KERNEL_DEVICETREE_arria5 ?= "socfpga_arria5.dtb" |
5 | 6 | ||
7 | include linux-altera.inc | ||
diff --git a/recipes-kernel/linux/linux-altera.inc b/recipes-kernel/linux/linux-altera.inc index 0cddc82..80ed9c5 100644 --- a/recipes-kernel/linux/linux-altera.inc +++ b/recipes-kernel/linux/linux-altera.inc | |||
@@ -1,112 +1,33 @@ | |||
1 | PR = "r1" | ||
2 | |||
3 | KERNEL_REPO ?= "git://git.rocketboards.org/linux-socfpga.git" | ||
4 | KERNEL_PROT ?= "http" | ||
5 | KERNEL_DEFCONFIG ?= "socfpga_defconfig" | ||
6 | KERNEL_TAG ?= "${AUTOREV}" | ||
7 | |||
8 | SRC_URI = "${KERNEL_REPO};protocol=${KERNEL_PROT};branch=${KERNEL_BRANCH}" | ||
9 | |||
10 | SRCREV_pn-${PN} = "${KERNEL_TAG}" | ||
11 | |||
12 | inherit kernel | ||
13 | SECTION = "kernel" | ||
14 | DESCRIPTION = "Altera Linux kernel" | 1 | DESCRIPTION = "Altera Linux kernel" |
15 | LICENSE = "GPLv2" | 2 | LICENSE = "GPLv2" |
16 | 3 | ||
17 | LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" | 4 | LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" |
18 | 5 | ||
19 | S = "${WORKDIR}/git" | 6 | KERNEL_REPO ?= "git://github.com/altera-opensource/linux-socfpga.git" |
20 | 7 | KERNEL_PROT ?= "https" | |
21 | MACHINE_DEFCONFIG = "${KERNEL_DEFCONFIG}" | ||
22 | |||
23 | do_configure() { | ||
24 | export INITRAMFS_IMAGE_FILE="${INITRAMFS_IMAGE}-${MACHINE}.cpio" | ||
25 | |||
26 | unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE | ||
27 | export CROSS_COMPILE="${TARGET_PREFIX}" | ||
28 | export ARCH=${ARCH} | ||
29 | |||
30 | oe_runmake -C ${S} O=${B} ${MACHINE_DEFCONFIG} CONFIG_BLK_DEV_INITRD=y | ||
31 | |||
32 | pushd ${B} | ||
33 | cp .config .config.ori | ||
34 | |||
35 | grep CONFIG_BLK_DEV_INITRD .config || echo "CONFIG_BLK_DEV_INITRD=y" >> .config | ||
36 | grep CONFIG_INITRAMFS_SOURCE .config || echo "CONFIG_INITRAMFS_SOURCE=\"\"" >> .config | ||
37 | grep CONFIG_INITRAMFS_ROOT_UID .config || echo "CONFIG_INITRAMFS_ROOT_UID=0" >> .config | ||
38 | grep CONFIG_INITRAMFS_ROOT_GID .config || echo "CONFIG_INITRAMFS_ROOT_GID=0" >> .config | ||
39 | grep CONFIG_INITRAMFS_COMPRESSION_NONE .config || echo "CONFIG_INITRAMFS_COMPRESSION_NONE=y" >> .config | ||
40 | |||
41 | if [ ! -z ${INITRAMFS_IMAGE} ] && [ -e ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_FILE} ]; then | ||
42 | cp ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_FILE} . | ||
43 | echo "Found valid initramfs ${INITRAMFS_IMAGE_FILE}" | ||
44 | sed -i "s|^.*CONFIG_BLK_DEV_INITRD[ =].*$|CONFIG_BLK_DEV_INITRD=y|g" .config | ||
45 | sed -i "s|^.*CONFIG_INITRAMFS_SOURCE[ =].*$|CONFIG_INITRAMFS_SOURCE=\"${INITRAMFS_IMAGE_FILE}\"|g" .config | ||
46 | sed -i "s|^.*CONFIG_INITRAMFS_ROOT_UID[ =].*$|CONFIG_INITRAMFS_ROOT_UID=0|g" .config | ||
47 | sed -i "s|^.*CONFIG_INITRAMFS_ROOT_GID[ =].*$|CONFIG_INITRAMFS_ROOT_GID=0|g" .config | ||
48 | sed -i "s|^.*CONFIG_INITRAMFS_COMPRESSION_NONE[ =].*$|CONFIG_INITRAMFS_COMPRESSION_NONE=y|g" .config | ||
49 | oe_runmake -C ${S} O=${B} oldconfig | ||
50 | else | ||
51 | rm -f *.cpio | ||
52 | echo "Initramfs disabled or can't find valid initramfs ${INITRAMFS_IMAGE_FILE}" | ||
53 | sed -i "s|^CONFIG_BLK_DEV_INITRD=.*$|# CONFIG_BLK_DEV_INITRD is not set|g" .config | ||
54 | sed -i "s|^CONFIG_INITRAMFS_SOURCE=\".*\"$|# CONFIG_INITRAMFS_SOURCE is not set|g" .config | ||
55 | sed -i "s|^CONFIG_INITRAMFS_ROOT_UID=.*$|# CONFIG_INITRAMFS_ROOT_UID is not set|g" .config | ||
56 | sed -i "s|^CONFIG_INITRAMFS_ROOT_GID=.*$|# CONFIG_INITRAMFS_ROOT_GID is not set|g" .config | ||
57 | sed -i "s|^CONFIG_INITRAMFS_COMPRESSION_NONE=.*$|# CONFIG_INITRAMFS_COMPRESSION_NONE is not set|g" .config | ||
58 | oe_runmake -C ${S} O=${B} oldconfig | ||
59 | fi | ||
60 | popd | ||
61 | } | ||
62 | |||
63 | kernel_do_compile() { | ||
64 | unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE | ||
65 | oe_runmake -C ${S} O=${B} __headers CC="${KERNEL_CC}" LD="${KERNEL_LD}" | ||
66 | oe_runmake -C ${S} O=${B} ${KERNEL_IMAGETYPE_FOR_MAKE} ${KERNEL_ALT_IMAGETYPE} CC="${KERNEL_CC}" LD="${KERNEL_LD}" LOADADDR=0x8000 | ||
67 | if test "${KERNEL_IMAGETYPE_FOR_MAKE}.gz" = "${KERNEL_IMAGETYPE}"; then | ||
68 | gzip -9c < "${KERNEL_IMAGETYPE_FOR_MAKE}" > "${KERNEL_OUTPUT}" | ||
69 | fi | ||
70 | } | ||
71 | 8 | ||
72 | do_compile_dtb() { | 9 | # Kernel CONFIG_LOCALVERSION |
73 | unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE | 10 | LINUX_VERSION_EXTENSION ?= "-altera" |
74 | sync | ||
75 | oe_runmake -C ${S} O=${B} ARCH=${ARCH} CROSS_COMPILE="${TARGET_PREFIX}" dtbs || | ||
76 | oe_runmake -C ${S} O=${B} ARCH=${ARCH} CROSS_COMPILE="${TARGET_PREFIX}" dtbs | ||
77 | } | ||
78 | 11 | ||
79 | addtask compile_dtb after do_compile before do_build | 12 | # Build branch name |
13 | LINUX_VERSION_PREFIX ?= "socfpga-" | ||
14 | LINUX_VERSION_SUFFIX ?= "" | ||
15 | LINUX_VERSION ?= "4.0" | ||
80 | 16 | ||
81 | KERNEL_DEVICETREE ?= "socfpga_vt socfpga_cyclone5 socfpga_arria5" | 17 | SRCREV ?= "${AUTOREV}" |
18 | SRCREV_machine ?= "${AUTOREV}" | ||
19 | PV = "${LINUX_VERSION}" | ||
20 | PV_append = "+git${SRCPV}" | ||
82 | 21 | ||
83 | do_deploy_dtb() { | ||
84 | install -d ${DEPLOY_DIR_IMAGE} | ||
85 | cd ${DEPLOY_DIR_IMAGE} | ||
86 | if test -n "${KERNEL_DEVICETREE}"; then | ||
87 | for DTB_FILE in ${KERNEL_DEVICETREE}; do | ||
88 | DTB_SYMLINK_NAME="${DTB_FILE}.dtb" | ||
89 | DEVICE_TREE_OUTPUT="${B}/arch/${ARCH}/boot/${DTB_SUBDIR}${DTB_FILE}.dtb" | ||
90 | DTB_NAME="${DTB_FILE}-${DATETIME}.dtb" | ||
91 | if [ ! -f ${DEVICE_TREE_OUTPUT} ]; then | ||
92 | echo "Warning: ${DEVICE_TREE_OUTPUT} is not available!" | ||
93 | continue | ||
94 | fi | ||
95 | install -m 0644 ${DEVICE_TREE_OUTPUT} ${DTB_NAME} | ||
96 | rm -f ${DTB_SYMLINK_NAME} | ||
97 | ln -sf ${DTB_NAME} ${DTB_SYMLINK_NAME} | ||
98 | done | ||
99 | fi | ||
100 | } | ||
101 | 22 | ||
102 | addtask deploy_dtb after do_compile_dtb before do_build | 23 | KBRANCH ?= "${LINUX_VERSION_PREFIX}${LINUX_VERSION}${LINUX_VERSION_SUFFIX}" |
103 | 24 | ||
104 | VMLINUX_NAME ?= "vmlinux-${PV}-${PR}-${MACHINE}-${DATETIME}" | 25 | SRC_URI = "${KERNEL_REPO};protocol=${KERNEL_PROT};branch=${KBRANCH}" |
105 | 26 | ||
106 | kernel_do_deploy_append() { | 27 | # Default kernel devicetrees |
107 | install -m 0644 ${B}/vmlinux ${DEPLOYDIR}/${VMLINUX_NAME} | 28 | KERNEL_DEVICETREE_cyclone5 ?= "socfpga_cyclone5_socdk.dtb socfpga_cyclone5_sockit.dtb socfpga_cyclone5_socrates.dtb" |
108 | cd ${DEPLOYDIR} && | 29 | KERNEL_DEVICETREE_arria5 ?= "socfpga_arria5_socdk.dtb" |
109 | rm -f vmlinux && | 30 | KERNEL_DEVICETREE_arria10 ?= "socfpga_arria10_socdk_sdmmc.dtb socfpga_arria10_socdk_qspi.dtb socfpga_arria10_swvp.dtb" |
110 | ln -sf ${VMLINUX_NAME} vmlinux | ||
111 | } | ||
112 | 31 | ||
32 | require recipes-kernel/linux/linux-yocto.inc | ||
33 | 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 @@ | |||
1 | DTB_SUBDIR="dts/" | ||
2 | |||
3 | KERNEL_DEVICETREE = "socfpga_cyclone5_socdk socfpga_arria5_socdk socfpga_vt" | ||
4 | |||
5 | require recipes-kernel/linux/linux-altera-latest.inc | ||
6 | 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..c26248f --- /dev/null +++ b/recipes-kernel/linux/linux-altera_4.0.bb | |||
@@ -0,0 +1,3 @@ | |||
1 | LINUX_VERSION = "4.0" | ||
2 | |||
3 | include linux-altera.inc | ||
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..4833c3e --- /dev/null +++ b/recipes-kernel/linux/linux-altera_4.1.bb | |||
@@ -0,0 +1,3 @@ | |||
1 | LINUX_VERSION = "4.1" | ||
2 | |||
3 | include linux-altera.inc | ||
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..482c219 --- /dev/null +++ b/recipes-kernel/linux/linux-altera_4.2.bb | |||
@@ -0,0 +1,3 @@ | |||
1 | LINUX_VERSION = "4.2" | ||
2 | |||
3 | include linux-altera.inc | ||