* [Buildroot] [PATCH v3 00/11] board: Add Allwinner A64/H5 boards
@ 2017-10-19 9:45 Jagan Teki
2017-10-19 9:45 ` [Buildroot] [PATCH v3 01/11] board: Add Bananapi M1 support Jagan Teki
` (10 more replies)
0 siblings, 11 replies; 21+ messages in thread
From: Jagan Teki @ 2017-10-19 9:45 UTC (permalink / raw)
To: buildroot
This patchset add 'sunxi64-post-build.sh' for building U-Boot proper,
becuase ATF binary should be build prior and have in env.
All boards now use Mainline U-Boot, Linux and Nanaopi A64, A64-olinuxino
used linux-next patches since 4.13.7 have not been merged.
Tested on rea hardware.
Changes for v3:
- Fixed Bananapi M1 comment on config file
- Add sunxi64-post-build.sh
- Add all sunxi64 boards
Changes for v2:
- Rebase on master
Jagan Teki (11):
board: Add Bananapi M1 support
support/scripts: Add sunxi64-post-build.sh
board: Add Bananapi M64 support
board: Add Pine64 support
board: Add SoPine support
board: Add FriendlyARM Nanopi A64 support
board: Add FriendlyARM Nanopi NEO2 support
board: Add Olimex A64-OLinuXino support
board: Add Orangepi Win/Win Plus support
board: Add Orangepi Prime support
board: Add Orangepi Zero Plus2 support
.gitlab-ci.yml | 10 +
DEVELOPERS | 18 ++
board/bananapi/bananapi-m1/boot.cmd | 7 +
board/bananapi/bananapi-m1/genimage.cfg | 33 +++
board/bananapi/bananapi-m1/readme.txt | 37 +++
board/bananapi/bananapi-m64/boot.cmd | 6 +
board/bananapi/bananapi-m64/genimage.cfg | 38 +++
board/bananapi/bananapi-m64/readme.txt | 37 +++
board/friendlyarm/nanopi-a64/boot.cmd | 6 +
board/friendlyarm/nanopi-a64/genimage.cfg | 38 +++
board/friendlyarm/nanopi-a64/linux_axp.fragment | 3 +
...nner-a64-add-NMI-R_INTC-controller-on-A64.patch | 41 ++++
...lwinner-a64-add-DTSI-file-for-AXP803-PMIC.patch | 176 ++++++++++++++
...winner-a64-Add-initial-NanoPi-A64-support.patch | 254 +++++++++++++++++++++
board/friendlyarm/nanopi-a64/readme.txt | 37 +++
board/friendlyarm/nanopi-neo2/boot.cmd | 6 +
board/friendlyarm/nanopi-neo2/genimage.cfg | 38 +++
board/friendlyarm/nanopi-neo2/readme.txt | 37 +++
board/olimex/a64-olinuxino/boot.cmd | 6 +
board/olimex/a64-olinuxino/genimage.cfg | 38 +++
board/olimex/a64-olinuxino/linux_axp.fragment | 3 +
...nner-a64-add-NMI-R_INTC-controller-on-A64.patch | 41 ++++
...lwinner-a64-add-DTSI-file-for-AXP803-PMIC.patch | 176 ++++++++++++++
...nner-a64-Add-A64-OLinuXino-initial-suppor.patch | 244 ++++++++++++++++++++
board/olimex/a64-olinuxino/readme.txt | 37 +++
board/orangepi/orangepi-prime/boot.cmd | 6 +
board/orangepi/orangepi-prime/genimage.cfg | 38 +++
board/orangepi/orangepi-prime/readme.txt | 37 +++
board/orangepi/orangepi-win/boot.cmd | 6 +
board/orangepi/orangepi-win/genimage.cfg | 38 +++
board/orangepi/orangepi-win/readme.txt | 37 +++
board/orangepi/orangepi-zero-plus2/boot.cmd | 6 +
board/orangepi/orangepi-zero-plus2/genimage.cfg | 38 +++
board/orangepi/orangepi-zero-plus2/readme.txt | 37 +++
board/pine64/pine64/boot.cmd | 6 +
board/pine64/pine64/genimage.cfg | 38 +++
board/pine64/pine64/readme.txt | 38 +++
board/pine64/sopine/boot.cmd | 6 +
board/pine64/sopine/genimage.cfg | 38 +++
board/pine64/sopine/readme.txt | 38 +++
configs/bananapi_m1_defconfig | 37 +++
configs/bananapi_m64_defconfig | 47 ++++
configs/friendlyarm_nanopi_a64_defconfig | 51 +++++
configs/friendlyarm_nanopi_neo2_defconfig | 47 ++++
configs/olimex_a64_olinuxino_defconfig | 51 +++++
configs/orangepi_prime_defconfig | 47 ++++
configs/orangepi_win_defconfig | 47 ++++
configs/orangepi_zero_plus2_defconfig | 47 ++++
configs/pine64_defconfig | 47 ++++
configs/pine64_sopine_defconfig | 47 ++++
support/scripts/sunxi64-post-build.sh | 32 +++
51 files changed, 2274 insertions(+)
create mode 100644 board/bananapi/bananapi-m1/boot.cmd
create mode 100644 board/bananapi/bananapi-m1/genimage.cfg
create mode 100644 board/bananapi/bananapi-m1/readme.txt
create mode 100644 board/bananapi/bananapi-m64/boot.cmd
create mode 100644 board/bananapi/bananapi-m64/genimage.cfg
create mode 100644 board/bananapi/bananapi-m64/readme.txt
create mode 100644 board/friendlyarm/nanopi-a64/boot.cmd
create mode 100644 board/friendlyarm/nanopi-a64/genimage.cfg
create mode 100644 board/friendlyarm/nanopi-a64/linux_axp.fragment
create mode 100644 board/friendlyarm/nanopi-a64/patches/linux/linux-0001-arm64-allwinner-a64-add-NMI-R_INTC-controller-on-A64.patch
create mode 100644 board/friendlyarm/nanopi-a64/patches/linux/linux-0002-arm64-allwinner-a64-add-DTSI-file-for-AXP803-PMIC.patch
create mode 100644 board/friendlyarm/nanopi-a64/patches/linux/linux-0003-arm64-allwinner-a64-Add-initial-NanoPi-A64-support.patch
create mode 100644 board/friendlyarm/nanopi-a64/readme.txt
create mode 100644 board/friendlyarm/nanopi-neo2/boot.cmd
create mode 100644 board/friendlyarm/nanopi-neo2/genimage.cfg
create mode 100644 board/friendlyarm/nanopi-neo2/readme.txt
create mode 100644 board/olimex/a64-olinuxino/boot.cmd
create mode 100644 board/olimex/a64-olinuxino/genimage.cfg
create mode 100644 board/olimex/a64-olinuxino/linux_axp.fragment
create mode 100644 board/olimex/a64-olinuxino/patches/linux/linux-0001-arm64-allwinner-a64-add-NMI-R_INTC-controller-on-A64.patch
create mode 100644 board/olimex/a64-olinuxino/patches/linux/linux-0002-arm64-allwinner-a64-add-DTSI-file-for-AXP803-PMIC.patch
create mode 100644 board/olimex/a64-olinuxino/patches/linux/linux-0003-arm64-allwinner-a64-Add-A64-OLinuXino-initial-suppor.patch
create mode 100644 board/olimex/a64-olinuxino/readme.txt
create mode 100644 board/orangepi/orangepi-prime/boot.cmd
create mode 100644 board/orangepi/orangepi-prime/genimage.cfg
create mode 100644 board/orangepi/orangepi-prime/readme.txt
create mode 100644 board/orangepi/orangepi-win/boot.cmd
create mode 100644 board/orangepi/orangepi-win/genimage.cfg
create mode 100644 board/orangepi/orangepi-win/readme.txt
create mode 100644 board/orangepi/orangepi-zero-plus2/boot.cmd
create mode 100644 board/orangepi/orangepi-zero-plus2/genimage.cfg
create mode 100644 board/orangepi/orangepi-zero-plus2/readme.txt
create mode 100644 board/pine64/pine64/boot.cmd
create mode 100644 board/pine64/pine64/genimage.cfg
create mode 100644 board/pine64/pine64/readme.txt
create mode 100644 board/pine64/sopine/boot.cmd
create mode 100644 board/pine64/sopine/genimage.cfg
create mode 100644 board/pine64/sopine/readme.txt
create mode 100644 configs/bananapi_m1_defconfig
create mode 100644 configs/bananapi_m64_defconfig
create mode 100644 configs/friendlyarm_nanopi_a64_defconfig
create mode 100644 configs/friendlyarm_nanopi_neo2_defconfig
create mode 100644 configs/olimex_a64_olinuxino_defconfig
create mode 100644 configs/orangepi_prime_defconfig
create mode 100644 configs/orangepi_win_defconfig
create mode 100644 configs/orangepi_zero_plus2_defconfig
create mode 100644 configs/pine64_defconfig
create mode 100644 configs/pine64_sopine_defconfig
create mode 100755 support/scripts/sunxi64-post-build.sh
--
1.9.1
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Buildroot] [PATCH v3 01/11] board: Add Bananapi M1 support
2017-10-19 9:45 [Buildroot] [PATCH v3 00/11] board: Add Allwinner A64/H5 boards Jagan Teki
@ 2017-10-19 9:45 ` Jagan Teki
2017-10-19 10:38 ` Baruch Siach
2017-10-21 20:37 ` Thomas Petazzoni
2017-10-19 9:45 ` [Buildroot] [PATCH v3 02/11] support/scripts: Add sunxi64-post-build.sh Jagan Teki
` (9 subsequent siblings)
10 siblings, 2 replies; 21+ messages in thread
From: Jagan Teki @ 2017-10-19 9:45 UTC (permalink / raw)
To: buildroot
Add initial support for bananapi M1 board with below features:
- U-Boot 2017.09
- Linux 4.17
- Default packages from buildroot
Cc: Jason <manager@sinovoip.com.cn>
Cc: hailymei at banana-pi.com <hailymei@banana-pi.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
.gitlab-ci.yml | 1 +
DEVELOPERS | 2 ++
board/bananapi/bananapi-m1/boot.cmd | 7 +++++++
board/bananapi/bananapi-m1/genimage.cfg | 33 +++++++++++++++++++++++++++++
board/bananapi/bananapi-m1/readme.txt | 37 +++++++++++++++++++++++++++++++++
configs/bananapi_m1_defconfig | 37 +++++++++++++++++++++++++++++++++
6 files changed, 117 insertions(+)
create mode 100644 board/bananapi/bananapi-m1/boot.cmd
create mode 100644 board/bananapi/bananapi-m1/genimage.cfg
create mode 100644 board/bananapi/bananapi-m1/readme.txt
create mode 100644 configs/bananapi_m1_defconfig
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0e69288..ebaac7a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -88,6 +88,7 @@ atmel_sama5d4_xplained_defconfig: *defconfig
atmel_sama5d4_xplained_dev_defconfig: *defconfig
atmel_sama5d4_xplained_mmc_defconfig: *defconfig
atmel_sama5d4_xplained_mmc_dev_defconfig: *defconfig
+bananapi_m1_defconfig: *defconfig
bananapi_m2_plus_defconfig: *defconfig
bananapro_defconfig: *defconfig
beagleboardx15_defconfig: *defconfig
diff --git a/DEVELOPERS b/DEVELOPERS
index dd19a0a..51283f1 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -726,7 +726,9 @@ N: Ilias Apalodimas <apalos@gmail.com>
F: package/keepalived/
N: Jagan Teki <jagan@amarulasolutions.com>
+F: board/bananapi/
F: board/engicam/
+F: configs/bananapi_m1_defconfig
F: configs/engicam_imx6qdl_icore_defconfig
F: configs/engicam_imx6qdl_icore_qt5_defconfig
F: configs/engicam_imx6qdl_icore_rqs_defconfig
diff --git a/board/bananapi/bananapi-m1/boot.cmd b/board/bananapi/bananapi-m1/boot.cmd
new file mode 100644
index 0000000..fb7de1d
--- /dev/null
+++ b/board/bananapi/bananapi-m1/boot.cmd
@@ -0,0 +1,7 @@
+setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
+
+mmc dev 0
+fatload mmc 0 $kernel_addr_r zImage
+fatload mmc 0 $fdt_addr_r sun7i-a20-bananapi.dts
+
+bootz $kernel_addr_r - $fdt_addr_r
diff --git a/board/bananapi/bananapi-m1/genimage.cfg b/board/bananapi/bananapi-m1/genimage.cfg
new file mode 100644
index 0000000..e2e1311
--- /dev/null
+++ b/board/bananapi/bananapi-m1/genimage.cfg
@@ -0,0 +1,33 @@
+image boot.vfat {
+ vfat {
+ files = {
+ "zImage",
+ "sun7i-a20-bananapi.dtb",
+ "boot.scr"
+ }
+ }
+ size = 64M
+}
+
+image sdcard.img {
+ hdimage {
+ }
+
+ partition u-boot {
+ in-partition-table = "no"
+ image = "u-boot-sunxi-with-spl.bin"
+ offset = 8192
+ size = 1040384 # 1MB - 8192
+ }
+
+ partition boot {
+ partition-type = 0xC
+ bootable = "true"
+ image = "boot.vfat"
+ }
+
+ partition rootfs {
+ partition-type = 0x83
+ image = "rootfs.ext4"
+ }
+}
diff --git a/board/bananapi/bananapi-m1/readme.txt b/board/bananapi/bananapi-m1/readme.txt
new file mode 100644
index 0000000..382ba63
--- /dev/null
+++ b/board/bananapi/bananapi-m1/readme.txt
@@ -0,0 +1,37 @@
+Intro
+=====
+
+This default configuration will allow you to start experimenting with the
+buildroot environment for the Bananapi M1. With the current configuration
+it will bring-up the board, and allow access through the serial console.
+
+Bananapi M1 link:
+http://www.banana-pi.org/m1.html
+
+Wiki link:
+https://openedev.amarulasolutions.com/display/ODWIKI/Bananapi+M1
+
+This configuration uses U-Boot mainline and kernel mainline.
+
+How to build
+============
+
+ $ make bananapi_m1_defconfig
+ $ make
+
+Note: you will need access to the internet to download the required
+sources.
+
+How to write the SD card
+========================
+
+Once the build process is finished you will have an image called "sdcard.img"
+in the output/images/ directory.
+
+Copy the bootable "sdcard.img" onto an SD card with "dd":
+
+ $ sudo dd if=output/images/sdcard.img of=/dev/sdX
+ $ sudo sync
+
+Insert the micro SDcard in your Bananapi M1 and power it up. The console
+is on the serial line, 115200 8N1.
diff --git a/configs/bananapi_m1_defconfig b/configs/bananapi_m1_defconfig
new file mode 100644
index 0000000..b084309
--- /dev/null
+++ b/configs/bananapi_m1_defconfig
@@ -0,0 +1,37 @@
+BR2_arm=y
+BR2_cortex_a7=y
+BR2_ARM_EABIHF=y
+
+# Linux headers same as kernel, a 4.13 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_13=y
+
+# Bootloader
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2017.09"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="Bananapi"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_FORMAT_BIN=y
+BR2_TARGET_UBOOT_SPL=y
+BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin"
+BR2_TARGET_UBOOT_BOOT_SCRIPT=y
+BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/bananapi/bananapi-m1/boot.cmd"
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.13.7"
+BR2_LINUX_KERNEL_DEFCONFIG="sunxi"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun7i-a20-bananapi"
+
+# Filesystem
+BR2_TARGET_GENERIC_ISSUE="Welcome to Bananapi M1"
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/bananapi/bananapi-m1/genimage.cfg"
--
1.9.1
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [Buildroot] [PATCH v3 02/11] support/scripts: Add sunxi64-post-build.sh
2017-10-19 9:45 [Buildroot] [PATCH v3 00/11] board: Add Allwinner A64/H5 boards Jagan Teki
2017-10-19 9:45 ` [Buildroot] [PATCH v3 01/11] board: Add Bananapi M1 support Jagan Teki
@ 2017-10-19 9:45 ` Jagan Teki
2017-10-21 21:06 ` Thomas Petazzoni
2017-10-19 9:45 ` [Buildroot] [PATCH v3 03/11] board: Add Bananapi M64 support Jagan Teki
` (8 subsequent siblings)
10 siblings, 1 reply; 21+ messages in thread
From: Jagan Teki @ 2017-10-19 9:45 UTC (permalink / raw)
To: buildroot
For building U-Boot proper in allwinner A64/H5 ATF need to build
first and ATF binary need to be exported, since buildroot not taking
care of this process this script will do the same build during
post-build.
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
support/scripts/sunxi64-post-build.sh | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
create mode 100755 support/scripts/sunxi64-post-build.sh
diff --git a/support/scripts/sunxi64-post-build.sh b/support/scripts/sunxi64-post-build.sh
new file mode 100755
index 0000000..359bd1d
--- /dev/null
+++ b/support/scripts/sunxi64-post-build.sh
@@ -0,0 +1,32 @@
+#!/usr/bin/env bash
+#
+# sunxi64-post-build script
+#
+# Allwinner A64/H5 firmware consists of three parts:
+# 1) U-Boot's SPL
+# 2) ARM Trusted Firmware (ATF)
+# 3) U-Boot proper.
+#
+# The SPL will load both ATF and U-Boot proper along with the right device
+# tree blob (.dtb) and will pass execution to ATF (in EL3), which in turn will
+# drop into the U-Boot proper (in EL2).
+#
+# As the ATF binary will become part of the U-Boot image file, you will need
+# to build it first and export ATF variable to built U-Boot proper. Since
+# buildroot not take of building ATF first and export the binary, this post-build
+# script build the u-boot.itb
+
+# source .config
+source ${BR2_CONFIG}
+
+ATF_BUILD_DIR=arm-trusted-firmware-${BR2_TARGET_ARM_TRUSTED_FIRMWARE_VERSION}/build
+ATF_PLAT_DIR=${ATF_BUILD_DIR}/${BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM}/release
+ATF_BIN_PATH=${ATF_PLAT_DIR}/${BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES}.bin
+UBOOT_BUILD_DIR=${BUILD_DIR}/uboot-${BR2_TARGET_UBOOT_VERSION}
+MKIMAGE=${UBOOT_BUILD_DIR}/tools/mkimage
+DTB_NAME=${BR2_LINUX_KERNEL_INTREE_DTS_NAME#*/}.dtb
+
+cd ${UBOOT_BUILD_DIR}
+export BL31=${BUILD_DIR}/${ATF_BIN_PATH}
+${UBOOT_BUILD_DIR}/board/sunxi/mksunxi_fit_atf.sh ${UBOOT_BUILD_DIR}/arch/arm/dts/${DTB_NAME} > u-boot.its
+${MKIMAGE} -f u-boot.its -E $BINARIES_DIR/u-boot.itb
--
1.9.1
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [Buildroot] [PATCH v3 03/11] board: Add Bananapi M64 support
2017-10-19 9:45 [Buildroot] [PATCH v3 00/11] board: Add Allwinner A64/H5 boards Jagan Teki
2017-10-19 9:45 ` [Buildroot] [PATCH v3 01/11] board: Add Bananapi M1 support Jagan Teki
2017-10-19 9:45 ` [Buildroot] [PATCH v3 02/11] support/scripts: Add sunxi64-post-build.sh Jagan Teki
@ 2017-10-19 9:45 ` Jagan Teki
2017-10-19 9:45 ` [Buildroot] [PATCH v3 04/11] board: Add Pine64 support Jagan Teki
` (7 subsequent siblings)
10 siblings, 0 replies; 21+ messages in thread
From: Jagan Teki @ 2017-10-19 9:45 UTC (permalink / raw)
To: buildroot
Add initial support for bananapi M64 board with below features:
- U-Boot 2017.09
- Linux 4.13.7
- Default packages from buildroot
Cc: Jason <manager@sinovoip.com.cn>
Cc: hailymei at banana-pi.com <hailymei@banana-pi.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
.gitlab-ci.yml | 1 +
DEVELOPERS | 1 +
board/bananapi/bananapi-m64/boot.cmd | 6 ++++
board/bananapi/bananapi-m64/genimage.cfg | 38 ++++++++++++++++++++++++++
board/bananapi/bananapi-m64/readme.txt | 37 +++++++++++++++++++++++++
configs/bananapi_m64_defconfig | 47 ++++++++++++++++++++++++++++++++
6 files changed, 130 insertions(+)
create mode 100644 board/bananapi/bananapi-m64/boot.cmd
create mode 100644 board/bananapi/bananapi-m64/genimage.cfg
create mode 100644 board/bananapi/bananapi-m64/readme.txt
create mode 100644 configs/bananapi_m64_defconfig
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ebaac7a..3dd4f48 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -90,6 +90,7 @@ atmel_sama5d4_xplained_mmc_defconfig: *defconfig
atmel_sama5d4_xplained_mmc_dev_defconfig: *defconfig
bananapi_m1_defconfig: *defconfig
bananapi_m2_plus_defconfig: *defconfig
+bananapi_m64_defconfig: *defconfig
bananapro_defconfig: *defconfig
beagleboardx15_defconfig: *defconfig
beaglebone_defconfig: *defconfig
diff --git a/DEVELOPERS b/DEVELOPERS
index 51283f1..6521aad 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -729,6 +729,7 @@ N: Jagan Teki <jagan@amarulasolutions.com>
F: board/bananapi/
F: board/engicam/
F: configs/bananapi_m1_defconfig
+F: configs/bananapi_m64_defconfig
F: configs/engicam_imx6qdl_icore_defconfig
F: configs/engicam_imx6qdl_icore_qt5_defconfig
F: configs/engicam_imx6qdl_icore_rqs_defconfig
diff --git a/board/bananapi/bananapi-m64/boot.cmd b/board/bananapi/bananapi-m64/boot.cmd
new file mode 100644
index 0000000..d35c9b0
--- /dev/null
+++ b/board/bananapi/bananapi-m64/boot.cmd
@@ -0,0 +1,6 @@
+setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
+
+fatload mmc 0 $kernel_addr_r Image
+fatload mmc 0 $fdt_addr_r sun50i-a64-bananapi-m64.dtb
+
+booti $kernel_addr_r - $fdt_addr_r
diff --git a/board/bananapi/bananapi-m64/genimage.cfg b/board/bananapi/bananapi-m64/genimage.cfg
new file mode 100644
index 0000000..891217c
--- /dev/null
+++ b/board/bananapi/bananapi-m64/genimage.cfg
@@ -0,0 +1,38 @@
+image boot.vfat {
+ vfat {
+ files = {
+ "Image",
+ "sun50i-a64-bananapi-m64.dtb",
+ "boot.scr"
+ }
+ }
+ size = 64M
+}
+
+image sdcard.img {
+ hdimage {
+ }
+
+ partition spl {
+ in-partition-table = "no"
+ image = "sunxi-spl.bin"
+ offset = 8192
+ }
+
+ partition u-boot {
+ in-partition-table = "no"
+ image = "u-boot.itb"
+ offset = 40K
+ }
+
+ partition boot {
+ partition-type = 0xC
+ bootable = "true"
+ image = "boot.vfat"
+ }
+
+ partition rootfs {
+ partition-type = 0x83
+ image = "rootfs.ext4"
+ }
+}
diff --git a/board/bananapi/bananapi-m64/readme.txt b/board/bananapi/bananapi-m64/readme.txt
new file mode 100644
index 0000000..0dec3e5
--- /dev/null
+++ b/board/bananapi/bananapi-m64/readme.txt
@@ -0,0 +1,37 @@
+Intro
+=====
+
+This default configuration will allow you to start experimenting with the
+buildroot environment for the Bananapi M64. With the current configuration
+it will bring-up the board, and allow access through the serial console.
+
+Bananapi M64 link:
+http://www.banana-pi.org/m64.html
+
+Wiki link:
+https://openedev.amarulasolutions.com/display/ODWIKI/Bananapi+M64
+
+This configuration uses U-Boot mainline and kernel mainline.
+
+How to build
+============
+
+ $ make bananapi_m64_defconfig
+ $ make
+
+Note: you will need access to the internet to download the required
+sources.
+
+How to write the SD card
+========================
+
+Once the build process is finished you will have an image called "sdcard.img"
+in the output/images/ directory.
+
+Copy the bootable "sdcard.img" onto an SD card with "dd":
+
+ $ sudo dd if=output/images/sdcard.img of=/dev/sdX
+ $ sudo sync
+
+Insert the micro SDcard in your Bananapi M64 and power it up. The console
+is on the serial line, 115200 8N1.
diff --git a/configs/bananapi_m64_defconfig b/configs/bananapi_m64_defconfig
new file mode 100644
index 0000000..68651b5
--- /dev/null
+++ b/configs/bananapi_m64_defconfig
@@ -0,0 +1,47 @@
+BR2_aarch64=y
+BR2_cortex_a53=y
+BR2_ARM_FPU_VFPV4=y
+
+# Linux headers same as kernel, a 4.13 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_13=y
+
+# Firmware
+BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://github.com/apritzel/arm-trusted-firmware.git"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="sun50iw1p1"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="aa75c8da415158a94b82a430b2b40000778e851f"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="bl31"
+
+# Bootloader
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2017.09"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="bananapi_m64"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
+BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.itb"
+BR2_TARGET_UBOOT_SPL=y
+BR2_TARGET_UBOOT_SPL_NAME="spl/sunxi-spl.bin"
+BR2_TARGET_UBOOT_BOOT_SCRIPT=y
+BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/bananapi/bananapi-m64/boot.cmd"
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.13.7"
+BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun50i-a64-bananapi-m64"
+
+# Filesystem
+BR2_TARGET_GENERIC_ISSUE="Welcome to Bananapi M64"
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/bananapi/bananapi-m64/genimage.cfg"
+BR2_ROOTFS_POST_BUILD_SCRIPT="support/scripts/sunxi64-post-build.sh"
--
1.9.1
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [Buildroot] [PATCH v3 04/11] board: Add Pine64 support
2017-10-19 9:45 [Buildroot] [PATCH v3 00/11] board: Add Allwinner A64/H5 boards Jagan Teki
` (2 preceding siblings ...)
2017-10-19 9:45 ` [Buildroot] [PATCH v3 03/11] board: Add Bananapi M64 support Jagan Teki
@ 2017-10-19 9:45 ` Jagan Teki
2017-10-19 9:45 ` [Buildroot] [PATCH v3 05/11] board: Add SoPine support Jagan Teki
` (6 subsequent siblings)
10 siblings, 0 replies; 21+ messages in thread
From: Jagan Teki @ 2017-10-19 9:45 UTC (permalink / raw)
To: buildroot
Add initial support for Pine64 board with below features:
- U-Boot 2017.09
- Linux 4.13.7
- Default packages from buildroot
Cc: TL Lim <tllim@pine64.org>
Cc: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
.gitlab-ci.yml | 1 +
DEVELOPERS | 2 ++
board/pine64/pine64/boot.cmd | 6 +++++
board/pine64/pine64/genimage.cfg | 38 ++++++++++++++++++++++++++++++++
board/pine64/pine64/readme.txt | 38 ++++++++++++++++++++++++++++++++
configs/pine64_defconfig | 47 ++++++++++++++++++++++++++++++++++++++++
6 files changed, 132 insertions(+)
create mode 100644 board/pine64/pine64/boot.cmd
create mode 100644 board/pine64/pine64/genimage.cfg
create mode 100644 board/pine64/pine64/readme.txt
create mode 100644 configs/pine64_defconfig
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3dd4f48..44edc61 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -161,6 +161,7 @@ orangepi_zero_defconfig: *defconfig
pandaboard_defconfig: *defconfig
pc_x86_64_bios_defconfig: *defconfig
pc_x86_64_efi_defconfig: *defconfig
+pine64_defconfig: *defconfig
qemu_aarch64_virt_defconfig: *defconfig
qemu_arm_versatile_defconfig: *defconfig
qemu_arm_versatile_nommu_defconfig: *defconfig
diff --git a/DEVELOPERS b/DEVELOPERS
index 6521aad..780c674 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -728,8 +728,10 @@ F: package/keepalived/
N: Jagan Teki <jagan@amarulasolutions.com>
F: board/bananapi/
F: board/engicam/
+F: board/pine64/
F: configs/bananapi_m1_defconfig
F: configs/bananapi_m64_defconfig
+F: configs/pine64_defconfig
F: configs/engicam_imx6qdl_icore_defconfig
F: configs/engicam_imx6qdl_icore_qt5_defconfig
F: configs/engicam_imx6qdl_icore_rqs_defconfig
diff --git a/board/pine64/pine64/boot.cmd b/board/pine64/pine64/boot.cmd
new file mode 100644
index 0000000..14f5610
--- /dev/null
+++ b/board/pine64/pine64/boot.cmd
@@ -0,0 +1,6 @@
+setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
+
+fatload mmc 0 $kernel_addr_r Image
+fatload mmc 0 $fdt_addr_r sun50i-a64-pine64.dtb
+
+booti $kernel_addr_r - $fdt_addr_r
diff --git a/board/pine64/pine64/genimage.cfg b/board/pine64/pine64/genimage.cfg
new file mode 100644
index 0000000..8e12308
--- /dev/null
+++ b/board/pine64/pine64/genimage.cfg
@@ -0,0 +1,38 @@
+image boot.vfat {
+ vfat {
+ files = {
+ "Image",
+ "sun50i-a64-pine64.dtb",
+ "boot.scr"
+ }
+ }
+ size = 64M
+}
+
+image sdcard.img {
+ hdimage {
+ }
+
+ partition spl {
+ in-partition-table = "no"
+ image = "sunxi-spl.bin"
+ offset = 8192
+ }
+
+ partition u-boot {
+ in-partition-table = "no"
+ image = "u-boot.itb"
+ offset = 40K
+ }
+
+ partition boot {
+ partition-type = 0xC
+ bootable = "true"
+ image = "boot.vfat"
+ }
+
+ partition rootfs {
+ partition-type = 0x83
+ image = "rootfs.ext4"
+ }
+}
diff --git a/board/pine64/pine64/readme.txt b/board/pine64/pine64/readme.txt
new file mode 100644
index 0000000..54e6f9c
--- /dev/null
+++ b/board/pine64/pine64/readme.txt
@@ -0,0 +1,38 @@
+Intro
+=====
+
+This default configuration will allow you to start experimenting with the
+buildroot environment for the Pine64. With the current configuration
+it will bring-up the board, and allow access through the serial console.
+
+Pine64 link:
+https://www.pine64.org/?page_id=1194
+
+Wiki link:
+https://confluence.amarulasolutions.com/display/ODWIKI/Pine64
+
+This configuration uses U-Boot mainline and kernel mainline.
+
+How to build
+============
+
+ $ make pine64_defconfig
+
+ $ make
+
+Note: you will need access to the internet to download the required
+sources.
+
+How to write the SD card
+========================
+
+Once the build process is finished you will have an image called "sdcard.img"
+in the output/images/ directory.
+
+Copy the bootable "sdcard.img" onto an SD card with "dd":
+
+ $ sudo dd if=output/images/sdcard.img of=/dev/sdX
+ $ sudo sync
+
+Insert the micro SDcard in your Pine64 and power it up. The console
+is on the serial line, 115200 8N1.
diff --git a/configs/pine64_defconfig b/configs/pine64_defconfig
new file mode 100644
index 0000000..97ba478
--- /dev/null
+++ b/configs/pine64_defconfig
@@ -0,0 +1,47 @@
+BR2_aarch64=y
+BR2_cortex_a53=y
+BR2_ARM_FPU_VFPV4=y
+
+# Linux headers same as kernel, a 4.13 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_13=y
+
+# Firmware
+BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://github.com/apritzel/arm-trusted-firmware.git"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="sun50iw1p1"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="aa75c8da415158a94b82a430b2b40000778e851f"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="bl31"
+
+# Bootloader
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2017.09"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="pine64_plus"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
+BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.itb"
+BR2_TARGET_UBOOT_SPL=y
+BR2_TARGET_UBOOT_SPL_NAME="spl/sunxi-spl.bin"
+BR2_TARGET_UBOOT_BOOT_SCRIPT=y
+BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/pine64/pine64/boot.cmd"
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.13.7"
+BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun50i-a64-pine64"
+
+# Filesystem
+BR2_TARGET_GENERIC_ISSUE="Welcome to PINE64"
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/pine64/pine64/genimage.cfg"
+BR2_ROOTFS_POST_BUILD_SCRIPT="support/scripts/sunxi64-post-build.sh"
--
1.9.1
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [Buildroot] [PATCH v3 05/11] board: Add SoPine support
2017-10-19 9:45 [Buildroot] [PATCH v3 00/11] board: Add Allwinner A64/H5 boards Jagan Teki
` (3 preceding siblings ...)
2017-10-19 9:45 ` [Buildroot] [PATCH v3 04/11] board: Add Pine64 support Jagan Teki
@ 2017-10-19 9:45 ` Jagan Teki
2017-10-19 9:45 ` [Buildroot] [PATCH v3 06/11] board: Add FriendlyARM Nanopi A64 support Jagan Teki
` (5 subsequent siblings)
10 siblings, 0 replies; 21+ messages in thread
From: Jagan Teki @ 2017-10-19 9:45 UTC (permalink / raw)
To: buildroot
Add initial support for SoPine board with below features:
- U-Boot 2017.09
- Linux 4.13.7
- Default packages from buildroot
Cc: TL Lim <tllim@pine64.org>
Cc: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
.gitlab-ci.yml | 1 +
DEVELOPERS | 1 +
board/pine64/sopine/boot.cmd | 6 +++++
board/pine64/sopine/genimage.cfg | 38 ++++++++++++++++++++++++++++++++
board/pine64/sopine/readme.txt | 38 ++++++++++++++++++++++++++++++++
configs/pine64_sopine_defconfig | 47 ++++++++++++++++++++++++++++++++++++++++
6 files changed, 131 insertions(+)
create mode 100644 board/pine64/sopine/boot.cmd
create mode 100644 board/pine64/sopine/genimage.cfg
create mode 100644 board/pine64/sopine/readme.txt
create mode 100644 configs/pine64_sopine_defconfig
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 44edc61..a690b17 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -162,6 +162,7 @@ pandaboard_defconfig: *defconfig
pc_x86_64_bios_defconfig: *defconfig
pc_x86_64_efi_defconfig: *defconfig
pine64_defconfig: *defconfig
+pine64_sopine_defconfig: *defconfig
qemu_aarch64_virt_defconfig: *defconfig
qemu_arm_versatile_defconfig: *defconfig
qemu_arm_versatile_nommu_defconfig: *defconfig
diff --git a/DEVELOPERS b/DEVELOPERS
index 780c674..106d793 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -732,6 +732,7 @@ F: board/pine64/
F: configs/bananapi_m1_defconfig
F: configs/bananapi_m64_defconfig
F: configs/pine64_defconfig
+F: configs/pine64_sopine_defconfig
F: configs/engicam_imx6qdl_icore_defconfig
F: configs/engicam_imx6qdl_icore_qt5_defconfig
F: configs/engicam_imx6qdl_icore_rqs_defconfig
diff --git a/board/pine64/sopine/boot.cmd b/board/pine64/sopine/boot.cmd
new file mode 100644
index 0000000..79ac4d0
--- /dev/null
+++ b/board/pine64/sopine/boot.cmd
@@ -0,0 +1,6 @@
+setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
+
+fatload mmc 0 $kernel_addr_r Image
+fatload mmc 0 $fdt_addr_r sun50i-a64-pine64-plus.dtb
+
+booti $kernel_addr_r - $fdt_addr_r
diff --git a/board/pine64/sopine/genimage.cfg b/board/pine64/sopine/genimage.cfg
new file mode 100644
index 0000000..c1d77c7
--- /dev/null
+++ b/board/pine64/sopine/genimage.cfg
@@ -0,0 +1,38 @@
+image boot.vfat {
+ vfat {
+ files = {
+ "Image",
+ "sun50i-a64-pine64-plus.dtb",
+ "boot.scr"
+ }
+ }
+ size = 64M
+}
+
+image sdcard.img {
+ hdimage {
+ }
+
+ partition spl {
+ in-partition-table = "no"
+ image = "sunxi-spl.bin"
+ offset = 8192
+ }
+
+ partition u-boot {
+ in-partition-table = "no"
+ image = "u-boot.itb"
+ offset = 40K
+ }
+
+ partition boot {
+ partition-type = 0xC
+ bootable = "true"
+ image = "boot.vfat"
+ }
+
+ partition rootfs {
+ partition-type = 0x83
+ image = "rootfs.ext4"
+ }
+}
diff --git a/board/pine64/sopine/readme.txt b/board/pine64/sopine/readme.txt
new file mode 100644
index 0000000..05d26ee
--- /dev/null
+++ b/board/pine64/sopine/readme.txt
@@ -0,0 +1,38 @@
+Intro
+=====
+
+This default configuration will allow you to start experimenting with the
+buildroot environment for the SoPine. With the current configuration
+it will bring-up the board, and allow access through the serial console.
+
+SoPINE link:
+https://www.pine64.org/?page_id=1491
+
+Wiki link:
+https://confluence.amarulasolutions.com/display/ODWIKI/Pine64+SoPine
+
+This configuration uses U-Boot mainline and kernel mainline.
+
+How to build
+============
+
+ $ make pine64_sopine_defconfig
+
+ $ make
+
+Note: you will need access to the internet to download the required
+sources.
+
+How to write the SD card
+========================
+
+Once the build process is finished you will have an image called "sdcard.img"
+in the output/images/ directory.
+
+Copy the bootable "sdcard.img" onto an SD card with "dd":
+
+ $ sudo dd if=output/images/sdcard.img of=/dev/sdX
+ $ sudo sync
+
+Insert the micro SDcard in your SoPine and power it up. The console
+is on the serial line, 115200 8N1.
diff --git a/configs/pine64_sopine_defconfig b/configs/pine64_sopine_defconfig
new file mode 100644
index 0000000..caa9aa4
--- /dev/null
+++ b/configs/pine64_sopine_defconfig
@@ -0,0 +1,47 @@
+BR2_aarch64=y
+BR2_cortex_a53=y
+BR2_ARM_FPU_VFPV4=y
+
+# Linux headers same as kernel, a 4.13 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_13=y
+
+# Firmware
+BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://github.com/apritzel/arm-trusted-firmware.git"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="sun50iw1p1"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="aa75c8da415158a94b82a430b2b40000778e851f"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="bl31"
+
+# Bootloader
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2017.09"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="sopine_baseboard"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
+BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.itb"
+BR2_TARGET_UBOOT_SPL=y
+BR2_TARGET_UBOOT_SPL_NAME="spl/sunxi-spl.bin"
+BR2_TARGET_UBOOT_BOOT_SCRIPT=y
+BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/pine64/sopine/boot.cmd"
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.13.7"
+BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun50i-a64-pine64-plus"
+
+# Filesystem
+BR2_TARGET_GENERIC_ISSUE="Welcome to PINE64 SOPINE"
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/pine64/sopine/genimage.cfg"
+BR2_ROOTFS_POST_BUILD_SCRIPT="support/scripts/sunxi64-post-build.sh"
--
1.9.1
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [Buildroot] [PATCH v3 06/11] board: Add FriendlyARM Nanopi A64 support
2017-10-19 9:45 [Buildroot] [PATCH v3 00/11] board: Add Allwinner A64/H5 boards Jagan Teki
` (4 preceding siblings ...)
2017-10-19 9:45 ` [Buildroot] [PATCH v3 05/11] board: Add SoPine support Jagan Teki
@ 2017-10-19 9:45 ` Jagan Teki
2017-10-19 9:45 ` [Buildroot] [PATCH v3 07/11] board: Add FriendlyARM Nanopi NEO2 support Jagan Teki
` (4 subsequent siblings)
10 siblings, 0 replies; 21+ messages in thread
From: Jagan Teki @ 2017-10-19 9:45 UTC (permalink / raw)
To: buildroot
Add initial support for FriendlyARM Nanopi A64 board with below features:
- U-Boot 2017.09
- Linux 4.13.7
- Default packages from buildroot
Cc: Yuefei <yftan@friendlyarm.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
.gitlab-ci.yml | 1 +
DEVELOPERS | 2 +
board/friendlyarm/nanopi-a64/boot.cmd | 6 +
board/friendlyarm/nanopi-a64/genimage.cfg | 38 +++
board/friendlyarm/nanopi-a64/linux_axp.fragment | 3 +
...nner-a64-add-NMI-R_INTC-controller-on-A64.patch | 41 ++++
...lwinner-a64-add-DTSI-file-for-AXP803-PMIC.patch | 176 ++++++++++++++
...winner-a64-Add-initial-NanoPi-A64-support.patch | 254 +++++++++++++++++++++
board/friendlyarm/nanopi-a64/readme.txt | 37 +++
configs/friendlyarm_nanopi_a64_defconfig | 51 +++++
10 files changed, 609 insertions(+)
create mode 100644 board/friendlyarm/nanopi-a64/boot.cmd
create mode 100644 board/friendlyarm/nanopi-a64/genimage.cfg
create mode 100644 board/friendlyarm/nanopi-a64/linux_axp.fragment
create mode 100644 board/friendlyarm/nanopi-a64/patches/linux/linux-0001-arm64-allwinner-a64-add-NMI-R_INTC-controller-on-A64.patch
create mode 100644 board/friendlyarm/nanopi-a64/patches/linux/linux-0002-arm64-allwinner-a64-add-DTSI-file-for-AXP803-PMIC.patch
create mode 100644 board/friendlyarm/nanopi-a64/patches/linux/linux-0003-arm64-allwinner-a64-Add-initial-NanoPi-A64-support.patch
create mode 100644 board/friendlyarm/nanopi-a64/readme.txt
create mode 100644 configs/friendlyarm_nanopi_a64_defconfig
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a690b17..9e566de 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -119,6 +119,7 @@ freescale_imx6ulevk_defconfig: *defconfig
freescale_imx7dsabresd_defconfig: *defconfig
freescale_mpc8315erdb_defconfig: *defconfig
freescale_p1010rdb_pa_defconfig: *defconfig
+friendlyarm_nanopi_a64_defconfig: *defconfig
galileo_defconfig: *defconfig
gdb_bfin_bf512_defconfig: *defconfig
grinn_chiliboard_defconfig: *defconfig
diff --git a/DEVELOPERS b/DEVELOPERS
index 106d793..cae3730 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -728,9 +728,11 @@ F: package/keepalived/
N: Jagan Teki <jagan@amarulasolutions.com>
F: board/bananapi/
F: board/engicam/
+F: board/friendlyarm/nanopi-a64/
F: board/pine64/
F: configs/bananapi_m1_defconfig
F: configs/bananapi_m64_defconfig
+F: configs/friendlyarm_nanopi_a64_defconfig
F: configs/pine64_defconfig
F: configs/pine64_sopine_defconfig
F: configs/engicam_imx6qdl_icore_defconfig
diff --git a/board/friendlyarm/nanopi-a64/boot.cmd b/board/friendlyarm/nanopi-a64/boot.cmd
new file mode 100644
index 0000000..446bd85
--- /dev/null
+++ b/board/friendlyarm/nanopi-a64/boot.cmd
@@ -0,0 +1,6 @@
+setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
+
+fatload mmc 0 $kernel_addr_r Image
+fatload mmc 0 $fdt_addr_r sun50i-a64-nanopi-a64.dtb
+
+booti $kernel_addr_r - $fdt_addr_r
diff --git a/board/friendlyarm/nanopi-a64/genimage.cfg b/board/friendlyarm/nanopi-a64/genimage.cfg
new file mode 100644
index 0000000..edfb52d
--- /dev/null
+++ b/board/friendlyarm/nanopi-a64/genimage.cfg
@@ -0,0 +1,38 @@
+image boot.vfat {
+ vfat {
+ files = {
+ "Image",
+ "sun50i-a64-nanopi-a64.dtb",
+ "boot.scr"
+ }
+ }
+ size = 64M
+}
+
+image sdcard.img {
+ hdimage {
+ }
+
+ partition spl {
+ in-partition-table = "no"
+ image = "sunxi-spl.bin"
+ offset = 8192
+ }
+
+ partition u-boot {
+ in-partition-table = "no"
+ image = "u-boot.itb"
+ offset = 40K
+ }
+
+ partition boot {
+ partition-type = 0xC
+ bootable = "true"
+ image = "boot.vfat"
+ }
+
+ partition rootfs {
+ partition-type = 0x83
+ image = "rootfs.ext4"
+ }
+}
diff --git a/board/friendlyarm/nanopi-a64/linux_axp.fragment b/board/friendlyarm/nanopi-a64/linux_axp.fragment
new file mode 100644
index 0000000..b19bc65
--- /dev/null
+++ b/board/friendlyarm/nanopi-a64/linux_axp.fragment
@@ -0,0 +1,3 @@
+CONFIG_SUNXI_RSB=y
+CONFIG_MFD_AXP20X_RSB=y
+CONFIG_REGULATOR_AXP20X=y
diff --git a/board/friendlyarm/nanopi-a64/patches/linux/linux-0001-arm64-allwinner-a64-add-NMI-R_INTC-controller-on-A64.patch b/board/friendlyarm/nanopi-a64/patches/linux/linux-0001-arm64-allwinner-a64-add-NMI-R_INTC-controller-on-A64.patch
new file mode 100644
index 0000000..ccbaec5
--- /dev/null
+++ b/board/friendlyarm/nanopi-a64/patches/linux/linux-0001-arm64-allwinner-a64-add-NMI-R_INTC-controller-on-A64.patch
@@ -0,0 +1,41 @@
+From 535ca50858e2d8bf1618ace056cd96f0b3d01133 Mon Sep 17 00:00:00 2001
+From: Icenowy Zheng <icenowy@aosc.io>
+Date: Tue, 6 Jun 2017 13:59:32 +0800
+Subject: [PATCH] arm64: allwinner: a64: add NMI (R_INTC) controller on A64
+
+Allwinner A64 SoC features a R_INTC controller, which controls the NMI
+line, and this interrupt line is usually connected to the AXP PMIC.
+
+Add support for it.
+
+Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
+[wens at csie.org: Add fallback sun6i-a31-r-intc compatible]
+Signed-off-by: Chen-Yu Tsai <wens@csie.org>
+Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
+---
+ arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+index 9d00622..78c7c9d 100644
+--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
++++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+@@ -487,6 +487,15 @@
+ <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
++ r_intc: interrupt-controller at 1f00c00 {
++ compatible = "allwinner,sun50i-a64-r-intc",
++ "allwinner,sun6i-a31-r-intc";
++ interrupt-controller;
++ #interrupt-cells = <2>;
++ reg = <0x01f00c00 0x400>;
++ interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
++ };
++
+ r_ccu: clock at 1f01400 {
+ compatible = "allwinner,sun50i-a64-r-ccu";
+ reg = <0x01f01400 0x100>;
+--
+2.7.4
+
diff --git a/board/friendlyarm/nanopi-a64/patches/linux/linux-0002-arm64-allwinner-a64-add-DTSI-file-for-AXP803-PMIC.patch b/board/friendlyarm/nanopi-a64/patches/linux/linux-0002-arm64-allwinner-a64-add-DTSI-file-for-AXP803-PMIC.patch
new file mode 100644
index 0000000..3a6a9ef
--- /dev/null
+++ b/board/friendlyarm/nanopi-a64/patches/linux/linux-0002-arm64-allwinner-a64-add-DTSI-file-for-AXP803-PMIC.patch
@@ -0,0 +1,176 @@
+From 4c0a84757b5a0365a5dde82e732972eda80a32b1 Mon Sep 17 00:00:00 2001
+From: Icenowy Zheng <icenowy@aosc.io>
+Date: Thu, 18 May 2017 15:16:51 +0800
+Subject: [PATCH] arm64: allwinner: a64: add DTSI file for AXP803 PMIC
+
+As nearly all A64 boards are using AXP803 PMIC, add a DTSI file for it,
+like the old DTSI files for AXP20x/22x, for the common parts of the
+PMIC.
+
+Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
+Acked-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Chen-Yu Tsai <wens@csie.org>
+---
+ arch/arm64/boot/dts/allwinner/axp803.dtsi | 150 ++++++++++++++++++++++++++++++
+ 1 file changed, 150 insertions(+)
+ create mode 100644 arch/arm64/boot/dts/allwinner/axp803.dtsi
+
+diff --git a/arch/arm64/boot/dts/allwinner/axp803.dtsi b/arch/arm64/boot/dts/allwinner/axp803.dtsi
+new file mode 100644
+index 0000000..ff8af52
+--- /dev/null
++++ b/arch/arm64/boot/dts/allwinner/axp803.dtsi
+@@ -0,0 +1,150 @@
++/*
++ * Copyright 2017 Icenowy Zheng <icenowy@aosc.xyz>
++ *
++ * This file is dual-licensed: you can use it either under the terms
++ * of the GPL or the X11 license, at your option. Note that this dual
++ * licensing only applies to this file, and not this project as a
++ * whole.
++ *
++ * a) This file is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation; either version 2 of the
++ * License, or (at your option) any later version.
++ *
++ * This file is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * Or, alternatively,
++ *
++ * b) Permission is hereby granted, free of charge, to any person
++ * obtaining a copy of this software and associated documentation
++ * files (the "Software"), to deal in the Software without
++ * restriction, including without limitation the rights to use,
++ * copy, modify, merge, publish, distribute, sublicense, and/or
++ * sell copies of the Software, and to permit persons to whom the
++ * Software is furnished to do so, subject to the following
++ * conditions:
++ *
++ * The above copyright notice and this permission notice shall be
++ * included in all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
++ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
++ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
++ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
++ * OTHER DEALINGS IN THE SOFTWARE.
++ */
++
++/*
++ * AXP803 Integrated Power Management Chip
++ * http://files.pine64.org/doc/datasheet/pine64/AXP803_Datasheet_V1.0.pdf
++ */
++
++&axp803 {
++ interrupt-controller;
++ #interrupt-cells = <1>;
++
++ regulators {
++ /* Default work frequency for buck regulators */
++ x-powers,dcdc-freq = <3000>;
++
++ reg_aldo1: aldo1 {
++ regulator-name = "aldo1";
++ };
++
++ reg_aldo2: aldo2 {
++ regulator-name = "aldo2";
++ };
++
++ reg_aldo3: aldo3 {
++ regulator-name = "aldo3";
++ };
++
++ reg_dc1sw: dc1sw {
++ regulator-name = "dc1sw";
++ };
++
++ reg_dcdc1: dcdc1 {
++ regulator-name = "dcdc1";
++ };
++
++ reg_dcdc2: dcdc2 {
++ regulator-name = "dcdc2";
++ };
++
++ reg_dcdc3: dcdc3 {
++ regulator-name = "dcdc3";
++ };
++
++ reg_dcdc4: dcdc4 {
++ regulator-name = "dcdc4";
++ };
++
++ reg_dcdc5: dcdc5 {
++ regulator-name = "dcdc5";
++ };
++
++ reg_dcdc6: dcdc6 {
++ regulator-name = "dcdc6";
++ };
++
++ reg_dldo1: dldo1 {
++ regulator-name = "dldo1";
++ };
++
++ reg_dldo2: dldo2 {
++ regulator-name = "dldo2";
++ };
++
++ reg_dldo3: dldo3 {
++ regulator-name = "dldo3";
++ };
++
++ reg_dldo4: dldo4 {
++ regulator-name = "dldo4";
++ };
++
++ reg_eldo1: eldo1 {
++ regulator-name = "eldo1";
++ };
++
++ reg_eldo2: eldo2 {
++ regulator-name = "eldo2";
++ };
++
++ reg_eldo3: eldo3 {
++ regulator-name = "eldo3";
++ };
++
++ reg_fldo1: fldo1 {
++ regulator-name = "fldo1";
++ };
++
++ reg_fldo2: fldo2 {
++ regulator-name = "fldo2";
++ };
++
++ reg_ldo_io0: ldo-io0 {
++ regulator-name = "ldo-io0";
++ status = "disabled";
++ };
++
++ reg_ldo_io1: ldo-io1 {
++ regulator-name = "ldo-io1";
++ status = "disabled";
++ };
++
++ reg_rtc_ldo: rtc-ldo {
++ /* RTC_LDO is a fixed, always-on regulator */
++ regulator-always-on;
++ regulator-min-microvolt = <3000000>;
++ regulator-max-microvolt = <3000000>;
++ regulator-name = "rtc-ldo";
++ };
++ };
++};
+--
+2.7.4
+
diff --git a/board/friendlyarm/nanopi-a64/patches/linux/linux-0003-arm64-allwinner-a64-Add-initial-NanoPi-A64-support.patch b/board/friendlyarm/nanopi-a64/patches/linux/linux-0003-arm64-allwinner-a64-Add-initial-NanoPi-A64-support.patch
new file mode 100644
index 0000000..c7eb4bf
--- /dev/null
+++ b/board/friendlyarm/nanopi-a64/patches/linux/linux-0003-arm64-allwinner-a64-Add-initial-NanoPi-A64-support.patch
@@ -0,0 +1,254 @@
+From bf397214530ee5c873dac7b12126b250afd3831f Mon Sep 17 00:00:00 2001
+From: Jagan Teki <jagan@amarulasolutions.com>
+Date: Mon, 14 Aug 2017 16:06:53 +0530
+Subject: [PATCH] arm64: allwinner: a64: Add initial NanoPi A64 support
+
+NanoPi A64 is a new board of high performance with low cost
+designed by FriendlyElec., using the Allwinner A64 SOC.
+
+Nanopi A64 features
+- Allwinner A64, 64-bit Quad-core Cortex-A53 at 648MHz to 1.152GHz, DVFS
+- 1GB DDR3 RAM
+- MicroSD
+- Gigabit Ethernet (RTL8211E)
+- Wi-Fi 802.11b/g/n
+- IR receiver
+- Audio In/Out
+- Video In/Out
+- Serial Debug Port
+- microUSB 5V 2A DC power-supply
+
+Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
+Signed-off-by: Chen-Yu Tsai <wens@csie.org>
+---
+ arch/arm64/boot/dts/allwinner/Makefile | 1 +
+ .../boot/dts/allwinner/sun50i-a64-nanopi-a64.dts | 207 +++++++++++++++++++++
+ 2 files changed, 208 insertions(+)
+ create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts
+
+diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
+index 108f12c..c997b5c 100644
+--- a/arch/arm64/boot/dts/allwinner/Makefile
++++ b/arch/arm64/boot/dts/allwinner/Makefile
+@@ -1,4 +1,5 @@
+ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-bananapi-m64.dtb
++dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-nanopi-a64.dtb
+ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-orangepi-win.dtb
+ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-plus.dtb sun50i-a64-pine64.dtb
+ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-sopine-baseboard.dtb
+diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts
+new file mode 100644
+index 0000000..2beef9e
+--- /dev/null
++++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts
+@@ -0,0 +1,207 @@
++/*
++ * Copyright (C) 2017 Jagan Teki <jteki@openedev.com>
++ *
++ * This file is dual-licensed: you can use it either under the terms
++ * of the GPL or the X11 license, at your option. Note that this dual
++ * licensing only applies to this file, and not this project as a
++ * whole.
++ *
++ * a) This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation; either version 2 of the
++ * License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * Or, alternatively,
++ *
++ * b) Permission is hereby granted, free of charge, to any person
++ * obtaining a copy of this software and associated documentation
++ * files (the "Software"), to deal in the Software without
++ * restriction, including without limitation the rights to use,
++ * copy, modify, merge, publish, distribute, sublicense, and/or
++ * sell copies of the Software, and to permit persons to whom the
++ * Software is furnished to do so, subject to the following
++ * conditions:
++ *
++ * The above copyright notice and this permission notice shall be
++ * included in all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
++ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
++ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
++ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
++ * OTHER DEALINGS IN THE SOFTWARE.
++ */
++
++/dts-v1/;
++
++#include "sun50i-a64.dtsi"
++
++#include <dt-bindings/gpio/gpio.h>
++
++/ {
++ model = "FriendlyARM NanoPi A64";
++ compatible = "friendlyarm,nanopi-a64", "allwinner,sun50i-a64";
++
++ aliases {
++ serial0 = &uart0;
++ };
++
++ chosen {
++ stdout-path = "serial0:115200n8";
++ };
++};
++
++&ehci0 {
++ status = "okay";
++};
++
++&ehci1 {
++ status = "okay";
++};
++
++/* i2c1 connected with gpio headers like pine64, bananapi */
++&i2c1 {
++ pinctrl-names = "default";
++ pinctrl-0 = <&i2c1_pins>;
++ status = "disabled";
++};
++
++&i2c1_pins {
++ bias-pull-up;
++};
++
++&mmc0 {
++ pinctrl-names = "default";
++ pinctrl-0 = <&mmc0_pins>;
++ vmmc-supply = <®_dcdc1>;
++ cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
++ cd-inverted;
++ disable-wp;
++ bus-width = <4>;
++ status = "okay";
++};
++
++&ohci0 {
++ status = "okay";
++};
++
++&ohci1 {
++ status = "okay";
++};
++
++&r_rsb {
++ status = "okay";
++
++ axp803: pmic at 3a3 {
++ compatible = "x-powers,axp803";
++ reg = <0x3a3>;
++ interrupt-parent = <&r_intc>;
++ interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
++ };
++};
++
++#include "axp803.dtsi"
++
++®_aldo2 {
++ regulator-always-on;
++ regulator-min-microvolt = <1800000>;
++ regulator-max-microvolt = <3300000>;
++ regulator-name = "vcc-pl";
++};
++
++®_aldo3 {
++ regulator-always-on;
++ regulator-min-microvolt = <3000000>;
++ regulator-max-microvolt = <3000000>;
++ regulator-name = "vcc-pll-avcc";
++};
++
++®_dcdc1 {
++ regulator-always-on;
++ regulator-min-microvolt = <3000000>;
++ regulator-max-microvolt = <3000000>;
++ regulator-name = "vcc-3v";
++};
++
++®_dcdc2 {
++ regulator-always-on;
++ regulator-min-microvolt = <1040000>;
++ regulator-max-microvolt = <1300000>;
++ regulator-name = "vdd-cpux";
++};
++
++/* DCDC3 is polyphased with DCDC2 */
++
++®_dcdc5 {
++ regulator-always-on;
++ regulator-min-microvolt = <1500000>;
++ regulator-max-microvolt = <1500000>;
++ regulator-name = "vcc-dram";
++};
++
++®_dcdc6 {
++ regulator-always-on;
++ regulator-min-microvolt = <1100000>;
++ regulator-max-microvolt = <1100000>;
++ regulator-name = "vdd-sys";
++};
++
++®_dldo1 {
++ regulator-always-on;
++ regulator-min-microvolt = <3300000>;
++ regulator-max-microvolt = <3300000>;
++ regulator-name = "vcc-hdmi-dsi";
++};
++
++®_dldo4 {
++ regulator-always-on;
++ regulator-min-microvolt = <3000000>;
++ regulator-max-microvolt = <3000000>;
++ regulator-name = "vcc-pg-wifi-io";
++};
++
++®_eldo1 {
++ regulator-min-microvolt = <1800000>;
++ regulator-max-microvolt = <1800000>;
++ regulator-name = "cpvdd";
++};
++
++®_fldo1 {
++ regulator-min-microvolt = <1200000>;
++ regulator-max-microvolt = <1200000>;
++ regulator-name = "vcc-1v2-hsic";
++};
++
++/*
++ * The A64 chip cannot work without this regulator off, although
++ * it seems to be only driving the AR100 core.
++ * Maybe we don't still know well about CPUs domain.
++ */
++®_fldo2 {
++ regulator-always-on;
++ regulator-min-microvolt = <1100000>;
++ regulator-max-microvolt = <1100000>;
++ regulator-name = "vdd-cpus";
++};
++
++®_rtc_ldo {
++ regulator-name = "vcc-rtc";
++};
++
++&uart0 {
++ pinctrl-names = "default";
++ pinctrl-0 = <&uart0_pins_a>;
++ status = "okay";
++};
++
++&usbphy {
++ status = "okay";
++};
+--
+2.7.4
+
diff --git a/board/friendlyarm/nanopi-a64/readme.txt b/board/friendlyarm/nanopi-a64/readme.txt
new file mode 100644
index 0000000..77a5167
--- /dev/null
+++ b/board/friendlyarm/nanopi-a64/readme.txt
@@ -0,0 +1,37 @@
+Intro
+=====
+
+This default configuration will allow you to start experimenting with the
+buildroot environment for the Nanopi A64. With the current configuration
+it will bring-up the board, and allow access through the serial console.
+
+Nanopi A64 link:
+http://nanopi.io/nanopi-a64.html
+
+Wiki link:
+https://confluence.amarulasolutions.com/display/ODWIKI/FriendlyARM+Nanopi+A64
+
+This configuration uses U-Boot mainline and kernel mainline.
+
+How to build
+============
+
+ $ make friendlyarm_nanopi_a64_defconfig
+ $ make
+
+Note: you will need access to the internet to download the required
+sources.
+
+How to write the SD card
+========================
+
+Once the build process is finished you will have an image called "sdcard.img"
+in the output/images/ directory.
+
+Copy the bootable "sdcard.img" onto an SD card with "dd":
+
+ $ sudo dd if=output/images/sdcard.img of=/dev/sdX
+ $ sudo sync
+
+Insert the micro SDcard in your Nanopi A64 and power it up. The console
+is on the serial line, 115200 8N1.
diff --git a/configs/friendlyarm_nanopi_a64_defconfig b/configs/friendlyarm_nanopi_a64_defconfig
new file mode 100644
index 0000000..c564b4f
--- /dev/null
+++ b/configs/friendlyarm_nanopi_a64_defconfig
@@ -0,0 +1,51 @@
+BR2_aarch64=y
+BR2_cortex_a53=y
+BR2_ARM_FPU_VFPV4=y
+
+# Linux headers same as kernel, a 4.13 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_13=y
+
+# Patch dir
+BR2_GLOBAL_PATCH_DIR="board/friendlyarm/nanopi-a64/patches"
+
+# Firmware
+BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://github.com/apritzel/arm-trusted-firmware.git"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="sun50iw1p1"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="aa75c8da415158a94b82a430b2b40000778e851f"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="bl31"
+
+# Bootloader
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2017.09"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="nanopi_a64"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
+BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.itb"
+BR2_TARGET_UBOOT_SPL=y
+BR2_TARGET_UBOOT_SPL_NAME="spl/sunxi-spl.bin"
+BR2_TARGET_UBOOT_BOOT_SCRIPT=y
+BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/friendlyarm/nanopi-a64/boot.cmd"
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.13.7"
+BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun50i-a64-nanopi-a64"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/friendlyarm/nanopi-a64/linux_axp.fragment"
+
+# Filesystem
+BR2_TARGET_GENERIC_ISSUE="Welcome to FriendlyARM Nanopi A64"
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/friendlyarm/nanopi-a64/genimage.cfg"
+BR2_ROOTFS_POST_BUILD_SCRIPT="support/scripts/sunxi64-post-build.sh"
--
1.9.1
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [Buildroot] [PATCH v3 07/11] board: Add FriendlyARM Nanopi NEO2 support
2017-10-19 9:45 [Buildroot] [PATCH v3 00/11] board: Add Allwinner A64/H5 boards Jagan Teki
` (5 preceding siblings ...)
2017-10-19 9:45 ` [Buildroot] [PATCH v3 06/11] board: Add FriendlyARM Nanopi A64 support Jagan Teki
@ 2017-10-19 9:45 ` Jagan Teki
2017-10-19 9:45 ` [Buildroot] [PATCH v3 08/11] board: Add Olimex A64-OLinuXino support Jagan Teki
` (3 subsequent siblings)
10 siblings, 0 replies; 21+ messages in thread
From: Jagan Teki @ 2017-10-19 9:45 UTC (permalink / raw)
To: buildroot
Add initial support for FriendlyARM Nanopi NEO2 board with below features:
- U-Boot 2017.09
- Linux 4.13.7
- Default packages from buildroot
Cc: Yuefei <yftan@friendlyarm.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
.gitlab-ci.yml | 1 +
DEVELOPERS | 2 ++
board/friendlyarm/nanopi-neo2/boot.cmd | 6 ++++
board/friendlyarm/nanopi-neo2/genimage.cfg | 38 ++++++++++++++++++++++++
board/friendlyarm/nanopi-neo2/readme.txt | 37 +++++++++++++++++++++++
configs/friendlyarm_nanopi_neo2_defconfig | 47 ++++++++++++++++++++++++++++++
6 files changed, 131 insertions(+)
create mode 100644 board/friendlyarm/nanopi-neo2/boot.cmd
create mode 100644 board/friendlyarm/nanopi-neo2/genimage.cfg
create mode 100644 board/friendlyarm/nanopi-neo2/readme.txt
create mode 100644 configs/friendlyarm_nanopi_neo2_defconfig
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 9e566de..f09c8da 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -120,6 +120,7 @@ freescale_imx7dsabresd_defconfig: *defconfig
freescale_mpc8315erdb_defconfig: *defconfig
freescale_p1010rdb_pa_defconfig: *defconfig
friendlyarm_nanopi_a64_defconfig: *defconfig
+friendlyarm_nanopi_neo2_defconfig: *defconfig
galileo_defconfig: *defconfig
gdb_bfin_bf512_defconfig: *defconfig
grinn_chiliboard_defconfig: *defconfig
diff --git a/DEVELOPERS b/DEVELOPERS
index cae3730..1832310 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -729,10 +729,12 @@ N: Jagan Teki <jagan@amarulasolutions.com>
F: board/bananapi/
F: board/engicam/
F: board/friendlyarm/nanopi-a64/
+F: board/friendlyarm/nanopi-neo2/
F: board/pine64/
F: configs/bananapi_m1_defconfig
F: configs/bananapi_m64_defconfig
F: configs/friendlyarm_nanopi_a64_defconfig
+F: configs/friendlyarm_nanopi_neo2_defconfig
F: configs/pine64_defconfig
F: configs/pine64_sopine_defconfig
F: configs/engicam_imx6qdl_icore_defconfig
diff --git a/board/friendlyarm/nanopi-neo2/boot.cmd b/board/friendlyarm/nanopi-neo2/boot.cmd
new file mode 100644
index 0000000..9a39f4a
--- /dev/null
+++ b/board/friendlyarm/nanopi-neo2/boot.cmd
@@ -0,0 +1,6 @@
+setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
+
+fatload mmc 0 $kernel_addr_r Image
+fatload mmc 0 $fdt_addr_r sun50i-h5-nanopi-neo2.dtb
+
+booti $kernel_addr_r - $fdt_addr_r
diff --git a/board/friendlyarm/nanopi-neo2/genimage.cfg b/board/friendlyarm/nanopi-neo2/genimage.cfg
new file mode 100644
index 0000000..a1156a4
--- /dev/null
+++ b/board/friendlyarm/nanopi-neo2/genimage.cfg
@@ -0,0 +1,38 @@
+image boot.vfat {
+ vfat {
+ files = {
+ "Image",
+ "sun50i-h5-nanopi-neo2.dtb",
+ "boot.scr"
+ }
+ }
+ size = 64M
+}
+
+image sdcard.img {
+ hdimage {
+ }
+
+ partition spl {
+ in-partition-table = "no"
+ image = "sunxi-spl.bin"
+ offset = 8192
+ }
+
+ partition u-boot {
+ in-partition-table = "no"
+ image = "u-boot.itb"
+ offset = 40K
+ }
+
+ partition boot {
+ partition-type = 0xC
+ bootable = "true"
+ image = "boot.vfat"
+ }
+
+ partition rootfs {
+ partition-type = 0x83
+ image = "rootfs.ext4"
+ }
+}
diff --git a/board/friendlyarm/nanopi-neo2/readme.txt b/board/friendlyarm/nanopi-neo2/readme.txt
new file mode 100644
index 0000000..0f445e2
--- /dev/null
+++ b/board/friendlyarm/nanopi-neo2/readme.txt
@@ -0,0 +1,37 @@
+Intro
+=====
+
+This default configuration will allow you to start experimenting with the
+buildroot environment for the Nanopi NEO2. With the current configuration
+it will bring-up the board, and allow access through the serial console.
+
+Nanopi NEO2 link:
+http://nanopi.io/nanopi-neo2.html
+
+Wiki link:
+https://openedev.amarulasolutions.com/display/ODWIKI/FriendlyARM+NanoPi+NEO2
+
+This configuration uses U-Boot mainline and kernel mainline.
+
+How to build
+============
+
+ $ make friendlyarm_nanopi_neo2_defconfig
+ $ make
+
+Note: you will need access to the internet to download the required
+sources.
+
+How to write the SD card
+========================
+
+Once the build process is finished you will have an image called "sdcard.img"
+in the output/images/ directory.
+
+Copy the bootable "sdcard.img" onto an SD card with "dd":
+
+ $ sudo dd if=output/images/sdcard.img of=/dev/sdX
+ $ sudo sync
+
+Insert the micro SDcard in your Nanopi NEO2 and power it up. The console
+is on the serial line, 115200 8N1.
diff --git a/configs/friendlyarm_nanopi_neo2_defconfig b/configs/friendlyarm_nanopi_neo2_defconfig
new file mode 100644
index 0000000..7cb6279
--- /dev/null
+++ b/configs/friendlyarm_nanopi_neo2_defconfig
@@ -0,0 +1,47 @@
+BR2_aarch64=y
+BR2_cortex_a53=y
+BR2_ARM_FPU_VFPV4=y
+
+# Linux headers same as kernel, a 4.13 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_13=y
+
+# Firmware
+BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://github.com/apritzel/arm-trusted-firmware.git"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="sun50iw1p1"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="aa75c8da415158a94b82a430b2b40000778e851f"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="bl31"
+
+# Bootloader
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2017.09"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="nanopi_neo2"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
+BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.itb"
+BR2_TARGET_UBOOT_SPL=y
+BR2_TARGET_UBOOT_SPL_NAME="spl/sunxi-spl.bin"
+BR2_TARGET_UBOOT_BOOT_SCRIPT=y
+BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/friendlyarm/nanopi-neo2/boot.cmd"
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.13.7"
+BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun50i-h5-nanopi-neo2"
+
+# Filesystem
+BR2_TARGET_GENERIC_ISSUE="Welcome to FriendlyARM Nanopi NEO2"
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/friendlyarm/nanopi-neo2/genimage.cfg"
+BR2_ROOTFS_POST_BUILD_SCRIPT="support/scripts/sunxi64-post-build.sh"
--
1.9.1
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [Buildroot] [PATCH v3 08/11] board: Add Olimex A64-OLinuXino support
2017-10-19 9:45 [Buildroot] [PATCH v3 00/11] board: Add Allwinner A64/H5 boards Jagan Teki
` (6 preceding siblings ...)
2017-10-19 9:45 ` [Buildroot] [PATCH v3 07/11] board: Add FriendlyARM Nanopi NEO2 support Jagan Teki
@ 2017-10-19 9:45 ` Jagan Teki
2017-10-19 9:45 ` [Buildroot] [PATCH v3 09/11] board: Add Orangepi Win/Win Plus support Jagan Teki
` (2 subsequent siblings)
10 siblings, 0 replies; 21+ messages in thread
From: Jagan Teki @ 2017-10-19 9:45 UTC (permalink / raw)
To: buildroot
Add initial support for Olimex A64-OLinuXino board with below features:
- U-Boot 2017.09
- Linux 4.13.7
- Default packages from buildroot
Cc: Tsvetan Usunov <usunov@olimex.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
.gitlab-ci.yml | 1 +
DEVELOPERS | 2 +
board/olimex/a64-olinuxino/boot.cmd | 6 +
board/olimex/a64-olinuxino/genimage.cfg | 38 ++++
board/olimex/a64-olinuxino/linux_axp.fragment | 3 +
...nner-a64-add-NMI-R_INTC-controller-on-A64.patch | 41 ++++
...lwinner-a64-add-DTSI-file-for-AXP803-PMIC.patch | 176 +++++++++++++++
...nner-a64-Add-A64-OLinuXino-initial-suppor.patch | 244 +++++++++++++++++++++
board/olimex/a64-olinuxino/readme.txt | 37 ++++
configs/olimex_a64_olinuxino_defconfig | 51 +++++
10 files changed, 599 insertions(+)
create mode 100644 board/olimex/a64-olinuxino/boot.cmd
create mode 100644 board/olimex/a64-olinuxino/genimage.cfg
create mode 100644 board/olimex/a64-olinuxino/linux_axp.fragment
create mode 100644 board/olimex/a64-olinuxino/patches/linux/linux-0001-arm64-allwinner-a64-add-NMI-R_INTC-controller-on-A64.patch
create mode 100644 board/olimex/a64-olinuxino/patches/linux/linux-0002-arm64-allwinner-a64-add-DTSI-file-for-AXP803-PMIC.patch
create mode 100644 board/olimex/a64-olinuxino/patches/linux/linux-0003-arm64-allwinner-a64-Add-A64-OLinuXino-initial-suppor.patch
create mode 100644 board/olimex/a64-olinuxino/readme.txt
create mode 100644 configs/olimex_a64_olinuxino_defconfig
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f09c8da..8c6d2b3 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -154,6 +154,7 @@ olimex_a20_olinuxino_lime2_defconfig: *defconfig
olimex_a20_olinuxino_lime_defconfig: *defconfig
olimex_a20_olinuxino_lime_mali_defconfig: *defconfig
olimex_a20_olinuxino_micro_defconfig: *defconfig
+olimex_a64_olinuxino_defconfig: *defconfig
olimex_imx233_olinuxino_defconfig: *defconfig
openblocks_a6_defconfig: *defconfig
orangepi_one_defconfig: *defconfig
diff --git a/DEVELOPERS b/DEVELOPERS
index 1832310..1ae83f2 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -730,11 +730,13 @@ F: board/bananapi/
F: board/engicam/
F: board/friendlyarm/nanopi-a64/
F: board/friendlyarm/nanopi-neo2/
+F: board/olimex/a64-olinuxino/
F: board/pine64/
F: configs/bananapi_m1_defconfig
F: configs/bananapi_m64_defconfig
F: configs/friendlyarm_nanopi_a64_defconfig
F: configs/friendlyarm_nanopi_neo2_defconfig
+F: configs/olimex_a64_olinuxino_defconfig
F: configs/pine64_defconfig
F: configs/pine64_sopine_defconfig
F: configs/engicam_imx6qdl_icore_defconfig
diff --git a/board/olimex/a64-olinuxino/boot.cmd b/board/olimex/a64-olinuxino/boot.cmd
new file mode 100644
index 0000000..28ed6d9
--- /dev/null
+++ b/board/olimex/a64-olinuxino/boot.cmd
@@ -0,0 +1,6 @@
+setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
+
+fatload mmc 0 $kernel_addr_r Image
+fatload mmc 0 $fdt_addr_r sun50i-a64-olinuxino.dtb
+
+booti $kernel_addr_r - $fdt_addr_r
diff --git a/board/olimex/a64-olinuxino/genimage.cfg b/board/olimex/a64-olinuxino/genimage.cfg
new file mode 100644
index 0000000..a365bfe
--- /dev/null
+++ b/board/olimex/a64-olinuxino/genimage.cfg
@@ -0,0 +1,38 @@
+image boot.vfat {
+ vfat {
+ files = {
+ "Image",
+ "sun50i-a64-olinuxino.dtb",
+ "boot.scr"
+ }
+ }
+ size = 64M
+}
+
+image sdcard.img {
+ hdimage {
+ }
+
+ partition spl {
+ in-partition-table = "no"
+ image = "sunxi-spl.bin"
+ offset = 8192
+ }
+
+ partition u-boot {
+ in-partition-table = "no"
+ image = "u-boot.itb"
+ offset = 40K
+ }
+
+ partition boot {
+ partition-type = 0xC
+ bootable = "true"
+ image = "boot.vfat"
+ }
+
+ partition rootfs {
+ partition-type = 0x83
+ image = "rootfs.ext4"
+ }
+}
diff --git a/board/olimex/a64-olinuxino/linux_axp.fragment b/board/olimex/a64-olinuxino/linux_axp.fragment
new file mode 100644
index 0000000..b19bc65
--- /dev/null
+++ b/board/olimex/a64-olinuxino/linux_axp.fragment
@@ -0,0 +1,3 @@
+CONFIG_SUNXI_RSB=y
+CONFIG_MFD_AXP20X_RSB=y
+CONFIG_REGULATOR_AXP20X=y
diff --git a/board/olimex/a64-olinuxino/patches/linux/linux-0001-arm64-allwinner-a64-add-NMI-R_INTC-controller-on-A64.patch b/board/olimex/a64-olinuxino/patches/linux/linux-0001-arm64-allwinner-a64-add-NMI-R_INTC-controller-on-A64.patch
new file mode 100644
index 0000000..ccbaec5
--- /dev/null
+++ b/board/olimex/a64-olinuxino/patches/linux/linux-0001-arm64-allwinner-a64-add-NMI-R_INTC-controller-on-A64.patch
@@ -0,0 +1,41 @@
+From 535ca50858e2d8bf1618ace056cd96f0b3d01133 Mon Sep 17 00:00:00 2001
+From: Icenowy Zheng <icenowy@aosc.io>
+Date: Tue, 6 Jun 2017 13:59:32 +0800
+Subject: [PATCH] arm64: allwinner: a64: add NMI (R_INTC) controller on A64
+
+Allwinner A64 SoC features a R_INTC controller, which controls the NMI
+line, and this interrupt line is usually connected to the AXP PMIC.
+
+Add support for it.
+
+Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
+[wens at csie.org: Add fallback sun6i-a31-r-intc compatible]
+Signed-off-by: Chen-Yu Tsai <wens@csie.org>
+Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
+---
+ arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+index 9d00622..78c7c9d 100644
+--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
++++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+@@ -487,6 +487,15 @@
+ <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
++ r_intc: interrupt-controller at 1f00c00 {
++ compatible = "allwinner,sun50i-a64-r-intc",
++ "allwinner,sun6i-a31-r-intc";
++ interrupt-controller;
++ #interrupt-cells = <2>;
++ reg = <0x01f00c00 0x400>;
++ interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
++ };
++
+ r_ccu: clock at 1f01400 {
+ compatible = "allwinner,sun50i-a64-r-ccu";
+ reg = <0x01f01400 0x100>;
+--
+2.7.4
+
diff --git a/board/olimex/a64-olinuxino/patches/linux/linux-0002-arm64-allwinner-a64-add-DTSI-file-for-AXP803-PMIC.patch b/board/olimex/a64-olinuxino/patches/linux/linux-0002-arm64-allwinner-a64-add-DTSI-file-for-AXP803-PMIC.patch
new file mode 100644
index 0000000..3a6a9ef
--- /dev/null
+++ b/board/olimex/a64-olinuxino/patches/linux/linux-0002-arm64-allwinner-a64-add-DTSI-file-for-AXP803-PMIC.patch
@@ -0,0 +1,176 @@
+From 4c0a84757b5a0365a5dde82e732972eda80a32b1 Mon Sep 17 00:00:00 2001
+From: Icenowy Zheng <icenowy@aosc.io>
+Date: Thu, 18 May 2017 15:16:51 +0800
+Subject: [PATCH] arm64: allwinner: a64: add DTSI file for AXP803 PMIC
+
+As nearly all A64 boards are using AXP803 PMIC, add a DTSI file for it,
+like the old DTSI files for AXP20x/22x, for the common parts of the
+PMIC.
+
+Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
+Acked-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Chen-Yu Tsai <wens@csie.org>
+---
+ arch/arm64/boot/dts/allwinner/axp803.dtsi | 150 ++++++++++++++++++++++++++++++
+ 1 file changed, 150 insertions(+)
+ create mode 100644 arch/arm64/boot/dts/allwinner/axp803.dtsi
+
+diff --git a/arch/arm64/boot/dts/allwinner/axp803.dtsi b/arch/arm64/boot/dts/allwinner/axp803.dtsi
+new file mode 100644
+index 0000000..ff8af52
+--- /dev/null
++++ b/arch/arm64/boot/dts/allwinner/axp803.dtsi
+@@ -0,0 +1,150 @@
++/*
++ * Copyright 2017 Icenowy Zheng <icenowy@aosc.xyz>
++ *
++ * This file is dual-licensed: you can use it either under the terms
++ * of the GPL or the X11 license, at your option. Note that this dual
++ * licensing only applies to this file, and not this project as a
++ * whole.
++ *
++ * a) This file is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation; either version 2 of the
++ * License, or (at your option) any later version.
++ *
++ * This file is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * Or, alternatively,
++ *
++ * b) Permission is hereby granted, free of charge, to any person
++ * obtaining a copy of this software and associated documentation
++ * files (the "Software"), to deal in the Software without
++ * restriction, including without limitation the rights to use,
++ * copy, modify, merge, publish, distribute, sublicense, and/or
++ * sell copies of the Software, and to permit persons to whom the
++ * Software is furnished to do so, subject to the following
++ * conditions:
++ *
++ * The above copyright notice and this permission notice shall be
++ * included in all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
++ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
++ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
++ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
++ * OTHER DEALINGS IN THE SOFTWARE.
++ */
++
++/*
++ * AXP803 Integrated Power Management Chip
++ * http://files.pine64.org/doc/datasheet/pine64/AXP803_Datasheet_V1.0.pdf
++ */
++
++&axp803 {
++ interrupt-controller;
++ #interrupt-cells = <1>;
++
++ regulators {
++ /* Default work frequency for buck regulators */
++ x-powers,dcdc-freq = <3000>;
++
++ reg_aldo1: aldo1 {
++ regulator-name = "aldo1";
++ };
++
++ reg_aldo2: aldo2 {
++ regulator-name = "aldo2";
++ };
++
++ reg_aldo3: aldo3 {
++ regulator-name = "aldo3";
++ };
++
++ reg_dc1sw: dc1sw {
++ regulator-name = "dc1sw";
++ };
++
++ reg_dcdc1: dcdc1 {
++ regulator-name = "dcdc1";
++ };
++
++ reg_dcdc2: dcdc2 {
++ regulator-name = "dcdc2";
++ };
++
++ reg_dcdc3: dcdc3 {
++ regulator-name = "dcdc3";
++ };
++
++ reg_dcdc4: dcdc4 {
++ regulator-name = "dcdc4";
++ };
++
++ reg_dcdc5: dcdc5 {
++ regulator-name = "dcdc5";
++ };
++
++ reg_dcdc6: dcdc6 {
++ regulator-name = "dcdc6";
++ };
++
++ reg_dldo1: dldo1 {
++ regulator-name = "dldo1";
++ };
++
++ reg_dldo2: dldo2 {
++ regulator-name = "dldo2";
++ };
++
++ reg_dldo3: dldo3 {
++ regulator-name = "dldo3";
++ };
++
++ reg_dldo4: dldo4 {
++ regulator-name = "dldo4";
++ };
++
++ reg_eldo1: eldo1 {
++ regulator-name = "eldo1";
++ };
++
++ reg_eldo2: eldo2 {
++ regulator-name = "eldo2";
++ };
++
++ reg_eldo3: eldo3 {
++ regulator-name = "eldo3";
++ };
++
++ reg_fldo1: fldo1 {
++ regulator-name = "fldo1";
++ };
++
++ reg_fldo2: fldo2 {
++ regulator-name = "fldo2";
++ };
++
++ reg_ldo_io0: ldo-io0 {
++ regulator-name = "ldo-io0";
++ status = "disabled";
++ };
++
++ reg_ldo_io1: ldo-io1 {
++ regulator-name = "ldo-io1";
++ status = "disabled";
++ };
++
++ reg_rtc_ldo: rtc-ldo {
++ /* RTC_LDO is a fixed, always-on regulator */
++ regulator-always-on;
++ regulator-min-microvolt = <3000000>;
++ regulator-max-microvolt = <3000000>;
++ regulator-name = "rtc-ldo";
++ };
++ };
++};
+--
+2.7.4
+
diff --git a/board/olimex/a64-olinuxino/patches/linux/linux-0003-arm64-allwinner-a64-Add-A64-OLinuXino-initial-suppor.patch b/board/olimex/a64-olinuxino/patches/linux/linux-0003-arm64-allwinner-a64-Add-A64-OLinuXino-initial-suppor.patch
new file mode 100644
index 0000000..774636e
--- /dev/null
+++ b/board/olimex/a64-olinuxino/patches/linux/linux-0003-arm64-allwinner-a64-Add-A64-OLinuXino-initial-suppor.patch
@@ -0,0 +1,244 @@
+From 4eb9df9f809343b4dc47085807d8168acfa0d17a Mon Sep 17 00:00:00 2001
+From: Jagan Teki <jagan@amarulasolutions.com>
+Date: Mon, 14 Aug 2017 16:16:04 +0530
+Subject: [PATCH] arm64: allwinner: a64: Add A64-OLinuXino initial support
+
+OLimex A64-OLinuXino is an open-source hardware board
+using the Allwinner A64 SOC.
+
+OLimex A64-OLinuXino has
+- A64 Quad-core Cortex-A53 64bit
+- 1GB or 2GB RAM DDR3L @ 672Mhz
+- microSD slot and 4/8/16GB eMMC
+- Debug TTL UART
+- HDMI
+- LCD
+- IR receiver
+- 5V DC power supply
+
+Signed-off-by: Chen-Yu Tsai <wens@csie.org>
+Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
+---
+ arch/arm64/boot/dts/allwinner/Makefile | 1 +
+ .../boot/dts/allwinner/sun50i-a64-olinuxino.dts | 199 +++++++++++++++++++++
+ 2 files changed, 200 insertions(+)
+ create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
+
+diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
+index 108f12c..bd2d3f0 100644
+--- a/arch/arm64/boot/dts/allwinner/Makefile
++++ b/arch/arm64/boot/dts/allwinner/Makefile
+@@ -1,4 +1,5 @@
+ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-bananapi-m64.dtb
++dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-olinuxino.dtb
+ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-orangepi-win.dtb
+ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-plus.dtb sun50i-a64-pine64.dtb
+ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-sopine-baseboard.dtb
+diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
+new file mode 100644
+index 0000000..338e7861
+--- /dev/null
++++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
+@@ -0,0 +1,199 @@
++/*
++ * Copyright (C) 2017 Jagan Teki <jteki@openedev.com>
++ *
++ * This file is dual-licensed: you can use it either under the terms
++ * of the GPL or the X11 license, at your option. Note that this dual
++ * licensing only applies to this file, and not this project as a
++ * whole.
++ *
++ * a) This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation; either version 2 of the
++ * License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * Or, alternatively,
++ *
++ * b) Permission is hereby granted, free of charge, to any person
++ * obtaining a copy of this software and associated documentation
++ * files (the "Software"), to deal in the Software without
++ * restriction, including without limitation the rights to use,
++ * copy, modify, merge, publish, distribute, sublicense, and/or
++ * sell copies of the Software, and to permit persons to whom the
++ * Software is furnished to do so, subject to the following
++ * conditions:
++ *
++ * The above copyright notice and this permission notice shall be
++ * included in all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
++ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
++ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
++ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
++ * OTHER DEALINGS IN THE SOFTWARE.
++ */
++
++/dts-v1/;
++
++#include "sun50i-a64.dtsi"
++
++#include <dt-bindings/gpio/gpio.h>
++
++/ {
++ model = "Olimex A64-Olinuxino";
++ compatible = "olimex,a64-olinuxino", "allwinner,sun50i-a64";
++
++ aliases {
++ serial0 = &uart0;
++ };
++
++ chosen {
++ stdout-path = "serial0:115200n8";
++ };
++};
++
++&mmc0 {
++ pinctrl-names = "default";
++ pinctrl-0 = <&mmc0_pins>;
++ vmmc-supply = <®_dcdc1>;
++ cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
++ cd-inverted;
++ disable-wp;
++ bus-width = <4>;
++ status = "okay";
++};
++
++&r_rsb {
++ status = "okay";
++
++ axp803: pmic at 3a3 {
++ compatible = "x-powers,axp803";
++ reg = <0x3a3>;
++ interrupt-parent = <&r_intc>;
++ interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
++ };
++};
++
++#include "axp803.dtsi"
++
++®_aldo1 {
++ regulator-always-on;
++ regulator-min-microvolt = <2800000>;
++ regulator-max-microvolt = <2800000>;
++ regulator-name = "vcc-pe";
++};
++
++®_aldo2 {
++ regulator-always-on;
++ regulator-min-microvolt = <3300000>;
++ regulator-max-microvolt = <3300000>;
++ regulator-name = "vcc-pl";
++};
++
++®_aldo3 {
++ regulator-always-on;
++ regulator-min-microvolt = <3000000>;
++ regulator-max-microvolt = <3000000>;
++ regulator-name = "vcc-pll-avcc";
++};
++
++®_dcdc1 {
++ regulator-always-on;
++ regulator-min-microvolt = <3300000>;
++ regulator-max-microvolt = <3300000>;
++ regulator-name = "vcc-3v3";
++};
++
++®_dcdc2 {
++ regulator-always-on;
++ regulator-min-microvolt = <1040000>;
++ regulator-max-microvolt = <1300000>;
++ regulator-name = "vdd-cpux";
++};
++
++/* DCDC3 is polyphased with DCDC2 */
++
++®_dcdc5 {
++ regulator-always-on;
++ regulator-min-microvolt = <1500000>;
++ regulator-max-microvolt = <1500000>;
++ regulator-name = "vcc-ddr3";
++};
++
++®_dcdc6 {
++ regulator-always-on;
++ regulator-min-microvolt = <1100000>;
++ regulator-max-microvolt = <1100000>;
++ regulator-name = "vdd-sys";
++};
++
++®_dldo1 {
++ regulator-min-microvolt = <3300000>;
++ regulator-max-microvolt = <3300000>;
++ regulator-name = "vcc-hdmi";
++};
++
++®_dldo2 {
++ regulator-min-microvolt = <3300000>;
++ regulator-max-microvolt = <3300000>;
++ regulator-name = "vcc-mipi";
++};
++
++®_dldo3 {
++ regulator-min-microvolt = <2800000>;
++ regulator-max-microvolt = <2800000>;
++ regulator-name = "vcc-avdd-csi";
++};
++
++®_dldo4 {
++ regulator-min-microvolt = <3300000>;
++ regulator-max-microvolt = <3300000>;
++ regulator-name = "vcc-wifi-io";
++};
++
++®_eldo1 {
++ regulator-min-microvolt = <1800000>;
++ regulator-max-microvolt = <1800000>;
++ regulator-name = "cpvdd";
++};
++
++®_eldo2 {
++ regulator-min-microvolt = <1800000>;
++ regulator-max-microvolt = <1800000>;
++ regulator-name = "vcc-dvdd-csi";
++};
++
++®_fldo1 {
++ regulator-min-microvolt = <1200000>;
++ regulator-max-microvolt = <1200000>;
++ regulator-name = "vcc-1v2-hsic";
++};
++
++/*
++ * The A64 chip cannot work without this regulator off, although
++ * it seems to be only driving the AR100 core.
++ * Maybe we don't still know well about CPUs domain.
++ */
++®_fldo2 {
++ regulator-always-on;
++ regulator-min-microvolt = <1100000>;
++ regulator-max-microvolt = <1100000>;
++ regulator-name = "vdd-cpus";
++};
++
++®_rtc_ldo {
++ regulator-name = "vcc-rtc";
++};
++
++&uart0 {
++ pinctrl-names = "default";
++ pinctrl-0 = <&uart0_pins_a>;
++ status = "okay";
++};
+--
+2.7.4
+
diff --git a/board/olimex/a64-olinuxino/readme.txt b/board/olimex/a64-olinuxino/readme.txt
new file mode 100644
index 0000000..342bdc7
--- /dev/null
+++ b/board/olimex/a64-olinuxino/readme.txt
@@ -0,0 +1,37 @@
+Intro
+=====
+
+This default configuration will allow you to start experimenting with the
+buildroot environment for the A64-OLinuXino. With the current configuration
+it will bring-up the board, and allow access through the serial console.
+
+A64-OLinuXino link:
+https://www.olimex.com/Products/OLinuXino/A64/
+
+Wiki link:
+https://openedev.amarulasolutions.com/display/ODWIKI/Olimex+A64-Olinuxino
+
+This configuration uses U-Boot mainline and kernel mainline.
+
+How to build
+============
+
+ $ make olimex_a64_olinuxino_defconfig
+ $ make
+
+Note: you will need access to the internet to download the required
+sources.
+
+How to write the SD card
+========================
+
+Once the build process is finished you will have an image called "sdcard.img"
+in the output/images/ directory.
+
+Copy the bootable "sdcard.img" onto an SD card with "dd":
+
+ $ sudo dd if=output/images/sdcard.img of=/dev/sdX
+ $ sudo sync
+
+Insert the micro SDcard in your A64-OLinuXino and power it up. The console
+is on the serial line, 115200 8N1.
diff --git a/configs/olimex_a64_olinuxino_defconfig b/configs/olimex_a64_olinuxino_defconfig
new file mode 100644
index 0000000..f7ba528
--- /dev/null
+++ b/configs/olimex_a64_olinuxino_defconfig
@@ -0,0 +1,51 @@
+BR2_aarch64=y
+BR2_cortex_a53=y
+BR2_ARM_FPU_VFPV4=y
+
+# Linux headers same as kernel, a 4.13 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_13=y
+
+# Patch dir
+BR2_GLOBAL_PATCH_DIR="board/olimex/a64-olinuxino/patches"
+
+# Firmware
+BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://github.com/apritzel/arm-trusted-firmware.git"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="sun50iw1p1"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="aa75c8da415158a94b82a430b2b40000778e851f"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="bl31"
+
+# Bootloader
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2017.09"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="a64-olinuxino"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
+BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.itb"
+BR2_TARGET_UBOOT_SPL=y
+BR2_TARGET_UBOOT_SPL_NAME="spl/sunxi-spl.bin"
+BR2_TARGET_UBOOT_BOOT_SCRIPT=y
+BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/olimex/a64-olinuxino/boot.cmd"
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.13.7"
+BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun50i-a64-olinuxino"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/olimex/a64-olinuxino/linux_axp.fragment"
+
+# Filesystem
+BR2_TARGET_GENERIC_ISSUE="Welcome to Olimex A64-OLinuXino"
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/olimex/a64-olinuxino/genimage.cfg"
+BR2_ROOTFS_POST_BUILD_SCRIPT="support/scripts/sunxi64-post-build.sh"
--
1.9.1
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [Buildroot] [PATCH v3 09/11] board: Add Orangepi Win/Win Plus support
2017-10-19 9:45 [Buildroot] [PATCH v3 00/11] board: Add Allwinner A64/H5 boards Jagan Teki
` (7 preceding siblings ...)
2017-10-19 9:45 ` [Buildroot] [PATCH v3 08/11] board: Add Olimex A64-OLinuXino support Jagan Teki
@ 2017-10-19 9:45 ` Jagan Teki
2017-10-19 9:45 ` [Buildroot] [PATCH v3 10/11] board: Add Orangepi Prime support Jagan Teki
2017-10-19 9:45 ` [Buildroot] [PATCH v3 11/11] board: Add Orangepi Zero Plus2 support Jagan Teki
10 siblings, 0 replies; 21+ messages in thread
From: Jagan Teki @ 2017-10-19 9:45 UTC (permalink / raw)
To: buildroot
Add initial support for Orangepi Win/Win Plus board with below features:
- U-Boot 2017.09
- Linux 4.13.7
- Default packages from buildroot
Cc: zhaoyifan <zhao_steven@263.net>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
.gitlab-ci.yml | 1 +
DEVELOPERS | 2 ++
board/orangepi/orangepi-win/boot.cmd | 6 ++++
board/orangepi/orangepi-win/genimage.cfg | 38 ++++++++++++++++++++++++++
board/orangepi/orangepi-win/readme.txt | 37 +++++++++++++++++++++++++
configs/orangepi_win_defconfig | 47 ++++++++++++++++++++++++++++++++
6 files changed, 131 insertions(+)
create mode 100644 board/orangepi/orangepi-win/boot.cmd
create mode 100644 board/orangepi/orangepi-win/genimage.cfg
create mode 100644 board/orangepi/orangepi-win/readme.txt
create mode 100644 configs/orangepi_win_defconfig
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 8c6d2b3..8cf4ae2 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -160,6 +160,7 @@ openblocks_a6_defconfig: *defconfig
orangepi_one_defconfig: *defconfig
orangepi_pc_defconfig: *defconfig
orangepi_plus_defconfig: *defconfig
+orangepi_win_defconfig: *defconfig
orangepi_zero_defconfig: *defconfig
pandaboard_defconfig: *defconfig
pc_x86_64_bios_defconfig: *defconfig
diff --git a/DEVELOPERS b/DEVELOPERS
index 1ae83f2..123e444 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -731,12 +731,14 @@ F: board/engicam/
F: board/friendlyarm/nanopi-a64/
F: board/friendlyarm/nanopi-neo2/
F: board/olimex/a64-olinuxino/
+F: board/orangepi/orangepi-win/
F: board/pine64/
F: configs/bananapi_m1_defconfig
F: configs/bananapi_m64_defconfig
F: configs/friendlyarm_nanopi_a64_defconfig
F: configs/friendlyarm_nanopi_neo2_defconfig
F: configs/olimex_a64_olinuxino_defconfig
+F: configs/orangepi_win_defconfig
F: configs/pine64_defconfig
F: configs/pine64_sopine_defconfig
F: configs/engicam_imx6qdl_icore_defconfig
diff --git a/board/orangepi/orangepi-win/boot.cmd b/board/orangepi/orangepi-win/boot.cmd
new file mode 100644
index 0000000..2ddb769
--- /dev/null
+++ b/board/orangepi/orangepi-win/boot.cmd
@@ -0,0 +1,6 @@
+setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
+
+fatload mmc 0 $kernel_addr_r Image
+fatload mmc 0 $fdt_addr_r sun50i-a64-orangepi-win.dtb
+
+booti $kernel_addr_r - $fdt_addr_r
diff --git a/board/orangepi/orangepi-win/genimage.cfg b/board/orangepi/orangepi-win/genimage.cfg
new file mode 100644
index 0000000..36955d3
--- /dev/null
+++ b/board/orangepi/orangepi-win/genimage.cfg
@@ -0,0 +1,38 @@
+image boot.vfat {
+ vfat {
+ files = {
+ "Image",
+ "sun50i-a64-orangepi-win.dtb",
+ "boot.scr"
+ }
+ }
+ size = 64M
+}
+
+image sdcard.img {
+ hdimage {
+ }
+
+ partition spl {
+ in-partition-table = "no"
+ image = "sunxi-spl.bin"
+ offset = 8192
+ }
+
+ partition u-boot {
+ in-partition-table = "no"
+ image = "u-boot.itb"
+ offset = 40K
+ }
+
+ partition boot {
+ partition-type = 0xC
+ bootable = "true"
+ image = "boot.vfat"
+ }
+
+ partition rootfs {
+ partition-type = 0x83
+ image = "rootfs.ext4"
+ }
+}
diff --git a/board/orangepi/orangepi-win/readme.txt b/board/orangepi/orangepi-win/readme.txt
new file mode 100644
index 0000000..93adddd
--- /dev/null
+++ b/board/orangepi/orangepi-win/readme.txt
@@ -0,0 +1,37 @@
+Intro
+=====
+
+This default configuration will allow you to start experimenting with the
+buildroot environment for the Orangepi Win/Win Plus. With the current configuration
+it will bring-up the board, and allow access through the serial console.
+
+Orangepi Win/Win Plus link:
+http://www.orangepi.org/OrangePiWin_WinPlus/
+
+Wiki link:
+https://openedev.amarulasolutions.com/display/ODWIKI/Orangepi+Win
+
+This configuration uses U-Boot mainline and kernel mainline.
+
+How to build
+============
+
+ $ make orangepi_win_defconfig
+ $ make
+
+Note: you will need access to the internet to download the required
+sources.
+
+How to write the SD card
+========================
+
+Once the build process is finished you will have an image called "sdcard.img"
+in the output/images/ directory.
+
+Copy the bootable "sdcard.img" onto an SD card with "dd":
+
+ $ sudo dd if=output/images/sdcard.img of=/dev/sdX
+ $ sudo sync
+
+Insert the micro SDcard in your Orangepi Win/Win Plus and power it up. The console
+is on the serial line, 115200 8N1.
diff --git a/configs/orangepi_win_defconfig b/configs/orangepi_win_defconfig
new file mode 100644
index 0000000..9ae3772
--- /dev/null
+++ b/configs/orangepi_win_defconfig
@@ -0,0 +1,47 @@
+BR2_aarch64=y
+BR2_cortex_a53=y
+BR2_ARM_FPU_VFPV4=y
+
+# Linux headers same as kernel, a 4.13 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_13=y
+
+# Firmware
+BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://github.com/apritzel/arm-trusted-firmware.git"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="sun50iw1p1"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="aa75c8da415158a94b82a430b2b40000778e851f"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="bl31"
+
+# Bootloader
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2017.09"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="orangepi_win"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
+BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.itb"
+BR2_TARGET_UBOOT_SPL=y
+BR2_TARGET_UBOOT_SPL_NAME="spl/sunxi-spl.bin"
+BR2_TARGET_UBOOT_BOOT_SCRIPT=y
+BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/orangepi/orangepi-win/boot.cmd"
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.13.7"
+BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun50i-a64-orangepi-win"
+
+# Filesystem
+BR2_TARGET_GENERIC_ISSUE="Welcome to Orangepi Win/Win Plus"
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/orangepi/orangepi-win/genimage.cfg"
+BR2_ROOTFS_POST_BUILD_SCRIPT="support/scripts/sunxi64-post-build.sh"
--
1.9.1
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [Buildroot] [PATCH v3 10/11] board: Add Orangepi Prime support
2017-10-19 9:45 [Buildroot] [PATCH v3 00/11] board: Add Allwinner A64/H5 boards Jagan Teki
` (8 preceding siblings ...)
2017-10-19 9:45 ` [Buildroot] [PATCH v3 09/11] board: Add Orangepi Win/Win Plus support Jagan Teki
@ 2017-10-19 9:45 ` Jagan Teki
2017-10-19 9:45 ` [Buildroot] [PATCH v3 11/11] board: Add Orangepi Zero Plus2 support Jagan Teki
10 siblings, 0 replies; 21+ messages in thread
From: Jagan Teki @ 2017-10-19 9:45 UTC (permalink / raw)
To: buildroot
Add initial support for Orangepi Prime board with below features:
- U-Boot 2017.09
- Linux 4.13.7
- Default packages from buildroot
Cc: zhaoyifan <zhao_steven@263.net>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
.gitlab-ci.yml | 1 +
DEVELOPERS | 2 ++
board/orangepi/orangepi-prime/boot.cmd | 6 ++++
board/orangepi/orangepi-prime/genimage.cfg | 38 ++++++++++++++++++++++++
board/orangepi/orangepi-prime/readme.txt | 37 +++++++++++++++++++++++
configs/orangepi_prime_defconfig | 47 ++++++++++++++++++++++++++++++
6 files changed, 131 insertions(+)
create mode 100644 board/orangepi/orangepi-prime/boot.cmd
create mode 100644 board/orangepi/orangepi-prime/genimage.cfg
create mode 100644 board/orangepi/orangepi-prime/readme.txt
create mode 100644 configs/orangepi_prime_defconfig
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 8cf4ae2..ef4fa10 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -160,6 +160,7 @@ openblocks_a6_defconfig: *defconfig
orangepi_one_defconfig: *defconfig
orangepi_pc_defconfig: *defconfig
orangepi_plus_defconfig: *defconfig
+orangepi_prime_defconfig: *defconfig
orangepi_win_defconfig: *defconfig
orangepi_zero_defconfig: *defconfig
pandaboard_defconfig: *defconfig
diff --git a/DEVELOPERS b/DEVELOPERS
index 123e444..40b9fd7 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -731,6 +731,7 @@ F: board/engicam/
F: board/friendlyarm/nanopi-a64/
F: board/friendlyarm/nanopi-neo2/
F: board/olimex/a64-olinuxino/
+F: board/orangepi/orangepi-prime/
F: board/orangepi/orangepi-win/
F: board/pine64/
F: configs/bananapi_m1_defconfig
@@ -738,6 +739,7 @@ F: configs/bananapi_m64_defconfig
F: configs/friendlyarm_nanopi_a64_defconfig
F: configs/friendlyarm_nanopi_neo2_defconfig
F: configs/olimex_a64_olinuxino_defconfig
+F: configs/orangepi_prime_defconfig
F: configs/orangepi_win_defconfig
F: configs/pine64_defconfig
F: configs/pine64_sopine_defconfig
diff --git a/board/orangepi/orangepi-prime/boot.cmd b/board/orangepi/orangepi-prime/boot.cmd
new file mode 100644
index 0000000..3488788
--- /dev/null
+++ b/board/orangepi/orangepi-prime/boot.cmd
@@ -0,0 +1,6 @@
+setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
+
+fatload mmc 0 $kernel_addr_r Image
+fatload mmc 0 $fdt_addr_r sun50i-h5-orangepi-prime.dtb
+
+booti $kernel_addr_r - $fdt_addr_r
diff --git a/board/orangepi/orangepi-prime/genimage.cfg b/board/orangepi/orangepi-prime/genimage.cfg
new file mode 100644
index 0000000..b973b02
--- /dev/null
+++ b/board/orangepi/orangepi-prime/genimage.cfg
@@ -0,0 +1,38 @@
+image boot.vfat {
+ vfat {
+ files = {
+ "Image",
+ "sun50i-h5-orangepi-prime.dtb",
+ "boot.scr"
+ }
+ }
+ size = 64M
+}
+
+image sdcard.img {
+ hdimage {
+ }
+
+ partition spl {
+ in-partition-table = "no"
+ image = "sunxi-spl.bin"
+ offset = 8192
+ }
+
+ partition u-boot {
+ in-partition-table = "no"
+ image = "u-boot.itb"
+ offset = 40K
+ }
+
+ partition boot {
+ partition-type = 0xC
+ bootable = "true"
+ image = "boot.vfat"
+ }
+
+ partition rootfs {
+ partition-type = 0x83
+ image = "rootfs.ext4"
+ }
+}
diff --git a/board/orangepi/orangepi-prime/readme.txt b/board/orangepi/orangepi-prime/readme.txt
new file mode 100644
index 0000000..5811884
--- /dev/null
+++ b/board/orangepi/orangepi-prime/readme.txt
@@ -0,0 +1,37 @@
+Intro
+=====
+
+This default configuration will allow you to start experimenting with the
+buildroot environment for the Orangepi Prime. With the current configuration
+it will bring-up the board, and allow access through the serial console.
+
+Orangepi Prime link:
+http://www.orangepi.org/OrangePiPrime/
+
+Wiki link:
+https://openedev.amarulasolutions.com/display/ODWIKI/Orangepi+Prime
+
+This configuration uses U-Boot mainline and kernel mainline.
+
+How to build
+============
+
+ $ make orangepi_prime_defconfig
+ $ make
+
+Note: you will need access to the internet to download the required
+sources.
+
+How to write the SD card
+========================
+
+Once the build process is finished you will have an image called "sdcard.img"
+in the output/images/ directory.
+
+Copy the bootable "sdcard.img" onto an SD card with "dd":
+
+ $ sudo dd if=output/images/sdcard.img of=/dev/sdX
+ $ sudo sync
+
+Insert the micro SDcard in your Orangepi Prime and power it up. The console
+is on the serial line, 115200 8N1.
diff --git a/configs/orangepi_prime_defconfig b/configs/orangepi_prime_defconfig
new file mode 100644
index 0000000..b62e6a7
--- /dev/null
+++ b/configs/orangepi_prime_defconfig
@@ -0,0 +1,47 @@
+BR2_aarch64=y
+BR2_cortex_a53=y
+BR2_ARM_FPU_VFPV4=y
+
+# Linux headers same as kernel, a 4.13 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_13=y
+
+# Firmware
+BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://github.com/apritzel/arm-trusted-firmware.git"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="sun50iw1p1"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="aa75c8da415158a94b82a430b2b40000778e851f"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="bl31"
+
+# Bootloader
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2017.09"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="orangepi_prime"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
+BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.itb"
+BR2_TARGET_UBOOT_SPL=y
+BR2_TARGET_UBOOT_SPL_NAME="spl/sunxi-spl.bin"
+BR2_TARGET_UBOOT_BOOT_SCRIPT=y
+BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/orangepi/orangepi-prime/boot.cmd"
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.13.7"
+BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun50i-h5-orangepi-prime"
+
+# Filesystem
+BR2_TARGET_GENERIC_ISSUE="Welcome to Orangepi Prime"
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/orangepi/orangepi-prime/genimage.cfg"
+BR2_ROOTFS_POST_BUILD_SCRIPT="support/scripts/sunxi64-post-build.sh"
--
1.9.1
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [Buildroot] [PATCH v3 11/11] board: Add Orangepi Zero Plus2 support
2017-10-19 9:45 [Buildroot] [PATCH v3 00/11] board: Add Allwinner A64/H5 boards Jagan Teki
` (9 preceding siblings ...)
2017-10-19 9:45 ` [Buildroot] [PATCH v3 10/11] board: Add Orangepi Prime support Jagan Teki
@ 2017-10-19 9:45 ` Jagan Teki
10 siblings, 0 replies; 21+ messages in thread
From: Jagan Teki @ 2017-10-19 9:45 UTC (permalink / raw)
To: buildroot
Add initial support for Orangepi Zero Plus2 board with below features:
- U-Boot 2017.09
- Linux 4.13.7
- Default packages from buildroot
Cc: zhaoyifan <zhao_steven@263.net>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
.gitlab-ci.yml | 1 +
DEVELOPERS | 2 ++
board/orangepi/orangepi-zero-plus2/boot.cmd | 6 ++++
board/orangepi/orangepi-zero-plus2/genimage.cfg | 38 ++++++++++++++++++++
board/orangepi/orangepi-zero-plus2/readme.txt | 37 +++++++++++++++++++
configs/orangepi_zero_plus2_defconfig | 47 +++++++++++++++++++++++++
6 files changed, 131 insertions(+)
create mode 100644 board/orangepi/orangepi-zero-plus2/boot.cmd
create mode 100644 board/orangepi/orangepi-zero-plus2/genimage.cfg
create mode 100644 board/orangepi/orangepi-zero-plus2/readme.txt
create mode 100644 configs/orangepi_zero_plus2_defconfig
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ef4fa10..630cab1 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -163,6 +163,7 @@ orangepi_plus_defconfig: *defconfig
orangepi_prime_defconfig: *defconfig
orangepi_win_defconfig: *defconfig
orangepi_zero_defconfig: *defconfig
+orangepi_zero_plus2_defconfig: *defconfig
pandaboard_defconfig: *defconfig
pc_x86_64_bios_defconfig: *defconfig
pc_x86_64_efi_defconfig: *defconfig
diff --git a/DEVELOPERS b/DEVELOPERS
index 40b9fd7..f683c25 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -733,6 +733,7 @@ F: board/friendlyarm/nanopi-neo2/
F: board/olimex/a64-olinuxino/
F: board/orangepi/orangepi-prime/
F: board/orangepi/orangepi-win/
+F: board/orangepi/orangepi-zero-plus2/
F: board/pine64/
F: configs/bananapi_m1_defconfig
F: configs/bananapi_m64_defconfig
@@ -741,6 +742,7 @@ F: configs/friendlyarm_nanopi_neo2_defconfig
F: configs/olimex_a64_olinuxino_defconfig
F: configs/orangepi_prime_defconfig
F: configs/orangepi_win_defconfig
+F: configs/orangepi_zero_plus2_defconfig
F: configs/pine64_defconfig
F: configs/pine64_sopine_defconfig
F: configs/engicam_imx6qdl_icore_defconfig
diff --git a/board/orangepi/orangepi-zero-plus2/boot.cmd b/board/orangepi/orangepi-zero-plus2/boot.cmd
new file mode 100644
index 0000000..4772a9b
--- /dev/null
+++ b/board/orangepi/orangepi-zero-plus2/boot.cmd
@@ -0,0 +1,6 @@
+setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
+
+fatload mmc 0 $kernel_addr_r Image
+fatload mmc 0 $fdt_addr_r sun50i-h5-orangepi-zero-plus2.dtb
+
+booti $kernel_addr_r - $fdt_addr_r
diff --git a/board/orangepi/orangepi-zero-plus2/genimage.cfg b/board/orangepi/orangepi-zero-plus2/genimage.cfg
new file mode 100644
index 0000000..0fe219e
--- /dev/null
+++ b/board/orangepi/orangepi-zero-plus2/genimage.cfg
@@ -0,0 +1,38 @@
+image boot.vfat {
+ vfat {
+ files = {
+ "Image",
+ "sun50i-h5-orangepi-zero-plus2.dtb",
+ "boot.scr"
+ }
+ }
+ size = 64M
+}
+
+image sdcard.img {
+ hdimage {
+ }
+
+ partition spl {
+ in-partition-table = "no"
+ image = "sunxi-spl.bin"
+ offset = 8192
+ }
+
+ partition u-boot {
+ in-partition-table = "no"
+ image = "u-boot.itb"
+ offset = 40K
+ }
+
+ partition boot {
+ partition-type = 0xC
+ bootable = "true"
+ image = "boot.vfat"
+ }
+
+ partition rootfs {
+ partition-type = 0x83
+ image = "rootfs.ext4"
+ }
+}
diff --git a/board/orangepi/orangepi-zero-plus2/readme.txt b/board/orangepi/orangepi-zero-plus2/readme.txt
new file mode 100644
index 0000000..322ba0e
--- /dev/null
+++ b/board/orangepi/orangepi-zero-plus2/readme.txt
@@ -0,0 +1,37 @@
+Intro
+=====
+
+This default configuration will allow you to start experimenting with the
+buildroot environment for the Orangepi Zero Plus2. With the current configuration
+it will bring-up the board, and allow access through the serial console.
+
+Orangepi Zero Plus2 link:
+http://www.orangepi.org/OrangePiZeroPlus2/
+
+Wiki link:
+https://openedev.amarulasolutions.com/display/ODWIKI/Orangepi+Zero+Plus2
+
+This configuration uses U-Boot mainline and kernel mainline.
+
+How to build
+============
+
+ $ make orangepi_zero_plus2_defconfig
+ $ make
+
+Note: you will need access to the internet to download the required
+sources.
+
+How to write the SD card
+========================
+
+Once the build process is finished you will have an image called "sdcard.img"
+in the output/images/ directory.
+
+Copy the bootable "sdcard.img" onto an SD card with "dd":
+
+ $ sudo dd if=output/images/sdcard.img of=/dev/sdX
+ $ sudo sync
+
+Insert the micro SDcard in your Orangepi Zero Plus2 and power it up. The console
+is on the serial line, 115200 8N1.
diff --git a/configs/orangepi_zero_plus2_defconfig b/configs/orangepi_zero_plus2_defconfig
new file mode 100644
index 0000000..cb57c98
--- /dev/null
+++ b/configs/orangepi_zero_plus2_defconfig
@@ -0,0 +1,47 @@
+BR2_aarch64=y
+BR2_cortex_a53=y
+BR2_ARM_FPU_VFPV4=y
+
+# Linux headers same as kernel, a 4.13 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_13=y
+
+# Firmware
+BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://github.com/apritzel/arm-trusted-firmware.git"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="sun50iw1p1"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="aa75c8da415158a94b82a430b2b40000778e851f"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="bl31"
+
+# Bootloader
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2017.09"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="orangepi_zero_plus2"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
+BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.itb"
+BR2_TARGET_UBOOT_SPL=y
+BR2_TARGET_UBOOT_SPL_NAME="spl/sunxi-spl.bin"
+BR2_TARGET_UBOOT_BOOT_SCRIPT=y
+BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/orangepi/orangepi-zero-plus2/boot.cmd"
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.13.7"
+BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun50i-h5-orangepi-zero-plus2"
+
+# Filesystem
+BR2_TARGET_GENERIC_ISSUE="Welcome to Orangepi Zero Plus2"
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/orangepi/orangepi-zero-plus2/genimage.cfg"
+BR2_ROOTFS_POST_BUILD_SCRIPT="support/scripts/sunxi64-post-build.sh"
--
1.9.1
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [Buildroot] [PATCH v3 01/11] board: Add Bananapi M1 support
2017-10-19 9:45 ` [Buildroot] [PATCH v3 01/11] board: Add Bananapi M1 support Jagan Teki
@ 2017-10-19 10:38 ` Baruch Siach
2017-10-19 10:56 ` Jagan Teki
2017-10-21 20:37 ` Thomas Petazzoni
1 sibling, 1 reply; 21+ messages in thread
From: Baruch Siach @ 2017-10-19 10:38 UTC (permalink / raw)
To: buildroot
Hi Jagan,
On Thu, Oct 19, 2017 at 11:45:23AM +0200, Jagan Teki wrote:
> Add initial support for bananapi M1 board with below features:
> - U-Boot 2017.09
> - Linux 4.17
This kernel version has not been released yet.
> - Default packages from buildroot
>
> Cc: Jason <manager@sinovoip.com.cn>
> Cc: hailymei at banana-pi.com <hailymei@banana-pi.com>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> ---
[...]
> +# Kernel
> +BR2_LINUX_KERNEL=y
> +BR2_LINUX_KERNEL_CUSTOM_VERSION=y
> +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.13.7"
Seems like you missed a couple of characters in the commit log.
> +BR2_LINUX_KERNEL_DEFCONFIG="sunxi"
> +BR2_LINUX_KERNEL_DTS_SUPPORT=y
> +BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun7i-a20-bananapi"
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Buildroot] [PATCH v3 01/11] board: Add Bananapi M1 support
2017-10-19 10:38 ` Baruch Siach
@ 2017-10-19 10:56 ` Jagan Teki
0 siblings, 0 replies; 21+ messages in thread
From: Jagan Teki @ 2017-10-19 10:56 UTC (permalink / raw)
To: buildroot
On Thu, Oct 19, 2017 at 4:08 PM, Baruch Siach <baruch@tkos.co.il> wrote:
> Hi Jagan,
>
> On Thu, Oct 19, 2017 at 11:45:23AM +0200, Jagan Teki wrote:
>> Add initial support for bananapi M1 board with below features:
>> - U-Boot 2017.09
>> - Linux 4.17
>
> This kernel version has not been released yet.
Haa, typo it should 4.13.7
thanks!
--
Jagan Teki
Senior Linux Kernel Engineer | Amarula Solutions
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Buildroot] [PATCH v3 01/11] board: Add Bananapi M1 support
2017-10-19 9:45 ` [Buildroot] [PATCH v3 01/11] board: Add Bananapi M1 support Jagan Teki
2017-10-19 10:38 ` Baruch Siach
@ 2017-10-21 20:37 ` Thomas Petazzoni
1 sibling, 0 replies; 21+ messages in thread
From: Thomas Petazzoni @ 2017-10-21 20:37 UTC (permalink / raw)
To: buildroot
Hello,
On Thu, 19 Oct 2017 11:45:23 +0200, Jagan Teki wrote:
> Add initial support for bananapi M1 board with below features:
> - U-Boot 2017.09
> - Linux 4.17
> - Default packages from buildroot
>
> Cc: Jason <manager@sinovoip.com.cn>
> Cc: hailymei at banana-pi.com <hailymei@banana-pi.com>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> ---
> .gitlab-ci.yml | 1 +
> DEVELOPERS | 2 ++
> board/bananapi/bananapi-m1/boot.cmd | 7 +++++++
> board/bananapi/bananapi-m1/genimage.cfg | 33 +++++++++++++++++++++++++++++
> board/bananapi/bananapi-m1/readme.txt | 37 +++++++++++++++++++++++++++++++++
> configs/bananapi_m1_defconfig | 37 +++++++++++++++++++++++++++++++++
> 6 files changed, 117 insertions(+)
> create mode 100644 board/bananapi/bananapi-m1/boot.cmd
> create mode 100644 board/bananapi/bananapi-m1/genimage.cfg
> create mode 100644 board/bananapi/bananapi-m1/readme.txt
> create mode 100644 configs/bananapi_m1_defconfig
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Buildroot] [PATCH v3 02/11] support/scripts: Add sunxi64-post-build.sh
2017-10-19 9:45 ` [Buildroot] [PATCH v3 02/11] support/scripts: Add sunxi64-post-build.sh Jagan Teki
@ 2017-10-21 21:06 ` Thomas Petazzoni
2017-10-22 10:15 ` Jagan Teki
0 siblings, 1 reply; 21+ messages in thread
From: Thomas Petazzoni @ 2017-10-21 21:06 UTC (permalink / raw)
To: buildroot
Hello,
On Thu, 19 Oct 2017 11:45:24 +0200, Jagan Teki wrote:
> +# sunxi64-post-build script
> +#
> +# Allwinner A64/H5 firmware consists of three parts:
> +# 1) U-Boot's SPL
> +# 2) ARM Trusted Firmware (ATF)
> +# 3) U-Boot proper.
> +#
> +# The SPL will load both ATF and U-Boot proper along with the right device
> +# tree blob (.dtb) and will pass execution to ATF (in EL3), which in turn will
> +# drop into the U-Boot proper (in EL2).
> +#
> +# As the ATF binary will become part of the U-Boot image file, you will need
> +# to build it first and export ATF variable to built U-Boot proper. Since
> +# buildroot not take of building ATF first and export the binary, this post-build
> +# script build the u-boot.itb
Thanks for this explanation. However, I am not too happy with the
solution you propose. Indeed, the U-Boot build system already has all
the logic to produce the u-boot.itb, provided the BL31 environment
variable is defined.
I think the problem is that the ATF package currently only supports
the case where ATF embeds U-Boot (that is for example how it works on
the ARM Juno platform if I remember correctly
(configs/arm_juno_defconfig) or on Marvell platforms. This explains why
the arm-trusted-firmware package depends on uboot.
The sunxi scenario is different because it wants ATF to be built
*before* U-Boot, so basically the opposite.
So I would propose:
* An option in ATF to decide if it needs U-Boot to be built before or
not.
* An option in U-Boot to decide if it needs ATF to be built before or
not.
* An option in U-Boot to pass custom variable on the build command
line so that we can pass the path to BL31. Or directly an option
that will make uboot.mk pass BL31.
What do you think ?
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Buildroot] [PATCH v3 02/11] support/scripts: Add sunxi64-post-build.sh
2017-10-21 21:06 ` Thomas Petazzoni
@ 2017-10-22 10:15 ` Jagan Teki
[not found] ` <4cb45577-1f4a-ce9c-7204-74934272b789@arm.com>
0 siblings, 1 reply; 21+ messages in thread
From: Jagan Teki @ 2017-10-22 10:15 UTC (permalink / raw)
To: buildroot
+ Andre
On 21-Oct-2017 11:06 PM, "Thomas Petazzoni" <
thomas.petazzoni@free-electrons.com> wrote:
Hello,
On Thu, 19 Oct 2017 11:45:24 +0200, Jagan Teki wrote:
> +# sunxi64-post-build script
> +#
> +# Allwinner A64/H5 firmware consists of three parts:
> +# 1) U-Boot's SPL
> +# 2) ARM Trusted Firmware (ATF)
> +# 3) U-Boot proper.
> +#
> +# The SPL will load both ATF and U-Boot proper along with the right
device
> +# tree blob (.dtb) and will pass execution to ATF (in EL3), which in
turn will
> +# drop into the U-Boot proper (in EL2).
> +#
> +# As the ATF binary will become part of the U-Boot image file, you will
need
> +# to build it first and export ATF variable to built U-Boot proper. Since
> +# buildroot not take of building ATF first and export the binary, this
post-build
> +# script build the u-boot.itb
Thanks for this explanation. However, I am not too happy with the
solution you propose. Indeed, the U-Boot build system already has all
the logic to produce the u-boot.itb, provided the BL31 environment
variable is defined.
I think the problem is that the ATF package currently only supports
the case where ATF embeds U-Boot (that is for example how it works on
the ARM Juno platform if I remember correctly
(configs/arm_juno_defconfig) or on Marvell platforms. This explains why
the arm-trusted-firmware package depends on uboot.
The sunxi scenario is different because it wants ATF to be built
*before* U-Boot, so basically the opposite.
This wasn't only the case with sunxi it's been the U-Boot FIT
behaviour..even rockchip do follow same build process.
Ideally FIT need input files to produce blob like dtb.
Added Andre he will give some more insight.
Jagan.
So I would propose:
* An option in ATF to decide if it needs U-Boot to be built before or
not.
* An option in U-Boot to decide if it needs ATF to be built before or
not.
* An option in U-Boot to pass custom variable on the build command
line so that we can pass the path to BL31. Or directly an option
that will make uboot.mk pass BL31.
What do you think ?
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20171022/5007afb0/attachment.html>
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Buildroot] [PATCH v3 02/11] support/scripts: Add sunxi64-post-build.sh
[not found] ` <4cb45577-1f4a-ce9c-7204-74934272b789@arm.com>
@ 2017-10-22 12:29 ` Thomas Petazzoni
2017-10-26 11:20 ` Jagan Teki
0 siblings, 1 reply; 21+ messages in thread
From: Thomas Petazzoni @ 2017-10-22 12:29 UTC (permalink / raw)
To: buildroot
Hello,
On Sun, 22 Oct 2017 12:05:52 +0100, Andr? Przywara wrote:
> > This wasn't only the case with sunxi it's been the U-Boot FIT
> > behaviour..even rockchip do follow same build process.
> >
> > Ideally FIT need input files to produce blob like dtb.
> >
> > Added Andre he will give some more insight.
>
> So yes, ATF supports *multiple* ways of integration:
> - On the Juno it has the capability of loading images - from NOR flash,
> so not a big deal. This means the BL1 and BL2 stages read the BL31
> (containing the PSCI runtime) and BL33 (U-Boot or EDK2), also this uses
> the ATF defined FIP image format.
> - For other platforms (like rockchip or sunxi) we usually load from MMC
> or SPI flash. So using the traditional ATF approach would mean to have
> MMC and SPI drivers in the early ATF stages, also do the DRAM
> initialization there. Since ATF is BSD licensed, it's more involved than
> just copying some code from U-Boot.
> So the pragmatic approach - which ATF actually embraces - is to just use
> a subset of the whole ATF (BL31) and do the rest via some platform
> specific firmware: which is U-Boot's SPL in our case, since it already
> has support for this hardware. Other platform (most ARM64 servers) tend
> to have their proprietary early-init firmware there.
Thanks for summarizing the context.
> So I virtually know nothing about buildroot, but it might not be a good
> idea to shoehorn the second approach into the Juno ATF build scheme.
> As I believe that in fact more platforms use the second approach, it
> might be worthwhile to introduce some extra code in buildroot to support
> that specifically instead of working around the Juno ATF way.
> Maybe it can be modelled as some U-Boot FIT build process with an
> additional requirement, similar to a binary blob?
And this is exactly what I was suggesting Jagan to do: extend Buildroot
so that it covers the U-Boot-bundles-ATF scenario (sunxi/rockchip,
etc.) in addition to the already supported ATF-bundles-U-Boot scenario
(Juno).
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Buildroot] [PATCH v3 02/11] support/scripts: Add sunxi64-post-build.sh
2017-10-22 12:29 ` Thomas Petazzoni
@ 2017-10-26 11:20 ` Jagan Teki
2017-10-26 18:13 ` Jagan Teki
0 siblings, 1 reply; 21+ messages in thread
From: Jagan Teki @ 2017-10-26 11:20 UTC (permalink / raw)
To: buildroot
On Sun, Oct 22, 2017 at 5:59 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Hello,
>
> On Sun, 22 Oct 2017 12:05:52 +0100, Andr? Przywara wrote:
>
>> > This wasn't only the case with sunxi it's been the U-Boot FIT
>> > behaviour..even rockchip do follow same build process.
>> >
>> > Ideally FIT need input files to produce blob like dtb.
>> >
>> > Added Andre he will give some more insight.
>>
>> So yes, ATF supports *multiple* ways of integration:
>> - On the Juno it has the capability of loading images - from NOR flash,
>> so not a big deal. This means the BL1 and BL2 stages read the BL31
>> (containing the PSCI runtime) and BL33 (U-Boot or EDK2), also this uses
>> the ATF defined FIP image format.
>> - For other platforms (like rockchip or sunxi) we usually load from MMC
>> or SPI flash. So using the traditional ATF approach would mean to have
>> MMC and SPI drivers in the early ATF stages, also do the DRAM
>> initialization there. Since ATF is BSD licensed, it's more involved than
>> just copying some code from U-Boot.
>> So the pragmatic approach - which ATF actually embraces - is to just use
>> a subset of the whole ATF (BL31) and do the rest via some platform
>> specific firmware: which is U-Boot's SPL in our case, since it already
>> has support for this hardware. Other platform (most ARM64 servers) tend
>> to have their proprietary early-init firmware there.
>
> Thanks for summarizing the context.
>
>> So I virtually know nothing about buildroot, but it might not be a good
>> idea to shoehorn the second approach into the Juno ATF build scheme.
>> As I believe that in fact more platforms use the second approach, it
>> might be worthwhile to introduce some extra code in buildroot to support
>> that specifically instead of working around the Juno ATF way.
>> Maybe it can be modelled as some U-Boot FIT build process with an
>> additional requirement, similar to a binary blob?
>
> And this is exactly what I was suggesting Jagan to do: extend Buildroot
> so that it covers the U-Boot-bundles-ATF scenario (sunxi/rockchip,
> etc.) in addition to the already supported ATF-bundles-U-Boot scenario
> (Juno).
Based on the ATF build this look not an exact U-Boot-bundles-ATF
scenario. Whether for Juno(ATF-bundles-U-Boot scenario) or for SUNXI,
ATF want a dependence to build U-Boot first atleast for FIP point.
ARM_TRUSTED_FIRMWARE_MAKE_OPTS += \
CROSS_COMPILE="$(TARGET_CROSS)" \
BL33=$(BINARIES_DIR)/u-boot.bin \
Here BL33 need u-boot.bin to export for building FIP in default that
could be the reason of making ARM_TRUSTED_FIRMWARE_DEPENDENCIES +=
uboot
in atf.
I tried to build for U-Boot-bundles-ATF scenario by not to dependent
U-Boot so that U-boot build later. Since at this movement there is no
U-Boot build, ATF is unable to get the BL33, I don't know whether this
BL33 is needed for all because I'm trying for BL31.
Build Log:
-------------
un50iw1p1 all fip
make[1]: Entering directory
`/mnt/jagan/buildroot/buildroot-sun32/output/build/arm-trusted-firmware-aa75c8da415158a94b82a430b2b40000778e851f'
make[1]: Nothing to be done for `bl31'.
make[1]: *** No rule to make target
`/mnt/jagan/buildroot/buildroot-sun32/output/images/u-boot.bin',
needed by `build/sun50iw1p1/release/fip.bin'. Stop.
make[1]: *** Waiting for unfinished jobs....
Building sun50iw1p1
thanks!
--
Jagan Teki
Senior Linux Kernel Engineer | Amarula Solutions
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Buildroot] [PATCH v3 02/11] support/scripts: Add sunxi64-post-build.sh
2017-10-26 11:20 ` Jagan Teki
@ 2017-10-26 18:13 ` Jagan Teki
[not found] ` <e73be7ab-6435-5d11-41b5-37f3bf4053ee@arm.com>
0 siblings, 1 reply; 21+ messages in thread
From: Jagan Teki @ 2017-10-26 18:13 UTC (permalink / raw)
To: buildroot
On Thu, Oct 26, 2017 at 4:50 PM, Jagan Teki <jagan@amarulasolutions.com> wrote:
> On Sun, Oct 22, 2017 at 5:59 PM, Thomas Petazzoni
> <thomas.petazzoni@free-electrons.com> wrote:
>> Hello,
>>
>> On Sun, 22 Oct 2017 12:05:52 +0100, Andr? Przywara wrote:
>>
>>> > This wasn't only the case with sunxi it's been the U-Boot FIT
>>> > behaviour..even rockchip do follow same build process.
>>> >
>>> > Ideally FIT need input files to produce blob like dtb.
>>> >
>>> > Added Andre he will give some more insight.
>>>
>>> So yes, ATF supports *multiple* ways of integration:
>>> - On the Juno it has the capability of loading images - from NOR flash,
>>> so not a big deal. This means the BL1 and BL2 stages read the BL31
>>> (containing the PSCI runtime) and BL33 (U-Boot or EDK2), also this uses
>>> the ATF defined FIP image format.
>>> - For other platforms (like rockchip or sunxi) we usually load from MMC
>>> or SPI flash. So using the traditional ATF approach would mean to have
>>> MMC and SPI drivers in the early ATF stages, also do the DRAM
>>> initialization there. Since ATF is BSD licensed, it's more involved than
>>> just copying some code from U-Boot.
>>> So the pragmatic approach - which ATF actually embraces - is to just use
>>> a subset of the whole ATF (BL31) and do the rest via some platform
>>> specific firmware: which is U-Boot's SPL in our case, since it already
>>> has support for this hardware. Other platform (most ARM64 servers) tend
>>> to have their proprietary early-init firmware there.
>>
>> Thanks for summarizing the context.
>>
>>> So I virtually know nothing about buildroot, but it might not be a good
>>> idea to shoehorn the second approach into the Juno ATF build scheme.
>>> As I believe that in fact more platforms use the second approach, it
>>> might be worthwhile to introduce some extra code in buildroot to support
>>> that specifically instead of working around the Juno ATF way.
>>> Maybe it can be modelled as some U-Boot FIT build process with an
>>> additional requirement, similar to a binary blob?
>>
>> And this is exactly what I was suggesting Jagan to do: extend Buildroot
>> so that it covers the U-Boot-bundles-ATF scenario (sunxi/rockchip,
>> etc.) in addition to the already supported ATF-bundles-U-Boot scenario
>> (Juno).
>
> Based on the ATF build this look not an exact U-Boot-bundles-ATF
> scenario. Whether for Juno(ATF-bundles-U-Boot scenario) or for SUNXI,
> ATF want a dependence to build U-Boot first atleast for FIP point.
>
> ARM_TRUSTED_FIRMWARE_MAKE_OPTS += \
> CROSS_COMPILE="$(TARGET_CROSS)" \
> BL33=$(BINARIES_DIR)/u-boot.bin \
>
> Here BL33 need u-boot.bin to export for building FIP in default that
> could be the reason of making ARM_TRUSTED_FIRMWARE_DEPENDENCIES +=
> uboot
> in atf.
>
> I tried to build for U-Boot-bundles-ATF scenario by not to dependent
> U-Boot so that U-boot build later. Since at this movement there is no
> U-Boot build, ATF is unable to get the BL33, I don't know whether this
> BL33 is needed for all because I'm trying for BL31.
>
> Build Log:
> -------------
> un50iw1p1 all fip
> make[1]: Entering directory
> `/mnt/jagan/buildroot/buildroot-sun32/output/build/arm-trusted-firmware-aa75c8da415158a94b82a430b2b40000778e851f'
> make[1]: Nothing to be done for `bl31'.
> make[1]: *** No rule to make target
> `/mnt/jagan/buildroot/buildroot-sun32/output/images/u-boot.bin',
> needed by `build/sun50iw1p1/release/fip.bin'. Stop.
> make[1]: *** Waiting for unfinished jobs....
> Building sun50iw1p1
Seems like FIP need for BL33, I've sent new series please have a look.
thanks!
--
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Buildroot] [PATCH v3 02/11] support/scripts: Add sunxi64-post-build.sh
[not found] ` <e73be7ab-6435-5d11-41b5-37f3bf4053ee@arm.com>
@ 2017-10-27 11:46 ` Jagan Teki
0 siblings, 0 replies; 21+ messages in thread
From: Jagan Teki @ 2017-10-27 11:46 UTC (permalink / raw)
To: buildroot
On Fri, Oct 27, 2017 at 2:02 AM, Andr? Przywara <andre.przywara@arm.com> wrote:
> On 26/10/17 19:13, Jagan Teki wrote:
>> On Thu, Oct 26, 2017 at 4:50 PM, Jagan Teki <jagan@amarulasolutions.com> wrote:
>>> On Sun, Oct 22, 2017 at 5:59 PM, Thomas Petazzoni
>>> <thomas.petazzoni@free-electrons.com> wrote:
>>>> Hello,
>>>>
>>>> On Sun, 22 Oct 2017 12:05:52 +0100, Andr? Przywara wrote:
>>>>
>>>>>> This wasn't only the case with sunxi it's been the U-Boot FIT
>>>>>> behaviour..even rockchip do follow same build process.
>>>>>>
>>>>>> Ideally FIT need input files to produce blob like dtb.
>>>>>>
>>>>>> Added Andre he will give some more insight.
>>>>>
>>>>> So yes, ATF supports *multiple* ways of integration:
>>>>> - On the Juno it has the capability of loading images - from NOR flash,
>>>>> so not a big deal. This means the BL1 and BL2 stages read the BL31
>>>>> (containing the PSCI runtime) and BL33 (U-Boot or EDK2), also this uses
>>>>> the ATF defined FIP image format.
>>>>> - For other platforms (like rockchip or sunxi) we usually load from MMC
>>>>> or SPI flash. So using the traditional ATF approach would mean to have
>>>>> MMC and SPI drivers in the early ATF stages, also do the DRAM
>>>>> initialization there. Since ATF is BSD licensed, it's more involved than
>>>>> just copying some code from U-Boot.
>>>>> So the pragmatic approach - which ATF actually embraces - is to just use
>>>>> a subset of the whole ATF (BL31) and do the rest via some platform
>>>>> specific firmware: which is U-Boot's SPL in our case, since it already
>>>>> has support for this hardware. Other platform (most ARM64 servers) tend
>>>>> to have their proprietary early-init firmware there.
>>>>
>>>> Thanks for summarizing the context.
>>>>
>>>>> So I virtually know nothing about buildroot, but it might not be a good
>>>>> idea to shoehorn the second approach into the Juno ATF build scheme.
>>>>> As I believe that in fact more platforms use the second approach, it
>>>>> might be worthwhile to introduce some extra code in buildroot to support
>>>>> that specifically instead of working around the Juno ATF way.
>>>>> Maybe it can be modelled as some U-Boot FIT build process with an
>>>>> additional requirement, similar to a binary blob?
>>>>
>>>> And this is exactly what I was suggesting Jagan to do: extend Buildroot
>>>> so that it covers the U-Boot-bundles-ATF scenario (sunxi/rockchip,
>>>> etc.) in addition to the already supported ATF-bundles-U-Boot scenario
>>>> (Juno).
>>>
>>> Based on the ATF build this look not an exact U-Boot-bundles-ATF
>>> scenario. Whether for Juno(ATF-bundles-U-Boot scenario) or for SUNXI,
>>> ATF want a dependence to build U-Boot first atleast for FIP point.
>>>
>>> ARM_TRUSTED_FIRMWARE_MAKE_OPTS += \
>>> CROSS_COMPILE="$(TARGET_CROSS)" \
>>> BL33=$(BINARIES_DIR)/u-boot.bin \
>>>
>>> Here BL33 need u-boot.bin to export for building FIP in default that
>>> could be the reason of making ARM_TRUSTED_FIRMWARE_DEPENDENCIES +=
>>> uboot
>>> in atf.
>>>
>>> I tried to build for U-Boot-bundles-ATF scenario by not to dependent
>>> U-Boot so that U-boot build later. Since at this movement there is no
>>> U-Boot build, ATF is unable to get the BL33, I don't know whether this
>>> BL33 is needed for all because I'm trying for BL31.
>>>
>>> Build Log:
>>> -------------
>>> un50iw1p1 all fip
>>> make[1]: Entering directory
>>> `/mnt/jagan/buildroot/buildroot-sun32/output/build/arm-trusted-firmware-aa75c8da415158a94b82a430b2b40000778e851f'
>>> make[1]: Nothing to be done for `bl31'.
>>> make[1]: *** No rule to make target
>>> `/mnt/jagan/buildroot/buildroot-sun32/output/images/u-boot.bin',
>>> needed by `build/sun50iw1p1/release/fip.bin'. Stop.
>>> make[1]: *** Waiting for unfinished jobs....
>>> Building sun50iw1p1
>
> Why do build a fip then?
> Please read board/sunxi/README.sunxi in the U-Boot sources, it tells you
> how to build ATF: namely using the "bl31" target, and not "all fip" as
> for the Juno, for instance.
Yes, ie what I founded out. Currently buildroot is doing 'all fip',
I've fixed and patches in ML.
thanks!
--
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2017-10-27 11:46 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-19 9:45 [Buildroot] [PATCH v3 00/11] board: Add Allwinner A64/H5 boards Jagan Teki
2017-10-19 9:45 ` [Buildroot] [PATCH v3 01/11] board: Add Bananapi M1 support Jagan Teki
2017-10-19 10:38 ` Baruch Siach
2017-10-19 10:56 ` Jagan Teki
2017-10-21 20:37 ` Thomas Petazzoni
2017-10-19 9:45 ` [Buildroot] [PATCH v3 02/11] support/scripts: Add sunxi64-post-build.sh Jagan Teki
2017-10-21 21:06 ` Thomas Petazzoni
2017-10-22 10:15 ` Jagan Teki
[not found] ` <4cb45577-1f4a-ce9c-7204-74934272b789@arm.com>
2017-10-22 12:29 ` Thomas Petazzoni
2017-10-26 11:20 ` Jagan Teki
2017-10-26 18:13 ` Jagan Teki
[not found] ` <e73be7ab-6435-5d11-41b5-37f3bf4053ee@arm.com>
2017-10-27 11:46 ` Jagan Teki
2017-10-19 9:45 ` [Buildroot] [PATCH v3 03/11] board: Add Bananapi M64 support Jagan Teki
2017-10-19 9:45 ` [Buildroot] [PATCH v3 04/11] board: Add Pine64 support Jagan Teki
2017-10-19 9:45 ` [Buildroot] [PATCH v3 05/11] board: Add SoPine support Jagan Teki
2017-10-19 9:45 ` [Buildroot] [PATCH v3 06/11] board: Add FriendlyARM Nanopi A64 support Jagan Teki
2017-10-19 9:45 ` [Buildroot] [PATCH v3 07/11] board: Add FriendlyARM Nanopi NEO2 support Jagan Teki
2017-10-19 9:45 ` [Buildroot] [PATCH v3 08/11] board: Add Olimex A64-OLinuXino support Jagan Teki
2017-10-19 9:45 ` [Buildroot] [PATCH v3 09/11] board: Add Orangepi Win/Win Plus support Jagan Teki
2017-10-19 9:45 ` [Buildroot] [PATCH v3 10/11] board: Add Orangepi Prime support Jagan Teki
2017-10-19 9:45 ` [Buildroot] [PATCH v3 11/11] board: Add Orangepi Zero Plus2 support Jagan Teki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox