runtime icon indicating copy to clipboard operation
runtime copied to clipboard

Use same logic to prepare rootfs across dotnet if possible

Open hqueue opened this issue 9 years ago • 4 comments

We need rootfs for cross compilation for arm, armel, arm64 and x86, and we have a script file for each repository as follows.

https://github.com/dotnet/coreclr/blob/master/cross/build-rootfs.sh https://github.com/dotnet/corefx/blob/master/cross/build-rootfs.sh https://github.com/dotnet/core-setup/blob/master/cross/build-rootfs.sh

While preparing arm release dotnet/runtime#2548, we found out that it would be great if we can make use of common logic to prepare rootfs if possible.

As a first step I'm going to update build-rootfs.sh into common logic.

I'm going to work with corefx and then apply same changes to other repository, because it requires more pacakges than coreclr for cross build.

I will post a PR soon for corefx after testing.

hqueue avatar Feb 03 '17 08:02 hqueue

@gkhanna79 Ideally, we can use a single rootfs which can be used for core-setup, coreclr and corefx, if we can accept increse in size of rootfs for coreclr, because corefx requires some more packages than coreclr. What do you think of it ? If you think this is acceptable, I will add this task to dotnet/runtime#2548 as a item.

hqueue avatar Feb 03 '17 08:02 hqueue

@hqueue Can you please help me understand what is the common logic you are working towards? My (naive) understanding of build-rootfs.sh is that it uses the source list files and pulls them down - thus, the implementation of build-rootfs.sh is pretty much the same across the repos.

Are you proposing that all the repos use the same source list file? If so, how would that help given that these files are committed into each repo and any update to one will require update to others, which is not a central update process?

Or, am I missing something?

gkhanna79 avatar Feb 03 '17 19:02 gkhanna79

@gkhanna79 Your understanding is definitely correct. All build-rootf.sh already have similar logic, but there is minor differences across fx, clr and setup and I want to minimize them to reduce fragmentation and use exactly same build-rootfs.sh and soruce files eventually if possible.

Are you proposing that all the repos use the same source list file?

Right, eventually I think this is a promising approach, since we need almost same rootfs for cross build across dotnet and technically we can build all three repo with one rootfs.

However as you mentioned, unless we introduce a central update process, we have to maintain them seperately now. I think after removing differences between repos, we can introduce a central update process as a second step but I don't have any plan yet.

hqueue avatar Feb 06 '17 05:02 hqueue

Closing this issue, since all build-rootfs.sh in core-setup, coreclr and corefx now have same logic and only small difference remains.

hqueue avatar Feb 14 '17 10:02 hqueue