* [Buildroot] [PATCH 1/2] boot: add s500-bootloader package
@ 2016-05-23 13:33 Peter Korsgaard
2016-05-23 13:33 ` [Buildroot] [PATCH 2/2] boards: add roseapple pi board support Peter Korsgaard
2016-05-26 8:36 ` [Buildroot] [PATCH 1/2] boot: add s500-bootloader package Peter Korsgaard
0 siblings, 2 replies; 4+ messages in thread
From: Peter Korsgaard @ 2016-05-23 13:33 UTC (permalink / raw)
To: buildroot
This is the first level bootloader for the Actions Semiconductor S500 SoC,
which is used on boards like Roseapple Pi and LeMaker Guitar.
The bootloader performs basic configuration and chain loads u-boot for
futher setup.
This bootloader is unfortunately only available as a binary blob. It gets
configured for a specific board using a binary (32bit x86) tool based on a
.ini file (somewhat similar to sunxi .fex).
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
boot/Config.in | 1 +
boot/s500-bootloader/Config.in | 17 ++++++++++++++++
boot/s500-bootloader/s500-bootloader.hash | 2 ++
boot/s500-bootloader/s500-bootloader.mk | 34 +++++++++++++++++++++++++++++++
4 files changed, 54 insertions(+)
create mode 100644 boot/s500-bootloader/Config.in
create mode 100644 boot/s500-bootloader/s500-bootloader.hash
create mode 100644 boot/s500-bootloader/s500-bootloader.mk
diff --git a/boot/Config.in b/boot/Config.in
index 4daf079..cd10cd8 100644
--- a/boot/Config.in
+++ b/boot/Config.in
@@ -11,6 +11,7 @@ source "boot/grub2/Config.in"
source "boot/gummiboot/Config.in"
source "boot/lpc32xxcdl/Config.in"
source "boot/mxs-bootlets/Config.in"
+source "boot/s500-bootloader/Config.in"
source "boot/syslinux/Config.in"
source "boot/uboot/Config.in"
source "boot/xloader/Config.in"
diff --git a/boot/s500-bootloader/Config.in b/boot/s500-bootloader/Config.in
new file mode 100644
index 0000000..7bb689f
--- /dev/null
+++ b/boot/s500-bootloader/Config.in
@@ -0,0 +1,17 @@
+config BR2_TARGET_S500_BOOTLOADER
+ bool "s500-bootloader"
+ depends on BR2_arm
+ depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
+ select BR2_HOSTARCH_NEEDS_IA32_LIBS
+ help
+ 1st level bootloader for Actions Semiconductor S500 SoC.
+
+ https://github.com/xapp-le/owl
+
+config BR2_TARGET_S500_BOOTLOADER_BOARD
+ string "board to configure for"
+ depends on BR2_TARGET_S500_BOOTLOADER
+ help
+ Specify the board to configure the bootloader for.
+ This should be the name of a directory under s500/boards
+ containing a suitable bootloader.ini file.
diff --git a/boot/s500-bootloader/s500-bootloader.hash b/boot/s500-bootloader/s500-bootloader.hash
new file mode 100644
index 0000000..d538f23
--- /dev/null
+++ b/boot/s500-bootloader/s500-bootloader.hash
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256 b183024ac69f51ea7befd28d03b2ec35a7280e270405600fb4f37aa91d9c9571 s500-bootloader-a8d7fa1d9a7f353ec4613febf30f4ca99a10a106.tar.gz
diff --git a/boot/s500-bootloader/s500-bootloader.mk b/boot/s500-bootloader/s500-bootloader.mk
new file mode 100644
index 0000000..bc87b09
--- /dev/null
+++ b/boot/s500-bootloader/s500-bootloader.mk
@@ -0,0 +1,34 @@
+################################################################################
+#
+# s500-bootloader
+#
+################################################################################
+
+S500_BOOTLOADER_VERSION = a8d7fa1d9a7f353ec4613febf30f4ca99a10a106
+S500_BOOTLOADER_SITE = $(call github,xapp-le,owl,$(S500_BOOTLOADER_VERSION))
+S500_BOOTLOADER_LICENSE = PROPRIETARY
+S500_BOOTLOADER_INSTALL_TARGET = NO
+S500_BOOTLOADER_INSTALL_IMAGES = YES
+
+S500_BOOTLOADER_BOARD = $(call qstrip,$(BR2_TARGET_S500_BOOTLOADER_BOARD))
+
+define S500_BOOTLOADER_BUILD_CMDS
+ cd $(@D) && ./tools/utils/bootloader_pack \
+ s500/bootloader/bootloader.bin \
+ s500/boards/$(S500_BOOTLOADER_BOARD)/bootloader.ini \
+ s500-bootloader.bin
+endef
+
+define S500_BOOTLOADER_INSTALL_IMAGES_CMDS
+ $(INSTALL) -m 0644 -D $(@D)/s500-bootloader.bin \
+ $(BINARIES_DIR)/s500-bootloader.bin
+endef
+
+$(eval $(generic-package))
+
+ifeq ($(BR2_TARGET_S500_BOOTLOADER)$(BR_BUILDING),yy)
+# we NEED a board name
+ifeq ($(S500_BOOTLOADER_BOARD),)
+$(error No s500-bootloader board specified. Check your BR2_TARGET_S500_BOOTLOADER settings)
+endif
+endif
--
2.7.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 2/2] boards: add roseapple pi board support
2016-05-23 13:33 [Buildroot] [PATCH 1/2] boot: add s500-bootloader package Peter Korsgaard
@ 2016-05-23 13:33 ` Peter Korsgaard
2016-05-26 8:36 ` Peter Korsgaard
2016-05-26 8:36 ` [Buildroot] [PATCH 1/2] boot: add s500-bootloader package Peter Korsgaard
1 sibling, 1 reply; 4+ messages in thread
From: Peter Korsgaard @ 2016-05-23 13:33 UTC (permalink / raw)
To: buildroot
Add basic support for the roseapple pi board, a SBC in a RPI form factor
with an Actions Semiconductor S500 SoC. For details, see:
http://roseapplepi.org/
The vendor kernel unfortunately needs a minor patch to build the XHCI
driver, so include it here.
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
board/roseapplepi/genimage.cfg | 43 ++++++++++++++++++++++
.../patches/linux/0001-unbreak-xhci-trace.patch | 31 ++++++++++++++++
board/roseapplepi/post-image.sh | 18 +++++++++
board/roseapplepi/uEnv.txt | 3 ++
configs/roseapplepi_defconfig | 40 ++++++++++++++++++++
5 files changed, 135 insertions(+)
create mode 100644 board/roseapplepi/genimage.cfg
create mode 100644 board/roseapplepi/patches/linux/0001-unbreak-xhci-trace.patch
create mode 100755 board/roseapplepi/post-image.sh
create mode 100755 board/roseapplepi/uEnv.txt
create mode 100644 configs/roseapplepi_defconfig
diff --git a/board/roseapplepi/genimage.cfg b/board/roseapplepi/genimage.cfg
new file mode 100644
index 0000000..4d40e65
--- /dev/null
+++ b/board/roseapplepi/genimage.cfg
@@ -0,0 +1,43 @@
+# Minimal SD card image for the Roseapple Pi
+#
+image boot.vfat {
+ vfat {
+ files = {
+ "uEnv.txt",
+ "uImage"
+ }
+ file kernel.dtb {
+ image = "actduino_bubble_gum_sdboot_linux.dtb"
+ }
+ }
+ size = 10M
+}
+
+image sdcard.img {
+ hdimage {
+ }
+
+ partition s500-bootloader {
+ in-partition-table = "no"
+ image = "s500-bootloader.bin"
+ offset = 0x200200
+ }
+
+ partition u-boot {
+ in-partition-table = "no"
+ image = "u-boot-dtb.img"
+ offset = 0x300000
+ }
+
+ partition boot {
+ partition-type = 0xC
+ bootable = "true"
+ image = "boot.vfat"
+ }
+
+ partition rootfs {
+ partition-type = 0x83
+ image = "rootfs.ext4"
+ size = 512M
+ }
+}
diff --git a/board/roseapplepi/patches/linux/0001-unbreak-xhci-trace.patch b/board/roseapplepi/patches/linux/0001-unbreak-xhci-trace.patch
new file mode 100644
index 0000000..79e8c80
--- /dev/null
+++ b/board/roseapplepi/patches/linux/0001-unbreak-xhci-trace.patch
@@ -0,0 +1,31 @@
+[PATCH] unbreak xhci-trace compilation
+
+When commit 84a99f6fc5d4 (xhci: add traces for debug messages in
+xhci_address_device) was backported to the owl tree as part of commit
+5b2ea66f15396 (usb: add owl usb driver), the specific CFLAGS needed for
+xhci-trace.c were missed, causing build breakage:
+
+ CC drivers/usb/host/xhci-trace.o
+In file included from drivers/usb/host/xhci-trace.h:151:0,
+ from drivers/usb/host/xhci-trace.c:15:
+include/trace/define_trace.h:79:43: fatal error: ./xhci-trace.h: No such file or directory
+
+Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
+---
+ drivers/usb/host/Makefile | 3 +++
+ 1 file changed, 3 insertions(+)
+
+Index: linux-59dbf6a4998e967eb9c6bdcc9b506c0d96acb26b/drivers/usb/host/Makefile
+===================================================================
+--- linux-59dbf6a4998e967eb9c6bdcc9b506c0d96acb26b.orig/drivers/usb/host/Makefile
++++ linux-59dbf6a4998e967eb9c6bdcc9b506c0d96acb26b/drivers/usb/host/Makefile
+@@ -4,6 +4,9 @@
+
+ ccflags-$(CONFIG_USB_DEBUG) := -DDEBUG
+
++# tell define_trace.h where to find the xhci trace header
++CFLAGS_xhci-trace.o := -I$(src)
++
+ isp1760-y := isp1760-hcd.o isp1760-if.o
+
+ fhci-y := fhci-hcd.o fhci-hub.o fhci-q.o
diff --git a/board/roseapplepi/post-image.sh b/board/roseapplepi/post-image.sh
new file mode 100755
index 0000000..e8f2df2
--- /dev/null
+++ b/board/roseapplepi/post-image.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+BOARD_DIR="$(dirname $0)"
+GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg"
+GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
+
+rm -rf "${GENIMAGE_TMP}"
+
+cp "${BOARD_DIR}/uEnv.txt" "${BINARIES_DIR}"
+
+genimage \
+ --rootpath "${TARGET_DIR}" \
+ --tmppath "${GENIMAGE_TMP}" \
+ --inputpath "${BINARIES_DIR}" \
+ --outputpath "${BINARIES_DIR}" \
+ --config "${GENIMAGE_CFG}"
+
+exit $?
diff --git a/board/roseapplepi/uEnv.txt b/board/roseapplepi/uEnv.txt
new file mode 100755
index 0000000..f9646e4
--- /dev/null
+++ b/board/roseapplepi/uEnv.txt
@@ -0,0 +1,3 @@
+# no ramdisk
+ramdisk_addr_r=-
+bootargs=clk_ignore_unused root=/dev/mmcblk0p2
diff --git a/configs/roseapplepi_defconfig b/configs/roseapplepi_defconfig
new file mode 100644
index 0000000..6627ff4
--- /dev/null
+++ b/configs/roseapplepi_defconfig
@@ -0,0 +1,40 @@
+BR2_arm=y
+BR2_cortex_a9=y
+BR2_ARM_ENABLE_NEON=y
+BR2_ARM_ENABLE_VFP=y
+
+BR2_GLOBAL_PATCH_DIR="board/roseapplepi/patches"
+# Linux headers same as kernel, a 3.10 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_10=y
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/roseapplepi/post-image.sh"
+
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_GIT=y
+BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/xapp-le/kernel.git"
+BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="59dbf6a4998e967eb9c6bdcc9b506c0d96acb26b"
+BR2_LINUX_KERNEL_DEFCONFIG="actduino_bubble_gum_linux"
+BR2_LINUX_KERNEL_UIMAGE=y
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="actduino_bubble_gum_sdboot_linux"
+
+# Filesystem / image
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+# BR2_TARGET_ROOTFS_TAR is not set
+
+# Bootloaders
+BR2_TARGET_S500_BOOTLOADER=y
+BR2_TARGET_S500_BOOTLOADER_BOARD="linux/bubble_gum_sd"
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_GIT=y
+BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://github.com/xapp-le/u-boot.git"
+BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="a035d2673a90143a1a74557503b2e137b1447ae6"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="actduino_bubble_gum_v10"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_FORMAT_DTB_IMG=y
+
+# Required tools to create the SD image
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
--
2.7.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/2] boot: add s500-bootloader package
2016-05-23 13:33 [Buildroot] [PATCH 1/2] boot: add s500-bootloader package Peter Korsgaard
2016-05-23 13:33 ` [Buildroot] [PATCH 2/2] boards: add roseapple pi board support Peter Korsgaard
@ 2016-05-26 8:36 ` Peter Korsgaard
1 sibling, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2016-05-26 8:36 UTC (permalink / raw)
To: buildroot
>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:
> This is the first level bootloader for the Actions Semiconductor S500 SoC,
> which is used on boards like Roseapple Pi and LeMaker Guitar.
> The bootloader performs basic configuration and chain loads u-boot for
> futher setup.
> This bootloader is unfortunately only available as a binary blob. It gets
> configured for a specific board using a binary (32bit x86) tool based on a
> .ini file (somewhat similar to sunxi .fex).
> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Committed to next, thanks.
--
Venlig hilsen,
Peter Korsgaard
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 2/2] boards: add roseapple pi board support
2016-05-23 13:33 ` [Buildroot] [PATCH 2/2] boards: add roseapple pi board support Peter Korsgaard
@ 2016-05-26 8:36 ` Peter Korsgaard
0 siblings, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2016-05-26 8:36 UTC (permalink / raw)
To: buildroot
>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:
> Add basic support for the roseapple pi board, a SBC in a RPI form factor
> with an Actions Semiconductor S500 SoC. For details, see:
> http://roseapplepi.org/
> The vendor kernel unfortunately needs a minor patch to build the XHCI
> driver, so include it here.
> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Committed to next, thanks.
--
Venlig hilsen,
Peter Korsgaard
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-05-26 8:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-23 13:33 [Buildroot] [PATCH 1/2] boot: add s500-bootloader package Peter Korsgaard
2016-05-23 13:33 ` [Buildroot] [PATCH 2/2] boards: add roseapple pi board support Peter Korsgaard
2016-05-26 8:36 ` Peter Korsgaard
2016-05-26 8:36 ` [Buildroot] [PATCH 1/2] boot: add s500-bootloader package Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox