diff mbox series

[1/3] configs/orangepi_pc2: add board support

Message ID 20230315091729.1771792-1-javad321javad@gmail.com
State Accepted
Headers show
Series [1/3] configs/orangepi_pc2: add board support | expand

Commit Message

Javad Rahimipetroudi March 15, 2023, 9:17 a.m. UTC
This patch adds requried configuration for OrangePI PC2 board.
It was supproted before, however due to problems in
building Arm Trusted PLatform, it was removed in
 commit "eeede611f81d8f83b72e4a6671cd7d1e46b266b0"

Signed-off-by: Javad Rahimi <javad321javad@gmail.com>
---
 configs/orangepi_pc2_defconfig | 36 ++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 configs/orangepi_pc2_defconfig

Comments

Thomas Petazzoni Aug. 9, 2023, 9:38 p.m. UTC | #1
Hello Javad,

On Wed, 15 Mar 2023 12:47:27 +0330
Javad Rahimi <javad321javad@gmail.com> wrote:

> This patch adds requried configuration for OrangePI PC2 board.
> It was supproted before, however due to problems in
> building Arm Trusted PLatform, it was removed in
>  commit "eeede611f81d8f83b72e4a6671cd7d1e46b266b0"
> 
> Signed-off-by: Javad Rahimi <javad321javad@gmail.com>
> ---
>  configs/orangepi_pc2_defconfig | 36 ++++++++++++++++++++++++++++++++++
>  1 file changed, 36 insertions(+)
>  create mode 100644 configs/orangepi_pc2_defconfig

Sorry for the long delay in getting back to you. I have applied your
patch series, but after squashing the 3 patches together in one commit.
Splitting it into 3 didn't make sense in this case.

However, could you work on updating the version of the components in
the defconfig? Building Linux 5.16, TF-A 2.5 and U-Boot 2022.01 is
quite old. Could you submit a followed-up that updates this defconfig
to newer Linux, newer TF-A and newer U-Boot? Please make sure to base
your patch on our "next" branch, as I merged your contribution into
this "next" branch.

  https://gitlab.com/buildroot.org/buildroot/-/commit/930a6d9470efc5c46bcff358947c050540555a6c

Thanks a lot!

Thomas
Javad Rahimipetroudi Aug. 14, 2023, 6:07 a.m. UTC | #2
Hi Thomas,

On Thu, Aug 10, 2023 at 1:08 AM Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> Hello Javad,
>
> On Wed, 15 Mar 2023 12:47:27 +0330
> Javad Rahimi <javad321javad@gmail.com> wrote:
>
> > This patch adds requried configuration for OrangePI PC2 board.
> > It was supproted before, however due to problems in
> > building Arm Trusted PLatform, it was removed in
> >  commit "eeede611f81d8f83b72e4a6671cd7d1e46b266b0"
> >
> > Signed-off-by: Javad Rahimi <javad321javad@gmail.com>
> > ---
> >  configs/orangepi_pc2_defconfig | 36 ++++++++++++++++++++++++++++++++++
> >  1 file changed, 36 insertions(+)
> >  create mode 100644 configs/orangepi_pc2_defconfig
>
> Sorry for the long delay in getting back to you. I have applied your
> patch series, but after squashing the 3 patches together in one commit.
> Splitting it into 3 didn't make sense in this case.
>
> However, could you work on updating the version of the components in
> the defconfig? Building Linux 5.16, TF-A 2.5 and U-Boot 2022.01 is
> quite old. Could you submit a followed-up that updates this defconfig
> to newer Linux, newer TF-A and newer U-Boot? Please make sure to base
> your patch on our "next" branch, as I merged your contribution into
> this "next" branch.
>
>   https://gitlab.com/buildroot.org/buildroot/-/commit/930a6d9470efc5c46bcff358947c050540555a6c
>
Sure, I have updated the kernel, TF-A and Uboot.
However, I have faced a problem with "/dev" management after upgrading
the packages. When it is in "Dynamic using devtmpfs only" mode, no
kernel module is loaded after boot. But in "Dynamic using devtmpfs +
mdev" everything works fine. Can I put it in this mode?
> Thanks a lot!
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com

Thanks,
Javad
Thomas Petazzoni Aug. 17, 2023, 10:25 a.m. UTC | #3
On Mon, 14 Aug 2023 09:33:59 +0330
Javad Rahimipetroudi <javad321javad@gmail.com> wrote:

> Sure, I have updated the kernel, TF-A and Uboot.
> However, I have faced a problem with "/dev" management after upgrading
> the packages. When it is in "Dynamic using devtmpfs only" mode, no
> kernel module is loaded after boot. But in "Dynamic using devtmpfs +
> mdev" everything works fine. Can I put it in this mode?

Well, this is normal, devtmpfs is only a virtual filesystem that
creates entries in /dev. It is not involved in automatic module
loading. If you want automatic module loading, you need either mdev or
udev/eudev. And it's indeed fine to enable mdev in defconfigs that need
it.

Best regards,

Thomas
Javad Rahimipetroudi Aug. 17, 2023, 1:19 p.m. UTC | #4
On Thu, Aug 17, 2023 at 1:55 PM Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> On Mon, 14 Aug 2023 09:33:59 +0330
> Javad Rahimipetroudi <javad321javad@gmail.com> wrote:
>
> > Sure, I have updated the kernel, TF-A and Uboot.
> > However, I have faced a problem with "/dev" management after upgrading
> > the packages. When it is in "Dynamic using devtmpfs only" mode, no
> > kernel module is loaded after boot. But in "Dynamic using devtmpfs +
> > mdev" everything works fine. Can I put it in this mode?
>
> Well, this is normal, devtmpfs is only a virtual filesystem that
> creates entries in /dev. It is not involved in automatic module
> loading. If you want automatic module loading, you need either mdev or
> udev/eudev. And it's indeed fine to enable mdev in defconfigs that need
> it.
Thanks a lot,
 I have added it to the defconfig and committed the patches.

Best regards,
Javad
>
> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, co-owner and CEO, Bootlin
> Embedded Linux and Kernel engineering and training
> https://bootlin.com
diff mbox series

Patch

diff --git a/configs/orangepi_pc2_defconfig b/configs/orangepi_pc2_defconfig
new file mode 100644
index 0000000000..3de067ae54
--- /dev/null
+++ b/configs/orangepi_pc2_defconfig
@@ -0,0 +1,36 @@ 
+BR2_aarch64=y
+BR2_ARM_FPU_VFPV4=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_16=y
+BR2_TARGET_GENERIC_ISSUE="Welcome to Orangepi PC2"
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/orangepi/common/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c $(BINARIES_DIR)/genimage.cfg"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.16.1"
+BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun50i-h5-orangepi-pc2"
+BR2_LINUX_KERNEL_DTB_KEEP_DIRNAME=y
+BR2_LINUX_KERNEL_INSTALL_TARGET=y
+BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_SIZE="128M"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.5"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="sun50i_a64"
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2022.01"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="orangepi_pc2"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y
+BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
+BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y
+BR2_TARGET_UBOOT_SPL=y
+BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin"
+BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="SCP=/dev/null"
+BR2_PACKAGE_HOST_GENIMAGE=y