ソースを参照

board/pine64/pinecube: new board

Add support for PineCube with:
- U-Boot 2022.04
- Linux 5.15.61

PineCube is a low-powered, open source IP camera
with the following specs:
 - Allwinner S3 Cortex-A7
 - 128 MiB DDR3
 - 16 MiB SPI flash
 - 5 MPx OV5640 camera
 - MicroSD slot
 - 10/100M Ethernet with passive PoE
 - 802.11 b/g/n WiFi
 - Bluetooth 4.1
 - USB 2.0
 - 26 pins GPIO header
 - Microphone
 - IR LEDs for night vision

Board homepage: https://www.pine64.org/cube/
Board wiki:     https://wiki.pine64.org/wiki/PineCube

Signed-off-by: Jan Havran <havran.jan@email.cz>
Reviewed-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Jan Havran 2 年 前
コミット
7b02ca842d

+ 4 - 0
DEVELOPERS

@@ -1494,6 +1494,10 @@ F:	board/microchip/mpfs_icicle/
 F:	configs/microchip_mpfs_icicle_defconfig
 F:	configs/microchip_mpfs_icicle_defconfig
 F:	package/microchip-hss-payload-generator/
 F:	package/microchip-hss-payload-generator/
 
 
+N:	Jan Havran <havran.jan@email.cz>
+F:	board/pine64/pinecube/
+F:	configs/pine64_pinecube_defconfig
+
 N:	Jan Heylen <jan.heylen@nokia.com>
 N:	Jan Heylen <jan.heylen@nokia.com>
 F:	package/opentracing-cpp/
 F:	package/opentracing-cpp/
 
 

+ 4 - 0
board/pine64/pinecube/extlinux.conf

@@ -0,0 +1,4 @@
+label buildroot
+  kernel /zImage
+  devicetree /sun8i-s3-pinecube.dtb
+  append console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait rw

+ 34 - 0
board/pine64/pinecube/genimage.cfg

@@ -0,0 +1,34 @@
+image boot.vfat {
+	vfat {
+		files = {
+			"zImage",
+			"sun8i-s3-pinecube.dtb",
+			"extlinux"
+		}
+	}
+
+	size = 8M
+}
+
+image sdcard.img {
+	hdimage {
+	}
+
+	partition u-boot {
+		in-partition-table = "no"
+		image = "u-boot-sunxi-with-spl.bin"
+		offset = 8K
+		size = 504K # 512KB - 8KB
+	}
+
+	partition boot {
+		partition-type = 0xC
+		bootable = "true"
+		image = "boot.vfat"
+	}
+
+	partition rootfs {
+		partition-type = 0x83
+		image = "rootfs.ext4"
+	}
+}

+ 5 - 0
board/pine64/pinecube/post-build.sh

@@ -0,0 +1,5 @@
+#!/bin/sh
+
+BOARD_DIR="$(dirname "$0")"
+
+install -m 0644 -D "$BOARD_DIR"/extlinux.conf "$BINARIES_DIR"/extlinux/extlinux.conf

+ 31 - 0
board/pine64/pinecube/readme.txt

@@ -0,0 +1,31 @@
+Intro
+=====
+
+This directory contains a Buildroot configuration for building a
+Pine64 PineCube.
+
+Board homepage: https://www.pine64.org/cube/
+Board wiki:     https://wiki.pine64.org/wiki/PineCube
+
+How to build it
+===============
+
+  $ make pine64_pinecube_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 PineCube and power it up. The console
+is on the serial port 2, 115200 8N1 (check Wiki for board pinout).

+ 45 - 0
configs/pine64_pinecube_defconfig

@@ -0,0 +1,45 @@
+# Target options
+BR2_arm=y
+BR2_cortex_a7=y
+BR2_ARM_FPU_VFPV4=y
+
+# Toolchain options
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_15=y
+
+# System configuration
+BR2_TARGET_GENERIC_HOSTNAME="pinecube"
+BR2_TARGET_GENERIC_ISSUE="Welcome to Pine64 Pinecube"
+BR2_SYSTEM_DHCP="eth0"
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/pine64/pinecube/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/pine64/pinecube/genimage.cfg"
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.15.61"
+BR2_LINUX_KERNEL_DEFCONFIG="sunxi"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun8i-s3-pinecube"
+BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
+
+# Filesystem
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=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="2022.04"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="pinecube"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y
+BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
+BR2_TARGET_UBOOT_SPL=y
+BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin"
+
+# Required host utilities for building an SDCard image
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y