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

Takahiro Akashi takahiro.akashi at linaro.org
Wed Apr 14 06:48:39 CEST 2021


On Wed, Apr 14, 2021 at 11:06:36AM +0900, Masami Hiramatsu wrote:
> Hi Takahiro,
> 
> 2021年4月14日(水) 10:27 Takahiro Akashi <takahiro.akashi at 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 at 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 at 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


More information about the U-Boot mailing list