mirror of https://github.com/armbian/build.git
Improvements for BSP creation (#2975)
* Improvements for BSP creation - add support for the same principle found in desktop creation. For CLI package we are copying content from "bsp-cli" folders. - moving bsp* copy function to image-helpers - improve readme
This commit is contained in:
parent
5b0dc2d7c5
commit
9d4e0408c5
|
|
@ -160,6 +160,8 @@ Armbian [releases](https://docs.armbian.com/Release_Changelog/) quarterly at the
|
||||||
│ └── patch Created patches location
|
│ └── patch Created patches location
|
||||||
├── packages Support scripts, binary blobs, packages
|
├── packages Support scripts, binary blobs, packages
|
||||||
│ ├── blobs Wallpapers, various configs, closed source bootloaders
|
│ ├── blobs Wallpapers, various configs, closed source bootloaders
|
||||||
|
│ ├── bsp-cli Automatically added to armbian-bsp-cli package
|
||||||
|
│ ├── bsp-desktop Automatically added to armbian-bsp-desktopo package
|
||||||
│ ├── bsp Scripts and configs overlay for rootfs
|
│ ├── bsp Scripts and configs overlay for rootfs
|
||||||
│ └── extras-buildpkgs Optional compilation and packaging engine
|
│ └── extras-buildpkgs Optional compilation and packaging engine
|
||||||
├── patch Collection of patches
|
├── patch Collection of patches
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,6 @@ create_desktop_package ()
|
||||||
eval "${aggregated_content}"
|
eval "${aggregated_content}"
|
||||||
[[ $? -ne 0 ]] && display_alert "create_desktop_package.sh exec error" "" "wrn"
|
[[ $? -ne 0 ]] && display_alert "create_desktop_package.sh exec error" "" "wrn"
|
||||||
|
|
||||||
# create board DEB file
|
|
||||||
display_alert "Building desktop package" "${CHOSEN_DESKTOP}_${REVISION}_all" "info"
|
display_alert "Building desktop package" "${CHOSEN_DESKTOP}_${REVISION}_all" "info"
|
||||||
|
|
||||||
mkdir -p "${DEB_STORAGE}/${RELEASE}"
|
mkdir -p "${DEB_STORAGE}/${RELEASE}"
|
||||||
|
|
@ -108,26 +107,11 @@ create_desktop_package ()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
copy_all_packages_files_for()
|
|
||||||
{
|
|
||||||
local package_name="${1}"
|
|
||||||
for package_src_dir in ${PACKAGES_SEARCH_ROOT_ABSOLUTE_DIRS};
|
|
||||||
do
|
|
||||||
local package_dirpath="${package_src_dir}/${package_name}"
|
|
||||||
if [ -d "${package_dirpath}" ];
|
|
||||||
then
|
|
||||||
cp -r "${package_dirpath}/"* "${destination}/" 2> /dev/null
|
|
||||||
display_alert ">>> adding files from" "${package_dirpath}"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
create_bsp_desktop_package ()
|
create_bsp_desktop_package ()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
display_alert "Creating board support package for desktop" "${package_name}" "info"
|
||||||
|
|
||||||
local package_name="${BSP_DESKTOP_PACKAGE_FULLNAME}"
|
local package_name="${BSP_DESKTOP_PACKAGE_FULLNAME}"
|
||||||
|
|
||||||
local destination tmp_dir
|
local destination tmp_dir
|
||||||
|
|
@ -173,9 +157,6 @@ create_bsp_desktop_package ()
|
||||||
eval "${aggregated_content}"
|
eval "${aggregated_content}"
|
||||||
[[ $? -ne 0 ]] && display_alert "prepare.sh exec error" "" "wrn"
|
[[ $? -ne 0 ]] && display_alert "prepare.sh exec error" "" "wrn"
|
||||||
|
|
||||||
# create board DEB file
|
|
||||||
display_alert "Building desktop package" "${package_name}" "info"
|
|
||||||
|
|
||||||
mkdir -p "${DEB_STORAGE}/${RELEASE}"
|
mkdir -p "${DEB_STORAGE}/${RELEASE}"
|
||||||
cd "${destination}"; cd ..
|
cd "${destination}"; cd ..
|
||||||
fakeroot dpkg-deb -b "${destination}" "${DEB_STORAGE}/${RELEASE}/${package_name}.deb" >/dev/null
|
fakeroot dpkg-deb -b "${destination}" "${DEB_STORAGE}/${RELEASE}/${package_name}.deb" >/dev/null
|
||||||
|
|
|
||||||
|
|
@ -446,7 +446,6 @@ display_alert()
|
||||||
#--------------------------------------------------------------------------------------------------------------------------------
|
#--------------------------------------------------------------------------------------------------------------------------------
|
||||||
fingerprint_image()
|
fingerprint_image()
|
||||||
{
|
{
|
||||||
display_alert "Fingerprinting"
|
|
||||||
cat <<-EOF > "${1}"
|
cat <<-EOF > "${1}"
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
Title: ${VENDOR} $REVISION ${BOARD^} $DISTRIBUTION $RELEASE $BRANCH
|
Title: ${VENDOR} $REVISION ${BOARD^} $DISTRIBUTION $RELEASE $BRANCH
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@
|
||||||
# check_loop_device
|
# check_loop_device
|
||||||
# install_external_applications
|
# install_external_applications
|
||||||
# write_uboot
|
# write_uboot
|
||||||
|
# copy_all_packages_files_for
|
||||||
# customize_image
|
# customize_image
|
||||||
# install_deb_chroot
|
# install_deb_chroot
|
||||||
# run_on_sdcard
|
# run_on_sdcard
|
||||||
|
|
@ -133,6 +134,25 @@ write_uboot()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# copy_all_packages_files_for <folder> to package
|
||||||
|
#
|
||||||
|
copy_all_packages_files_for()
|
||||||
|
{
|
||||||
|
local package_name="${1}"
|
||||||
|
for package_src_dir in ${PACKAGES_SEARCH_ROOT_ABSOLUTE_DIRS};
|
||||||
|
do
|
||||||
|
local package_dirpath="${package_src_dir}/${package_name}"
|
||||||
|
if [ -d "${package_dirpath}" ];
|
||||||
|
then
|
||||||
|
cp -r "${package_dirpath}/"* "${destination}/" 2> /dev/null
|
||||||
|
display_alert "Adding files from" "${package_dirpath}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
customize_image()
|
customize_image()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
create_board_package()
|
create_board_package()
|
||||||
{
|
{
|
||||||
display_alert "Creating board support package" "$BOARD $BRANCH" "info"
|
display_alert "Creating board support package for CLI" "$CHOSEN_ROOTFS" "info"
|
||||||
|
|
||||||
bsptempdir=$(mktemp -d)
|
bsptempdir=$(mktemp -d)
|
||||||
chmod 700 ${bsptempdir}
|
chmod 700 ${bsptempdir}
|
||||||
|
|
@ -27,6 +27,9 @@ create_board_package()
|
||||||
mkdir -p "${destination}"/DEBIAN
|
mkdir -p "${destination}"/DEBIAN
|
||||||
cd $destination
|
cd $destination
|
||||||
|
|
||||||
|
# copy general overlay from packages/bsp-cli
|
||||||
|
copy_all_packages_files_for "bsp-cli"
|
||||||
|
|
||||||
# install copy of boot script & environment file
|
# install copy of boot script & environment file
|
||||||
local bootscript_src=${BOOTSCRIPT%%:*}
|
local bootscript_src=${BOOTSCRIPT%%:*}
|
||||||
local bootscript_dst=${BOOTSCRIPT##*:}
|
local bootscript_dst=${BOOTSCRIPT##*:}
|
||||||
|
|
@ -317,7 +320,6 @@ fi
|
||||||
find "${destination}" ! -type l -print0 2>/dev/null | xargs -0r chmod 'go=rX,u+rw,a-s'
|
find "${destination}" ! -type l -print0 2>/dev/null | xargs -0r chmod 'go=rX,u+rw,a-s'
|
||||||
|
|
||||||
# create board DEB file
|
# create board DEB file
|
||||||
display_alert "Building package" "$CHOSEN_ROOTFS" "info"
|
|
||||||
fakeroot dpkg-deb -b "${destination}" "${destination}.deb" >> "${DEST}"/debug/install.log 2>&1
|
fakeroot dpkg-deb -b "${destination}" "${destination}.deb" >> "${DEST}"/debug/install.log 2>&1
|
||||||
mkdir -p "${DEB_STORAGE}/${RELEASE}/"
|
mkdir -p "${DEB_STORAGE}/${RELEASE}/"
|
||||||
rsync --remove-source-files -rq "${destination}.deb" "${DEB_STORAGE}/${RELEASE}/"
|
rsync --remove-source-files -rq "${destination}.deb" "${DEB_STORAGE}/${RELEASE}/"
|
||||||
|
|
|
||||||
|
|
@ -3,5 +3,6 @@
|
||||||
|armbian|kernel deb packaging scripts|
|
|armbian|kernel deb packaging scripts|
|
||||||
|blobs||
|
|blobs||
|
||||||
|bsp||
|
|bsp||
|
||||||
|bsp-desktop | common desktop board support packages overlay|
|
|bsp-cli | common files which are copied in armbian-cli-* package |
|
||||||
|
|bsp-desktop | common files which are copied in armbian-desktop-* package |
|
||||||
|extras-buildpkgs||
|
|extras-buildpkgs||
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue