Skip to contentSkip to conversation

Added support for LeMaker Banana Pi M2 Plus board.

PATCH New mike.harmony at snapav.com 2 participants 2 messages Aug 22, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Added support for LeMaker Banana Pi M2 Plus board.

From: Mike Harmony <[email protected]>

---
 board/lemaker/m2-plus/boot.cmd      |    7 +
 board/lemaker/m2-plus/genimage.cfg  |   33 +
 board/lemaker/m2-plus/post-build.sh |   12 +
 configs/bananapi_m2_plus_defconfig  | 3280 +++++++++++++++++++++++++++++++++++
 4 files changed, 3332 insertions(+)
 create mode 100644 board/lemaker/m2-plus/boot.cmd
 create mode 100644 board/lemaker/m2-plus/genimage.cfg
 create mode 100755 board/lemaker/m2-plus/post-build.sh
 create mode 100644 configs/bananapi_m2_plus_defconfig
board/lemaker/m2-plus/boot.cmd new file +7 -0
new file mode 100644
index 0000000..d22464a
@@ -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 sun8i-h3-bananapi-m2-plus.dtb
+
+bootz $kernel_addr_r - $fdt_addr_r
board/lemaker/m2-plus/genimage.cfg new file +33 -0
new file mode 100644
index 0000000..cde0669
@@ -0,0 +1,33 @@
+image boot.vfat {
+	vfat {
+		files = {
+			"zImage",
+			"sun8i-h3-bananapi-m2-plus.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"
+	}
+}
board/lemaker/m2-plus/post-build.sh new file +12 -0
new file mode 100755
index 0000000..fb4b6e9
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# Remove all but the brcmfmac43362 firmware files
+find $TARGET_DIR/lib/firmware/brcm -type f -not -name "brcmfmac43362*" -delete
+
+BOARD_DIR="$(dirname $0)"
+MKIMAGE=$HOST_DIR/usr/bin/mkimage
+BOOT_CMD=$BOARD_DIR/boot.cmd
+BOOT_CMD_H=$BINARIES_DIR/boot.scr
+
+# U-Boot script
+$MKIMAGE -C none -A arm -T script -d $BOOT_CMD $BOOT_CMD_H
configs/bananapi_m2_plus_defconfig new file +3280 -0

2,948 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.7.4

Part of the diff is not shown here. View the raw message.

#1 lore raw

PATCH 1/1 Added support for LeMaker Banana Pi M2 Plus board.

Hello,

Thanks for your contribution!

Quoted 13 lines · mike.harmony at snapav.com

From: Mike Harmony <[email protected]>

---
 board/lemaker/m2-plus/boot.cmd      |    7 +
 board/lemaker/m2-plus/genimage.cfg  |   33 +
 board/lemaker/m2-plus/post-build.sh |   12 +
 configs/bananapi_m2_plus_defconfig  | 3280 +++++++++++++++++++++++++++++++++++
 4 files changed, 3332 insertions(+)
 create mode 100644 board/lemaker/m2-plus/boot.cmd
 create mode 100644 board/lemaker/m2-plus/genimage.cfg
 create mode 100755 board/lemaker/m2-plus/post-build.sh
 create mode 100644 configs/bananapi_m2_plus_defconfig

I haven't looked in details at your submission. However, we already had a contribution adding support for Banana Pi M2 Plus, see:

Subject: [Buildroot] [PATCH v2 2/3] Board: Add Bananapi M2 Plus support
Date: Sun, 18 Jun 2017 22:18:02 +0530

It was not merged because I had some comments, and the original submitter didn't send an updated version.

Regarding your submission, at the very least:

- The defconfig should be generated with "make savedefconfig", to be a minimal defconfig. Look at other defconfig files in configs/

- Add yourself to the DEVELOPERS file

Thanks!

Thomas

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