Skip to content

base: add 'make' to base image for all resulting images#1

Closed
se-bi wants to merge 1 commit intohdl:masterfrom
se-bi:develop
Closed

base: add 'make' to base image for all resulting images#1
se-bi wants to merge 1 commit intohdl:masterfrom
se-bi:develop

Conversation

@se-bi
Copy link
Copy Markdown
Contributor

@se-bi se-bi commented Nov 15, 2020

First my apologies, the PR @eine applied here from ghdl/docker was a bit rashed,
regarding that 'make' commit.

My intention was more what this completes,
to have 'make' in each resulting image.

to be used later in each pushed image
that is e.g. used for CI jobs
@eine
Copy link
Copy Markdown
Collaborator

eine commented Nov 19, 2020

Hi @se-bi! Please, see the updated documentation.

I'm not sure about adding make to the base image. As explained there, all images based on hdlc/build:base are expected to contain a single tool. Hence, it is not expected to execute make or any other runner/manager inside the containers. Instead, those images are expected to be used as in https://github.com/antonblanchard/ghdl-yosys-blink/blob/master/Makefile.

Apart from that, there are all-in-one images. Adding make to those might be ok. For now, hdlc/prog and hdlc/formal were added only, because hdlc/ghdl:yosys replaces ghdl/synth:beta. However, hdlc/synth might be added in the near future, including Surelog/UHDM on top of hdlc/ghdl:yosys.

So, what is your use case? Which images/tools are you using?

@se-bi
Copy link
Copy Markdown
Contributor Author

se-bi commented Nov 19, 2020

So, what is your use case? Which images/tools are you using?

My current use case is e.g. this project ULX3S GHDL Examples or my fork, more as a playground to setup and test the workflow of the CI scripts.
So, yosys (with ghdl-synth); then nextpnr either ice40 or ecp5 and finally the corresponding bitstream packaging tool

In the beginning I was not sure, if I like the idea of separated containers.
But this 3-stage CI pipeline represent the different steps and tools.
Although there is minor struggle, some rather hacky solution so far, e.g. to get the artifacts moved over or reused correctly in the 'make' process.

  • Gitlab CI keeps the timestamp from the previous stage, so 'make' wants to rebuild it, because the git repo clone is newer
  • Github CI keeps new directory for the artifacts, although the opposite is mentioned in the documentation and posts, or I just...

The project I primarily wanted to focus, uses like the other mentioned above, Makefiles for the build process.
I do not want to copy the commands from there.

And 'make' is not a large package (<1MB) without any further relevant dependencies,
and I would consider it more as a common utility tool.

There is an example at ghdl-yosys-blink: Makefile showcasing how to use this fine-grained approach with a makefile.

Comparing to that approach just swapping Docker inside Make or Make inside Docker
(no need to change inside the Makefile local vs. Docker)

Hi` @se-bi! Please, see the updated documentation.

Sorry, can you give an example for those all-in-one images (hdlc/<MAIN_USAGE>),
I cannot really distinguish that from the fine-grained ones (hdlc/<TOOL_NAME>) neither in the given graph nor the available images on DockerHub or what am I missing.

@eine
Copy link
Copy Markdown
Collaborator

eine commented Nov 23, 2020

(no need to change inside the Makefile local vs. Docker)

The point is that I don't see how make can be useful in a container with a single tool. For "Make inside Docker" to make sense, there needs to be several tools in a single container, which you need to call one after the other. Currently, the only image which includes several tools to be used in sequence is hdlc/formal, and that includes make already.

So, fine-grained containers are meant for "Docker inside Make" and don't need make. That's a different set of containers from the ones for "Make inside Docker".

Sorry, can you give an example for those all-in-one images (hdlc/<MAIN_USAGE>),
I cannot really distinguish that from the fine-grained ones (hdlc/<TOOL_NAME>) neither in the given graph nor the available images on DockerHub or what am I missing.

MAIN_USAGE images are the ones in https://github.com/hdl/containers#images-including-multiple-tools. TOOL_NAME are all the others, except hdlc/build:* and hdlc/pkg:*.

So, for your use case, I suggest creating hdlc/impl. That would be hdlc/nextpnr + hdlc/ghdl:yosys. Unfortunately, it is not possible to merge two images. Therefore, I think it needs to be based on hdlc/nextpnr, plus pkg:ghdl-yosys-plugin and pkg:yosys. That would require creating a dockerfile and a wokflow.

Bitstream packaging tools are included in hdlc/nextpnr. But programming tools are not. Do you want programming tools to be included in the same image?

@eine
Copy link
Copy Markdown
Collaborator

eine commented Nov 23, 2020

So, image hdlc/impl was added. See the updated graph: https://hdl.github.io/containers/#_graph.

@eine eine closed this Nov 25, 2020
@eine eine deleted the branch hdl:master November 25, 2020 03:00
@se-bi se-bi deleted the develop branch November 25, 2020 22:03
@eine eine added $R/build Related to `$R/build` images and their dependencies $R/impl Related to `$R/impl` images and their dependencies $R/pkg Related to `$R/pkg` images and their dependencies discussion labels Jan 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

discussion $R/build Related to `$R/build` images and their dependencies $R/impl Related to `$R/impl` images and their dependencies $R/pkg Related to `$R/pkg` images and their dependencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants