Skip to contentSkip to conversation

introduce rockchip offical linux support to meta-rockchip

PATCH In review Jacob Chen 6 participants 27 messages Jan 19, 2017 – Mar 6, 2017 1 message not in the archive Arm Rockchip

lore
Share & tools
lore

Jacob Chen

author
#0 lore raw

cover introduce rockchip offical linux support to meta-rockchip

This series of patches add below features, will add more supports in the future(medias, more chips).

1. rockchip 4.4 kernel

Rockchip 4.4 kernel is currently the latest version of the rockchip offical kernel, will be an upstream tracking branch. We regularly release the kernel through github. It support all rockchip 64-bit chips and a few 32-bit chips.

2. rockchip next-dev U-boot

Rockchip next-dev U-boot is the next generation of rockchip u-boot, will also be an upstream tracking branch. At present, this branch is just a rebased upstream u-boot.

3. graphics

We have plans for the acceleration in wayland, x11 in the rockchip platform, but in this series of patches, we only include the mali bianry support.

4. rockchip-next-image

Being different from the previous rk-u-boot which use parameter, next-dev u-boot use gpt partition, so it needs to generate a different image.

Jacob Chen (7):
recipes-kernel: linux-rockchip: Add new recipe for 4.4
machine: Add machine file for the rk3288 linux Boards
machine: firefly: use linux-rockchip by default
recipes-graphics: Add support for mali-userspace
recipes-bsp: add u-boot-rockchip support
rk3288.inc: add some variables
rockchip-next-image: introduce image for rockchip next-dev u-boot

 classes/rockchip-next-image.bbclass                | 130 +++++++++++++++++++++
 conf/machine/evb-rk3288.conf                       |  12 ++
 conf/machine/fennec-rk3288.conf                    |  12 ++
 conf/machine/firefly-rk3288.conf                   |   4 +
 conf/machine/include/rk-linux.inc                  |  20 ++++
 conf/machine/include/rk3288.inc                    |  10 +-
 conf/machine/tinker-rk3288.conf                    |  13 +++
 recipes-bsp/u-boot/u-boot-rockchip_next.bb         |  17 +++
 recipes-graphics/mali-userspace/mali-userspace.inc |  57 +++++++++
 .../mali-userspace/mali-userspace_t76x.bb          |  18 +++
 recipes-graphics/mesa/mesa_%.bbappend              |   9 ++
 recipes-kernel/linux/linux-rockchip_4.4.bb         |  20 ++++
 12 files changed, 321 insertions(+), 1 deletion(-)
 create mode 100644 classes/rockchip-next-image.bbclass
 create mode 100644 conf/machine/evb-rk3288.conf
 create mode 100644 conf/machine/fennec-rk3288.conf
 create mode 100644 conf/machine/include/rk-linux.inc
 create mode 100644 conf/machine/tinker-rk3288.conf
 create mode 100644 recipes-bsp/u-boot/u-boot-rockchip_next.bb
 create mode 100644 recipes-graphics/mali-userspace/mali-userspace.inc
 create mode 100644 recipes-graphics/mali-userspace/mali-userspace_t76x.bb
 create mode 100644 recipes-graphics/mesa/mesa_%.bbappend
 create mode 100644 recipes-kernel/linux/linux-rockchip_4.4.bb
Signature · 1 line
2.7.4
author
#1 lore raw

PATCH 1/7 recipes-kernel: linux-rockchip: Add new recipe for 4.4

Rockchip 4.4 kernel is currently the latest version of the rockchip offical kernel, will be an upstream tracking branch.
We regularly release the kernel through github.
It support all rockchip 64-bit chips and a few 32-bit chips.

---
 recipes-kernel/linux/linux-rockchip_4.4.bb | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 recipes-kernel/linux/linux-rockchip_4.4.bb
recipes-kernel/linux/linux-rockchip_4.4.bb new file +20 -0
new file mode 100644
index 0000000..ca3674e
@@ -0,0 +1,20 @@
+# Copyright (C) 2017 Fuzhou Rockchip Electronics Co., Ltd
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+require recipes-kernel/linux/linux-yocto.inc
+
+SRC_URI = "git://github.com/rockchip-linux/kernel.git;branch=release-4.4;"
+
+SRCREV = "${AUTOREV}"
+LINUX_VERSION = "4.4.41"
+# Override local version in order to use the one generated by linux build system
+# And not "yocto-standard"
+LINUX_VERSION_EXTENSION = ""
+PR = "r1"
+PV = "${LINUX_VERSION}"
+
+# Include only supported boards for now
+COMPATIBLE_MACHINE = "(rk3288)"
+deltask kernel_configme
+
+KBUILD_DEFCONFIG = "rockchip_linux_defconfig"
Signature · 1 line
2.7.4
author
#2 lore raw

PATCH 2/7 machine: Add machine file for the rk3288 linux Boards

In reply to Jacob Chen

Evb-rk3288 is the offical evaluate board, add it to help myself develop.

Fennec-rk3288 and Tinker-rk3288 is rk3288 based SBCs.

    .

Tinker Boards:
http://www.cnx-software.com/2017/01/05/asus-tinker-board-is-a-raspberry-pi-3-alternative-based-on-rockchip-rk3288-processor/

---
 conf/machine/evb-rk3288.conf      | 12 ++++++++++++
 conf/machine/fennec-rk3288.conf   | 12 ++++++++++++
 conf/machine/include/rk-linux.inc | 20 ++++++++++++++++++++
 conf/machine/tinker-rk3288.conf   | 13 +++++++++++++
 4 files changed, 57 insertions(+)
 create mode 100644 conf/machine/evb-rk3288.conf
 create mode 100644 conf/machine/fennec-rk3288.conf
 create mode 100644 conf/machine/include/rk-linux.inc
 create mode 100644 conf/machine/tinker-rk3288.conf
conf/machine/evb-rk3288.conf new file +12 -0
new file mode 100644
index 0000000..88a5f78
@@ -0,0 +1,12 @@
+# Copyright (C) 2017 Fuzhou Rockchip Electronics Co., Ltd
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+#@TYPE: Machine
+#@NAME: EVB 3288
+
+include conf/machine/include/rk3288.inc
+include conf/machine/include/rk-linux.inc
+
+KERNEL_DEVICETREE = "rk3288-evb-act8846.dtb"
+
+UBOOT_MACHINE = "evb-rk3288_defconfig"
conf/machine/fennec-rk3288.conf new file +12 -0
new file mode 100644
index 0000000..a85045f
@@ -0,0 +1,12 @@
+# Copyright (C) 2017 Fuzhou Rockchip Electronics Co., Ltd
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+#@TYPE: Machine
+#@NAME: FENNEC RK3288
+
+include conf/machine/include/rk3288.inc
+include conf/machine/include/rk-linux.inc
+
+KERNEL_DEVICETREE = "rk3288-fennec.dtb"
+
+UBOOT_MACHINE = "fennec-rk3288_defconfig"
conf/machine/include/rk-linux.inc new file +20 -0
new file mode 100644
index 0000000..6abaa0d
@@ -0,0 +1,20 @@
+# Rockchip BSP default settings
+
+PREFERRED_PROVIDER_virtual/egl = "mali-userspace"
+PREFERRED_PROVIDER_virtual/libgles1 = "mali-userspace"
+PREFERRED_PROVIDER_virtual/libgles2 = "mali-userspace"
+PREFERRED_PROVIDER_virtual/libopencl = "mali-userspace"
+
+# Workaround: libmali.so provided by rk having no SONAME field in it
+# so add it to fix rdepends problems
+ASSUME_SHLIBS += "libEGL.so:mali-userspace"
+ASSUME_SHLIBS += "libGLESv1_CM.so:mali-userspace"
+ASSUME_SHLIBS += "libGLESv2.so:mali-userspace"
+ASSUME_SHLIBS += "libOpenCL.so:mali-userspace"
+ASSUME_SHLIBS += "libgbm.so:mali-userspace"
+ASSUME_SHLIBS += "libwayland-egl.so:mali-userspace"
+
+PREFERRED_PROVIDER_virtual/kernel = "linux-rockchip"
+PREFERRED_PROVIDER_virtual/bootloader = "u-boot-rockchip"
+
+IMAGE_CLASSES += "rockchip-next-image"
conf/machine/tinker-rk3288.conf new file +13 -0
new file mode 100644
index 0000000..0464133
@@ -0,0 +1,13 @@
+# Copyright (C) 2017 Fuzhou Rockchip Electronics Co., Ltd
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+#@TYPE: Machine
+#@NAME: Tinker RK3288
+#@DESCRIPTION: ASUS Tinker Board is a Raspberry Pi 3 Alternative based on Rockchip RK3288 Processor.
+
+include conf/machine/include/rk3288.inc
+include conf/machine/include/rk-linux.inc
+
+KERNEL_DEVICETREE = "rk3288-miniarm.dtb"
+
+UBOOT_MACHINE = "miniarm-rk3288_defconfig"
Signature · 1 line
2.7.4
#3 lore raw

Re: [meta-rockchip][PATCH 2/7] machine: Add machine file for the rk3288 linux Boards

Hey,

Could you:
- Make one patch per new machine file and not one patch for all new added machine
- Add a clear @DESCRIPTION for each board, see an example here:
https://git.yoctoproject.org/cgit/cgit.cgi/meta-rockchip/tree/conf/machine/firefly-rk3288.conf
- Write a clear and an understandable commit message for your new patches

@Trevor: What do you think about this rk-linux.inc ? I don't like this, either its name and what it contains.

That's it for now.
Thanks for your patches

2017-01-19 15:04 GMT+01:00 Jacob Chen <[email protected]>:

Quoted 109 lines

Evb-rk3288 is the offical evaluate board, add it to help myself develop.

Fennec-rk3288 and Tinker-rk3288 is rk3288 based SBCs.

    .

Tinker Boards:
http://www.cnx-software.com/2017/01/05/asus-tinker-board-
is-a-raspberry-pi-3-alternative-based-on-rockchip-rk3288-processor/

---
 conf/machine/evb-rk3288.conf      | 12 ++++++++++++
 conf/machine/fennec-rk3288.conf   | 12 ++++++++++++
 conf/machine/include/rk-linux.inc | 20 ++++++++++++++++++++
 conf/machine/tinker-rk3288.conf   | 13 +++++++++++++
 4 files changed, 57 insertions(+)
 create mode 100644 conf/machine/evb-rk3288.conf
 create mode 100644 conf/machine/fennec-rk3288.conf
 create mode 100644 conf/machine/include/rk-linux.inc
 create mode 100644 conf/machine/tinker-rk3288.conf
conf/machine/evb-rk3288.conf new file +12 -0
new file mode 100644
index 0000000..88a5f78
@@ -0,0 +1,12 @@
+# Copyright (C) 2017 Fuzhou Rockchip Electronics Co., Ltd
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+#@TYPE: Machine
+#@NAME: EVB 3288
+
+include conf/machine/include/rk3288.inc
+include conf/machine/include/rk-linux.inc
+
+KERNEL_DEVICETREE = "rk3288-evb-act8846.dtb"
+
+UBOOT_MACHINE = "evb-rk3288_defconfig"
conf/machine/fennec-rk3288. renamed from conf/machine/fennec-rk3288.conf +0 -0

conf
new file mode 100644
index 0000000..a85045f

conf/machine/fennec-rk3288.conf new file +12 -0
@@ -0,0 +1,12 @@
+# Copyright (C) 2017 Fuzhou Rockchip Electronics Co., Ltd
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+#@TYPE: Machine
+#@NAME: FENNEC RK3288
+
+include conf/machine/include/rk3288.inc
+include conf/machine/include/rk-linux.inc
+
+KERNEL_DEVICETREE = "rk3288-fennec.dtb"
+
+UBOOT_MACHINE = "fennec-rk3288_defconfig"
conf/machine/include/rk- renamed from conf/machine/include/rk-linux.inc +0 -0

linux.inc
new file mode 100644
index 0000000..6abaa0d

conf/machine/include/rk-linux.inc new file +20 -0
@@ -0,0 +1,20 @@
+# Rockchip BSP default settings
+
+PREFERRED_PROVIDER_virtual/egl = "mali-userspace"
+PREFERRED_PROVIDER_virtual/libgles1 = "mali-userspace"
+PREFERRED_PROVIDER_virtual/libgles2 = "mali-userspace"
+PREFERRED_PROVIDER_virtual/libopencl = "mali-userspace"
+
+# Workaround: libmali.so provided by rk having no SONAME field in it
+# so add it to fix rdepends problems
+ASSUME_SHLIBS += "libEGL.so:mali-userspace"
+ASSUME_SHLIBS += "libGLESv1_CM.so:mali-userspace"
+ASSUME_SHLIBS += "libGLESv2.so:mali-userspace"
+ASSUME_SHLIBS += "libOpenCL.so:mali-userspace"
+ASSUME_SHLIBS += "libgbm.so:mali-userspace"
+ASSUME_SHLIBS += "libwayland-egl.so:mali-userspace"
+
+PREFERRED_PROVIDER_virtual/kernel = "linux-rockchip"
+PREFERRED_PROVIDER_virtual/bootloader = "u-boot-rockchip"
+
+IMAGE_CLASSES += "rockchip-next-image"
conf/machine/tinker-rk3288. renamed from conf/machine/tinker-rk3288.conf +0 -0

conf
new file mode 100644
index 0000000..0464133

conf/machine/tinker-rk3288.conf new file +6 -0
@@ -0,0 +1,13 @@
+# Copyright (C) 2017 Fuzhou Rockchip Electronics Co., Ltd
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+#@TYPE: Machine
+#@NAME: Tinker RK3288
+#@DESCRIPTION: ASUS Tinker Board is a Raspberry Pi 3 Alternative based on

Rockchip RK3288 Processor.

conf/machine/tinker-rk3288.conf new file +7 -1
+
+include conf/machine/include/rk3288.inc
+include conf/machine/include/rk-linux.inc
+
+KERNEL_DEVICETREE = "rk3288-miniarm.dtb"
+
+UBOOT_MACHINE = "miniarm-rk3288_defconfig"
--

2.7.4

#4 lore raw

Re: [meta-rockchip][PATCH 2/7] machine: Add machine file for the rk3288 linux Boards

Quoted 3 lines · Romain Perier

Could you:
- Make one patch per new machine file and not one patch for all new added machine

Agreed.

Are all of these machines actual devices? The evb one doesn't sound real.

Are all of these machines released and available for purchase? I've heard of the tinkerboard (although I can't seem to find one I can actually buy) but I haven't heard of the fennec.

Quoted 6 lines

- Add a clear @DESCRIPTION for each board, see an example here:
https://git.yoctoproject.org/cgit/cgit.cgi/meta-rockchip/tree/conf/machine/firefly-rk3288.conf
- Write a clear and an understandable commit message for your new patches

@Trevor: What do you think about this rk-linux.inc ? I don't like this, either its name and what it contains.

First off, I think it's really great to see people contributing to meta-rockchip! :-)

This entire set of patches seems to be adding "official" support for the rockchip devices; in other words, these recipes will help you to create builds that use the official rockchip sources. That is great. But I think a good BSP gives a user all the possibilities but then leaves the final decision up to them.

So I agree with Romain, I think the name could use more work. It would be nice if this set of patches included something in the name that let the user know these build from official sources. Then the user could decide whether they want to use the official rockchip sources, or whether they want to build from upstream. So I'm not opposed to the idea of adding recipes for official sources, I'd like like to see them added in a way that leaves the decision with the user.

Quoted 2 lines

That's it for now.
Thanks for your patches

+1 :-)

A message that is not in the archive (sent off-list or not yet received): [email protected]

#6 lore raw

Re: Delivery Status Notification (Failure)

Jacob,

gmail bounced this message back from the "[email protected]" email address since the mail handler for rock-chips.com said the "jacob-chen" user does not exist. We can't accept a Signed-off-by line that doesn't point to a valid email address. Please adjust your Signed-off-by line to point to a real email address.

Best regards,
Trevor

Quoted 73 lines · Mail Delivery Subsystem

[image: Error Icon]
Message not delivered
There was a problem delivering your message to *[email protected]*. See the technical details below, or try resending in a few minutes. The response from the remote server was:

550 [email protected]:user not exist

Final-Recipient: rfc822; [email protected]
Action: failed
Status: 5.0.0
Remote-MTA: dns; mxwcom.263xmail.com. (38.83.106.84, the server for the domain rock-chips.com.)
Diagnostic-Code: smtp; 550 [email protected]:user not exist
Last-Attempt-Date: Fri, 27 Jan 2017 11:41:36 -0800 (PST)

---------- Forwarded message ----------
From: Trevor Woerner <[email protected]>
To: Romain Perier <[email protected]>
Cc: Jacob Chen <[email protected]>, "[email protected]" < [email protected]>, Eddie Cai <[email protected]>, Jacob Chen <[email protected]>
Date: Fri, 27 Jan 2017 14:41:32 -0500
Subject: Re: [meta-rockchip][PATCH 2/7] machine: Add machine file for the rk3288 linux Boards

Quoted 3 lines · Romain Perier

Could you:
- Make one patch per new machine file and not one patch for all new added machine

Agreed.

Are all of these machines actual devices? The evb one doesn't sound real.

Are all of these machines released and available for purchase? I've heard of the tinkerboard (although I can't seem to find one I can actually buy) but I haven't heard of the fennec.

Quoted 2 lines

- Add a clear @DESCRIPTION for each board, see an example here:
https://git.yoctoproject.org/cgit/cgit.cgi/meta-rockchip/

tree/conf/machine/firefly-rk3288.conf

Quoted 4 lines

- Write a clear and an understandable commit message for your new patches

@Trevor: What do you think about this rk-linux.inc ? I don't like this, either its name and what it contains.

First off, I think it's really great to see people contributing to meta-rockchip! :-)

This entire set of patches seems to be adding "official" support for the rockchip devices; in other words, these recipes will help you to create builds that use the official rockchip sources. That is great. But I think a good BSP gives a user all the possibilities but then leaves the final decision up to them.

So I agree with Romain, I think the name could use more work. It would be nice if this set of patches included something in the name that let the user know these build from official sources. Then the user could decide whether they want to use the official rockchip sources, or whether they want to build from upstream. So I'm not opposed to the idea of adding recipes for official sources, I'd like like to see them added in a way that leaves the decision with the user.

Quoted 2 lines

That's it for now.
Thanks for your patches

+1 :-)

#7 lore raw

Re: [meta-rockchip][PATCH 2/7] machine: Add machine file for the rk3288 linux Boards

In reply to Trevor Woerner
Quoted 29 lines · Trevor Woerner
Quoted 3 lines · Romain Perier

Could you:
- Make one patch per new machine file and not one patch for all new added machine

Agreed.

Are all of these machines actual devices? The evb one doesn't sound real.

Are all of these machines released and available for purchase? I've heard of the tinkerboard (although I can't seem to find one I can actually buy) but I haven't heard of the fennec.

Quoted 6 lines

- Add a clear @DESCRIPTION for each board, see an example here:
https://git.yoctoproject.org/cgit/cgit.cgi/meta-rockchip/tree/conf/machine/firefly-rk3288.conf
- Write a clear and an understandable commit message for your new patches

@Trevor: What do you think about this rk-linux.inc ? I don't like this, either its name and what it contains.

First off, I think it's really great to see people contributing to meta-rockchip! :-)

This entire set of patches seems to be adding "official" support for the rockchip devices; in other words, these recipes will help you to create builds that use the official rockchip sources. That is great. But I think a good BSP gives a user all the possibilities but then leaves the final decision up to them.

Quoted 7 lines

So I agree with Romain, I think the name could use more work. It would be nice if this set of patches included something in the name that let the user know these build from official sources. Then the user could decide whether they want to use the official rockchip sources, or whether they want to build from upstream. So I'm not opposed to the idea of adding recipes for official sources, I'd like like to see them added in a way that leaves the decision with the user.

Usually convention is <packagename>-mainline.bb in some BSP layer. In somecases community layers are maintained in repo of their own.

Quoted 8 lines
Quoted 5 lines

That's it for now.
Thanks for your patches

+1 :-)

#8 lore raw

Re: [meta-rockchip][PATCH 2/7] machine: Add machine file for the rk3288 linux Boards

In reply to Trevor Woerner

Hi

Trevor Woerner wrote on 2017年01月28日 03:41:

Quoted 11 lines · Romain Perier
Quoted 3 lines

Could you:
- Make one patch per new machine file and not one patch for all new added machine

Agreed.

Are all of these machines actual devices? The evb one doesn't sound real.

Are all of these machines released and available for purchase? I've heard of the tinkerboard (although I can't seem to find one I can actually buy) but I haven't heard of the fennec.

I think i should only leave tinker board here.
We have a lot of boards which are not open to the public, it's not suitable to push them to the community.

Quoted 6 lines
Quoted 6 lines

- Add a clear @DESCRIPTION for each board, see an example here:
https://git.yoctoproject.org/cgit/cgit.cgi/meta-rockchip/tree/conf/machine/firefly-rk3288.conf
- Write a clear and an understandable commit message for your new patches

@Trevor: What do you think about this rk-linux.inc ? I don't like this, either its name and what it contains.

Quoted 8 lines

First off, I think it's really great to see people contributing to meta-rockchip! :-)

This entire set of patches seems to be adding "official" support for the rockchip devices; in other words, these recipes will help you to create builds that use the official rockchip sources. That is great. But I think a good BSP gives a user all the possibilities but then leaves the final decision up to them.

: ) That's the reason why we try to push patches to here, we want that "meta-rockchip" can build between vendor old kernel/new kernel/old u-boot/new u-boot and mainline kernel/u-boot
well. Community people might help develop mainline things.

Quoted 9 lines

So I agree with Romain, I think the name could use more work. It would be nice if this set of patches included something in the name that let the user know these build from official sources. Then the user could decide whether they want to use the official rockchip sources, or whether they want to build from upstream. So I'm not opposed to the idea of adding recipes for official sources, I'd like like to see them added in a way that leaves the decision with the user.

I added rk-linux.inc because i need a place to set up verndor-BSP default settings. I want that the user can choose various combinations by change the include file in machine file. e.g:
rk-linux.inc for linux-rockchip 4.4 + u-boot-rockchip-nex-dev
rk-linux.inc + rk-uboot.inc for linux-rockchip + u-boot-rockchip

rk-linux.inc for linux-mainline + u-boot-mainline

BTW, which name you think is better?

Quoted 4 lines
Quoted 2 lines

That's it for now.
Thanks for your patches

+1 :-)

#9 lore raw

Re: [meta-rockchip][PATCH 2/7] machine: Add machine file for the rk3288 linux Boards

HI

2017-02-09 14:49 GMT+08:00 Jacob Chen <[email protected]>:

Quoted 66 lines

Hi

Trevor Woerner wrote on 2017年01月28日 03:41:

On Fri, Jan 27, 2017 at 9:37 AM, Romain Perier <[email protected]> wrote:

Could you:
- Make one patch per new machine file and not one patch for all new added machine

Agreed.

Are all of these machines actual devices? The evb one doesn't sound real.

Are all of these machines released and available for purchase? I've heard of the tinkerboard (although I can't seem to find one I can actually buy) but I haven't heard of the fennec.

I think i should only leave tinker board here.
We have a lot of boards which are not open to the public, it's not suitable to push them to the community.

- Add a clear @DESCRIPTION for each board, see an example here:
https://git.yoctoproject.org/cgit/cgit.cgi/meta-rockchip/tree/conf/machine/firefly-rk3288.conf
- Write a clear and an understandable commit message for your new patches

@Trevor: What do you think about this rk-linux.inc ? I don't like this, either its name and what it contains.

First off, I think it's really great to see people contributing to meta-rockchip! :-)

This entire set of patches seems to be adding "official" support for the rockchip devices; in other words, these recipes will help you to create builds that use the official rockchip sources. That is great. But I think a good BSP gives a user all the possibilities but then leaves the final decision up to them.

: ) That's the reason why we try to push patches to here, we want that "meta-rockchip" can
build between vendor old kernel/new kernel/old u-boot/new u-boot and mainline kernel/u-boot
well. Community people might help develop mainline things.

So I agree with Romain, I think the name could use more work. It would be nice if this set of patches included something in the name that let the user know these build from official sources. Then the user could decide whether they want to use the official rockchip sources, or whether they want to build from upstream. So I'm not opposed to the idea of adding recipes for official sources, I'd like like to see them added in a way that leaves the decision with the user.

I added rk-linux.inc because i need a place to set up verndor-BSP default settings.
I want that the user can choose various combinations by change the include file in machine file.
e.g:
rk-linux.inc for linux-rockchip 4.4 + u-boot-rockchip-nex-dev rk-linux.inc + rk-uboot.inc for linux-rockchip + u-boot-rockchip

Quoted 3 lines

rk-linux.inc for linux-mainline + u-boot-mainline

BTW, which name you think is better?

What about follow raspberrypi?

├── include
│   ├── rpi-base.inc
│   ├── rpi-default-providers.inc
│   ├── rpi-default-settings.inc
│   ├── rpi-default-versions.inc
│   └── tune-arm1176jzf-s.inc
├── raspberrypi0.conf
├── raspberrypi2.conf
├── raspberrypi3.conf
└── raspberrypi.conf
Quoted 15 lines

That's it for now.
Thanks for your patches

+1 :-)

--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

#10 lore raw

Re: [meta-rockchip][PATCH 2/7] machine: Add machine file for the rk3288 linux Boards

Hi,

Eddie Cai wrote on 2017年02月09日 16:20:

Quoted 70 lines

HI

2017-02-09 14:49 GMT+08:00 Jacob Chen <[email protected]>:

Quoted 67 lines

Hi

Trevor Woerner wrote on 2017年01月28日 03:41:

On Fri, Jan 27, 2017 at 9:37 AM, Romain Perier <[email protected]> wrote:

Could you:
- Make one patch per new machine file and not one patch for all new added machine

Agreed.

Are all of these machines actual devices? The evb one doesn't sound real.

Are all of these machines released and available for purchase? I've heard of the tinkerboard (although I can't seem to find one I can actually buy) but I haven't heard of the fennec.

I think i should only leave tinker board here.
We have a lot of boards which are not open to the public, it's not suitable to push them to the community.

- Add a clear @DESCRIPTION for each board, see an example here:
https://git.yoctoproject.org/cgit/cgit.cgi/meta-rockchip/tree/conf/machine/firefly-rk3288.conf
- Write a clear and an understandable commit message for your new patches

@Trevor: What do you think about this rk-linux.inc ? I don't like this, either its name and what it contains.

First off, I think it's really great to see people contributing to meta-rockchip! :-)

This entire set of patches seems to be adding "official" support for the rockchip devices; in other words, these recipes will help you to create builds that use the official rockchip sources. That is great. But I think a good BSP gives a user all the possibilities but then leaves the final decision up to them.

: ) That's the reason why we try to push patches to here, we want that "meta-rockchip" can
build between vendor old kernel/new kernel/old u-boot/new u-boot and mainline kernel/u-boot
well. Community people might help develop mainline things.

So I agree with Romain, I think the name could use more work. It would be nice if this set of patches included something in the name that let the user know these build from official sources. Then the user could decide whether they want to use the official rockchip sources, or whether they want to build from upstream. So I'm not opposed to the idea of adding recipes for official sources, I'd like like to see them added in a way that leaves the decision with the user.

I added rk-linux.inc because i need a place to set up verndor-BSP default settings.
I want that the user can choose various combinations by change the include file in machine file.
e.g:
rk-linux.inc for linux-rockchip 4.4 + u-boot-rockchip-nex-dev rk-linux.inc + rk-uboot.inc for linux-rockchip + u-boot-rockchip

rk-linux.inc for linux-mainline + u-boot-mainline

I send the wrong draft due to the poor network... Please ignore the e.g...

What i think it's that the users should always get image with all features enabled with default settings. I will be killed if i let them to set each settings one by one in local.conf to enable features.... ok to change name and split file, but i think the things it contianed is needed.

Quoted 13 lines
Quoted 1 line

BTW, which name you think is better?

What about follow raspberrypi?

├── include
│   ├── rpi-base.inc
│   ├── rpi-default-providers.inc
│   ├── rpi-default-settings.inc
│   ├── rpi-default-versions.inc
│   └── tune-arm1176jzf-s.inc
├── raspberrypi0.conf
├── raspberrypi2.conf
├── raspberrypi3.conf
└── raspberrypi.conf

split rk-linux.inc into
rk-base.inc
rk-vendor-providers.inc
rk-vendor-settings.inc
rk-vendor-versions.inc
rk-community-providers.inc
rk-community-settings.inc
rk-community-versions.inc

?

Hmmm, it look more clearly than rk-linux.inc.

Quoted 14 lines
Quoted 14 lines

That's it for now.
Thanks for your patches

+1 :-)

--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

#11 lore raw

Re: [meta-rockchip][PATCH 2/7] machine: Add machine file for the rk3288 linux Boards

Hi

2017-02-09 17:18 GMT+08:00 Jacob Chen <[email protected]>:

Quoted 105 lines

Hi,

Eddie Cai wrote on 2017年02月09日 16:20:

Quoted 75 lines

HI

2017-02-09 14:49 GMT+08:00 Jacob Chen <[email protected]>:

Quoted 71 lines

Hi

Trevor Woerner wrote on 2017年01月28日 03:41:

On Fri, Jan 27, 2017 at 9:37 AM, Romain Perier <[email protected]> wrote:

Could you:
- Make one patch per new machine file and not one patch for all new added machine

Agreed.

Are all of these machines actual devices? The evb one doesn't sound real.

Are all of these machines released and available for purchase? I've heard of the tinkerboard (although I can't seem to find one I can actually buy) but I haven't heard of the fennec.

I think i should only leave tinker board here.
We have a lot of boards which are not open to the public, it's not suitable
to push them to the community.

- Add a clear @DESCRIPTION for each board, see an example here:

https://git.yoctoproject.org/cgit/cgit.cgi/meta-rockchip/tree/conf/machine/firefly-rk3288.conf
- Write a clear and an understandable commit message for your new patches

@Trevor: What do you think about this rk-linux.inc ? I don't like this, either its name and what it contains.

First off, I think it's really great to see people contributing to meta-rockchip! :-)

This entire set of patches seems to be adding "official" support for the rockchip devices; in other words, these recipes will help you to create builds that use the official rockchip sources. That is great. But I think a good BSP gives a user all the possibilities but then leaves the final decision up to them.

: ) That's the reason why we try to push patches to here, we want that "meta-rockchip" can
build between vendor old kernel/new kernel/old u-boot/new u-boot and mainline kernel/u-boot
well. Community people might help develop mainline things.

So I agree with Romain, I think the name could use more work. It would be nice if this set of patches included something in the name that let the user know these build from official sources. Then the user could decide whether they want to use the official rockchip sources, or whether they want to build from upstream. So I'm not opposed to the idea of adding recipes for official sources, I'd like like to see them added in a way that leaves the decision with the user.

I added rk-linux.inc because i need a place to set up verndor-BSP default settings.
I want that the user can choose various combinations by change the include
file in machine file.
e.g:
rk-linux.inc for linux-rockchip 4.4 + u-boot-rockchip-nex-dev rk-linux.inc + rk-uboot.inc for linux-rockchip + u-boot-rockchip

rk-linux.inc for linux-mainline + u-boot-mainline

I send the wrong draft due to the poor network... Please ignore the e.g...

What i think it's that the users should always get image with all features enabled with default settings.
I will be killed if i let them to set each settings one by one in local.conf to enable features....
ok to change name and split file, but i think the things it contianed is needed.

Quoted 14 lines
Quoted 1 line

BTW, which name you think is better?

What about follow raspberrypi?

├── include
│   ├── rpi-base.inc
│   ├── rpi-default-providers.inc
│   ├── rpi-default-settings.inc
│   ├── rpi-default-versions.inc
│   └── tune-arm1176jzf-s.inc
├── raspberrypi0.conf
├── raspberrypi2.conf
├── raspberrypi3.conf
└── raspberrypi.conf
Quoted 8 lines

split rk-linux.inc into
rk-base.inc
rk-vendor-providers.inc
rk-vendor-settings.inc
rk-vendor-versions.inc
rk-community-providers.inc
rk-community-settings.inc
rk-community-versions.inc

Why we need a vendor version and a community version?

Quoted 21 lines

?

Hmmm, it look more clearly than rk-linux.inc.

Quoted 14 lines
Quoted 14 lines

That's it for now.
Thanks for your patches

+1 :-)

--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

#12 lore raw

Re: [meta-rockchip][PATCH 2/7] machine: Add machine file for the rk3288 linux Boards

In reply to Eddie Cai

Hi all,

Sorry, I found that rk-linux.inc could be moved to distro conf .....

I know why you guys are opposed to it now.

I will remove it from machine conf, but i'm still confused about whether TUNES is machines specific or distro specific.

Eddie Cai wrote on 2017年02月09日 16:20:

Quoted 99 lines

HI

2017-02-09 14:49 GMT+08:00 Jacob Chen <[email protected]>:

Quoted 66 lines

Hi

Trevor Woerner wrote on 2017年01月28日 03:41:

On Fri, Jan 27, 2017 at 9:37 AM, Romain Perier <[email protected]> wrote:

Could you:
- Make one patch per new machine file and not one patch for all new added machine

Agreed.

Are all of these machines actual devices? The evb one doesn't sound real.

Are all of these machines released and available for purchase? I've heard of the tinkerboard (although I can't seem to find one I can actually buy) but I haven't heard of the fennec.

I think i should only leave tinker board here.
We have a lot of boards which are not open to the public, it's not suitable to push them to the community.

- Add a clear @DESCRIPTION for each board, see an example here:
https://git.yoctoproject.org/cgit/cgit.cgi/meta-rockchip/tree/conf/machine/firefly-rk3288.conf
- Write a clear and an understandable commit message for your new patches

@Trevor: What do you think about this rk-linux.inc ? I don't like this, either its name and what it contains.

First off, I think it's really great to see people contributing to meta-rockchip! :-)

This entire set of patches seems to be adding "official" support for the rockchip devices; in other words, these recipes will help you to create builds that use the official rockchip sources. That is great. But I think a good BSP gives a user all the possibilities but then leaves the final decision up to them.

: ) That's the reason why we try to push patches to here, we want that "meta-rockchip" can
build between vendor old kernel/new kernel/old u-boot/new u-boot and mainline kernel/u-boot
well. Community people might help develop mainline things.

So I agree with Romain, I think the name could use more work. It would be nice if this set of patches included something in the name that let the user know these build from official sources. Then the user could decide whether they want to use the official rockchip sources, or whether they want to build from upstream. So I'm not opposed to the idea of adding recipes for official sources, I'd like like to see them added in a way that leaves the decision with the user.

I added rk-linux.inc because i need a place to set up verndor-BSP default settings.
I want that the user can choose various combinations by change the include file in machine file.
e.g:
rk-linux.inc for linux-rockchip 4.4 + u-boot-rockchip-nex-dev rk-linux.inc + rk-uboot.inc for linux-rockchip + u-boot-rockchip

Quoted 3 lines

rk-linux.inc for linux-mainline + u-boot-mainline

BTW, which name you think is better?

What about follow raspberrypi?

├── include
│   ├── rpi-base.inc
│   ├── rpi-default-providers.inc
│   ├── rpi-default-settings.inc
│   ├── rpi-default-versions.inc
│   └── tune-arm1176jzf-s.inc
├── raspberrypi0.conf
├── raspberrypi2.conf
├── raspberrypi3.conf
└── raspberrypi.conf
Quoted 14 lines

That's it for now.
Thanks for your patches

+1 :-)

--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

#13 lore raw

Re: [meta-rockchip][PATCH 2/7] machine: Add machine file for the rk3288 linux Boards

In reply to Romain Perier

Hi all,

Thanks for reviewing, I will looking at comments and suggestions after the other work finished.

: )

Quoted 130 lines · Romain Perier

Hey,

Could you:
- Make one patch per new machine file and not one patch for all new added machine
- Add a clear @DESCRIPTION for each board, see an example here:
https://git.yoctoproject.org/cgit/cgit.cgi/meta-rockchip/tree/conf/machine/firefly-rk3288.conf
- Write a clear and an understandable commit message for your new patches

@Trevor: What do you think about this rk-linux.inc ? I don't like this, either its name and what it contains.

That's it for now.
Thanks for your patches

2017-01-19 15:04 GMT+01:00 Jacob Chen <[email protected] <mailto:[email protected]>>:

    Evb-rk3288 is the offical evaluate board, add it to help myself
    develop.

    Fennec-rk3288 and Tinker-rk3288 is rk3288 based SBCs.
        .
    Tinker Boards:
    http://www.cnx-software.com/2017/01/05/asus-tinker-board-is-a-raspberry-pi-3-alternative-based-on-rockchip-rk3288-processor/
    <http://www.cnx-software.com/2017/01/05/asus-tinker-board-is-a-raspberry-pi-3-alternative-based-on-rockchip-rk3288-processor/>

    Signed-off-by: Jacob Chen <[email protected]
    <mailto:[email protected]>>
    ---
     conf/machine/evb-rk3288.conf      | 12 ++++++++++++
     conf/machine/fennec-rk3288.conf   | 12 ++++++++++++
     conf/machine/include/rk-linux.inc | 20 ++++++++++++++++++++
     conf/machine/tinker-rk3288.conf   | 13 +++++++++++++
     4 files changed, 57 insertions(+)
     create mode 100644 conf/machine/evb-rk3288.conf
     create mode 100644 conf/machine/fennec-rk3288.conf
     create mode 100644 conf/machine/include/rk-linux.inc
     create mode 100644 conf/machine/tinker-rk3288.conf

    diff --git a/conf/machine/evb-rk3288.conf
    b/conf/machine/evb-rk3288.conf
    new file mode 100644
    index 0000000..88a5f78
    --- /dev/null
    +++ b/conf/machine/evb-rk3288.conf
    @@ -0,0 +1,12 @@
    +# Copyright (C) 2017 Fuzhou Rockchip Electronics Co., Ltd
    +# Released under the MIT license (see COPYING.MIT for the terms)
    +
    +#@TYPE: Machine
    +#@NAME: EVB 3288
    +
    +include conf/machine/include/rk3288.inc
    +include conf/machine/include/rk-linux.inc
    +
    +KERNEL_DEVICETREE = "rk3288-evb-act8846.dtb"
    +
    +UBOOT_MACHINE = "evb-rk3288_defconfig"
    diff --git a/conf/machine/fennec-rk3288.conf
    b/conf/machine/fennec-rk3288.conf
    new file mode 100644
    index 0000000..a85045f
    --- /dev/null
    +++ b/conf/machine/fennec-rk3288.conf
    @@ -0,0 +1,12 @@
    +# Copyright (C) 2017 Fuzhou Rockchip Electronics Co., Ltd
    +# Released under the MIT license (see COPYING.MIT for the terms)
    +
    +#@TYPE: Machine
    +#@NAME: FENNEC RK3288
    +
    +include conf/machine/include/rk3288.inc
    +include conf/machine/include/rk-linux.inc
    +
    +KERNEL_DEVICETREE = "rk3288-fennec.dtb"
    +
    +UBOOT_MACHINE = "fennec-rk3288_defconfig"
    diff --git a/conf/machine/include/rk-linux.inc
    b/conf/machine/include/rk-linux.inc
    new file mode 100644
    index 0000000..6abaa0d
    --- /dev/null
    +++ b/conf/machine/include/rk-linux.inc
    @@ -0,0 +1,20 @@
    +# Rockchip BSP default settings
    +
    +PREFERRED_PROVIDER_virtual/egl = "mali-userspace"
    +PREFERRED_PROVIDER_virtual/libgles1 = "mali-userspace"
    +PREFERRED_PROVIDER_virtual/libgles2 = "mali-userspace"
    +PREFERRED_PROVIDER_virtual/libopencl = "mali-userspace"
    +
    +# Workaround: libmali.so provided by rk having no SONAME field in it
    +# so add it to fix rdepends problems
    +ASSUME_SHLIBS += "libEGL.so:mali-userspace"
    +ASSUME_SHLIBS += "libGLESv1_CM.so:mali-userspace"
    +ASSUME_SHLIBS += "libGLESv2.so:mali-userspace"
    +ASSUME_SHLIBS += "libOpenCL.so:mali-userspace"
    +ASSUME_SHLIBS += "libgbm.so:mali-userspace"
    +ASSUME_SHLIBS += "libwayland-egl.so:mali-userspace"
    +
    +PREFERRED_PROVIDER_virtual/kernel = "linux-rockchip"
    +PREFERRED_PROVIDER_virtual/bootloader = "u-boot-rockchip"
    +
    +IMAGE_CLASSES += "rockchip-next-image"
    diff --git a/conf/machine/tinker-rk3288.conf
    b/conf/machine/tinker-rk3288.conf
    new file mode 100644
    index 0000000..0464133
    --- /dev/null
    +++ b/conf/machine/tinker-rk3288.conf
    @@ -0,0 +1,13 @@
    +# Copyright (C) 2017 Fuzhou Rockchip Electronics Co., Ltd
    +# Released under the MIT license (see COPYING.MIT for the terms)
    +
    +#@TYPE: Machine
    +#@NAME: Tinker RK3288
    +#@DESCRIPTION: ASUS Tinker Board is a Raspberry Pi 3 Alternative
    based on Rockchip RK3288 Processor.
    +
    +include conf/machine/include/rk3288.inc
    +include conf/machine/include/rk-linux.inc
    +
    +KERNEL_DEVICETREE = "rk3288-miniarm.dtb"
    +
    +UBOOT_MACHINE = "miniarm-rk3288_defconfig"
    --
    2.7.4
#14 lore raw

Re: [meta-rockchip][PATCH 2/7] machine: Add machine file for the rk3288 linux Boards

In reply to Romain Perier

Hi all,

Thanks for reviewing, I will looking at comments and suggestions after the other work finished.

: )

Quoted 130 lines · Romain Perier

Hey,

Could you:
- Make one patch per new machine file and not one patch for all new added machine
- Add a clear @DESCRIPTION for each board, see an example here:
https://git.yoctoproject.org/cgit/cgit.cgi/meta-rockchip/tree/conf/machine/firefly-rk3288.conf
- Write a clear and an understandable commit message for your new patches

@Trevor: What do you think about this rk-linux.inc ? I don't like this, either its name and what it contains.

That's it for now.
Thanks for your patches

2017-01-19 15:04 GMT+01:00 Jacob Chen <[email protected] <mailto:[email protected]>>:

    Evb-rk3288 is the offical evaluate board, add it to help myself
    develop.

    Fennec-rk3288 and Tinker-rk3288 is rk3288 based SBCs.
        .
    Tinker Boards:
    http://www.cnx-software.com/2017/01/05/asus-tinker-board-is-a-raspberry-pi-3-alternative-based-on-rockchip-rk3288-processor/
    <http://www.cnx-software.com/2017/01/05/asus-tinker-board-is-a-raspberry-pi-3-alternative-based-on-rockchip-rk3288-processor/>

    Signed-off-by: Jacob Chen <[email protected]
    <mailto:[email protected]>>
    ---
     conf/machine/evb-rk3288.conf      | 12 ++++++++++++
     conf/machine/fennec-rk3288.conf   | 12 ++++++++++++
     conf/machine/include/rk-linux.inc | 20 ++++++++++++++++++++
     conf/machine/tinker-rk3288.conf   | 13 +++++++++++++
     4 files changed, 57 insertions(+)
     create mode 100644 conf/machine/evb-rk3288.conf
     create mode 100644 conf/machine/fennec-rk3288.conf
     create mode 100644 conf/machine/include/rk-linux.inc
     create mode 100644 conf/machine/tinker-rk3288.conf

    diff --git a/conf/machine/evb-rk3288.conf
    b/conf/machine/evb-rk3288.conf
    new file mode 100644
    index 0000000..88a5f78
    --- /dev/null
    +++ b/conf/machine/evb-rk3288.conf
    @@ -0,0 +1,12 @@
    +# Copyright (C) 2017 Fuzhou Rockchip Electronics Co., Ltd
    +# Released under the MIT license (see COPYING.MIT for the terms)
    +
    +#@TYPE: Machine
    +#@NAME: EVB 3288
    +
    +include conf/machine/include/rk3288.inc
    +include conf/machine/include/rk-linux.inc
    +
    +KERNEL_DEVICETREE = "rk3288-evb-act8846.dtb"
    +
    +UBOOT_MACHINE = "evb-rk3288_defconfig"
    diff --git a/conf/machine/fennec-rk3288.conf
    b/conf/machine/fennec-rk3288.conf
    new file mode 100644
    index 0000000..a85045f
    --- /dev/null
    +++ b/conf/machine/fennec-rk3288.conf
    @@ -0,0 +1,12 @@
    +# Copyright (C) 2017 Fuzhou Rockchip Electronics Co., Ltd
    +# Released under the MIT license (see COPYING.MIT for the terms)
    +
    +#@TYPE: Machine
    +#@NAME: FENNEC RK3288
    +
    +include conf/machine/include/rk3288.inc
    +include conf/machine/include/rk-linux.inc
    +
    +KERNEL_DEVICETREE = "rk3288-fennec.dtb"
    +
    +UBOOT_MACHINE = "fennec-rk3288_defconfig"
    diff --git a/conf/machine/include/rk-linux.inc
    b/conf/machine/include/rk-linux.inc
    new file mode 100644
    index 0000000..6abaa0d
    --- /dev/null
    +++ b/conf/machine/include/rk-linux.inc
    @@ -0,0 +1,20 @@
    +# Rockchip BSP default settings
    +
    +PREFERRED_PROVIDER_virtual/egl = "mali-userspace"
    +PREFERRED_PROVIDER_virtual/libgles1 = "mali-userspace"
    +PREFERRED_PROVIDER_virtual/libgles2 = "mali-userspace"
    +PREFERRED_PROVIDER_virtual/libopencl = "mali-userspace"
    +
    +# Workaround: libmali.so provided by rk having no SONAME field in it
    +# so add it to fix rdepends problems
    +ASSUME_SHLIBS += "libEGL.so:mali-userspace"
    +ASSUME_SHLIBS += "libGLESv1_CM.so:mali-userspace"
    +ASSUME_SHLIBS += "libGLESv2.so:mali-userspace"
    +ASSUME_SHLIBS += "libOpenCL.so:mali-userspace"
    +ASSUME_SHLIBS += "libgbm.so:mali-userspace"
    +ASSUME_SHLIBS += "libwayland-egl.so:mali-userspace"
    +
    +PREFERRED_PROVIDER_virtual/kernel = "linux-rockchip"
    +PREFERRED_PROVIDER_virtual/bootloader = "u-boot-rockchip"
    +
    +IMAGE_CLASSES += "rockchip-next-image"
    diff --git a/conf/machine/tinker-rk3288.conf
    b/conf/machine/tinker-rk3288.conf
    new file mode 100644
    index 0000000..0464133
    --- /dev/null
    +++ b/conf/machine/tinker-rk3288.conf
    @@ -0,0 +1,13 @@
    +# Copyright (C) 2017 Fuzhou Rockchip Electronics Co., Ltd
    +# Released under the MIT license (see COPYING.MIT for the terms)
    +
    +#@TYPE: Machine
    +#@NAME: Tinker RK3288
    +#@DESCRIPTION: ASUS Tinker Board is a Raspberry Pi 3 Alternative
    based on Rockchip RK3288 Processor.
    +
    +include conf/machine/include/rk3288.inc
    +include conf/machine/include/rk-linux.inc
    +
    +KERNEL_DEVICETREE = "rk3288-miniarm.dtb"
    +
    +UBOOT_MACHINE = "miniarm-rk3288_defconfig"
    --
    2.7.4
author
#15 lore raw

PATCH 3/7 machine: firefly: use linux-rockchip by default

In reply to Jacob Chen

This is the kernel vendor that supports all hw components for this board, so we use it by default.

---
 conf/machine/firefly-rk3288.conf | 4 ++++
 1 file changed, 4 insertions(+)
conf/machine/firefly-rk3288.conf +4 -0
index 8fa005d..47e63e1 100644
@@ -7,4 +7,8 @@
 #http://www.t-firefly.com/en/
 
 include conf/machine/include/rk3288.inc
+include conf/machine/include/rk-linux.inc
+
 KERNEL_DEVICETREE = "rk3288-firefly.dtb"
+
+UBOOT_MACHINE = "firefly-rk3288_defconfig"
Signature · 1 line
2.7.4
author
#16 lore raw

PATCH 4/7 recipes-graphics: Add support for mali-userspace

In reply to Jacob Chen

Add support for mali userspace which are binaries that can be run with weston and X11.

---
 recipes-graphics/mali-userspace/mali-userspace.inc | 57 ++++++++++++++++++++++
 .../mali-userspace/mali-userspace_t76x.bb          | 18 +++++++
 recipes-graphics/mesa/mesa_%.bbappend              |  9 ++++
 3 files changed, 84 insertions(+)
 create mode 100644 recipes-graphics/mali-userspace/mali-userspace.inc
 create mode 100644 recipes-graphics/mali-userspace/mali-userspace_t76x.bb
 create mode 100644 recipes-graphics/mesa/mesa_%.bbappend
recipes-graphics/mali-userspace/mali-userspace.inc new file +57 -0
new file mode 100644
index 0000000..d40f583
@@ -0,0 +1,57 @@
+SUMMARY = "Userspace mali driver for Midgard-T76x"
+DESCRIPTION = "Userspace mali driver for Midgard-T76x"
+LICENSE = "CLOSED"
+SECTION = "libs"
+
+DEPENDS = "libdrm"
+DEPENDS += "${@bb.utils.contains("DISTRO_FEATURES", "wayland", " mesa", " ", d)}"
+
+PROVIDES += "virtual/egl virtual/libgles1 virtual/libgles2 virtual/libopencl libgbm"
+PROVIDES += "${@bb.utils.contains("DISTRO_FEATURES", "wayland", " virtual/libwayland-egl", " ", d)}"
+
+S = "${WORKDIR}"
+
+SRC_URI = "git://github.com/rockchip-linux/libmali.git;branch=rockchip;"
+SRCREV_pn-${PN} = "${AUTOREV}"
+
+INSANE_SKIP_${PN} = "already-stripped ldflags dev-so"
+
+INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
+INHIBIT_PACKAGE_STRIP = "1"
+
+USE_X11 = "${@bb.utils.contains("DISTRO_FEATURES", "x11", "yes", "no", d)}"
+USE_WL = "${@bb.utils.contains("DISTRO_FEATURES", "wayland", "yes", "no", d)}"
+
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+
+do_install () {
+	# Create MALI manifest
+	install -m 755 -d ${D}/${libdir}
+	if [ "${USE_X11}" = "yes" ]; then
+		install ${S}/x11/libmali.so ${D}/${libdir}
+	elif [ "${USE_WL}" = "yes" ]; then
+		install ${S}/wayland/libmali.so ${D}/${libdir}
+	fi
+
+	ln -sf libmali.so ${D}/${libdir}/libEGL.so
+	ln -sf libmali.so ${D}/${libdir}/libGLESv1_CM.so
+	ln -sf libmali.so ${D}/${libdir}/libGLESv2.so
+	ln -sf libmali.so ${D}/${libdir}/libOpenCL.so
+	ln -sf libmali.so ${D}/${libdir}/libgbm.so
+
+	if [ "${USE_WL}" = "yes" ]; then
+		ln -sf libmali.so ${D}/${libdir}/libwayland-egl.so
+	fi
+}
+
+PACKAGES = "${PN}"
+FILES_${PN} += "${libdir}/*.so"
+
+RREPLACES_${PN} = "libegl libgles1 libglesv1-cm1 libgles2 libglesv2-2 libgbm"
+RPROVIDES_${PN} = "libegl libgles1 libglesv1-cm1 libgles2 libglesv2-2 libgbm"
+RCONFLICTS_${PN} = "libegl libgles1 libglesv1-cm1 libgles2 libglesv2-2 libgbm"
+
+# Workaround: libmali.so provided by rk having no SONAME field in it
+# so add it to fix rdepends problems
+RPROVIDES_${PN} += "libwayland-egl.so libgbm.so libGLESv1_CM.so libGLESv2.so libEGL.so libOpenCL.so"
recipes-graphics/mali-userspace/mali-userspace_t76x.bb new file +18 -0
new file mode 100644
index 0000000..3281ac0
@@ -0,0 +1,18 @@
+require mali-userspace.inc
+
+TYPE = "midgard"
+SW_VER = "r13p0"
+HW_VER = "r0p0"
+
+LIB_PATH = "arm-linux-gnueabihf"
+
+MALI_X11 = "libmali-${TYPE}-${SW_VER}-${HW_VER}.so"
+MALI_WAYLAND = "libmali-${TYPE}-${SW_VER}-${HW_VER}-wayland.so"
+
+do_install_prepend () {
+	mkdir -p x11
+	cp git/lib/${LIB_PATH}/${MALI_X11} x11/libmali.so
+
+	mkdir -p wayland
+	cp git/lib/${LIB_PATH}/${MALI_WAYLAND}  wayland/libmali.so
+}
recipes-graphics/mesa/mesa_%.bbappend new file +9 -0
new file mode 100644
index 0000000..d9cab75
@@ -0,0 +1,9 @@
+PROVIDES_remove = "virtual/libgles1 virtual/libgles2 virtual/egl virtual/libwayland-egl"
+
+do_install_append () {
+    rm -f ${D}/${libdir}/libEGL*
+    rm -f ${D}/${libdir}/libGLESv1_CM.*
+    rm -f ${D}/${libdir}/libGLESv2.*
+    rm -f ${D}/${libdir}/libgbm*
+    rm -f ${D}/${libdir}/libwayland-egl*
+}
Signature · 1 line
2.7.4
#17 lore raw

Re: [meta-rockchip][PATCH 4/7] recipes-graphics: Add support for mali-userspace

Hi all,

Correct me if I am wrong, but these are generic mali userpace binaries ? meta-rockchip is a bsp meta layer, it should only contains files and recipes to make rockchip board working or things specific to the rockchip board. For me these recipes are completly generic and might be re-used for another platform with another SoC.

I don't want this in meta-rockchip. There is no a layer called meta-mali or something ?

@Trevor: Feel free to comment, the point of view of the second maintainer is always welcome

Thanks,
Romain

2017-01-19 15:04 GMT+01:00 Jacob Chen <[email protected]>:

Quoted 133 lines

Add support for mali userspace which are binaries that can be run with weston and X11.

---
 recipes-graphics/mali-userspace/mali-userspace.inc | 57
++++++++++++++++++++++
 .../mali-userspace/mali-userspace_t76x.bb          | 18 +++++++
 recipes-graphics/mesa/mesa_%.bbappend              |  9 ++++
 3 files changed, 84 insertions(+)
 create mode 100644 recipes-graphics/mali-userspace/mali-userspace.inc
 create mode 100644 recipes-graphics/mali-userspace/mali-userspace_t76x.bb
 create mode 100644 recipes-graphics/mesa/mesa_%.bbappend
recipes-graphics/mali-userspace/mali-userspace.inc new file +7 -0
new file mode 100644
index 0000000..d40f583
@@ -0,0 +1,57 @@
+SUMMARY = "Userspace mali driver for Midgard-T76x"
+DESCRIPTION = "Userspace mali driver for Midgard-T76x"
+LICENSE = "CLOSED"
+SECTION = "libs"
+
+DEPENDS = "libdrm"
+DEPENDS += "${@bb.utils.contains("DISTRO_FEATURES", "wayland", " mesa",

" ", d)}"

recipes-graphics/mali-userspace/mali-userspace.inc new file +2 -0
+
+PROVIDES += "virtual/egl virtual/libgles1 virtual/libgles2

virtual/libopencl libgbm"
+PROVIDES += "${@bb.utils.contains("DISTRO_FEATURES", "wayland", " virtual/libwayland-egl", " ", d)}"

recipes-graphics/mali-userspace/mali-userspace.inc new file +12 -0
+
+S = "${WORKDIR}"
+
+SRC_URI = "git://github.com/rockchip-linux/libmali.git;branch=rockchip;"
+SRCREV_pn-${PN} = "${AUTOREV}"
+
+INSANE_SKIP_${PN} = "already-stripped ldflags dev-so"
+
+INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
+INHIBIT_PACKAGE_STRIP = "1"
+
+USE_X11 = "${@bb.utils.contains("DISTRO_FEATURES", "x11", "yes", "no",

d)}"
+USE_WL = "${@bb.utils.contains("DISTRO_FEATURES", "wayland", "yes", "no", d)}"

recipes-graphics/mali-userspace/mali-userspace.inc new file +28 -0
+
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+
+do_install () {
+       # Create MALI manifest
+       install -m 755 -d ${D}/${libdir}
+       if [ "${USE_X11}" = "yes" ]; then
+               install ${S}/x11/libmali.so ${D}/${libdir}
+       elif [ "${USE_WL}" = "yes" ]; then
+               install ${S}/wayland/libmali.so ${D}/${libdir}
+       fi
+
+       ln -sf libmali.so ${D}/${libdir}/libEGL.so
+       ln -sf libmali.so ${D}/${libdir}/libGLESv1_CM.so
+       ln -sf libmali.so ${D}/${libdir}/libGLESv2.so
+       ln -sf libmali.so ${D}/${libdir}/libOpenCL.so
+       ln -sf libmali.so ${D}/${libdir}/libgbm.so
+
+       if [ "${USE_WL}" = "yes" ]; then
+               ln -sf libmali.so ${D}/${libdir}/libwayland-egl.so
+       fi
+}
+
+PACKAGES = "${PN}"
+FILES_${PN} += "${libdir}/*.so"
+
+RREPLACES_${PN} = "libegl libgles1 libglesv1-cm1 libgles2 libglesv2-2

libgbm"
+RPROVIDES_${PN} = "libegl libgles1 libglesv1-cm1 libgles2 libglesv2-2 libgbm"
+RCONFLICTS_${PN} = "libegl libgles1 libglesv1-cm1 libgles2 libglesv2-2 libgbm"

recipes-graphics/mali-userspace/mali-userspace.inc new file +4 -0
+
+# Workaround: libmali.so provided by rk having no SONAME field in it
+# so add it to fix rdepends problems
+RPROVIDES_${PN} += "libwayland-egl.so libgbm.so libGLESv1_CM.so

libGLESv2.so libEGL.so libOpenCL.so"

recipes-graphics/mali-userspace/mali-userspace_t76x.bb new file +18 -0
new file mode 100644
index 0000000..3281ac0
@@ -0,0 +1,18 @@
+require mali-userspace.inc
+
+TYPE = "midgard"
+SW_VER = "r13p0"
+HW_VER = "r0p0"
+
+LIB_PATH = "arm-linux-gnueabihf"
+
+MALI_X11 = "libmali-${TYPE}-${SW_VER}-${HW_VER}.so"
+MALI_WAYLAND = "libmali-${TYPE}-${SW_VER}-${HW_VER}-wayland.so"
+
+do_install_prepend () {
+       mkdir -p x11
+       cp git/lib/${LIB_PATH}/${MALI_X11} x11/libmali.so
+
+       mkdir -p wayland
+       cp git/lib/${LIB_PATH}/${MALI_WAYLAND}  wayland/libmali.so
+}
recipes-graphics/mesa/mesa_%.bbappend new file +1 -0
new file mode 100644
index 0000000..d9cab75
@@ -0,0 +1,9 @@
+PROVIDES_remove = "virtual/libgles1 virtual/libgles2 virtual/egl

virtual/libwayland-egl"

recipes-graphics/mesa/mesa_%.bbappend new file +8 -1
+
+do_install_append () {
+    rm -f ${D}/${libdir}/libEGL*
+    rm -f ${D}/${libdir}/libGLESv1_CM.*
+    rm -f ${D}/${libdir}/libGLESv2.*
+    rm -f ${D}/${libdir}/libgbm*
+    rm -f ${D}/${libdir}/libwayland-egl*
+}
--

2.7.4

#18 lore raw

Re: [meta-rockchip][PATCH 4/7] recipes-graphics: Add support for mali-userspace

Quoted 8 lines · Romain Perier

Hi all,

Correct me if I am wrong, but these are generic mali userpace binaries ? meta-rockchip is a bsp meta layer, it should only contains files and recipes to make rockchip board working or things specific to the rockchip board. For me these recipes are completly generic and might be re-used for another platform with another SoC.

Quoted 5 lines

I don't want this in meta-rockchip. There is no a layer called meta-mali or something ?

@Trevor: Feel free to comment, the point of view of the second maintainer is always welcome

:-)

I was just about to point out that there is no meta-mali, and that most BSP layers do include their own recipes for mali (meta-sunxi, meta-96boards, meta-xilinx) but, googling around, there is in fact a meta-mali provided my ARM itself:
https://github.com/ARM-software/meta-mali . So I guess we could go either way. Although I haven't looked at what's specifically provided in meta-mali to know if it would be useful or not.

#19 lore raw

Re: [meta-rockchip][PATCH 4/7] recipes-graphics: Add support for mali-userspace

Hi,

Trevor Woerner wrote on 2017年01月28日 09:44:

Quoted 17 lines · Romain Perier
Quoted 8 lines

Hi all,

Correct me if I am wrong, but these are generic mali userpace binaries ? meta-rockchip is a bsp meta layer, it should only contains files and recipes to make rockchip board working or things specific to the rockchip board. For me these recipes are completly generic and might be re-used for another platform with another SoC.

Quoted 5 lines

I don't want this in meta-rockchip. There is no a layer called meta-mali or something ?

@Trevor: Feel free to comment, the point of view of the second maintainer is always welcome

:-)

Quoted 8 lines

I was just about to point out that there is no meta-mali, and that most BSP layers do include their own recipes for mali (meta-sunxi, meta-96boards, meta-xilinx) but, googling around, there is in fact a meta-mali provided my ARM itself:
https://github.com/ARM-software/meta-mali . So I guess we could go either way. Although I haven't looked at what's specifically provided in meta-mali to know if it would be useful or not.

I think GPU is a part of SOC. Other bsp meta layer also contain gpu userpace binaries.
And, mali userpace binaries are not very generic, there are different in hardware versions, software versions and backends. e.g:

    rk3288's GPU is T76x-r0p0 but rk3288w's GPU is T76x-r1p0, so they 

have to use different binaries.

#20 lore raw

Re: [meta-rockchip][PATCH 4/7] recipes-graphics: Add support for mali-userspace

Hi Jacob,

This is a good first version, but I think there are some things that could be added to make it better. For example, it should have a COMPATIBLE_MACHINE statement, and it should detect whether the target is using hard-float. Also the name "mali-userspace_t76x.bb" isn't a good choice, the part after the underscore should indicate the version, but t76x indicates the target mali implementation.

I think the sunxi people have done a good job with their mali recipes:
https://github.com/linux-sunxi/meta-sunxi/tree/master/recipes-graphics/libgles.
Would you be interested in creating a v2 modeled after their work?

Best regards,
Trevor

Quoted 49 lines · Jacob Chen

Hi,

Trevor Woerner wrote on 2017年01月28日 09:44:

Quoted 25 lines
Quoted 11 lines · Romain Perier

Hi all,

Correct me if I am wrong, but these are generic mali userpace binaries ? meta-rockchip is a bsp meta layer, it should only contains files and recipes
to make rockchip board working or things specific to the rockchip board. For
me these recipes are completly generic and might be re-used for another platform with another SoC.

Quoted 7 lines

I don't want this in meta-rockchip. There is no a layer called meta-mali or
something ?

@Trevor: Feel free to comment, the point of view of the second maintainer is
always welcome

:-)

Quoted 8 lines

I was just about to point out that there is no meta-mali, and that most BSP layers do include their own recipes for mali (meta-sunxi, meta-96boards, meta-xilinx) but, googling around, there is in fact a meta-mali provided my ARM itself:
https://github.com/ARM-software/meta-mali . So I guess we could go either way. Although I haven't looked at what's specifically provided in meta-mali to know if it would be useful or not.

I think GPU is a part of SOC. Other bsp meta layer also contain gpu userpace binaries.
And, mali userpace binaries are not very generic, there are different in hardware versions, software versions and backends.
e.g:

    rk3288's GPU is T76x-r0p0 but rk3288w's GPU is T76x-r1p0, so they have

to use different binaries.

author
#21 lore raw

PATCH 5/7 recipes-bsp: add u-boot-rockchip support

In reply to Jacob Chen

Rockchip next-dev U-boot is the next generation of rockchip u-boot, will also be an upstream tracking branch. At present, this branch is just a rebased upstream u-boot.

---
 recipes-bsp/u-boot/u-boot-rockchip_next.bb | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 recipes-bsp/u-boot/u-boot-rockchip_next.bb
recipes-bsp/u-boot/u-boot-rockchip_next.bb new file +17 -0
new file mode 100644
index 0000000..30d16b0
@@ -0,0 +1,17 @@
+# Copyright (C) 2017 Fuzhou Rockchip Electronics Co., Ltd
+# 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 = "(rk3288)"
+
+SRC_URI = "git://github.com/rockchip-linux/u-boot.git;branch=release;"
+SRCREV = "${AUTOREV}"
+
+do_install_prepend () {
+	# copy to default search path
+	cp ${B}/spl/${SPL_BINARY} ${B}/
+}
Signature · 1 line
2.7.4
author
#22 lore raw

PATCH 6/7 rk3288.inc: add some variables

In reply to Jacob Chen

change tune to cortexa17hf-neon:
Using the soft floating point abi is incompatible with some binary libaries.

Set preferred mali version to t76x.

Add APPEND which will be used in extlinux.conf.

Add SOC_FAMILY to help add chip specific changes.

Add SPL_BINARY to support build u-boot spl

---
 conf/machine/include/rk3288.inc | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
conf/machine/include/rk3288.inc +9 -1
index e6c19a2..9e7804a 100644
@@ -1,10 +1,18 @@
 # Copyright (C) 2015 Romain Perier
 # Released under the MIT license (see COPYING.MIT for the terms)
 
+SOC_FAMILY  = "rk3288"
+
 require conf/machine/include/tune-cortexa17.inc
+require conf/machine/include/soc-family.inc
 
-DEFAULTTUNE="cortexa17-neon"
+DEFAULTTUNE="cortexa17hf-neon"
 PREFERRED_PROVIDER_virtual/kernel = "linux"
 SERIAL_CONSOLES = "115200;ttyS2"
+SPL_BINARY = "u-boot-spl-dtb.bin"
 KERNEL_IMAGETYPE = "zImage"
 KBUILD_DEFCONFIG = "multi_v7_defconfig"
+
+PREFERRED_VERSION_mali-userspace = "t76x"
+
+APPEND = "console=tty1 console=ttyS2,115200n8 rw root=/dev/mmcblk2p7 rootfstype=ext4 init=/sbin/init"
Signature · 1 line
2.7.4
#23 lore raw

Re: [meta-rockchip][PATCH 6/7] rk3288.inc: add some variables

Hi all,

It remembers me a discussion that I wanted to have with Trevor: do we want specific TUNES (like these ones) in the machines files ? it is distro specific ?
I think that we might use "simple tune" like cortexa17 and let the possibility to the user to select neon or hf or vfpv4 for example. You could imagine a case where you write a machine file into another layer that inherits from a machine file (which is in meta-rockchip) and overrides DEFAULTTUNE for example.

Also Jacob, seriously split your commits :) . One commit per feature with a clear message to describe your changes please.

Thanks,
Romain

2017-01-19 15:04 GMT+01:00 Jacob Chen <[email protected]>:

Quoted 47 lines

change tune to cortexa17hf-neon:
Using the soft floating point abi is incompatible with some binary libaries.

Set preferred mali version to t76x.

Add APPEND which will be used in extlinux.conf.

Add SOC_FAMILY to help add chip specific changes.

Add SPL_BINARY to support build u-boot spl

---
 conf/machine/include/rk3288.inc | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
conf/machine/include/rk3288.inc +9 -1
index e6c19a2..9e7804a 100644
@@ -1,10 +1,18 @@
 # Copyright (C) 2015 Romain Perier
 # Released under the MIT license (see COPYING.MIT for the terms)
 
+SOC_FAMILY  = "rk3288"
+
 require conf/machine/include/tune-cortexa17.inc
+require conf/machine/include/soc-family.inc
 
-DEFAULTTUNE="cortexa17-neon"
+DEFAULTTUNE="cortexa17hf-neon"
 PREFERRED_PROVIDER_virtual/kernel = "linux"
 SERIAL_CONSOLES = "115200;ttyS2"
+SPL_BINARY = "u-boot-spl-dtb.bin"
 KERNEL_IMAGETYPE = "zImage"
 KBUILD_DEFCONFIG = "multi_v7_defconfig"
+
+PREFERRED_VERSION_mali-userspace = "t76x"
+
+APPEND = "console=tty1 console=ttyS2,115200n8 rw root=/dev/mmcblk2p7

rootfstype=ext4 init=/sbin/init"
--
2.7.4

#24 lore raw

Re: [meta-rockchip][PATCH 6/7] rk3288.inc: add some variables

Also "Add some variables"... does not mean anything to me :)

2017-01-27 16:01 GMT+01:00 Romain Perier <[email protected]>:

Quoted 68 lines

Hi all,

It remembers me a discussion that I wanted to have with Trevor: do we want specific TUNES (like these ones) in the machines files ? it is distro specific ?
I think that we might use "simple tune" like cortexa17 and let the possibility to the user to select neon or hf or vfpv4 for example. You could imagine a case where you write a machine file into another layer that inherits from a machine file (which is in meta-rockchip) and overrides DEFAULTTUNE for example.

Also Jacob, seriously split your commits :) . One commit per feature with a clear message to describe your changes please.

Thanks,
Romain

2017-01-19 15:04 GMT+01:00 Jacob Chen <[email protected]>:

Quoted 47 lines

change tune to cortexa17hf-neon:
Using the soft floating point abi is incompatible with some binary libaries.

Set preferred mali version to t76x.

Add APPEND which will be used in extlinux.conf.

Add SOC_FAMILY to help add chip specific changes.

Add SPL_BINARY to support build u-boot spl

---
 conf/machine/include/rk3288.inc | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
conf/machine/include/rk3288.inc +9 -1
index e6c19a2..9e7804a 100644
@@ -1,10 +1,18 @@
 # Copyright (C) 2015 Romain Perier
 # Released under the MIT license (see COPYING.MIT for the terms)
 
+SOC_FAMILY  = "rk3288"
+
 require conf/machine/include/tune-cortexa17.inc
+require conf/machine/include/soc-family.inc
 
-DEFAULTTUNE="cortexa17-neon"
+DEFAULTTUNE="cortexa17hf-neon"
 PREFERRED_PROVIDER_virtual/kernel = "linux"
 SERIAL_CONSOLES = "115200;ttyS2"
+SPL_BINARY = "u-boot-spl-dtb.bin"
 KERNEL_IMAGETYPE = "zImage"
 KBUILD_DEFCONFIG = "multi_v7_defconfig"
+
+PREFERRED_VERSION_mali-userspace = "t76x"
+
+APPEND = "console=tty1 console=ttyS2,115200n8 rw root=/dev/mmcblk2p7

rootfstype=ext4 init=/sbin/init"
--
2.7.4

#25 lore raw

Re: [meta-rockchip][PATCH 6/7] rk3288.inc: add some variables

In reply to Romain Perier

Hi Romain,

Quoted 5 lines · Romain Perier

Hi all,

It remembers me a discussion that I wanted to have with Trevor: do we want specific TUNES (like these ones) in the machines files ? it is distro specific ?

Awesome! I'm happy to see we're both thinking along the same lines! That was exactly the same thought I had too :-) I even had a couple private conversations with some other BSP maintainers I know to ask them about this, and I spent some time surveying other BSP layers to see what other people are doing.

Unfortunately there's no consensus, which means that there is no absolute right or wrong.

I personally do feel that a good BSP layer should not be providing a DEFAULTTUNE, this decision should be up to the user and/or a DISTRO layer.

In practice, however, this topic is complicated (especially in the ARM world) by the existence of the binaries for things like MALI (accelerated graphics). Other devices could potentially have binary blobs for various other reasons.

BSPs which provide support for aarch64 devices are lucky because they can skirt this entire issue; aarch64 implies hard float, so the default tunes are always going to enable hard float and therefore work with binaries. 32-bit BSPs are going to have this problem. Looking at other BSP layers many specify a DEFAULTTUNE:

- meta-raspberrypi
- meta-xilinx
- meta-gumstix
- meta-intel
- meta-odroid (akuster)
- meta-freescale
- meta-sunxi

Most of these DEFAULTTUNE suggestions, however, are found in conf/machine/include/<processor>.inc files, not in conf/machine/<board>.bb files directly. Looking closely, however, in many cases a BSP layer might have configurations for many different devices, only some of which have DEFAULTTUNEs (this is true for meta-sunxi, for example).

BSP layers that I can find that don't have DEFAULTTUNES are:

- meta-qcom
- meta-beaglebone (koen)
- meta-exynos
- meta-ettus

In meta-beaglebone's case, it requires conf/machine/include/ti33x.inc (which comes from meta-ti), that file then has a "DEFAULTTUNE ?=" but it could be argued that meta-ti is a chip layer and not a BSP layer.

At the very least, it should not be something that is provided with an equals sign, it should be specified in a BSP layer with ?=. Also, the general consensus is that a DEFAULTTUNE should not be given in a machine file directly. Most BSP layers have a "chip include file" in which a DEFAULTTUNE is given. Many layers don't include DEFAULTTUNE but have notes in their README files that explain this to the user and give suggestions for what they might put in their conf/local.conf files.

meta-sunxi, for example, doesn't give DEFAULTTUNEs for all their machine files, but they do provide recipes for mali. They handle this in the mali recipe by checking to see if the user has enabled hf. If the user is trying to use mali but hasn't enabled hf then that recipe will error out and let the user know they have to enable hf if they want mali or they have to not try to use mali if they prefer to use soft-float. I think that's a good way of handling this situation (see meta-sunxi/recipes-graphics/libgles/sunxi-mali_git.bb).

There is some debate on whether a default tune should point to a specific chip (e.g. cortexa17) or whether it should only specify an ABI (e.g. armv7a). Overwhelmingly in the ARM BSPs specific chips are used.

author
#26 lore raw

PATCH 7/7 rockchip-next-image: introduce image for rockchip next-dev u-boot

In reply to Jacob Chen

Being different from the previous rk-boot which use parameter, next-dev u-boot use gpt
partition, so it needs to generate a different image.

---
 classes/rockchip-next-image.bbclass | 130 ++++++++++++++++++++++++++++++++++++
 1 file changed, 130 insertions(+)
 create mode 100644 classes/rockchip-next-image.bbclass
classes/rockchip-next-image.bbclass new file +130 -0
new file mode 100644
index 0000000..cd87dee
@@ -0,0 +1,130 @@
+# Copyright (C) 2017 Fuzhou Rockchip Electronics Co., Ltd
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+inherit image_types
+
+# Use an uncompressed ext4 by default as rootfs
+IMG_ROOTFS_TYPE = "ext4"
+IMG_ROOTFS = "${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.${IMG_ROOTFS_TYPE}"
+
+# This image depends on the rootfs image
+IMAGE_TYPEDEP_rockchip-next-img = "${IMG_ROOTFS_TYPE}"
+
+NEXT_IMG       = "${IMAGE_NAME}.next.img"
+BOOT_IMG       = "boot.img"
+MINILOADER     = "loader.bin"
+UBOOT          = "u-boot.out"
+TRUST          = "trust.out"
+
+# Target image total size [in MiB]
+NEXT_IMG_SIZE ?= "4096"
+
+# default partitions [in Sectors]
+# More info at http://rockchip.wikidot.com/partitions
+LOADER1_SIZE = "8000"
+RESERVED1_SIZE = "128"
+RESERVED2_SIZE = "8192"
+LOADER2_SIZE = "8192"
+ATF_SIZE = "8192"
+BOOT_SIZE = "229376"
+
+IMAGE_DEPENDS_rockchip-next-img = "parted-native \
+	u-boot-mkimage-native \
+	mtools-native \
+	dosfstools-native \
+	virtual/kernel:do_deploy \
+	virtual/bootloader:do_deploy"
+
+PER_CHIP_IMG_GENERATION_COMMAND_rk3288 = "generate_rk3288_image"
+
+IMAGE_CMD_rockchip-next-img () {
+	# Change to image directory
+	cd ${DEPLOY_DIR_IMAGE}
+
+	create_rk_image
+
+	${PER_CHIP_IMG_GENERATION_COMMAND}
+}
+
+create_rk_image () {
+
+	echo "Creating filesystem with total size ${NEXT_IMG_SIZE} MiB"
+
+	# Remove the exist image
+	rm -rf *.next.img
+
+	# Initialize sdcard image file
+	dd if=/dev/zero of=${NEXT_IMG} bs=1M count=0 seek=${NEXT_IMG_SIZE}
+
+	# Create partition table
+	parted -s ${NEXT_IMG} mklabel gpt
+
+	# Create vendor defined partitions
+	LOADER1_START=64
+	RESERVED1_START=`expr ${LOADER1_START}  + ${LOADER1_SIZE}`
+	RESERVED2_START=`expr ${RESERVED1_START}  + ${RESERVED1_SIZE}`
+	LOADER2_START=`expr ${RESERVED2_START}  + ${RESERVED2_SIZE}`
+	ATF_START=`expr ${LOADER2_START}  + ${LOADER2_SIZE}`
+	BOOT_START=`expr ${ATF_START}  + ${ATF_SIZE}`
+	ROOTFS_START=`expr ${BOOT_START}  + ${BOOT_SIZE}`
+
+	parted -s ${NEXT_IMG} unit s mkpart loader1 ${LOADER1_START} `expr ${RESERVED1_START} - 1`
+	parted -s ${NEXT_IMG} unit s mkpart reserved1 ${RESERVED1_START} `expr ${RESERVED2_START} - 1`
+	parted -s ${NEXT_IMG} unit s mkpart reserved2 ${RESERVED2_START} `expr ${LOADER2_START} - 1`
+	parted -s ${NEXT_IMG} unit s mkpart loader2 ${LOADER2_START} `expr ${ATF_START} - 1`
+	parted -s ${NEXT_IMG} unit s mkpart atf ${ATF_START} `expr ${BOOT_START} - 1`
+
+	# Create boot partition and mark it as bootable
+	parted -s ${NEXT_IMG} unit s mkpart boot ${BOOT_START} `expr ${ROOTFS_START} - 1`
+	parted -s ${NEXT_IMG} set 6 boot on
+
+	# Create rootfs partition
+	parted -s ${NEXT_IMG} unit s mkpart root ${ROOTFS_START} 100%
+
+	parted ${NEXT_IMG} print
+
+	# Delete the boot image to avoid trouble with the build cache
+	rm -f ${WORKDIR}/${BOOT_IMG}
+
+	# Create boot partition image
+	BOOT_BLOCKS=$(LC_ALL=C parted -s ${NEXT_IMG} unit b print | awk '/ 6 / { print substr($4, 1, length($4 -1)) / 512 /2 }')
+	BOOT_BLOCKS=`expr $BOOT_BLOCKS / 63 \* 63`
+
+	mkfs.vfat -n "boot" -S 512 -C ${WORKDIR}/${BOOT_IMG} $BOOT_BLOCKS
+	mcopy -i ${WORKDIR}/${BOOT_IMG} -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin ::${KERNEL_IMAGETYPE}
+
+	DEVICETREE_DEFAULT=""
+	for DTS_FILE in ${KERNEL_DEVICETREE}; do
+		[ -n "${DEVICETREE_DEFAULT}"] && DEVICETREE_DEFAULT="${DTS_FILE}"
+		mcopy -i ${WORKDIR}/${BOOT_IMG} -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTS_FILE} ::${DTS_FILE}
+	done
+
+	# Create extlinux config file
+	cat > ${WORKDIR}/extlinux.conf <<EOF
+default yocto
+
+label yocto
+	kernel /${KERNEL_IMAGETYPE}
+	devicetree /${DEVICETREE_DEFAULT}
+	append ${APPEND}
+EOF
+
+	mmd -i ${WORKDIR}/${BOOT_IMG} ::/extlinux
+	mcopy -i ${WORKDIR}/${BOOT_IMG} -s ${WORKDIR}/extlinux.conf ::/extlinux/
+
+	# Burn Boot Partition
+	dd if=${WORKDIR}/${BOOT_IMG} of=${NEXT_IMG} conv=notrunc,fsync seek=${BOOT_START}
+
+	# Burn Rootfs Partition
+	dd if=${IMG_ROOTFS} of=${NEXT_IMG} seek=${ROOTFS_START}
+
+}
+
+generate_rk3288_image () {
+
+	# Burn bootloader
+	mkimage -n rk3288 -T rksd -d ${DEPLOY_DIR_IMAGE}/${SPL_BINARY} ${WORKDIR}/${UBOOT}
+	cat ${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.bin >>  ${WORKDIR}/${UBOOT}
+	dd if=${WORKDIR}/${UBOOT} of=${NEXT_IMG} conv=notrunc,fsync seek=64
+
+}
Signature · 1 line
2.7.4
#27 lore raw
In reply to Jacob Chen

You need to send to Romain Perier([email protected], Project leader of meta-rockchip), Trevor Woerner ([email protected], Maintainer of meta-rockchip)

2017-01-19 22:04 GMT+08:00 Jacob Chen <[email protected]>:

Quoted 61 lines

This series of patches add below features, will add more supports in the future(medias, more chips).

1. rockchip 4.4 kernel

Rockchip 4.4 kernel is currently the latest version of the rockchip offical kernel, will be an upstream tracking branch. We regularly release the kernel through github. It support all rockchip 64-bit chips and a few 32-bit chips.

2. rockchip next-dev U-boot

Rockchip next-dev U-boot is the next generation of rockchip u-boot, will also be an upstream tracking branch. At present, this branch is just a rebased upstream u-boot.

3. graphics

We have plans for the acceleration in wayland, x11 in the rockchip platform, but in this series of patches, we only include the mali bianry support.

4. rockchip-next-image

Being different from the previous rk-u-boot which use parameter, next-dev u-boot use gpt partition, so it needs to generate a different image.

Jacob Chen (7):
recipes-kernel: linux-rockchip: Add new recipe for 4.4
machine: Add machine file for the rk3288 linux Boards
machine: firefly: use linux-rockchip by default
recipes-graphics: Add support for mali-userspace
recipes-bsp: add u-boot-rockchip support
rk3288.inc: add some variables
rockchip-next-image: introduce image for rockchip next-dev u-boot

 classes/rockchip-next-image.bbclass                | 130 +++++++++++++++++++++
 conf/machine/evb-rk3288.conf                       |  12 ++
 conf/machine/fennec-rk3288.conf                    |  12 ++
 conf/machine/firefly-rk3288.conf                   |   4 +
 conf/machine/include/rk-linux.inc                  |  20 ++++
 conf/machine/include/rk3288.inc                    |  10 +-
 conf/machine/tinker-rk3288.conf                    |  13 +++
 recipes-bsp/u-boot/u-boot-rockchip_next.bb         |  17 +++
 recipes-graphics/mali-userspace/mali-userspace.inc |  57 +++++++++
 .../mali-userspace/mali-userspace_t76x.bb          |  18 +++
 recipes-graphics/mesa/mesa_%.bbappend              |   9 ++
 recipes-kernel/linux/linux-rockchip_4.4.bb         |  20 ++++
 12 files changed, 321 insertions(+), 1 deletion(-)
 create mode 100644 classes/rockchip-next-image.bbclass
 create mode 100644 conf/machine/evb-rk3288.conf
 create mode 100644 conf/machine/fennec-rk3288.conf
 create mode 100644 conf/machine/include/rk-linux.inc
 create mode 100644 conf/machine/tinker-rk3288.conf
 create mode 100644 recipes-bsp/u-boot/u-boot-rockchip_next.bb
 create mode 100644 recipes-graphics/mali-userspace/mali-userspace.inc
 create mode 100644 recipes-graphics/mali-userspace/mali-userspace_t76x.bb
 create mode 100644 recipes-graphics/mesa/mesa_%.bbappend
 create mode 100644 recipes-kernel/linux/linux-rockchip_4.4.bb

--
2.7.4

--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto