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

Optimize the build process #4

Closed
th0ma7 opened this issue Jun 8, 2019 · 4 comments
Closed

Optimize the build process #4

th0ma7 opened this issue Jun 8, 2019 · 4 comments

Comments

@th0ma7
Copy link

th0ma7 commented Jun 8, 2019

The current build process does a full kernel build of the unmodified linux-4.4.x tree (unless i'm missing something). Could it be possible to simply adjust Makefile, copy/modify the config and invoke:

$ make oldconfig
$ make modules_prepare

And then directly call the media_build build script?

Because the following command:
./md_builder.sh -B media -d SYNO-Apollolake
Leeds to a full compilation of build/SYNOAPOLLOLAKE/linux-4.4.x

So I ended up having to directly invoke the media build:

$ cd build/SYNOAPOLLOLAKE/media_build
$ build
make[2]: Leaving directory '/home/th0ma7/git/Embedded-MediaDrivers/build/SYNOAPOLLOLAKE/linux-4.4.x'
./scripts/rmmod.pl check
found 648 modules
make[1]: Leaving directory '/home/th0ma7/git/Embedded-MediaDrivers/build/SYNOAPOLLOLAKE/media_build/v4l'
**********************************************************
* Compilation finished. Use 'make install' to install them
**********************************************************

Note that I tried skipping md_builder.sh -B part and directly invoke media_build but it requires the Makefile and .config pre-adjusted over the linux-4.4.x tree to be done first, which is done by the md_builder.sh -B call.

@b-rad-NDi
Copy link
Owner

I'll revisit the build system. For apollolake you don't need to compile the full kernel, but for other platforms there are system and/or built-in modules missing, so the whole thing must be built. This is something that must only be done once, no matter how many times the media_build system is updated, so I'm not sure if there's really an issue here.

@th0ma7
Copy link
Author

th0ma7 commented Jun 15, 2019

gotcha.
It's just that I much like having procedures which are fully reproducible always and doing a full kernel compilation can be quite long when being done in a VM over my NAS without -j flag with nproc for instance. That being said, compiling only what's necessary using something like:

$ make modules_prepare
$ make modules M=drivers/i2c -j`nproc`
...

But I now realize that this bug entry referred to two things:
a) making compilation faster / more efficient
b) was it intended that the media build to be invoked manually? or is it just me not being patient enough and hitting ctrl-c before the end of the synology DSM kernel compilation and thus the process not invoking the media build automagically afterwards?

@th0ma7
Copy link
Author

th0ma7 commented Jul 4, 2019

As an FYI, I've documented how to reproduce the build using your tool (as this could end-up being useful for others):

@th0ma7
Copy link
Author

th0ma7 commented Aug 25, 2020

Build process now entirely reproduced within SynoCommunity PR SynoCommunity/spksrc#4144
Closing the issue.

@th0ma7 th0ma7 closed this as completed Aug 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants