Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#1823 - Imagebuilder does not respect command line variable override #6770

Open
openwrt-bot opened this issue Aug 29, 2018 · 0 comments
Open
Labels

Comments

@openwrt-bot
Copy link

luizluca:

When building with Imagebuilder, make seems to not pass variable overide from command line to nested make in subshells:

make image CONFIG_TARGET_ROOTFS_PARTSIZE=128

The problem seems to be here:

Makefile: (...) image: $(MAKE) -s _check_profile (unset PROFILE FILES PACKAGES MAKEFLAGS; \ $(MAKE) -s _call_image \ $(if $(PROFILE),USER_PROFILE="$(PROFILE_FILTER)") \ $(if $(FILES),USER_FILES="$(FILES)") \ $(if $(PACKAGES),USER_PACKAGES="$(PACKAGES)") \ $(if $(BIN_DIR),BIN_DIR="$(BIN_DIR)"))

If I either remove the subshell '(' ')' or add '-e' to $(MAKE), it will work.
However, the subshell is there for a reason. Also '-e' can introduce other problems
when env variables from parent process are polluted.

I'm doing a hack using:

make image CONFIG_TARGET_ROOTFS_PARTSIZE=128 MAKE="make -e"

But I guess this is not a permanent solution.

cotequeiroz pushed a commit to cotequeiroz/openwrt-1 that referenced this issue Apr 8, 2022
Unloading and reloading the modules fails, as platform_device_put() does not
release resources fully.

root@OpenWrt:/# insmod i2c-gpio-custom bus0=0,18,0,5
[  196.860620] Custom GPIO-based I2C driver version 0.1.1
[  196.871162] ------------[ cut here ]------------
[  196.880517] WARNING: CPU: 0 PID: 1365 at fs/sysfs/dir.c:31 0x80112158
[  196.893431] sysfs: cannot create duplicate filename '/devices/platform/i2c-gpio.0'
...
[  197.513200] kobject_add_internal failed for i2c-gpio.0 with -EEXIST, don't try to register things with the same name in the same directory.

This patch fixes it by replacing platform_device_put() to
platform_device_unregister().

Fixes: da77408 ("i2c-gpio-custom: minor bugfix")
Fixes: 3bc81ed ("package: fix w1-gpio-custom package (closes openwrt#6770)")

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
(cherry picked from commit a22b7a6)
ArtelMike pushed a commit to ArtelMike/openwrt-1 that referenced this issue Jan 31, 2023
Unloading and reloading the modules fails, as platform_device_put() does not
release resources fully.

root@OpenWrt:/# insmod i2c-gpio-custom bus0=0,18,0,5
[  196.860620] Custom GPIO-based I2C driver version 0.1.1
[  196.871162] ------------[ cut here ]------------
[  196.880517] WARNING: CPU: 0 PID: 1365 at fs/sysfs/dir.c:31 0x80112158
[  196.893431] sysfs: cannot create duplicate filename '/devices/platform/i2c-gpio.0'
...
[  197.513200] kobject_add_internal failed for i2c-gpio.0 with -EEXIST, don't try to register things with the same name in the same directory.

This patch fixes it by replacing platform_device_put() to
platform_device_unregister().

Fixes: bbfb3e8 ("i2c-gpio-custom: minor bugfix")
Fixes: a15a2ee ("package: fix w1-gpio-custom package (closes openwrt#6770)")

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
(cherry picked from commit ce7aa96)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant