Skip to contentSkip to conversation

configs/friendlyarm_nanopi_neo_plus2: use an extlinux instead of boot.cmd

PATCH New Louis Aussedat 3 participants 6 messages Dec 9, 2019 – Dec 14, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 configs/friendlyarm_nanopi_neo_plus2: use an extlinux instead of boot.cmd

This remove the file boot.cmd to use an extlinux.conf instead.

---
 board/friendlyarm/nanopi-neo-plus2/boot.cmd      | 6 ------
 board/friendlyarm/nanopi-neo-plus2/extlinux.conf | 4 ++++
 board/friendlyarm/nanopi-neo-plus2/genimage.cfg  | 2 +-
 board/friendlyarm/nanopi-neo-plus2/post-build.sh | 4 ++++
 configs/friendlyarm_nanopi_neo_plus2_defconfig   | 3 +--
 5 files changed, 10 insertions(+), 9 deletions(-)
 delete mode 100644 board/friendlyarm/nanopi-neo-plus2/boot.cmd
 create mode 100644 board/friendlyarm/nanopi-neo-plus2/extlinux.conf
 create mode 100755 board/friendlyarm/nanopi-neo-plus2/post-build.sh
board/friendlyarm/nanopi-neo-plus2/boot.cmd deleted +0 -6
deleted file mode 100644
index 227604a23d..0000000000
@@ -1,6 +0,0 @@
-setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
-
-fatload mmc 0 $kernel_addr_r Image
-fatload mmc 0 $fdt_addr_r sun50i-h5-nanopi-neo-plus2.dtb
-
-booti $kernel_addr_r - $fdt_addr_r
board/friendlyarm/nanopi-neo-plus2/extlinux.conf new file +4 -0
new file mode 100644
index 0000000000..fcb6f632c1
@@ -0,0 +1,4 @@
+label linux
+  kernel /Image
+  devicetree /sun50i-h5-nanopi-neo-plus2.dtb
+  append console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
board/friendlyarm/nanopi-neo-plus2/genimage.cfg +1 -1
index a4c2a7a894..fb871abd43 100644
@@ -3,7 +3,7 @@ image boot.vfat {
 		files = {
 			"Image",
 			"sun50i-h5-nanopi-neo-plus2.dtb",
-			"boot.scr"
+			"extlinux"
 		}
 	}
 	size = 64M
board/friendlyarm/nanopi-neo-plus2/post-build.sh new file +4 -0
new file mode 100755
index 0000000000..ec20fca7d9
@@ -0,0 +1,4 @@
+#!/bin/sh
+BOARD_DIR="$(dirname $0)"
+
+install -m 0644 -D $BOARD_DIR/extlinux.conf $BINARIES_DIR/extlinux/extlinux.conf
configs/friendlyarm_nanopi_neo_plus2_defconfig +1 -2
index c807b3100b..461e468cb6 100644
@@ -27,8 +27,6 @@ BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
 BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.itb"
 BR2_TARGET_UBOOT_SPL=y
 BR2_TARGET_UBOOT_SPL_NAME="spl/sunxi-spl.bin"
-BR2_TARGET_UBOOT_BOOT_SCRIPT=y
-BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/friendlyarm/nanopi-neo-plus2/boot.cmd"
 
 # Kernel
 BR2_LINUX_KERNEL=y
@@ -49,6 +47,7 @@ BR2_PACKAGE_HOST_GENIMAGE=y
 BR2_PACKAGE_HOST_MTOOLS=y
 BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
 BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/friendlyarm/nanopi-neo-plus2/genimage.cfg"
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/friendlyarm/nanopi-neo-plus2/post-build.sh"
 
 # wireless firmware
 BR2_PACKAGE_LINUX_FIRMWARE=y
Signature · 1 line
2.24.0
#1 lore raw

PATCH 2/3 package/python-tqdm: bump to version 4.40.1

---
 package/python-tqdm/python-tqdm.hash | 4 ++--
 package/python-tqdm/python-tqdm.mk   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
package/python-tqdm/python-tqdm.hash +2 -2
index 63dea98cf2..8a61b29ad7 100644
@@ -1,5 +1,5 @@
 # md5, sha256 from https://pypi.org/project/tqdm
-md5	84f1744e2cc097d9e824a2e201cca4a6  tqdm-4.37.0.tar.gz
-sha256	fca09992116d6dc3ad9789cf601a254081eb40d5c14c1863ab6cd10e15c2cb26  tqdm-4.37.0.tar.gz
+md5	285af1f905f4c375f03a86a667047950  tqdm-4.40.1.tar.gz
+sha256	e405d16c98fcf30725d0c9d493ed07302a18846b5452de5253030ccd18996f87  tqdm-4.40.1.tar.gz
 # Locally computed sha256 checksums
 sha256	1bbf12d09d437844527b3cdaba01d379dac651b5cbb5ebb0d764274684d2680b  LICENCE
package/python-tqdm/python-tqdm.mk +2 -2
index 3aa562e22e..4ff4696e65 100644
@@ -4,9 +4,9 @@
 #
 ################################################################################
 
-PYTHON_TQDM_VERSION = 4.37.0
+PYTHON_TQDM_VERSION = 4.40.1
 PYTHON_TQDM_SOURCE = tqdm-$(PYTHON_TQDM_VERSION).tar.gz
-PYTHON_TQDM_SITE = https://files.pythonhosted.org/packages/cc/7b/5878d4e1b01a2eb802f78ea277f2385072681cabefc8fb4fbdee28dd1869
+PYTHON_TQDM_SITE = https://files.pythonhosted.org/packages/4c/45/830c5c4bfaba60ef7d356a53c7751a86c81d148a16fda0daf3ac5ca8e288
 PYTHON_TQDM_SETUP_TYPE = setuptools
 PYTHON_TQDM_LICENSE = MPL-2.0, MIT
 PYTHON_TQDM_LICENSE_FILES = LICENCE
Signature · 1 line
2.24.0
#2 lore raw

PATCH 2/3 package/python-tqdm: bump to version 4.40.1

Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Louis" == Louis Aussedat <[email protected]> writes:

---
 package/python-tqdm/python-tqdm.hash | 4 ++--
 package/python-tqdm/python-tqdm.mk   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

Wen patches are not related to the same issue, then please do not send them as a single series.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw

PATCH 3/3 package/libnfc: add configs to select which driver to support

In reply to Louis Aussedat

By default, arygon and pn53x_usb are activated,
to keep old configuration.

---
 package/libnfc/Config.in | 55 ++++++++++++++++++++++++++++++++++++++--
 package/libnfc/libnfc.mk | 40 +++++++++++++++++++++++++++--
 2 files changed, 91 insertions(+), 4 deletions(-)
package/libnfc/Config.in +53 -2
index c8fe251459..9a1c8103ec 100644
@@ -1,8 +1,6 @@
 config BR2_PACKAGE_LIBNFC
 	bool "libnfc"
 	depends on BR2_TOOLCHAIN_HAS_THREADS # libusb
-	select BR2_PACKAGE_LIBUSB
-	select BR2_PACKAGE_LIBUSB_COMPAT
 	help
 	  Public platform independent Near Field Communication (NFC)
 	  library.
@@ -11,6 +9,59 @@ config BR2_PACKAGE_LIBNFC
 
 if BR2_PACKAGE_LIBNFC
 
+config BR2_PACKAGE_LIBNFC_ACR122_PCSC
+	bool "acr122_pcsc driver"
+	default ""
+	select BR2_PACKAGE_PCSC_LITE
+	help
+	  support for acr112_pcsc driver
+
+config BR2_PACKAGE_LIBNFC_ACR122_USB
+	bool "acr122_usb driver"
+	default ""
+	select BR2_PACKAGE_LIBUSB
+	select BR2_PACKAGE_LIBUSB_COMPAT
+	help
+	  support for acr122_usb driver
+
+config BR2_PACKAGE_LIBNFC_ACR122S
+	bool "acr122s driver"
+	default ""
+	help
+	  support for acr122s driver
+
+config BR2_PACKAGE_LIBNFC_ARYGON
+	bool "arygon driver"
+	default y
+	help
+	  support for arygon driver
+
+config BR2_PACKAGE_LIBNFC_PN532_I2C
+	bool "pn532_i2c driver"
+	default ""
+	help
+	  support for pn532_i2c driver
+
+config BR2_PACKAGE_LIBNFC_PN532_SPI
+	bool "pn532_spi driver"
+	default ""
+	help
+	  support for pn532_spi driver
+
+config BR2_PACKAGE_LIBNFC_PN532_UART
+	bool "pn532_uart driver"
+	default ""
+	help
+	  support for pn532_uart driver
+
+config BR2_PACKAGE_LIBNFC_PN53X_USB
+	bool "pn53x_usb driver"
+	default y
+	select BR2_PACKAGE_LIBUSB
+	select BR2_PACKAGE_LIBUSB_COMPAT
+	help
+	  support for pn53x_usb driver
+
 config BR2_PACKAGE_LIBNFC_EXAMPLES
 	bool "build libnfc examples"
 	select BR2_PACKAGE_READLINE
package/libnfc/libnfc.mk +38 -2
index b13fd69d82..ca8700484b 100644
@@ -12,10 +12,46 @@ LIBNFC_LICENSE_FILES = COPYING
 LIBNFC_AUTORECONF = YES
 LIBNFC_INSTALL_STAGING = YES
 
-LIBNFC_DEPENDENCIES = host-pkgconf libusb libusb-compat
+LIBNFC_DEPENDENCIES = host-pkgconf
 
 # N.B. The acr122 driver requires pcsc-lite.
-LIBNFC_CONF_OPTS = --with-drivers=arygon,pn53x_usb
+ifeq ($(BR2_PACKAGE_LIBNFC_ACR122_PCSC),y)
+LIBNFC_DRIVER_LIST += acr122_pcsc
+LIBNFC_DEPENDENCIES += pcsc-lite
+endif
+
+ifeq ($(BR2_PACKAGE_LIBNFC_ACR122_USB),y)
+LIBNFC_DRIVER_LIST += acr122_usb
+LIBNFC_DEPENDENCIES += libusb libusb-compat
+endif
+
+ifeq ($(BR2_PACKAGE_LIBNFC_ACR122S),y)
+LIBNFC_DRIVER_LIST += acr122s
+endif
+
+ifeq ($(BR2_PACKAGE_LIBNFC_ARYGON),y)
+LIBNFC_DRIVER_LIST += arygon
+endif
+
+ifeq ($(BR2_PACKAGE_LIBNFC_PN532_I2C),y)
+LIBNFC_DRIVER_LIST += pn532_i2c
+endif
+
+ifeq ($(BR2_PACKAGE_LIBNFC_PN532_SPI),y)
+LIBNFC_DRIVER_LIST += pn532_spi
+endif
+
+ifeq ($(BR2_PACKAGE_LIBNFC_PN532_UART),y)
+LIBNFC_DRIVER_LIST += pn532_uart
+endif
+
+ifeq ($(BR2_PACKAGE_LIBNFC_PN53X_USB),y)
+LIBNFC_DRIVER_LIST += pn53x_usb
+LIBNFC_DEPENDENCIES += libusb libusb-compat
+endif
+
+LIBNFC_CONF_OPTS = \
+	--with-drivers=$(subst $(space),$(comma),$(strip $(LIBNFC_DRIVER_LIST)))
 
 ifeq ($(BR2_PACKAGE_LIBNFC_EXAMPLES),y)
 LIBNFC_CONF_OPTS += --enable-example
Signature · 1 line
2.24.0
#4 lore raw

PATCH 3/3 package/libnfc: add configs to select which driver to support

Hello Louis,

Quoted 2 lines · On Mon, 9 Dec 2019 22:59:23 +0100 Louis Aussedat <[email protected]>…

By default, arygon and pn53x_usb are activated,
to keep old configuration.

I've improved a bit the commit log:

package/libnfc: add sub-options to enable individual drivers

Until now, the arygon and pn53x_usb were unconditionally enabled, and there were no options to choose other drivers. Therefore, we had sub-options for each individual driver, keeping arygon and pn53x_usb enabled by default to preserve backward compatibility.

Also, due to this, the BR2_TOOLCHAIN_HAS_THREADS dependency on the libnfc package is no longer needed, and is only needed for some of the sub-options.

Also, see below some comments.

package/libnfc/Config.in line 3

Quoted 8 lines
package/libnfc/Config.in +0 -0
index c8fe251459..9a1c8103ec 100644
@@ -1,8 +1,6 @@
 config BR2_PACKAGE_LIBNFC
 	bool "libnfc"
 	depends on BR2_TOOLCHAIN_HAS_THREADS # libusb

This dependency was no longer needed, as it was due to libusb, so it has to be moved down to the sub-options that select libusb.

package/libnfc/Config.in config BR2_PACKAGE_LIBNFC · line 14

Quoted 12 lines
package/libnfc/Config.in +3 -2
-	select BR2_PACKAGE_LIBUSB
-	select BR2_PACKAGE_LIBUSB_COMPAT
 	help
 	  Public platform independent Near Field Communication (NFC)
 	  library.
@@ -11,6 +9,59 @@ config BR2_PACKAGE_LIBNFC
 
 if BR2_PACKAGE_LIBNFC
 
+config BR2_PACKAGE_LIBNFC_ACR122_PCSC
+	bool "acr122_pcsc driver"
+	default ""

default "" doesn't make much sense for a boolean option, and the default value for a boolean is to be disabled, so there is nothing to do. I just removed all default "" lines.

package/libnfc/Config.in config BR2_PACKAGE_LIBNFC · line 15

Quoted 1 line
package/libnfc/Config.in +1 -0
+	select BR2_PACKAGE_PCSC_LITE

You can't select options like this: you need to replicate their dependencies.

I fixed up the above issues, and applied to master. Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#5 lore raw

PATCH 1/3 configs/friendlyarm_nanopi_neo_plus2: use an extlinux instead of boot.cmd

In reply to Louis Aussedat
Quoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Louis" == Louis Aussedat <[email protected]> writes:

This remove the file boot.cmd to use an extlinux.conf instead.

---
 board/friendlyarm/nanopi-neo-plus2/boot.cmd      | 6 ------
 board/friendlyarm/nanopi-neo-plus2/extlinux.conf | 4 ++++
 board/friendlyarm/nanopi-neo-plus2/genimage.cfg  | 2 +-
 board/friendlyarm/nanopi-neo-plus2/post-build.sh | 4 ++++
 configs/friendlyarm_nanopi_neo_plus2_defconfig   | 3 +--
 5 files changed, 10 insertions(+), 9 deletions(-)

This is not really any significant improvement in code size, but OK - Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard