summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2017-01-20 16:44:55 -0800
committerGitHub <noreply@github.com>2017-01-20 16:44:55 -0800
commitaf1bfa9cecb0cc4d1134f59909bb4f741c17b1a7 (patch)
tree7b2555068a6e1c011cbc7de62c87daf762110010
parente24b0ec9d6d62ae69ee4614fb1d6f03d2b9df35c (diff)
parentfb8728b073ffca2acc0bdaf7f76c3a7c7b8073dc (diff)
downloadmeta-altera-af1bfa9cecb0cc4d1134f59909bb4f741c17b1a7.tar.gz
Merge pull request #51 from dwesterg/master
Only conditionally set SOCFPGA_SDIMG_PARTITION_COMMAND
-rw-r--r--classes/sdcard_image-socfpga.bbclass9
-rw-r--r--conf/machine/arria5.conf2
-rw-r--r--conf/machine/cyclone5.conf2
-rw-r--r--recipes-bsp/u-boot/files/v2016.11/de0-nano-soc.env11
-rw-r--r--recipes-bsp/u-boot/u-boot-mkenvimage_v2016.11.bb23
-rw-r--r--recipes-bsp/u-boot/u-boot-socfpga-env.inc25
-rw-r--r--recipes-bsp/u-boot/u-boot-socfpga_v2016.05.bb2
-rw-r--r--recipes-bsp/u-boot/u-boot-socfpga_v2016.11.bb6
8 files changed, 76 insertions, 4 deletions
diff --git a/classes/sdcard_image-socfpga.bbclass b/classes/sdcard_image-socfpga.bbclass
index 879c2c1..8ac12b1 100644
--- a/classes/sdcard_image-socfpga.bbclass
+++ b/classes/sdcard_image-socfpga.bbclass
@@ -24,6 +24,9 @@ BOOT_SPACE ?= "2048"
24# Fat partition size 24# Fat partition size
25FAT_SPACE ?= "102400" 25FAT_SPACE ?= "102400"
26 26
27# uBoot ENV offset
28SDIMG_UBOOT_ENV_OFFSET ?= "512"
29
27# Boot partition begin at sector 1024 30# Boot partition begin at sector 1024
28# This is required as for c5/a5 mainline uboot hard codes the location 31# This is required as for c5/a5 mainline uboot hard codes the location
29# of the uboot image in the sdcard to 0xa00 sector 32# of the uboot image in the sdcard to 0xa00 sector
@@ -167,6 +170,10 @@ IMAGE_CMD_socfpga-sdimg () {
167 dd if=${DEPLOY_DIR_IMAGE}/${SPL_BINARY} of=${SDIMG} conv=notrunc seek=1 bs=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync 170 dd if=${DEPLOY_DIR_IMAGE}/${SPL_BINARY} of=${SDIMG} conv=notrunc seek=1 bs=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync
168 else 171 else
169 bbfatal "${SPL_BINARY} does not exist." 172 bbfatal "${SPL_BINARY} does not exist."
170 fi 173 fi
174
175 if [ -e "${DEPLOY_DIR_IMAGE}/u-boot-env-${ENV_BASE_NAME}.bin" ]; then
176 dd if=${DEPLOY_DIR_IMAGE}/u-boot-env-${ENV_BASE_NAME}.bin of=${SDIMG} bs=1 seek=${SDIMG_UBOOT_ENV_OFFSET}
177 fi
171 178
172} 179}
diff --git a/conf/machine/arria5.conf b/conf/machine/arria5.conf
index a04f2d5..6eedabf 100644
--- a/conf/machine/arria5.conf
+++ b/conf/machine/arria5.conf
@@ -19,4 +19,4 @@ KERNEL_DEVICETREE_arria5 ?= " \
19 19
20# Add support for SDCARD creation 20# Add support for SDCARD creation
21IMAGE_CLASSES += "sdcard_image-socfpga" 21IMAGE_CLASSES += "sdcard_image-socfpga"
22SOCFPGA_SDIMG_PARTITION_COMMAND = "generate_sdcard_partitions_v2016_11_and_newer" 22SOCFPGA_SDIMG_PARTITION_COMMAND ?= "generate_sdcard_partitions_v2016_11_and_newer"
diff --git a/conf/machine/cyclone5.conf b/conf/machine/cyclone5.conf
index 1c4586e..a2d743b 100644
--- a/conf/machine/cyclone5.conf
+++ b/conf/machine/cyclone5.conf
@@ -27,5 +27,5 @@ KERNEL_DEVICETREE ?= "\
27 27
28# Add support for SDCARD creation 28# Add support for SDCARD creation
29IMAGE_CLASSES += "sdcard_image-socfpga" 29IMAGE_CLASSES += "sdcard_image-socfpga"
30SOCFPGA_SDIMG_PARTITION_COMMAND = "generate_sdcard_partitions_v2016_11_and_newer" 30SOCFPGA_SDIMG_PARTITION_COMMAND ?= "generate_sdcard_partitions_v2016_11_and_newer"
31 31
diff --git a/recipes-bsp/u-boot/files/v2016.11/de0-nano-soc.env b/recipes-bsp/u-boot/files/v2016.11/de0-nano-soc.env
new file mode 100644
index 0000000..0e81fa3
--- /dev/null
+++ b/recipes-bsp/u-boot/files/v2016.11/de0-nano-soc.env
@@ -0,0 +1,11 @@
1baudrate=115200
2bootargs=console=ttyS0,115200
3bootcmd=run mmcload; run mmcboot
4fdtimage=socfpga_cyclone5_de0_sockit.dtb
5bootimage=zImage
6fdt_addr=100
7loadaddr=0x01000000
8mmcboot=setenv bootargs console=ttyS0,115200 root=${mmcroot} rw rootwait;bootz ${loadaddr} - ${fdt_addr}
9mmcload=mmc rescan;load mmc 0:2 ${loadaddr} ${bootimage};load mmc 0:2 ${fdt_addr} ${fdtimage}
10mmcroot=/dev/mmcblk0p3
11ramboot=setenv bootargs console=ttyS0,115200;bootm ${loadaddr} - ${fdt_addr}
diff --git a/recipes-bsp/u-boot/u-boot-mkenvimage_v2016.11.bb b/recipes-bsp/u-boot/u-boot-mkenvimage_v2016.11.bb
new file mode 100644
index 0000000..cab156a
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot-mkenvimage_v2016.11.bb
@@ -0,0 +1,23 @@
1SUMMARY = "U-Boot bootloader environment image creation tool"
2
3require u-boot-socfpga-common.inc
4
5# This revision corresponds to the tag "v2016.11"
6# We use the revision in order to avoid having to fetch it from the
7# repo during parse
8SRCREV = "29e0cfb4f77f7aa369136302cee14a91e22dca71"
9
10EXTRA_OEMAKE = 'CROSS_COMPILE="${TARGET_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" STRIP=true V=1'
11
12do_compile () {
13 oe_runmake sandbox_defconfig
14 oe_runmake cross_tools NO_SDL=1
15}
16
17do_install () {
18 install -d ${D}${bindir}
19 install -m 0755 tools/mkenvimage ${D}${bindir}/uboot-mkenvimage
20 ln -sf uboot-mkenvimage ${D}${bindir}/mkenvimage
21}
22
23BBCLASSEXTEND = "native nativesdk"
diff --git a/recipes-bsp/u-boot/u-boot-socfpga-env.inc b/recipes-bsp/u-boot/u-boot-socfpga-env.inc
new file mode 100644
index 0000000..55621b9
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot-socfpga-env.inc
@@ -0,0 +1,25 @@
1DEPENDS += "u-boot-mkenvimage-native"
2
3#Env binary size
4ENV_SIZE = "4096"
5
6#Env base Name
7ENV_BASE_NAME ??= "${UBOOT_CONFIG}"
8
9# Env base file correspond to common part of all environment
10ENV_BASE_FILE = "${WORKDIR}/${ENV_BASE_NAME}.env"
11
12do_environment_mkimage() {
13 if [ -e ${WORKDIR}/${PV}/${ENV_BASE_NAME}.env ]; then
14 mkenvimage -s ${ENV_SIZE} -o ${WORKDIR}/${ENV_BASE_NAME}.bin ${WORKDIR}/${PV}/${ENV_BASE_NAME}.env
15 fi
16}
17
18do_deploy_append() {
19 if [ -e ${WORKDIR}/${ENV_BASE_NAME}.bin]; then
20 install -d ${DEPLOYDIR}
21 install -m 644 ${WORKDIR}/${ENV_BASE_NAME}.bin ${DEPLOYDIR}/u-boot-env-${ENV_BASE_NAME}.bin
22 fi
23}
24
25addtask environment_mkimage after do_compile before do_deploy
diff --git a/recipes-bsp/u-boot/u-boot-socfpga_v2016.05.bb b/recipes-bsp/u-boot/u-boot-socfpga_v2016.05.bb
index 40281cb..526e22c 100644
--- a/recipes-bsp/u-boot/u-boot-socfpga_v2016.05.bb
+++ b/recipes-bsp/u-boot/u-boot-socfpga_v2016.05.bb
@@ -5,5 +5,5 @@ require ${COREBASE}/meta/recipes-bsp/u-boot/u-boot.inc
5# We use the revision in order to avoid having to fetch it from the 5# We use the revision in order to avoid having to fetch it from the
6# repo during parse 6# repo during parse
7SRCREV = "aeaec0e682f45b9e0c62c522fafea353931f73ed" 7SRCREV = "aeaec0e682f45b9e0c62c522fafea353931f73ed"
8 8PR = "r1"
9DEPENDS += "dtc-native" 9DEPENDS += "dtc-native"
diff --git a/recipes-bsp/u-boot/u-boot-socfpga_v2016.11.bb b/recipes-bsp/u-boot/u-boot-socfpga_v2016.11.bb
index 0204422..356f88a 100644
--- a/recipes-bsp/u-boot/u-boot-socfpga_v2016.11.bb
+++ b/recipes-bsp/u-boot/u-boot-socfpga_v2016.11.bb
@@ -1,4 +1,5 @@
1require u-boot-socfpga-common.inc 1require u-boot-socfpga-common.inc
2require u-boot-socfpga-env.inc
2require ${COREBASE}/meta/recipes-bsp/u-boot/u-boot.inc 3require ${COREBASE}/meta/recipes-bsp/u-boot/u-boot.inc
3 4
4# This revision corresponds to the tag "v2016.11" 5# This revision corresponds to the tag "v2016.11"
@@ -6,4 +7,9 @@ require ${COREBASE}/meta/recipes-bsp/u-boot/u-boot.inc
6# repo during parse 7# repo during parse
7SRCREV = "29e0cfb4f77f7aa369136302cee14a91e22dca71" 8SRCREV = "29e0cfb4f77f7aa369136302cee14a91e22dca71"
8 9
10SRC_URI_append = "\
11 file://v2016.11/de0-nano-soc.env \
12 "
13PR = "r1"
14
9DEPENDS += "dtc-native" 15DEPENDS += "dtc-native"