Skip to contentSkip to conversation

u-boot-rockchip: various improvements

PATCH Superseded Romain Perier 2 participants 7 messages Apr 28, 2017 – Apr 29, 2017 Arm Rockchip

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover u-boot-rockchip: various improvements

This set of patches adds variaous 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 already defined variables, defines a version and adds support for the rock2 board.

Romain Perier (5):
machine: add UBOOT_MACHINE definition
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 | 13 ++++++-------
 2 files changed, 7 insertions(+), 7 deletions(-)
Signature · 1 line
1.8.3.1
#1 lore raw

PATCH 1/5 machine: add UBOOT_MACHINE definition

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

---
 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 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 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 4/5 u-boot-rockchip: remove duplicated variables

In reply to Romain Perier

This removes duplicated variables that are already defined in u-boot.inc.

---
 recipes-bsp/u-boot/u-boot-rockchip_git.bb | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
recipes-bsp/u-boot/u-boot-rockchip_git.bb +1 -3
index d3e3168..9363bee 100644
@@ -1,12 +1,11 @@
 # 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
 
 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 +16,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

Re: [meta-rockchip][PATCH 4/5] u-boot-rockchip: remove duplicated variables

This doesn't succeed for me:

ERROR: /opt/oe/configs/z/build-master/firefly-rk3288/layers/meta-rockchip/recipes-bsp/u-boot/u-boot-rockchip_git.bb: This recipe does not have the LICENSE field set (u-boot-rockchip)
ERROR: Failed to parse recipe: /opt/oe/configs/z/build-master/firefly-rk3288/layers/meta-rockchip/recipes-bsp/u-boot/u-boot-rockchip_git.bb

But it does work if I add...

Quoted 6 lines · Romain Perier

# 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

recipes-bsp/u-boot/u-boot-rockchip_git.bb line 9

Quoted 5 lines

DESCRIPTION = "Rockchip next-dev U-Boot"

recipes-bsp/u-boot/u-boot-rockchip_git.bb +0 -2
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
 COMPATIBLE_MACHINE = "(firefly-rk3288)"

...

Does this make sense?

I'm building against openembedded-core
e584be78f92ee6f08f570c239698d56ac78d05f9

Build Configuration:
BB_VERSION = "1.34.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "opensuse-42.2"
TARGET_SYS = "arm-oe-linux-gnueabi"
MACHINE = "firefly-rk3288"
DISTRO = "nodistro"
DISTRO_VERSION = "nodistro.0"
TUNE_FEATURES = "arm armv7ve vfp thumb neon callconvention-hard"
TARGET_FPU = "hard"
meta-rockchip = "devs/rperier/20170429:0d89dcc4a5a2827b68d920bbd32e4aece774b5eb"
meta = "master:e584be78f92ee6f08f570c239698d56ac78d05f9"

#6 lore raw

PATCH 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 9363bee..ffb7887 100644
@@ -6,7 +6,7 @@
 require recipes-bsp/u-boot/u-boot.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