Skip to contentSkip to conversation

A20-OLinuXino-Lime: new board

PATCH New Francois Perrad 5 participants 9 messages Jun 26, 2015 – Jul 7, 2015

lore
Share & tools
lore
#0 lore raw

v4 cover A20-OLinuXino-Lime: new board

This set adds the board A20-OLinuXino-Lime, with 2 flavors:
- kernel mainline
- linux-sunxi (3.4.x)

Changes V3 -> V4
- mainline:
- set BR2_ARM_EABIHF=y
- set BR2_KERNEL_HEADERS_VERSION, BR2_DEFAULT_KERNEL_VERSION, BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_0
- boot.cmd: use ${fdtfile}, now this script could be used with the LIME, LIME2 & Micro boards
- mali:
- set BR2_ARM_EABIHF=y (required by BR2_PACKAGE_SUNXI_MALI_R3P0)
- set BR2_KERNEL_HEADERS_VERSION, BR2_DEFAULT_KERNEL_VERSION, BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_4
- set BR2_PACKAGE_SUNXI_MALI=y which is the purpose of this config
- remove BR2_LINUX_KERNEL_CUSTOM_GIT
- remove BR2_LINUX_KERNEL_VERSION="sunxi-3.4"
- boot.cmd: add some specific sunxi variables in bootargs

Changes V2 -> V3
- rename defconfig in order to avoid conflict between LIME, LIME2 and Micro boards
- mainline:
- some minor documentation fixes
- fix BR2_TARGET_GENERIC_ISSUE
- set BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2015.04"
- mali:
- switch to mainline U-Boot
- merge readme.txt
- refactor with github helper
- fix BR2_TARGET_GENERIC_ISSUE

Changes V1 -> V2: review/comments by Arnout Vandecappelle
- mainline:
- set BR2_KERNEL_HEADERS_4_0=y
- set BR2_LINUX_KERNEL_INSTALL_TARGET=y
- set BR2_TARGET_ROOTFS_EXT2_4=y
- refactor post-build with arguments from BR2_ROOTFS_POST_SCRIPT_ARGS
- rename of board/cubietech/cubieboard/mkcubiecard.sh
- patch removed
- legacy renamed to mali:
- refactor post-build with arguments from BR2_ROOTFS_POST_SCRIPT_ARGS
- readme-mali.txt:
- include text from https://linux-sunxi.org/Linux_Kernel
- fix a typo

Francois Perrad (2):
A20-OLinuXino-Lime: new board (mainline)
A20-OLinuXino-Lime: new board (mali)

 board/olimex/a20_olinuxino_lime/boot-mali.cmd    |   5 ++
 board/olimex/a20_olinuxino_lime/boot.cmd         |   5 ++
 board/olimex/a20_olinuxino_lime/post-build.sh    |  12 +++
 board/olimex/a20_olinuxino_lime/readme.txt       | 100 +++++++++++++++++++++++
 configs/olimex_a20_olinuxino_lime_defconfig      |  45 ++++++++++
 configs/olimex_a20_olinuxino_lime_mali_defconfig |  50 ++++++++++++
 6 files changed, 217 insertions(+)
 create mode 100644 board/olimex/a20_olinuxino_lime/boot-mali.cmd
 create mode 100644 board/olimex/a20_olinuxino_lime/boot.cmd
 create mode 100755 board/olimex/a20_olinuxino_lime/post-build.sh
 create mode 100644 board/olimex/a20_olinuxino_lime/readme.txt
 create mode 100644 configs/olimex_a20_olinuxino_lime_defconfig
 create mode 100644 configs/olimex_a20_olinuxino_lime_mali_defconfig
Signature · 1 line
2.1.4
#1 lore raw

PATCH v4 1/2 A20-OLinuXino-Lime: new board (mainline)

config device tree / mainline (4.0.5)

---
 board/olimex/a20_olinuxino_lime/boot.cmd      |  5 ++
 board/olimex/a20_olinuxino_lime/post-build.sh |  8 +++
 board/olimex/a20_olinuxino_lime/readme.txt    | 86 +++++++++++++++++++++++++++
 configs/olimex_a20_olinuxino_lime_defconfig   | 45 ++++++++++++++
 4 files changed, 144 insertions(+)
 create mode 100644 board/olimex/a20_olinuxino_lime/boot.cmd
 create mode 100755 board/olimex/a20_olinuxino_lime/post-build.sh
 create mode 100644 board/olimex/a20_olinuxino_lime/readme.txt
 create mode 100644 configs/olimex_a20_olinuxino_lime_defconfig
board/olimex/a20_olinuxino_lime/boot.cmd new file +5 -0
new file mode 100644
index 0000000..44d9239
@@ -0,0 +1,5 @@
+setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p1 rootwait panic=10 ${extra}
+ext4load mmc 0 0x49000000 /boot/${fdtfile}
+ext4load mmc 0 0x46000000 /boot/zImage
+env set fdt_high ffffffff
+bootz 0x46000000 - 0x49000000
board/olimex/a20_olinuxino_lime/post-build.sh new file +8 -0
new file mode 100755
index 0000000..4e6fbec
@@ -0,0 +1,8 @@
+#!/bin/sh
+# args from BR2_ROOTFS_POST_SCRIPT_ARGS
+# $2    path of boot.cmd
+# $3    output directory for boot.scr
+
+MKIMAGE=$HOST_DIR/usr/bin/mkimage
+
+$MKIMAGE -A arm -O linux -T script -C none -d $2 $3/boot.scr
board/olimex/a20_olinuxino_lime/readme.txt new file +86 -0

86 lines not on this page · raw message

configs/olimex_a20_olinuxino_lime_defconfig new file +45 -0

45 lines not on this page · raw message

Signature · 1 line
2.1.4
#2 lore raw

PATCH v4 1/2 A20-OLinuXino-Lime: new board (mainline)

Dear Francois,

Quoted 8 lines · Francois Perrad

config device tree / mainline (4.0.5)

---
  board/olimex/a20_olinuxino_lime/boot.cmd      |  5 ++
  board/olimex/a20_olinuxino_lime/post-build.sh |  8 +++
  board/olimex/a20_olinuxino_lime/readme.txt    | 86 +++++++++++++++++++++++++++

I confirm these files work for the A20-OLinuXino-Micro too, so I'd move them to board/olimex/a20_olinuxino/ (without the _lime suffix).

I'll build support for the Micro on top of them.

[...]

board/olimex/a20_olinuxino_lime/boot.cmd line 2

Quoted 8 lines
board/olimex/a20_olinuxino_lime/boot.cmd new file +2 -0
new file mode 100644
index 0000000..44d9239
@@ -0,0 +1,5 @@
+setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p1 rootwait panic=10 ${extra}
+ext4load mmc 0 0x49000000 /boot/${fdtfile}

Using ${fdtfile} here is a good idea, it simplified my job. Thanks!

[...]

board/olimex/a20_olinuxino_lime/readme.txt line 7

Quoted 13 lines
board/olimex/a20_olinuxino_lime/readme.txt new file +7 -0
new file mode 100644
index 0000000..3fc9c02
@@ -0,0 +1,86 @@
+A20-OLinuXino-LIME
+
+Intro
+=====
+
+This is a open hardware board,
+see https://www.olimex.com/Products/OLinuXino/open-source-hardware

I still think a link to the board webpage would be informative...

[...]

configs/olimex_a20_olinuxino_lime_defconfig line 4

Quoted 10 lines
configs/olimex_a20_olinuxino_lime_defconfig new file +4 -0
new file mode 100644
index 0000000..62f0a4c
@@ -0,0 +1,45 @@
+# Architecture
+BR2_arm=y
+BR2_cortex_a7=y
+BR2_ARM_EABIHF=y

This SoC has NEON and VFPv4, so you should add:
BR2_ARM_FPU_NEON_VFPV4=y

I booted a Micro board with a defconfig that is very similar to yours. But I couldn't borrow a Lime yet, do I just build-tested it.

Signature · 1 line
Luca
#3 lore raw

PATCH v4 1/2 A20-OLinuXino-Lime: new board (mainline)

2015-06-26 18:27 GMT+02:00 Luca Ceresoli <[email protected]>:

Quoted 58 lines

Dear Francois,

Quoted 10 lines · Francois Perrad

config device tree / mainline (4.0.5)

---
  board/olimex/a20_olinuxino_lime/boot.cmd      |  5 ++
  board/olimex/a20_olinuxino_lime/post-build.sh |  8 +++
  board/olimex/a20_olinuxino_lime/readme.txt    | 86

+++++++++++++++++++++++++++

I confirm these files work for the A20-OLinuXino-Micro too, so I'd move them to board/olimex/a20_olinuxino/ (without the _lime suffix).

I'll build support for the Micro on top of them.

[...]

Quoted 11 lines
board/olimex/a20_olinuxino_lime/boot.cmd new file +1 -0
new file mode 100644
index 0000000..44d9239
@@ -0,0 +1,5 @@
+setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p1 rootwait

panic=10 ${extra}
+ext4load mmc 0 0x49000000 /boot/${fdtfile}

Using ${fdtfile} here is a good idea, it simplified my job. Thanks!

[...]

Quoted 8 lines
board/olimex/a20_olinuxino_lime/readme.txt new file +0 -0
new file mode 100644
index 0000000..3fc9c02

board/olimex/a20_olinuxino_lime/readme.txt line 7

Quoted 7 lines
board/olimex/a20_olinuxino_lime/readme.txt new file +7 -0
@@ -0,0 +1,86 @@
+A20-OLinuXino-LIME
+
+Intro
+=====
+
+This is a open hardware board,
+see https://www.olimex.com/Products/OLinuXino/open-source-hardware

I still think a link to the board webpage would be informative...

[...]

Quoted 1 line
Quoted 16 lines

configs/olimex_a20_olinuxino_lime_defconfig line 4

Quoted 11 lines
configs/olimex_a20_olinuxino_lime_defconfig new file +4 -0
new file mode 100644
index 0000000..62f0a4c
@@ -0,0 +1,45 @@
+# Architecture
+BR2_arm=y
+BR2_cortex_a7=y
+BR2_ARM_EABIHF=y

This SoC has NEON and VFPv4, so you should add:
BR2_ARM_FPU_NEON_VFPV4=y

Dear Luca,

From the reading of arch/Config.in.arm:
- BR2_cortex_a7 selects BR2_ARM_CPU_HAS_NEON and BR2_ARM_CPU_HAS_VFPV4
- BR2_CPU_HAS_VFPV4 choices by default BR2_ARM_FPU_VFPV4D16 as "Floating point strategy"

BR2_ARM_FPU_NEON_VFPV4 could be another choice for this "Floating point strategy".

As far I see, the BR defconfigs try to stay minimalist. For me, the default settings provided by BR are good enough.

I added BR2_ARM_EABIHF because it is required by the proprietary blob binary mali r3p0, not because it is a nice to have or a fine tuning optimisation.

Fran?ois

Quoted 9 lines

I booted a Micro board with a defconfig that is very similar to yours. But I couldn't borrow a Lime yet, do I just build-tested it.

--
Luca
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#4 lore raw

PATCH v4 1/2 A20-OLinuXino-Lime: new board (mainline)

Dear Fran?ois,

thanks for your patches, which are now on master. I'll base my A20-OLinuXino-MICRO patches on top of you good work.

A comment below about minimal defconfigs.

Fran?ois Perrad wrote:
[...]

Quoted 27 lines
Quoted 7 lines
Quoted 7 lines
configs/olimex_a20_olinuxino_lime_defconfig new file +0 -0
new file mode 100644
index 0000000..62f0a4c
@@ -0,0 +1,45 @@
Quoted 9 lines

configs/olimex_a20_olinuxino_lime_defconfig line 4

Quoted 4 lines
configs/olimex_a20_olinuxino_lime_defconfig new file +4 -0
+# Architecture
+BR2_arm=y
+BR2_cortex_a7=y
+BR2_ARM_EABIHF=y

This SoC has NEON and VFPv4, so you should add:
BR2_ARM_FPU_NEON_VFPV4=y

Dear Luca,

From the reading of arch/Config.in.arm:
- BR2_cortex_a7 selects BR2_ARM_CPU_HAS_NEON and BR2_ARM_CPU_HAS_VFPV4
- BR2_CPU_HAS_VFPV4 choices by default BR2_ARM_FPU_VFPV4D16 as "Floating point strategy"

BR2_ARM_FPU_NEON_VFPV4 could be another choice for this "Floating point strategy".

Quoted 6 lines

As far I see, the BR defconfigs try to stay minimalist. For me, the default settings provided by BR are good enough.

I added BR2_ARM_EABIHF because it is required by the proprietary blob binary mali r3p0, not because it is a nice to have or a fine tuning optimisation.

I understand your argument.

However, my understanding of the "minimal defconfig" choice is only that they should not include unneeded packages (i.e. everything but busybox) in the root filesystem.

I don't see any advantage of configuring toolchain and target options in a sub-optimal way.

In fact, we have several Cortex-A defconfigs that enable NEON (5 out of
26) and EABIHF (9 out of 26):

$ git grep -l  cortex_a -- configs/ |wc
      26      26     878
$ git grep -l  cortex_a -- configs/ | xargs grep -l EABIHF|wc
       9       9     308
$ git grep -l  cortex_a -- configs/ | xargs grep -l NEON|wc
       5       5     158
$

But as I said, my understanding might be wrong.

Any authoritative opinions on this?
I'd be glad to update the docs with whatever is "official".

Signature · 1 line
Luca
#5 lore raw

PATCH v4 1/2 A20-OLinuXino-Lime: new board (mainline)

Dear Luca Ceresoli,

Quoted 11 lines · Luca Ceresoli

In fact, we have several Cortex-A defconfigs that enable NEON (5 out of
26) and EABIHF (9 out of 26):

$ git grep -l  cortex_a -- configs/ |wc
      26      26     878
$ git grep -l  cortex_a -- configs/ | xargs grep -l EABIHF|wc
       9       9     308
$ git grep -l  cortex_a -- configs/ | xargs grep -l NEON|wc
       5       5     158
$
Quoted 3 lines

But as I said, my understanding might be wrong.

Any authoritative opinions on this?

We don't have any strong position on this I believe. From my point of view, enabling EABIhf definitely makes sense when it is possible. And enabling NEON support also makes sense. However, using NEON as the FPU is a bad idea (i.e BR2_ARM_FPU_NEON=y is a bad idea).

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#6 lore raw

PATCH v4 1/2 A20-OLinuXino-Lime: new board (mainline)

Quoted 16 lines · Thomas Petazzoni

Dear Luca Ceresoli,

Quoted 11 lines · Luca Ceresoli

In fact, we have several Cortex-A defconfigs that enable NEON (5 out of
26) and EABIHF (9 out of 26):

$ git grep -l  cortex_a -- configs/ |wc
      26      26     878
$ git grep -l  cortex_a -- configs/ | xargs grep -l EABIHF|wc
       9       9     308
$ git grep -l  cortex_a -- configs/ | xargs grep -l NEON|wc
       5       5     158
$
Quoted 8 lines
Quoted 3 lines

But as I said, my understanding might be wrong.

Any authoritative opinions on this?

We don't have any strong position on this I believe. From my point of view, enabling EABIhf definitely makes sense when it is possible. And enabling NEON support also makes sense. However, using NEON as the FPU is a bad idea (i.e BR2_ARM_FPU_NEON=y is a bad idea).

I agree. In Config.in.arm, we already default to the "best" floating point
where possible, so it's just for the _MAYBE_ variants that it's necessary to do the right thing depending on the specific SoC.

As to EABIHF, there we should probably switch the default in Config.in.arch.
It's good that we didn't do this earlier, to give people time to migrate their configs, but EABIHF was introduced in 2013.08 so it should be safe now.

And of course, in the defconfigs, it's best to make it explicit.

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#7 lore raw

PATCH v4 2/2 A20-OLinuXino-Lime: new board (mali)

In reply to Francois Perrad

config mali / sunxi

---
 board/olimex/a20_olinuxino_lime/boot-mali.cmd    |  5 +++
 board/olimex/a20_olinuxino_lime/post-build.sh    |  4 ++
 board/olimex/a20_olinuxino_lime/readme.txt       | 16 +++++++-
 configs/olimex_a20_olinuxino_lime_mali_defconfig | 50 ++++++++++++++++++++++++
 4 files changed, 74 insertions(+), 1 deletion(-)
 create mode 100644 board/olimex/a20_olinuxino_lime/boot-mali.cmd
 create mode 100644 configs/olimex_a20_olinuxino_lime_mali_defconfig
board/olimex/a20_olinuxino_lime/boot-mali.cmd new file +5 -0
new file mode 100644
index 0000000..9fa5d65
@@ -0,0 +1,5 @@
+setenv bootm_boot_mode sec
+setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p1 rootwait panic=10 sunxi_ve_mem_reserve=0 sunxi_g2d_mem_reserve=0 sunxi_no_mali_mem_reserve sunxi_fb_mem_reserve=16 consoleblank=0 ${extra}
+ext4load mmc 0 0x43000000 /boot/script.bin
+ext4load mmc 0 0x48000000 /boot/zImage
+bootz 0x48000000
board/olimex/a20_olinuxino_lime/post-build.sh +4 -0
index 4e6fbec..ac8d4df 100755
@@ -6,3 +6,7 @@
 MKIMAGE=$HOST_DIR/usr/bin/mkimage
 
 $MKIMAGE -A arm -O linux -T script -C none -d $2 $3/boot.scr
+
+if [ -e $BINARIES_DIR/script.bin ]; then
+	cp $BINARIES_DIR/script.bin $3/script.bin
+fi
board/olimex/a20_olinuxino_lime/readme.txt +15 -1
index 3fc9c02..92ee24a 100644
@@ -6,11 +6,24 @@ Intro
 This is a open hardware board,
 see https://www.olimex.com/Products/OLinuXino/open-source-hardware
 
+The legacy linux-sunxi kernels are based on the vendor code drops.
+It is only useful when accelerated 3D graphics and multimedia support
+is strictly necessary.
+
+The Mainline Kernel is already a much better choice for a headless server.
+And also the mainline kernel works fine even for a basic Linux desktop
+system running on top of a simple framebuffer, which may be good enough for
+the users who do not need fancy 3D graphics or video playback acceleration.
+
 How to build it
 ===============
 
     $ make olimex_a20_olinuxino_lime_defconfig
 
+or
+
+    $ make olimex_a20_olinuxino_lime_mali_defconfig
+
 Compile everything and build the rootfs image:
 
     $ make
@@ -23,7 +36,8 @@ After building, you should get a tree like this:
     output/images/
     +-- rootfs.ext2
     +-- rootfs.ext4 -> rootfs.ext2
-    +-- sun7i-a20-olinuxino-lime.dtb
+    +-- script.bin (mali)
+    +-- sun7i-a20-olinuxino-lime.dtb (mainline)
     +-- u-boot.bin
     +-- u-boot-sunxi-with-spl.bin
     `-- zImage
configs/olimex_a20_olinuxino_lime_mali_defconfig new file +50 -0

50 lines not on this page · raw message

Signature · 1 line
2.1.4
#8 lore raw

v4 cover A20-OLinuXino-Lime: new board

In reply to Francois Perrad

Dear Francois Perrad,

Quoted 3 lines · Francois Perrad

Francois Perrad (2):
A20-OLinuXino-Lime: new board (mainline)
A20-OLinuXino-Lime: new board (mali)

Thanks, I've applied both patches after slightly tweaking the commit log.

Luca, don't hesitate to send follow-up patches once you have the Micro board working, and you want to rework Fran?ois defconfig to share some stuff between the Lime and Micro boards.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com