[PATCH] mxs: fix image generation for I2SE Duckbills
The standard U-Boot boot scripts for Duckbills expect the Linux kernel and device tree files installed below /boot within the (ext4) root filesystem. Also a raw zImage is expected instead of uImage. Extend the SD card generation accordingly and while at, install all possible Duckbill DT blobs there. Signed-off-by: Michael Heimpold --- target/linux/mxs/image/Makefile | 29 ++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/target/linux/mxs/image/Makefile b/target/linux/mxs/image/Makefile index fff7e7ca3325..468eca324879 100644 --- a/target/linux/mxs/image/Makefile +++ b/target/linux/mxs/image/Makefile @@ -10,11 +10,33 @@ FAT32_BLOCKS=$(shell echo $$(($(CONFIG_MXS_SD_BOOT_PARTSIZE)*1024*1024/$(FAT32_B KERNEL_LOADADDR:=0x40008000 +define Build/mxs-ext4-rootfs-with-boot + rm -rf $(call mkfs_target_dir,$(1))/boot + mkdir -p $(call mkfs_target_dir,$(1))/boot + $(CP) --no-preserve=mode $(KDIR)/$(KERNEL_NAME) $(call mkfs_target_dir,$(1))/boot/ + $(foreach dts,$(DEVICE_DTS), \ + $(CP) \ + $(DTS_DIR)/$(dts).dtb \ + $(call mkfs_target_dir,$(1))/boot/; \ + ) + + rm -rf $@.rootfs + $(STAGING_DIR_HOST)/bin/make_ext4fs -L rootfs \ + -l $(ROOTFS_PARTSIZE) -b $(CONFIG_TARGET_EXT4_BLOCKSIZE) \ + $(if $(CONFIG_TARGET_EXT4_RESERVED_PCT),-m $(CONFIG_TARGET_EXT4_RESERVED_PCT)) \ + $(if $(CONFIG_TARGET_EXT4_JOURNAL),,-J) \ + $(if $(SOURCE_DATE_EPOCH),-T $(SOURCE_DATE_EPOCH)) \ + $@.rootfs $(call mkfs_target_dir,$(1))/ + mv $@.rootfs $@ +endef + define Build/mxs-sdcard-ext4-ext4 + mv $@ $@.rootfs + ./gen_sdcard_ext4_ext4.sh \ $@ \ $(STAGING_DIR_IMAGE)/$(DEVICE_NAME)/u-boot.sb \ - $(IMAGE_ROOTFS) \ + $@.rootfs \ $(CONFIG_TARGET_ROOTFS_PARTSIZE) endef @@ -50,8 +72,9 @@ define Device/i2se_duckbill uboot-envtools kmod-leds-gpio -kmod-ipt-nathelper SUPPORTED_DEVICES:=i2se,duckbill SOC:=imx28 - DEVICE_DTS:=imx28-duckbill - IMAGE/sdcard.img.gz = mxs-sdcard-ext4-ext4 | append-metadata | gzip + KERNEL := kernel-bin + DEVICE_DTS:=imx28-duckbill imx28-duckbill-2 imx28-duckbill-2-485 imx28-duckbill-2-spi + IMAGE/sdcard.img.gz = mxs-ext4-rootfs-with-boot | mxs-sdcard-ext4-ext4 | append-metadata | gzip endef TARGET_DEVICES += i2se_duckbill -- 2.34.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] uboot-mxs: bump to v2020.04
Also update the U-Boot BSP patch for I2SE Duckbill devices. Signed-off-by: Michael Heimpold --- package/boot/uboot-mxs/Makefile | 4 +- .../patches/001-add-i2se-duckbill.patch | 66 ++- 2 files changed, 36 insertions(+), 34 deletions(-) diff --git a/package/boot/uboot-mxs/Makefile b/package/boot/uboot-mxs/Makefile index 3112d673d4..2a202dca8f 100644 --- a/package/boot/uboot-mxs/Makefile +++ b/package/boot/uboot-mxs/Makefile @@ -8,10 +8,10 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk -PKG_VERSION:=2020.01 +PKG_VERSION:=2020.04 PKG_RELEASE:=1 -PKG_HASH:=aa453c603208b1b27bd03525775a7f79b443adec577fdc6e8f06974025a135f1 +PKG_HASH:=fe732aaf037d9cc3c0909bad8362af366ae964bbdac6913a34081ff4ad565372 include $(INCLUDE_DIR)/u-boot.mk include $(INCLUDE_DIR)/package.mk diff --git a/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch b/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch index 033c843202..50702cb3cb 100644 --- a/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch +++ b/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch @@ -1,6 +1,6 @@ -From b66c70cd15fa02297b94d928970932ef62c2ff02 Mon Sep 17 00:00:00 2001 +From 83ee930c18b068c9a16b66c01aaa5d6e06570152 Mon Sep 17 00:00:00 2001 From: Michael Heimpold -Date: Sun, 3 Nov 2019 00:50:21 +0100 +Date: Sun, 19 Apr 2020 02:46:46 +0200 Subject: [PATCH] arm: mxs: add support for I2SE's Duckbill boards The Duckbill devices are small, pen-drive sized boards based on @@ -28,13 +28,13 @@ Signed-off-by: Stefan Wahren --- arch/arm/mach-imx/mxs/Kconfig | 5 + board/i2se/duckbill/Kconfig | 15 +++ - board/i2se/duckbill/MAINTAINERS | 6 ++ + board/i2se/duckbill/MAINTAINERS | 6 + board/i2se/duckbill/Makefile| 10 ++ - board/i2se/duckbill/duckbill.c | 186 - board/i2se/duckbill/iomux.c | 156 +++ - configs/duckbill_defconfig | 41 +++ - include/configs/duckbill.h | 176 ++ - 8 files changed, 595 insertions(+) + board/i2se/duckbill/duckbill.c | 189 + board/i2se/duckbill/iomux.c | 157 ++ + configs/duckbill_defconfig | 43 + include/configs/duckbill.h | 172 + + 8 files changed, 597 insertions(+) create mode 100644 board/i2se/duckbill/Kconfig create mode 100644 board/i2se/duckbill/MAINTAINERS create mode 100644 board/i2se/duckbill/Makefile @@ -44,7 +44,7 @@ Signed-off-by: Stefan Wahren create mode 100644 include/configs/duckbill.h diff --git a/arch/arm/mach-imx/mxs/Kconfig b/arch/arm/mach-imx/mxs/Kconfig -index 68072d5a1f..82aaa3ef76 100644 +index b90d7b6e41..e7d8bc6792 100644 --- a/arch/arm/mach-imx/mxs/Kconfig +++ b/arch/arm/mach-imx/mxs/Kconfig @@ -50,6 +50,10 @@ config TARGET_APX4DEVKIT @@ -58,14 +58,14 @@ index 68072d5a1f..82aaa3ef76 100644 config TARGET_MX28EVK bool "Support mx28evk" select BOARD_EARLY_INIT_F -@@ -67,6 +71,7 @@ config SYS_SOC +@@ -70,6 +74,7 @@ config SYS_SOC source "board/bluegiga/apx4devkit/Kconfig" source "board/freescale/mx28evk/Kconfig" +source "board/i2se/duckbill/Kconfig" + source "board/liebherr/xea/Kconfig" source "board/ppcag/bg0900/Kconfig" source "board/schulercontrol/sc_sps_1/Kconfig" - source "board/technologic/ts4600/Kconfig" diff --git a/board/i2se/duckbill/Kconfig b/board/i2se/duckbill/Kconfig new file mode 100644 index 00..98c1e4689f @@ -101,13 +101,13 @@ index 00..5496baa330 +F:configs/duckbill_defconfig diff --git a/board/i2se/duckbill/Makefile b/board/i2se/duckbill/Makefile new file mode 100644 -index 00..0079eb413c +index 00..11bac98e4c --- /dev/null +++ b/board/i2se/duckbill/Makefile @@ -0,0 +1,10 @@ +# SPDX-License-Identifier: GPL-2.0+ +# -+# (C) Copyright 2014-2019 ++# (C) Copyright 2014-2020 +# Michael Heimpold, m...@heimpold.de. + +ifndefCONFIG_SPL_BUILD @@ -117,15 +117,15 @@ index 00..0079eb413c +endif diff --git a/board/i2se/duckbill/duckbill.c b/board/i2se/duckbill/duckbill.c new file mode 100644 -index 00..f93c372611 +index 00..93defc6c28 --- /dev/null +++ b/board/i2se/duckbill/duckbill.c -@@ -0,0 +1,186 @@ +@@ -0,0 +1,189 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * I2SE Duckbill board + * -+ * (C) Copyright 2014-2019 Michael Heimpold ++ * Copyright (C) 2014-2020 Michael Heimpold + */ + +#include @@ -177,14 +177,14 @@ index 00..f93c372611 + return 0; +} + -+#ifdefCONFIG_CMD_MMC ++#ifdef CONFIG_CMD_MMC +int board_mmc_init(bd_t *bis) +{ + return mxsmmc_initialize(bis, 0, NULL, NULL); +} +#endif + -+#ifdefCONFIG_CMD_NET ++#ifdef CONFIG_CMD_NET +int board_eth_init(bd_t *bis) +{ + unsigned int re
[OpenWrt-Devel] [PATCH] mxs: fix user led for OLinuXino boards
More testing after kernel upgrade to 5.4 uncovered a regression: the user led is not present anymore due to a pin mux "collision" in device tree. A patch sent to upstream kernel was accepted now. Integrate this pending fix as platform specific patch so that user led is available again. Signed-off-by: Michael Heimpold --- ...ARM-dts-imx23-introduce-mmc0_sck_cfg.patch | 61 +++ 1 file changed, 61 insertions(+) create mode 100644 target/linux/mxs/patches-5.4/100-ARM-dts-imx23-introduce-mmc0_sck_cfg.patch diff --git a/target/linux/mxs/patches-5.4/100-ARM-dts-imx23-introduce-mmc0_sck_cfg.patch b/target/linux/mxs/patches-5.4/100-ARM-dts-imx23-introduce-mmc0_sck_cfg.patch new file mode 100644 index 00..029fe6a8af --- /dev/null +++ b/target/linux/mxs/patches-5.4/100-ARM-dts-imx23-introduce-mmc0_sck_cfg.patch @@ -0,0 +1,61 @@ +From e4fdac5def509ffb723b49d6a91f9043009119f9 Mon Sep 17 00:00:00 2001 +From: Michael Heimpold +Date: Sun, 8 Mar 2020 23:21:44 +0100 +Subject: [PATCH] ARM: dts: imx23: introduce mmc0_sck_cfg + +The Olimex Olinuxino board has a user led connected to SSP1_DETECT. +But since this pin is listed in mmc0_pins_fixup, it is already claimed +by MMC driver and this results in this error during boot: + +[1.39] imx23-pinctrl 80018000.pinctrl: pin SSP1_DETECT already + requested by 8001.spi; cannot claim for leds +[1.40] imx23-pinctrl 80018000.pinctrl: pin-65 (leds) status -22 +[1.41] imx23-pinctrl 80018000.pinctrl: could not request pin 65 + (SSP1_DETECT) from group led_gpio2_1.0 on device 80018000.pinctrl +[1.42] leds-gpio leds: Error applying setting, reverse things back +[1.43] leds-gpio: probe of leds failed with error -22 + +This fix it, introduce mmc0_sck_cfg and switch the Olinuxino board to it. + +Signed-off-by: Michael Heimpold +Signed-off-by: Shawn Guo +--- + arch/arm/boot/dts/imx23-olinuxino.dts | 2 +- + arch/arm/boot/dts/imx23.dtsi | 8 + 2 files changed, 9 insertions(+), 1 deletion(-) + +diff --git a/arch/arm/boot/dts/imx23-olinuxino.dts b/arch/arm/boot/dts/imx23-olinuxino.dts +index 4c9aafe00b5d..0729e72f2283 100644 +--- a/arch/arm/boot/dts/imx23-olinuxino.dts b/arch/arm/boot/dts/imx23-olinuxino.dts +@@ -23,7 +23,7 @@ + ssp0: spi@8001 { + compatible = "fsl,imx23-mmc"; + pinctrl-names = "default"; +- pinctrl-0 = <&mmc0_4bit_pins_a &mmc0_pins_fixup>; ++ pinctrl-0 = <&mmc0_4bit_pins_a &mmc0_sck_cfg>; + bus-width = <4>; + broken-cd; + status = "okay"; +diff --git a/arch/arm/boot/dts/imx23.dtsi b/arch/arm/boot/dts/imx23.dtsi +index eb0aeda1682c..c5edff381213 100644 +--- a/arch/arm/boot/dts/imx23.dtsi b/arch/arm/boot/dts/imx23.dtsi +@@ -267,6 +267,14 @@ + fsl,pull-up = ; + }; + ++ mmc0_sck_cfg: mmc0-sck-cfg@0 { ++ reg = <0>; ++ fsl,pinmux-ids = < ++ MX23_PAD_SSP1_SCK__SSP1_SCK ++ >; ++ fsl,pull-up = ; ++ }; ++ + mmc1_4bit_pins_a: mmc1-4bit@0 { + reg = <0>; + fsl,pinmux-ids = < +-- +2.17.1 + -- 2.17.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] uboot-envtools: mxs: add support for olimex, imx23-olinuxino
Add ubootenv uci config for Olimex OLinuXino boards. Signed-off-by: Michael Heimpold --- package/boot/uboot-envtools/Makefile | 2 +- package/boot/uboot-envtools/files/mxs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/package/boot/uboot-envtools/Makefile b/package/boot/uboot-envtools/Makefile index 1c6b789716..49d57e69bd 100644 --- a/package/boot/uboot-envtools/Makefile +++ b/package/boot/uboot-envtools/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=uboot-envtools PKG_DISTNAME:=u-boot PKG_VERSION:=2019.07 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE_PROTO:=git PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.xz diff --git a/package/boot/uboot-envtools/files/mxs b/package/boot/uboot-envtools/files/mxs index ecfb5de162..e087d60783 100644 --- a/package/boot/uboot-envtools/files/mxs +++ b/package/boot/uboot-envtools/files/mxs @@ -17,6 +17,9 @@ i2se,duckbill) ubootenv_add_uci_config "/dev/mmcblk0" "0x2" "0x2" ubootenv_add_uci_config "/dev/mmcblk0" "0x4" "0x2" ;; +olimex,imx23-olinuxino) + ubootenv_add_uci_config "/dev/mmcblk0" "0x4" "0x4000" + ;; esac config_load ubootenv -- 2.17.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] uboot-mxs: bump to v2020.01
Also update the U-Boot BSP patch for I2SE Duckbill devices. Run tested on I2SE Duckbill and Olimex OLinuXino Maxi boards. Signed-off-by: Michael Heimpold --- package/boot/uboot-mxs/Makefile | 4 ++-- .../patches/001-add-i2se-duckbill.patch | 24 +-- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/package/boot/uboot-mxs/Makefile b/package/boot/uboot-mxs/Makefile index 04d3f15f95..3112d673d4 100644 --- a/package/boot/uboot-mxs/Makefile +++ b/package/boot/uboot-mxs/Makefile @@ -8,10 +8,10 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk -PKG_VERSION:=2019.10 +PKG_VERSION:=2020.01 PKG_RELEASE:=1 -PKG_HASH:=8d6d6070739522dd236cba7055b8736bfe92b4fac0ea18ad809829ca79667014 +PKG_HASH:=aa453c603208b1b27bd03525775a7f79b443adec577fdc6e8f06974025a135f1 include $(INCLUDE_DIR)/u-boot.mk include $(INCLUDE_DIR)/package.mk diff --git a/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch b/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch index c7b8fd63ea..033c843202 100644 --- a/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch +++ b/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch @@ -1,4 +1,4 @@ -From 821d083ae4cfb795eab385eda43a20cdc8c3cacd Mon Sep 17 00:00:00 2001 +From b66c70cd15fa02297b94d928970932ef62c2ff02 Mon Sep 17 00:00:00 2001 From: Michael Heimpold Date: Sun, 3 Nov 2019 00:50:21 +0100 Subject: [PATCH] arm: mxs: add support for I2SE's Duckbill boards @@ -32,9 +32,9 @@ Signed-off-by: Stefan Wahren board/i2se/duckbill/Makefile| 10 ++ board/i2se/duckbill/duckbill.c | 186 board/i2se/duckbill/iomux.c | 156 +++ - configs/duckbill_defconfig | 40 +++ - include/configs/duckbill.h | 179 ++ - 8 files changed, 597 insertions(+) + configs/duckbill_defconfig | 41 +++ + include/configs/duckbill.h | 176 ++ + 8 files changed, 595 insertions(+) create mode 100644 board/i2se/duckbill/Kconfig create mode 100644 board/i2se/duckbill/MAINTAINERS create mode 100644 board/i2se/duckbill/Makefile @@ -471,10 +471,10 @@ index 00..1db3c52c34 +} diff --git a/configs/duckbill_defconfig b/configs/duckbill_defconfig new file mode 100644 -index 00..5a8c561b4e +index 00..fcdec4f3c7 --- /dev/null +++ b/configs/duckbill_defconfig -@@ -0,0 +1,40 @@ +@@ -0,0 +1,41 @@ +CONFIG_ARM=y +CONFIG_ARCH_MX28=y +CONFIG_SYS_TEXT_BASE=0x40002000 @@ -483,6 +483,8 @@ index 00..5a8c561b4e +CONFIG_SPL_LIBGENERIC_SUPPORT=y +CONFIG_TARGET_DUCKBILL=y +CONFIG_SPL_SERIAL_SUPPORT=y ++CONFIG_ENV_SIZE=0x2 ++CONFIG_ENV_OFFSET=0x2 +CONFIG_NR_DRAM_BANKS=1 +CONFIG_SPL=y +CONFIG_SPL_TEXT_BASE=0x1000 @@ -496,7 +498,6 @@ index 00..5a8c561b4e +CONFIG_CMD_BOOTZ=y +# CONFIG_CMD_ELF is not set +CONFIG_CMD_UNZIP=y -+# CONFIG_CMD_FLASH is not set +CONFIG_CMD_FUSE=y +CONFIG_CMD_GPIO=y +CONFIG_CMD_MMC=y @@ -509,18 +510,18 @@ index 00..5a8c561b4e +CONFIG_CMD_FS_GENERIC=y +CONFIG_DOS_PARTITION=y +CONFIG_ENV_IS_IN_MMC=y ++CONFIG_SYS_RELOC_GD_ENV_ADDR=y +CONFIG_MXS_GPIO=y +CONFIG_MMC_MXS=y +CONFIG_MII=y +CONFIG_CONS_INDEX=0 +CONFIG_OF_LIBFDT=y -+# CONFIG_EFI_LOADER is not set diff --git a/include/configs/duckbill.h b/include/configs/duckbill.h new file mode 100644 -index 00..e7fce8843e +index 00..76da1008b8 --- /dev/null +++ b/include/configs/duckbill.h -@@ -0,0 +1,179 @@ +@@ -0,0 +1,176 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2014-2019 Michael Heimpold @@ -543,9 +544,6 @@ index 00..e7fce8843e + +/* Environment is in MMC */ +#define CONFIG_ENV_OVERWRITE -+#define CONFIG_ENV_SIZE (128 * 1024) -+#define CONFIG_ENV_OFFSET (128 * 1024) -+#define CONFIG_ENV_OFFSET_REDUND (256 * 1024) +#define CONFIG_SYS_MMC_ENV_DEV0 +#define CONFIG_SYS_REDUNDAND_ENVIRONMENT + -- 2.17.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] mxs: switch to kernel 5.4
Compiled for and run-tested on - I2SE Duckbill board - Olimex OLinuXino Maxi board Signed-off-by: Michael Heimpold --- target/linux/mxs/Makefile| 2 +- target/linux/mxs/{config-4.19 => config-5.4} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename target/linux/mxs/{config-4.19 => config-5.4} (100%) diff --git a/target/linux/mxs/Makefile b/target/linux/mxs/Makefile index 96aba031d7..6071329371 100644 --- a/target/linux/mxs/Makefile +++ b/target/linux/mxs/Makefile @@ -13,7 +13,7 @@ FEATURES:=ext4 rtc usb gpio CPU_TYPE:=arm926ej-s MAINTAINER:=Zoltan HERPAI -KERNEL_PATCHVER:=4.19 +KERNEL_PATCHVER:=5.4 KERNELNAME:=zImage dtbs define Target/Description diff --git a/target/linux/mxs/config-4.19 b/target/linux/mxs/config-5.4 similarity index 100% rename from target/linux/mxs/config-4.19 rename to target/linux/mxs/config-5.4 -- 2.17.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 0/3] Further preparations for USB gadget usage
This patch series bundles some more steps towards the usage of I2SE Duckbills as USB gadget devices. Michael Heimpold (3): procd: start additional consoles during hotplugging mxs: switch to askconsole mxs: start a console on USB gadget serial ports package/system/procd/Makefile | 2 +- package/system/procd/files/hotplug.json | 4 target/linux/mxs/base-files/etc/inittab | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) -- 2.17.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 3/3] mxs: start a console on USB gadget serial ports
The I2SE Duckbill devices are pen-drive like and thus the usage of the USB gadget subsystem is highly indicated. Spawning a console if a serial gadget is configured saves us from connecting a physical debug uart. On Olimex OLinuXino Maxi/Mini boards, this does not hurt. Signed-off-by: Michael Heimpold --- target/linux/mxs/base-files/etc/inittab | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/mxs/base-files/etc/inittab b/target/linux/mxs/base-files/etc/inittab index 9820e7144b..253036402d 100644 --- a/target/linux/mxs/base-files/etc/inittab +++ b/target/linux/mxs/base-files/etc/inittab @@ -1,3 +1,4 @@ ::sysinit:/etc/init.d/rcS S boot ::shutdown:/etc/init.d/rcS K shutdown ::askconsole:/usr/libexec/login.sh +ttyGS0::askfirst:/usr/libexec/login.sh -- 2.17.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/3] procd: start additional consoles during hotplugging
Now that 'start-console' procd command has reached the main repo, we can add a rule to start consoles on serial devices which are created when USB gadget driver reports creation with hotplugging. Signed-off-by: Michael Heimpold --- package/system/procd/Makefile | 2 +- package/system/procd/files/hotplug.json | 4 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile index 8090b87dd5..c4b86ba746 100644 --- a/package/system/procd/Makefile +++ b/package/system/procd/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=procd -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git diff --git a/package/system/procd/files/hotplug.json b/package/system/procd/files/hotplug.json index f676bac79e..7e0f129d35 100644 --- a/package/system/procd/files/hotplug.json +++ b/package/system/procd/files/hotplug.json @@ -37,6 +37,10 @@ [ "load-firmware", "/lib/firmware" ], [ "return" ] ] + ], + [ "if", + [ "regex", "DEVNAME", "^ttyGS" ], + [ "start-console", "%DEVNAME%" ] ] ], "remove" : [ -- 2.17.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/3] mxs: switch to askconsole
Remove the dedicated tty name and use askconsole to spawn the console on serial debug uart. Signed-off-by: Michael Heimpold --- target/linux/mxs/base-files/etc/inittab | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/mxs/base-files/etc/inittab b/target/linux/mxs/base-files/etc/inittab index 9991ac4909..9820e7144b 100644 --- a/target/linux/mxs/base-files/etc/inittab +++ b/target/linux/mxs/base-files/etc/inittab @@ -1,3 +1,3 @@ ::sysinit:/etc/init.d/rcS S boot ::shutdown:/etc/init.d/rcS K shutdown -ttyAMA0::askfirst:/usr/libexec/login.sh +::askconsole:/usr/libexec/login.sh -- 2.17.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] uboot-mxs: bump to v2019.10
Also update the U-Boot BSP patch for I2SE Duckbill devices. Run tested on I2SE Duckbill and Olimex OLinuXino Maxi boards. Signed-off-by: Michael Heimpold --- Superseeds my patch to upgrade to v2019.07. package/boot/uboot-mxs/Makefile | 4 ++-- .../patches/001-add-i2se-duckbill.patch | 16 +--- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/package/boot/uboot-mxs/Makefile b/package/boot/uboot-mxs/Makefile index c4485f5b3d..04d3f15f95 100644 --- a/package/boot/uboot-mxs/Makefile +++ b/package/boot/uboot-mxs/Makefile @@ -8,10 +8,10 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk -PKG_VERSION:=2019.01 +PKG_VERSION:=2019.10 PKG_RELEASE:=1 -PKG_HASH:=50bd7e5a466ab828914d080d5f6a432345b500e8fba1ad3b7b61e95e60d51c22 +PKG_HASH:=8d6d6070739522dd236cba7055b8736bfe92b4fac0ea18ad809829ca79667014 include $(INCLUDE_DIR)/u-boot.mk include $(INCLUDE_DIR)/package.mk diff --git a/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch b/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch index 9acb6a508d..c7b8fd63ea 100644 --- a/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch +++ b/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch @@ -1,6 +1,6 @@ -From 6af0148a38b23ba761905f98a7211fab986033ce Mon Sep 17 00:00:00 2001 +From 821d083ae4cfb795eab385eda43a20cdc8c3cacd Mon Sep 17 00:00:00 2001 From: Michael Heimpold -Date: Thu, 13 Sep 2018 21:40:19 +0200 +Date: Sun, 3 Nov 2019 00:50:21 +0100 Subject: [PATCH] arm: mxs: add support for I2SE's Duckbill boards The Duckbill devices are small, pen-drive sized boards based on @@ -32,9 +32,9 @@ Signed-off-by: Stefan Wahren board/i2se/duckbill/Makefile| 10 ++ board/i2se/duckbill/duckbill.c | 186 board/i2se/duckbill/iomux.c | 156 +++ - configs/duckbill_defconfig | 38 +++ + configs/duckbill_defconfig | 40 +++ include/configs/duckbill.h | 179 ++ - 8 files changed, 595 insertions(+) + 8 files changed, 597 insertions(+) create mode 100644 board/i2se/duckbill/Kconfig create mode 100644 board/i2se/duckbill/MAINTAINERS create mode 100644 board/i2se/duckbill/Makefile @@ -471,10 +471,10 @@ index 00..1db3c52c34 +} diff --git a/configs/duckbill_defconfig b/configs/duckbill_defconfig new file mode 100644 -index 00..f92a67d53d +index 00..5a8c561b4e --- /dev/null +++ b/configs/duckbill_defconfig -@@ -0,0 +1,38 @@ +@@ -0,0 +1,40 @@ +CONFIG_ARM=y +CONFIG_ARCH_MX28=y +CONFIG_SYS_TEXT_BASE=0x40002000 @@ -483,8 +483,9 @@ index 00..f92a67d53d +CONFIG_SPL_LIBGENERIC_SUPPORT=y +CONFIG_TARGET_DUCKBILL=y +CONFIG_SPL_SERIAL_SUPPORT=y -+CONFIG_SPL=y +CONFIG_NR_DRAM_BANKS=1 ++CONFIG_SPL=y ++CONFIG_SPL_TEXT_BASE=0x1000 +CONFIG_BOOTDELAY=1 +CONFIG_SYS_CONSOLE_IS_IN_ENV=y +CONFIG_VERSION_VARIABLE=y @@ -508,6 +509,7 @@ index 00..f92a67d53d +CONFIG_CMD_FS_GENERIC=y +CONFIG_DOS_PARTITION=y +CONFIG_ENV_IS_IN_MMC=y ++CONFIG_MXS_GPIO=y +CONFIG_MMC_MXS=y +CONFIG_MII=y +CONFIG_CONS_INDEX=0 -- 2.17.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH RESEND] mxs: add support and switch to kernel 4.19
Also remove kernel 4.14 support and the meanwhile obsolete patch. This was run-tested on I2SE Duckbill device and Olimex OLinuXino Maxi board. Signed-off-by: Michael Heimpold --- target/linux/mxs/Makefile | 2 +- target/linux/mxs/{config-4.14 => config-4.19} | 42 +++ ...0-crypto-mxsdcp-provide-importexport.patch | 51 --- 3 files changed, 19 insertions(+), 76 deletions(-) rename target/linux/mxs/{config-4.14 => config-4.19} (89%) delete mode 100644 target/linux/mxs/patches-4.14/110-crypto-mxsdcp-provide-importexport.patch diff --git a/target/linux/mxs/Makefile b/target/linux/mxs/Makefile index 39064ae1ae..96aba031d7 100644 --- a/target/linux/mxs/Makefile +++ b/target/linux/mxs/Makefile @@ -13,7 +13,7 @@ FEATURES:=ext4 rtc usb gpio CPU_TYPE:=arm926ej-s MAINTAINER:=Zoltan HERPAI -KERNEL_PATCHVER:=4.14 +KERNEL_PATCHVER:=4.19 KERNELNAME:=zImage dtbs define Target/Description diff --git a/target/linux/mxs/config-4.14 b/target/linux/mxs/config-4.19 similarity index 89% rename from target/linux/mxs/config-4.14 rename to target/linux/mxs/config-4.19 index abad1807cd..4daf49f809 100644 --- a/target/linux/mxs/config-4.14 +++ b/target/linux/mxs/config-4.19 @@ -2,7 +2,11 @@ CONFIG_ALIGNMENT_TRAP=y CONFIG_ARCH_CLOCKSOURCE_DATA=y CONFIG_ARCH_HAS_DEBUG_VIRTUAL=y CONFIG_ARCH_HAS_ELF_RANDOMIZE=y +CONFIG_ARCH_HAS_FORTIFY_SOURCE=y CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y +CONFIG_ARCH_HAS_KCOV=y +CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y +CONFIG_ARCH_HAS_PHYS_TO_DMA=y CONFIG_ARCH_HAS_SET_MEMORY=y CONFIG_ARCH_HAS_SG_CHAIN=y CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y @@ -19,9 +23,6 @@ CONFIG_ARCH_MULTI_V5=y CONFIG_ARCH_MXS=y CONFIG_ARCH_NR_GPIO=0 CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y -# CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT is not set -# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set -# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y CONFIG_ARCH_SUPPORTS_UPROBES=y CONFIG_ARCH_SUSPEND_POSSIBLE=y @@ -43,7 +44,7 @@ CONFIG_ARM_PATCH_PHYS_VIRT=y CONFIG_ARM_THUMB=y CONFIG_ATAGS=y CONFIG_AUTO_ZRELADDR=y -# CONFIG_CACHE_L2X0 is not set +CONFIG_CC_HAS_ASM_GOTO=y CONFIG_CLKDEV_LOOKUP=y CONFIG_CLKSRC_MMIO=y CONFIG_CLONE_BACKWARDS=y @@ -84,7 +85,6 @@ CONFIG_CRYPTO_RNG2=y CONFIG_CRYPTO_WORKQUEUE=y CONFIG_DEBUG_ALIGN_RODATA=y CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" -# CONFIG_DEBUG_UART_8250 is not set # CONFIG_DEBUG_USER is not set CONFIG_DMADEVICES=y CONFIG_DMA_ENGINE=y @@ -98,7 +98,9 @@ CONFIG_FEC=y CONFIG_FIXED_PHY=y CONFIG_FIX_EARLYCON_MEM=y CONFIG_FRAME_POINTER=y +CONFIG_FS_IOMAP=y CONFIG_FS_MBCACHE=y +CONFIG_GCC_VERSION=80300 CONFIG_GENERIC_ALLOCATOR=y CONFIG_GENERIC_ATOMIC64=y CONFIG_GENERIC_BUG=y @@ -106,8 +108,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y CONFIG_GENERIC_CPU_AUTOPROBE=y CONFIG_GENERIC_EARLY_IOREMAP=y CONFIG_GENERIC_IDLE_POLL_SETUP=y -CONFIG_GENERIC_IO=y CONFIG_GENERIC_IRQ_CHIP=y +CONFIG_GENERIC_IRQ_MULTI_HANDLER=y CONFIG_GENERIC_IRQ_SHOW=y CONFIG_GENERIC_IRQ_SHOW_LEVEL=y CONFIG_GENERIC_PCI_IOMAP=y @@ -122,28 +124,23 @@ CONFIG_GPIO_GENERIC=y CONFIG_GPIO_GENERIC_PLATFORM=y CONFIG_GPIO_MXS=y CONFIG_GPIO_SYSFS=y -# CONFIG_GRO_CELLS is not set CONFIG_HANDLE_DOMAIN_IRQ=y CONFIG_HARDIRQS_SW_RESEND=y CONFIG_HAS_DMA=y CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT_MAP=y -# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set CONFIG_HAVE_ARCH_AUDITSYSCALL=y -# CONFIG_HAVE_ARCH_BITREVERSE is not set CONFIG_HAVE_ARCH_JUMP_LABEL=y CONFIG_HAVE_ARCH_KGDB=y CONFIG_HAVE_ARCH_PFN_VALID=y CONFIG_HAVE_ARCH_SECCOMP_FILTER=y +CONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y CONFIG_HAVE_ARCH_TRACEHOOK=y -# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set -CONFIG_HAVE_CC_STACKPROTECTOR=y CONFIG_HAVE_CLK=y CONFIG_HAVE_CLK_PREPARE=y CONFIG_HAVE_CONTEXT_TRACKING=y CONFIG_HAVE_C_RECORDMCOUNT=y CONFIG_HAVE_DEBUG_KMEMLEAK=y -CONFIG_HAVE_DMA_API_DEBUG=y CONFIG_HAVE_DMA_CONTIGUOUS=y CONFIG_HAVE_DYNAMIC_FTRACE=y CONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y @@ -153,6 +150,7 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y CONFIG_HAVE_FUNCTION_TRACER=y CONFIG_HAVE_GENERIC_DMA_COHERENT=y CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y +CONFIG_HAVE_LD_DEAD_CODE_DATA_ELIMINATION=y CONFIG_HAVE_MEMBLOCK=y CONFIG_HAVE_MOD_ARCH_SPECIFIC=y CONFIG_HAVE_NET_DSA=y @@ -163,6 +161,7 @@ CONFIG_HAVE_PERF_REGS=y CONFIG_HAVE_PERF_USER_STACK_DUMP=y CONFIG_HAVE_PROC_CPU=y CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y +CONFIG_HAVE_RSEQ=y CONFIG_HAVE_SYSCALL_TRACEPOINTS=y CONFIG_HAVE_UID16=y CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y @@ -185,7 +184,6 @@ CONFIG_IIO_SYSFS_TRIGGER=y CONFIG_IIO_TRIGGER=y CONFIG_INITRAMFS_SOURCE="" CONFIG_INPUT=y -CONFIG_IOMMU_HELPER=y CONFIG_IRQCHIP=y CONFIG_IRQ_DOMAIN=y CONFIG_IRQ_FORCED_THREADING=y @@ -194,18 +192,21 @@ CONFIG_IRQ_WORK=y # CONFIG_ISDN is not set CONFIG_JBD2=y CONFIG_LIBFDT=y +CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_MDIO_BUS=y CONFIG_MDIO_DEVICE=y +CONFIG_MEMFD_CREATE=y CONFIG_MFD_CORE=y CONFIG_MFD_MXS_LRADC=
[OpenWrt-Devel] [PATCH] brcm47xx: fix switch port labels for Asus WL500GP V2
The switch port naming in LuCI does not fit the physical numbers on the front of this device. Since this is confusing, fix it. Signed-off-by: Michael Heimpold --- target/linux/brcm47xx/base-files/etc/board.d/01_network | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/target/linux/brcm47xx/base-files/etc/board.d/01_network b/target/linux/brcm47xx/base-files/etc/board.d/01_network index 8428b43dec..6fbd76fc10 100755 --- a/target/linux/brcm47xx/base-files/etc/board.d/01_network +++ b/target/linux/brcm47xx/base-files/etc/board.d/01_network @@ -143,8 +143,12 @@ configure_by_model() { ucidef_set_interfaces_lan_wan "eth0" "eth1" ;; + "Asus WL500GP V2") + ucidef_add_switch "switch0" \ + "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "4:wan" "5@eth0" + ;; + "Asus RT-N12"* | \ - "Asus WL500GP V2" | \ "Buffalo WHR-G125" | \ "D-Link DIR-330" | \ "Motorola WR850G" | \ -- 2.17.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] mxs: add support and switch to kernel 4.19
Hi wigyori, Am Mittwoch, 31. Juli 2019, 23:45:00 CEST schrieb Michael Heimpold: > Also remove kernel 4.14 support and the meanwhile obsolete patch. > > This was run-tested on I2SE Duckbill device and > Olimex OLinuXino Maxi board. here too, any objections? Best regards, mhei > > Signed-off-by: Michael Heimpold > --- > target/linux/mxs/Makefile | 2 +- > target/linux/mxs/{config-4.14 => config-4.19} | 42 +++ > ...0-crypto-mxsdcp-provide-importexport.patch | 51 --- > 3 files changed, 19 insertions(+), 76 deletions(-) > rename target/linux/mxs/{config-4.14 => config-4.19} (89%) > delete mode 100644 > target/linux/mxs/patches-4.14/110-crypto-mxsdcp-provide-importexport.patch > > diff --git a/target/linux/mxs/Makefile b/target/linux/mxs/Makefile > index 39064ae1ae..96aba031d7 100644 > --- a/target/linux/mxs/Makefile > +++ b/target/linux/mxs/Makefile > @@ -13,7 +13,7 @@ FEATURES:=ext4 rtc usb gpio > CPU_TYPE:=arm926ej-s > > MAINTAINER:=Zoltan HERPAI > -KERNEL_PATCHVER:=4.14 > +KERNEL_PATCHVER:=4.19 > KERNELNAME:=zImage dtbs > > define Target/Description > diff --git a/target/linux/mxs/config-4.14 b/target/linux/mxs/config-4.19 > similarity index 89% > rename from target/linux/mxs/config-4.14 > rename to target/linux/mxs/config-4.19 > index abad1807cd..4daf49f809 100644 > --- a/target/linux/mxs/config-4.14 > +++ b/target/linux/mxs/config-4.19 > @@ -2,7 +2,11 @@ CONFIG_ALIGNMENT_TRAP=y > CONFIG_ARCH_CLOCKSOURCE_DATA=y > CONFIG_ARCH_HAS_DEBUG_VIRTUAL=y > CONFIG_ARCH_HAS_ELF_RANDOMIZE=y > +CONFIG_ARCH_HAS_FORTIFY_SOURCE=y > CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y > +CONFIG_ARCH_HAS_KCOV=y > +CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y > +CONFIG_ARCH_HAS_PHYS_TO_DMA=y > CONFIG_ARCH_HAS_SET_MEMORY=y > CONFIG_ARCH_HAS_SG_CHAIN=y > CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y > @@ -19,9 +23,6 @@ CONFIG_ARCH_MULTI_V5=y > CONFIG_ARCH_MXS=y > CONFIG_ARCH_NR_GPIO=0 > CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y > -# CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT is not set > -# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set > -# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set > CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y > CONFIG_ARCH_SUPPORTS_UPROBES=y > CONFIG_ARCH_SUSPEND_POSSIBLE=y > @@ -43,7 +44,7 @@ CONFIG_ARM_PATCH_PHYS_VIRT=y > CONFIG_ARM_THUMB=y > CONFIG_ATAGS=y > CONFIG_AUTO_ZRELADDR=y > -# CONFIG_CACHE_L2X0 is not set > +CONFIG_CC_HAS_ASM_GOTO=y > CONFIG_CLKDEV_LOOKUP=y > CONFIG_CLKSRC_MMIO=y > CONFIG_CLONE_BACKWARDS=y > @@ -84,7 +85,6 @@ CONFIG_CRYPTO_RNG2=y > CONFIG_CRYPTO_WORKQUEUE=y > CONFIG_DEBUG_ALIGN_RODATA=y > CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" > -# CONFIG_DEBUG_UART_8250 is not set > # CONFIG_DEBUG_USER is not set > CONFIG_DMADEVICES=y > CONFIG_DMA_ENGINE=y > @@ -98,7 +98,9 @@ CONFIG_FEC=y > CONFIG_FIXED_PHY=y > CONFIG_FIX_EARLYCON_MEM=y > CONFIG_FRAME_POINTER=y > +CONFIG_FS_IOMAP=y > CONFIG_FS_MBCACHE=y > +CONFIG_GCC_VERSION=80300 > CONFIG_GENERIC_ALLOCATOR=y > CONFIG_GENERIC_ATOMIC64=y > CONFIG_GENERIC_BUG=y > @@ -106,8 +108,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y > CONFIG_GENERIC_CPU_AUTOPROBE=y > CONFIG_GENERIC_EARLY_IOREMAP=y > CONFIG_GENERIC_IDLE_POLL_SETUP=y > -CONFIG_GENERIC_IO=y > CONFIG_GENERIC_IRQ_CHIP=y > +CONFIG_GENERIC_IRQ_MULTI_HANDLER=y > CONFIG_GENERIC_IRQ_SHOW=y > CONFIG_GENERIC_IRQ_SHOW_LEVEL=y > CONFIG_GENERIC_PCI_IOMAP=y > @@ -122,28 +124,23 @@ CONFIG_GPIO_GENERIC=y > CONFIG_GPIO_GENERIC_PLATFORM=y > CONFIG_GPIO_MXS=y > CONFIG_GPIO_SYSFS=y > -# CONFIG_GRO_CELLS is not set > CONFIG_HANDLE_DOMAIN_IRQ=y > CONFIG_HARDIRQS_SW_RESEND=y > CONFIG_HAS_DMA=y > CONFIG_HAS_IOMEM=y > CONFIG_HAS_IOPORT_MAP=y > -# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set > CONFIG_HAVE_ARCH_AUDITSYSCALL=y > -# CONFIG_HAVE_ARCH_BITREVERSE is not set > CONFIG_HAVE_ARCH_JUMP_LABEL=y > CONFIG_HAVE_ARCH_KGDB=y > CONFIG_HAVE_ARCH_PFN_VALID=y > CONFIG_HAVE_ARCH_SECCOMP_FILTER=y > +CONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y > CONFIG_HAVE_ARCH_TRACEHOOK=y > -# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set > -CONFIG_HAVE_CC_STACKPROTECTOR=y > CONFIG_HAVE_CLK=y > CONFIG_HAVE_CLK_PREPARE=y > CONFIG_HAVE_CONTEXT_TRACKING=y > CONFIG_HAVE_C_RECORDMCOUNT=y > CONFIG_HAVE_DEBUG_KMEMLEAK=y > -CONFIG_HAVE_DMA_API_DEBUG=y > CONFIG_HAVE_DMA_CONTIGUOUS=y > CONFIG_HAVE_DYNAMIC_FTRACE=y > CONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y > @@ -153,6 +150,7 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y > CONFIG_HAVE_FUNCTION_TRACER=y > CONFIG_HAVE_GENERIC_DMA_COHERENT=y > CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y > +CONFIG_HAVE_LD_DEAD_CODE_DATA_ELIMINATION=y > CONFIG_HAVE_MEMBLOCK=y &g
Re: [OpenWrt-Devel] [PATCH] uboot-mxs: bump to v2019.07
Hi wigyori, Am Mittwoch, 31. Juli 2019, 23:42:45 CEST schrieb Michael Heimpold: > Also update the U-Boot BSP patch for I2SE Duckbill devices. > > Run tested on I2SE Duckbill and Olimex OLinuXino Maxi boards. any objections on this patch? Regards, mhei > > Signed-off-by: Michael Heimpold > --- > package/boot/uboot-mxs/Makefile | 4 ++-- > .../uboot-mxs/patches/001-add-i2se-duckbill.patch | 13 +++-- > 2 files changed, 9 insertions(+), 8 deletions(-) > > diff --git a/package/boot/uboot-mxs/Makefile > b/package/boot/uboot-mxs/Makefile index c4485f5b3d..da98496895 100644 > --- a/package/boot/uboot-mxs/Makefile > +++ b/package/boot/uboot-mxs/Makefile > @@ -8,10 +8,10 @@ > include $(TOPDIR)/rules.mk > include $(INCLUDE_DIR)/kernel.mk > > -PKG_VERSION:=2019.01 > +PKG_VERSION:=2019.07 > PKG_RELEASE:=1 > > -PKG_HASH:=50bd7e5a466ab828914d080d5f6a432345b500e8fba1ad3b7b61e95e60d51c22 > +PKG_HASH:=bff4fa77e8da17521c030ca4c5b947a056c1b1be4d3e6ee8637020b8d50251d0 > > include $(INCLUDE_DIR)/u-boot.mk > include $(INCLUDE_DIR)/package.mk > diff --git a/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch > b/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch index > 9acb6a508d..e0ac283827 100644 > --- a/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch > +++ b/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch > @@ -1,4 +1,4 @@ > -From 6af0148a38b23ba761905f98a7211fab986033ce Mon Sep 17 00:00:00 2001 > +From 85d7689cbd3a8162153f445a0656d57122c58d90 Mon Sep 17 00:00:00 2001 > From: Michael Heimpold > Date: Thu, 13 Sep 2018 21:40:19 +0200 > Subject: [PATCH] arm: mxs: add support for I2SE's Duckbill boards > @@ -32,9 +32,9 @@ Signed-off-by: Stefan Wahren > board/i2se/duckbill/Makefile| 10 ++ > board/i2se/duckbill/duckbill.c | 186 > board/i2se/duckbill/iomux.c | 156 +++ > - configs/duckbill_defconfig | 38 +++ > + configs/duckbill_defconfig | 39 +++ > include/configs/duckbill.h | 179 ++ > - 8 files changed, 595 insertions(+) > + 8 files changed, 596 insertions(+) > create mode 100644 board/i2se/duckbill/Kconfig > create mode 100644 board/i2se/duckbill/MAINTAINERS > create mode 100644 board/i2se/duckbill/Makefile > @@ -471,10 +471,10 @@ index 00..1db3c52c34 > +} > diff --git a/configs/duckbill_defconfig b/configs/duckbill_defconfig > new file mode 100644 > -index 00..f92a67d53d > +index 00..9dea20a87d > --- /dev/null > +++ b/configs/duckbill_defconfig > -@@ -0,0 +1,38 @@ > +@@ -0,0 +1,39 @@ > +CONFIG_ARM=y > +CONFIG_ARCH_MX28=y > +CONFIG_SYS_TEXT_BASE=0x40002000 > @@ -483,14 +483,15 @@ index 00..f92a67d53d > +CONFIG_SPL_LIBGENERIC_SUPPORT=y > +CONFIG_TARGET_DUCKBILL=y > +CONFIG_SPL_SERIAL_SUPPORT=y > -+CONFIG_SPL=y > +CONFIG_NR_DRAM_BANKS=1 > ++CONFIG_SPL=y > +CONFIG_BOOTDELAY=1 > +CONFIG_SYS_CONSOLE_IS_IN_ENV=y > +CONFIG_VERSION_VARIABLE=y > +# CONFIG_DISPLAY_BOARDINFO is not set > +CONFIG_ARCH_MISC_INIT=y > +# CONFIG_SPL_FRAMEWORK is not set > ++CONFIG_SPL_TEXT_BASE=0x1000 > +CONFIG_HUSH_PARSER=y > +CONFIG_CMD_BOOTZ=y > +# CONFIG_CMD_ELF is not set signature.asc Description: This is a digitally signed message part. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] mxs: add support and switch to kernel 4.19
Also remove kernel 4.14 support and the meanwhile obsolete patch. This was run-tested on I2SE Duckbill device and Olimex OLinuXino Maxi board. Signed-off-by: Michael Heimpold --- target/linux/mxs/Makefile | 2 +- target/linux/mxs/{config-4.14 => config-4.19} | 42 +++ ...0-crypto-mxsdcp-provide-importexport.patch | 51 --- 3 files changed, 19 insertions(+), 76 deletions(-) rename target/linux/mxs/{config-4.14 => config-4.19} (89%) delete mode 100644 target/linux/mxs/patches-4.14/110-crypto-mxsdcp-provide-importexport.patch diff --git a/target/linux/mxs/Makefile b/target/linux/mxs/Makefile index 39064ae1ae..96aba031d7 100644 --- a/target/linux/mxs/Makefile +++ b/target/linux/mxs/Makefile @@ -13,7 +13,7 @@ FEATURES:=ext4 rtc usb gpio CPU_TYPE:=arm926ej-s MAINTAINER:=Zoltan HERPAI -KERNEL_PATCHVER:=4.14 +KERNEL_PATCHVER:=4.19 KERNELNAME:=zImage dtbs define Target/Description diff --git a/target/linux/mxs/config-4.14 b/target/linux/mxs/config-4.19 similarity index 89% rename from target/linux/mxs/config-4.14 rename to target/linux/mxs/config-4.19 index abad1807cd..4daf49f809 100644 --- a/target/linux/mxs/config-4.14 +++ b/target/linux/mxs/config-4.19 @@ -2,7 +2,11 @@ CONFIG_ALIGNMENT_TRAP=y CONFIG_ARCH_CLOCKSOURCE_DATA=y CONFIG_ARCH_HAS_DEBUG_VIRTUAL=y CONFIG_ARCH_HAS_ELF_RANDOMIZE=y +CONFIG_ARCH_HAS_FORTIFY_SOURCE=y CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y +CONFIG_ARCH_HAS_KCOV=y +CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y +CONFIG_ARCH_HAS_PHYS_TO_DMA=y CONFIG_ARCH_HAS_SET_MEMORY=y CONFIG_ARCH_HAS_SG_CHAIN=y CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y @@ -19,9 +23,6 @@ CONFIG_ARCH_MULTI_V5=y CONFIG_ARCH_MXS=y CONFIG_ARCH_NR_GPIO=0 CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y -# CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT is not set -# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set -# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y CONFIG_ARCH_SUPPORTS_UPROBES=y CONFIG_ARCH_SUSPEND_POSSIBLE=y @@ -43,7 +44,7 @@ CONFIG_ARM_PATCH_PHYS_VIRT=y CONFIG_ARM_THUMB=y CONFIG_ATAGS=y CONFIG_AUTO_ZRELADDR=y -# CONFIG_CACHE_L2X0 is not set +CONFIG_CC_HAS_ASM_GOTO=y CONFIG_CLKDEV_LOOKUP=y CONFIG_CLKSRC_MMIO=y CONFIG_CLONE_BACKWARDS=y @@ -84,7 +85,6 @@ CONFIG_CRYPTO_RNG2=y CONFIG_CRYPTO_WORKQUEUE=y CONFIG_DEBUG_ALIGN_RODATA=y CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" -# CONFIG_DEBUG_UART_8250 is not set # CONFIG_DEBUG_USER is not set CONFIG_DMADEVICES=y CONFIG_DMA_ENGINE=y @@ -98,7 +98,9 @@ CONFIG_FEC=y CONFIG_FIXED_PHY=y CONFIG_FIX_EARLYCON_MEM=y CONFIG_FRAME_POINTER=y +CONFIG_FS_IOMAP=y CONFIG_FS_MBCACHE=y +CONFIG_GCC_VERSION=80300 CONFIG_GENERIC_ALLOCATOR=y CONFIG_GENERIC_ATOMIC64=y CONFIG_GENERIC_BUG=y @@ -106,8 +108,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y CONFIG_GENERIC_CPU_AUTOPROBE=y CONFIG_GENERIC_EARLY_IOREMAP=y CONFIG_GENERIC_IDLE_POLL_SETUP=y -CONFIG_GENERIC_IO=y CONFIG_GENERIC_IRQ_CHIP=y +CONFIG_GENERIC_IRQ_MULTI_HANDLER=y CONFIG_GENERIC_IRQ_SHOW=y CONFIG_GENERIC_IRQ_SHOW_LEVEL=y CONFIG_GENERIC_PCI_IOMAP=y @@ -122,28 +124,23 @@ CONFIG_GPIO_GENERIC=y CONFIG_GPIO_GENERIC_PLATFORM=y CONFIG_GPIO_MXS=y CONFIG_GPIO_SYSFS=y -# CONFIG_GRO_CELLS is not set CONFIG_HANDLE_DOMAIN_IRQ=y CONFIG_HARDIRQS_SW_RESEND=y CONFIG_HAS_DMA=y CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT_MAP=y -# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set CONFIG_HAVE_ARCH_AUDITSYSCALL=y -# CONFIG_HAVE_ARCH_BITREVERSE is not set CONFIG_HAVE_ARCH_JUMP_LABEL=y CONFIG_HAVE_ARCH_KGDB=y CONFIG_HAVE_ARCH_PFN_VALID=y CONFIG_HAVE_ARCH_SECCOMP_FILTER=y +CONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y CONFIG_HAVE_ARCH_TRACEHOOK=y -# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set -CONFIG_HAVE_CC_STACKPROTECTOR=y CONFIG_HAVE_CLK=y CONFIG_HAVE_CLK_PREPARE=y CONFIG_HAVE_CONTEXT_TRACKING=y CONFIG_HAVE_C_RECORDMCOUNT=y CONFIG_HAVE_DEBUG_KMEMLEAK=y -CONFIG_HAVE_DMA_API_DEBUG=y CONFIG_HAVE_DMA_CONTIGUOUS=y CONFIG_HAVE_DYNAMIC_FTRACE=y CONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y @@ -153,6 +150,7 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y CONFIG_HAVE_FUNCTION_TRACER=y CONFIG_HAVE_GENERIC_DMA_COHERENT=y CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y +CONFIG_HAVE_LD_DEAD_CODE_DATA_ELIMINATION=y CONFIG_HAVE_MEMBLOCK=y CONFIG_HAVE_MOD_ARCH_SPECIFIC=y CONFIG_HAVE_NET_DSA=y @@ -163,6 +161,7 @@ CONFIG_HAVE_PERF_REGS=y CONFIG_HAVE_PERF_USER_STACK_DUMP=y CONFIG_HAVE_PROC_CPU=y CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y +CONFIG_HAVE_RSEQ=y CONFIG_HAVE_SYSCALL_TRACEPOINTS=y CONFIG_HAVE_UID16=y CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y @@ -185,7 +184,6 @@ CONFIG_IIO_SYSFS_TRIGGER=y CONFIG_IIO_TRIGGER=y CONFIG_INITRAMFS_SOURCE="" CONFIG_INPUT=y -CONFIG_IOMMU_HELPER=y CONFIG_IRQCHIP=y CONFIG_IRQ_DOMAIN=y CONFIG_IRQ_FORCED_THREADING=y @@ -194,18 +192,21 @@ CONFIG_IRQ_WORK=y # CONFIG_ISDN is not set CONFIG_JBD2=y CONFIG_LIBFDT=y +CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_MDIO_BUS=y CONFIG_MDIO_DEVICE=y +CONFIG_MEMFD_CREATE=y CONFIG_MFD_CORE=y CONFIG_MFD_MXS_LRADC=
[OpenWrt-Devel] [PATCH] uboot-mxs: bump to v2019.07
Also update the U-Boot BSP patch for I2SE Duckbill devices. Run tested on I2SE Duckbill and Olimex OLinuXino Maxi boards. Signed-off-by: Michael Heimpold --- package/boot/uboot-mxs/Makefile | 4 ++-- .../uboot-mxs/patches/001-add-i2se-duckbill.patch | 13 +++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/package/boot/uboot-mxs/Makefile b/package/boot/uboot-mxs/Makefile index c4485f5b3d..da98496895 100644 --- a/package/boot/uboot-mxs/Makefile +++ b/package/boot/uboot-mxs/Makefile @@ -8,10 +8,10 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk -PKG_VERSION:=2019.01 +PKG_VERSION:=2019.07 PKG_RELEASE:=1 -PKG_HASH:=50bd7e5a466ab828914d080d5f6a432345b500e8fba1ad3b7b61e95e60d51c22 +PKG_HASH:=bff4fa77e8da17521c030ca4c5b947a056c1b1be4d3e6ee8637020b8d50251d0 include $(INCLUDE_DIR)/u-boot.mk include $(INCLUDE_DIR)/package.mk diff --git a/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch b/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch index 9acb6a508d..e0ac283827 100644 --- a/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch +++ b/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch @@ -1,4 +1,4 @@ -From 6af0148a38b23ba761905f98a7211fab986033ce Mon Sep 17 00:00:00 2001 +From 85d7689cbd3a8162153f445a0656d57122c58d90 Mon Sep 17 00:00:00 2001 From: Michael Heimpold Date: Thu, 13 Sep 2018 21:40:19 +0200 Subject: [PATCH] arm: mxs: add support for I2SE's Duckbill boards @@ -32,9 +32,9 @@ Signed-off-by: Stefan Wahren board/i2se/duckbill/Makefile| 10 ++ board/i2se/duckbill/duckbill.c | 186 board/i2se/duckbill/iomux.c | 156 +++ - configs/duckbill_defconfig | 38 +++ + configs/duckbill_defconfig | 39 +++ include/configs/duckbill.h | 179 ++ - 8 files changed, 595 insertions(+) + 8 files changed, 596 insertions(+) create mode 100644 board/i2se/duckbill/Kconfig create mode 100644 board/i2se/duckbill/MAINTAINERS create mode 100644 board/i2se/duckbill/Makefile @@ -471,10 +471,10 @@ index 00..1db3c52c34 +} diff --git a/configs/duckbill_defconfig b/configs/duckbill_defconfig new file mode 100644 -index 00..f92a67d53d +index 00..9dea20a87d --- /dev/null +++ b/configs/duckbill_defconfig -@@ -0,0 +1,38 @@ +@@ -0,0 +1,39 @@ +CONFIG_ARM=y +CONFIG_ARCH_MX28=y +CONFIG_SYS_TEXT_BASE=0x40002000 @@ -483,14 +483,15 @@ index 00..f92a67d53d +CONFIG_SPL_LIBGENERIC_SUPPORT=y +CONFIG_TARGET_DUCKBILL=y +CONFIG_SPL_SERIAL_SUPPORT=y -+CONFIG_SPL=y +CONFIG_NR_DRAM_BANKS=1 ++CONFIG_SPL=y +CONFIG_BOOTDELAY=1 +CONFIG_SYS_CONSOLE_IS_IN_ENV=y +CONFIG_VERSION_VARIABLE=y +# CONFIG_DISPLAY_BOARDINFO is not set +CONFIG_ARCH_MISC_INIT=y +# CONFIG_SPL_FRAMEWORK is not set ++CONFIG_SPL_TEXT_BASE=0x1000 +CONFIG_HUSH_PARSER=y +CONFIG_CMD_BOOTZ=y +# CONFIG_CMD_ELF is not set -- 2.17.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] uboot-mxs: bump to v2019.07
Also update the U-Boot BSP patch for I2SE Duckbill devices. Run tested on I2SE Duckbill and Olimex OLinuXino Maxi boards. Signed-off-by: Michael Heimpold --- package/boot/uboot-mxs/Makefile | 4 ++-- .../uboot-mxs/patches/001-add-i2se-duckbill.patch | 13 +++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/package/boot/uboot-mxs/Makefile b/package/boot/uboot-mxs/Makefile index c4485f5b3d..da98496895 100644 --- a/package/boot/uboot-mxs/Makefile +++ b/package/boot/uboot-mxs/Makefile @@ -8,10 +8,10 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk -PKG_VERSION:=2019.01 +PKG_VERSION:=2019.07 PKG_RELEASE:=1 -PKG_HASH:=50bd7e5a466ab828914d080d5f6a432345b500e8fba1ad3b7b61e95e60d51c22 +PKG_HASH:=bff4fa77e8da17521c030ca4c5b947a056c1b1be4d3e6ee8637020b8d50251d0 include $(INCLUDE_DIR)/u-boot.mk include $(INCLUDE_DIR)/package.mk diff --git a/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch b/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch index 9acb6a508d..e0ac283827 100644 --- a/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch +++ b/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch @@ -1,4 +1,4 @@ -From 6af0148a38b23ba761905f98a7211fab986033ce Mon Sep 17 00:00:00 2001 +From 85d7689cbd3a8162153f445a0656d57122c58d90 Mon Sep 17 00:00:00 2001 From: Michael Heimpold Date: Thu, 13 Sep 2018 21:40:19 +0200 Subject: [PATCH] arm: mxs: add support for I2SE's Duckbill boards @@ -32,9 +32,9 @@ Signed-off-by: Stefan Wahren board/i2se/duckbill/Makefile| 10 ++ board/i2se/duckbill/duckbill.c | 186 board/i2se/duckbill/iomux.c | 156 +++ - configs/duckbill_defconfig | 38 +++ + configs/duckbill_defconfig | 39 +++ include/configs/duckbill.h | 179 ++ - 8 files changed, 595 insertions(+) + 8 files changed, 596 insertions(+) create mode 100644 board/i2se/duckbill/Kconfig create mode 100644 board/i2se/duckbill/MAINTAINERS create mode 100644 board/i2se/duckbill/Makefile @@ -471,10 +471,10 @@ index 00..1db3c52c34 +} diff --git a/configs/duckbill_defconfig b/configs/duckbill_defconfig new file mode 100644 -index 00..f92a67d53d +index 00..9dea20a87d --- /dev/null +++ b/configs/duckbill_defconfig -@@ -0,0 +1,38 @@ +@@ -0,0 +1,39 @@ +CONFIG_ARM=y +CONFIG_ARCH_MX28=y +CONFIG_SYS_TEXT_BASE=0x40002000 @@ -483,14 +483,15 @@ index 00..f92a67d53d +CONFIG_SPL_LIBGENERIC_SUPPORT=y +CONFIG_TARGET_DUCKBILL=y +CONFIG_SPL_SERIAL_SUPPORT=y -+CONFIG_SPL=y +CONFIG_NR_DRAM_BANKS=1 ++CONFIG_SPL=y +CONFIG_BOOTDELAY=1 +CONFIG_SYS_CONSOLE_IS_IN_ENV=y +CONFIG_VERSION_VARIABLE=y +# CONFIG_DISPLAY_BOARDINFO is not set +CONFIG_ARCH_MISC_INIT=y +# CONFIG_SPL_FRAMEWORK is not set ++CONFIG_SPL_TEXT_BASE=0x1000 +CONFIG_HUSH_PARSER=y +CONFIG_CMD_BOOTZ=y +# CONFIG_CMD_ELF is not set -- 2.17.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 3/3 v2] gemini: Fix MAC address assignment for DIR-685
Hi, Am Dienstag, 11. Juni 2019, 23:06:55 CEST schrieb Linus Walleij: > The DIR-685 has the MAC addresses in the RedBoot code just like > DNS-313. Check some magic numbers to determine that the MAC > address is where we want it and extract it from RedBoot. > > Signed-off-by: Linus Walleij > --- > ChangeLog v1->v2: > - Rebase on the other patches > - Use library functions to get partition and hex MAC address > - Use ip to set up mac address > --- > .../lib/preinit/05_set_ether_mac_gemini | 15 +++ > 1 file changed, 15 insertions(+) > > diff --git > a/target/linux/gemini/base-files/lib/preinit/05_set_ether_mac_gemini > b/target/linux/gemini/base-files/lib/preinit/05_set_ether_mac_gemini index > a51c223d85c9..f702e0458c2e 100644 > --- a/target/linux/gemini/base-files/lib/preinit/05_set_ether_mac_gemini > +++ b/target/linux/gemini/base-files/lib/preinit/05_set_ether_mac_gemini > @@ -18,6 +18,21 @@ set_ether_mac() { > fi > fi > ;; > + dlink,dir-685) > + # The DIR-685 has a special field in its RedBoot > + # binary that we need to check > + part=$(find_mtd_part RedBoot) > + if [ ! -z $part ] ; then missing quotes here? and is "! -z " not equal to "-n" ? > + DEVID="$(dd if=$part bs=1 skip=81516 count=7 > 2>/dev/null)" > + if [ "x$DEVID" = "xILI9322" ] ; then not sure whether we have a style guide for shell, but personally I don't like the x in front of the values: since you already quote properly, it seems not to be necessary. > + MAC1=$(mtd_get_mac_binary RedBoot 95040) > + MAC2=$(mtd_get_mac_binary RedBoot 95046) > + ifconfig eth0 hw ether $MAC1 2>/dev/null > + ifconfig eth1 hw ether $MAC2 2>/dev/null missing quotes? just to be sure? Best regards, mhei > + return 0 > + fi > + fi > + ;; > esac > > # Most devices have a standard "VCTL" partition signature.asc Description: This is a digitally signed message part. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH procd 1/4] instance: add support for customizable syslog facilities
Signed-off-by: Michael Heimpold --- service/instance.c | 32 +++- service/instance.h | 1 + 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/service/instance.c b/service/instance.c index 3512f66..d37d872 100644 --- a/service/instance.c +++ b/service/instance.c @@ -26,6 +26,8 @@ #include #include #include +#define SYSLOG_NAMES +#include #include @@ -57,6 +59,7 @@ enum { INSTANCE_ATTR_PIDFILE, INSTANCE_ATTR_RELOADSIG, INSTANCE_ATTR_TERMTIMEOUT, + INSTANCE_ATTR_FACILITY, __INSTANCE_ATTR_MAX }; @@ -82,6 +85,7 @@ static const struct blobmsg_policy instance_attr[__INSTANCE_ATTR_MAX] = { [INSTANCE_ATTR_PIDFILE] = { "pidfile", BLOBMSG_TYPE_STRING }, [INSTANCE_ATTR_RELOADSIG] = { "reload_signal", BLOBMSG_TYPE_INT32 }, [INSTANCE_ATTR_TERMTIMEOUT] = { "term_timeout", BLOBMSG_TYPE_INT32 }, + [INSTANCE_ATTR_FACILITY] = { "facility", BLOBMSG_TYPE_STRING }, }; enum { @@ -148,6 +152,18 @@ static void closefd(int fd) close(fd); } +/* convert a string into numeric syslog facility or return -1 if no match found */ +static int +syslog_facility_str_to_int(const char *facility) +{ + CODE *p = facilitynames; + + while (p->c_name && strcasecmp(p->c_name, facility)) + p++; + + return p->c_val; +} + static void instance_limits(const char *limit, const char *value) { @@ -466,7 +482,7 @@ instance_stdio(struct ustream *s, int prio, struct service_instance *in) arg0 = basename(blobmsg_data(blobmsg_data(in->command))); snprintf(ident, sizeof(ident), "%s[%d]", arg0, in->proc.pid); - ulog_open(ULOG_SYSLOG, LOG_DAEMON, ident); + ulog_open(ULOG_SYSLOG, in->syslog_facility, ident); do { str = ustream_get_read_buf(s, &len); @@ -628,6 +644,9 @@ instance_config_changed(struct service_instance *in, struct service_instance *in if (in->nice != in_new->nice) return true; + if (in->syslog_facility != in_new->syslog_facility) + return true; + if (string_changed(in->user, in_new->user)) return true; @@ -938,6 +957,15 @@ instance_config_parse(struct service_instance *in) if (!instance_fill_array(&in->errors, tb[INSTANCE_ATTR_ERROR], NULL, true)) return false; + if (tb[INSTANCE_ATTR_FACILITY]) { + int facility = syslog_facility_str_to_int(blobmsg_get_string(tb[INSTANCE_ATTR_FACILITY])); + if (facility != -1) { + in->syslog_facility = facility; + DEBUG(3, "setting facility '%s'\n", blobmsg_get_string(tb[INSTANCE_ATTR_FACILITY])); + } else + DEBUG(3, "unknown syslog facility '%s' given, using default (LOG_DAEMON)\n", blobmsg_get_string(tb[INSTANCE_ATTR_FACILITY])); + } + return true; } @@ -974,6 +1002,7 @@ instance_config_move(struct service_instance *in, struct service_instance *in_sr in->trace = in_src->trace; in->seccomp = in_src->seccomp; in->node.avl.key = in_src->node.avl.key; + in->syslog_facility = in_src->syslog_facility; free(in->config); in->config = in_src->config; @@ -1022,6 +1051,7 @@ instance_init(struct service_instance *in, struct service *s, struct blob_attr * in->timeout.cb = instance_timeout; in->proc.cb = instance_exit; in->term_timeout = 5; + in->syslog_facility = LOG_DAEMON; in->_stdout.fd.fd = -2; in->_stdout.stream.string_data = true; diff --git a/service/instance.h b/service/instance.h index 771406c..9300d32 100644 --- a/service/instance.h +++ b/service/instance.h @@ -59,6 +59,7 @@ struct service_instance { struct jail jail; char *seccomp; char *pidfile; + int syslog_facility; uint32_t term_timeout; uint32_t respawn_timeout; -- 2.17.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH (resend as series) procd/openwrt 0/4] procd enhancements
This series bundles two little enhancements for procd and also adds the required passing-through to the procd shell script helper. (1) Allow to specify the syslog facility for stdour/stderr syslog redirection At the moment, the instance stdout/stderr output is always logged with daemon facility which makes it hard to e.g. filter for messages. This patch allows to select an other syslog facility, e.g. local0. (2) Allow setting dedicated groupid for services Sometimes is desirable to run a process with a specific group id instead of the default one which is derived from passwd entry. Please note, that the first two patch needs to applied to procd repository while patch three and four targets OpenWrt repository (i.e. procd package). -- 2.17.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH openwrt 3/4] procd: allow passing optional syslog facility as instance parameter
While at, also add stdout/stderr documentation. Signed-off-by: Michael Heimpold --- package/system/procd/files/procd.sh | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package/system/procd/files/procd.sh b/package/system/procd/files/procd.sh index 72f25fe0c0..6115f0702f 100644 --- a/package/system/procd/files/procd.sh +++ b/package/system/procd/files/procd.sh @@ -20,6 +20,9 @@ # limits: resource limits (passed to the process) # user info: array with 1 values $username # pidfile: file name to write pid into +# stdout: boolean whether to redirect commands stdout to syslog (default: 0) +# stderr: boolean whether to redirect commands stderr to syslog (default: 0) +# facility: syslog facility used when logging to syslog (default: daemon) # # No space separation is done for arrays/tables - use one function argument per command line argument # @@ -249,7 +252,7 @@ _procd_set_param() { reload_signal) json_add_int "$type" $(kill -l "$1") ;; - pidfile|user|seccomp|capabilities) + pidfile|user|seccomp|capabilities|facility) json_add_string "$type" "$1" ;; stdout|stderr|no_new_privs) -- 2.17.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH procd 2/4] service: allow setting a dedicated group id
Sometimes is desirable to run a process with a specific group id instead of the default one which is derived from passwd entry. However, we still want to initialize supplementary group ids (including the default one), thus we have to store the specific one in a dedicated structure element. Signed-off-by: Michael Heimpold --- service/instance.c | 25 - service/instance.h | 4 +++- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/service/instance.c b/service/instance.c index d37d872..d8bd52e 100644 --- a/service/instance.c +++ b/service/instance.c @@ -50,6 +50,7 @@ enum { INSTANCE_ATTR_WATCH, INSTANCE_ATTR_ERROR, INSTANCE_ATTR_USER, + INSTANCE_ATTR_GROUP, INSTANCE_ATTR_STDOUT, INSTANCE_ATTR_STDERR, INSTANCE_ATTR_NO_NEW_PRIVS, @@ -76,6 +77,7 @@ static const struct blobmsg_policy instance_attr[__INSTANCE_ATTR_MAX] = { [INSTANCE_ATTR_WATCH] = { "watch", BLOBMSG_TYPE_ARRAY }, [INSTANCE_ATTR_ERROR] = { "error", BLOBMSG_TYPE_ARRAY }, [INSTANCE_ATTR_USER] = { "user", BLOBMSG_TYPE_STRING }, + [INSTANCE_ATTR_GROUP] = { "group", BLOBMSG_TYPE_STRING }, [INSTANCE_ATTR_STDOUT] = { "stdout", BLOBMSG_TYPE_BOOL }, [INSTANCE_ATTR_STDERR] = { "stderr", BLOBMSG_TYPE_BOOL }, [INSTANCE_ATTR_NO_NEW_PRIVS] = { "no_new_privs", BLOBMSG_TYPE_BOOL }, @@ -364,12 +366,12 @@ instance_run(struct service_instance *in, int _stdout, int _stderr) closefd(_stderr); } - if (in->user && in->gid && initgroups(in->user, in->gid)) { + if (in->user && in->pw_gid && initgroups(in->user, in->pw_gid)) { ERROR("failed to initgroups() for user %s: %m\n", in->user); exit(127); } - if (in->gid && setgid(in->gid)) { - ERROR("failed to set group id %d: %m\n", in->gid); + if (in->gr_gid && setgid(in->gr_gid)) { + ERROR("failed to set group id %d: %m\n", in->gr_gid); exit(127); } if (in->uid && setuid(in->uid)) { @@ -650,10 +652,13 @@ instance_config_changed(struct service_instance *in, struct service_instance *in if (string_changed(in->user, in_new->user)) return true; + if (string_changed(in->group, in_new->group)) + return true; + if (in->uid != in_new->uid) return true; - if (in->gid != in_new->gid) + if (in->pw_gid != in_new->pw_gid) return true; if (string_changed(in->pidfile, in_new->pidfile)) @@ -909,7 +914,16 @@ instance_config_parse(struct service_instance *in) if (p) { in->user = strdup(user); in->uid = p->pw_uid; - in->gid = p->pw_gid; + in->gr_gid = in->pw_gid = p->pw_gid; + } + } + + if (tb[INSTANCE_ATTR_GROUP]) { + const char *group = blobmsg_get_string(tb[INSTANCE_ATTR_GROUP]); + struct group *p = getgrnam(group); + if (p) { + in->group = strdup(group); + in->gr_gid = p->gr_gid; } } @@ -1038,6 +1052,7 @@ instance_free(struct service_instance *in) instance_config_cleanup(in); free(in->config); free(in->user); + free(in->group); free(in); } diff --git a/service/instance.h b/service/instance.h index 9300d32..42cc4be 100644 --- a/service/instance.h +++ b/service/instance.h @@ -44,7 +44,9 @@ struct service_instance { char *user; uid_t uid; - gid_t gid; + gid_t pw_gid; + char *group; + gid_t gr_gid; bool halt; bool restart; -- 2.17.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH openwrt 4/4] procd: allow passing optional group instance parameter
Signed-off-by: Michael Heimpold --- package/system/procd/files/procd.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package/system/procd/files/procd.sh b/package/system/procd/files/procd.sh index 6115f0702f..b49b2b9d01 100644 --- a/package/system/procd/files/procd.sh +++ b/package/system/procd/files/procd.sh @@ -18,7 +18,8 @@ # file: configuration files (array) # netdev: bound network device (detects ifindex changes) # limits: resource limits (passed to the process) -# user info: array with 1 values $username +# user: $username to run service as +# group: $groupname to run service as # pidfile: file name to write pid into # stdout: boolean whether to redirect commands stdout to syslog (default: 0) # stderr: boolean whether to redirect commands stderr to syslog (default: 0) @@ -252,7 +253,7 @@ _procd_set_param() { reload_signal) json_add_int "$type" $(kill -l "$1") ;; - pidfile|user|seccomp|capabilities|facility) + pidfile|user|group|seccomp|capabilities|facility) json_add_string "$type" "$1" ;; stdout|stderr|no_new_privs) -- 2.17.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] instance: add support for customizable syslog facilities
Hi, Am Mittwoch, 10. April 2019, 15:47:21 CEST schrieb Hans Dedecker: > Hi, > > On Sun, Mar 31, 2019 at 10:11 PM Michael Heimpold wrote: > > This allow using a different (read: user-defined) syslog facility > > other than LOG_DAEMON when an instance's stdout/stderr is forwarded > > to syslog. > > It might be used to handle such messages different, e.g. > > filter/forward them etc. > > Did you also submit a patch which allows to set the syslog facility > via procd_set_param as I could not find it ? no, not yet. After I realized that this patch would modify same lines in procd.sh like my other patch for group support, I decided to just wait for some feedback first. I could also bundle all changes into a combined series, please advice. mhei > > Hans > > > Signed-off-by: Michael Heimpold > > --- > > > > service/instance.c | 34 +- > > service/instance.h | 1 + > > 2 files changed, 34 insertions(+), 1 deletion(-) > > > > diff --git a/service/instance.c b/service/instance.c > > index 3b92536..983494b 100644 > > --- a/service/instance.c > > +++ b/service/instance.c > > @@ -26,6 +26,8 @@ > > > > #include > > #include > > #include > > > > +#define SYSLOG_NAMES > > +#include > > > > #include > > > > @@ -58,6 +60,7 @@ enum { > > > > INSTANCE_ATTR_PIDFILE, > > INSTANCE_ATTR_RELOADSIG, > > INSTANCE_ATTR_TERMTIMEOUT, > > > > + INSTANCE_ATTR_FACILITY, > > > > __INSTANCE_ATTR_MAX > > > > }; > > > > @@ -84,6 +87,7 @@ static const struct blobmsg_policy > > instance_attr[__INSTANCE_ATTR_MAX] = {> > > [INSTANCE_ATTR_PIDFILE] = { "pidfile", BLOBMSG_TYPE_STRING }, > > [INSTANCE_ATTR_RELOADSIG] = { "reload_signal", BLOBMSG_TYPE_INT32 > > }, > > [INSTANCE_ATTR_TERMTIMEOUT] = { "term_timeout", BLOBMSG_TYPE_INT32 > > }, > > > > + [INSTANCE_ATTR_FACILITY] = { "facility", BLOBMSG_TYPE_STRING }, > > > > }; > > > > enum { > > > > @@ -150,6 +154,18 @@ static void closefd(int fd) > > > > close(fd); > > > > } > > > > +/* convert a string into numeric syslog facility or return -1 if no match > > found */ +static int > > +syslog_facility_str_to_int(const char *facility) > > +{ > > + CODE *p = facilitynames; > > + > > + while (p->c_name && strcasecmp(p->c_name, facility)) > > + p++; > > + > > + return p->c_val; > > +} > > + > > > > static void > > instance_limits(const char *limit, const char *value) > > { > > > > @@ -468,7 +484,7 @@ instance_stdio(struct ustream *s, int prio, struct > > service_instance *in)> > > arg0 = basename(blobmsg_data(blobmsg_data(in->command))); > > snprintf(ident, sizeof(ident), "%s[%d]", arg0, in->proc.pid); > > > > - ulog_open(ULOG_SYSLOG, LOG_DAEMON, ident); > > + ulog_open(ULOG_SYSLOG, in->syslog_facility, ident); > > > > do { > > > > str = ustream_get_read_buf(s, &len); > > > > @@ -622,6 +638,9 @@ instance_config_changed(struct service_instance *in, > > struct service_instance *in> > > if (in->nice != in_new->nice) > > > > return true; > > > > + if (in->syslog_facility != in_new->syslog_facility) > > + return true; > > + > > > > if (string_changed(in->user, in_new->user)) > > > > return true; > > > > @@ -944,6 +963,17 @@ instance_config_parse(struct service_instance *in) > > > > if (!instance_fill_array(&in->errors, tb[INSTANCE_ATTR_ERROR], > > NULL, true)) > > > > return false; > > > > + if (tb[INSTANCE_ATTR_FACILITY]) { > > + int facility = > > syslog_facility_str_to_int(blobmsg_get_string(tb[INSTANCE_ATTR_FACILITY]) > > ); + if (facility != -1) { > > + DEBUG(3, "setting facility '%s'\n", > > blobmsg_get_string(tb[INSTANCE_ATTR_FACILITY])); + > > in->syslog_facility = facility; > > + } else { > > + DEBUG(3, "unknown syslog
[OpenWrt-Devel] [PATCH v2] base-files/hotplug: fix dedicated group for tty devices
Commit 124ab1dc0a and 5523ee3459 introduced the assignment of the group "tty" to /dev/tty* devices in order to support unprivileged user access to serial devices. However, due to an improperly rebased commit this feature broke. This patch restores the lost hunk in hotplug.json file to re-introduce this feature and also renames the existing "tty" group to "dialout" as this is the more typical name for such a group on desktop systems. Fixes: 5209cfa534 ("procd: fix hotplug.json syntax") Signed-off-by: Michael Heimpold --- @jow: I was not sure whether I should keep the group id 5 for dialout, so I just compared the other group ids with my Debian system and found that they are all equal. So I just decided to keep the 20 for dialout to also match the Debian scheme. Please advice if you think we should stay with 5 to not break any existing stuff? package/base-files/files/etc/group | 2 +- package/system/procd/files/hotplug.json | 4 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/package/base-files/files/etc/group b/package/base-files/files/etc/group index e8e2adf4ac..5b06dc6db9 100644 --- a/package/base-files/files/etc/group +++ b/package/base-files/files/etc/group @@ -1,8 +1,8 @@ root:x:0: daemon:x:1: adm:x:4: -tty:x:5: mail:x:8: +dialout:x:20: audio:x:29: www-data:x:33: ftp:x:55: diff --git a/package/system/procd/files/hotplug.json b/package/system/procd/files/hotplug.json index 1c949bbea3..f676bac79e 100644 --- a/package/system/procd/files/hotplug.json +++ b/package/system/procd/files/hotplug.json @@ -20,6 +20,10 @@ [ "regex", "DEVNAME", "^snd" ], [ "makedev", "/dev/%DEVNAME%", "0660", "audio" ] ], + [ "if", + [ "regex", "DEVNAME", "^tty" ], + [ "makedev", "/dev/%DEVNAME%", "0660", "dialout" ] + ], [ "if", [ "has", "DEVNAME" ], [ "makedev", "/dev/%DEVNAME%", "0600" ] -- 2.17.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] instance: add support for customizable syslog facilities
This allow using a different (read: user-defined) syslog facility other than LOG_DAEMON when an instance's stdout/stderr is forwarded to syslog. It might be used to handle such messages different, e.g. filter/forward them etc. Signed-off-by: Michael Heimpold --- service/instance.c | 34 +- service/instance.h | 1 + 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/service/instance.c b/service/instance.c index 3b92536..983494b 100644 --- a/service/instance.c +++ b/service/instance.c @@ -26,6 +26,8 @@ #include #include #include +#define SYSLOG_NAMES +#include #include @@ -58,6 +60,7 @@ enum { INSTANCE_ATTR_PIDFILE, INSTANCE_ATTR_RELOADSIG, INSTANCE_ATTR_TERMTIMEOUT, + INSTANCE_ATTR_FACILITY, __INSTANCE_ATTR_MAX }; @@ -84,6 +87,7 @@ static const struct blobmsg_policy instance_attr[__INSTANCE_ATTR_MAX] = { [INSTANCE_ATTR_PIDFILE] = { "pidfile", BLOBMSG_TYPE_STRING }, [INSTANCE_ATTR_RELOADSIG] = { "reload_signal", BLOBMSG_TYPE_INT32 }, [INSTANCE_ATTR_TERMTIMEOUT] = { "term_timeout", BLOBMSG_TYPE_INT32 }, + [INSTANCE_ATTR_FACILITY] = { "facility", BLOBMSG_TYPE_STRING }, }; enum { @@ -150,6 +154,18 @@ static void closefd(int fd) close(fd); } +/* convert a string into numeric syslog facility or return -1 if no match found */ +static int +syslog_facility_str_to_int(const char *facility) +{ + CODE *p = facilitynames; + + while (p->c_name && strcasecmp(p->c_name, facility)) + p++; + + return p->c_val; +} + static void instance_limits(const char *limit, const char *value) { @@ -468,7 +484,7 @@ instance_stdio(struct ustream *s, int prio, struct service_instance *in) arg0 = basename(blobmsg_data(blobmsg_data(in->command))); snprintf(ident, sizeof(ident), "%s[%d]", arg0, in->proc.pid); - ulog_open(ULOG_SYSLOG, LOG_DAEMON, ident); + ulog_open(ULOG_SYSLOG, in->syslog_facility, ident); do { str = ustream_get_read_buf(s, &len); @@ -622,6 +638,9 @@ instance_config_changed(struct service_instance *in, struct service_instance *in if (in->nice != in_new->nice) return true; + if (in->syslog_facility != in_new->syslog_facility) + return true; + if (string_changed(in->user, in_new->user)) return true; @@ -944,6 +963,17 @@ instance_config_parse(struct service_instance *in) if (!instance_fill_array(&in->errors, tb[INSTANCE_ATTR_ERROR], NULL, true)) return false; + if (tb[INSTANCE_ATTR_FACILITY]) { + int facility = syslog_facility_str_to_int(blobmsg_get_string(tb[INSTANCE_ATTR_FACILITY])); + if (facility != -1) { + DEBUG(3, "setting facility '%s'\n", blobmsg_get_string(tb[INSTANCE_ATTR_FACILITY])); + in->syslog_facility = facility; + } else { + DEBUG(3, "unknown syslog facility '%s' given, using default (LOG_DAEMON)\n", blobmsg_get_string(tb[INSTANCE_ATTR_FACILITY])); + in->syslog_facility = LOG_DAEMON; + } + } + return true; } @@ -980,6 +1010,7 @@ instance_config_move(struct service_instance *in, struct service_instance *in_sr in->trace = in_src->trace; in->seccomp = in_src->seccomp; in->node.avl.key = in_src->node.avl.key; + in->syslog_facility = in_src->syslog_facility; free(in->config); in->config = in_src->config; @@ -1029,6 +1060,7 @@ instance_init(struct service_instance *in, struct service *s, struct blob_attr * in->timeout.cb = instance_timeout; in->proc.cb = instance_exit; in->term_timeout = 5; + in->syslog_facility = LOG_DAEMON; in->_stdout.fd.fd = -2; in->_stdout.stream.string_data = true; diff --git a/service/instance.h b/service/instance.h index 84ce002..42cc4be 100644 --- a/service/instance.h +++ b/service/instance.h @@ -61,6 +61,7 @@ struct service_instance { struct jail jail; char *seccomp; char *pidfile; + int syslog_facility; uint32_t term_timeout; uint32_t respawn_timeout; -- 2.17.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] base-files/hotplug: add "dialout" user group and use it for ttyXYZ devices
Hi, > the "tty" group has been introduced exactly for this purpose some time > ago (1)(2). Any reason why we need "dialout" as well? > > ~ Jo > > 1: > https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=5523ee3459a2d3 > 46ad068ce359cdb60dcda1239d 2: > https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=124ab1dc0a6235 > 007f60953a796bf29122dfa242 well, it seems that the second commit did not survive (at least in master branch)... I noticed the "tty" group on OpenWrt but on my desktop system, it has slightly different meaning, see https://wiki.debian.org/SystemGroups So I guessed the meaning is the same on OpenWrt, thus the proposal to add "dialout" as well. You are right, that we don't need a second group to the same purpose. However, then I'd propose to rename the group "tty" to "dialout" to prevent other users to do the same mistake like me, i.e. confuse both groups due to mixing knowledge from other distros. Michael signature.asc Description: This is a digitally signed message part. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH openwrt] procd: allow passing optional group instance parameter
Signed-off-by: Michael Heimpold --- package/system/procd/files/procd.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package/system/procd/files/procd.sh b/package/system/procd/files/procd.sh index 72f25fe0c0..88114cee2a 100644 --- a/package/system/procd/files/procd.sh +++ b/package/system/procd/files/procd.sh @@ -18,7 +18,8 @@ # file: configuration files (array) # netdev: bound network device (detects ifindex changes) # limits: resource limits (passed to the process) -# user info: array with 1 values $username +# user: $username to run service as +# group: $groupname to run service as # pidfile: file name to write pid into # # No space separation is done for arrays/tables - use one function argument per command line argument @@ -249,7 +250,7 @@ _procd_set_param() { reload_signal) json_add_int "$type" $(kill -l "$1") ;; - pidfile|user|seccomp|capabilities) + pidfile|user|group|seccomp|capabilities) json_add_string "$type" "$1" ;; stdout|stderr|no_new_privs) -- 2.17.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH procd] service: allow setting a dedicated group id
Sometimes is desirable to run a process with a specific group id instead of the default one which is derived from passwd entry. However, we still want to initialize supplementary group ids (including the default one), thus we have to store the specific one in a dedicated structure element. Signed-off-by: Michael Heimpold --- service/instance.c | 25 - service/instance.h | 4 +++- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/service/instance.c b/service/instance.c index a5742b7..3b92536 100644 --- a/service/instance.c +++ b/service/instance.c @@ -48,6 +48,7 @@ enum { INSTANCE_ATTR_WATCH, INSTANCE_ATTR_ERROR, INSTANCE_ATTR_USER, + INSTANCE_ATTR_GROUP, INSTANCE_ATTR_STDOUT, INSTANCE_ATTR_STDERR, INSTANCE_ATTR_NO_NEW_PRIVS, @@ -73,6 +74,7 @@ static const struct blobmsg_policy instance_attr[__INSTANCE_ATTR_MAX] = { [INSTANCE_ATTR_WATCH] = { "watch", BLOBMSG_TYPE_ARRAY }, [INSTANCE_ATTR_ERROR] = { "error", BLOBMSG_TYPE_ARRAY }, [INSTANCE_ATTR_USER] = { "user", BLOBMSG_TYPE_STRING }, + [INSTANCE_ATTR_GROUP] = { "group", BLOBMSG_TYPE_STRING }, [INSTANCE_ATTR_STDOUT] = { "stdout", BLOBMSG_TYPE_BOOL }, [INSTANCE_ATTR_STDERR] = { "stderr", BLOBMSG_TYPE_BOOL }, [INSTANCE_ATTR_NO_NEW_PRIVS] = { "no_new_privs", BLOBMSG_TYPE_BOOL }, @@ -348,12 +350,12 @@ instance_run(struct service_instance *in, int _stdout, int _stderr) closefd(_stderr); } - if (in->user && in->gid && initgroups(in->user, in->gid)) { + if (in->user && in->pw_gid && initgroups(in->user, in->pw_gid)) { ERROR("failed to initgroups() for user %s: %m\n", in->user); exit(127); } - if (in->gid && setgid(in->gid)) { - ERROR("failed to set group id %d: %m\n", in->gid); + if (in->gr_gid && setgid(in->gr_gid)) { + ERROR("failed to set group id %d: %m\n", in->gr_gid); exit(127); } if (in->uid && setuid(in->uid)) { @@ -623,10 +625,13 @@ instance_config_changed(struct service_instance *in, struct service_instance *in if (string_changed(in->user, in_new->user)) return true; + if (string_changed(in->group, in_new->group)) + return true; + if (in->uid != in_new->uid) return true; - if (in->gid != in_new->gid) + if (in->pw_gid != in_new->pw_gid) return true; if (string_changed(in->pidfile, in_new->pidfile)) @@ -882,7 +887,16 @@ instance_config_parse(struct service_instance *in) if (p) { in->user = strdup(user); in->uid = p->pw_uid; - in->gid = p->pw_gid; + in->gr_gid = in->pw_gid = p->pw_gid; + } + } + + if (tb[INSTANCE_ATTR_GROUP]) { + const char *group = blobmsg_get_string(tb[INSTANCE_ATTR_GROUP]); + struct group *p = getgrnam(group); + if (p) { + in->group = strdup(group); + in->gr_gid = p->gr_gid; } } @@ -1001,6 +1015,7 @@ instance_free(struct service_instance *in) instance_config_cleanup(in); free(in->config); free(in->user); + free(in->group); free(in); } diff --git a/service/instance.h b/service/instance.h index 771406c..84ce002 100644 --- a/service/instance.h +++ b/service/instance.h @@ -44,7 +44,9 @@ struct service_instance { char *user; uid_t uid; - gid_t gid; + gid_t pw_gid; + char *group; + gid_t gr_gid; bool halt; bool restart; -- 2.17.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] base-files/hotplug: add "dialout" user group and use it for ttyXYZ devices
This add that "well-known" group to the system database and changes hotplug default rules to assign /dev/tty[A-Za-z]+[0-9]+ nodes to this new group. Background is to allow more fine-granulated permissions, e.g. for daemons like ser2net which make UART ports available via network and thus should not run as root when avoidable. Signed-off-by: Michael Heimpold --- package/base-files/files/etc/group | 1 + package/system/procd/files/hotplug.json | 4 2 files changed, 5 insertions(+) diff --git a/package/base-files/files/etc/group b/package/base-files/files/etc/group index e8e2adf4ac..723a3832e8 100644 --- a/package/base-files/files/etc/group +++ b/package/base-files/files/etc/group @@ -3,6 +3,7 @@ daemon:x:1: adm:x:4: tty:x:5: mail:x:8: +dialout:x:20: audio:x:29: www-data:x:33: ftp:x:55: diff --git a/package/system/procd/files/hotplug.json b/package/system/procd/files/hotplug.json index 1c949bbea3..4221e15fe9 100644 --- a/package/system/procd/files/hotplug.json +++ b/package/system/procd/files/hotplug.json @@ -20,6 +20,10 @@ [ "regex", "DEVNAME", "^snd" ], [ "makedev", "/dev/%DEVNAME%", "0660", "audio" ] ], + [ "if", + [ "regex", "DEVNAME", "^tty[A-Za-z]+[0-9]+" ], + [ "makedev", "/dev/%DEVNAME%", "0660", "dialout" ] + ], [ "if", [ "has", "DEVNAME" ], [ "makedev", "/dev/%DEVNAME%", "0600" ] -- 2.17.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] Allow setting dedicated groupid for services
Sometimes is desirable to run a process with a specific group id instead of the default one which is derived from passwd entry. This series extends procd to recognize such an optional group name passed to it during service instance definition. It also adds the required passing-through to the procd shell script helper. Please note, that first patch needs to applied to procd repository while the second one targets OpenWrt repository (i.e. procd package). -- 2.17.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] wpan-tools: clean up Makefile
When we only call the default, we do not need to define it explicitly. Signed-off-by: Michael Heimpold --- package/network/utils/wpan-tools/Makefile | 4 1 file changed, 4 deletions(-) diff --git a/package/network/utils/wpan-tools/Makefile b/package/network/utils/wpan-tools/Makefile index e57223dee4..060aaf5046 100644 --- a/package/network/utils/wpan-tools/Makefile +++ b/package/network/utils/wpan-tools/Makefile @@ -24,10 +24,6 @@ define Package/wpan-tools DEPENDS:= +libnl endef -define Build/Configure - $(call Build/Configure/Default) -endef - define Package/wpan-tools/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/iwpan $(1)/usr/sbin/ -- 2.17.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] fconfig: cleanup Makefile
We do not need to define an empty Build/Configure since the default checks for existing ./configure and does nothing in case nothing is found. Similar for Build/Compile: we can remove the definition when we only call the default. Signed-off-by: Michael Heimpold --- package/boot/fconfig/Makefile | 7 --- 1 file changed, 7 deletions(-) diff --git a/package/boot/fconfig/Makefile b/package/boot/fconfig/Makefile index d82fa8db90..9b806fe97c 100644 --- a/package/boot/fconfig/Makefile +++ b/package/boot/fconfig/Makefile @@ -30,13 +30,6 @@ define Package/fconfig/description displays and (if writable) also edits the RedBoot configuration. endef -define Build/Configure -endef - -define Build/Compile - $(call Build/Compile/Default) -endef - define Package/fconfig/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_BUILD_DIR)/fconfig $(1)/usr/sbin/ -- 2.17.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] mxs: disable unused serial drivers
This disables PL010 and 8250 serial support for this platform as both drivers are not used: the debug UART is PL011 and the application UARTs use a dedicated MXS specific driver. The kernel size reduction is neglectable, but it also removes the non-working (confusing) /dev/ttyS0 and /dev/ttyS1 devices in a running system (which generate errors when trying to use): root@OpenWrt:~# echo "hello world" > /dev/ttyS0 ash: write error: I/O error root@OpenWrt:~# Signed-off-by: Michael Heimpold --- target/linux/mxs/config-4.14 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/target/linux/mxs/config-4.14 b/target/linux/mxs/config-4.14 index 43d6a59bae..abad1807cd 100644 --- a/target/linux/mxs/config-4.14 +++ b/target/linux/mxs/config-4.14 @@ -262,9 +262,7 @@ CONFIG_RTC_MC146818_LIB=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y # CONFIG_SCHED_INFO is not set # CONFIG_SCSI_DMA is not set -CONFIG_SERIAL_8250_FSL=y -CONFIG_SERIAL_AMBA_PL010=y -CONFIG_SERIAL_AMBA_PL010_CONSOLE=y +# CONFIG_SERIAL_8250 is not set CONFIG_SERIAL_AMBA_PL011=y CONFIG_SERIAL_AMBA_PL011_CONSOLE=y CONFIG_SERIAL_MCTRL_GPIO=y -- 2.17.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] procd: Add cached and available to memory table
Hi, a few nitpicks inline... Am Montag, 11. Februar 2019, 15:00:33 CET schrieb Zachary Cook: > This should allow Luci to show a better measure of system memory usage > Cached memory will be used to add a new progress bar > MemAvailable is the kernel's estimate of memory that is useable > by userspace without swapping, and is more accurate than the current > memory.free + memory.buffered calculation for total memory available > > Signed-off-by: Zachary Cook > --- > system.c | 29 + > 1 file changed, 29 insertions(+) > > diff --git a/system.c b/system.c > index 8ed3f93..501d589 100644 > --- a/system.c > +++ b/system.c > @@ -228,6 +228,13 @@ static int system_info(struct ubus_context *ctx, struct > ubus_object *obj, #ifdef linux > struct sysinfo info; > void *c; > + char line[256]; > + char *key, *val; > + unsigned long long available, cached; > + FILE *f; > + > + if ((f = fopen("/proc/meminfo", "r")) == NULL) > + return UBUS_STATUS_UNKNOWN_ERROR; > > if (sysinfo(&info)) > return UBUS_STATUS_UNKNOWN_ERROR; f leaks in case of return here > @@ -251,11 +258,33 @@ static int system_info(struct ubus_context *ctx, > struct ubus_object *obj, blobmsg_add_u32(&b, NULL, info.loads[2]); > blobmsg_close_array(&b, c); > > + //if linux < 3.14 MemAvailable is not in meminfo please stay consistent with current style and use /* comments*/ > + available = 0; > + cached = 0; > + > + while(fgets(line, sizeof(line), f)) > + { > + key = strtok(line, " :"); > + val = strtok(NULL, " "); > + > + if (!key || !val) > + continue; > + > + if (!strcasecmp(key, "MemAvailable")) > + available = 1024 * atol(val); since "available" is unsigned long long, why not use atoll here? > + else if (!strcasecmp(key, "Cached")) > + cached =1024 * atol(val); dito > + } > + > + fclose(f); > + > c = blobmsg_open_table(&b, "memory"); > blobmsg_add_u64(&b, "total",info.mem_unit * info.totalram); > blobmsg_add_u64(&b, "free", info.mem_unit * info.freeram); > blobmsg_add_u64(&b, "shared", info.mem_unit * info.sharedram); > blobmsg_add_u64(&b, "buffered", info.mem_unit * info.bufferram); > + blobmsg_add_u64(&b, "available",available); > + blobmsg_add_u64(&b, "cached", cached); > blobmsg_close_table(&b, c); > > c = blobmsg_open_table(&b, "swap"); mhei ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] usbgadget: Add new package
Hi, Am Dienstag, 5. Februar 2019, 18:39:55 CET schrieb Petr Štetiar: > Michael Heimpold [2019-02-02 10:09:40]: > > Hi, > > > I would prefer to have "config gadget " to configure one > > (multi-function) gadget and then have individual "config function <...>" > > section to configure one function for a referenced gadget. I think the > > functions are orthogonal and thus "acm+rndis" looks like wrong approach > > for > > me. > > I'm not sure I follow, please can you provide example configs? Thanks. I hope the following will illustrate my idea (it should just show the idea, no deeper sense): I assume a CPU with two USB device ports, e.g. ci_hdrc.0 and ci_hdrc.1. On ci_hdrc.0 a gadget with serial console and network is configured, on ci_hdrc.1 a CD-ROM and a camera. config gadget gadget1 option manufacturer 'OpenWrt' option product 'OpenWrt USB CDC/ACM' option serial_number '007' option usb_vid '0xbeef' option usb_pid '0x1234' option udc_dev 'ci_hdrc.0' option disabled 0 config configuration config1 option gadget gadget1 option maxpower 120 config function console1 option gadget gadget1 option type 'acm' option disabled 0 config function network1 option gadget gadget1 option type 'rndis' option host_addr 00:01:02:04:05:06 option dev_addr 00:01:02:04:05:07 option disabled 0 config gadget gadget2 option manufacturer 'OpenWrt' option product 'OpenWrt USB CDC/ACM' option serial_number '007' option usb_vid '0xbeef' option usb_pid '0x1235' option udc_dev 'ci_hdrc.1' option disabled 0 config function msd option gadget gadget2 option type 'mass_storage' option file '/path/to/backing/file' option removable 1 option cdrom 1 option disabled 0 config function network option gadget gadget2 option type 'uvc' option disabled 1 Cheers, mhei ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] usbgadget: Add new package
Hi Petr, Am Dienstag, 29. Januar 2019, 15:30:35 CET schrieb Petr Štetiar: > This package allows easier configuration of USB gadgets via standard UCI > interface. So far only CDC/ACM has been implemented and tested. > thanks for working on this. A few idea inside... > Signed-off-by: Petr Štetiar > --- > package/utils/usbgadget/Makefile | 33 ++ > package/utils/usbgadget/files/usbgadget.config | 21 ++ > package/utils/usbgadget/files/usbgadget.init | 90 > ++ 3 files changed, 144 insertions(+) > create mode 100644 package/utils/usbgadget/Makefile > create mode 100644 package/utils/usbgadget/files/usbgadget.config > create mode 100644 package/utils/usbgadget/files/usbgadget.init > > diff --git a/package/utils/usbgadget/Makefile > b/package/utils/usbgadget/Makefile new file mode 100644 > index 000..e45bfe4 > --- /dev/null > +++ b/package/utils/usbgadget/Makefile > @@ -0,0 +1,33 @@ > +include $(TOPDIR)/rules.mk > + > +PKG_NAME:=usbgadget > +PKG_RELEASE:=1 > + > +include $(INCLUDE_DIR)/package.mk > + > +define Package/usbgadget > + SECTION:=utils > + CATEGORY:=Utilities > + TITLE:=Utility for USB gadgets configuration > +endef > + > +define Package/usbgadget/conffiles > +/etc/config/usbgadget > +endef > + > +define Package/usbgadget/description > + This package contains a small script which could be used for > + configuration of USB gadgets over configfs kernel interface. > +endef > + > +define Build/Compile > +endef > + > +define Package/usbgadget/install > + $(INSTALL_DIR) $(1)/etc/init.d > + $(INSTALL_DIR) $(1)/etc/config > + $(INSTALL_BIN) ./files/usbgadget.init $(1)/etc/init.d/usbgadget > + $(INSTALL_DATA) ./files/usbgadget.config $(1)/etc/config/usbgadget > +endef > + > +$(eval $(call BuildPackage,usbgadget)) > diff --git a/package/utils/usbgadget/files/usbgadget.config > b/package/utils/usbgadget/files/usbgadget.config new file mode 100644 > index 000..65f6b5c > --- /dev/null > +++ b/package/utils/usbgadget/files/usbgadget.config > @@ -0,0 +1,21 @@ > +config gadget > + option type 'acm' > + option name 'gadget-acm' > + option manufacturer 'OpenWrt' > + option product 'OpenWrt USB CDC/ACM' I think we could use defaults from /etc/device_info file in case manufacturer and product are not set in config. This allow overriding the values by user and have sane defaults. > + option serial_number '007' Here too, I think we should provide a hook in the script to obtain a serial e.g. from U-Boot environment by default, or from a OTP register or so, but allow overriding it by user. > + option usb_vid '0xbeef' > + option usb_pid '0x1234' I would use Linux' Foundation defaults so that drivers on the USB host side can match (in case the functions classes are not used, I admit that I'm not really sure about this because I tested only Linux USB host systems so far.) > + option udc_dev 'ci_hdrc.0' > + option disabled 1 > + > +config gadget > + option type 'acm+rndis' > + option name 'gadget-acm-rndis' > + option manufacturer 'OpenWrt' > + option product 'OpenWrt USB CDC/ACM+RNDIS' > + option serial_number '009' > + option usb_vid '0xbeef' > + option usb_pid '0x9abc' > + option udc_dev 'ci_hdrc.0' > + option disabled 1 I would prefer to have "config gadget " to configure one (multi-function) gadget and then have individual "config function <...>" section to configure one function for a referenced gadget. I think the functions are orthogonal and thus "acm+rndis" looks like wrong approach for me. I know this will make the init script much more complicated. Regards, Michael > diff --git a/package/utils/usbgadget/files/usbgadget.init > b/package/utils/usbgadget/files/usbgadget.init new file mode 100644 > index 000..b49b6f3 > --- /dev/null > +++ b/package/utils/usbgadget/files/usbgadget.init > @@ -0,0 +1,90 @@ > +#!/bin/sh /etc/rc.common > + > +START=97 > + > +load_gadget() { > + local name > + local type > + local manufacturer > + local product > + local serial_number > + local usb_vid > + local usb_pid > + local udc_dev > + local disabled > + > + config_get disabled $1 disabled > + [ "$disabled" = "1" ] && return > + > + config_get usb_vid $1 usb_vid > + config_get usb_pid $1 usb_pid > + config_get udc_dev $1 udc_dev > + [ -z "$usb_vid" -o -z "$usb_pid" -o -z "$udc_dev" ] && return > + > + config_get type $1 type "acm" > + config_get name $1 name "${usb_vid}-acm" > + config_get manufacturer $1 manufacturer "OpenWrt" > + config_get product $1 product "OpenWrt USB ${type}" > + config_get serial_number $1 serial_number "1922" > + > + local path="/sys/kernel/config/usb_gadget/$name" > + mkdir -p "$path" > + echo "$usb_vid" > "$path/idVendor" > + echo "$usb_pid" > "$path/idProduct" > + > + local strings="$path/strings/0x409" > + mkdir -p "$strings" > + e
[OpenWrt-Devel] [PATCH] uboot-mxs: bump to v2019.01
Also update the U-Boot BSP patch for I2SE Duckbill devices. Signed-off-by: Michael Heimpold --- package/boot/uboot-mxs/Makefile | 4 +- .../patches/001-add-i2se-duckbill.patch | 40 +++ 2 files changed, 35 insertions(+), 9 deletions(-) diff --git a/package/boot/uboot-mxs/Makefile b/package/boot/uboot-mxs/Makefile index cd26704cb6..c4485f5b3d 100644 --- a/package/boot/uboot-mxs/Makefile +++ b/package/boot/uboot-mxs/Makefile @@ -8,10 +8,10 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk -PKG_VERSION:=2018.09 +PKG_VERSION:=2019.01 PKG_RELEASE:=1 -PKG_HASH:=839bf23cfe8ce613a77e583a60375179d0ad324e92c82fbdd07bebf0fd142268 +PKG_HASH:=50bd7e5a466ab828914d080d5f6a432345b500e8fba1ad3b7b61e95e60d51c22 include $(INCLUDE_DIR)/u-boot.mk include $(INCLUDE_DIR)/package.mk diff --git a/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch b/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch index e5d3484d8e..9acb6a508d 100644 --- a/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch +++ b/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch @@ -1,4 +1,4 @@ -From 7b919a74c562ca33ae28c9214f225a79b57209e4 Mon Sep 17 00:00:00 2001 +From 6af0148a38b23ba761905f98a7211fab986033ce Mon Sep 17 00:00:00 2001 From: Michael Heimpold Date: Thu, 13 Sep 2018 21:40:19 +0200 Subject: [PATCH] arm: mxs: add support for I2SE's Duckbill boards @@ -43,6 +43,8 @@ Signed-off-by: Stefan Wahren create mode 100644 configs/duckbill_defconfig create mode 100644 include/configs/duckbill.h +diff --git a/arch/arm/mach-imx/mxs/Kconfig b/arch/arm/mach-imx/mxs/Kconfig +index 68072d5a1f..82aaa3ef76 100644 --- a/arch/arm/mach-imx/mxs/Kconfig +++ b/arch/arm/mach-imx/mxs/Kconfig @@ -50,6 +50,10 @@ config TARGET_APX4DEVKIT @@ -64,6 +66,9 @@ Signed-off-by: Stefan Wahren source "board/ppcag/bg0900/Kconfig" source "board/schulercontrol/sc_sps_1/Kconfig" source "board/technologic/ts4600/Kconfig" +diff --git a/board/i2se/duckbill/Kconfig b/board/i2se/duckbill/Kconfig +new file mode 100644 +index 00..98c1e4689f --- /dev/null +++ b/board/i2se/duckbill/Kconfig @@ -0,0 +1,15 @@ @@ -82,6 +87,9 @@ Signed-off-by: Stefan Wahren + default "duckbill" + +endif +diff --git a/board/i2se/duckbill/MAINTAINERS b/board/i2se/duckbill/MAINTAINERS +new file mode 100644 +index 00..5496baa330 --- /dev/null +++ b/board/i2se/duckbill/MAINTAINERS @@ -0,0 +1,6 @@ @@ -91,12 +99,15 @@ Signed-off-by: Stefan Wahren +F:board/i2se/duckbill/ +F:include/configs/duckbill.h +F:configs/duckbill_defconfig +diff --git a/board/i2se/duckbill/Makefile b/board/i2se/duckbill/Makefile +new file mode 100644 +index 00..0079eb413c --- /dev/null +++ b/board/i2se/duckbill/Makefile @@ -0,0 +1,10 @@ +# SPDX-License-Identifier: GPL-2.0+ +# -+# (C) Copyright 2014-2018 ++# (C) Copyright 2014-2019 +# Michael Heimpold, m...@heimpold.de. + +ifndefCONFIG_SPL_BUILD @@ -104,6 +115,9 @@ Signed-off-by: Stefan Wahren +else +obj-y := iomux.o +endif +diff --git a/board/i2se/duckbill/duckbill.c b/board/i2se/duckbill/duckbill.c +new file mode 100644 +index 00..f93c372611 --- /dev/null +++ b/board/i2se/duckbill/duckbill.c @@ -0,0 +1,186 @@ @@ -111,7 +125,7 @@ Signed-off-by: Stefan Wahren +/* + * I2SE Duckbill board + * -+ * (C) Copyright 2014-2018 Michael Heimpold ++ * (C) Copyright 2014-2019 Michael Heimpold + */ + +#include @@ -293,6 +307,9 @@ Signed-off-by: Stefan Wahren + + return 0; +} +diff --git a/board/i2se/duckbill/iomux.c b/board/i2se/duckbill/iomux.c +new file mode 100644 +index 00..1db3c52c34 --- /dev/null +++ b/board/i2se/duckbill/iomux.c @@ -0,0 +1,156 @@ @@ -300,7 +317,7 @@ Signed-off-by: Stefan Wahren +/* + * I2SE Duckbill IOMUX setup + * -+ * Copyright (C) 2013-2018 Michael Heimpold ++ * Copyright (C) 2013-2019 Michael Heimpold + */ + +#include @@ -452,6 +469,9 @@ Signed-off-by: Stefan Wahren + else + mxs_iomux_setup_multiple_pads(iomux_setup_v1, ARRAY_SIZE(iomux_setup_v1)); +} +diff --git a/configs/duckbill_defconfig b/configs/duckbill_defconfig +new file mode 100644 +index 00..f92a67d53d --- /dev/null +++ b/configs/duckbill_defconfig @@ -0,0 +1,38 @@ @@ -493,12 +513,15 @@ Signed-off-by: Stefan Wahren +CONFIG_CONS_INDEX=0 +CONFIG_OF_LIBFDT=y +# CONFIG_EFI_LOADER is not set +diff --git a/include/configs/duckbill.h b/include/configs/duckbill.h +new file mode 100644 +index 00..e7fce8843e --- /dev/null +++ b/include/configs/duckbill.h @@ -0,0 +1,179 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* -+ * Copyright (C) 2014-2018 Michael Heimpold ++ * Copyright (C) 2014-2019 Michael Heimpold + * + */ +#ifndef __CONFIGS_DUCKBILL_H__ @@ -613,7 +636,7 @@ Signed-off-by: Stefan Wahren + "mmcroot=/dev/mmcblk0p2\0" \ + "mmcargs=setenv bootargs consol
Re: [OpenWrt-Devel] [PATCH 0/7] procd: console hotplugging support
Hi Karl, if you want to test it, here are the missing pieces roughly explained: - I used kmod-usb-gadget-eth and kmod-usb-gadget-serial I know that there is another (older?) kernel module which also provides a network and console interface at the same time, but this must be configured via kernel command line parameter if I understand correctly so I've chosen to test this configfs approach - add a line to inittab like this: ttyGS0::askfirst:/usr/libexec/login.sh - patch /etc/hotplug.json on your device like this: diff --git a/package/system/procd/files/hotplug.json b/package/system/procd/ files/hotplug.json index 1c949bbea3..25806637cc 100644 --- a/package/system/procd/files/hotplug.json +++ b/package/system/procd/files/hotplug.json @@ -33,6 +33,10 @@ [ "load-firmware", "/lib/firmware" ], [ "return" ] ] + ], + [ "if", + [ "regex", "DEVNAME", "^tty[A-Za-z0-9]" ], + [ "start-console", "%DEVNAME%" ] ] ], "remove" : [ - I used a shell script found at http://irq5.io/2016/12/22/raspberry-pi-zero-as-multiple-usb-gadgets/ to configure the gadget I'll send a patch for hotplug.json after I got some feedback for this procd stuff or better - in case this is merged, because otherwise we have a dependency issue otherwise... Another point on my list is auto-mounting of configfs to the right place. I'm feeling that this should not be part of the shell script but be done at a central place - still unsure where to put it because configfs is an optional kernel module and thus available later during boot... Best regards, Michael Am Mittwoch, 2. Januar 2019, 12:38:30 CET schrieb Karl Palsson: > Michael Heimpold wrote: > > This series extends procd to allow starting consoles for > > devices which are not present during boot or after kernel > > module loading. This is for example the case when a USB gadget > > serial device is created with configfs. Here the kernel module > > is loaded but the tty device only appears after gadget is > > configured. Having a console configured in inittab for e.g. > > ttyGS0 does not work at the moment due to late appearing of > > this device. > > Thanks for doing this, I had been planning on using this (console > on gadget serial), and didn't even know it didn't work (yet) > until your mails! Much appreciated! > > Cheers, > Karl P ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 5/7] procd: add start-console support
This adds a hotplug function to (re-)start inittab entries with askfirst or respawn. At the moment the devices used with these actions must be present during boot otherwise such lines are skipped. However, this prevents having inittab entries with consoles for e.g. USB gadget devices which only appear after kernel module loading and after configuring them with configfs. While it was possible to only scan the inittab for the desired item to start, I assume the inittab to be short and re-running the whole list will be negligible. Signed-off-by: Michael Heimpold --- plug/hotplug.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/plug/hotplug.c b/plug/hotplug.c index 80e6e4d..6b5960a 100644 --- a/plug/hotplug.c +++ b/plug/hotplug.c @@ -297,12 +297,27 @@ send_to_kernel: exit(-1); } +static void handle_start_console(struct blob_attr *msg, struct blob_attr *data) +{ + char *dev = blobmsg_get_string(blobmsg_data(data)); + + DEBUG(2, "Start console request for %s\n", dev); + + procd_inittab_run("respawn"); + procd_inittab_run("askfirst"); + + DEBUG(2, "Done starting console for %s\n", dev); + + exit(-1); +} + enum { HANDLER_MKDEV = 0, HANDLER_RM, HANDLER_EXEC, HANDLER_BUTTON, HANDLER_FW, + HANDLER_START_CONSOLE, }; static struct cmd_handler { @@ -336,6 +351,10 @@ static struct cmd_handler { .name = "load-firmware", .handler = handle_firmware, }, + [HANDLER_START_CONSOLE] = { + .name = "start-console", + .handler = handle_start_console, + }, }; static void queue_next(void) -- 2.17.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/7] procd: simplify code in procd_inittab_run
This is a trial to make it more obvious what the historically grown code is actually doing. Signed-off-by: Michael Heimpold --- v2: use Jo-Philipp Wich's proposal inittab.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/inittab.c b/inittab.c index 4b9..c9e6c13 100644 --- a/inittab.c +++ b/inittab.c @@ -259,12 +259,9 @@ void procd_inittab_run(const char *handler) list_for_each_entry(a, &actions, list) if (!strcmp(a->handler->name, handler)) { - if (a->handler->multi) { - a->handler->cb(a); - continue; - } a->handler->cb(a); - break; + if (!a->handler->multi) + break; } } -- 2.17.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 0/7] procd: console hotplugging support
This series extends procd to allow starting consoles for devices which are not present during boot or after kernel module loading. This is for example the case when a USB gadget serial device is created with configfs. Here the kernel module is loaded but the tty device only appears after gadget is configured. Having a console configured in inittab for e.g. ttyGS0 does not work at the moment due to late appearing of this device. The changes in this series are the first step to make this work, the next one would be to extend the hotplug.json script to re-trigger inittab entry processing. The series also includes some nitpicks I stumbled over during coding. It can also be found in a Github repo: https://github.com/mhei/openwrt-procd/tree/console-hotplugging Michael Heimpold (7): procd: simplify code in procd_inittab_run procd: guard fork_worker calls procd: skip respawn in case device disappeared procd: shift arguments for askfirst only once procd: add start-console support procd: add upgraded binary to .gitignore procd: replace exit(-1) with exit(EXIT_FAILURE) .gitignore | 1 + initd/init.c| 2 +- initd/preinit.c | 6 +++--- initd/zram.c| 4 ++-- inittab.c | 48 + plug/coldplug.c | 3 ++- plug/hotplug.c | 31 +++-- upgraded/upgraded.c | 2 +- 8 files changed, 66 insertions(+), 31 deletions(-) -- 2.17.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 6/7] procd: add upgraded binary to .gitignore
Signed-off-by: Michael Heimpold --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 9d80a74..eaf1ef4 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ procd askfirst udevtrigger init +upgraded/upgraded .* Makefile CMakeCache.txt -- 2.17.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 3/7] procd: skip respawn in case device disappeared
Signed-off-by: Michael Heimpold --- inittab.c | 5 + 1 file changed, 5 insertions(+) diff --git a/inittab.c b/inittab.c index b8552e9..18023f5 100644 --- a/inittab.c +++ b/inittab.c @@ -123,6 +123,11 @@ static void child_exit(struct uloop_process *proc, int ret) DEBUG(4, "pid:%d, exitcode:%d\n", proc->pid, ret); proc->pid = 0; + if (!dev_exist(a->id)) { + DEBUG(4, "Skipping respawn: device '%s' does not exist anymore\n", a->id); + return; + } + uloop_timeout_set(&a->tout, a->respawn); } -- 2.17.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 7/7] procd: replace exit(-1) with exit(EXIT_FAILURE)
Signed-off-by: Michael Heimpold --- initd/init.c| 2 +- initd/preinit.c | 6 +++--- initd/zram.c| 4 ++-- plug/coldplug.c | 3 ++- plug/hotplug.c | 14 +++--- upgraded/upgraded.c | 2 +- 6 files changed, 16 insertions(+), 15 deletions(-) diff --git a/initd/init.c b/initd/init.c index 0349e6e..8d012f6 100644 --- a/initd/init.c +++ b/initd/init.c @@ -91,7 +91,7 @@ main(int argc, char **argv) execvp(kmod[0], kmod); ERROR("Failed to start kmodloader: %m\n"); - exit(-1); + exit(EXIT_FAILURE); } if (pid <= 0) { ERROR("Failed to start kmodloader instance: %m\n"); diff --git a/initd/preinit.c b/initd/preinit.c index fbb36df..0b0d291 100644 --- a/initd/preinit.c +++ b/initd/preinit.c @@ -23,7 +23,7 @@ #include #include - +#include #include #include "init.h" @@ -135,7 +135,7 @@ preinit(void) if (!plugd_proc.pid) { execvp(plug[0], plug); ERROR("Failed to start plugd: %m\n"); - exit(-1); + exit(EXIT_FAILURE); } if (plugd_proc.pid <= 0) { ERROR("Failed to start new plugd instance: %m\n"); @@ -157,7 +157,7 @@ preinit(void) if (!preinit_proc.pid) { execvp(init[0], init); ERROR("Failed to start preinit: %m\n"); - exit(-1); + exit(EXIT_FAILURE); } if (preinit_proc.pid <= 0) { ERROR("Failed to start new preinit instance: %m\n"); diff --git a/initd/zram.c b/initd/zram.c index b41bfd9..2f92b3f 100644 --- a/initd/zram.c +++ b/initd/zram.c @@ -65,7 +65,7 @@ early_insmod(char *module) modprobe[1] = path; execvp(modprobe[0], modprobe); ERROR("Can't exec %s: %m\n", modprobe[0]); - exit(-1); + exit(EXIT_FAILURE); } if (pid <= 0) { @@ -108,7 +108,7 @@ mount_zram_on_tmp(void) if (!pid) { execvp(mkfs[0], mkfs); ERROR("Can't exec %s: %m\n", mkfs[0]); - exit(-1); + exit(EXIT_FAILURE); } else if (pid <= 0) { ERROR("Can't exec %s: %m\n", mkfs[0]); return -1; diff --git a/plug/coldplug.c b/plug/coldplug.c index c6a89c3..e2d1074 100644 --- a/plug/coldplug.c +++ b/plug/coldplug.c @@ -16,6 +16,7 @@ #include #include +#include #include #include "../procd.h" @@ -55,7 +56,7 @@ void procd_coldplug(void) if (!udevtrigger.pid) { execvp(argv[0], argv); ERROR("Failed to start coldplug: %m\n"); - exit(-1); + exit(EXIT_FAILURE); } if (udevtrigger.pid <= 0) { diff --git a/plug/hotplug.c b/plug/hotplug.c index 6b5960a..ed61490 100644 --- a/plug/hotplug.c +++ b/plug/hotplug.c @@ -206,7 +206,7 @@ static void handle_exec(struct blob_attr *msg, struct blob_attr *data) argv[i] = NULL; execvp(argv[0], &argv[0]); } - exit(-1); + exit(EXIT_FAILURE); } static void handle_button_start(struct blob_attr *msg, struct blob_attr *data) @@ -231,7 +231,7 @@ static void handle_firmware(struct blob_attr *msg, struct blob_attr *data) if (!file || !dir || !dev) { ERROR("Request for unknown firmware %s/%s\n", dir, file); - exit(-1); + exit(EXIT_FAILURE); } path = alloca(strlen(dir) + strlen(file) + 2); @@ -256,11 +256,11 @@ send_to_kernel: load = open(loadpath, O_WRONLY); if (!load) { ERROR("Failed to open %s: %m\n", loadpath); - exit(-1); + exit(EXIT_FAILURE); } if (write(load, "1", 1) == -1) { ERROR("Failed to write to %s: %m\n", loadpath); - exit(-1); + exit(EXIT_FAILURE); } close(load); @@ -268,7 +268,7 @@ send_to_kernel: fw = open(syspath, O_WRONLY); if (fw < 0) { ERROR("Failed to open %s: %m\n", syspath); - exit(-1); + exit(EXIT_FAILURE); } len = s.st_size; @@ -294,7 +294,7 @@ send_to_kernel: DEBUG(2, "Done loading %s\n", path); - exit(-1); + exit(EXIT_FAILURE); } static void handle_start_console(struct blob_attr *msg, struct blob_attr *data) @@ -308,7 +308,7 @@ static void handle_start_console(struct blob_attr *msg, struct blob_attr *data) DEBUG(2, "Done starting console for %s\n", dev); - exit(-1); + exit(EXIT_FAILURE); } enum { diff --git a/upgraded/upgraded.c b/upgraded/upgraded.c index 0b82f20..db
[OpenWrt-Devel] [PATCH 2/7] procd: guard fork_worker calls
Usually respawn(), askfirst(), askconsole() and rcrespawn() are run only one time to start a worker child for the given inittab entry. In case we want to allow calling these functions several times, we need to ensure that we do not start multiple workers at the same time for the same inittab item. For this, we can re-use the remembered pid of the worker child, however, we need to reset this pid to allow a new instance in case the previous child exited. Signed-off-by: Michael Heimpold --- inittab.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/inittab.c b/inittab.c index c9e6c13..b8552e9 100644 --- a/inittab.c +++ b/inittab.c @@ -120,14 +120,17 @@ static void child_exit(struct uloop_process *proc, int ret) { struct init_action *a = container_of(proc, struct init_action, proc); - DEBUG(4, "pid:%d\n", proc->pid); -uloop_timeout_set(&a->tout, a->respawn); + DEBUG(4, "pid:%d, exitcode:%d\n", proc->pid, ret); + proc->pid = 0; + + uloop_timeout_set(&a->tout, a->respawn); } static void respawn(struct uloop_timeout *tout) { struct init_action *a = container_of(tout, struct init_action, tout); - fork_worker(a); + if (!a->proc.pid) + fork_worker(a); } static void rcdone(struct runqueue *q) @@ -163,7 +166,8 @@ static void askfirst(struct init_action *a) a->respawn = 500; a->proc.cb = child_exit; - fork_worker(a); + if (!a->proc.pid) + fork_worker(a); } static void askconsole(struct init_action *a) @@ -197,7 +201,8 @@ static void askconsole(struct init_action *a) a->respawn = 500; a->proc.cb = child_exit; - fork_worker(a); + if (!a->proc.pid) + fork_worker(a); } static void rcrespawn(struct init_action *a) @@ -206,7 +211,8 @@ static void rcrespawn(struct init_action *a) a->respawn = 500; a->proc.cb = child_exit; - fork_worker(a); + if (!a->proc.pid) + fork_worker(a); } static struct init_handler handlers[] = { -- 2.17.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 4/7] procd: shift arguments for askfirst only once
In case we want to process an inittab item multiple times (e.g. in case of hotplugging) we must not shift the arguments for askfirst multiple times. So check whether we already did it. Signed-off-by: Michael Heimpold --- inittab.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/inittab.c b/inittab.c index 18023f5..45118f4 100644 --- a/inittab.c +++ b/inittab.c @@ -165,9 +165,12 @@ static void askfirst(struct init_action *a) } a->tout.cb = respawn; - for (i = MAX_ARGS - 1; i >= 1; i--) - a->argv[i] = a->argv[i - 1]; - a->argv[0] = ask; + /* shift arguments only if not yet done */ + if (a->argv[0] != ask) { + for (i = MAX_ARGS - 1; i >= 1; i--) + a->argv[i] = a->argv[i - 1]; + a->argv[0] = ask; + } a->respawn = 500; a->proc.cb = child_exit; @@ -200,9 +203,12 @@ static void askconsole(struct init_action *a) } a->tout.cb = respawn; - for (i = MAX_ARGS - 1; i >= 1; i--) - a->argv[i] = a->argv[i - 1]; - a->argv[0] = ask; + /* shift arguments only if not yet done */ + if (a->argv[0] != ask) { + for (i = MAX_ARGS - 1; i >= 1; i--) + a->argv[i] = a->argv[i - 1]; + a->argv[0] = ask; + } a->respawn = 500; a->proc.cb = child_exit; -- 2.17.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH V2] procd: simplify code in procd_inittab_run
This is a trial to make it more obvious what the historically grown code is actually doing. Signed-off-by: Michael Heimpold --- V2: use Jo-Philipp Wich's proposal inittab.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/inittab.c b/inittab.c index 4b9..c9e6c13 100644 --- a/inittab.c +++ b/inittab.c @@ -259,12 +259,9 @@ void procd_inittab_run(const char *handler) list_for_each_entry(a, &actions, list) if (!strcmp(a->handler->name, handler)) { - if (a->handler->multi) { - a->handler->cb(a); - continue; - } a->handler->cb(a); - break; + if (!a->handler->multi) + break; } } -- 2.17.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] procd: simplify code in procd_inittab_run
This is a trial to make it more obvious what the historically grown code is actually doing. Signed-off-by: Michael Heimpold --- inittab.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/inittab.c b/inittab.c index 4b9..41816b7 100644 --- a/inittab.c +++ b/inittab.c @@ -259,12 +259,11 @@ void procd_inittab_run(const char *handler) list_for_each_entry(a, &actions, list) if (!strcmp(a->handler->name, handler)) { - if (a->handler->multi) { - a->handler->cb(a); - continue; - } a->handler->cb(a); - break; + if (a->handler->multi) + continue; + else + break; } } -- 2.17.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Q: procd: re-evaluation of inittab entries
Hi, Am Mittwoch, 5. Dezember 2018, 03:52:20 CET schrieb Yousong Zhou: > On Wed, 5 Dec 2018 at 06:00, Michael Heimpold wrote: > > Hi, > > > > I'm currently playing with USB gadget stuff. The goal is to run an > > Ethernet > > link and a console over the USB link. I already selected the relevant > > kernel modules and ACM device and RNDIS device is created on the USB host > > system - all fine so far. > > The ACM device on the USB gadget side is created as /dev/ttyGS0, and > > when I use "echo foobar > /dev/ttyGS0" or "cat /dev/ttyGS0" on USB device > > side with corresponding counterparts on USB host side, then it already > > works like a charme. > > My problem is the inittab: I think the right approach is to add an entry > > to > > inittab when I want to provide a login console on this tty, so I added: > > ttyGS0::askfirst:/usr/libexec/login.sh > > at the end of my inittab. > > However, during boot ttyGS0 is not yet available - it takes until the > > USB gadget is setup. procd skips this line at boot time. > > > > So my question is: is this the correct approach, or should I use a > > hotplug script to start such a console? > > I think we should make it possible to use serial console directly in > inittab. > > In this case, could it be that the kernel module was only loaded after > parsing inittab and askfirst quitted because it couldn't find the > device? Please check if that is the case by grepping module name in > /etc/modules-boot.d/ . Setting boot flag when calling AutoProbe > should fix the issue. No, the order is this one: 1. modules are loaded (device does not appear yet) 2. inittab is parsed 3. entry is skipped because device does not exists yet 4. configuration of USB gadget with shell script and/or init script 5. device appears 6. hotplug-call tty is being called and running hotplug scripts So it seems that we need a feedback from hotplug script to procd to rescan inittab for formerly skipped items and re-trigger start in case of device is present now. Regards, mhei ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] Q: procd: re-evaluation of inittab entries
Hi, I'm currently playing with USB gadget stuff. The goal is to run an Ethernet link and a console over the USB link. I already selected the relevant kernel modules and ACM device and RNDIS device is created on the USB host system - all fine so far. The ACM device on the USB gadget side is created as /dev/ttyGS0, and when I use "echo foobar > /dev/ttyGS0" or "cat /dev/ttyGS0" on USB device side with corresponding counterparts on USB host side, then it already works like a charme. My problem is the inittab: I think the right approach is to add an entry to inittab when I want to provide a login console on this tty, so I added: ttyGS0::askfirst:/usr/libexec/login.sh at the end of my inittab. However, during boot ttyGS0 is not yet available - it takes until the USB gadget is setup. procd skips this line at boot time. So my question is: is this the correct approach, or should I use a hotplug script to start such a console? Regards, mhei ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] autotools.mk: autoreconf: Fix missing install-sh by forcing install in libtoolize
Hi, Am Dienstag, 4. Dezember 2018, 14:47:23 CET schrieb Petr Štetiar: > I'm trying to create a package for libgpiod, libgpiod is already part of package feed: https://github.com/openwrt/packages/blob/master/libs/libgpiod/Makefile > which uses > AC_CONFIG_AUX_DIR macro, which is probably leading to the following > configure error: > > autoreconf: running: /openwrt.git/staging_dir/host/bin/libtoolize --force > OpenWrt-libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, > `autostuff'. OpenWrt-libtoolize: linking file `autostuff/ltmain.sh' > OpenWrt-libtoolize: putting macros in `m4'. The build seems to run fine without any further tweaking, at least I cannot remember that I've seen problems so far and buildbots seem to be happy, too. Regards, mhei > ... > configure: error: cannot find install-sh, install.sh, or shtool in > autostuff "."/autostuff > > From the build output it's clear, that libtoolize isn't installing > install-sh symlink, because libtoolize would install install-sh only if > it's being run with --install parameter. Corresponding part in > libtoolize: > > if $opt_install; then >func_config_update config.guess \ > "$pkgdatadir/config" "$auxdir" pkgconfig_header >func_config_update config.sub \ > "$pkgdatadir/config" "$auxdir" pkgconfig_header >func_install_update install-sh \ > "$pkgdatadir/config" "$auxdir" pkgconfig_header > fi > func_ltmain_update ltmain.sh \ > "$pkgdatadir/config" "$auxdir" pkgconfig_header > > Adding --install parameter to libtoolize fixes this build issue: > > autoreconf: running: /openwrt.git/staging_dir/host/bin/libtoolize --install > --force OpenWrt-libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, > `autostuff'. OpenWrt-libtoolize: linking file `autostuff/config.guess' > OpenWrt-libtoolize: linking file `autostuff/config.sub' > OpenWrt-libtoolize: linking file `autostuff/install-sh' > OpenWrt-libtoolize: linking file `autostuff/ltmain.sh' > OpenWrt-libtoolize: putting macros in `m4'. > > Cc: Felix Fietkau > Signed-off-by: Petr Štetiar > --- > include/autotools.mk | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/include/autotools.mk b/include/autotools.mk > index aa044aa..ae320fb 100644 > --- a/include/autotools.mk > +++ b/include/autotools.mk > @@ -39,7 +39,9 @@ define autoreconf > [ -e $(p)/config.rpath ] || \ > ln -s > $(SCRIPT_DIR)/config.rpath $(p)/config.rpath; \ > touch NEWS AUTHORS COPYING ABOUT-NLS ChangeLog; > \ > - $(AM_TOOL_PATHS) > $(STAGING_DIR_HOST)/bin/autoreconf -v -f -i -s \ > + $(AM_TOOL_PATHS) \ > + > LIBTOOLIZE='$(STAGING_DIR_HOST)/bin/libtoolize --install' \ > + $(STAGING_DIR_HOST)/bin/autoreconf -v > -f -i -s \ > $(if $(word 2,$(3)),--no-recursive) \ > -B $(STAGING_DIR_HOST)/share/aclocal \ > $(patsubst %,-I %,$(5)) \ ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH fstools 1/4] block: fix formatting & indent in the mount_device()
Hi, Am Freitag, 30. November 2018, 14:09:20 CET schrieb Rafał Miłecki: > From: Rafał Miłecki > > There was some misformatted code that seemed like switch block having an > else block. This improves code readability. > > Signed-off-by: Rafał Miłecki > --- > block.c | 34 ++ > 1 file changed, 18 insertions(+), 16 deletions(-) > > diff --git a/block.c b/block.c > index b01a633..d87251d 100644 > --- a/block.c > +++ b/block.c > @@ -1021,22 +1021,24 @@ static int mount_device(struct probe_info *pr, int > type) if (m && m->extroot) > return -1; > > - if (m) switch (type) { > - case TYPE_HOTPLUG: > - blockd_notify(device, m, pr); > - if (m->autofs) > - return 0; > - if (!auto_mount) > - return -1; > - break; > - case TYPE_AUTOFS: > - if (!m->autofs) > - return -1; > - break; > - case TYPE_DEV: > - if (m->autofs) > - return -1; > - break; > + if (m) { > + switch (type) { > + case TYPE_HOTPLUG: > + blockd_notify(device, m, pr); > + if (m->autofs) > + return 0; > + if (!auto_mount) > + return -1; > + break; > + case TYPE_AUTOFS: > + if (!m->autofs) > + return -1; > + break; > + case TYPE_DEV: > + if (m->autofs) > + return -1; > + break; > + } > } else if (type == TYPE_HOTPLUG) { > blockd_notify(device, NULL, pr); > } LGTM, so feel free to add for the whole series: Reviewed-by: Michael Heimpold ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH fstools RFC] block: generate hotplug.d mount even "add" after mounting
Hi, I really appreciate working on this, thanks! I just tried to apply this on top of current master but it fails to compile. Additionally, a few comments inline below. Am Freitag, 30. November 2018, 16:07:40 CET schrieb Rafał Miłecki: > From: Rafał Miłecki > > This is what was implemented in mountd and what some scripts used to > use. It's a pretty generic solution for managing software that may use > e.g. USB storage. > > Signed-off-by: Rafał Miłecki > --- > It's just a RFC for now. It's mainly missing a "remove" event support. > --- > block.c | 27 +++ > 1 file changed, 27 insertions(+) > > diff --git a/block.c b/block.c > index a356315..20c14fe 100644 > --- a/block.c > +++ b/block.c > @@ -880,6 +880,31 @@ static int exec_mount(const char *source, const char > *target, return err; > } > > +static void hotplug_call_mount(const char *action, const char *device) > +{ > + pid_t pid; > + > + pid = fork(); > + if (!pid) { > + char * const argv[] = { "hotplug-call", "mount", (char *)0 }; Any special reason not to use NULL here? > + char actionenv[14]; "ACTION=remove" would just fit, personally I always align to 4 or 8 byte... > + char deviceenv[32]; > + char *envp[] = { actionenv, deviceenv, (char *)0 }; as above, not NULL? > + snprintf(actionenv, sizeof(actionenv), "ACTION=%s", action); > + snprintf(deviceenv, sizeof(deviceenv), "DEVICE=%s", device); maybe we should add the mountpoint, too. so a script could easily look for files (e.g. firmware updates) below this entry point without the need to find out the mountpoint itself. > + > + execve("/sbin/hotplug-call", argv, envp); > + exit(-1); EXIT_FAILURE instead of -1? > + } else if (pid > 0) { > + int status; > + > + waitpid(pid, &status, 0); > + if (WEXITSTATUS(status)) > + ULOG_ERR("hotplug-call call failed: %d\n", > WEXITSTATUS(status)); > + } > +} > + > static int handle_mount(const char *source, const char *target, > const char *fstype, struct mount *m) > { > @@ -1079,6 +1104,8 @@ static int mount_device(struct probe_info *pr, int > type) > > handle_swapfiles(true); > > + hotplug_call_mount("add", device); "devices" not available at this point -> compile error? Maybe we also should check that the mount actually was successful before firing the hotplug event? > + > return 0; > } I'm not so familiar with ubus - still on my todo list to investigate deeper:-) But I also though about firing an event via ubus? Thanks, Michael ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] fstools: guard usage of WEXITSTATUS
According to man page, using WEXITSTATUS should be guarded by a check of WIFEXITED, so add this check. While at, also print an error message in case fsck was terminated by a signal. Signed-off-by: Michael Heimpold --- block.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/block.c b/block.c index 8e08310..b01a633 100644 --- a/block.c +++ b/block.c @@ -757,8 +757,10 @@ static void check_filesystem(struct probe_info *pr) int status; waitpid(pid, &status, 0); - if (WEXITSTATUS(status)) + if (WIFEXITED(status) && WEXITSTATUS(status)) ULOG_ERR("check_filesystem: %s returned %d\n", ckfs, WEXITSTATUS(status)); + if (WIFSIGNALED(status)) + ULOG_ERR("check_filesystem: %s terminated by %s\n", ckfs, strsignal(WTERMSIG(status))); } } -- 2.17.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] fstools: use EXIT_FAILURE when indicating error on exit
According to man page, using the EXIT_* macros is more portable than using plain integer values. Signed-off-by: Michael Heimpold --- block.c | 8 blockd.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/block.c b/block.c index 2e3841a..8e08310 100644 --- a/block.c +++ b/block.c @@ -742,16 +742,16 @@ static void check_filesystem(struct probe_info *pr) if (!pid) { if(!strncmp(pr->type, "f2fs", 4)) { execl(ckfs, ckfs, "-f", pr->dev, NULL); - exit(-1); + exit(EXIT_FAILURE); } else if(!strncmp(pr->type, "btrfs", 5)) { execl(ckfs, ckfs, "--repair", pr->dev, NULL); - exit(-1); + exit(EXIT_FAILURE); } else if(!strncmp(pr->type, "ntfs", 4)) { execl(ckfs, ckfs, "-b", pr->dev, NULL); - exit(-1); + exit(EXIT_FAILURE); } else { execl(ckfs, ckfs, "-p", pr->dev, NULL); - exit(-1); + exit(EXIT_FAILURE); } } else if (pid > 0) { int status; diff --git a/blockd.c b/blockd.c index 3af5390..a5da32c 100644 --- a/blockd.c +++ b/blockd.c @@ -95,7 +95,7 @@ block(char *cmd, char *action, char *device) argv[a++] = device; execvp(argv[0], argv); ULOG_ERR("failed to spawn %s %s %s\n", *argv, action, device); - exit(-1); + exit(EXIT_FAILURE); default: waitpid(pid, &status, 0); @@ -422,7 +422,7 @@ static int autofs_mount(void) if (kproto_version != 5) { ULOG_ERR("only kernel protocol version 5 is tested. You have %d.\n", kproto_version); - exit(1); + exit(EXIT_FAILURE); } if (ioctl(fd_autofs_write, AUTOFS_IOC_SETTIMEOUT, &autofs_timeout)) ULOG_ERR("failed to set autofs timeout\n"); -- 2.17.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Is printf considered to be guaranteed?
Am Donnerstag, 11. Oktober 2018, 22:44:53 CEST schrieb Sebastian Moeller: > Dear Luiz, > > thank you very much for this information. By now I have realized that printf > evaluated locale (specifically LC_NUMERIC) at least on non-openwrt unices, > which makes it unfortunately unusable for my purpose. forcing local, e.g. LANG=C printf "%0.3f" 47.11 does not help? Maybe you could elaborate on your purpose? Regards, mhei > > Best Regards > Sebastian > > > On Oct 11, 2018, at 19:58, Luiz Angelo Daros de Luca > > wrote: > > > > I think so. It is compiled by default: > > > > $ grep PRINTF -A2 package/utils/busybox/Config-defaults.in > > config BUSYBOX_DEFAULT_PRINTF > > > > bool > > default y > > > > -- > > config BUSYBOX_DEFAULT_ASH_PRINTF > > > > bool > > default y > > > > -- > > config BUSYBOX_DEFAULT_HUSH_PRINTF > > > > bool > > default n > > > > Regards, > > ___ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Use DHCP by default on single port devices
Hi, > "DHCP Client", even with an alternative static IP address, might not > work for some home users. to make this work better, some companies are choosing the static fallback IP address in the AutoIP range 169.254.x.x/16. At least Windows will fallback to this range if it does not find a DHCP server on this link; so it should at least possible to browse to the web gui and/or open a SSH connection... without reconfiguring your Windows system. I don't know whether this works out-of-the-box on Mac or usual Linux distros, too. Regards, Michael ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] build: add mkrasimage
Hi David, a few code-styling nitpicks, see comments below: Am Mittwoch, 15. August 2018, 16:44:03 CEST schrieb David Bauer: > The current make-ras.sh image generation script for the ZyXEL NBG6617 > has portability issues with bash. Because of this, factory images are > currently not built correctly by the OpenWRT buildbots. > > This commit replaces the make-ras.sh by C-written mkrasimage. The old > script is still kept but can be deleted in the future. > > Signed-off-by: David Bauer > --- > include/image-commands.mk | 13 + > target/linux/ipq40xx/image/Makefile | 2 +- > tools/firmware-utils/Makefile | 1 + > tools/firmware-utils/src/mkrasimage.c | 374 ++ > 4 files changed, 389 insertions(+), 1 deletion(-) > create mode 100644 tools/firmware-utils/src/mkrasimage.c > > diff --git a/include/image-commands.mk b/include/image-commands.mk > index 3cc5dc21e1..bb5fe46e1a 100644 > --- a/include/image-commands.mk > +++ b/include/image-commands.mk > @@ -62,6 +62,19 @@ define Build/make-ras > @mv $@.new $@ > endef > > +define Build/zyxel-ras-image > + let \ > + newsize="$(subst k,* 1024,$(RAS_ROOTFS_SIZE))"; \ > + $(STAGING_DIR_HOST)/bin/mkrasimage \ > + -b $(RAS_BOARD) \ > + -v $(RAS_VERSION) \ > + -k $(call > param_get_default,kernel,$(1),$(IMAGE_KERNEL)) \ > + -r $@ \ > + -s $$newsize \ > + -o $@.new > + @mv $@.new $@ > +endef > + > define Build/mkbuffaloimg > $(STAGING_DIR_HOST)/bin/mkbuffaloimg -B $(BOARDNAME) \ > -R $$(($(subst k, * 1024,$(ROOTFS_SIZE \ > diff --git a/target/linux/ipq40xx/image/Makefile > b/target/linux/ipq40xx/image/Makefile index d1ee1004fd..6e4125db0b 100644 > --- a/target/linux/ipq40xx/image/Makefile > +++ b/target/linux/ipq40xx/image/Makefile > @@ -221,7 +221,7 @@ define Device/zyxel_nbg6617 > #at least as large as the one of the initial firmware image (not the > current # one on the device). This only applies to the Web-UI, the > bootlaoder ignores # this minimum-size. However, the larger image can be > flashed both ways. - IMAGE/factory.bin := append-rootfs | pad-rootfs | > check-size (ROOTFS_SIZE) | make-ras + IMAGE/factory.bin := > append-rootfs | pad-rootfs | check-size (ROOTFS_SIZE) | zyxel-ras-image > IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | check-size > (ROOTFS_SIZE) | sysupgrade-tar rootfs=@ | append-metadata > DEVICE_PACKAGES := ipq-wifi-zyxel_nbg6617 uboot-envtools > endef > diff --git a/tools/firmware-utils/Makefile b/tools/firmware-utils/Makefile > index 436a43794c..00917c3417 100644 > --- a/tools/firmware-utils/Makefile > +++ b/tools/firmware-utils/Makefile > @@ -70,6 +70,7 @@ define Host/Compile > $(call cc,fix-u-media-header cyg_crc32,-Wall) > $(call cc,hcsmakeimage bcmalgo) > $(call cc,mkporayfw, -Wall) > + $(call cc,mkrasimage, --std=gnu99) > $(call cc,mkhilinkfw, -lcrypto) > $(call cc,mkdcs932, -Wall) > $(call cc,mkheader_gemtek,-lz) > diff --git a/tools/firmware-utils/src/mkrasimage.c > b/tools/firmware-utils/src/mkrasimage.c new file mode 100644 > index 00..1cac7b5da9 > --- /dev/null > +++ b/tools/firmware-utils/src/mkrasimage.c > @@ -0,0 +1,374 @@ > +/* > + * --- ZyXEL header format --- > + * Original Version by Benjamin Berg > + * C implementation based on generation-script by Christian Lamparter > + * > + * The firmware image prefixed with a header (which is written into the MTD > device). + * The header is one erase block (~64KiB) in size, but the > checksum only convers the + * first 2KiB. Padding is 0xff. All integers are > in big-endian. > + * > + * The checksum is always a 16-Bit System V checksum (sum -s) stored in a > 32-Bit integer. + * > + * 4 bytes: checksum of the rootfs image > + * 4 bytes: length of the contained rootfs image file (big endian) > + * 32 bytes: Firmware Version string (NUL terminated, 0xff padded) > + * 4 bytes: checksum over the header partition (big endian - see below) > + * 64 bytes: Model (e.g. "NBG6617", NUL termiated, 0xff padded) > + * 4 bytes: checksum of the kernel partition > + * 4 bytes: length of the contained kernel image file (big endian) > + * rest: 0xff padding (To erase block size) > + * > + * The checksums are calculated by adding up all bytes and if a 16bit > + * overflow occurs, one is added and the sum is masked to 16 bit: > + * csum = csum + databyte; if (csum > 0x) { csum += 1; csum &= 0x > }; + * Should the file have an odd number of bytes then the byte len-0x800 > is + * used additionally. > + * > + * The checksum for the header is calculated over the first 2048 bytes with > + * the rootfs image checksum as the placeholder during calculation. + * > + * This program is free software; you can redistribute it and/or modify it > + * under th
Re: [OpenWrt-Devel] [PATCH packages] php7: add package dependency on zoneinfo-core
Hi, Am Sonntag, 24. Juni 2018, 19:40:53 CEST schrieb John Crispin: > On 24/06/18 10:19, Rafał Miłecki wrote: > > From: Rafał Miłecki > > > > Having "select PACKAGE_zoneinfo-core" wasn't enough for builds without > > php7-cli=y or php7-cgi=y. It didn't result in installing zoneinfo-core > > when using "opkg install" (during runtime or when building images with > > CONFIG_TARGET_PER_DEVICE_ROOTFS). > > > > Missing zoneinfo results in PHP fatal errors, e.g.: > > Fatal error: DateTime::createFromFormat(): Timezone database is corrupt - > > this should *never* happen! > > > > For years users were told to manually install zoneinfo-core package. > > This problem was hidden for some time (including 17.01 release) due to > > disabled support for CONFIG_PHP7_SYSTEMTZDATA. It's now back as support > > for --with-system-tzdata was enabled again. > > > > The proper solution is to simply make php7 package depend on > > zoneinfo-core when PHP7_SYSTEMTZDATA is used. > > > > Fixes: 84e5012e8853 ("php7: re-enable system timezone data usage") > > Signed-off-by: Rafał Miłecki > > php7 is part of the feed, please post a PR on github. the ML is > unfortunately only for trunk this is true, but since I'm reading this list too and the patch is correct I picked it up - no need to open a PR - hope this is ok for all :-) Thanks, Michael > John > > > --- > > > > lang/php7/Makefile | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/lang/php7/Makefile b/lang/php7/Makefile > > index aa860a95..93348543 100644 > > --- a/lang/php7/Makefile > > +++ b/lang/php7/Makefile > > @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk > > > > PKG_NAME:=php > > PKG_VERSION:=7.2.6 > > > > -PKG_RELEASE:=1 > > +PKG_RELEASE:=2 > > > > PKG_MAINTAINER:=Michael Heimpold > > > > @@ -74,7 +74,6 @@ define Package/php7/config > > > > config PHP7_SYSTEMTZDATA > > > > bool "Use system timezone data instead of php's built-in > > database" > > depends on PACKAGE_php7-cli || PACKAGE_php7-cgi > > > > - select PACKAGE_zoneinfo-core > > > > default y > > help > > > > Enabling this feature automatically selects the > > zoneinfo-core package > > > > @@ -86,7 +85,8 @@ define Package/php7 > > > > $(call Package/php7/Default) > > > > DEPENDS:=+libpcre +zlib \ > > > > - +PHP7_LIBXML:libxml2 > > + +PHP7_LIBXML:libxml2 \ > > + +PHP7_SYSTEMTZDATA:zoneinfo-core > > > > endef > > > > define Package/php7/description > > ___ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [LEDE-DEV] kernel version status
Hi, Am Sonntag, 18. Februar 2018, 22:43:42 CET schrieb Hauke Mehrtens: > ... > > The following targets are on kernel 4.9 and are fine: > ... > * mxs > ... a few weeks ago, I was in contact with Zoltan who started working on 4.14 support for mxs. I found some patches in his staging repo and added some patches on top. I've pushed this in a Github branch: https://github.com/mhei/source/tree/mxs-4.14 I run tested this on both I2SE Duckbill devices and Olimex OLinuXino Maxi boards - no obvious problems so far, so I think we can go ahead for this platform with 4.14. Regards, Michael ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/2] packages: uboot-mxs: bump to 2017.11
Also update the U-Boot BSP patch for I2SE Duckbill devices. Signed-off-by: Michael Heimpold --- package/boot/uboot-mxs/Makefile| 4 +- .../uboot-mxs/patches/001-add-i2se-duckbill.patch | 408 +++-- 2 files changed, 292 insertions(+), 120 deletions(-) diff --git a/package/boot/uboot-mxs/Makefile b/package/boot/uboot-mxs/Makefile index 92cf9e6..cd752bb 100644 --- a/package/boot/uboot-mxs/Makefile +++ b/package/boot/uboot-mxs/Makefile @@ -8,10 +8,10 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk -PKG_VERSION:=2016.01 +PKG_VERSION:=2017.11 PKG_RELEASE:=1 -PKG_HASH:=e5792fba9399d9804aa2ef667f14ff771e2cdece72367d340250265bf095a5d5 +PKG_HASH:=6a018fd3caf58f3dcfa23ee989a82bd35df03af71872b9dca8c6d758a0d26c05 include $(INCLUDE_DIR)/u-boot.mk include $(INCLUDE_DIR)/package.mk diff --git a/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch b/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch index 91f583f..15217b5 100644 --- a/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch +++ b/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch @@ -1,20 +1,40 @@ -From 4d9a32780ec795b9edc83c7b3a1e947cec49a5a4 Mon Sep 17 00:00:00 2001 +From 25de6430219d3f3698d709c10358fbea17b24cf1 Mon Sep 17 00:00:00 2001 From: Michael Heimpold -Date: Sat, 15 Aug 2015 20:26:18 +0200 -Subject: [PATCH] Add support for I2SE Duckbill boards +Date: Fri, 21 Apr 2017 11:08:19 +0200 +Subject: [PATCH] arm: mxs: add support for I2SE's Duckbill boards + +The Duckbill devices are small, pen-drive sized boards based on +NXP's i.MX28 SoC. While the initial variants (Duckbill series) were +equipped with a micro SD card slot only, the latest generation +(Duckbill 2 series) have an additional internal eMMC onboard. + +Both device generations consists of four "family members": + +- Duckbill/Duckbill 2: generic board, intended to be used as + baseboard for custom designs and/or as development board + +- Duckbill EnOcean/Duckbill 2 EnOcean: come with an EnOcean + daugther board equipped with the popular TCM310 module + +- Duckbill 485/Duckbill 2 485: as the name implies, these + devices are intended to be used as Ethernet - RS485 converters + +- Duckbill SPI/Duckbill 2 SPI: not sold separately, but used + in I2SE's development kits for Green PHY HomePlug Powerline + communication Signed-off-by: Michael Heimpold +Signed-off-by: Stefan Wahren --- - arch/arm/Kconfig |6 ++ - arch/arm/include/asm/mach-types.h | 13 +++ - board/i2se/duckbill/Kconfig | 15 - board/i2se/duckbill/MAINTAINERS |6 ++ - board/i2se/duckbill/Makefile | 12 +++ - board/i2se/duckbill/duckbill.c| 112 +++ - board/i2se/duckbill/iomux.c | 125 ++ - configs/duckbill_defconfig|9 ++ - include/configs/duckbill.h| 177 + - 9 files changed, 475 insertions(+) + arch/arm/Kconfig| 9 +- + board/i2se/duckbill/Kconfig | 15 +++ + board/i2se/duckbill/MAINTAINERS | 6 ++ + board/i2se/duckbill/Makefile| 12 +++ + board/i2se/duckbill/duckbill.c | 181 + board/i2se/duckbill/iomux.c | 157 +++ + configs/duckbill_defconfig | 31 +++ + include/configs/duckbill.h | 199 + 8 files changed, 609 insertions(+), 1 deletion(-) create mode 100644 board/i2se/duckbill/Kconfig create mode 100644 board/i2se/duckbill/MAINTAINERS create mode 100644 board/i2se/duckbill/Makefile @@ -23,57 +43,43 @@ Signed-off-by: Michael Heimpold create mode 100644 configs/duckbill_defconfig create mode 100644 include/configs/duckbill.h +diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig +index 30e71b2..b77e778 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig -@@ -178,6 +178,11 @@ config TARGET_MX28EVK - select CPU_ARM926EJS +@@ -373,6 +373,12 @@ config TARGET_MX28EVK select SUPPORT_SPL + select BOARD_EARLY_INIT_F +config TARGET_DUCKBILL -+ bool "Support I2SE Duckbill" ++ bool "Support duckbill" + select CPU_ARM926EJS + select SUPPORT_SPL ++ select BOARD_EARLY_INIT_F + config TARGET_MX23_OLINUXINO bool "Support mx23_olinuxino" select CPU_ARM926EJS -@@ -926,6 +931,7 @@ source "board/genesi/mx51_efikamx/Kconfi - source "board/gumstix/pepper/Kconfig" +@@ -1250,6 +1256,7 @@ source "board/gumstix/pepper/Kconfig" source "board/h2200/Kconfig" source "board/hisilicon/hikey/Kconfig" + source "board/hisilicon/poplar/Kconfig" +source "board/i2se/duckbill/Kconfig" source "board/imx31_phycore/Kconfig" - source "board/isee/igep0033/Kconfig" - source "board/maxbcm/Kconfig" a/arch/arm/include/asm/mach-types.h
[OpenWrt-Devel] [PATCH 2/2] packages: uboot-mxs: override instead of appending u-boot make flags
This prevents passing down the HOSTCC stuff set in u-boot.mk which results in linking errors against openssl: tools/mxsimage.o: In function `sb_aes_reinit': mxsimage.c:(.text+0x202): undefined reference to `EVP_CIPHER_CTX_reset' tools/mxsimage.o: In function `mxsimage_generate': mxsimage.c:(.text+0x110d): undefined reference to `EVP_MD_CTX_new' mxsimage.c:(.text+0x114f): undefined reference to `EVP_MD_CTX_free' mxsimage.c:(.text+0x11c3): undefined reference to `EVP_MD_CTX_new' mxsimage.c:(.text+0x1323): undefined reference to `EVP_MD_CTX_free' mxsimage.c:(.text+0x134a): undefined reference to `EVP_CIPHER_CTX_reset' tools/mxsimage.o: In function `mxsimage_verify_print_header': mxsimage.c:(.text+0x23ce): undefined reference to `EVP_MD_CTX_new' mxsimage.c:(.text+0x242c): undefined reference to `EVP_MD_CTX_new' mxsimage.c:(.text+0x246b): undefined reference to `EVP_MD_CTX_free' mxsimage.c:(.text+0x24ef): undefined reference to `EVP_CIPHER_CTX_reset' mxsimage.c:(.text+0x2e52): undefined reference to `EVP_MD_CTX_free' collect2: error: ld returned 1 exit status Signed-off-by: Michael Heimpold --- package/boot/uboot-mxs/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/boot/uboot-mxs/Makefile b/package/boot/uboot-mxs/Makefile index cd752bb..6fde52e 100644 --- a/package/boot/uboot-mxs/Makefile +++ b/package/boot/uboot-mxs/Makefile @@ -35,7 +35,7 @@ UBOOT_TARGETS := \ mx23_olinuxino \ duckbill -UBOOT_MAKE_FLAGS += $(UBOOT_IMAGE) +UBOOT_MAKE_FLAGS = $(UBOOT_IMAGE) define Build/InstallDev $(INSTALL_DIR) $(STAGING_DIR_IMAGE) -- 2.7.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] mxs: rename files to files-4.9
The Device Tree file for I2SE Duckbill boards was updated upstream. Let's use the upstream version for upcoming kernel 4.14 by keeping our current version for v4.9 still around. Signed-off-by: Michael Heimpold --- .../linux/mxs/{files => files-4.9}/arch/arm/boot/dts/imx28-duckbill.dts | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename target/linux/mxs/{files => files-4.9}/arch/arm/boot/dts/imx28-duckbill.dts (100%) diff --git a/target/linux/mxs/files/arch/arm/boot/dts/imx28-duckbill.dts b/target/linux/mxs/files-4.9/arch/arm/boot/dts/imx28-duckbill.dts similarity index 100% rename from target/linux/mxs/files/arch/arm/boot/dts/imx28-duckbill.dts rename to target/linux/mxs/files-4.9/arch/arm/boot/dts/imx28-duckbill.dts -- 2.7.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [LEDE-DEV][PATCH 2/4] imx6: add support for Linux 4.14
Hi, > ... > +CONFIG_EXT2_FS=y > +CONFIG_EXT2_FS_POSIX_ACL=y > +CONFIG_EXT2_FS_SECURITY=y > +CONFIG_EXT2_FS_XATTR=y > +CONFIG_EXT3_FS=y > +CONFIG_EXT3_FS_POSIX_ACL=y > +CONFIG_EXT3_FS_SECURITY=y is this really necesarry? I thought that ext4 will handle this smoothly... Regards, Michael ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 8/8] mpc85xx: add NM50 config for fw_(printenv/setenv)
Hi, Am Wednesday 23 March 2016, 13:17:32 schrieb Dieter Pfeuffer: > Signed-off-by: Dieter Pfeuffer > --- > target/linux/mpc85xx/base-files/etc/fw_env.config | 22 > ++ 1 file changed, 22 insertions(+) > create mode 100644 target/linux/mpc85xx/base-files/etc/fw_env.config > > diff --git a/target/linux/mpc85xx/base-files/etc/fw_env.config > b/target/linux/mpc85xx/base-files/etc/fw_env.config new file mode 100644 > index 000..1780f22 > --- /dev/null > +++ b/target/linux/mpc85xx/base-files/etc/fw_env.config > @@ -0,0 +1,22 @@ > +# Configuration file for fw_(printenv/setenv) utility. > +# Up to two entries are valid, in this case the redundant > +# environment sector is assumed present. > +# Notice, that the "Number of sectors" is not required on NOR and > SPI-dataflash. +# Futhermore, if the Flash sector size is ommitted, this > value is assumed to +# be the same as the Environment size, which is valid > for NOR and SPI-dataflash + > +# NOR example > +# MTD device nameDevice offset Env. size Flash sector size > Number of > sectors > +/dev/mtd10x 0x2000 0x2000 I think it would be better to make use of ubootenv_add_uci_config and the other infrastructure and create a new file in package/boot/uboot-envtools/files Regards, mhei > +#/dev/mtd2 0x 0x4000 0x4000 > + > +# MTD SPI-dataflash example > +# MTD device nameDevice offset Env. size Flash sector size > Number of > sectors +#/dev/mtd5 0x4200 0x4200 > +#/dev/mtd6 0x4200 0x4200 > + > +# NAND example > +#/dev/mtd0 0x4000 0x4000 0x2 > 2 > + > +# Block device example > +#/dev/mmcblk00xc 0x2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 1/1] package/libs/libtool: package libtool
Hi, Am Monday 28 December 2015, 03:39:35 schrieb Heinrich Schuchardt: > Up to now only package libtldl is created form source package > GNU libtool. > > A new package libtool containing libtoolize is provided. > > Signed-off-by: Heinrich Schuchardt > --- > package/libs/libtool/Makefile | 39 +++ > 1 file changed, 39 insertions(+) > > diff --git a/package/libs/libtool/Makefile b/package/libs/libtool/Makefile > index 8091081..da92de1 100644 > --- a/package/libs/libtool/Makefile > +++ b/package/libs/libtool/Makefile > @@ -32,6 +32,19 @@ define Package/libltdl >URL:=http://www.gnu.org/software/libtool/ > endef > > +define Package/libtool > + SECTION:=devel > + CATEGORY:=Development > + TITLE:=GNU libtool > + URL:=http://www.gnu.org/software/libtool/ > + DEPENDS:=+gcc +file package "file" is provided only in GitHub package feed, so this would require to move it to openwrt core, right? Best regards, mhei > +endef > + > +define Package/libtool/description > +GNU libtool is a generic library support script. Libtool hides the > complexity +of using shared libraries behind a consistent, portable > interface. +endef > + > define Build/InstallDev > $(MAKE) -C $(PKG_BUILD_DIR) \ > bindir="$(2)/bin" \ > @@ -49,4 +62,30 @@ define Package/libltdl/install > $(CP) $(PKG_BUILD_DIR)/libltdl/.libs/libltdl.so.* $(1)/usr/lib/ > endef > > +define Package/libtool/install > + $(INSTALL_DIR) $(1)/usr/bin > + $(INSTALL_BIN) $(PKG_BUILD_DIR)/libtoolize $(1)/usr/bin > + $(SED) 's|$$(STAGING_DIR_HOST)|/usr|g' \ > + $(1)/usr/bin/libtoolize > + $(SED) 's|$$(CONFIGURE_PREFIX)|/usr|g' \ > + $(1)/usr/bin/libtoolize > + $(SED) 's|/usr/bin/sed|/bin/sed|g' \ > + $(1)/usr/bin/libtoolize > + $(INSTALL_DIR) $(1)/usr/share/aclocal > + for file in argz.m4 ltversion.m4 lt~obsolete.m4 libtool.m4 \ > + ltoptions.m4 ltsugar.m4; do \ > + $(INSTALL_DATA) $(PKG_BUILD_DIR)/libltdl/m4/file \ > + $(1)/usr/share/aclocal/; \ > + done > + $(INSTALL_DIR) $(1)/usr/share/libtool/config > + for file in (cd $(PKG_BUILD_DIR)/libltdl/config && \ > + find . -maxdepth 1 -type f); do \ > + $(INSTALL_DATA) $(PKG_BUILD_DIR)/libltdl/config/file \ > + $(1)/usr/share/libtool/config/; \ > + $(SED) 's|$$(STAGING_DIR_HOST)|/usr|g' \ > + $(1)/usr/share/libtool/config/file; \ > + done > +endef > + > $(eval $(call BuildPackage,libltdl)) > +$(eval $(call BuildPackage,libtool)) ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] base-files: add URL option for OEM manufacturer info
This URL can be embedded e.g. within UPnP announcements where a link to the manufacturer's homepage is desired. Signed-off-by: Michael Heimpold --- include/version.mk |5 + package/base-files/files/etc/device_info |1 + package/base-files/image-config.in |7 +++ 3 files changed, 13 insertions(+) diff --git a/include/version.mk b/include/version.mk index 69141ff..4bce096 100644 --- a/include/version.mk +++ b/include/version.mk @@ -14,6 +14,7 @@ PKG_CONFIG_DEPENDS += \ CONFIG_VERSION_REPO \ CONFIG_VERSION_DIST \ CONFIG_VERSION_MANUFACTURER \ + CONFIG_VERSION_MANUFACTURER_URL \ CONFIG_VERSION_PRODUCT \ CONFIG_VERSION_HWREV \ @@ -38,6 +39,9 @@ VERSION_DIST:=$(if $(VERSION_DIST),$(VERSION_DIST),OpenWrt) VERSION_MANUFACTURER:=$(call qstrip_escape,$(CONFIG_VERSION_MANUFACTURER)) VERSION_MANUFACTURER:=$(if $(VERSION_MANUFACTURER),$(VERSION_MANUFACTURER),OpenWrt) +VERSION_MANUFACTURER_URL:=$(call qstrip_escape,$(CONFIG_VERSION_MANUFACTURER_URL)) +VERSION_MANUFACTURER_URL:=$(if $(VERSION_MANUFACTURER_URL),$(VERSION_MANUFACTURER_URL),http://www.openwrt.org/) + VERSION_PRODUCT:=$(call qstrip_escape,$(CONFIG_VERSION_PRODUCT)) VERSION_PRODUCT:=$(if $(VERSION_PRODUCT),$(VERSION_PRODUCT),Generic) @@ -82,6 +86,7 @@ VERSION_SED:=$(SED) 's,%U,$(VERSION_REPO),g' \ -e 's,%S,$(BOARD)/$(if $(SUBTARGET),$(SUBTARGET),generic),g' \ -e 's,%t,$(VERSION_TAINTS),g' \ -e 's,%M,$(VERSION_MANUFACTURER),g' \ + -e 's,%m,$(VERSION_MANUFACTURER_URL),g' \ -e 's,%P,$(VERSION_PRODUCT),g' \ -e 's,%h,$(VERSION_HWREV),g' diff --git a/package/base-files/files/etc/device_info b/package/base-files/files/etc/device_info index 2962cd7..4045e9e 100644 --- a/package/base-files/files/etc/device_info +++ b/package/base-files/files/etc/device_info @@ -1,3 +1,4 @@ DEVICE_MANUFACTURER='%M' +DEVICE_MANUFACTURER_URL='%m' DEVICE_PRODUCT='%P' DEVICE_REVISION='%h' diff --git a/package/base-files/image-config.in b/package/base-files/image-config.in index fd0ead6..c1c0924 100644 --- a/package/base-files/image-config.in +++ b/package/base-files/image-config.in @@ -197,6 +197,13 @@ if VERSIONOPT This is the manufacturer name embedded in /etc/device_info Useful for OEMs building OpenWrt based firmware + config VERSION_MANUFACTURER_URL + string + prompt "Manufacturer URL" + help + This is an URL to the manufacturer's website embedded in /etc/device_info + Useful for OEMs building OpenWrt based firmware + config VERSION_PRODUCT string prompt "Product name" -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v2 4/7] target/mxs: adopt SD card generation to fixed U-Boot path
Signed-off-by: Michael Heimpold --- Changes in v2: - none target/linux/mxs/image/Makefile |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/mxs/image/Makefile b/target/linux/mxs/image/Makefile index 256d4e6..7e6a1a0 100644 --- a/target/linux/mxs/image/Makefile +++ b/target/linux/mxs/image/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2013 OpenWrt.org +# Copyright (C) 2013-2015 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -57,7 +57,7 @@ define Image/Build/SDCard $(KDIR)/root.$(1) \ $(CONFIG_MXS_SD_BOOT_PARTSIZE) \ $(CONFIG_TARGET_ROOTFS_PARTSIZE) \ - $(BIN_DIR)/uboot-mxs-$(3).sb + $(BIN_DIR)/uboot-mxs-$(3)/uboot-mxs-$(3).sb endef define Image/Build/Profile/olinuxino-maxi -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v2 5/7] packages: uboot-mxs: fix I2SE Duckbill variant
The current patch to add Duckbill support is wrong and does not even compile. So replace this patch with a working one. Signed-off-by: Michael Heimpold --- Changes in v2: - none .../uboot-mxs/patches/001-add-i2se-duckbill.patch | 82 +++- 1 file changed, 46 insertions(+), 36 deletions(-) diff --git a/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch b/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch index 30bb840..f410b19 100644 --- a/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch +++ b/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch @@ -1,20 +1,20 @@ -From 201bd7bba4a7c08c49d4ec36da651eec1c3d156b Mon Sep 17 00:00:00 2001 +From 4d9a32780ec795b9edc83c7b3a1e947cec49a5a4 Mon Sep 17 00:00:00 2001 From: Michael Heimpold -Date: Mon, 24 Nov 2014 23:29:30 +0100 +Date: Sat, 15 Aug 2015 20:26:18 +0200 Subject: [PATCH] Add support for I2SE Duckbill boards Signed-off-by: Michael Heimpold --- - arch/arm/Kconfig | 6 ++ - arch/arm/include/asm/mach-types.h | 14 +++ - board/i2se/duckbill/Kconfig | 15 - board/i2se/duckbill/MAINTAINERS | 6 ++ - board/i2se/duckbill/Makefile | 12 +++ - board/i2se/duckbill/duckbill.c| 103 + - board/i2se/duckbill/iomux.c | 125 ++ - configs/duckbill_defconfig| 4 + - include/configs/duckbill.h| 183 ++ - 9 files changed, 468 insertions(+) + arch/arm/Kconfig |6 ++ + arch/arm/include/asm/mach-types.h | 13 +++ + board/i2se/duckbill/Kconfig | 15 + board/i2se/duckbill/MAINTAINERS |6 ++ + board/i2se/duckbill/Makefile | 12 +++ + board/i2se/duckbill/duckbill.c| 112 +++ + board/i2se/duckbill/iomux.c | 125 ++ + configs/duckbill_defconfig|9 ++ + include/configs/duckbill.h| 177 + + 9 files changed, 475 insertions(+) create mode 100644 board/i2se/duckbill/Kconfig create mode 100644 board/i2se/duckbill/MAINTAINERS create mode 100644 board/i2se/duckbill/Makefile @@ -24,22 +24,22 @@ Signed-off-by: Michael Heimpold create mode 100644 include/configs/duckbill.h diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig -index 5eb1d03..03ffb99 100644 +index 9908b43..7c795ac 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig -@@ -293,6 +293,11 @@ config TARGET_MX28EVK +@@ -178,6 +178,11 @@ config TARGET_MX28EVK select CPU_ARM926EJS select SUPPORT_SPL +config TARGET_DUCKBILL -+ bool "I2SE Duckbill" ++ bool "Support I2SE Duckbill" + select CPU_ARM926EJS + select SUPPORT_SPL + config TARGET_MX23_OLINUXINO bool "Support mx23_olinuxino" select CPU_ARM926EJS -@@ -922,6 +927,7 @@ source "board/genesi/mx51_efikamx/Kconfig" +@@ -926,6 +931,7 @@ source "board/genesi/mx51_efikamx/Kconfig" source "board/gumstix/pepper/Kconfig" source "board/h2200/Kconfig" source "board/hale/tt01/Kconfig" @@ -48,19 +48,18 @@ index 5eb1d03..03ffb99 100644 source "board/imx31_phycore/Kconfig" source "board/isee/igep0033/Kconfig" diff --git a/arch/arm/include/asm/mach-types.h b/arch/arm/include/asm/mach-types.h -index d4a447b..5c71573 100644 +index 5afe791..330a88d 100644 --- a/arch/arm/include/asm/mach-types.h +++ b/arch/arm/include/asm/mach-types.h -@@ -1108,6 +1108,8 @@ extern unsigned int __machine_arch_type; +@@ -1109,6 +1109,7 @@ extern unsigned int __machine_arch_type; #define MACH_TYPE_COLIBRI_T30 4493 #define MACH_TYPE_APALIS_T30 4513 #define MACH_TYPE_OMAPL138_LCDK2495 +#define MACH_TYPE_DUCKBILL 4754 -+ #ifdef CONFIG_ARCH_EBSA110 # ifdef machine_arch_type -@@ -14261,6 +14263,18 @@ extern unsigned int __machine_arch_type; +@@ -14262,6 +14263,18 @@ extern unsigned int __machine_arch_type; # define machine_is_apalis_t30() (0) #endif @@ -132,10 +131,10 @@ index 000..b5577e3 +endif diff --git a/board/i2se/duckbill/duckbill.c b/board/i2se/duckbill/duckbill.c new file mode 100644 -index 000..3fa3ddb +index 000..7794f65 --- /dev/null +++ b/board/i2se/duckbill/duckbill.c -@@ -0,0 +1,103 @@ +@@ -0,0 +1,112 @@ +/* + * I2SE Duckbill board + * @@ -221,6 +220,15 @@ index 000..3fa3ddb + + return ret; +} ++ ++void mx28_adjust_mac(int dev_id, unsigned char *mac) ++{ ++ mac[0] = 0x00; ++ mac[1] = 0x01; ++ ++ if (dev_id == 1) /* Let MAC1 be MAC0 + 1 by default */ ++ mac[5] += 1; ++} +#endif + +int misc_init_r(void) @@ -372,22 +380,27 @@ index 000..538e138 +} diff --git a/configs/duckbill_defconfig b/configs/duckbill_defconfig new file mode 100644 -index 000..d86f5e2 +index 000..2edf895 --- /dev/null +++ b/configs/duckbill_defconfig -@@ -0,0 +1,4 @@
[OpenWrt-Devel] [PATCH v2 7/7] target: mxs: re-work SD card image generation
- Duckbill uses a different partitioning approach than standard FSL and Olimex - use new sdimage to integrate U-Boot into the SD card images Signed-off-by: Michael Heimpold --- Changes in v2: - new patch target/linux/mxs/image/Config.in |9 -- target/linux/mxs/image/Makefile| 34 + target/linux/mxs/image/gen_mxs_sdcard_img.sh | 38 target/linux/mxs/image/gen_sdcard_ext4_ext4.sh | 33 target/linux/mxs/image/gen_sdcard_vfat_ext4.sh | 37 +++ 5 files changed, 97 insertions(+), 54 deletions(-) delete mode 100755 target/linux/mxs/image/gen_mxs_sdcard_img.sh create mode 100755 target/linux/mxs/image/gen_sdcard_ext4_ext4.sh create mode 100755 target/linux/mxs/image/gen_sdcard_vfat_ext4.sh diff --git a/target/linux/mxs/image/Config.in b/target/linux/mxs/image/Config.in index b71edf7..250553e 100644 --- a/target/linux/mxs/image/Config.in +++ b/target/linux/mxs/image/Config.in @@ -1,5 +1,8 @@ -config MXS_SD_BOOT_PARTSIZE +config TARGET_BOOTFS_PARTSIZE int "Boot (SD Card) filesystem partition size (in MB)" - depends on TARGET_mxs + depends on TARGET_mxs_olinuxino-maxi || TARGET_mxs_olinuxino-micro default 8 - + help + On the Olimex OLinuXino boards, mainline U-Boot loads the + linux kernel and device tree file from a FAT partition. + The default value of 8 MB should be more than adequate. diff --git a/target/linux/mxs/image/Makefile b/target/linux/mxs/image/Makefile index 7e6a1a0..94fed82 100644 --- a/target/linux/mxs/image/Makefile +++ b/target/linux/mxs/image/Makefile @@ -7,13 +7,13 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk -include $(INCLUDE_DIR)/host.mk BOARDS:= \ imx23-olinuxino \ imx28-duckbill + FAT32_BLOCK_SIZE=1024 -FAT32_BLOCKS=$(shell echo $$(($(CONFIG_MXS_SD_BOOT_PARTSIZE)*1024*1024/$(FAT32_BLOCK_SIZE +FAT32_BLOCKS=$(shell echo $$(($(CONFIG_TARGET_BOOTFS_PARTSIZE)*1024*1024/$(FAT32_BLOCK_SIZE define Image/BuildKernel mkimage -A arm -O linux -T kernel -C none \ @@ -44,37 +44,45 @@ define Image/InstallKernel endef -define Image/Build/SDCard +define Image/Build/SDCard-vfat-ext4 rm -f $(KDIR)/boot.img mkdosfs $(KDIR)/boot.img -C $(FAT32_BLOCKS) - mcopy -i $(KDIR)/boot.img $(DTS_DIR)/$(2).dtb ::$(2).dtb + mcopy -i $(KDIR)/boot.img $(DTS_DIR)/$(3).dtb ::$(3).dtb mcopy -i $(KDIR)/boot.img $(BIN_DIR)/$(IMG_PREFIX)-uImage ::uImage - ./gen_mxs_sdcard_img.sh \ - $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-sdcard-vfat-$(1).img \ + ./gen_sdcard_vfat_ext4.sh \ + $(BIN_DIR)/$(2) \ + $(BIN_DIR)/uboot-mxs-$(4)/uboot-mxs-$(4).sb \ $(KDIR)/boot.img \ $(KDIR)/root.$(1) \ - $(CONFIG_MXS_SD_BOOT_PARTSIZE) \ - $(CONFIG_TARGET_ROOTFS_PARTSIZE) \ - $(BIN_DIR)/uboot-mxs-$(3)/uboot-mxs-$(3).sb + $(CONFIG_TARGET_BOOTFS_PARTSIZE) \ + $(CONFIG_TARGET_ROOTFS_PARTSIZE) +endef + +define Image/Build/SDCard-ext4-ext4 + ./gen_sdcard_ext4_ext4.sh \ + $(BIN_DIR)/$(2) \ + $(BIN_DIR)/uboot-mxs-$(4)/uboot-mxs-$(4).sb \ + $(KDIR)/root.$(1) \ + $(CONFIG_TARGET_ROOTFS_PARTSIZE) endef define Image/Build/Profile/olinuxino-maxi - $(call Image/Build/SDCard,$(1),imx23-olinuxino,mx23_olinuxino) + $(call Image/Build/SDCard-vfat-ext4,$(1),$(2),imx23-olinuxino,mx23_olinuxino) endef define Image/Build/Profile/olinuxino-micro - $(call Image/Build/SDCard,$(1),imx23-olinuxino,mx23_olinuxino) + $(call Image/Build/SDCard-vfat-ext4,$(1),$(2),imx23-olinuxino,mx23_olinuxino) endef define Image/Build/Profile/duckbill - $(call Image/Build/SDCard,$(1),imx28-duckbill,duckbill) + $(call Image/Build/SDCard-ext4-ext4,$(1),$(2),imx28-duckbill,duckbill) endef define Image/Build $(call Image/Build/$(1),$(1)) - $(call Image/Build/Profile/$(PROFILE),$(1)) + $(call Image/Build/Profile/$(PROFILE),$(1),$(IMG_PREFIX)-$(PROFILE)-sdcard.img) dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync endef diff --git a/target/linux/mxs/image/gen_mxs_sdcard_img.sh b/target/linux/mxs/image/gen_mxs_sdcard_img.sh deleted file mode 100755 index 7faa8d5..000 --- a/target/linux/mxs/image/gen_mxs_sdcard_img.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env bash - -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -set -x -[ $# -eq 6 ] || { -echo "SYNTAX: $0 " -exit 1 -} - -OUTPUT="$1" -BOOTFS="$2" -ROOTFS="$3" -BOOTFSSIZE="$4" -ROOTFSSIZE="$5" -UBOOT="$6" - -head
[OpenWrt-Devel] [PATCH v2 3/7] packages: uboot-mxs: bless UBOOT_IMAGE with a meaning, otherwise we could drop this C&P left-over
Signed-off-by: Michael Heimpold --- Changes in v2: - none package/boot/uboot-mxs/Makefile |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/boot/uboot-mxs/Makefile b/package/boot/uboot-mxs/Makefile index eee73d2..373b8d8 100644 --- a/package/boot/uboot-mxs/Makefile +++ b/package/boot/uboot-mxs/Makefile @@ -62,7 +62,7 @@ endef ifdef BUILD_VARIANT $(eval $(call uboot/$(BUILD_VARIANT))) UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT)) -UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),openwrt-$(BOARD)-$(BUILD_VARIANT)-u-boot.bin) +UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),u-boot.sb) endif define Build/Configure @@ -72,12 +72,12 @@ endef define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ - CROSS_COMPILE=$(TARGET_CROSS) u-boot.sb + CROSS_COMPILE=$(TARGET_CROSS) $(UBOOT_IMAGE) endef define Package/uboot/install/default $(INSTALL_DIR) $(BIN_DIR)/uboot-$(BOARD)-$(1) - $(CP) $(PKG_BUILD_DIR)/u-boot.sb $(BIN_DIR)/uboot-$(BOARD)-$(1)/uboot-$(BOARD)-$(1).sb + $(CP) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) $(BIN_DIR)/uboot-$(BOARD)-$(1)/uboot-$(BOARD)-$(1).sb endef define Package/uboot/install/template -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v2 1/7] packages: uboot-mxs: place binaries in the designated path
Signed-off-by: Michael Heimpold --- Changes in v2: - none package/boot/uboot-mxs/Makefile |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/package/boot/uboot-mxs/Makefile b/package/boot/uboot-mxs/Makefile index 1686f60..a6a137c 100644 --- a/package/boot/uboot-mxs/Makefile +++ b/package/boot/uboot-mxs/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2013 OpenWrt.org +# Copyright (C) 2013-2015 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -40,7 +40,6 @@ endef UBOOTS := \ mx23_olinuxino \ duckbill - define Package/uboot/template define Package/uboot-mxs-$(1) @@ -76,10 +75,9 @@ define Build/Compile CROSS_COMPILE=$(TARGET_CROSS) u-boot.sb endef - define Package/uboot/install/default $(INSTALL_DIR) $(BIN_DIR)/uboot-$(BOARD)-$(1) - dd if=$(PKG_BUILD_DIR)/u-boot.sb of=$(BIN_DIR)/uboot-$(BOARD)-$(1).sb bs=512 seek=4 + dd if=$(PKG_BUILD_DIR)/u-boot.sb of=$(BIN_DIR)/uboot-$(BOARD)-$(1)/uboot-$(BOARD)-$(1).sb bs=512 seek=4 endef define Package/uboot/install/template -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v2 6/7] tools: add sdimage (for mxs target)
This tool is used for SD card generation on Freescale i.MX23/i.MX28 platforms. These CPU's ROM need a tiny header of front of a boot stream. Signed-off-by: Michael Heimpold --- Changes in v2: - new patch tools/Makefile |2 +- tools/sdimage/Makefile | 37 + 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 tools/sdimage/Makefile diff --git a/tools/Makefile b/tools/Makefile index dda429f..df384d4 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -31,7 +31,7 @@ tools-y += mm-macros missing-macros xz cmake scons bc findutils gengetopt patche tools-$(CONFIG_TARGET_orion_generic) += wrt350nv2-builder upslug2 tools-$(CONFIG_powerpc) += upx tools-$(CONFIG_TARGET_x86) += qemu -tools-$(CONFIG_TARGET_mxs) += elftosb +tools-$(CONFIG_TARGET_mxs) += elftosb sdimage tools-$(CONFIG_TARGET_brcm2708)$(CONFIG_TARGET_sunxi)$(CONFIG_TARGET_mxs) += mtools dosfstools tools-$(CONFIG_TARGET_ar71xx) += lzma-old squashfs tools-y += lzma squashfs4 diff --git a/tools/sdimage/Makefile b/tools/sdimage/Makefile new file mode 100644 index 000..e590417 --- /dev/null +++ b/tools/sdimage/Makefile @@ -0,0 +1,37 @@ +# +# Copyright (C) 2015 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +include $(TOPDIR)/rules.mk + +PKG_NAME:=imx-uuc +PKG_VERSION=2015-09-13-$(PKG_SOURCE_VERSION) +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/mhei/fsl-imx-uuc.git +PKG_SOURCE_VERSION:=2b99403b6dc60a22b07eb7a5cc0cb184abb89bdd +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.bz2 + +PKG_LICENSE:=GPL-2.0+ +PKG_LICENSE_FILES:=LICENSE + +HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_SOURCE_SUBDIR) + +include $(INCLUDE_DIR)/host-build.mk + +define Host/Configure +endef + +define Host/Install + $(INSTALL_BIN) $(HOST_BUILD_DIR)/sdimage $(STAGING_DIR_HOST)/bin/sdimage +endef + +define Host/Clean + rm -f $(STAGING_DIR_HOST)/bin/sdimage +endef + +$(eval $(call HostBuild)) -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v2 2/7] packages: uboot-mxs: do no modify the U-Boot image, copy as-is
Signed-off-by: Michael Heimpold --- Changes in v2: - none package/boot/uboot-mxs/Makefile |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/boot/uboot-mxs/Makefile b/package/boot/uboot-mxs/Makefile index a6a137c..eee73d2 100644 --- a/package/boot/uboot-mxs/Makefile +++ b/package/boot/uboot-mxs/Makefile @@ -77,7 +77,7 @@ endef define Package/uboot/install/default $(INSTALL_DIR) $(BIN_DIR)/uboot-$(BOARD)-$(1) - dd if=$(PKG_BUILD_DIR)/u-boot.sb of=$(BIN_DIR)/uboot-$(BOARD)-$(1)/uboot-$(BOARD)-$(1).sb bs=512 seek=4 + $(CP) $(PKG_BUILD_DIR)/u-boot.sb $(BIN_DIR)/uboot-$(BOARD)-$(1)/uboot-$(BOARD)-$(1).sb endef define Package/uboot/install/template -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v2 0/7] target: mxs: various fixes
This patch series is to bring OpenWrt's Duckbill support back in shape: - U-Boot build is fixed - SD card generation is adopted for Duckbill images I've tested my changes with I2SE Duckbill and Olimex OLinuXino Maxi board, however, I've no Micro/Mini at hand. This series obsoletes my series "packages: uboot-mxs: various fixes" from Mon, 31 Aug 2015 21:49:28 +0200, so I've choosen to name this one "v2". It's possible to pull this series from https://github.com/mhei/openwrt/tree/mxs-fixes, but I'm rebasing this branch from time to time. Changes in v2: - don't break Olimex (i.MX233) based boards anymore - SD card generation now support Duckbill's partitioning scheme Michael Heimpold (7): packages: uboot-mxs: place binaries in the designated path packages: uboot-mxs: do no modify the U-Boot image, copy as-is packages: uboot-mxs: bless UBOOT_IMAGE with a meaning, otherwise we could drop this C&P left-over target/mxs: adopt SD card generation to fixed U-Boot path packages: uboot-mxs: fix I2SE Duckbill variant tools: add sdimage (for mxs target) target: mxs: re-work SD card image generation package/boot/uboot-mxs/Makefile| 10 +-- .../uboot-mxs/patches/001-add-i2se-duckbill.patch | 82 +++- target/linux/mxs/image/Config.in |9 ++- target/linux/mxs/image/Makefile| 36 + target/linux/mxs/image/gen_mxs_sdcard_img.sh | 38 - target/linux/mxs/image/gen_sdcard_ext4_ext4.sh | 33 target/linux/mxs/image/gen_sdcard_vfat_ext4.sh | 37 + tools/Makefile |2 +- tools/sdimage/Makefile | 37 + 9 files changed, 186 insertions(+), 98 deletions(-) delete mode 100755 target/linux/mxs/image/gen_mxs_sdcard_img.sh create mode 100755 target/linux/mxs/image/gen_sdcard_ext4_ext4.sh create mode 100755 target/linux/mxs/image/gen_sdcard_vfat_ext4.sh create mode 100644 tools/sdimage/Makefile -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Removing Telnet
Am Dienstag, 8. September 2015, 10:15:52 schrieb Steven Barth: > Hello everyone, > > as of https://dev.openwrt.org/changeset/46809 telnet is no longer part of > the base images. As a replacement, it is now possible to login to the root- > account via SSH without a password prompt whenever no root password is set, > e.g. after a flash without keeping config, factory reset or in failsafe. > > We will see how that goes. Let us know if there are any issues. just for the record, at my last employer, we developed various custom OpenWrt based embedded devices. During manufacturing process, we had a stage where the final device was equipped with serial numbers, mac addresses and so on - we called this stage 'device baptism'. So was done by logging into the device via telnet, because this was fast and available nearly immediately after reboot (and because the somewhat old-fashion production toolsuite only supports telnet, but not SSH). I also remember that "long time ago" there were issues because of not enough entropy available on embedded devices. Is this still an issue? Should only delay the time when logging in is possible, right? So...I'll dry my tears and then go with it :-) Regards, Michael ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 0/5] packages: uboot-mxs: various fixes
This patch series is the first step to bring OpenWrt's Duckbill support back in shape. U-Boot mainline support is still on my TODO list, so for the meantime, handle this with a proper patch. Michael Heimpold (5): packages: uboot-mxs: place binaries in the designated path packages: uboot-mxs: do no modify the U-Boot image, copy as-is packages: uboot-mxs: bless UBOOT_IMAGE with a meaning, otherwise we could drop this C&P left-over target/mxs: adopt SD card generation to fixed U-Boot path packages: uboot-mxs: fix I2SE Duckbill variant package/boot/uboot-mxs/Makefile| 10 +-- .../uboot-mxs/patches/001-add-i2se-duckbill.patch | 82 +++- target/linux/mxs/image/Makefile|4 +- 3 files changed, 52 insertions(+), 44 deletions(-) -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 3/5] packages: uboot-mxs: bless UBOOT_IMAGE with a meaning, otherwise we could drop this C&P left-over
Signed-off-by: Michael Heimpold --- package/boot/uboot-mxs/Makefile |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/boot/uboot-mxs/Makefile b/package/boot/uboot-mxs/Makefile index eee73d2..373b8d8 100644 --- a/package/boot/uboot-mxs/Makefile +++ b/package/boot/uboot-mxs/Makefile @@ -62,7 +62,7 @@ endef ifdef BUILD_VARIANT $(eval $(call uboot/$(BUILD_VARIANT))) UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT)) -UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),openwrt-$(BOARD)-$(BUILD_VARIANT)-u-boot.bin) +UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),u-boot.sb) endif define Build/Configure @@ -72,12 +72,12 @@ endef define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ - CROSS_COMPILE=$(TARGET_CROSS) u-boot.sb + CROSS_COMPILE=$(TARGET_CROSS) $(UBOOT_IMAGE) endef define Package/uboot/install/default $(INSTALL_DIR) $(BIN_DIR)/uboot-$(BOARD)-$(1) - $(CP) $(PKG_BUILD_DIR)/u-boot.sb $(BIN_DIR)/uboot-$(BOARD)-$(1)/uboot-$(BOARD)-$(1).sb + $(CP) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) $(BIN_DIR)/uboot-$(BOARD)-$(1)/uboot-$(BOARD)-$(1).sb endef define Package/uboot/install/template -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 4/5] target/mxs: adopt SD card generation to fixed U-Boot path
Signed-off-by: Michael Heimpold --- target/linux/mxs/image/Makefile |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/mxs/image/Makefile b/target/linux/mxs/image/Makefile index 256d4e6..7e6a1a0 100644 --- a/target/linux/mxs/image/Makefile +++ b/target/linux/mxs/image/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2013 OpenWrt.org +# Copyright (C) 2013-2015 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -57,7 +57,7 @@ define Image/Build/SDCard $(KDIR)/root.$(1) \ $(CONFIG_MXS_SD_BOOT_PARTSIZE) \ $(CONFIG_TARGET_ROOTFS_PARTSIZE) \ - $(BIN_DIR)/uboot-mxs-$(3).sb + $(BIN_DIR)/uboot-mxs-$(3)/uboot-mxs-$(3).sb endef define Image/Build/Profile/olinuxino-maxi -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/5] packages: uboot-mxs: do no modify the U-Boot image, copy as-is
Signed-off-by: Michael Heimpold --- package/boot/uboot-mxs/Makefile |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/boot/uboot-mxs/Makefile b/package/boot/uboot-mxs/Makefile index a6a137c..eee73d2 100644 --- a/package/boot/uboot-mxs/Makefile +++ b/package/boot/uboot-mxs/Makefile @@ -77,7 +77,7 @@ endef define Package/uboot/install/default $(INSTALL_DIR) $(BIN_DIR)/uboot-$(BOARD)-$(1) - dd if=$(PKG_BUILD_DIR)/u-boot.sb of=$(BIN_DIR)/uboot-$(BOARD)-$(1)/uboot-$(BOARD)-$(1).sb bs=512 seek=4 + $(CP) $(PKG_BUILD_DIR)/u-boot.sb $(BIN_DIR)/uboot-$(BOARD)-$(1)/uboot-$(BOARD)-$(1).sb endef define Package/uboot/install/template -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 5/5] packages: uboot-mxs: fix I2SE Duckbill variant
The current patch to add Duckbill support is wrong and does not even compile. So replace this patch with a working one. Signed-off-by: Michael Heimpold --- .../uboot-mxs/patches/001-add-i2se-duckbill.patch | 82 +++- 1 file changed, 46 insertions(+), 36 deletions(-) diff --git a/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch b/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch index 30bb840..f410b19 100644 --- a/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch +++ b/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch @@ -1,20 +1,20 @@ -From 201bd7bba4a7c08c49d4ec36da651eec1c3d156b Mon Sep 17 00:00:00 2001 +From 4d9a32780ec795b9edc83c7b3a1e947cec49a5a4 Mon Sep 17 00:00:00 2001 From: Michael Heimpold -Date: Mon, 24 Nov 2014 23:29:30 +0100 +Date: Sat, 15 Aug 2015 20:26:18 +0200 Subject: [PATCH] Add support for I2SE Duckbill boards Signed-off-by: Michael Heimpold --- - arch/arm/Kconfig | 6 ++ - arch/arm/include/asm/mach-types.h | 14 +++ - board/i2se/duckbill/Kconfig | 15 - board/i2se/duckbill/MAINTAINERS | 6 ++ - board/i2se/duckbill/Makefile | 12 +++ - board/i2se/duckbill/duckbill.c| 103 + - board/i2se/duckbill/iomux.c | 125 ++ - configs/duckbill_defconfig| 4 + - include/configs/duckbill.h| 183 ++ - 9 files changed, 468 insertions(+) + arch/arm/Kconfig |6 ++ + arch/arm/include/asm/mach-types.h | 13 +++ + board/i2se/duckbill/Kconfig | 15 + board/i2se/duckbill/MAINTAINERS |6 ++ + board/i2se/duckbill/Makefile | 12 +++ + board/i2se/duckbill/duckbill.c| 112 +++ + board/i2se/duckbill/iomux.c | 125 ++ + configs/duckbill_defconfig|9 ++ + include/configs/duckbill.h| 177 + + 9 files changed, 475 insertions(+) create mode 100644 board/i2se/duckbill/Kconfig create mode 100644 board/i2se/duckbill/MAINTAINERS create mode 100644 board/i2se/duckbill/Makefile @@ -24,22 +24,22 @@ Signed-off-by: Michael Heimpold create mode 100644 include/configs/duckbill.h diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig -index 5eb1d03..03ffb99 100644 +index 9908b43..7c795ac 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig -@@ -293,6 +293,11 @@ config TARGET_MX28EVK +@@ -178,6 +178,11 @@ config TARGET_MX28EVK select CPU_ARM926EJS select SUPPORT_SPL +config TARGET_DUCKBILL -+ bool "I2SE Duckbill" ++ bool "Support I2SE Duckbill" + select CPU_ARM926EJS + select SUPPORT_SPL + config TARGET_MX23_OLINUXINO bool "Support mx23_olinuxino" select CPU_ARM926EJS -@@ -922,6 +927,7 @@ source "board/genesi/mx51_efikamx/Kconfig" +@@ -926,6 +931,7 @@ source "board/genesi/mx51_efikamx/Kconfig" source "board/gumstix/pepper/Kconfig" source "board/h2200/Kconfig" source "board/hale/tt01/Kconfig" @@ -48,19 +48,18 @@ index 5eb1d03..03ffb99 100644 source "board/imx31_phycore/Kconfig" source "board/isee/igep0033/Kconfig" diff --git a/arch/arm/include/asm/mach-types.h b/arch/arm/include/asm/mach-types.h -index d4a447b..5c71573 100644 +index 5afe791..330a88d 100644 --- a/arch/arm/include/asm/mach-types.h +++ b/arch/arm/include/asm/mach-types.h -@@ -1108,6 +1108,8 @@ extern unsigned int __machine_arch_type; +@@ -1109,6 +1109,7 @@ extern unsigned int __machine_arch_type; #define MACH_TYPE_COLIBRI_T30 4493 #define MACH_TYPE_APALIS_T30 4513 #define MACH_TYPE_OMAPL138_LCDK2495 +#define MACH_TYPE_DUCKBILL 4754 -+ #ifdef CONFIG_ARCH_EBSA110 # ifdef machine_arch_type -@@ -14261,6 +14263,18 @@ extern unsigned int __machine_arch_type; +@@ -14262,6 +14263,18 @@ extern unsigned int __machine_arch_type; # define machine_is_apalis_t30() (0) #endif @@ -132,10 +131,10 @@ index 000..b5577e3 +endif diff --git a/board/i2se/duckbill/duckbill.c b/board/i2se/duckbill/duckbill.c new file mode 100644 -index 000..3fa3ddb +index 000..7794f65 --- /dev/null +++ b/board/i2se/duckbill/duckbill.c -@@ -0,0 +1,103 @@ +@@ -0,0 +1,112 @@ +/* + * I2SE Duckbill board + * @@ -221,6 +220,15 @@ index 000..3fa3ddb + + return ret; +} ++ ++void mx28_adjust_mac(int dev_id, unsigned char *mac) ++{ ++ mac[0] = 0x00; ++ mac[1] = 0x01; ++ ++ if (dev_id == 1) /* Let MAC1 be MAC0 + 1 by default */ ++ mac[5] += 1; ++} +#endif + +int misc_init_r(void) @@ -372,22 +380,27 @@ index 000..538e138 +} diff --git a/configs/duckbill_defconfig b/configs/duckbill_defconfig new file mode 100644 -index 000..d86f5e2 +index 000..2edf895 --- /dev/null +++ b/configs/duckbill_defconfig -@@ -0,0 +1,4 @@ +@@ -0,0 +1,9 @@ ++CONFIG_ARM=y
[OpenWrt-Devel] [PATCH 1/5] packages: uboot-mxs: place binaries in the designated path
Signed-off-by: Michael Heimpold --- package/boot/uboot-mxs/Makefile |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/package/boot/uboot-mxs/Makefile b/package/boot/uboot-mxs/Makefile index 1686f60..a6a137c 100644 --- a/package/boot/uboot-mxs/Makefile +++ b/package/boot/uboot-mxs/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2013 OpenWrt.org +# Copyright (C) 2013-2015 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -40,7 +40,6 @@ endef UBOOTS := \ mx23_olinuxino \ duckbill - define Package/uboot/template define Package/uboot-mxs-$(1) @@ -76,10 +75,9 @@ define Build/Compile CROSS_COMPILE=$(TARGET_CROSS) u-boot.sb endef - define Package/uboot/install/default $(INSTALL_DIR) $(BIN_DIR)/uboot-$(BOARD)-$(1) - dd if=$(PKG_BUILD_DIR)/u-boot.sb of=$(BIN_DIR)/uboot-$(BOARD)-$(1).sb bs=512 seek=4 + dd if=$(PKG_BUILD_DIR)/u-boot.sb of=$(BIN_DIR)/uboot-$(BOARD)-$(1)/uboot-$(BOARD)-$(1).sb bs=512 seek=4 endef define Package/uboot/install/template -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH v2 00/25] ramips: massive code cleanups
Hi Piotr, great work! While looking at your DT cleanups, I wonder whether it would be possible to go one step further and adopt the BuildDTB stuff which Jonas did for brcm63xx target: then it would be possible to use preprocessor includes in the DTS files and use defines like KEY_* and so on. And it would be great, if you could provide a git url to pull your series from :-) Regards, mhei Am Mittwoch, 5. August 2015, 20:30:01 schrieb Piotr Dymacz: > The following changes fix different mistakes in ramips target and try to make > the code more clean and consistent. > > The patches affect: > * dts{,i} files > * base-files/* scripts > * image Makefile > * subtargets *.mk profile files > > Changes in v2 of the series: > * rebased to r46566 > * use the upstream convention for LED naming > * more fixes in dts{,i} files > * patches are now ordered more logically > * patches are now better described > * additional fixes related with devices names > * big patches related with particular devices are not combined together, for > easy review > ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] Issue when creating rootfs images with parallel jobs
Hi, when I try to create a rootfs for my Duckbill device, I used to run "make -j4 ...". The default configuration enables CONFIG_TARGET_ROOTFS_INCLUDE_KERNEL because the bootloader expects the kernel image in the rootfs below /boot. However, my problem is, that when running make with -j2 or more, then the ext4 rootfs image does not contain the /boot directory and thus the kernel/dt binaries. But this is not limited to ext4 images, the tar.gz variant of the rootfs suffers from the same problem. But everthing works as expected, when using "make -j1..." Then all images include the /boot directory. So I guess, this is a problem with the parallel jobs. Is there any chance to get this fixed? Regards, mhei ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] lldpd: disable xml explicitly
This prevents auto-detection of libxml2 and thus the error: Package lldpd is missing dependencies for the following libraries: libxml2.so.2 Preventing a dependency to libxml2 is preferred, since libxml2 would be a out-of-(core-)tree dependency. Reported-by: Buildbot Signed-off-by: Michael Heimpold --- package/network/services/lldpd/Makefile |1 + 1 file changed, 1 insertion(+) diff --git a/package/network/services/lldpd/Makefile b/package/network/services/lldpd/Makefile index 69f7022..cccb9ba 100644 --- a/package/network/services/lldpd/Makefile +++ b/package/network/services/lldpd/Makefile @@ -93,6 +93,7 @@ CONFIGURE_ARGS += \ --with-readline=no \ --with-embedded-libevent=no \ --disable-hardening \ + --without-xml \ $(if $(CONFIG_LLDPD_WITH_CDP),,--disable-cdp) \ $(if $(CONFIG_LLDPD_WITH_FDP),,--disable-fdp) \ $(if $(CONFIG_LLDPD_WITH_EDP),,--disable-edp) \ -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] brcm47xx: drop global description in favour of subtarget ones
Defining a description in this makefile prevents the subtarget Target/Description sections to appear in menuconfig's help for the subtargets. However, this also removes the menuconfig's help text for the target itself, but I'm not skilled enough to avoid this. Signed-off-by: Michael Heimpold --- target/linux/brcm47xx/Makefile |5 - 1 file changed, 5 deletions(-) diff --git a/target/linux/brcm47xx/Makefile b/target/linux/brcm47xx/Makefile index 22b8674..4ac644c 100644 --- a/target/linux/brcm47xx/Makefile +++ b/target/linux/brcm47xx/Makefile @@ -17,11 +17,6 @@ KERNEL_PATCHVER:=3.18 include $(INCLUDE_DIR)/target.mk - -define Target/Description - Build firmware images for Broadcom based BCM47xx/53xx routers with MIPS CPU, *not* ARM. -endef - DEFAULT_PACKAGES += swconfig wpad-mini nvram otrx \ kmod-leds-gpio kmod-gpio-button-hotplug \ kmod-ledtrig-default-on kmod-ledtrig-timer kmod-ledtrig-netdev -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Looking for a Broadcom Asus tester(s)
Hi, thanks for your feedback and sorry for my mistake. Now I tried openwrt-brcm47xx-legacy-asus-wl-500gp-v2-squashfs.trx from r45811 and it works. Great! I'm wondering whether we should improve the "make menuconfig" help text about subtarget selection a little bit. Just for users like me, not reading the wiki page _before_ running the compiler :-) Regards, mhei Am Donnerstag, 28. Mai 2015, 21:57:04 schrieb Rafał Miłecki: > On 28 May 2015 at 21:44, Rafał Miłecki wrote: > > On 28 May 2015 at 21:31, Michael Heimpold wrote: > >> I have a Asus WL-500gP V2 router and restored original Asus Firmware > >> version 3.0.4.4. Then I tried > >> openwrt-brcm47xx-generic-squashfs.trx, > >> openwrt-brcm47xx-generic-squashfs-gz.trx > >> openwrt-brcm47xx-generic-squashfs-noloader-nodictionary.trx, > >> but without look. The original firmware always rejected the image :-( > > > > You were supposed to test device-specific firmware, in your case it means > > openwrt-brcm47xx-legacy-asus-wl-520gp-v2-squashfs.trx > > (yes, there isn't any reason for you to use "generic" instead of "legacy") > > So above file (asus-wl-520gp-v2) is indeed for Asus WL-500gP v2. It > should be named 500, not 520, I fixed this mistake in r45811: > https://dev.openwrt.org/changeset/45811/ > > So whatever file you have: > openwrt-brcm47xx-legacy-asus-wl-500gp-v2-squashfs.trx > openwrt-brcm47xx-legacy-asus-wl-520gp-v2-squashfs.trx > , please try it and let me know if it worked with original firmware. > > ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Looking for a Broadcom Asus tester(s)
Hi Rafał, I have a Asus WL-500gP V2 router and restored original Asus Firmware version 3.0.4.4. Then I tried openwrt-brcm47xx-generic-squashfs.trx, openwrt-brcm47xx-generic-squashfs-gz.trx openwrt-brcm47xx-generic-squashfs-noloader-nodictionary.trx, but without look. The original firmware always rejected the image :-( The OpenWrt version I tested was: git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45810 3c298f89-4303-0410-b956-a3cf2f4a3e73 HTH + thanks for your hard work, regards, Michael Am Mittwoch, 27. Mai 2015, 22:32:57 schrieb Rafał Miłecki: > Hi, > > With few recent commits OpenWrt can now generate Asus-specific TRX > files for brcm47xx and bcm53xx. The magic is about some extra data at > the end of TRX (so the format differs a bit, even it using the same > file extension and layout). > > My request for someone having Broadcom-based Asus devices is: > 1) Install original firmware > 2) Try to install OpenWrt .trx firmware for that device > 3) Let us know if it worked > > I don't have any Asus device around, so I'm not sure if OpenWrt > generates really compatible images now. Above way is the only one to > verify it for sure :) > > ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] php5-pecl-bcompiler: drop package
Package is marked broken for a long time and upstreams seems to be dead, too. Signed-off-by: Michael Heimpold --- lang/php5-pecl-bcompiler/Makefile | 29 - 1 file changed, 29 deletions(-) delete mode 100644 lang/php5-pecl-bcompiler/Makefile diff --git a/lang/php5-pecl-bcompiler/Makefile b/lang/php5-pecl-bcompiler/Makefile deleted file mode 100644 index 6bab984..000 --- a/lang/php5-pecl-bcompiler/Makefile +++ /dev/null @@ -1,29 +0,0 @@ -# -# Copyright (C) 2012 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PECL_NAME:=bcompiler -PECL_LONGNAME:=PHP bytecode Compiler - -PKG_VERSION:=1.0.2 -PKG_RELEASE:=1 -PKG_MD5SUM:=99f76a5ef536d43180b41036a6a13e43 - -PKG_NAME:=php5-pecl-$(PECL_NAME) -PKG_SOURCE:=$(PECL_NAME)-$(PKG_VERSION).tgz -PKG_SOURCE_URL:=http://pecl.php.net/get/ - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PECL_NAME)-$(PKG_VERSION) -PKG_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk -include ../php5/pecl.mk - -$(eval $(call PECLPackage,$(PECL_NAME),$(PECL_LONGNAME),@BROKEN)) -$(eval $(call BuildPackage,$(PKG_NAME))) -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] php5-pecl-libevent: moved to github
Signed-off-by: Michael Heimpold --- lang/php5-pecl-libevent/Makefile | 31 --- 1 file changed, 31 deletions(-) delete mode 100644 lang/php5-pecl-libevent/Makefile diff --git a/lang/php5-pecl-libevent/Makefile b/lang/php5-pecl-libevent/Makefile deleted file mode 100644 index a4c9e40..000 --- a/lang/php5-pecl-libevent/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -# -# Copyright (C) 2012-2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PECL_NAME:=libevent -PECL_LONGNAME:=Libevent - event notification - -PKG_VERSION:=0.1.0 -PKG_RELEASE:=1 -PKG_MD5SUM:=e091371a9e714098a4c04a6e3daeb56a - -PKG_NAME:=php5-pecl-$(PECL_NAME) -PKG_SOURCE:=$(PECL_NAME)-$(PKG_VERSION).tgz -PKG_SOURCE_URL:=http://pecl.php.net/get/ - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PECL_NAME)-$(PKG_VERSION) -PKG_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk -include ../php5/pecl.mk - -CONFIGURE_ARGS+= --with-libevent=shared,"$(STAGING_DIR)/usr" - -$(eval $(call PECLPackage,$(PECL_NAME),$(PECL_LONGNAME),+libevent2)) -$(eval $(call BuildPackage,$(PKG_NAME))) -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] php5-pecl-dio: moved to github
Signed-off-by: Michael Heimpold --- lang/php5-pecl-dio/Makefile| 29 .../patches/010-additional-baudrates.patch | 29 2 files changed, 58 deletions(-) delete mode 100644 lang/php5-pecl-dio/Makefile delete mode 100644 lang/php5-pecl-dio/patches/010-additional-baudrates.patch diff --git a/lang/php5-pecl-dio/Makefile b/lang/php5-pecl-dio/Makefile deleted file mode 100644 index f9c5f50..000 --- a/lang/php5-pecl-dio/Makefile +++ /dev/null @@ -1,29 +0,0 @@ -# -# Copyright (C) 2012 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PECL_NAME:=dio -PECL_LONGNAME:=Direct I/O functions - -PKG_VERSION:=0.0.6 -PKG_RELEASE:=1 -PKG_MD5SUM:=95bde93a41def9c2d97532eeb0c83bd3 - -PKG_NAME:=php5-pecl-$(PECL_NAME) -PKG_SOURCE:=$(PECL_NAME)-$(PKG_VERSION).tgz -PKG_SOURCE_URL:=http://pecl.php.net/get/ - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PECL_NAME)-$(PKG_VERSION) -PKG_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk -include ../php5/pecl.mk - -$(eval $(call PECLPackage,$(PECL_NAME),$(PECL_LONGNAME))) -$(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/lang/php5-pecl-dio/patches/010-additional-baudrates.patch b/lang/php5-pecl-dio/patches/010-additional-baudrates.patch deleted file mode 100644 index 5032e6e..000 --- a/lang/php5-pecl-dio/patches/010-additional-baudrates.patch +++ /dev/null @@ -1,29 +0,0 @@ a/dio.c -+++ b/dio.c -@@ -442,6 +442,26 @@ PHP_FUNCTION(dio_tcsetattr) - - /* assign to correct values... */ - switch (Baud_Rate) { -+#ifdef B460800 -+ case 460800: -+ BAUD = B460800; -+ break; -+#endif -+#ifdef B230400 -+ case 230400: -+ BAUD = B230400; -+ break; -+#endif -+#ifdef B115200 -+ case 115200: -+ BAUD = B115200; -+ break; -+#endif -+#ifdef B57600 -+ case 57600: -+ BAUD = B57600; -+ break; -+#endif - case 38400: - BAUD = B38400; - break; -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] mxs: fix ext4 image
Am Sonntag, 5. April 2015, 12:01:48 schrieb Harald Geyer: > commit 597a84e52d9eff8d4686c40cd8be4f7a9b47679d with > git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45052 > 3c298f89-4303-0410-b956-a3cf2f4a3e73 > > made the ext4 rootfs image unavailable for download from snapshots. > Only a SD-card image with u-boot and everything is available. This is > annoying for people who either have their own custom partition layout > or want to upgrade the rootfs without losing the u-boot configuration. > > The same commit also broke the inclusion of dtbs in the root filesystem. > > Note: I don't know if this is the right way to implement this. I'm just > adding code back that was there before. > > Signed-off-by: Harald Geyer > --- > target/linux/mxs/image/Makefile |4 > 1 file changed, 4 insertions(+) > > diff --git a/target/linux/mxs/image/Makefile b/target/linux/mxs/image/Makefile > index 9830a7d..b5a092e 100644 > --- a/target/linux/mxs/image/Makefile > +++ b/target/linux/mxs/image/Makefile > @@ -9,6 +9,9 @@ include $(TOPDIR)/rules.mk > include $(INCLUDE_DIR)/image.mk > include $(INCLUDE_DIR)/host.mk > > +BOARDS:= \ > + imx23-olinuxino \ > + imx28-duckbill > FAT32_BLOCK_SIZE=1024 > FAT32_BLOCKS=$(shell echo > $$(($(CONFIG_MXS_SD_BOOT_PARTSIZE)*1024*1024/$(FAT32_BLOCK_SIZE > > @@ -72,6 +75,7 @@ endef > define Image/Build > $(call Image/Build/$(1),$(1)) > $(call Image/Build/Profile/$(PROFILE),$(1)) > + dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k > conv=sync > endef > > $(eval $(call BuildImage)) > Acked-by: Michael Heimpold ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] mxs: Include the right kernel image in the rootfs
Am Sonntag, 5. April 2015, 12:01:47 schrieb Harald Geyer: > Currently we always include the zImage if any image is selected for > inclusion in the root filesystem. This patch adds discrimination > between zImage and uImage. > > Signed-off-by: Harald Geyer > --- > target/linux/mxs/image/Makefile |7 ++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/target/linux/mxs/image/Makefile b/target/linux/mxs/image/Makefile > index 55e88c2..9830a7d 100644 > --- a/target/linux/mxs/image/Makefile > +++ b/target/linux/mxs/image/Makefile > @@ -22,10 +22,15 @@ endef > > define Image/InstallKernel > > - ifneq ($(CONFIG_TARGET_ROOTFS_INCLUDE_KERNEL),) > + ifneq ($(CONFIG_TARGET_ROOTFS_INCLUDE_ZIMAGE),) > mkdir -p $(TARGET_DIR)/boot > $(CP) $(LINUX_DIR)/arch/arm/boot/zImage $(TARGET_DIR)/boot/ >endif > + > + ifneq ($(CONFIG_TARGET_ROOTFS_INCLUDE_UIMAGE),) > + mkdir -p $(TARGET_DIR)/boot > + cp $(KDIR)/uImage $(TARGET_DIR)/boot/ > + endif > >ifneq ($(CONFIG_TARGET_ROOTFS_INCLUDE_DTB),) > mkdir -p $(TARGET_DIR)/boot > Acked-by: Michael Heimpold ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] Status of new standard ETSI EN 300 328 (ralink)
Hi wifi gurus :-) I recently learned that devices for the european market must fulfill the new ETSI standard EN 300 328 V1.8.1 since 2015-01-01. I also understand that most wifi chips require a firmware, often this is a binary vendor blob, which is just uploaded into the chip. Then a hardware dependend wifi linux driver adopts to cfg80211 and mac80211 and so on... So my question is: which parts must be changed to comply with this new standard. I guess the firmware blob must provide several functions which are used by drivers? Next question is: what is the current state of this support in the ralink driver, I have a rt5380 based device. I googled a little bit around, but I only found this thread which is for atheros: http://comments.gmane.org/gmane.linux.drivers.ath9k.devel/13280 So any further information would be welcome. Thanks, Michael ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] feeds.conf.default: add dlan feed
Hi Florian, thank you for adding the instructions. I also agree that this binary-only packages should not be added to main openwrt for legal reasons and so on. My original intension was to make this device more "user-friendly", and if we do not want to enable this feed by default, we could add this line commented out? However, we should pre-select the packages which are required to get the PLC part running, shouldn't we? What do you think about the following stuff? Regards, mhei feeds.conf.default |1 + target/linux/mcs814x/profiles/100-dLAN-USB-Extender.mk |6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/feeds.conf.default b/feeds.conf.default index 208342c..14f2e37 100644 --- a/feeds.conf.default +++ b/feeds.conf.default @@ -3,6 +3,7 @@ src-git luci https://github.com/openwrt/luci.git src-git routing https://github.com/openwrt-routing/packages.git src-git telephony https://github.com/openwrt/telephony.git src-git management https://github.com/openwrt-management/packages.git +#src-git dlan https://github.com/ffainelli/dlan-usb-extender-3rd-party.git #src-git oldpackages http://git.openwrt.org/packages.git #src-svn xwrt http://x-wrt.googlecode.com/svn/trunk/package #src-svn phone svn://svn.openwrt.org/openwrt/feeds/phone diff --git a/target/linux/mcs814x/profiles/100-dLAN-USB-Extender.mk b/target/linux/mcs814x/profiles/100-dLAN-USB-Extender.mk index 168bfa1..6f13121 100644 --- a/target/linux/mcs814x/profiles/100-dLAN-USB-Extender.mk +++ b/target/linux/mcs814x/profiles/100-dLAN-USB-Extender.mk @@ -1,5 +1,5 @@ # -# Copyright (C) 2012 OpenWrt.org +# Copyright (C) 2012-2015 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -7,7 +7,7 @@ define Profile/dLAN_USB_Extender NAME:=Devolo dLAN USB Extender - PACKAGES:=kmod-usb-serial kmod-usb-serial-ftdi + PACKAGES:=kmod-usb-serial kmod-usb-serial-ftdi foot endef define Profile/dLAN_USB_Extender/Description @@ -21,5 +21,5 @@ define Profile/dLAN_USB_Extender/Description Instructions are available here: http://ffainelli.github.io/dlan-usb-extender-3rd-party/ endef -$(eval $(call Profile,dLAN_USB_Extender)) +$(eval $(call Profile,dLAN_USB_Extender)) -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] procd/inittab with a delayed console
Am Freitag, 9. Januar 2015, 17:51:48 schrieb Karl Palsson: > > "Stam, Michel [FINT]" wrote: > > This, to me, seems the most logical solution, as consoles should be > > available to the init process early on during boot, and not hot-plugged > > in afterwards. Do you agree? > > > Well, I don't. What about a usb serial port? I'd like to plug in the > usb cable, providing vbus to power up a cp210x, which then becomes a new > /dev/ttyUSBxxx and I'd like inittab to offer me a console there. It's not > there at boot though... +1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] feeds.conf.default: add dlan feed
Since mcs814x/dLAN-USB-Extender profile refers to some packages in this feed, we should list it here. Signed-off-by: Michael Heimpold --- feeds.conf.default |1 + 1 file changed, 1 insertion(+) diff --git a/feeds.conf.default b/feeds.conf.default index 208342c..16f07d0 100644 --- a/feeds.conf.default +++ b/feeds.conf.default @@ -3,6 +3,7 @@ src-git luci https://github.com/openwrt/luci.git src-git routing https://github.com/openwrt-routing/packages.git src-git telephony https://github.com/openwrt/telephony.git src-git management https://github.com/openwrt-management/packages.git +src-git dlan https://github.com/ffainelli/dlan-usb-extender-3rd-party.git #src-git oldpackages http://git.openwrt.org/packages.git #src-svn xwrt http://x-wrt.googlecode.com/svn/trunk/package #src-svn phone svn://svn.openwrt.org/openwrt/feeds/phone -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v3] mxs: indention and whitespace fixes
Align this file with the style of most other modules.mk. Signed-off-by: Michael Heimpold --- This is a rebased version because previous patch do no apply cleanly anymore. While at, adjust the wording a little bit. BR, mhei target/linux/mxs/modules.mk | 74 +-- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/target/linux/mxs/modules.mk b/target/linux/mxs/modules.mk index d6dbb04..087878b 100644 --- a/target/linux/mxs/modules.mk +++ b/target/linux/mxs/modules.mk @@ -1,85 +1,85 @@ # -# Copyright (C) 2013 OpenWrt.org +# Copyright (C) 2013-2014 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. define KernelPackage/rtc-stmp3xxx -SUBMENU:=$(OTHER_MENU) -TITLE:=STMP3xxx SoC built-in RTC support -DEPENDS:=@TARGET_mxs -$(call AddDepends/rtc) -KCONFIG:= \ + SUBMENU:=$(OTHER_MENU) + TITLE:=STMP3xxx SoC built-in RTC support + DEPENDS:=@TARGET_mxs + $(call AddDepends/rtc) + KCONFIG:= \ CONFIG_RTC_CLASS=y \ CONFIG_RTC_DRV_STMP=m -FILES:=$(LINUX_DIR)/drivers/rtc/rtc-stmp3xxx.ko -AUTOLOAD:=$(call AutoLoad,50,rtc-stmp3xxx) + FILES:=$(LINUX_DIR)/drivers/rtc/rtc-stmp3xxx.ko + AUTOLOAD:=$(call AutoLoad,50,rtc-stmp3xxx) endef $(eval $(call KernelPackage,rtc-stmp3xxx)) define KernelPackage/wdt-stmp3xxx -SUBMENU:=$(OTHER_MENU) -TITLE:=STMP3xxx Watchdog timer -DEPENDS:=kmod-rtc-stmp3xxx -KCONFIG:=CONFIG_STMP3XXX_RTC_WATCHDOG -FILES:=$(LINUX_DIR)/drivers/$(WATCHDOG_DIR)/stmp3xxx_rtc_wdt.ko -AUTOLOAD:=$(call AutoLoad,51,stmp3xxx_rtc_wdt) + SUBMENU:=$(OTHER_MENU) + TITLE:=STMP3xxx Watchdog timer + DEPENDS:=kmod-rtc-stmp3xxx + KCONFIG:=CONFIG_STMP3XXX_RTC_WATCHDOG + FILES:=$(LINUX_DIR)/drivers/$(WATCHDOG_DIR)/stmp3xxx_rtc_wdt.ko + AUTOLOAD:=$(call AutoLoad,51,stmp3xxx_rtc_wdt) endef define KernelPackage/wdt-stmp3xxx/description -Kernel module for STMP3xxx watchdog timer. + Kernel module for STMP3xxx watchdog timer. endef $(eval $(call KernelPackage,wdt-stmp3xxx)) define KernelPackage/sound-soc-mxs -TITLE:=Freescale i.MX23/i.MX28 built-in SoC sound support -KCONFIG:= \ + TITLE:=Freescale i.MX23/i.MX28 built-in SoC sound support + KCONFIG:= \ CONFIG_SND_SOC_MXS_BUILTIN_CODEC \ CONFIG_SND_MXS_SOC_BUILTIN -FILES:= \ + FILES:= \ $(LINUX_DIR)/sound/soc/mxs/snd-soc-mxs-builtin-audio.ko \ $(LINUX_DIR)/sound/soc/mxs/snd-soc-mxs-builtin-dai.ko \ $(LINUX_DIR)/sound/soc/mxs/snd-soc-mxs-builtin-pcm.ko \ $(LINUX_DIR)/sound/soc/codecs/snd-soc-mxs-builtin-codec.ko -AUTOLOAD:=$(call AutoLoad,65,snd-soc-mxs-builtin-pcm snd-soc-mxs-builtin-dai snd-soc-mxs-builtin-codec snd-soc-mxs-builtin-audio) -DEPENDS:=@TARGET_mxs +kmod-sound-soc-core -$(call AddDepends/sound) + AUTOLOAD:=$(call AutoLoad,65,snd-soc-mxs-builtin-pcm snd-soc-mxs-builtin-dai snd-soc-mxs-builtin-codec snd-soc-mxs-builtin-audio) + DEPENDS:=@TARGET_mxs +kmod-sound-soc-core + $(call AddDepends/sound) endef define KernelPackage/sound-soc-mxs/description -Kernel support for Freescale i.MX23/i.MX28 built-in SoC audio + Kernel support for Freescale i.MX23/i.MX28 built-in SoC audio endef $(eval $(call KernelPackage,sound-soc-mxs)) define KernelPackage/iio-mxs-lradc -SUBMENU:=$(OTHER_MENU) -TITLE:=LRADC driver for i.MX23/28 -DEPENDS:=@TARGET_mxs +kmod-iio-core -KCONFIG:=CONFIG_MXS_LRADC -FILES:=$(LINUX_DIR)/drivers/staging/iio/adc/mxs-lradc.ko -AUTOLOAD:=$(call AutoLoad,70,mxs-lradc) + SUBMENU:=$(OTHER_MENU) + TITLE:=Freescale i.MX23/28 LRADC driver + DEPENDS:=@TARGET_mxs +kmod-iio-core + KCONFIG:=CONFIG_MXS_LRADC + FILES:=$(LINUX_DIR)/drivers/staging/iio/adc/mxs-lradc.ko + AUTOLOAD:=$(call AutoLoad,70,mxs-lradc) endef define KernelPackage/iio-mxs-lradc/description -Kernel module for i.MX23/28 LRADC driver + Kernel module for Freescale i.MX23/28 LRADC driver endef $(eval $(call KernelPackage,iio-mxs-lradc)) define KernelPackage/crypto-hw-dcp -TITLE:=i.MX23/28 DCP hardware crypto module -DEPENDS:=@TARGET_mxs -KCONFIG:=CONFIG_CRYPTO_DEV_MXS_DCP -FILES:=$(LINUX_DIR)/drivers/crypto/mxs-dcp.ko -AUTOLOAD:=$(call AutoLoad,90,mxs-dcp) -$(call AddDepends/crypto,+kmod-crypto-authenc +kmod-crypto-des) + TITLE:=Freescale i.MX23/28 DCP hardware crypto module + DEPENDS:=@TARGET_mxs + KCONFIG:=CONFIG_CRYPTO_DEV_MXS_DCP + FILES:=$(LINUX_DIR)/drivers/crypto/mxs-dcp.ko + AUTOLOAD:=$(call AutoLoad,90,mxs-dcp) + $(call AddDepends/crypto,+kmod-crypto-authenc +kmod-crypto-des) endef define KernelPackage/crypto-hw-dcp/description -Kernel support for the i.MX23/28 DCP crypto engine + Kernel support for Freescale i.MX23/28 DCP crypto engine endef $(eval $(call KernelPackage,crypto-hw-dcp)) @@ -109,7 +109,7 @@ define KernelPackage/i2c-mxs endef define KernelPackage/i2c-mxs/description