Skip to contentSkip to conversation

How do I build source code at source folder?

Buildroot Eric Hsieh 3 participants 7 messages Apr 3, 2020 – Apr 6, 2020

lore
Share & tools
lore

Eric Hsieh

author
#0 lore raw

Hi everyone,

Now, Im trying to create a special mode which can help me to build source code at source folder instead of output/build folder. I checked the makefile at package, looks like there is no directly way to be done.
So, I would like to ask is it possible to be done? If yes, please give me some tips. Thanks.

--
Sent from: http://buildroot-busybox.2317881.n4.nabble.com/

#1 lore raw

Hi Eric,

Am Fr., 3. Apr. 2020 um 11:07 Uhr schrieb Eric Hsieh <[email protected]>:

Quoted 8 lines

Hi everyone,

Now, Im trying to create a special mode which can help me to build source code at source folder instead of output/build folder. I checked the makefile at package, looks like there is no directly way to be done.
So, I would like to ask is it possible to be done? If yes, please give me some tips. Thanks.

If you want to build a package from an external source folder you can specify the source directory by creating the $(CONFIG_DIR)/local.mk file and set the <pkg>_OVERRIDE_SRCDIR varialbe. But this will copy/rsync your sources and build your package at output/build.

Please check "8.13.6. Using Buildroot during development" in the buildroot user manual for more information about that.

Signature · 1 line
Heiko
#2 lore raw

Hi Heiko,

Thanks and yes, I know I can use _OVERRIDE_SRCDIR to define local folder as source.
But what I need is directly build source code at source folder without copy/rsync.
And eventually the target object will install into output/fakeroot folder. Do you have any idea to get it done? Thanks.

Heiko Thiery <[email protected]> ? 2020?4?3? ?? ??5:51???

Quoted 19 lines

Hi Eric,

Am Fr., 3. Apr. 2020 um 11:07 Uhr schrieb Eric Hsieh <[email protected]

Quoted 6 lines

:

Hi everyone,

Now, Im trying to create a special mode which can help me to build source code at source folder instead of output/build folder. I checked the

makefile

Quoted 3 lines

at package, looks like there is no directly way to be done. So, I would like to ask is it possible to be done? If yes, please give me some tips. Thanks.

If you want to build a package from an external source folder you can specify the source directory by creating the $(CONFIG_DIR)/local.mk file and set the <pkg>_OVERRIDE_SRCDIR varialbe. But this will copy/rsync your sources and build your package at output/build.

Quoted 6 lines

Please check "8.13.6. Using Buildroot during development" in the buildroot user manual for more information about that.

--
Heiko

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20200404/3e7c4930/attachment.html>

#3 lore raw

Hi,

Am Sa., 4. Apr. 2020 um 08:52 Uhr schrieb Psychesnet Hsieh <[email protected]>:

Quoted 7 lines

Hi Heiko,

Thanks and yes, I know I can use _OVERRIDE_SRCDIR to define local folder as source. But what I need is directly build source code at source folder without copy/rsync. And eventually the target object will install into output/fakeroot folder. Do you have any idea to get it done? Thanks.

I don't understand why you need to build in the source directory. Can you give some more background information about that?

Signature · 1 line
Heiko
#6 lore raw
In reply to Psychesnet Hsieh

Psychesnet, All,

On 2020-04-04 14:52 +0800, Psychesnet Hsieh spake thusly:

Quoted 2 lines

Thanks and yes, I know I can use _OVERRIDE_SRCDIR to define local folder as source. But what I need is directly build source code at source folder without copy/rsync.

That is not possible.

Regards,
Yann E. MORIN.

Quoted 37 lines

And eventually the target object will install into output/fakeroot folder. Do you have any idea to get it done? Thanks.
Heiko Thiery < [1][email protected]> ? 2020?4?3? ?? ??5:51???

Hi Eric,

Am Fr., 3. Apr. 2020 um 11:07 Uhr schrieb Eric Hsieh < [2][email protected]>:

Quoted 8 lines

Hi everyone,

Now, Im trying to create a special mode which can help me to build source code at source folder instead of output/build folder. I checked the makefile at package, looks like there is no directly way to be done.
So, I would like to ask is it possible to be done? If yes, please give me some tips. Thanks.

If you want to build a package from an external source folder you can specify the source directory by creating the? $(CONFIG_DIR)/ [3]local.mk file and set the <pkg>_OVERRIDE_SRCDIR varialbe. But this will copy/rsync your sources and build your package at output/build.

Please check "8.13.6. Using Buildroot during development" in the buildroot user manual for more information about that.

--
Heiko

Links:
1. mailto:heiko.thiery at gmail.com
2. mailto:psychesnet at gmail.com
3. http://local.mk

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#4 lore raw
In reply to Heiko Thiery

Hi Heiko,

From previous and some projects, we would like to build 3 kinds of source code in our code base.
1. Directly build from open source, like lighttpd and ffmpeg. Basically, we don't need to change this a lot.
Put some patches and apply menuconfig to select enable/disable it.
Anything is good. This one, Buildroot can help a lot.
2. Some binary code/source code from vendor/SDK. This one is familiar to open source, we don't need to change a lot, too.
Follow SDK instructions and apply patch to Buildroot is enough to get
anything done.
3. Source code from our side, this part we change a lot and we would like to build it at source folder because
A. We change git log at source folder, we can trace anything quickly,
don't need to switch folder to build.
B. We can build one source code instead of check anything, it is faster
to build(makefile check dependency) and install into fakeroot folder to try.
C. We won't forget to commit the code, because any operations at source
folder.

I believe buildroot is the best for small embedded system, and we would like to try if we can get item 3 done in our project.
I hope anything is clear. Thanks.

Heiko Thiery <[email protected]> ? 2020?4?4? ?? ??2:58???

Quoted 12 lines

Hi,

Am Sa., 4. Apr. 2020 um 08:52 Uhr schrieb Psychesnet Hsieh <[email protected]>:

Quoted 4 lines

Hi Heiko,

Thanks and yes, I know I can use _OVERRIDE_SRCDIR to define local folder

as source.

Quoted 1 line

But what I need is directly build source code at source folder without

copy/rsync.

Quoted 1 line

And eventually the target object will install into output/fakeroot

Quoted 9 lines

folder.

Quoted 1 line

Do you have any idea to get it done? Thanks.

I don't understand why you need to build in the source directory. Can you give some more background information about that?

--
Heiko

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20200404/2603e8a6/attachment.html>

#5 lore raw

Psychesnet, All,

Am Sa., 4. Apr. 2020 um 15:24 Uhr schrieb Psychesnet Hsieh <[email protected]>:

Quoted 13 lines

Hi Heiko,

From previous and some projects, we would like to build 3 kinds of source code in our code base.
1. Directly build from open source, like lighttpd and ffmpeg. Basically, we don't need to change this a lot.
Put some patches and apply menuconfig to select enable/disable it. Anything is good. This one, Buildroot can help a lot.
2. Some binary code/source code from vendor/SDK. This one is familiar to open source, we don't need to change a lot, too. Follow SDK instructions and apply patch to Buildroot is enough to get anything done.
3. Source code from our side, this part we change a lot and we would like to build it at source folder because
A. We change git log at source folder, we can trace anything quickly, don't need to switch folder to build.
B. We can build one source code instead of check anything, it is faster to build(makefile check dependency) and install into fakeroot folder to try. C. We won't forget to commit the code, because any operations at source folder.

Quoted 2 lines

I believe buildroot is the best for small embedded system, and we would like to try if we can get item 3 done in our project. I hope anything is clear. Thanks.

Sorry but I don't see why using the proposed <pkg>_OVERRIDE_SRCDIR will solve the things you want to achieve in item 3.

Signature · 1 line
Heiko