* [Buildroot] [PATCH] board: solidrun: add Clearfog GT-8K
@ 2019-06-16 8:18 Baruch Siach
2019-06-17 19:20 ` Thomas Petazzoni
2019-06-19 12:00 ` Thomas Petazzoni
0 siblings, 2 replies; 5+ messages in thread
From: Baruch Siach @ 2019-06-16 8:18 UTC (permalink / raw)
To: buildroot
Add support for the SolidRun Armada 8040 based Clearfog GT-8K. This
board has the same processor as the Macchiatobin, so we can reuse the
Macchiatobin U-Boot and image definitions.
The kernel fragment enables drivers that are necessary to make
networking ports work (SFP, Ethernet port, and Ethernet switch).
Cc: Jan Kundr?t <jan.kundrat@cesnet.cz>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
DEVELOPERS | 2 +
board/solidrun/clearfog_gt_8k/extlinux.conf | 4 ++
board/solidrun/clearfog_gt_8k/genimage.cfg | 1 +
| 4 ++
.../clearfog_gt_8k/post-build-mainline.sh | 1 +
board/solidrun/clearfog_gt_8k/readme.txt | 61 +++++++++++++++++++
.../clearfog_gt_8k/uboot-fragment.config | 1 +
configs/solidrun_clearfog_gt_8k_defconfig | 46 ++++++++++++++
8 files changed, 120 insertions(+)
create mode 100644 board/solidrun/clearfog_gt_8k/extlinux.conf
create mode 120000 board/solidrun/clearfog_gt_8k/genimage.cfg
create mode 100644 board/solidrun/clearfog_gt_8k/linux-extras.config
create mode 120000 board/solidrun/clearfog_gt_8k/post-build-mainline.sh
create mode 100644 board/solidrun/clearfog_gt_8k/readme.txt
create mode 120000 board/solidrun/clearfog_gt_8k/uboot-fragment.config
create mode 100644 configs/solidrun_clearfog_gt_8k_defconfig
diff --git a/DEVELOPERS b/DEVELOPERS
index 4cc8c9d0877e..9bf2d334e522 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -253,6 +253,8 @@ F: package/pulseview/
F: package/sigrok-cli/
N: Baruch Siach <baruch@tkos.co.il>
+F: board/solidrun/clearfog_gt_8k/
+F: configs/solidrun_clearfog_gt_8k_defconfig
F: package/18xx-ti-utils/
F: package/daemon/
F: package/dropbear/
diff --git a/board/solidrun/clearfog_gt_8k/extlinux.conf b/board/solidrun/clearfog_gt_8k/extlinux.conf
new file mode 100644
index 000000000000..aae0c0d5fb51
--- /dev/null
+++ b/board/solidrun/clearfog_gt_8k/extlinux.conf
@@ -0,0 +1,4 @@
+label Clearfog GT-8K Linux
+ kernel /boot/Image
+ devicetree /boot/armada-8040-clearfog-gt-8k.dtb
+ append console=ttyS0,115200n8 root=/dev/mmcblk1p1 rootwait
diff --git a/board/solidrun/clearfog_gt_8k/genimage.cfg b/board/solidrun/clearfog_gt_8k/genimage.cfg
new file mode 120000
index 000000000000..0cc2754ff6c5
--- /dev/null
+++ b/board/solidrun/clearfog_gt_8k/genimage.cfg
@@ -0,0 +1 @@
+../macchiatobin/genimage.cfg
\ No newline at end of file
--git a/board/solidrun/clearfog_gt_8k/linux-extras.config b/board/solidrun/clearfog_gt_8k/linux-extras.config
new file mode 100644
index 000000000000..bce2a2e9d20c
--- /dev/null
+++ b/board/solidrun/clearfog_gt_8k/linux-extras.config
@@ -0,0 +1,4 @@
+CONFIG_MARVELL_PHY=y
+CONFIG_SFP=y
+CONFIG_NET_DSA=y
+CONFIG_NET_DSA_MV88E6XXX=y
diff --git a/board/solidrun/clearfog_gt_8k/post-build-mainline.sh b/board/solidrun/clearfog_gt_8k/post-build-mainline.sh
new file mode 120000
index 000000000000..a8c9a52437f2
--- /dev/null
+++ b/board/solidrun/clearfog_gt_8k/post-build-mainline.sh
@@ -0,0 +1 @@
+../macchiatobin/post-build-mainline.sh
\ No newline at end of file
diff --git a/board/solidrun/clearfog_gt_8k/readme.txt b/board/solidrun/clearfog_gt_8k/readme.txt
new file mode 100644
index 000000000000..1648ffa38dc3
--- /dev/null
+++ b/board/solidrun/clearfog_gt_8k/readme.txt
@@ -0,0 +1,61 @@
+Intro
+=====
+
+The default configuration described below will allow you to start
+experimenting with the buildroot environment for the SolidRun Clearfog GT-8K
+based on the Marvell Armada 8040 SoC.
+
+This default configuration will bring up the board and allow shell command
+line access through the serial console.
+
+How to build
+============
+
+ $ make solidrun_clearfog_gt_8k_defconfig
+ $ make
+
+How to write the SD card
+========================
+
+Once the build process is finished you will have an image file named
+"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 conv=fsync
+
+How to boot the board
+=====================
+
+The Clearfog GT-8K can be setup to load the bootloader from different sources
+including eMMC, SPI flash, and SD-card.
+
+To select boot from SD-card the DIP switches in SW6 (at the bottom of the
+board) should be configured as follows:
+
+ SW6: 11010
+
+Insert the micro SDcard in the Cleargfog GT-8K and power it up.
+
+Serial console
+==============
+
+The serial console is accessible at the J27 pins header (TTL UART) with the
+following pinout (pin #1 is marked with triangle on the PCB):
+
+ pin #1: Ground
+ pin #2: Armada 8040 Rx
+ pin #3: Armada 8040 Tx
+
+Enable the switch (yellow) Ethernet ports
+=========================================
+
+To enable the Clearfog GT-8K internal switch port make sure to load the
+'mv88e6xxx' kernel module, and up the switch up-link port (eth2 by default):
+
+ modprobe mv88e6xxx
+ ifconfig eth2 up
+
+Then you can configure each switch port separately. These port are named
+'lan1' to 'lan4' by default. 'lan1' is closest to the USB port, while 'lan4'
+is closest to the blue Ethernet port.
diff --git a/board/solidrun/clearfog_gt_8k/uboot-fragment.config b/board/solidrun/clearfog_gt_8k/uboot-fragment.config
new file mode 120000
index 000000000000..996c4aa6b6fb
--- /dev/null
+++ b/board/solidrun/clearfog_gt_8k/uboot-fragment.config
@@ -0,0 +1 @@
+../macchiatobin/uboot-fragment.config
\ No newline at end of file
diff --git a/configs/solidrun_clearfog_gt_8k_defconfig b/configs/solidrun_clearfog_gt_8k_defconfig
new file mode 100644
index 000000000000..a44038e66392
--- /dev/null
+++ b/configs/solidrun_clearfog_gt_8k_defconfig
@@ -0,0 +1,46 @@
+BR2_aarch64=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_1=y
+BR2_TARGET_GENERIC_HOSTNAME="clearfog-gt-8k"
+BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for SolidRun Clearfog GT-8K"
+
+# 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/MarvellEmbeddedProcessors/atf-marvell.git"
+# This commit corresponds to release armada-18.09.4
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="711ecd32afe465b38052b5ba374c825b158eea18"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="a80x0_mcbin"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="USE_COHERENT_MEM=0"
+BR2_TARGET_BINARIES_MARVELL=y
+BR2_TARGET_BINARIES_MARVELL_8040=y
+BR2_TARGET_MV_DDR_MARVELL=y
+
+# U-Boot
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.04"
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="clearfog_gt_8k"
+BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="board/solidrun/clearfog_gt_8k/uboot-fragment.config"
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.1.9"
+BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/solidrun/clearfog_gt_8k/linux-extras.config"
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="marvell/armada-8040-clearfog-gt-8k"
+BR2_LINUX_KERNEL_INSTALL_TARGET=y
+BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
+
+# rootfs
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/solidrun/clearfog_gt_8k/post-build-mainline.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/solidrun/clearfog_gt_8k/genimage.cfg"
--
2.20.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH] board: solidrun: add Clearfog GT-8K
2019-06-16 8:18 [Buildroot] [PATCH] board: solidrun: add Clearfog GT-8K Baruch Siach
@ 2019-06-17 19:20 ` Thomas Petazzoni
2019-06-19 7:51 ` Baruch Siach
2019-06-19 12:00 ` Thomas Petazzoni
1 sibling, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2019-06-17 19:20 UTC (permalink / raw)
To: buildroot
Hello Baruch,
This mostly looks good, I just have one question (below), and some
minor nits that I would have ignored if I didn't had the question.
The commit title should preferably be:
configs/solidrun_clearfog_gt_8k: new defconfig
On Sun, 16 Jun 2019 11:18:47 +0300
Baruch Siach <baruch@tkos.co.il> wrote:
> diff --git a/DEVELOPERS b/DEVELOPERS
> index 4cc8c9d0877e..9bf2d334e522 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -253,6 +253,8 @@ F: package/pulseview/
> F: package/sigrok-cli/
>
> N: Baruch Siach <baruch@tkos.co.il>
> +F: board/solidrun/clearfog_gt_8k/
I think we more commonly use "-" as a separate in board directory names
instead of "_", so there's not a strong convention on this.
> diff --git a/board/solidrun/clearfog_gt_8k/linux-extras.config b/board/solidrun/clearfog_gt_8k/linux-extras.config
> new file mode 100644
> index 000000000000..bce2a2e9d20c
> --- /dev/null
> +++ b/board/solidrun/clearfog_gt_8k/linux-extras.config
> @@ -0,0 +1,4 @@
> +CONFIG_MARVELL_PHY=y
> +CONFIG_SFP=y
> +CONFIG_NET_DSA=y
> +CONFIG_NET_DSA_MV88E6XXX=y
So the switch driver is enabled to be built in the kernel image
itself...
> +Enable the switch (yellow) Ethernet ports
> +=========================================
> +
> +To enable the Clearfog GT-8K internal switch port make sure to load the
> +'mv88e6xxx' kernel module, and up the switch up-link port (eth2 by default):
> +
> + modprobe mv88e6xxx
... but you tell people to load it as a kernel module ?
This seems weird. Am I missing something ?
> diff --git a/configs/solidrun_clearfog_gt_8k_defconfig b/configs/solidrun_clearfog_gt_8k_defconfig
> new file mode 100644
> index 000000000000..a44038e66392
> --- /dev/null
> +++ b/configs/solidrun_clearfog_gt_8k_defconfig
> @@ -0,0 +1,46 @@
> +BR2_aarch64=y
> +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_1=y
> +BR2_TARGET_GENERIC_HOSTNAME="clearfog-gt-8k"
> +BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for SolidRun Clearfog GT-8K"
> +
> +# 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/MarvellEmbeddedProcessors/atf-marvell.git"
> +# This commit corresponds to release armada-18.09.4
> +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="711ecd32afe465b38052b5ba374c825b158eea18"
> +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="a80x0_mcbin"
So there is no ATF configuration specifically for the GT-8K platform ?
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH] board: solidrun: add Clearfog GT-8K
2019-06-17 19:20 ` Thomas Petazzoni
@ 2019-06-19 7:51 ` Baruch Siach
2019-06-19 8:34 ` Jan Kundrát
0 siblings, 1 reply; 5+ messages in thread
From: Baruch Siach @ 2019-06-19 7:51 UTC (permalink / raw)
To: buildroot
Hi Thomas,
On Mon, Jun 17, 2019 at 09:20:14PM +0200, Thomas Petazzoni wrote:
> This mostly looks good, I just have one question (below), and some
> minor nits that I would have ignored if I didn't had the question.
>
> The commit title should preferably be:
>
> configs/solidrun_clearfog_gt_8k: new defconfig
I'll fix that if I do v2.
> On Sun, 16 Jun 2019 11:18:47 +0300
> Baruch Siach <baruch@tkos.co.il> wrote:
>
> > diff --git a/DEVELOPERS b/DEVELOPERS
> > index 4cc8c9d0877e..9bf2d334e522 100644
> > --- a/DEVELOPERS
> > +++ b/DEVELOPERS
> > @@ -253,6 +253,8 @@ F: package/pulseview/
> > F: package/sigrok-cli/
> >
> > N: Baruch Siach <baruch@tkos.co.il>
> > +F: board/solidrun/clearfog_gt_8k/
>
> I think we more commonly use "-" as a separate in board directory names
> instead of "_", so there's not a strong convention on this.
I see quite a few board directory names with underscores:
socrates_cyclone5
at91sam9x5ek_mmc
sama5d27_som1_ek_mmc
sama5d2_xplained_mmc
sama5d3_xplained_mmc
sama5d4_xplained_mmc
s6lx9_microboard
icorem6_rqs
t1040_t2080
a10_olinuxino
a13_olinuxino
a20_olinuxino
imx233_olinuxino
x86_64
> > diff --git a/board/solidrun/clearfog_gt_8k/linux-extras.config b/board/solidrun/clearfog_gt_8k/linux-extras.config
> > new file mode 100644
> > index 000000000000..bce2a2e9d20c
> > --- /dev/null
> > +++ b/board/solidrun/clearfog_gt_8k/linux-extras.config
> > @@ -0,0 +1,4 @@
> > +CONFIG_MARVELL_PHY=y
> > +CONFIG_SFP=y
> > +CONFIG_NET_DSA=y
> > +CONFIG_NET_DSA_MV88E6XXX=y
>
> So the switch driver is enabled to be built in the kernel image
> itself...
>
> > +Enable the switch (yellow) Ethernet ports
> > +=========================================
> > +
> > +To enable the Clearfog GT-8K internal switch port make sure to load the
> > +'mv88e6xxx' kernel module, and up the switch up-link port (eth2 by default):
> > +
> > + modprobe mv88e6xxx
>
> ... but you tell people to load it as a kernel module ?
>
> This seems weird. Am I missing something ?
The CONFIG_NET_DSA symbol has
depends on BRIDGE || BRIDGE=n
The arm64 defconfig has
CONFIG_BRIDGE=m
So CONFIG_NET_DSA transforms to 'm' in the final kernel configuration.
CONFIG_NET_DSA_MV88E6XXX depends on CONFIG_NET_DSA, so it is set to 'm' as
well.
The mv88e6xxx is a mdio_bus device that does not provide a modalias sysfs node
under /sys/devices. So the S10mdev script does not load it automatically on
boot.
> > diff --git a/configs/solidrun_clearfog_gt_8k_defconfig b/configs/solidrun_clearfog_gt_8k_defconfig
> > new file mode 100644
> > index 000000000000..a44038e66392
> > --- /dev/null
> > +++ b/configs/solidrun_clearfog_gt_8k_defconfig
> > @@ -0,0 +1,46 @@
> > +BR2_aarch64=y
> > +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_1=y
> > +BR2_TARGET_GENERIC_HOSTNAME="clearfog-gt-8k"
> > +BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for SolidRun Clearfog GT-8K"
> > +
> > +# 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/MarvellEmbeddedProcessors/atf-marvell.git"
> > +# This commit corresponds to release armada-18.09.4
> > +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="711ecd32afe465b38052b5ba374c825b158eea18"
> > +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="a80x0_mcbin"
>
> So there is no ATF configuration specifically for the GT-8K platform ?
The Macchiatobin and Clearfog GT-8K look identical as far as ATF is concerned.
Thanks for your review,
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH] board: solidrun: add Clearfog GT-8K
2019-06-19 7:51 ` Baruch Siach
@ 2019-06-19 8:34 ` Jan Kundrát
0 siblings, 0 replies; 5+ messages in thread
From: Jan Kundrát @ 2019-06-19 8:34 UTC (permalink / raw)
To: buildroot
> The CONFIG_NET_DSA symbol has
>
> depends on BRIDGE || BRIDGE=n
>
> The arm64 defconfig has
>
> CONFIG_BRIDGE=m
>
> So CONFIG_NET_DSA transforms to 'm' in the final kernel configuration.
> CONFIG_NET_DSA_MV88E6XXX depends on CONFIG_NET_DSA, so it is set to 'm' as
> well.
>
> The mv88e6xxx is a mdio_bus device that does not provide a
> modalias sysfs node
> under /sys/devices. So the S10mdev script does not load it automatically on
> boot.
Hi Baruch,
my involvement with this platform is limited to just the Clearfog Base
because that's what we're using internally. I therefore cannot really
comment on the patch.
That said, I think that this module vs. built-in is something which can go
to the commit message.
With kind regards,
Jan
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH] board: solidrun: add Clearfog GT-8K
2019-06-16 8:18 [Buildroot] [PATCH] board: solidrun: add Clearfog GT-8K Baruch Siach
2019-06-17 19:20 ` Thomas Petazzoni
@ 2019-06-19 12:00 ` Thomas Petazzoni
1 sibling, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2019-06-19 12:00 UTC (permalink / raw)
To: buildroot
On Sun, 16 Jun 2019 11:18:47 +0300
Baruch Siach <baruch@tkos.co.il> wrote:
> Add support for the SolidRun Armada 8040 based Clearfog GT-8K. This
> board has the same processor as the Macchiatobin, so we can reuse the
> Macchiatobin U-Boot and image definitions.
>
> The kernel fragment enables drivers that are necessary to make
> networking ports work (SFP, Ethernet port, and Ethernet switch).
>
> Cc: Jan Kundr?t <jan.kundrat@cesnet.cz>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
> DEVELOPERS | 2 +
> board/solidrun/clearfog_gt_8k/extlinux.conf | 4 ++
> board/solidrun/clearfog_gt_8k/genimage.cfg | 1 +
> .../clearfog_gt_8k/linux-extras.config | 4 ++
> .../clearfog_gt_8k/post-build-mainline.sh | 1 +
> board/solidrun/clearfog_gt_8k/readme.txt | 61 +++++++++++++++++++
> .../clearfog_gt_8k/uboot-fragment.config | 1 +
> configs/solidrun_clearfog_gt_8k_defconfig | 46 ++++++++++++++
> 8 files changed, 120 insertions(+)
> create mode 100644 board/solidrun/clearfog_gt_8k/extlinux.conf
> create mode 120000 board/solidrun/clearfog_gt_8k/genimage.cfg
> create mode 100644 board/solidrun/clearfog_gt_8k/linux-extras.config
> create mode 120000 board/solidrun/clearfog_gt_8k/post-build-mainline.sh
> create mode 100644 board/solidrun/clearfog_gt_8k/readme.txt
> create mode 120000 board/solidrun/clearfog_gt_8k/uboot-fragment.config
> create mode 100644 configs/solidrun_clearfog_gt_8k_defconfig
Thanks Baruch for the feedback on my questions, it answered all of
them, so I've applied to master. Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-06-19 12:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-16 8:18 [Buildroot] [PATCH] board: solidrun: add Clearfog GT-8K Baruch Siach
2019-06-17 19:20 ` Thomas Petazzoni
2019-06-19 7:51 ` Baruch Siach
2019-06-19 8:34 ` Jan Kundrát
2019-06-19 12:00 ` Thomas Petazzoni
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.