Re: [PATCH 11/13] board: synquacer: Add DeveloperBox 96boards EE support

On Wed, Apr 14, 2021 at 12:31:21AM +0900, Masami Hiramatsu wrote:
Add the DeveloperBox 96boards EE support. This board is also known as Socionext SynQuacer E-Series. It contians one "SC2A11" SoC, which has 24-cores of arm Cortex-A53, and 4 DDR3 slots, 3 PCIe slots (1 4x port and 2 1x ports which are expanded via PCIe bridge chip), 2 USB 3.0 ports and 2 USB 2.0 ports, 2 SATA ports and 1 GbE, 64MB NOR flash and 8GB eMMC on standard MicroATX Form Factor.
For more information, see this page; https://www.96boards.org/product/developerbox/
Signed-off-by: Masami Hiramatsu masami.hiramatsu@linaro.org
[snip]
diff --git a/arch/arm/include/asm/arch-sc2a11/gpio.h b/arch/arm/include/asm/arch-sc2a11/gpio.h new file mode 100644 index 0000000000..6779803080 --- /dev/null +++ b/arch/arm/include/asm/arch-sc2a11/gpio.h @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/*
- Copyright 2021 (C) Linaro Ltd.
- */
+#ifndef __ASM_ARCH_SC2A11_GPIO_H +#define __ASM_ARCH_SC2A11_GPIO_H
+#endif
Please update the list in arch/arm/include/asm/gpio.h to not look for asm/arch/gpio.h on this SoC, thanks.
diff --git a/board/socionext/developerbox/README b/board/socionext/developerbox/README new file mode 100644 index 0000000000..bb121002dd --- /dev/null +++ b/board/socionext/developerbox/README
This needs to be in rST form and under doc/board/ now.
[snip]
+/*
- arguments for booti command
- */
+#define LINUX_BASIC_BOOTARGS "basic_bootargs='" \
"console=ttyAMA0," __stringify(CONFIG_BAUDRATE) " " \
"rootwait verbose'\0"
+/* kernel:mmcblk0p1(ext2), rootfs:mmcblk0p1(ext2), devtree:mmcblk0p1(ext2) */ +#define LINUX_MMCBOOTCOMMAND1 \
- "mmcboot1=echo 'Boot from MMC (ext2 single rootfs)' ; " \
"mmc dev 0 &&" \
"ext2load mmc 0:1 ${kernel_addr} /boot/Image && " \
"ext2load mmc 0:1 ${fdt_addr_base} /boot/DeveloperBox.dtb && " \
"setenv fdt_addr ${fdt_addr_base} &&" \
"setenv fdt_size ${filesize} &&" \
"setenv bootargs ${mmc_bootargs1} && " \
"booti ${kernel_addr} - ${fdt_addr}\0" \
- "mmc_bootargs1=" \
"root=/dev/mmcblk0p1 rw dtb=0x${fdt_addr},0x${fdt_size} " \
"${basic_bootargs} \0"
You are strongly encouraged to use the generic distro boot features instead. This may require a little work to handle the device tree.

Hello Tom,
2021年4月14日(水) 2:47 Tom Rini trini@konsulko.com:
On Wed, Apr 14, 2021 at 12:31:21AM +0900, Masami Hiramatsu wrote:
Add the DeveloperBox 96boards EE support. This board is also known as Socionext SynQuacer E-Series. It contians one "SC2A11" SoC, which has 24-cores of arm Cortex-A53, and 4 DDR3 slots, 3 PCIe slots (1 4x port and 2 1x ports which are expanded via PCIe bridge chip), 2 USB 3.0 ports and 2 USB 2.0 ports, 2 SATA ports and 1 GbE, 64MB NOR flash and 8GB eMMC on standard MicroATX Form Factor.
For more information, see this page; https://www.96boards.org/product/developerbox/
Signed-off-by: Masami Hiramatsu masami.hiramatsu@linaro.org
[snip]
diff --git a/arch/arm/include/asm/arch-sc2a11/gpio.h b/arch/arm/include/asm/arch-sc2a11/gpio.h new file mode 100644 index 0000000000..6779803080 --- /dev/null +++ b/arch/arm/include/asm/arch-sc2a11/gpio.h @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/*
- Copyright 2021 (C) Linaro Ltd.
- */
+#ifndef __ASM_ARCH_SC2A11_GPIO_H +#define __ASM_ARCH_SC2A11_GPIO_H
+#endif
Please update the list in arch/arm/include/asm/gpio.h to not look for asm/arch/gpio.h on this SoC, thanks.
Ah, I missed that. OK, I'll change arch/arm/include/asm/gpio.h.
BTW, isn't it better to introduce CONFIG_ARCH_GENERIC_GPIO instead of updating the header?
diff --git a/board/socionext/developerbox/README b/board/socionext/developerbox/README new file mode 100644 index 0000000000..bb121002dd --- /dev/null +++ b/board/socionext/developerbox/README
This needs to be in rST form and under doc/board/ now.
[snip]
+/*
- arguments for booti command
- */
+#define LINUX_BASIC_BOOTARGS "basic_bootargs='" \
"console=ttyAMA0," __stringify(CONFIG_BAUDRATE) " " \
"rootwait verbose'\0"
+/* kernel:mmcblk0p1(ext2), rootfs:mmcblk0p1(ext2), devtree:mmcblk0p1(ext2) */ +#define LINUX_MMCBOOTCOMMAND1 \
"mmcboot1=echo 'Boot from MMC (ext2 single rootfs)' ; " \
"mmc dev 0 &&" \
"ext2load mmc 0:1 ${kernel_addr} /boot/Image && " \
"ext2load mmc 0:1 ${fdt_addr_base} /boot/DeveloperBox.dtb && " \
"setenv fdt_addr ${fdt_addr_base} &&" \
"setenv fdt_size ${filesize} &&" \
"setenv bootargs ${mmc_bootargs1} && " \
"booti ${kernel_addr} - ${fdt_addr}\0" \
"mmc_bootargs1=" \
"root=/dev/mmcblk0p1 rw dtb=0x${fdt_addr},0x${fdt_size} " \
"${basic_bootargs} \0"
You are strongly encouraged to use the generic distro boot features instead. This may require a little work to handle the device tree.
OK, anyway I can just drop it, because this platform is expected to use UEFI boot (the DeveloperBox is shipped with EDK2). I left this just for reference.
Thank you,

On Wed, Apr 14, 2021 at 10:12:42AM +0900, Masami Hiramatsu wrote:
Hello Tom,
2021年4月14日(水) 2:47 Tom Rini trini@konsulko.com:
On Wed, Apr 14, 2021 at 12:31:21AM +0900, Masami Hiramatsu wrote:
Add the DeveloperBox 96boards EE support. This board is also known as Socionext SynQuacer E-Series. It contians one "SC2A11" SoC, which has 24-cores of arm Cortex-A53, and 4 DDR3 slots, 3 PCIe slots (1 4x port and 2 1x ports which are expanded via PCIe bridge chip), 2 USB 3.0 ports and 2 USB 2.0 ports, 2 SATA ports and 1 GbE, 64MB NOR flash and 8GB eMMC on standard MicroATX Form Factor.
For more information, see this page; https://www.96boards.org/product/developerbox/
Signed-off-by: Masami Hiramatsu masami.hiramatsu@linaro.org
[snip]
diff --git a/arch/arm/include/asm/arch-sc2a11/gpio.h b/arch/arm/include/asm/arch-sc2a11/gpio.h new file mode 100644 index 0000000000..6779803080 --- /dev/null +++ b/arch/arm/include/asm/arch-sc2a11/gpio.h @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/*
- Copyright 2021 (C) Linaro Ltd.
- */
+#ifndef __ASM_ARCH_SC2A11_GPIO_H +#define __ASM_ARCH_SC2A11_GPIO_H
+#endif
Please update the list in arch/arm/include/asm/gpio.h to not look for asm/arch/gpio.h on this SoC, thanks.
Ah, I missed that. OK, I'll change arch/arm/include/asm/gpio.h.
BTW, isn't it better to introduce CONFIG_ARCH_GENERIC_GPIO instead of updating the header?
diff --git a/board/socionext/developerbox/README b/board/socionext/developerbox/README new file mode 100644 index 0000000000..bb121002dd --- /dev/null +++ b/board/socionext/developerbox/README
This needs to be in rST form and under doc/board/ now.
[snip]
+/*
- arguments for booti command
- */
+#define LINUX_BASIC_BOOTARGS "basic_bootargs='" \
"console=ttyAMA0," __stringify(CONFIG_BAUDRATE) " " \
"rootwait verbose'\0"
+/* kernel:mmcblk0p1(ext2), rootfs:mmcblk0p1(ext2), devtree:mmcblk0p1(ext2) */ +#define LINUX_MMCBOOTCOMMAND1 \
"mmcboot1=echo 'Boot from MMC (ext2 single rootfs)' ; " \
"mmc dev 0 &&" \
"ext2load mmc 0:1 ${kernel_addr} /boot/Image && " \
"ext2load mmc 0:1 ${fdt_addr_base} /boot/DeveloperBox.dtb && " \
"setenv fdt_addr ${fdt_addr_base} &&" \
"setenv fdt_size ${filesize} &&" \
"setenv bootargs ${mmc_bootargs1} && " \
"booti ${kernel_addr} - ${fdt_addr}\0" \
"mmc_bootargs1=" \
"root=/dev/mmcblk0p1 rw dtb=0x${fdt_addr},0x${fdt_size} " \
"${basic_bootargs} \0"
You are strongly encouraged to use the generic distro boot features instead. This may require a little work to handle the device tree.
OK, anyway I can just drop it, because this platform is expected to use UEFI boot (the DeveloperBox is shipped with EDK2). I left this just for reference.
So why not define UEFI load options (BOOTxxxx) and use UEFI boot manager ("bootefi bootmgr")? That is the way how UEFI (at least boot manager) boots the kernel.
-Takahiro Akashi
Thank you,
-- Masami Hiramatsu

Hi Takahiro,
2021年4月14日(水) 10:27 Takahiro Akashi takahiro.akashi@linaro.org:
On Wed, Apr 14, 2021 at 10:12:42AM +0900, Masami Hiramatsu wrote:
Hello Tom,
2021年4月14日(水) 2:47 Tom Rini trini@konsulko.com:
On Wed, Apr 14, 2021 at 12:31:21AM +0900, Masami Hiramatsu wrote:
Add the DeveloperBox 96boards EE support. This board is also known as Socionext SynQuacer E-Series. It contians one "SC2A11" SoC, which has 24-cores of arm Cortex-A53, and 4 DDR3 slots, 3 PCIe slots (1 4x port and 2 1x ports which are expanded via PCIe bridge chip), 2 USB 3.0 ports and 2 USB 2.0 ports, 2 SATA ports and 1 GbE, 64MB NOR flash and 8GB eMMC on standard MicroATX Form Factor.
For more information, see this page; https://www.96boards.org/product/developerbox/
Signed-off-by: Masami Hiramatsu masami.hiramatsu@linaro.org
[snip]
diff --git a/arch/arm/include/asm/arch-sc2a11/gpio.h b/arch/arm/include/asm/arch-sc2a11/gpio.h new file mode 100644 index 0000000000..6779803080 --- /dev/null +++ b/arch/arm/include/asm/arch-sc2a11/gpio.h @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/*
- Copyright 2021 (C) Linaro Ltd.
- */
+#ifndef __ASM_ARCH_SC2A11_GPIO_H +#define __ASM_ARCH_SC2A11_GPIO_H
+#endif
Please update the list in arch/arm/include/asm/gpio.h to not look for asm/arch/gpio.h on this SoC, thanks.
Ah, I missed that. OK, I'll change arch/arm/include/asm/gpio.h.
BTW, isn't it better to introduce CONFIG_ARCH_GENERIC_GPIO instead of updating the header?
diff --git a/board/socionext/developerbox/README b/board/socionext/developerbox/README new file mode 100644 index 0000000000..bb121002dd --- /dev/null +++ b/board/socionext/developerbox/README
This needs to be in rST form and under doc/board/ now.
[snip]
+/*
- arguments for booti command
- */
+#define LINUX_BASIC_BOOTARGS "basic_bootargs='" \
"console=ttyAMA0," __stringify(CONFIG_BAUDRATE) " " \
"rootwait verbose'\0"
+/* kernel:mmcblk0p1(ext2), rootfs:mmcblk0p1(ext2), devtree:mmcblk0p1(ext2) */ +#define LINUX_MMCBOOTCOMMAND1 \
"mmcboot1=echo 'Boot from MMC (ext2 single rootfs)' ; " \
"mmc dev 0 &&" \
"ext2load mmc 0:1 ${kernel_addr} /boot/Image && " \
"ext2load mmc 0:1 ${fdt_addr_base} /boot/DeveloperBox.dtb && " \
"setenv fdt_addr ${fdt_addr_base} &&" \
"setenv fdt_size ${filesize} &&" \
"setenv bootargs ${mmc_bootargs1} && " \
"booti ${kernel_addr} - ${fdt_addr}\0" \
"mmc_bootargs1=" \
"root=/dev/mmcblk0p1 rw dtb=0x${fdt_addr},0x${fdt_size} " \
"${basic_bootargs} \0"
You are strongly encouraged to use the generic distro boot features instead. This may require a little work to handle the device tree.
OK, anyway I can just drop it, because this platform is expected to use UEFI boot (the DeveloperBox is shipped with EDK2). I left this just for reference.
So why not define UEFI load options (BOOTxxxx) and use UEFI boot manager ("bootefi bootmgr")? That is the way how UEFI (at least boot manager) boots the kernel.
Good point! Actually, I'm not sure how to define the BOOTxxxx in config.h (I only know how to include efivars file when build). Could you tell me how to do it? I would like to rewrite the default boot commands.
Thank you,

On Wed, Apr 14, 2021 at 11:06:36AM +0900, Masami Hiramatsu wrote:
Hi Takahiro,
2021年4月14日(水) 10:27 Takahiro Akashi takahiro.akashi@linaro.org:
On Wed, Apr 14, 2021 at 10:12:42AM +0900, Masami Hiramatsu wrote:
Hello Tom,
2021年4月14日(水) 2:47 Tom Rini trini@konsulko.com:
On Wed, Apr 14, 2021 at 12:31:21AM +0900, Masami Hiramatsu wrote:
Add the DeveloperBox 96boards EE support. This board is also known as Socionext SynQuacer E-Series. It contians one "SC2A11" SoC, which has 24-cores of arm Cortex-A53, and 4 DDR3 slots, 3 PCIe slots (1 4x port and 2 1x ports which are expanded via PCIe bridge chip), 2 USB 3.0 ports and 2 USB 2.0 ports, 2 SATA ports and 1 GbE, 64MB NOR flash and 8GB eMMC on standard MicroATX Form Factor.
For more information, see this page; https://www.96boards.org/product/developerbox/
Signed-off-by: Masami Hiramatsu masami.hiramatsu@linaro.org
[snip]
diff --git a/arch/arm/include/asm/arch-sc2a11/gpio.h b/arch/arm/include/asm/arch-sc2a11/gpio.h new file mode 100644 index 0000000000..6779803080 --- /dev/null +++ b/arch/arm/include/asm/arch-sc2a11/gpio.h @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/*
- Copyright 2021 (C) Linaro Ltd.
- */
+#ifndef __ASM_ARCH_SC2A11_GPIO_H +#define __ASM_ARCH_SC2A11_GPIO_H
+#endif
Please update the list in arch/arm/include/asm/gpio.h to not look for asm/arch/gpio.h on this SoC, thanks.
Ah, I missed that. OK, I'll change arch/arm/include/asm/gpio.h.
BTW, isn't it better to introduce CONFIG_ARCH_GENERIC_GPIO instead of updating the header?
diff --git a/board/socionext/developerbox/README b/board/socionext/developerbox/README new file mode 100644 index 0000000000..bb121002dd --- /dev/null +++ b/board/socionext/developerbox/README
This needs to be in rST form and under doc/board/ now.
[snip]
+/*
- arguments for booti command
- */
+#define LINUX_BASIC_BOOTARGS "basic_bootargs='" \
"console=ttyAMA0," __stringify(CONFIG_BAUDRATE) " " \
"rootwait verbose'\0"
+/* kernel:mmcblk0p1(ext2), rootfs:mmcblk0p1(ext2), devtree:mmcblk0p1(ext2) */ +#define LINUX_MMCBOOTCOMMAND1 \
"mmcboot1=echo 'Boot from MMC (ext2 single rootfs)' ; " \
"mmc dev 0 &&" \
"ext2load mmc 0:1 ${kernel_addr} /boot/Image && " \
"ext2load mmc 0:1 ${fdt_addr_base} /boot/DeveloperBox.dtb && " \
"setenv fdt_addr ${fdt_addr_base} &&" \
"setenv fdt_size ${filesize} &&" \
"setenv bootargs ${mmc_bootargs1} && " \
"booti ${kernel_addr} - ${fdt_addr}\0" \
"mmc_bootargs1=" \
"root=/dev/mmcblk0p1 rw dtb=0x${fdt_addr},0x${fdt_size} " \
"${basic_bootargs} \0"
You are strongly encouraged to use the generic distro boot features instead. This may require a little work to handle the device tree.
OK, anyway I can just drop it, because this platform is expected to use UEFI boot (the DeveloperBox is shipped with EDK2). I left this just for reference.
So why not define UEFI load options (BOOTxxxx) and use UEFI boot manager ("bootefi bootmgr")? That is the way how UEFI (at least boot manager) boots the kernel.
Good point! Actually, I'm not sure how to define the BOOTxxxx in config.h (I only know how to include efivars file when build). Could you tell me how to do it? I would like to rewrite the default boot commands.
For example, => efidebug boot add 1 USBBOOT usb 0:1 /EFI/BOOT/bootaa64.efi <boot args> => efidebug boot add 2 MMCBOOT mmc 0:1 /EFI/BOOT/bootaa64.efi <boot args> => efidebug boot order 1 2 => bootefi bootmgr
Since "BOOTxxx" are non-volatile variables, we don't have to set them again once those commands are run.
But distro_bootcmd can also detect and try to boot "bootaa64.efi" anyway. (I'm not sure about the order of devices to detect though.)
-Takahiro Akashi
Thank you,
-- Masami Hiramatsu

Hi Takahiro,
2021年4月14日(水) 13:48 Takahiro Akashi takahiro.akashi@linaro.org:
So why not define UEFI load options (BOOTxxxx) and use UEFI boot manager ("bootefi bootmgr")? That is the way how UEFI (at least boot manager) boots the kernel.
Good point! Actually, I'm not sure how to define the BOOTxxxx in config.h (I only know how to include efivars file when build). Could you tell me how to do it? I would like to rewrite the default boot commands.
For example, => efidebug boot add 1 USBBOOT usb 0:1 /EFI/BOOT/bootaa64.efi <boot args> => efidebug boot add 2 MMCBOOT mmc 0:1 /EFI/BOOT/bootaa64.efi <boot args> => efidebug boot order 1 2 => bootefi bootmgr
Hmm, but this can not be embedded in the build process, can this?
Since "BOOTxxx" are non-volatile variables, we don't have to set them again once those commands are run.
What is the default behavior of "bootefi bootmgr" if there is no BOOTxxxx is set? If it just do nothing and exit, I think I can add it to the top of CONFIG_BOOTCOMMAND so that U-Boot can try it first. (BOOTxxxx will be set by user after boot)
But distro_bootcmd can also detect and try to boot "bootaa64.efi" anyway. (I'm not sure about the order of devices to detect though.)
Hmm, interesting. OK, I'll try to enable distro_bootcmd.
Thank you,
-Takahiro Akashi
Thank you,
-- Masami Hiramatsu

On Wed, Apr 14, 2021 at 03:29:23PM +0900, Masami Hiramatsu wrote:
Hi Takahiro,
2021年4月14日(水) 13:48 Takahiro Akashi takahiro.akashi@linaro.org:
So why not define UEFI load options (BOOTxxxx) and use UEFI boot manager ("bootefi bootmgr")? That is the way how UEFI (at least boot manager) boots the kernel.
Good point! Actually, I'm not sure how to define the BOOTxxxx in config.h (I only know how to include efivars file when build). Could you tell me how to do it? I would like to rewrite the default boot commands.
For example, => efidebug boot add 1 USBBOOT usb 0:1 /EFI/BOOT/bootaa64.efi <boot args> => efidebug boot add 2 MMCBOOT mmc 0:1 /EFI/BOOT/bootaa64.efi <boot args> => efidebug boot order 1 2 => bootefi bootmgr
Hmm, but this can not be embedded in the build process, can this?
Probably there are a couple of ways; You may put them in "pre_boot_environment_command" if you don't mind :)
But it would be best to run them as part of OS installation process. Or you may want to provide a default efivars file(?).
Since "BOOTxxx" are non-volatile variables, we don't have to set them again once those commands are run.
What is the default behavior of "bootefi bootmgr" if there is no BOOTxxxx is set?
Nothing will happen.
If it just do nothing and exit, I think I can add it to the top of CONFIG_BOOTCOMMAND so that U-Boot can try it first. (BOOTxxxx will be set by user after boot)
But distro_bootcmd can also detect and try to boot "bootaa64.efi" anyway. (I'm not sure about the order of devices to detect though.)
Hmm, interesting. OK, I'll try to enable distro_bootcmd.
I'm pretty sure it will work.
-Takahiro Akashi
Thank you,
-Takahiro Akashi
Thank you,
-- Masami Hiramatsu
-- Masami Hiramatsu

On Wed, Apr 14, 2021 at 10:12:42AM +0900, Masami Hiramatsu wrote:
Hello Tom,
2021年4月14日(水) 2:47 Tom Rini trini@konsulko.com:
On Wed, Apr 14, 2021 at 12:31:21AM +0900, Masami Hiramatsu wrote:
Add the DeveloperBox 96boards EE support. This board is also known as Socionext SynQuacer E-Series. It contians one "SC2A11" SoC, which has 24-cores of arm Cortex-A53, and 4 DDR3 slots, 3 PCIe slots (1 4x port and 2 1x ports which are expanded via PCIe bridge chip), 2 USB 3.0 ports and 2 USB 2.0 ports, 2 SATA ports and 1 GbE, 64MB NOR flash and 8GB eMMC on standard MicroATX Form Factor.
For more information, see this page; https://www.96boards.org/product/developerbox/
Signed-off-by: Masami Hiramatsu masami.hiramatsu@linaro.org
[snip]
diff --git a/arch/arm/include/asm/arch-sc2a11/gpio.h b/arch/arm/include/asm/arch-sc2a11/gpio.h new file mode 100644 index 0000000000..6779803080 --- /dev/null +++ b/arch/arm/include/asm/arch-sc2a11/gpio.h @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/*
- Copyright 2021 (C) Linaro Ltd.
- */
+#ifndef __ASM_ARCH_SC2A11_GPIO_H +#define __ASM_ARCH_SC2A11_GPIO_H
+#endif
Please update the list in arch/arm/include/asm/gpio.h to not look for asm/arch/gpio.h on this SoC, thanks.
Ah, I missed that. OK, I'll change arch/arm/include/asm/gpio.h.
BTW, isn't it better to introduce CONFIG_ARCH_GENERIC_GPIO instead of updating the header?
Such a clean-up would be appreciated.
participants (3)
-
Masami Hiramatsu
-
Takahiro Akashi
-
Tom Rini