Skip to contentSkip to conversation

board: Add Pine64 support

PATCH Superseded Jagan Teki 2 participants 2 messages Jun 18, 2017 – Jun 24, 2017

v2 of 6 Superseded Latest is v6 →

lore
Share & tools
lore

Jagan Teki

author
#0 lore raw

PATCH v2 3/3 board: Add Pine64 support

From: Jagan Teki <[email protected]>

Add initial support for Pine64 board with below features:
- U-Boot 2017.07-rc1
- Linux 4.11.5
- Default packages from buildroot

Cc Andre Przywara <[email protected]>

---
Changes for v2:
- none

 DEVELOPERS                 |  2 ++
 board/pine64/boot.cmd      |  6 ++++++
 board/pine64/genimage.cfg  | 38 ++++++++++++++++++++++++++++++++++++++
 board/pine64/post-build.sh | 10 ++++++++++
 board/pine64/readme.txt    | 34 ++++++++++++++++++++++++++++++++++
 configs/pine64_defconfig   | 45 +++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 135 insertions(+)
 create mode 100644 board/pine64/boot.cmd
 create mode 100644 board/pine64/genimage.cfg
 create mode 100755 board/pine64/post-build.sh
 create mode 100644 board/pine64/readme.txt
 create mode 100644 configs/pine64_defconfig
DEVELOPERS +2 -0
index 4ccdc26..54e9fb9 100644
@@ -830,8 +830,10 @@ F:	package/keepalived/
 N:	Jagan Teki <[email protected]>
 F:	board/bananapi/
 F:	board/engicam/
+F:	board/pine64/
 F:	configs/bananapi_m2_plus_defconfig
 F:	configs/bananapi_m64_defconfig
+F:	configs/pine64_defconfig
 F:	configs/engicam_imx6qdl_icore_mmc_defconfig
 F:	configs/engicam_imx6qdl_icore_rqs_mmc_defconfig
 F:	configs/engicam_imx6ul_geam_mmc_defconfig
board/pine64/boot.cmd new file +6 -0
new file mode 100644
index 0000000..14f5610
@@ -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
board/pine64/genimage.cfg new file +38 -0
new file mode 100644
index 0000000..8e12308
@@ -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"
+	}
+}
board/pine64/post-build.sh new file +10 -0
new file mode 100755
index 0000000..d22bc3d
@@ -0,0 +1,10 @@
+#!/bin/sh
+# args from BR2_ROOTFS_POST_SCRIPT_ARGS
+# $4 path of boot.cmd
+
+MKIMAGE=${HOST_DIR}/usr/bin/mkimage
+BOOT_CMD="${4}"
+BOOT_CMD_H="${BINARIES_DIR}/boot.scr"
+
+# U-Boot script
+"${MKIMAGE}" -C none -A arm -T script -d "${BOOT_CMD}" "${BOOT_CMD_H}"
board/pine64/readme.txt new file +34 -0
new file mode 100644
index 0000000..e41f9ca
@@ -0,0 +1,34 @@
+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
+
+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 bs=1M
+  $ sudo sync
+
+Insert the micro SDcard in your Pine64 and power it up. The console
+is on the serial line, 115200 8N1.
configs/pine64_defconfig new file +45 -0

45 lines not on this page · raw message

Signature · 1 line
2.7.4
#1 lore raw

PATCH v2 3/3 board: Add Pine64 support

Hello,

Quoted 7 lines · Jagan Teki

From: Jagan Teki <[email protected]>

Add initial support for Pine64 board with below features:
- U-Boot 2017.07-rc1
- Linux 4.11.5
- Default packages from buildroot

Quoted 5 lines
Cc Andre Przywara <[email protected]>

---
Changes for v2:
- none

Please rework with the same comments as the one for the Banana M64.

Thanks!

Thomas

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