All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] board/licheepi_zero: move board files to their own directory
@ 2023-10-04 20:07 Francois Dugast
  0 siblings, 0 replies; 7+ messages in thread
From: Francois Dugast @ 2023-10-04 20:07 UTC (permalink / raw)
  To: buildroot; +Cc: Michel Stempin, Francois Dugast

Group files for board licheepi_zero under a new directory. This is
to prepare for a new board also coming to the licheepi directory.

Signed-off-by: Francois Dugast <francois.dugast.foss@gmail.com>
---
 board/licheepi/{ => licheepi_zero}/boot.cmd     | 0
 board/licheepi/{ => licheepi_zero}/genimage.cfg | 0
 board/licheepi/{ => licheepi_zero}/readme.txt   | 0
 configs/licheepi_zero_defconfig                 | 4 ++--
 4 files changed, 2 insertions(+), 2 deletions(-)
 rename board/licheepi/{ => licheepi_zero}/boot.cmd (100%)
 rename board/licheepi/{ => licheepi_zero}/genimage.cfg (100%)
 rename board/licheepi/{ => licheepi_zero}/readme.txt (100%)

diff --git a/board/licheepi/boot.cmd b/board/licheepi/licheepi_zero/boot.cmd
similarity index 100%
rename from board/licheepi/boot.cmd
rename to board/licheepi/licheepi_zero/boot.cmd
diff --git a/board/licheepi/genimage.cfg b/board/licheepi/licheepi_zero/genimage.cfg
similarity index 100%
rename from board/licheepi/genimage.cfg
rename to board/licheepi/licheepi_zero/genimage.cfg
diff --git a/board/licheepi/readme.txt b/board/licheepi/licheepi_zero/readme.txt
similarity index 100%
rename from board/licheepi/readme.txt
rename to board/licheepi/licheepi_zero/readme.txt
diff --git a/configs/licheepi_zero_defconfig b/configs/licheepi_zero_defconfig
index 0d3115a996..c8f74a7f04 100644
--- a/configs/licheepi_zero_defconfig
+++ b/configs/licheepi_zero_defconfig
@@ -12,7 +12,7 @@ BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for the LicheePi Zero"
 BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
 BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200=y
 BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
-BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/licheepi/genimage.cfg"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/licheepi/licheepi_zero/genimage.cfg"
 
 # Kernel
 BR2_LINUX_KERNEL=y
@@ -45,7 +45,7 @@ BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
 BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-sunxi-with-spl.bin"
 BR2_PACKAGE_HOST_UBOOT_TOOLS=y
 BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT=y
-BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE="board/licheepi/boot.cmd"
+BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE="board/licheepi/licheepi_zero/boot.cmd"
 
 # Required host utilities for building an SDCard image
 BR2_PACKAGE_HOST_DOSFSTOOLS=y
-- 
2.30.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH 1/2] board/licheepi_zero: move board files to their own directory
@ 2023-10-27 11:46 Francois Dugast
  2023-10-27 11:47 ` [Buildroot] [PATCH 2/2] board/licheepi/licheepi_nano: new board Francois Dugast
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Francois Dugast @ 2023-10-27 11:46 UTC (permalink / raw)
  To: buildroot; +Cc: Michel Stempin, Francois Dugast

Group files for board licheepi_zero under a new directory. This is
to prepare for a new board also coming to the licheepi directory.

Signed-off-by: Francois Dugast <francois.dugast.foss@gmail.com>
---
 board/licheepi/{ => licheepi_zero}/boot.cmd     | 0
 board/licheepi/{ => licheepi_zero}/genimage.cfg | 0
 board/licheepi/{ => licheepi_zero}/readme.txt   | 0
 configs/licheepi_zero_defconfig                 | 4 ++--
 4 files changed, 2 insertions(+), 2 deletions(-)
 rename board/licheepi/{ => licheepi_zero}/boot.cmd (100%)
 rename board/licheepi/{ => licheepi_zero}/genimage.cfg (100%)
 rename board/licheepi/{ => licheepi_zero}/readme.txt (100%)

diff --git a/board/licheepi/boot.cmd b/board/licheepi/licheepi_zero/boot.cmd
similarity index 100%
rename from board/licheepi/boot.cmd
rename to board/licheepi/licheepi_zero/boot.cmd
diff --git a/board/licheepi/genimage.cfg b/board/licheepi/licheepi_zero/genimage.cfg
similarity index 100%
rename from board/licheepi/genimage.cfg
rename to board/licheepi/licheepi_zero/genimage.cfg
diff --git a/board/licheepi/readme.txt b/board/licheepi/licheepi_zero/readme.txt
similarity index 100%
rename from board/licheepi/readme.txt
rename to board/licheepi/licheepi_zero/readme.txt
diff --git a/configs/licheepi_zero_defconfig b/configs/licheepi_zero_defconfig
index 0d3115a996..c8f74a7f04 100644
--- a/configs/licheepi_zero_defconfig
+++ b/configs/licheepi_zero_defconfig
@@ -12,7 +12,7 @@ BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for the LicheePi Zero"
 BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
 BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200=y
 BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
-BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/licheepi/genimage.cfg"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/licheepi/licheepi_zero/genimage.cfg"
 
 # Kernel
 BR2_LINUX_KERNEL=y
@@ -45,7 +45,7 @@ BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
 BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-sunxi-with-spl.bin"
 BR2_PACKAGE_HOST_UBOOT_TOOLS=y
 BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT=y
-BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE="board/licheepi/boot.cmd"
+BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE="board/licheepi/licheepi_zero/boot.cmd"
 
 # Required host utilities for building an SDCard image
 BR2_PACKAGE_HOST_DOSFSTOOLS=y
-- 
2.30.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH 2/2] board/licheepi/licheepi_nano: new board
  2023-10-27 11:46 [Buildroot] [PATCH 1/2] board/licheepi_zero: move board files to their own directory Francois Dugast
@ 2023-10-27 11:47 ` Francois Dugast
  2023-10-29 18:49   ` Yann E. MORIN
  2023-10-29 18:45 ` [Buildroot] [PATCH 1/2] board/licheepi_zero: move board files to their own directory Yann E. MORIN
  2023-11-04 18:38 ` Thomas Petazzoni via buildroot
  2 siblings, 1 reply; 7+ messages in thread
From: Francois Dugast @ 2023-10-27 11:47 UTC (permalink / raw)
  To: buildroot; +Cc: Michel Stempin, Francois Dugast

Add support for the LicheePi Nano with:
- U-Boot 2023.04
- Linux current latest version

Board homepage: https://linux-sunxi.org/LicheePi_Nano

linux.fragment is required to disable some features in order
to keep the kernel size small, otherwise the board does not
boot due to limited memory. See note in readme.txt.

Signed-off-by: Francois Dugast <francois.dugast.foss@gmail.com>
---
 board/licheepi/licheepi_nano/genimage.cfg   | 33 ++++++++
 board/licheepi/licheepi_nano/linux.fragment | 11 +++
 board/licheepi/licheepi_nano/readme.txt     | 84 +++++++++++++++++++++
 board/licheepi/licheepi_nano/uboot.fragment |  3 +
 configs/licheepi_nano_defconfig             | 43 +++++++++++
 5 files changed, 174 insertions(+)
 create mode 100644 board/licheepi/licheepi_nano/genimage.cfg
 create mode 100644 board/licheepi/licheepi_nano/linux.fragment
 create mode 100644 board/licheepi/licheepi_nano/readme.txt
 create mode 100644 board/licheepi/licheepi_nano/uboot.fragment
 create mode 100644 configs/licheepi_nano_defconfig

diff --git a/board/licheepi/licheepi_nano/genimage.cfg b/board/licheepi/licheepi_nano/genimage.cfg
new file mode 100644
index 0000000000..5e398eeb21
--- /dev/null
+++ b/board/licheepi/licheepi_nano/genimage.cfg
@@ -0,0 +1,33 @@
+flash w25q128 {
+	pebsize = 65536
+	numpebs = 256
+	minimum-io-unit-size = 1
+	sub-page-size = 1
+	vid-header-offset = 64
+}
+
+image flash.bin {
+	flash {}
+	flashtype = w25q128
+
+	partition uboot {
+		image = "u-boot-sunxi-with-spl.bin"
+		size = 512K
+	}
+
+	partition dtb {
+		image = "suniv-f1c100s-licheepi-nano.dtb"
+		size = 64K
+	}
+
+	partition zimage {
+		image = "zImage"
+		size = 5M
+	}
+
+	partition rootfs {
+		image = "rootfs.jffs2"
+		size = 0
+	}
+}
+
diff --git a/board/licheepi/licheepi_nano/linux.fragment b/board/licheepi/licheepi_nano/linux.fragment
new file mode 100644
index 0000000000..af68f28167
--- /dev/null
+++ b/board/licheepi/licheepi_nano/linux.fragment
@@ -0,0 +1,11 @@
+# CONFIG_NET is not set
+# CONFIG_DRM is not set
+# CONFIG_CMA is not set
+# CONFIG_ARCH_MULTI_V7 is not set
+CONFIG_UEVENT_HELPER=y
+CONFIG_MTD=y
+CONFIG_MTD_BLOCK=y
+CONFIG_MTD_SPI_NOR=y
+# CONFIG_MTD_SPI_NOR_USE_4K_SECTORS is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+CONFIG_JFFS2_FS=y
diff --git a/board/licheepi/licheepi_nano/readme.txt b/board/licheepi/licheepi_nano/readme.txt
new file mode 100644
index 0000000000..55aa602777
--- /dev/null
+++ b/board/licheepi/licheepi_nano/readme.txt
@@ -0,0 +1,84 @@
+Intro
+=====
+
+This directory contains a buildroot configuration for building a
+LicheePi Nano image which can be flashed into the board.
+
+This frees the MMC port which can be used for an additional SD
+card of for a WiFi adapter.
+
+How to build it
+===============
+
+Configure Buildroot
+-------------------
+
+  $ make licheepi_nano_defconfig
+
+Build the rootfs
+----------------
+
+Note: you will need to have access to the network, since Buildroot
+will download the packages' sources.
+
+You may now build your rootfs with:
+
+  $ make
+
+(This may take a while, consider getting yourself a coffee ;-) )
+
+Result of the build
+-------------------
+
+After building, you should obtain this tree:
+
+    output/images/
+    +-- flash.bin
+    +-- rootfs.jffs2
+    +-- rootfs.tar
+    +-- suniv-f1c100s-licheepi-nano.dtb
+    +-- u-boot.bin
+    +-- u-boot-sunxi-with-spl.bin
+    `-- zImage
+
+How to flash
+============
+
+Once the build process is finished you will have an image called
+"flash.bin" in the output/images/ directory. It contains the
+bootloader, the device tree, the kernel and the root file system.
+
+The device can be flashed when it is in special mode called "FEL
+mode". There are multiple ways to enter this mode described here:
+https://linux-sunxi.org/FEL#Entering_FEL_mode
+
+One way is to write one file from sunxi-tools to a SD card with:
+
+  $ sudo dd if=./output/build/host-sunxi-tools-*/bin/fel-sdboot.sunxi of=/dev/sdX bs=1024 seek=8
+
+Once the SD card is burned, insert it into your LicheePi Nano board,
+and plug the USB cable. A new USB device should be visible with
+lsusb:
+
+  1f3a:efe8 Allwinner Technology sunxi SoC OTG connector in FEL/flashing mode
+
+The image can be flashed with:
+
+  $ sudo ./output/host/bin/sunxi-fel -p spiflash-write 0 output/images/flash.bin
+
+Once this completes, remove the SD card and power the board. Your
+new system should come up now and start a console on the UART0
+serial port.
+
+Note
+====
+
+Some standard kernel features are disabled using the fragment in
+order to reduce the size. They can be enabled again if other
+features are disabled instead.
+
+For U-Boot, the upstream repository is preferred and the system
+boots, but loading the image from the flash takes a long time. It
+is much faster when using the branch "licheepi-nano-v2020.01" of
+this fork:
+https://github.com/florpor/u-boot
diff --git a/board/licheepi/licheepi_nano/uboot.fragment b/board/licheepi/licheepi_nano/uboot.fragment
new file mode 100644
index 0000000000..39f2bfe742
--- /dev/null
+++ b/board/licheepi/licheepi_nano/uboot.fragment
@@ -0,0 +1,3 @@
+CONFIG_USE_BOOTARGS=y
+CONFIG_BOOTARGS="console=tty0 console=ttyS0,115200 panic=5 rootwait root=/dev/mtdblock3 rw rootfstype=jffs2 mtdparts=spi0.0:512k(uboot)ro,64k(dtb),5M(kernel)ro,-(rootfs)"
+CONFIG_BOOTCOMMAND="sf probe 0 50000000; sf read 0x80C00000 0x80000 0x4000; sf read 0x80008000 0x90000 0x500000; bootz 0x80008000 - 0x80C00000"
diff --git a/configs/licheepi_nano_defconfig b/configs/licheepi_nano_defconfig
new file mode 100644
index 0000000000..3dbd29241f
--- /dev/null
+++ b/configs/licheepi_nano_defconfig
@@ -0,0 +1,43 @@
+# Target options
+BR2_arm=y
+
+# System configuration
+BR2_TARGET_GENERIC_HOSTNAME="licheepi-nano"
+BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for the LicheePi Nano"
+BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
+BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200=y
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/licheepi/licheepi_nano/genimage.cfg"
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_DEFCONFIG="sunxi"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/licheepi/licheepi_nano/linux.fragment"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/suniv-f1c100s-licheepi-nano"
+
+# Filesystem images
+BR2_TARGET_ROOTFS_JFFS2=y
+BR2_TARGET_ROOTFS_JFFS2_FLASH_64=y
+BR2_TARGET_ROOTFS_JFFS2_NOCLEANMARKER=y
+BR2_TARGET_ROOTFS_JFFS2_PAD=y
+
+# Bootloaders
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2023.04"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="licheepi_nano"
+BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="board/licheepi/licheepi_nano/uboot.fragment"
+BR2_TARGET_UBOOT_SPL=y
+BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y
+BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
+
+# Required host utilities
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_E2FSPROGS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
+BR2_PACKAGE_HOST_SUNXI_TOOLS=y
-- 
2.30.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [Buildroot] [PATCH 1/2] board/licheepi_zero: move board files to their own directory
  2023-10-27 11:46 [Buildroot] [PATCH 1/2] board/licheepi_zero: move board files to their own directory Francois Dugast
  2023-10-27 11:47 ` [Buildroot] [PATCH 2/2] board/licheepi/licheepi_nano: new board Francois Dugast
@ 2023-10-29 18:45 ` Yann E. MORIN
  2023-11-04 18:38 ` Thomas Petazzoni via buildroot
  2 siblings, 0 replies; 7+ messages in thread
From: Yann E. MORIN @ 2023-10-29 18:45 UTC (permalink / raw)
  To: Francois Dugast; +Cc: Michel Stempin, buildroot

François, All,

On 2023-10-27 13:46 +0200, Francois Dugast spake thusly:
> Group files for board licheepi_zero under a new directory. This is
> to prepare for a new board also coming to the licheepi directory.

Licheepi-zero is a board by Sipeed, the manufacturer, and we already had
a subdir for them, so I moved the board files there rather than
introduce the board/licheepi/ sub-dir.

Applied to master, thanks.

Regards,
Yann E. MORIN.

> Signed-off-by: Francois Dugast <francois.dugast.foss@gmail.com>
> ---
>  board/licheepi/{ => licheepi_zero}/boot.cmd     | 0
>  board/licheepi/{ => licheepi_zero}/genimage.cfg | 0
>  board/licheepi/{ => licheepi_zero}/readme.txt   | 0
>  configs/licheepi_zero_defconfig                 | 4 ++--
>  4 files changed, 2 insertions(+), 2 deletions(-)
>  rename board/licheepi/{ => licheepi_zero}/boot.cmd (100%)
>  rename board/licheepi/{ => licheepi_zero}/genimage.cfg (100%)
>  rename board/licheepi/{ => licheepi_zero}/readme.txt (100%)
> 
> diff --git a/board/licheepi/boot.cmd b/board/licheepi/licheepi_zero/boot.cmd
> similarity index 100%
> rename from board/licheepi/boot.cmd
> rename to board/licheepi/licheepi_zero/boot.cmd
> diff --git a/board/licheepi/genimage.cfg b/board/licheepi/licheepi_zero/genimage.cfg
> similarity index 100%
> rename from board/licheepi/genimage.cfg
> rename to board/licheepi/licheepi_zero/genimage.cfg
> diff --git a/board/licheepi/readme.txt b/board/licheepi/licheepi_zero/readme.txt
> similarity index 100%
> rename from board/licheepi/readme.txt
> rename to board/licheepi/licheepi_zero/readme.txt
> diff --git a/configs/licheepi_zero_defconfig b/configs/licheepi_zero_defconfig
> index 0d3115a996..c8f74a7f04 100644
> --- a/configs/licheepi_zero_defconfig
> +++ b/configs/licheepi_zero_defconfig
> @@ -12,7 +12,7 @@ BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for the LicheePi Zero"
>  BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
>  BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200=y
>  BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
> -BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/licheepi/genimage.cfg"
> +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/licheepi/licheepi_zero/genimage.cfg"
>  
>  # Kernel
>  BR2_LINUX_KERNEL=y
> @@ -45,7 +45,7 @@ BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
>  BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-sunxi-with-spl.bin"
>  BR2_PACKAGE_HOST_UBOOT_TOOLS=y
>  BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT=y
> -BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE="board/licheepi/boot.cmd"
> +BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE="board/licheepi/licheepi_zero/boot.cmd"
>  
>  # Required host utilities for building an SDCard image
>  BR2_PACKAGE_HOST_DOSFSTOOLS=y
> -- 
> 2.30.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Buildroot] [PATCH 2/2] board/licheepi/licheepi_nano: new board
  2023-10-27 11:47 ` [Buildroot] [PATCH 2/2] board/licheepi/licheepi_nano: new board Francois Dugast
@ 2023-10-29 18:49   ` Yann E. MORIN
  0 siblings, 0 replies; 7+ messages in thread
From: Yann E. MORIN @ 2023-10-29 18:49 UTC (permalink / raw)
  To: Francois Dugast; +Cc: Michel Stempin, buildroot

François. All,

On 2023-10-27 13:47 +0200, Francois Dugast spake thusly:
> Add support for the LicheePi Nano with:
> - U-Boot 2023.04
> - Linux current latest version

We do not leave the kernel version to the l;atest one, because we want
to have known-working defconfigs, and so bumping the kernel (and
bootloader) version should be explicit (and tested) rather than follow
whatever the latest kernel version is.

So I pinned the version to kernel 6.5.9, which is the current latest
known to Biuldroot (so, presumably what you tested with).

> Board homepage: https://linux-sunxi.org/LicheePi_Nano

I added the true home page on the manufacturer website, and kept the
linux-sunxi wiki URL too.

> linux.fragment is required to disable some features in order
> to keep the kernel size small, otherwise the board does not
> boot due to limited memory. See note in readme.txt.
> 
> Signed-off-by: Francois Dugast <francois.dugast.foss@gmail.com>
> ---
>  board/licheepi/licheepi_nano/genimage.cfg   | 33 ++++++++
>  board/licheepi/licheepi_nano/linux.fragment | 11 +++
>  board/licheepi/licheepi_nano/readme.txt     | 84 +++++++++++++++++++++
>  board/licheepi/licheepi_nano/uboot.fragment |  3 +
>  configs/licheepi_nano_defconfig             | 43 +++++++++++
>  5 files changed, 174 insertions(+)
>  create mode 100644 board/licheepi/licheepi_nano/genimage.cfg
>  create mode 100644 board/licheepi/licheepi_nano/linux.fragment
>  create mode 100644 board/licheepi/licheepi_nano/readme.txt
>  create mode 100644 board/licheepi/licheepi_nano/uboot.fragment
>  create mode 100644 configs/licheepi_nano_defconfig

Of course, like for licheepi_zero, I moved that to the sipeed sub-dir.

And as for licheepi_zero, I renamed the defconfig to start with sipeed,
like all the other sipeed boards.

Oops, I forgot to rename licheepi_zero, so I've pushed a fixup commit...

Applied to master with the above changes, thanks.

Regards,
Yann E. MORIN.

> diff --git a/board/licheepi/licheepi_nano/genimage.cfg b/board/licheepi/licheepi_nano/genimage.cfg
> new file mode 100644
> index 0000000000..5e398eeb21
> --- /dev/null
> +++ b/board/licheepi/licheepi_nano/genimage.cfg
> @@ -0,0 +1,33 @@
> +flash w25q128 {
> +	pebsize = 65536
> +	numpebs = 256
> +	minimum-io-unit-size = 1
> +	sub-page-size = 1
> +	vid-header-offset = 64
> +}
> +
> +image flash.bin {
> +	flash {}
> +	flashtype = w25q128
> +
> +	partition uboot {
> +		image = "u-boot-sunxi-with-spl.bin"
> +		size = 512K
> +	}
> +
> +	partition dtb {
> +		image = "suniv-f1c100s-licheepi-nano.dtb"
> +		size = 64K
> +	}
> +
> +	partition zimage {
> +		image = "zImage"
> +		size = 5M
> +	}
> +
> +	partition rootfs {
> +		image = "rootfs.jffs2"
> +		size = 0
> +	}
> +}
> +
> diff --git a/board/licheepi/licheepi_nano/linux.fragment b/board/licheepi/licheepi_nano/linux.fragment
> new file mode 100644
> index 0000000000..af68f28167
> --- /dev/null
> +++ b/board/licheepi/licheepi_nano/linux.fragment
> @@ -0,0 +1,11 @@
> +# CONFIG_NET is not set
> +# CONFIG_DRM is not set
> +# CONFIG_CMA is not set
> +# CONFIG_ARCH_MULTI_V7 is not set
> +CONFIG_UEVENT_HELPER=y
> +CONFIG_MTD=y
> +CONFIG_MTD_BLOCK=y
> +CONFIG_MTD_SPI_NOR=y
> +# CONFIG_MTD_SPI_NOR_USE_4K_SECTORS is not set
> +CONFIG_MTD_CMDLINE_PARTS=y
> +CONFIG_JFFS2_FS=y
> diff --git a/board/licheepi/licheepi_nano/readme.txt b/board/licheepi/licheepi_nano/readme.txt
> new file mode 100644
> index 0000000000..55aa602777
> --- /dev/null
> +++ b/board/licheepi/licheepi_nano/readme.txt
> @@ -0,0 +1,84 @@
> +Intro
> +=====
> +
> +This directory contains a buildroot configuration for building a
> +LicheePi Nano image which can be flashed into the board.
> +
> +This frees the MMC port which can be used for an additional SD
> +card of for a WiFi adapter.
> +
> +How to build it
> +===============
> +
> +Configure Buildroot
> +-------------------
> +
> +  $ make licheepi_nano_defconfig
> +
> +Build the rootfs
> +----------------
> +
> +Note: you will need to have access to the network, since Buildroot
> +will download the packages' sources.
> +
> +You may now build your rootfs with:
> +
> +  $ make
> +
> +(This may take a while, consider getting yourself a coffee ;-) )
> +
> +Result of the build
> +-------------------
> +
> +After building, you should obtain this tree:
> +
> +    output/images/
> +    +-- flash.bin
> +    +-- rootfs.jffs2
> +    +-- rootfs.tar
> +    +-- suniv-f1c100s-licheepi-nano.dtb
> +    +-- u-boot.bin
> +    +-- u-boot-sunxi-with-spl.bin
> +    `-- zImage
> +
> +How to flash
> +============
> +
> +Once the build process is finished you will have an image called
> +"flash.bin" in the output/images/ directory. It contains the
> +bootloader, the device tree, the kernel and the root file system.
> +
> +The device can be flashed when it is in special mode called "FEL
> +mode". There are multiple ways to enter this mode described here:
> +https://linux-sunxi.org/FEL#Entering_FEL_mode
> +
> +One way is to write one file from sunxi-tools to a SD card with:
> +
> +  $ sudo dd if=./output/build/host-sunxi-tools-*/bin/fel-sdboot.sunxi of=/dev/sdX bs=1024 seek=8
> +
> +Once the SD card is burned, insert it into your LicheePi Nano board,
> +and plug the USB cable. A new USB device should be visible with
> +lsusb:
> +
> +  1f3a:efe8 Allwinner Technology sunxi SoC OTG connector in FEL/flashing mode
> +
> +The image can be flashed with:
> +
> +  $ sudo ./output/host/bin/sunxi-fel -p spiflash-write 0 output/images/flash.bin
> +
> +Once this completes, remove the SD card and power the board. Your
> +new system should come up now and start a console on the UART0
> +serial port.
> +
> +Note
> +====
> +
> +Some standard kernel features are disabled using the fragment in
> +order to reduce the size. They can be enabled again if other
> +features are disabled instead.
> +
> +For U-Boot, the upstream repository is preferred and the system
> +boots, but loading the image from the flash takes a long time. It
> +is much faster when using the branch "licheepi-nano-v2020.01" of
> +this fork:
> +https://github.com/florpor/u-boot
> diff --git a/board/licheepi/licheepi_nano/uboot.fragment b/board/licheepi/licheepi_nano/uboot.fragment
> new file mode 100644
> index 0000000000..39f2bfe742
> --- /dev/null
> +++ b/board/licheepi/licheepi_nano/uboot.fragment
> @@ -0,0 +1,3 @@
> +CONFIG_USE_BOOTARGS=y
> +CONFIG_BOOTARGS="console=tty0 console=ttyS0,115200 panic=5 rootwait root=/dev/mtdblock3 rw rootfstype=jffs2 mtdparts=spi0.0:512k(uboot)ro,64k(dtb),5M(kernel)ro,-(rootfs)"
> +CONFIG_BOOTCOMMAND="sf probe 0 50000000; sf read 0x80C00000 0x80000 0x4000; sf read 0x80008000 0x90000 0x500000; bootz 0x80008000 - 0x80C00000"
> diff --git a/configs/licheepi_nano_defconfig b/configs/licheepi_nano_defconfig
> new file mode 100644
> index 0000000000..3dbd29241f
> --- /dev/null
> +++ b/configs/licheepi_nano_defconfig
> @@ -0,0 +1,43 @@
> +# Target options
> +BR2_arm=y
> +
> +# System configuration
> +BR2_TARGET_GENERIC_HOSTNAME="licheepi-nano"
> +BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for the LicheePi Nano"
> +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
> +BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200=y
> +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
> +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/licheepi/licheepi_nano/genimage.cfg"
> +
> +# Kernel
> +BR2_LINUX_KERNEL=y
> +BR2_LINUX_KERNEL_DEFCONFIG="sunxi"
> +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/licheepi/licheepi_nano/linux.fragment"
> +BR2_LINUX_KERNEL_DTS_SUPPORT=y
> +BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/suniv-f1c100s-licheepi-nano"
> +
> +# Filesystem images
> +BR2_TARGET_ROOTFS_JFFS2=y
> +BR2_TARGET_ROOTFS_JFFS2_FLASH_64=y
> +BR2_TARGET_ROOTFS_JFFS2_NOCLEANMARKER=y
> +BR2_TARGET_ROOTFS_JFFS2_PAD=y
> +
> +# Bootloaders
> +BR2_TARGET_UBOOT=y
> +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
> +BR2_TARGET_UBOOT_CUSTOM_VERSION=y
> +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2023.04"
> +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="licheepi_nano"
> +BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="board/licheepi/licheepi_nano/uboot.fragment"
> +BR2_TARGET_UBOOT_SPL=y
> +BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin"
> +BR2_TARGET_UBOOT_NEEDS_DTC=y
> +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y
> +BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
> +
> +# Required host utilities
> +BR2_PACKAGE_HOST_DOSFSTOOLS=y
> +BR2_PACKAGE_HOST_E2FSPROGS=y
> +BR2_PACKAGE_HOST_GENIMAGE=y
> +BR2_PACKAGE_HOST_MTOOLS=y
> +BR2_PACKAGE_HOST_SUNXI_TOOLS=y
> -- 
> 2.30.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Buildroot] [PATCH 1/2] board/licheepi_zero: move board files to their own directory
  2023-10-27 11:46 [Buildroot] [PATCH 1/2] board/licheepi_zero: move board files to their own directory Francois Dugast
  2023-10-27 11:47 ` [Buildroot] [PATCH 2/2] board/licheepi/licheepi_nano: new board Francois Dugast
  2023-10-29 18:45 ` [Buildroot] [PATCH 1/2] board/licheepi_zero: move board files to their own directory Yann E. MORIN
@ 2023-11-04 18:38 ` Thomas Petazzoni via buildroot
  2023-11-04 18:46   ` Thomas Petazzoni via buildroot
  2 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-11-04 18:38 UTC (permalink / raw)
  To: Francois Dugast; +Cc: Michel Stempin, buildroot

Hello François,

On Fri, 27 Oct 2023 13:46:59 +0200
Francois Dugast <francois.dugast.foss@gmail.com> wrote:

> Group files for board licheepi_zero under a new directory. This is
> to prepare for a new board also coming to the licheepi directory.
> 
> Signed-off-by: Francois Dugast <francois.dugast.foss@gmail.com>
> ---
>  board/licheepi/{ => licheepi_zero}/boot.cmd     | 0
>  board/licheepi/{ => licheepi_zero}/genimage.cfg | 0
>  board/licheepi/{ => licheepi_zero}/readme.txt   | 0

Could you rename the folder to licheepi-zero instead of licheepi_zero?

I would have done it myself while applying if there were no other
issues with the patch series, but I have comments on PATCH 2/2.

Best regards,

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Buildroot] [PATCH 1/2] board/licheepi_zero: move board files to their own directory
  2023-11-04 18:38 ` Thomas Petazzoni via buildroot
@ 2023-11-04 18:46   ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-11-04 18:46 UTC (permalink / raw)
  To: Francois Dugast; +Cc: Michel Stempin, buildroot

Hello,

On Sat, 4 Nov 2023 19:38:18 +0100
Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:

> Could you rename the folder to licheepi-zero instead of licheepi_zero?

I see you actually sent a newer version, which has been merged, and
this earlier version had not been marked as Superseded in our patch
tracking system. You can therefore ignore my previous e-mail.

Best regards,

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-11-04 18:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-27 11:46 [Buildroot] [PATCH 1/2] board/licheepi_zero: move board files to their own directory Francois Dugast
2023-10-27 11:47 ` [Buildroot] [PATCH 2/2] board/licheepi/licheepi_nano: new board Francois Dugast
2023-10-29 18:49   ` Yann E. MORIN
2023-10-29 18:45 ` [Buildroot] [PATCH 1/2] board/licheepi_zero: move board files to their own directory Yann E. MORIN
2023-11-04 18:38 ` Thomas Petazzoni via buildroot
2023-11-04 18:46   ` Thomas Petazzoni via buildroot
  -- strict thread matches above, loose matches on Subject: below --
2023-10-04 20:07 Francois Dugast

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.