Skip to contentSkip to conversation

u-boot-rockchip: various improvements

PATCH In review Romain Perier 2 participants 7 messages May 13, 2017 – May 15, 2017 Arm Rockchip

lore
Share & tools
lore
#0 lore raw

v2 cover u-boot-rockchip: various improvements

This set of patches adds various improvements to the u-boot-rockchip recipe. It fix a build issue due to spl binary being copied from the wrong task, it removes various variables, that are already defined in a common include file, defines a version and adds support for the rock2 board.

Changes in v2:
- Fixed sentences in cover letter
- Fixed commit 3/5, by including u-boot-common_2017.01.inc
- Re-worded commit 1/5

Romain Perier (5):
machine: add UBOOT_MACHINE definition to rock2-square
u-boot-rockchip: copy spl binary from the good task
u-boot-rockchip: use a correct version
u-boot-rockchip: remove duplicated variables
u-boot-rockchip: add rock2 to compatible machines

 conf/machine/rock2-square.conf            |  1 +
 recipes-bsp/u-boot/u-boot-rockchip_git.bb | 14 +++++++-------
 2 files changed, 8 insertions(+), 7 deletions(-)
Signature · 1 line
1.8.3.1
#1 lore raw

PATCH v2 1/5 machine: add UBOOT_MACHINE definition to rock2-square

This adds the defconfig to be used as part of the build of u-boot for the Rock2 Square.

---
 conf/machine/rock2-square.conf | 1 +
 1 file changed, 1 insertion(+)
conf/machine/rock2-square.conf +1 -0
index 38ec701..a896d50 100644
@@ -8,4 +8,5 @@
 
 include conf/machine/include/rk3288.inc
 KERNEL_DEVICETREE = "rk3288-rock2-square.dtb"
+UBOOT_MACHINE = "rock2_defconfig"
 
Signature · 1 line
1.8.3.1
#2 lore raw

PATCH v2 2/5 u-boot-rockchip: copy spl binary from the good task

In reply to Romain Perier

Currently, the spl binary (that is ${SPL_BINARY}) is copied before the install task, as part of a prepended func. The u-boot include in poky, defines the deploy task to be run after the compile task, there is absolutely no order between this deploy task and the install task. In some cases, the install task can be executed after the deploy task, resulting to an error because do_deploy will not find the spl binary in ${B}.

This commit, move the copy of the spl binary after the compile task.

---
 recipes-bsp/u-boot/u-boot-rockchip_git.bb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
recipes-bsp/u-boot/u-boot-rockchip_git.bb +3 -3
index dda8bb4..2865fab 100644
@@ -18,7 +18,7 @@ SRC_URI = " \
 SRCREV = "${AUTOREV}"
 S = "${WORKDIR}/git"
 
-do_install_prepend () {
-	# copy to default search path
-	cp ${B}/spl/${SPL_BINARY} ${B}/
+do_compile_append () {
+    # copy to default search path
+    cp ${B}/spl/${SPL_BINARY} ${B}/
 }
Signature · 1 line
1.8.3.1
#3 lore raw

PATCH v2 3/5 u-boot-rockchip: use a correct version

In reply to Romain Perier

The version is actually not defined. Bitbake implicitly uses "git-r0" by default.

This commit defines PV to the version of u-boot that is currently present of the release branch, prefixed by the sha1 of the commit.

---
 recipes-bsp/u-boot/u-boot-rockchip_git.bb | 1 +
 1 file changed, 1 insertion(+)
recipes-bsp/u-boot/u-boot-rockchip_git.bb +1 -0
index 2865fab..d3e3168 100644
@@ -16,6 +16,7 @@ SRC_URI = " \
 	file://binutils-2.28-ld-fix.patch \
 	"
 SRCREV = "${AUTOREV}"
+PV = "v2017.05+git${SRCPV}"
 S = "${WORKDIR}/git"
 
 do_compile_append () {
Signature · 1 line
1.8.3.1
#4 lore raw

PATCH v2 4/5 u-boot-rockchip: remove duplicated variables

In reply to Romain Perier

This adds the inclusion of u-boot-common_2017.01.inc and removes duplicated variables that are already defined by this file.

---
 recipes-bsp/u-boot/u-boot-rockchip_git.bb | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
recipes-bsp/u-boot/u-boot-rockchip_git.bb +2 -3
index d3e3168..094dbe1 100644
@@ -1,12 +1,12 @@
 # Copyright (C) 2017 Fuzhou Rockchip Electronics Co., Ltd
 # Copyright (C) 2017 Trevor Woerner <[email protected]>
+# Copyright (C) 2017 Romain Perier <[email protected]>
 # Released under the MIT license (see COPYING.MIT for the terms)
 
 require recipes-bsp/u-boot/u-boot.inc
+require recipes-bsp/u-boot/u-boot-common_2017.01.inc
 
 DESCRIPTION = "Rockchip next-dev U-Boot"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
 COMPATIBLE_MACHINE = "(firefly-rk3288)"
 
 DEPENDS = "dtc-native bc-native"
@@ -17,7 +17,6 @@ SRC_URI = " \
 	"
 SRCREV = "${AUTOREV}"
 PV = "v2017.05+git${SRCPV}"
-S = "${WORKDIR}/git"
 
 do_compile_append () {
     # copy to default search path
Signature · 1 line
1.8.3.1
#5 lore raw

PATCH v2 5/5 u-boot-rockchip: add rock2 to compatible machines

In reply to Romain Perier

As this machine is supported by this u-boot, add it to the compatible machines.

---
 recipes-bsp/u-boot/u-boot-rockchip_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-bsp/u-boot/u-boot-rockchip_git.bb +1 -1
index 094dbe1..291438a 100644
@@ -7,7 +7,7 @@ require recipes-bsp/u-boot/u-boot.inc
 require recipes-bsp/u-boot/u-boot-common_2017.01.inc
 
 DESCRIPTION = "Rockchip next-dev U-Boot"
-COMPATIBLE_MACHINE = "(firefly-rk3288)"
+COMPATIBLE_MACHINE = "(firefly-rk3288|rock2-square)"
 
 DEPENDS = "dtc-native bc-native"
 
Signature · 1 line
1.8.3.1
#6 lore raw
In reply to Romain Perier
Quoted 5 lines · Romain Perier

This set of patches adds various improvements to the u-boot-rockchip recipe. It fix a build issue due to spl binary being copied from the wrong task, it removes various variables, that are already defined in a common include file, defines a version and adds support for the rock2 board.

Thanks! Tested on firefly-rk3288 and applied.