Forwarding Xiang's solution. This should work for me. Maybe it will help
others.

---------- Forwarded message ---------
From: Xiang Xiao <xiaoxiang781...@gmail.com>
Date: Tue, Sep 15, 2020 at 1:48 PM
Subject: Re: Configuration Specific ROMFS rcS Files
To: Anthony Merlino <anth...@vergeaero.com>


Since all files in RCSRCS is processed by c preprocessor. You can utilize
#include/#ifdef... to achieve what you describe, here is an advanced usage
for reference:
https://github.com/FishsemiCode/build/blob/song-u1/configs/u1/src/etc/init.d/rcS
Basically, you can do all trick found in source code to rcS too.

On Tue, Sep 15, 2020 at 5:11 AM Anthony Merlino <anth...@vergeaero.com>
wrote:

> Hi all,
>
> I would like to come up with a way of having a *configuration-specific*
> ROMFS image that is automatically generated as part of the build system.
>
> I see that Xiang has recently made this commit,
> https://github.com/apache/incubator-nuttx/pull/793/files
> which definitely gets me closer to doing what I want.
>
> But in this method, the etc/ folder is stored in the board src/ directory.
> This means all configurations for this board have the same ROMFS image,
> which is not what I'm looking to do.
>
> The issue I see is that the only time the configuration folder is known is
> when configure.sh is run.
>
> I know that I could use the NSH_CUSTOMROMFS and point at a directory, but
> this requires each configuration to then define a path to itself, and still
> doesn't help me auto-generate as part of the build system.
>
> Hoping someone might suggest something clever. Everything I've come up
> with seems like a kludge. Maybe symlink the files into the board/ directory
> as part of the configuration process?
>
> Best,
> Anthony
>
>
>
>

Reply via email to