[OpenWrt-Devel] [PATCH] kernel/build: Fix SetNfsCmdline to work with new .config.set
Petr Štetiar
ynezz at true.cz
Tue Feb 9 15:16:54 EST 2016
Petr Štetiar <ynezz at true.cz> [2016-02-09 21:04:14]:
> > define Kernel/SetNfsCmdline
> > rm -f $(LINUX_DIR)/.config.prev
> > - mv $(LINUX_DIR)/.config $(LINUX_DIR)/.config.old
> > - grep -v "CONFIG_CMDLINE=" $(LINUX_DIR)/.config.old > $(LINUX_DIR)/.config
> > - grep "CONFIG_CMDLINE=" $(LINUX_DIR)/.config.old | cut -d\" -f2 | sed 's/root=\/dev\/\([a-z0-9]*\)\(.*\)/CONFIG_CMDLINE=\"root=\/dev\/nfs ip=dhcp\2\"/' >> $(LINUX_DIR)/.config
> > + mv $(LINUX_DIR)/.config.set $(LINUX_DIR)/.config.old
> > + grep -v "CONFIG_CMDLINE=" $(LINUX_DIR)/.config.old > $(LINUX_DIR)/.config.set
> > + grep "CONFIG_CMDLINE=" $(LINUX_DIR)/.config.old | cut -d\" -f2 | sed 's/root=\/dev\/\([a-z0-9]*\)\(.*\)/CONFIG_CMDLINE=\"root=\/dev\/nfs ip=dhcp\2\"/' >> $(LINUX_DIR)/.config.set
> > endef
>
> This cut/sed kung-fu needs some improvements:
>
> * it doesn't work correctly in case of empty cmdline, CONFIG_CMDLINE=""
> * how to handle custom cmdline options? For example I don't want to use this
> hardcoded cmdline options, but use instead options provided by the bootloader
Hm, now I'm wondering why is this macro needed at all. In case I'll set
CONFIG_KERNEL_ROOT_NFS=y, then I can set CONFIG_CMDLINE accordingly also,
right?
Florian, what's your use case for this SetNfsCmdline macro, that you need to
hardcode kernel cmdline options? Thanks.
-- ynezz
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list