From 0c6e036fdfec58b69903a10e886a9dfae8fe4c9f Mon Sep 17 00:00:00 2001 From: Dalon Westergreen Date: Wed, 11 Jan 2017 10:16:43 -0800 Subject: Update uboot and kernel recipes, and fix sdcard class (#44) * u-boot-socfpga: update PV for all recipes and add common include for mainline uboot versions u-boot-socfpga versioning scheme varied, some prepended with a 'v' others not. u-boot mainline tags versions with vYYYY.MM so we should be consistent. Create a single include for all mainline uboot versions. Signed-off-by: Dalon Westergreen * u-boot-socfpga: Add support for v2016.11 Signed-off-by: Dalon Westergreen * Update sdcard image class and add to arria5 / cyclone 5 machine conf * Move arria5/cyclone5 to uboot-socfpga v2016.11 Signed-off-by: Dalon Westergreen * Update sdcard script Seemed to be an issue with the rootfs partition being slightly smaller then the ROOTFS_SIZE in some cases. Signed-off-by: Dalon Westergreen * uboot: Cleanup v2014.10 recipe v2014.10 is used for Arria10, at this time it does not support GCC6 which is the default for morty * Clean up arria5 and cyclone5 machine definitions Signed-off-by: Dalon Westergreen * linux-socfpga: add 4.7 and 4.7 dev recipes Signed-off-by: Dalon Westergreen * linux-socfpga: update srcrev for 4.6 kernel and remove 4.6 dev Signed-off-by: Dalon Westergreen * linux-socfpga: delete 4.1 dev as 4.1 is no longer maintained * linux-socfpga: update 4.1.22 srcrev to latest release --- classes/image_types_socfpga.bbclass | 124 --------------- classes/sdcard_image-socfpga.bbclass | 172 +++++++++++++++++++++ conf/machine/arria10.conf | 16 +- conf/machine/arria5.conf | 9 +- conf/machine/cyclone5.conf | 12 +- recipes-bsp/u-boot/u-boot-common_2016.05.inc | 16 -- recipes-bsp/u-boot/u-boot-socfpga-common.inc | 11 ++ recipes-bsp/u-boot/u-boot-socfpga_2014.10.bb | 50 ------ recipes-bsp/u-boot/u-boot-socfpga_2016.05.bb | 24 --- recipes-bsp/u-boot/u-boot-socfpga_v2014.10.bb | 18 +++ recipes-bsp/u-boot/u-boot-socfpga_v2016.05.bb | 29 ++++ recipes-bsp/u-boot/u-boot-socfpga_v2016.11.bb | 10 ++ recipes-kernel/linux/linux-altera-dev_4.6.bb | 3 - recipes-kernel/linux/linux-altera-dev_4.7.bb | 3 + recipes-kernel/linux/linux-altera-ltsi-dev_4.1.bb | 11 -- .../linux/linux-altera-ltsi-rt_4.1.22.bb | 2 +- recipes-kernel/linux/linux-altera-ltsi_4.1.22.bb | 2 +- recipes-kernel/linux/linux-altera_4.6.bb | 2 +- recipes-kernel/linux/linux-altera_4.7.bb | 5 + 19 files changed, 279 insertions(+), 240 deletions(-) delete mode 100644 classes/image_types_socfpga.bbclass create mode 100644 classes/sdcard_image-socfpga.bbclass delete mode 100644 recipes-bsp/u-boot/u-boot-common_2016.05.inc create mode 100644 recipes-bsp/u-boot/u-boot-socfpga-common.inc delete mode 100644 recipes-bsp/u-boot/u-boot-socfpga_2014.10.bb delete mode 100644 recipes-bsp/u-boot/u-boot-socfpga_2016.05.bb create mode 100644 recipes-bsp/u-boot/u-boot-socfpga_v2014.10.bb create mode 100644 recipes-bsp/u-boot/u-boot-socfpga_v2016.05.bb create mode 100644 recipes-bsp/u-boot/u-boot-socfpga_v2016.11.bb delete mode 100644 recipes-kernel/linux/linux-altera-dev_4.6.bb create mode 100644 recipes-kernel/linux/linux-altera-dev_4.7.bb delete mode 100644 recipes-kernel/linux/linux-altera-ltsi-dev_4.1.bb create mode 100644 recipes-kernel/linux/linux-altera_4.7.bb diff --git a/classes/image_types_socfpga.bbclass b/classes/image_types_socfpga.bbclass deleted file mode 100644 index 860752e..0000000 --- a/classes/image_types_socfpga.bbclass +++ /dev/null @@ -1,124 +0,0 @@ -inherit image_types - -SDCARD_ROOTFS ?= "${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.ext3" - -# Boot partition size [in KiB] -IMAGE_ROOTFS_ALIGNMENT_cyclone5 ?= "2048" -IMAGE_ROOTFS_ALIGNMENT_arria5 ?= "2048" - -BOOT_SPACE ?= "102400" - -IMAGE_DEPENDS_sdcard = "parted-native:do_populate_sysroot \ - dosfstools-native:do_populate_sysroot \ - mtools-native:do_populate_sysroot \ - virtual/kernel:do_deploy \ - virtual/bootloader:do_deploy" - -SDCARD_GENERATION_COMMAND_cyclone5 = "generate_28nm_sdcard" -SDCARD_GENERATION_COMMAND_arria5 = "generate_28nm_sdcard" - -# -# Generate the boot image with the boot scripts and required Device Tree -# files -_generate_boot_image() { - local boot_part=$1 - - # Create boot partition image - BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDCARD} unit b print \ - | awk "/ $boot_part / { print substr(\$4, 1, length(\$4 -1)) / 1024 }") - - # mkdosfs will sometimes use FAT16 when it is not appropriate, - # resulting in a boot failure from SYSLINUX. Use FAT32 for - # images larger than 512MB, otherwise let mkdosfs decide. - if [ $(expr $BOOT_BLOCKS / 1024) -gt 512 ]; then - FATSIZE="-F 32" - fi - - rm -f ${WORKDIR}/boot.img - mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 ${FATSIZE} -C ${WORKDIR}/boot.img $BOOT_BLOCKS - - mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin ::/${KERNEL_IMAGETYPE} - - # Copy boot scripts - for item in ${BOOT_SCRIPTS}; do - src=`echo $item | awk -F':' '{ print $1 }'` - dst=`echo $item | awk -F':' '{ print $2 }'` - - mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/$src ::/$dst - done - - # Copy device tree file - if test -n "${KERNEL_DEVICETREE}"; then - for DTS_FILE in ${KERNEL_DEVICETREE}; do - DTS_BASE_NAME=`basename ${DTS_FILE} | awk -F "." '{print $1}'` - if [ -e "${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb" ]; then - kernel_bin="`readlink ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin`" - kernel_bin_for_dtb="`readlink ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb | sed "s,$DTS_BASE_NAME,${MACHINE},g;s,\.dtb$,.bin,g"`" - if [ $kernel_bin = $kernel_bin_for_dtb ]; then - mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb ::/${DTS_BASE_NAME}.dtb - fi - else - bbfatal "${DTS_FILE} does not exist." - fi - done - fi -} - -generate_28nm_sdcard () { - # Create partition table - parted -s ${SDCARD} mklabel msdos - parted -s ${SDCARD} unit KiB mkpart primary fat32 ${IMAGE_ROOTFS_ALIGNMENT} $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED}) - parted -s ${SDCARD} unit KiB mkpart primary $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED}) $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED} \+ $ROOTFS_SIZE) - parted -s ${SDCARD} unit KiB mkpart primary 1024 2048 - - #set part 3 to type a2 for spl / uboot image - echo -ne "\xa2" | dd of=${SDCARD} bs=1 count=1 seek=482 conv=notrunc - - - if [ -e "${DEPLOY_DIR_IMAGE}/${SPL_BINARY}-${UBOOT_CONFIG}" ] - then - dd if=${DEPLOY_DIR_IMAGE}/${SPL_BINARY}-${UBOOT_CONFIG} of=${SDCARD} conv=notrunc seek=1 bs=$(expr 1024 \* 1024) - elif [ -e "${DEPLOY_DIR_IMAGE}/${SPL_BINARY}-${UBOOT_CONFIG}" ] - then - dd if=${DEPLOY_DIR_IMAGE}/${SPL_BINARY} of=${SDCARD} conv=notrunc seek=1 bs=$(expr 1024 \* 1024) - else - bbfatal "${SPL_BINARY} does not exist." - fi - - parted ${SDCARD} print - - _generate_boot_image 1 - # Burn Partition - dd if=${WORKDIR}/boot.img of=${SDCARD} conv=notrunc,fsync seek=1 bs=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) - dd if=${SDCARD_ROOTFS} of=${SDCARD} conv=notrunc,fsync seek=1 bs=$(expr ${BOOT_SPACE_ALIGNED} \* 1024 + ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) -} - -IMAGE_CMD_sdcard () { - if [ -z "${SDCARD_ROOTFS}" ]; then - bberror "SDCARD_ROOTFS is undefined. To use sdcard image from Freescale's BSP it needs to be defined." - exit 1 - fi - - # Align boot partition and calculate total SD card image size - BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE} + ${IMAGE_ROOTFS_ALIGNMENT} - 1) - BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE_ALIGNED} - ${BOOT_SPACE_ALIGNED} % ${IMAGE_ROOTFS_ALIGNMENT}) - SDCARD_SIZE=$(expr ${IMAGE_ROOTFS_ALIGNMENT} + ${BOOT_SPACE_ALIGNED} + $ROOTFS_SIZE + ${IMAGE_ROOTFS_ALIGNMENT}) - - # Initialize a sparse file - if [ "x${UBOOT_CONFIG}" != "x" ] - then - SDCARD_NAME="${IMAGE_NAME}-${UBOOT_CONFIG}.rootfs.sdcard" - else - SDCARD_NAME="${IMAGE_NAME}.rootfs.sdcard" - fi - SDCARD="${DEPLOY_DIR_IMAGE}/${SDCARD_NAME}" - dd if=/dev/zero of=${SDCARD} bs=1 count=0 seek=$(expr 1024 \* ${SDCARD_SIZE}) - rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.sdcard - ln -s ${SDCARD_NAME} ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.sdcard - - ${SDCARD_GENERATION_COMMAND} -} - -# The sdcard requires the rootfs filesystem to be built before using -# it so we must make this dependency explicit. -IMAGE_TYPEDEP_sdcard = "${@d.getVar('SDCARD_ROOTFS', 1).split('.')[-1]}" diff --git a/classes/sdcard_image-socfpga.bbclass b/classes/sdcard_image-socfpga.bbclass new file mode 100644 index 0000000..0f59957 --- /dev/null +++ b/classes/sdcard_image-socfpga.bbclass @@ -0,0 +1,172 @@ +inherit image_types + +# Create an sdcard image suitable for the atlas board +# This is copied from the raspberrypi and freescale sdcard classes + +# Disk layout +# 0 -> 8*1024 - reserverd +# 8*1024 -> 32*1024 - +# 32*1024 -> 1024*1024 - +# 1024*1024 -> BOOT_SPACE - bootloader and kernel in Part 3 +# BOOT_SPACE*1024 -> FAT_SPACE + + + +# This image depends on the rootfs image +IMAGE_TYPEDEP_socfpga-sdimg = "${SDIMG_ROOTFS_TYPE}" + +# Boot partition volume id +BOOTDD_VOLUME_ID ?= "${MACHINE}" + +# Boot partition size [in KiB] -> size 2M for A10 +BOOT_SPACE ?= "2048" + +# Fat partition size +FAT_SPACE ?= "102400" + +# Boot partition begin at sector 1024 +# This is required as for c5/a5 mainline uboot hard codes the location +# of the uboot image in the sdcard to 0xa00 sector +IMAGE_ROOTFS_ALIGNMENT = "1024" + +# ROOTFS_SIZE_MOD ?= "524288" +ROOTFS_SIZE_MOD ?= "16384" + +# Use an uncompressed ext3 by default as rootfs +SDIMG_ROOTFS_TYPE = "ext3" +SDIMG_ROOTFS = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.${SDIMG_ROOTFS_TYPE}" + + +IMAGE_DEPENDS_socfpga-sdimg += " \ + parted-native \ + mtools-native \ + dosfstools-native \ + virtual/kernel \ + virtual/bootloader \ + " + +rootfs[depends] += "virtual/kernel:do_deploy" + +# SD card image name +SDIMG = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.socfpga-sdimg" + +IMAGEDATESTAMP = "${@time.strftime('%Y.%m.%d',time.gmtime())}" + +# After uboot v2016.05 the boot partition number was changed from 3 to 1 so as a +# result we need 2 different functions for creating the boot partitions just to +# change the partition creation order + +SOCFPGA_SDIMG_PARTITION_COMMAND ?= "generate_sdcard_partitions_v2016_05_and_earlier" + +generate_sdcard_partitions_v2016_05_and_earlier () { + + # Create partition table + parted -s ${SDIMG} mklabel msdos + # P1: Fat partition + parted -s ${SDIMG} unit KiB mkpart primary fat32 $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED}) $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED} \+ ${FAT_SPACE_ALIGNED}) + # P2: Linux FS partition + parted -s ${SDIMG} unit KiB mkpart primary $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED} \+ ${FAT_SPACE_ALIGNED}) $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED} \+ ${FAT_SPACE_ALIGNED} \+ ${ROOTFS_SIZE_ALIGNED}) + # P3: A2 partition for bootloader + parted -s ${SDIMG} unit KiB mkpart primary ${IMAGE_ROOTFS_ALIGNMENT} $(expr ${BOOT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT}) + + # set part 3 to type a2 for spl / uboot image + # 446 to partition table, 16 bytes per entry, 4 byte offset to partition type + echo -ne "\xa2" | dd of=${SDIMG} bs=1 count=1 seek=$(expr 446 + 16 + 16 + 4) conv=notrunc && sync && sync + + # Create a vfat image with boot files + FAT_BLOCKS=$(LC_ALL=C parted -s ${SDIMG} unit b print | awk '/ 1 / { print substr($4, 1, length($4 -1)) / 512 /2 }') + rm -f ${WORKDIR}/fat.img + mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/fat.img $FAT_BLOCKS + +} + +generate_sdcard_partitions_v2016_11_and_newer () { + + # Create partition table + parted -s ${SDIMG} mklabel msdos + # P1: A2 partition for bootloader + parted -s ${SDIMG} unit KiB mkpart primary ${IMAGE_ROOTFS_ALIGNMENT} $(expr ${BOOT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT}) + # P2: Fat partition + parted -s ${SDIMG} unit KiB mkpart primary fat32 $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED}) $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED} \+ ${FAT_SPACE_ALIGNED}) + # P3: Linux FS partition +# parted -s ${SDIMG} unit KiB mkpart primary $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED} \+ ${FAT_SPACE_ALIGNED}) $(expr ${BOOT_SPACE_ALIGNED} \+ ${FAT_SPACE_ALIGNED} \+ ${ROOTFS_SIZE_ALIGNED}) + parted -s ${SDIMG} unit KiB mkpart primary $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED} \+ ${FAT_SPACE_ALIGNED}) $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED} \+ ${FAT_SPACE_ALIGNED} \+ ${ROOTFS_SIZE_ALIGNED}) + + # set part 1 to type a2 for spl / uboot image + # 446 to partition table, 16 bytes per entry, 4 byte offset to partition type + echo -ne "\xa2" | dd of=${SDIMG} bs=1 count=1 seek=$(expr 446 + 4) conv=notrunc && sync && sync + + # Create a vfat image with boot files + FAT_BLOCKS=$(LC_ALL=C parted -s ${SDIMG} unit b print | awk '/ 2 / { print substr($4, 1, length($4 -1)) / 512 /2 }') + rm -f ${WORKDIR}/fat.img + mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/fat.img $FAT_BLOCKS + +} + +IMAGE_CMD_socfpga-sdimg () { + + # Align partitions + BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE} + ${IMAGE_ROOTFS_ALIGNMENT} - 1) + BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE_ALIGNED} - ${BOOT_SPACE_ALIGNED} % ${IMAGE_ROOTFS_ALIGNMENT}) + FAT_SPACE_ALIGNED=$(expr ${FAT_SPACE} + ${IMAGE_ROOTFS_ALIGNMENT} - 1) + FAT_SPACE_ALIGNED=$(expr ${FAT_SPACE_ALIGNED} - ${FAT_SPACE_ALIGNED} % ${IMAGE_ROOTFS_ALIGNMENT}) + + ROOTFS_SIZE_ALIGNED=$(expr ${ROOTFS_SIZE} \+ ${ROOTFS_SIZE_MOD}) + ROOTFS_SIZE_ALIGNED=$(expr ${ROOTFS_SIZE_ALIGNED} \- ${ROOTFS_SIZE_ALIGNED} \% ${ROOTFS_SIZE_MOD}) + + SDIMG_SIZE=$(expr ${IMAGE_ROOTFS_ALIGNMENT} + ${BOOT_SPACE_ALIGNED} + ${FAT_SPACE_ALIGNED} + ${ROOTFS_SIZE_ALIGNED} + ${IMAGE_ROOTFS_ALIGNMENT}) + + # Initialize sdcard image file + dd if=/dev/zero of=${SDIMG} bs=1 count=0 seek=$(expr 1024 \* ${SDIMG_SIZE}) && sync && sync + + # Create partition table + ${SOCFPGA_SDIMG_PARTITION_COMMAND} + + # Copy kernel image + mcopy -i ${WORKDIR}/fat.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin ::/${KERNEL_IMAGETYPE} + + # Copy boot scripts + if [ -e "${DEPLOY_DIR_IMAGE}/${MACHINE}.scr" ] + then + mcopy -i ${WORKDIR}/fat.img -s ${DEPLOY_DIR_IMAGE}/${MACHINE}.scr ::/u-boot.scr + fi + + # Copy device tree file + if test -n "${KERNEL_DEVICETREE}"; then + for DTS_FILE in ${KERNEL_DEVICETREE}; do + DTS_BASE_NAME=`basename ${DTS_FILE} | awk -F "." '{print $1}'` + if [ -e "${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb" ]; then + kernel_bin="`readlink ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin`" + kernel_bin_for_dtb="`readlink ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb | sed "s,$DTS_BASE_NAME,${MACHINE},g;s,\.dtb$,.bin,g"`" + if [ $kernel_bin = $kernel_bin_for_dtb ]; then + mcopy -i ${WORKDIR}/fat.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb ::/${DTS_BASE_NAME}.dtb + fi + fi + done + fi + + # Add stamp file + echo "${IMAGE_NAME}-${IMAGEDATESTAMP}" > ${WORKDIR}/image-version-info + mcopy -i ${WORKDIR}/fat.img -v ${WORKDIR}//image-version-info :: + + # Burn Partitions + dd if=${WORKDIR}/fat.img of=${SDIMG} conv=notrunc seek=1 bs=$(expr 1024 \* ${BOOT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync + # If SDIMG_ROOTFS_TYPE is a .xz file use xzcat + if echo "${SDIMG_ROOTFS_TYPE}" | egrep -q "*\.xz" + then + xzcat ${SDIMG_ROOTFS} | dd of=${SDIMG} conv=notrunc seek=1 bs=$(expr 1024 \* ${BOOT_SPACE_ALIGNED} + 1024 \* ${FAT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync + else + dd if=${SDIMG_ROOTFS} of=${SDIMG} conv=notrunc seek=1 bs=$(expr 1024 \* ${BOOT_SPACE_ALIGNED} + 1024 \* ${FAT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync + fi + + if [ -e "${DEPLOY_DIR_IMAGE}/${SPL_BINARY}-${UBOOT_CONFIG}" ] + then + dd if=${DEPLOY_DIR_IMAGE}/${SPL_BINARY}-${UBOOT_CONFIG} of=${SDIMG} conv=notrunc seek=1 bs=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync + elif [ -e "${DEPLOY_DIR_IMAGE}/${SPL_BINARY}" ] + then + dd if=${DEPLOY_DIR_IMAGE}/${SPL_BINARY} of=${SDIMG} conv=notrunc seek=1 bs=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync + else + bbfatal "${SPL_BINARY} does not exist." + fi + +} diff --git a/conf/machine/arria10.conf b/conf/machine/arria10.conf index 5cda0eb..d5f3427 100644 --- a/conf/machine/arria10.conf +++ b/conf/machine/arria10.conf @@ -4,9 +4,19 @@ require conf/machine/include/socfpga.inc -PREFERRED_VERSION_u-boot-socfpga ?= "2014.10" -UBOOT_MACHINE = "socfpga_arria10_defconfig" +PREFERRED_VERSION_u-boot-socfpga ?= "v2014.10%" -KMACHINE = "arria10" +UBOOT_CONFIG ??= "arria10-socdk" + +UBOOT_CONFIG[arria10-socdk] = "socfpga_arria10_defconfig" +UBOOT_CONFIG[arria10-socdk-nand] = "socfpga_arria10_nand_defconfig" +UBOOT_CONFIG[arria10-socdk-qspi] = "socfpga_arria10_qspi_defconfig" +KMACHINE = "arria10" +# Default kernel devicetrees +KERNEL_DEVICETREE ?= "\ + socfpga_arria10_socdk_sdmmc.dtb \ + socfpga_arria10_socdk_qspi.dtb \ + socfpga_arria10_socdk_nand.dts \ + " diff --git a/conf/machine/arria5.conf b/conf/machine/arria5.conf index 1cf893f..a04f2d5 100644 --- a/conf/machine/arria5.conf +++ b/conf/machine/arria5.conf @@ -4,7 +4,7 @@ require conf/machine/include/socfpga.inc -PREFERRED_VERSION_u-boot-socfpga ?= "2016.05%" +PREFERRED_VERSION_u-boot-socfpga ?= "v2016.11%" UBOOT_CONFIG ??= "arria5-socdk" @@ -13,7 +13,10 @@ UBOOT_CONFIG[arria5-socdk] = "socfpga_arria5_defconfig" KMACHINE = "arria5" # Default kernel devicetrees -KERNEL_DEVICETREE_arria5 ?= "socfpga_arria5_socdk.dtb" +KERNEL_DEVICETREE_arria5 ?= " \ + socfpga_arria5_socdk.dtb \ + " # Add support for SDCARD creation -IMAGE_CLASSES += "image_types_socfpga" +IMAGE_CLASSES += "sdcard_image-socfpga" +SOCFPGA_SDIMG_PARTITION_COMMAND = "generate_sdcard_partitions_v2016_11_and_newer" diff --git a/conf/machine/cyclone5.conf b/conf/machine/cyclone5.conf index d28fbe7..1c4586e 100644 --- a/conf/machine/cyclone5.conf +++ b/conf/machine/cyclone5.conf @@ -4,7 +4,7 @@ require conf/machine/include/socfpga.inc -PREFERRED_VERSION_u-boot-socfpga ?= "2016.05%" +PREFERRED_VERSION_u-boot-socfpga ?= "v2016.11%" UBOOT_CONFIG ??= "cyclone5-socdk" @@ -18,8 +18,14 @@ UBOOT_CONFIG[sr1500] = "socfpga_sr1500_defconfig" KMACHINE = "cyclone5" # Default kernel devicetrees -KERNEL_DEVICETREE ?= "socfpga_cyclone5_socdk.dtb socfpga_cyclone5_sockit.dtb socfpga_cyclone5_socrates.dtb socfpga_cyclone5_de0_sockit.dtb" +KERNEL_DEVICETREE ?= "\ + socfpga_cyclone5_socdk.dtb \ + socfpga_cyclone5_sockit.dtb \ + socfpga_cyclone5_socrates.dtb \ + socfpga_cyclone5_de0_sockit.dtb \ + " # Add support for SDCARD creation -IMAGE_CLASSES += "image_types_socfpga" +IMAGE_CLASSES += "sdcard_image-socfpga" +SOCFPGA_SDIMG_PARTITION_COMMAND = "generate_sdcard_partitions_v2016_11_and_newer" diff --git a/recipes-bsp/u-boot/u-boot-common_2016.05.inc b/recipes-bsp/u-boot/u-boot-common_2016.05.inc deleted file mode 100644 index 985e221..0000000 --- a/recipes-bsp/u-boot/u-boot-common_2016.05.inc +++ /dev/null @@ -1,16 +0,0 @@ -HOMEPAGE = "http://www.denx.de/wiki/U-Boot/WebHome" -SECTION = "bootloaders" - -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6" - -# This revision corresponds to the tag "v2016.05" -# We use the revision in order to avoid having to fetch it from the -# repo during parse -SRCREV = "aeaec0e682f45b9e0c62c522fafea353931f73ed" - -PV = "v2016.05+git${SRCPV}" - -SRC_URI = "git://git.denx.de/u-boot.git;branch=master" - -S = "${WORKDIR}/git" diff --git a/recipes-bsp/u-boot/u-boot-socfpga-common.inc b/recipes-bsp/u-boot/u-boot-socfpga-common.inc new file mode 100644 index 0000000..d0f1723 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-socfpga-common.inc @@ -0,0 +1,11 @@ +HOMEPAGE = "http://www.denx.de/wiki/U-Boot/WebHome" +SECTION = "bootloaders" + +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6" + +PV_append = "+git${SRCPV}" + +SRC_URI = "git://git.denx.de/u-boot.git;branch=master" + +S = "${WORKDIR}/git" diff --git a/recipes-bsp/u-boot/u-boot-socfpga_2014.10.bb b/recipes-bsp/u-boot/u-boot-socfpga_2014.10.bb deleted file mode 100644 index 7ee2a5c..0000000 --- a/recipes-bsp/u-boot/u-boot-socfpga_2014.10.bb +++ /dev/null @@ -1,50 +0,0 @@ -UBOOT_SUFFIX ?= "img" -UBOOT_RAW_BINARY ?= "u-boot-dtb.bin" -UBOOT_DTB ?= "u-boot.dtb" - -require ${COREBASE}/meta/recipes-bsp/u-boot/u-boot.inc - -FILESEXTRAPATHS_prepend := "${THISDIR}/u-boot:" - -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb" - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -PROVIDES += "u-boot" -PKG_${PN} = "u-boot" -PKG_${PN}-dev = "u-boot-dev" -PKG_${PN}-dbg = "u-boot-dbg" - -S = "${WORKDIR}/git" - -# SPL (Second Program Loader) to be loaded over UART -SPL_UART_BINARY ?= "" -SPL_UART_IMAGE ?= "${SPL_UART_BINARY}-${MACHINE}-${PV}-${PR}" -SPL_UART_SYMLINK ?= "${SPL_UART_BINARY}-${MACHINE}" - -do_deploy_append () { - install ${S}/${UBOOT_RAW_BINARY} ${DEPLOYDIR}/${UBOOT_RAW_BINARY} - install ${S}/${UBOOT_DTB} ${DEPLOYDIR}/${UBOOT_DTB} -} - -# DEPEND on dtc-native for mainline u-boot because the mainline u-boot depends -# on some of the latest syntax constructs for an appended in dtb used for -# items like secure boot/image signing. -DEPENDS += "dtc-native" - -DESCRIPTION = "Mainline u-boot bootloader" - -LIC_FILES_CHKSUM = "file://Licenses/README;md5=c7383a594871c03da76b3707929d2919" - -PV = "2014.10" - -UBOOT_BRANCH ?= "socfpga_v${PV}_arria10_bringup" -UBOOT_REPO ?= "git://github.com/altera-opensource/u-boot-socfpga.git" -UBOOT_PROT ?= "https" - -SRC_URI = "${UBOOT_REPO};protocol=${UBOOT_PROT};branch=${UBOOT_BRANCH}" - -#SoCEDS 15.1 release -SRCREV = "2c7fd1aac5f06ceea822c4d6a8af9ea2b11fdfd4" - diff --git a/recipes-bsp/u-boot/u-boot-socfpga_2016.05.bb b/recipes-bsp/u-boot/u-boot-socfpga_2016.05.bb deleted file mode 100644 index 8f5e038..0000000 --- a/recipes-bsp/u-boot/u-boot-socfpga_2016.05.bb +++ /dev/null @@ -1,24 +0,0 @@ -require u-boot-common_${PV}.inc -require ${COREBASE}/meta/recipes-bsp/u-boot/u-boot.inc - -DEPENDS += "dtc-native" - -do_install_append_10m50 () { - if [ "x${UBOOT_CONFIG}" != "x" ] - then - for config in ${UBOOT_MACHINE}; do - install -d ${D}/boot - install ${B}/${config}/${UBOOT_DTB_BINARY} ${D}/boot/${UBOOT_DTB_BINARY} - install ${B}/${config}/${UBOOT_NODTB_BINARY} ${D}/boot/${UBOOT_NODTB_BINARY} - done - else - install -d ${D}/boot - install ${B}/${config}/${UBOOT_DTB_BINARY} ${D}/boot/${UBOOT_DTB_BINARY} - install ${B}/${config}/${UBOOT_NODTB_BINARY} ${D}/boot/${UBOOT_NODTB_BINARY} - fi -} - -do_deploy_append_10m50 () { - install ${D}/boot/${UBOOT_DTB_BINARY} ${DEPLOYDIR}/${UBOOT_DTB_BINARY} - install ${D}/boot/${UBOOT_NODTB_BINARY} ${DEPLOYDIR}/${UBOOT_NODTB_BINARY} -} diff --git a/recipes-bsp/u-boot/u-boot-socfpga_v2014.10.bb b/recipes-bsp/u-boot/u-boot-socfpga_v2014.10.bb new file mode 100644 index 0000000..5c82261 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-socfpga_v2014.10.bb @@ -0,0 +1,18 @@ +require ${COREBASE}/meta/recipes-bsp/u-boot/u-boot.inc +PR="r1" +# This revision corresponds to the SoCEDS 16.1 release +SRCREV = "ab2181dd766157a74b309d12e0b61c4f3cdc8564" + +UBOOT_BRANCH ?= "socfpga_${PV}_arria10_bringup" +UBOOT_REPO ?= "git://github.com/altera-opensource/u-boot-socfpga.git" +UBOOT_PROT ?= "https" + +SRC_URI = "${UBOOT_REPO};protocol=${UBOOT_PROT};branch=${UBOOT_BRANCH}" + +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://Licenses/README;md5=c7383a594871c03da76b3707929d2919" + +DEPENDS += "dtc-native" + +UBOOT_BINARY = "u-boot-dtb.bin" + diff --git a/recipes-bsp/u-boot/u-boot-socfpga_v2016.05.bb b/recipes-bsp/u-boot/u-boot-socfpga_v2016.05.bb new file mode 100644 index 0000000..a4e1f44 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-socfpga_v2016.05.bb @@ -0,0 +1,29 @@ +require u-boot-socfpga-common.inc +require ${COREBASE}/meta/recipes-bsp/u-boot/u-boot.inc + +# This revision corresponds to the tag "v2016.05" +# We use the revision in order to avoid having to fetch it from the +# repo during parse +SRCREV = "aeaec0e682f45b9e0c62c522fafea353931f73ed" + +DEPENDS += "dtc-native" + +do_install_append_10m50 () { + if [ "x${UBOOT_CONFIG}" != "x" ] + then + for config in ${UBOOT_MACHINE}; do + install -d ${D}/boot + install ${B}/${config}/${UBOOT_DTB_BINARY} ${D}/boot/${UBOOT_DTB_BINARY} + install ${B}/${config}/${UBOOT_NODTB_BINARY} ${D}/boot/${UBOOT_NODTB_BINARY} + done + else + install -d ${D}/boot + install ${B}/${config}/${UBOOT_DTB_BINARY} ${D}/boot/${UBOOT_DTB_BINARY} + install ${B}/${config}/${UBOOT_NODTB_BINARY} ${D}/boot/${UBOOT_NODTB_BINARY} + fi +} + +do_deploy_append_10m50 () { + install ${D}/boot/${UBOOT_DTB_BINARY} ${DEPLOYDIR}/${UBOOT_DTB_BINARY} + install ${D}/boot/${UBOOT_NODTB_BINARY} ${DEPLOYDIR}/${UBOOT_NODTB_BINARY} +} diff --git a/recipes-bsp/u-boot/u-boot-socfpga_v2016.11.bb b/recipes-bsp/u-boot/u-boot-socfpga_v2016.11.bb new file mode 100644 index 0000000..e0eb0cd --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-socfpga_v2016.11.bb @@ -0,0 +1,10 @@ +require u-boot-socfpga-common.inc +require ${COREBASE}/meta/recipes-bsp/u-boot/u-boot.inc + +# This revision corresponds to the tag "v2016.11" +# We use the revision in order to avoid having to fetch it from the +# repo during parse +SRCREV = "29e0cfb4f77f7aa369136302cee14a91e22dca71" + +DEPENDS += "dtc-native" + diff --git a/recipes-kernel/linux/linux-altera-dev_4.6.bb b/recipes-kernel/linux/linux-altera-dev_4.6.bb deleted file mode 100644 index 697987a..0000000 --- a/recipes-kernel/linux/linux-altera-dev_4.6.bb +++ /dev/null @@ -1,3 +0,0 @@ -LINUX_VERSION = "4.6" - -include linux-altera.inc diff --git a/recipes-kernel/linux/linux-altera-dev_4.7.bb b/recipes-kernel/linux/linux-altera-dev_4.7.bb new file mode 100644 index 0000000..4ae8bce --- /dev/null +++ b/recipes-kernel/linux/linux-altera-dev_4.7.bb @@ -0,0 +1,3 @@ +LINUX_VERSION = "4.7" + +include linux-altera.inc diff --git a/recipes-kernel/linux/linux-altera-ltsi-dev_4.1.bb b/recipes-kernel/linux/linux-altera-ltsi-dev_4.1.bb deleted file mode 100644 index c001258..0000000 --- a/recipes-kernel/linux/linux-altera-ltsi-dev_4.1.bb +++ /dev/null @@ -1,11 +0,0 @@ -LINUX_VERSION = "4.1" -LINUX_VERSION_SUFFIX = "-ltsi" - -include linux-altera.inc - -FILESEXTRAPATHS .= "${FILE_DIRNAME}/linux-altera-ltsi:" - -SRC_URI += "\ - file://0001-compiler-gcc-integrate-the-various-compiler-gcc-345-.patch \ - file://0001-compiler-gcc-disable-ftracer-for-__noclone-functions.patch \ -" diff --git a/recipes-kernel/linux/linux-altera-ltsi-rt_4.1.22.bb b/recipes-kernel/linux/linux-altera-ltsi-rt_4.1.22.bb index 0253e65..4c09b1d 100644 --- a/recipes-kernel/linux/linux-altera-ltsi-rt_4.1.22.bb +++ b/recipes-kernel/linux/linux-altera-ltsi-rt_4.1.22.bb @@ -1,7 +1,7 @@ LINUX_VERSION = "4.1.22" LINUX_VERSION_SUFFIX = "-ltsi-rt" -SRCREV = "0e938a8fafccb73ad70781ed62abda2b554eafb4" +SRCREV = "ae24f5c381017020be89d0f0e9aeb40952e806d3" include linux-altera.inc diff --git a/recipes-kernel/linux/linux-altera-ltsi_4.1.22.bb b/recipes-kernel/linux/linux-altera-ltsi_4.1.22.bb index d2088bc..3db8de6 100644 --- a/recipes-kernel/linux/linux-altera-ltsi_4.1.22.bb +++ b/recipes-kernel/linux/linux-altera-ltsi_4.1.22.bb @@ -1,7 +1,7 @@ LINUX_VERSION = "4.1.22" LINUX_VERSION_SUFFIX = "-ltsi" -SRCREV = "9862a6691b3f0d5496f39f7b21f6c876dee1549c" +SRCREV = "9689ce4f759ad0f13f6911d1f1309384f2b05f91" include linux-altera.inc diff --git a/recipes-kernel/linux/linux-altera_4.6.bb b/recipes-kernel/linux/linux-altera_4.6.bb index 454092d..79ce7e7 100644 --- a/recipes-kernel/linux/linux-altera_4.6.bb +++ b/recipes-kernel/linux/linux-altera_4.6.bb @@ -1,5 +1,5 @@ LINUX_VERSION = "4.6" -SRCREV = "49f1664be97b67645ca7625bec2b7a414333987e" +SRCREV = "982c9027d1bd07d990bc8f9b2acda1409273dae3" include linux-altera.inc diff --git a/recipes-kernel/linux/linux-altera_4.7.bb b/recipes-kernel/linux/linux-altera_4.7.bb new file mode 100644 index 0000000..316d66b --- /dev/null +++ b/recipes-kernel/linux/linux-altera_4.7.bb @@ -0,0 +1,5 @@ +LINUX_VERSION = "4.7" + +SRCREV = "e18ed5786335e7fa6a0b9a418d6d59cceb80ba47" + +include linux-altera.inc -- cgit v1.2.3-54-g00ecf