Skip to content

Commit

Permalink
system: support br2-external skeleton packages
Browse files Browse the repository at this point in the history
Today, the BR2_ROOTFS_SKELETON_CUSTOM is the only way to build a custom
skeleton. But it's limiting as users must provide a pre-built skeleton
for each target. Supporting a br2-external package allows users to build
up a skeleton and customize it with their own KConfig options.

Signed-off-by: Brandon Maier <brandon.maier@rockwellcollins.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
  • Loading branch information
blmaier authored and yann-morin-1998 committed Oct 14, 2020
1 parent 74c3c63 commit 8a06daa
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
9 changes: 9 additions & 0 deletions support/scripts/br2-external
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ do_kconfig() {
toolchains
jpeg
openssl
skeleton
)

for br2 in "${items[@]}"; do
Expand Down Expand Up @@ -224,6 +225,14 @@ do_kconfig() {
else
printf '# No openssl from: %s\n\n' "${br2_desc}"
fi >>"${outputdir}/.br2-external.in.openssl"

if [ -f "${br2_ext}/provides/skeleton.in" ]; then
printf 'comment "skeleton from: %s"\n' "${br2_desc}"
printf 'source "%s/provides/skeleton.in"\n' "${br2_ext}"
printf '\n'
else
printf '# No skeleton from: %s\n\n' "${br2_desc}"
fi >>"${outputdir}/.br2-external.in.skeleton"
done

printf 'endmenu\n' >>"${outputdir}/.br2-external.in.menus"
Expand Down
3 changes: 3 additions & 0 deletions system/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ config BR2_ROOTFS_SKELETON_CUSTOM
help
Use custom target skeleton.

# skeleton from br2-external trees, if any
source "$BR2_BASE_DIR/.br2-external.in.skeleton"

endchoice

if BR2_ROOTFS_SKELETON_CUSTOM
Expand Down

0 comments on commit 8a06daa

Please sign in to comment.