summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDalon Westergreen <dalon.westergreen@intel.com>2017-01-11 10:16:43 -0800
committerKhem Raj <raj.khem@gmail.com>2017-01-11 10:16:43 -0800
commit0c6e036fdfec58b69903a10e886a9dfae8fe4c9f (patch)
treed20289b0fe29ddea1e637248a68e2d0f7c20a89e
parentab2ee2812670be650d6a722de08dff9bf05131f8 (diff)
downloadmeta-altera-0c6e036fdfec58b69903a10e886a9dfae8fe4c9f.tar.gz
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 <dwesterg@gmail.com> * u-boot-socfpga: Add support for v2016.11 Signed-off-by: Dalon Westergreen <dwesterg@gmail.com> * 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 <dwesterg@gmail.com> * 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 <dalon.westergreen@intel.com> * 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 <dalon.westergreen@intel.com> * linux-socfpga: add 4.7 and 4.7 dev recipes Signed-off-by: Dalon Westergreen <dalon.westergreen@intel.com> * linux-socfpga: update srcrev for 4.6 kernel and remove 4.6 dev Signed-off-by: Dalon Westergreen <dalon.westergreen@intel.com> * linux-socfpga: delete 4.1 dev as 4.1 is no longer maintained * linux-socfpga: update 4.1.22 srcrev to latest release
-rw-r--r--classes/image_types_socfpga.bbclass124
-rw-r--r--classes/sdcard_image-socfpga.bbclass172
-rw-r--r--conf/machine/arria10.conf16
-rw-r--r--conf/machine/arria5.conf9
-rw-r--r--conf/machine/cyclone5.conf12
-rw-r--r--recipes-bsp/u-boot/u-boot-socfpga-common.inc (renamed from recipes-bsp/u-boot/u-boot-common_2016.05.inc)7
-rw-r--r--recipes-bsp/u-boot/u-boot-socfpga_2014.10.bb50
-rw-r--r--recipes-bsp/u-boot/u-boot-socfpga_v2014.10.bb18
-rw-r--r--recipes-bsp/u-boot/u-boot-socfpga_v2016.05.bb (renamed from recipes-bsp/u-boot/u-boot-socfpga_2016.05.bb)7
-rw-r--r--recipes-bsp/u-boot/u-boot-socfpga_v2016.11.bb10
-rw-r--r--recipes-kernel/linux/linux-altera-dev_4.7.bb (renamed from recipes-kernel/linux/linux-altera-dev_4.6.bb)2
-rw-r--r--recipes-kernel/linux/linux-altera-ltsi-dev_4.1.bb11
-rw-r--r--recipes-kernel/linux/linux-altera-ltsi-rt_4.1.22.bb2
-rw-r--r--recipes-kernel/linux/linux-altera-ltsi_4.1.22.bb2
-rw-r--r--recipes-kernel/linux/linux-altera_4.6.bb2
-rw-r--r--recipes-kernel/linux/linux-altera_4.7.bb5
16 files changed, 244 insertions, 205 deletions
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 @@
1inherit image_types
2
3SDCARD_ROOTFS ?= "${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.ext3"
4
5# Boot partition size [in KiB]
6IMAGE_ROOTFS_ALIGNMENT_cyclone5 ?= "2048"
7IMAGE_ROOTFS_ALIGNMENT_arria5 ?= "2048"
8
9BOOT_SPACE ?= "102400"
10
11IMAGE_DEPENDS_sdcard = "parted-native:do_populate_sysroot \
12 dosfstools-native:do_populate_sysroot \
13 mtools-native:do_populate_sysroot \
14 virtual/kernel:do_deploy \
15 virtual/bootloader:do_deploy"
16
17SDCARD_GENERATION_COMMAND_cyclone5 = "generate_28nm_sdcard"
18SDCARD_GENERATION_COMMAND_arria5 = "generate_28nm_sdcard"
19
20#
21# Generate the boot image with the boot scripts and required Device Tree
22# files
23_generate_boot_image() {
24 local boot_part=$1
25
26 # Create boot partition image
27 BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDCARD} unit b print \
28 | awk "/ $boot_part / { print substr(\$4, 1, length(\$4 -1)) / 1024 }")
29
30 # mkdosfs will sometimes use FAT16 when it is not appropriate,
31 # resulting in a boot failure from SYSLINUX. Use FAT32 for
32 # images larger than 512MB, otherwise let mkdosfs decide.
33 if [ $(expr $BOOT_BLOCKS / 1024) -gt 512 ]; then
34 FATSIZE="-F 32"
35 fi
36
37 rm -f ${WORKDIR}/boot.img
38 mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 ${FATSIZE} -C ${WORKDIR}/boot.img $BOOT_BLOCKS
39
40 mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin ::/${KERNEL_IMAGETYPE}
41
42 # Copy boot scripts
43 for item in ${BOOT_SCRIPTS}; do
44 src=`echo $item | awk -F':' '{ print $1 }'`
45 dst=`echo $item | awk -F':' '{ print $2 }'`
46
47 mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/$src ::/$dst
48 done
49
50 # Copy device tree file
51 if test -n "${KERNEL_DEVICETREE}"; then
52 for DTS_FILE in ${KERNEL_DEVICETREE}; do
53 DTS_BASE_NAME=`basename ${DTS_FILE} | awk -F "." '{print $1}'`
54 if [ -e "${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb" ]; then
55 kernel_bin="`readlink ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin`"
56 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"`"
57 if [ $kernel_bin = $kernel_bin_for_dtb ]; then
58 mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb ::/${DTS_BASE_NAME}.dtb
59 fi
60 else
61 bbfatal "${DTS_FILE} does not exist."
62 fi
63 done
64 fi
65}
66
67generate_28nm_sdcard () {
68 # Create partition table
69 parted -s ${SDCARD} mklabel msdos
70 parted -s ${SDCARD} unit KiB mkpart primary fat32 ${IMAGE_ROOTFS_ALIGNMENT} $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED})
71 parted -s ${SDCARD} unit KiB mkpart primary $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED}) $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED} \+ $ROOTFS_SIZE)
72 parted -s ${SDCARD} unit KiB mkpart primary 1024 2048
73
74 #set part 3 to type a2 for spl / uboot image
75 echo -ne "\xa2" | dd of=${SDCARD} bs=1 count=1 seek=482 conv=notrunc
76
77
78 if [ -e "${DEPLOY_DIR_IMAGE}/${SPL_BINARY}-${UBOOT_CONFIG}" ]
79 then
80 dd if=${DEPLOY_DIR_IMAGE}/${SPL_BINARY}-${UBOOT_CONFIG} of=${SDCARD} conv=notrunc seek=1 bs=$(expr 1024 \* 1024)
81 elif [ -e "${DEPLOY_DIR_IMAGE}/${SPL_BINARY}-${UBOOT_CONFIG}" ]
82 then
83 dd if=${DEPLOY_DIR_IMAGE}/${SPL_BINARY} of=${SDCARD} conv=notrunc seek=1 bs=$(expr 1024 \* 1024)
84 else
85 bbfatal "${SPL_BINARY} does not exist."
86 fi
87
88 parted ${SDCARD} print
89
90 _generate_boot_image 1
91 # Burn Partition
92 dd if=${WORKDIR}/boot.img of=${SDCARD} conv=notrunc,fsync seek=1 bs=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \* 1024)
93 dd if=${SDCARD_ROOTFS} of=${SDCARD} conv=notrunc,fsync seek=1 bs=$(expr ${BOOT_SPACE_ALIGNED} \* 1024 + ${IMAGE_ROOTFS_ALIGNMENT} \* 1024)
94}
95
96IMAGE_CMD_sdcard () {
97 if [ -z "${SDCARD_ROOTFS}" ]; then
98 bberror "SDCARD_ROOTFS is undefined. To use sdcard image from Freescale's BSP it needs to be defined."
99 exit 1
100 fi
101
102 # Align boot partition and calculate total SD card image size
103 BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE} + ${IMAGE_ROOTFS_ALIGNMENT} - 1)
104 BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE_ALIGNED} - ${BOOT_SPACE_ALIGNED} % ${IMAGE_ROOTFS_ALIGNMENT})
105 SDCARD_SIZE=$(expr ${IMAGE_ROOTFS_ALIGNMENT} + ${BOOT_SPACE_ALIGNED} + $ROOTFS_SIZE + ${IMAGE_ROOTFS_ALIGNMENT})
106
107 # Initialize a sparse file
108 if [ "x${UBOOT_CONFIG}" != "x" ]
109 then
110 SDCARD_NAME="${IMAGE_NAME}-${UBOOT_CONFIG}.rootfs.sdcard"
111 else
112 SDCARD_NAME="${IMAGE_NAME}.rootfs.sdcard"
113 fi
114 SDCARD="${DEPLOY_DIR_IMAGE}/${SDCARD_NAME}"
115 dd if=/dev/zero of=${SDCARD} bs=1 count=0 seek=$(expr 1024 \* ${SDCARD_SIZE})
116 rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.sdcard
117 ln -s ${SDCARD_NAME} ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.sdcard
118
119 ${SDCARD_GENERATION_COMMAND}
120}
121
122# The sdcard requires the rootfs filesystem to be built before using
123# it so we must make this dependency explicit.
124IMAGE_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 @@
1inherit image_types
2
3# Create an sdcard image suitable for the atlas board
4# This is copied from the raspberrypi and freescale sdcard classes
5
6# Disk layout
7# 0 -> 8*1024 - reserverd
8# 8*1024 -> 32*1024 -
9# 32*1024 -> 1024*1024 -
10# 1024*1024 -> BOOT_SPACE - bootloader and kernel in Part 3
11# BOOT_SPACE*1024 -> FAT_SPACE
12
13
14
15# This image depends on the rootfs image
16IMAGE_TYPEDEP_socfpga-sdimg = "${SDIMG_ROOTFS_TYPE}"
17
18# Boot partition volume id
19BOOTDD_VOLUME_ID ?= "${MACHINE}"
20
21# Boot partition size [in KiB] -> size 2M for A10
22BOOT_SPACE ?= "2048"
23
24# Fat partition size
25FAT_SPACE ?= "102400"
26
27# Boot partition begin at sector 1024
28# This is required as for c5/a5 mainline uboot hard codes the location
29# of the uboot image in the sdcard to 0xa00 sector
30IMAGE_ROOTFS_ALIGNMENT = "1024"
31
32# ROOTFS_SIZE_MOD ?= "524288"
33ROOTFS_SIZE_MOD ?= "16384"
34
35# Use an uncompressed ext3 by default as rootfs
36SDIMG_ROOTFS_TYPE = "ext3"
37SDIMG_ROOTFS = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.${SDIMG_ROOTFS_TYPE}"
38
39
40IMAGE_DEPENDS_socfpga-sdimg += " \
41 parted-native \
42 mtools-native \
43 dosfstools-native \
44 virtual/kernel \
45 virtual/bootloader \
46 "
47
48rootfs[depends] += "virtual/kernel:do_deploy"
49
50# SD card image name
51SDIMG = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.socfpga-sdimg"
52
53IMAGEDATESTAMP = "${@time.strftime('%Y.%m.%d',time.gmtime())}"
54
55# After uboot v2016.05 the boot partition number was changed from 3 to 1 so as a
56# result we need 2 different functions for creating the boot partitions just to
57# change the partition creation order
58
59SOCFPGA_SDIMG_PARTITION_COMMAND ?= "generate_sdcard_partitions_v2016_05_and_earlier"
60
61generate_sdcard_partitions_v2016_05_and_earlier () {
62
63 # Create partition table
64 parted -s ${SDIMG} mklabel msdos
65 # P1: Fat partition
66 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})
67 # P2: Linux FS partition
68 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})
69 # P3: A2 partition for bootloader
70 parted -s ${SDIMG} unit KiB mkpart primary ${IMAGE_ROOTFS_ALIGNMENT} $(expr ${BOOT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT})
71
72 # set part 3 to type a2 for spl / uboot image
73 # 446 to partition table, 16 bytes per entry, 4 byte offset to partition type
74 echo -ne "\xa2" | dd of=${SDIMG} bs=1 count=1 seek=$(expr 446 + 16 + 16 + 4) conv=notrunc && sync && sync
75
76 # Create a vfat image with boot files
77 FAT_BLOCKS=$(LC_ALL=C parted -s ${SDIMG} unit b print | awk '/ 1 / { print substr($4, 1, length($4 -1)) / 512 /2 }')
78 rm -f ${WORKDIR}/fat.img
79 mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/fat.img $FAT_BLOCKS
80
81}
82
83generate_sdcard_partitions_v2016_11_and_newer () {
84
85 # Create partition table
86 parted -s ${SDIMG} mklabel msdos
87 # P1: A2 partition for bootloader
88 parted -s ${SDIMG} unit KiB mkpart primary ${IMAGE_ROOTFS_ALIGNMENT} $(expr ${BOOT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT})
89 # P2: Fat partition
90 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})
91 # P3: Linux FS partition
92# 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})
93 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})
94
95 # set part 1 to type a2 for spl / uboot image
96 # 446 to partition table, 16 bytes per entry, 4 byte offset to partition type
97 echo -ne "\xa2" | dd of=${SDIMG} bs=1 count=1 seek=$(expr 446 + 4) conv=notrunc && sync && sync
98
99 # Create a vfat image with boot files
100 FAT_BLOCKS=$(LC_ALL=C parted -s ${SDIMG} unit b print | awk '/ 2 / { print substr($4, 1, length($4 -1)) / 512 /2 }')
101 rm -f ${WORKDIR}/fat.img
102 mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/fat.img $FAT_BLOCKS
103
104}
105
106IMAGE_CMD_socfpga-sdimg () {
107
108 # Align partitions
109 BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE} + ${IMAGE_ROOTFS_ALIGNMENT} - 1)
110 BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE_ALIGNED} - ${BOOT_SPACE_ALIGNED} % ${IMAGE_ROOTFS_ALIGNMENT})
111 FAT_SPACE_ALIGNED=$(expr ${FAT_SPACE} + ${IMAGE_ROOTFS_ALIGNMENT} - 1)
112 FAT_SPACE_ALIGNED=$(expr ${FAT_SPACE_ALIGNED} - ${FAT_SPACE_ALIGNED} % ${IMAGE_ROOTFS_ALIGNMENT})
113
114 ROOTFS_SIZE_ALIGNED=$(expr ${ROOTFS_SIZE} \+ ${ROOTFS_SIZE_MOD})
115 ROOTFS_SIZE_ALIGNED=$(expr ${ROOTFS_SIZE_ALIGNED} \- ${ROOTFS_SIZE_ALIGNED} \% ${ROOTFS_SIZE_MOD})
116
117 SDIMG_SIZE=$(expr ${IMAGE_ROOTFS_ALIGNMENT} + ${BOOT_SPACE_ALIGNED} + ${FAT_SPACE_ALIGNED} + ${ROOTFS_SIZE_ALIGNED} + ${IMAGE_ROOTFS_ALIGNMENT})
118
119 # Initialize sdcard image file
120 dd if=/dev/zero of=${SDIMG} bs=1 count=0 seek=$(expr 1024 \* ${SDIMG_SIZE}) && sync && sync
121
122 # Create partition table
123 ${SOCFPGA_SDIMG_PARTITION_COMMAND}
124
125 # Copy kernel image
126 mcopy -i ${WORKDIR}/fat.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin ::/${KERNEL_IMAGETYPE}
127
128 # Copy boot scripts
129 if [ -e "${DEPLOY_DIR_IMAGE}/${MACHINE}.scr" ]
130 then
131 mcopy -i ${WORKDIR}/fat.img -s ${DEPLOY_DIR_IMAGE}/${MACHINE}.scr ::/u-boot.scr
132 fi
133
134 # Copy device tree file
135 if test -n "${KERNEL_DEVICETREE}"; then
136 for DTS_FILE in ${KERNEL_DEVICETREE}; do
137 DTS_BASE_NAME=`basename ${DTS_FILE} | awk -F "." '{print $1}'`
138 if [ -e "${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb" ]; then
139 kernel_bin="`readlink ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin`"
140 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"`"
141 if [ $kernel_bin = $kernel_bin_for_dtb ]; then
142 mcopy -i ${WORKDIR}/fat.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb ::/${DTS_BASE_NAME}.dtb
143 fi
144 fi
145 done
146 fi
147
148 # Add stamp file
149 echo "${IMAGE_NAME}-${IMAGEDATESTAMP}" > ${WORKDIR}/image-version-info
150 mcopy -i ${WORKDIR}/fat.img -v ${WORKDIR}//image-version-info ::
151
152 # Burn Partitions
153 dd if=${WORKDIR}/fat.img of=${SDIMG} conv=notrunc seek=1 bs=$(expr 1024 \* ${BOOT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync
154 # If SDIMG_ROOTFS_TYPE is a .xz file use xzcat
155 if echo "${SDIMG_ROOTFS_TYPE}" | egrep -q "*\.xz"
156 then
157 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
158 else
159 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
160 fi
161
162 if [ -e "${DEPLOY_DIR_IMAGE}/${SPL_BINARY}-${UBOOT_CONFIG}" ]
163 then
164 dd if=${DEPLOY_DIR_IMAGE}/${SPL_BINARY}-${UBOOT_CONFIG} of=${SDIMG} conv=notrunc seek=1 bs=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync
165 elif [ -e "${DEPLOY_DIR_IMAGE}/${SPL_BINARY}" ]
166 then
167 dd if=${DEPLOY_DIR_IMAGE}/${SPL_BINARY} of=${SDIMG} conv=notrunc seek=1 bs=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync
168 else
169 bbfatal "${SPL_BINARY} does not exist."
170 fi
171
172}
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 @@
4 4
5require conf/machine/include/socfpga.inc 5require conf/machine/include/socfpga.inc
6 6
7PREFERRED_VERSION_u-boot-socfpga ?= "2014.10" 7PREFERRED_VERSION_u-boot-socfpga ?= "v2014.10%"
8UBOOT_MACHINE = "socfpga_arria10_defconfig"
9 8
10KMACHINE = "arria10" 9UBOOT_CONFIG ??= "arria10-socdk"
10
11UBOOT_CONFIG[arria10-socdk] = "socfpga_arria10_defconfig"
12UBOOT_CONFIG[arria10-socdk-nand] = "socfpga_arria10_nand_defconfig"
13UBOOT_CONFIG[arria10-socdk-qspi] = "socfpga_arria10_qspi_defconfig"
11 14
15KMACHINE = "arria10"
12 16
17# Default kernel devicetrees
18KERNEL_DEVICETREE ?= "\
19 socfpga_arria10_socdk_sdmmc.dtb \
20 socfpga_arria10_socdk_qspi.dtb \
21 socfpga_arria10_socdk_nand.dts \
22 "
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 @@
4 4
5require conf/machine/include/socfpga.inc 5require conf/machine/include/socfpga.inc
6 6
7PREFERRED_VERSION_u-boot-socfpga ?= "2016.05%" 7PREFERRED_VERSION_u-boot-socfpga ?= "v2016.11%"
8 8
9UBOOT_CONFIG ??= "arria5-socdk" 9UBOOT_CONFIG ??= "arria5-socdk"
10 10
@@ -13,7 +13,10 @@ UBOOT_CONFIG[arria5-socdk] = "socfpga_arria5_defconfig"
13KMACHINE = "arria5" 13KMACHINE = "arria5"
14 14
15# Default kernel devicetrees 15# Default kernel devicetrees
16KERNEL_DEVICETREE_arria5 ?= "socfpga_arria5_socdk.dtb" 16KERNEL_DEVICETREE_arria5 ?= " \
17 socfpga_arria5_socdk.dtb \
18 "
17 19
18# Add support for SDCARD creation 20# Add support for SDCARD creation
19IMAGE_CLASSES += "image_types_socfpga" 21IMAGE_CLASSES += "sdcard_image-socfpga"
22SOCFPGA_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 @@
4 4
5require conf/machine/include/socfpga.inc 5require conf/machine/include/socfpga.inc
6 6
7PREFERRED_VERSION_u-boot-socfpga ?= "2016.05%" 7PREFERRED_VERSION_u-boot-socfpga ?= "v2016.11%"
8 8
9UBOOT_CONFIG ??= "cyclone5-socdk" 9UBOOT_CONFIG ??= "cyclone5-socdk"
10 10
@@ -18,8 +18,14 @@ UBOOT_CONFIG[sr1500] = "socfpga_sr1500_defconfig"
18KMACHINE = "cyclone5" 18KMACHINE = "cyclone5"
19 19
20# Default kernel devicetrees 20# Default kernel devicetrees
21KERNEL_DEVICETREE ?= "socfpga_cyclone5_socdk.dtb socfpga_cyclone5_sockit.dtb socfpga_cyclone5_socrates.dtb socfpga_cyclone5_de0_sockit.dtb" 21KERNEL_DEVICETREE ?= "\
22 socfpga_cyclone5_socdk.dtb \
23 socfpga_cyclone5_sockit.dtb \
24 socfpga_cyclone5_socrates.dtb \
25 socfpga_cyclone5_de0_sockit.dtb \
26 "
22 27
23# Add support for SDCARD creation 28# Add support for SDCARD creation
24IMAGE_CLASSES += "image_types_socfpga" 29IMAGE_CLASSES += "sdcard_image-socfpga"
30SOCFPGA_SDIMG_PARTITION_COMMAND = "generate_sdcard_partitions_v2016_11_and_newer"
25 31
diff --git a/recipes-bsp/u-boot/u-boot-common_2016.05.inc b/recipes-bsp/u-boot/u-boot-socfpga-common.inc
index 985e221..d0f1723 100644
--- a/recipes-bsp/u-boot/u-boot-common_2016.05.inc
+++ b/recipes-bsp/u-boot/u-boot-socfpga-common.inc
@@ -4,12 +4,7 @@ SECTION = "bootloaders"
4LICENSE = "GPLv2+" 4LICENSE = "GPLv2+"
5LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6" 5LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
6 6
7# This revision corresponds to the tag "v2016.05" 7PV_append = "+git${SRCPV}"
8# We use the revision in order to avoid having to fetch it from the
9# repo during parse
10SRCREV = "aeaec0e682f45b9e0c62c522fafea353931f73ed"
11
12PV = "v2016.05+git${SRCPV}"
13 8
14SRC_URI = "git://git.denx.de/u-boot.git;branch=master" 9SRC_URI = "git://git.denx.de/u-boot.git;branch=master"
15 10
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 @@
1UBOOT_SUFFIX ?= "img"
2UBOOT_RAW_BINARY ?= "u-boot-dtb.bin"
3UBOOT_DTB ?= "u-boot.dtb"
4
5require ${COREBASE}/meta/recipes-bsp/u-boot/u-boot.inc
6
7FILESEXTRAPATHS_prepend := "${THISDIR}/u-boot:"
8
9LICENSE = "GPLv2+"
10LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb"
11
12PACKAGE_ARCH = "${MACHINE_ARCH}"
13
14PROVIDES += "u-boot"
15PKG_${PN} = "u-boot"
16PKG_${PN}-dev = "u-boot-dev"
17PKG_${PN}-dbg = "u-boot-dbg"
18
19S = "${WORKDIR}/git"
20
21# SPL (Second Program Loader) to be loaded over UART
22SPL_UART_BINARY ?= ""
23SPL_UART_IMAGE ?= "${SPL_UART_BINARY}-${MACHINE}-${PV}-${PR}"
24SPL_UART_SYMLINK ?= "${SPL_UART_BINARY}-${MACHINE}"
25
26do_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.
34DEPENDS += "dtc-native"
35
36DESCRIPTION = "Mainline u-boot bootloader"
37
38LIC_FILES_CHKSUM = "file://Licenses/README;md5=c7383a594871c03da76b3707929d2919"
39
40PV = "2014.10"
41
42UBOOT_BRANCH ?= "socfpga_v${PV}_arria10_bringup"
43UBOOT_REPO ?= "git://github.com/altera-opensource/u-boot-socfpga.git"
44UBOOT_PROT ?= "https"
45
46SRC_URI = "${UBOOT_REPO};protocol=${UBOOT_PROT};branch=${UBOOT_BRANCH}"
47
48#SoCEDS 15.1 release
49SRCREV = "2c7fd1aac5f06ceea822c4d6a8af9ea2b11fdfd4"
50
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 @@
1require ${COREBASE}/meta/recipes-bsp/u-boot/u-boot.inc
2PR="r1"
3# This revision corresponds to the SoCEDS 16.1 release
4SRCREV = "ab2181dd766157a74b309d12e0b61c4f3cdc8564"
5
6UBOOT_BRANCH ?= "socfpga_${PV}_arria10_bringup"
7UBOOT_REPO ?= "git://github.com/altera-opensource/u-boot-socfpga.git"
8UBOOT_PROT ?= "https"
9
10SRC_URI = "${UBOOT_REPO};protocol=${UBOOT_PROT};branch=${UBOOT_BRANCH}"
11
12LICENSE = "GPLv2+"
13LIC_FILES_CHKSUM = "file://Licenses/README;md5=c7383a594871c03da76b3707929d2919"
14
15DEPENDS += "dtc-native"
16
17UBOOT_BINARY = "u-boot-dtb.bin"
18
diff --git a/recipes-bsp/u-boot/u-boot-socfpga_2016.05.bb b/recipes-bsp/u-boot/u-boot-socfpga_v2016.05.bb
index 8f5e038..a4e1f44 100644
--- a/recipes-bsp/u-boot/u-boot-socfpga_2016.05.bb
+++ b/recipes-bsp/u-boot/u-boot-socfpga_v2016.05.bb
@@ -1,6 +1,11 @@
1require u-boot-common_${PV}.inc 1require u-boot-socfpga-common.inc
2require ${COREBASE}/meta/recipes-bsp/u-boot/u-boot.inc 2require ${COREBASE}/meta/recipes-bsp/u-boot/u-boot.inc
3 3
4# This revision corresponds to the tag "v2016.05"
5# We use the revision in order to avoid having to fetch it from the
6# repo during parse
7SRCREV = "aeaec0e682f45b9e0c62c522fafea353931f73ed"
8
4DEPENDS += "dtc-native" 9DEPENDS += "dtc-native"
5 10
6do_install_append_10m50 () { 11do_install_append_10m50 () {
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 @@
1require u-boot-socfpga-common.inc
2require ${COREBASE}/meta/recipes-bsp/u-boot/u-boot.inc
3
4# This revision corresponds to the tag "v2016.11"
5# We use the revision in order to avoid having to fetch it from the
6# repo during parse
7SRCREV = "29e0cfb4f77f7aa369136302cee14a91e22dca71"
8
9DEPENDS += "dtc-native"
10
diff --git a/recipes-kernel/linux/linux-altera-dev_4.6.bb b/recipes-kernel/linux/linux-altera-dev_4.7.bb
index 697987a..4ae8bce 100644
--- a/recipes-kernel/linux/linux-altera-dev_4.6.bb
+++ b/recipes-kernel/linux/linux-altera-dev_4.7.bb
@@ -1,3 +1,3 @@
1LINUX_VERSION = "4.6" 1LINUX_VERSION = "4.7"
2 2
3include linux-altera.inc 3include 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 @@
1LINUX_VERSION = "4.1"
2LINUX_VERSION_SUFFIX = "-ltsi"
3
4include linux-altera.inc
5
6FILESEXTRAPATHS .= "${FILE_DIRNAME}/linux-altera-ltsi:"
7
8SRC_URI += "\
9 file://0001-compiler-gcc-integrate-the-various-compiler-gcc-345-.patch \
10 file://0001-compiler-gcc-disable-ftracer-for-__noclone-functions.patch \
11"
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 @@
1LINUX_VERSION = "4.1.22" 1LINUX_VERSION = "4.1.22"
2LINUX_VERSION_SUFFIX = "-ltsi-rt" 2LINUX_VERSION_SUFFIX = "-ltsi-rt"
3 3
4SRCREV = "0e938a8fafccb73ad70781ed62abda2b554eafb4" 4SRCREV = "ae24f5c381017020be89d0f0e9aeb40952e806d3"
5 5
6include linux-altera.inc 6include linux-altera.inc
7 7
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 @@
1LINUX_VERSION = "4.1.22" 1LINUX_VERSION = "4.1.22"
2LINUX_VERSION_SUFFIX = "-ltsi" 2LINUX_VERSION_SUFFIX = "-ltsi"
3 3
4SRCREV = "9862a6691b3f0d5496f39f7b21f6c876dee1549c" 4SRCREV = "9689ce4f759ad0f13f6911d1f1309384f2b05f91"
5 5
6include linux-altera.inc 6include linux-altera.inc
7 7
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 @@
1LINUX_VERSION = "4.6" 1LINUX_VERSION = "4.6"
2 2
3SRCREV = "49f1664be97b67645ca7625bec2b7a414333987e" 3SRCREV = "982c9027d1bd07d990bc8f9b2acda1409273dae3"
4 4
5include linux-altera.inc 5include 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 @@
1LINUX_VERSION = "4.7"
2
3SRCREV = "e18ed5786335e7fa6a0b9a418d6d59cceb80ba47"
4
5include linux-altera.inc