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
|
||||
├── packages Support scripts, binary blobs, packages
|
||||
│ ├── 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
|
||||
│ └── extras-buildpkgs Optional compilation and packaging engine
|
||||
├── patch Collection of patches
|
||||
|
|
|
|||
|
|
@ -91,7 +91,6 @@ create_desktop_package ()
|
|||
eval "${aggregated_content}"
|
||||
[[ $? -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"
|
||||
|
||||
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 ()
|
||||
{
|
||||
|
||||
display_alert "Creating board support package for desktop" "${package_name}" "info"
|
||||
|
||||
local package_name="${BSP_DESKTOP_PACKAGE_FULLNAME}"
|
||||
|
||||
local destination tmp_dir
|
||||
|
|
@ -173,9 +157,6 @@ create_bsp_desktop_package ()
|
|||
eval "${aggregated_content}"
|
||||
[[ $? -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}"
|
||||
cd "${destination}"; cd ..
|
||||
fakeroot dpkg-deb -b "${destination}" "${DEB_STORAGE}/${RELEASE}/${package_name}.deb" >/dev/null
|
||||
|
|
|
|||
|
|
@ -446,7 +446,6 @@ display_alert()
|
|||
#--------------------------------------------------------------------------------------------------------------------------------
|
||||
fingerprint_image()
|
||||
{
|
||||
display_alert "Fingerprinting"
|
||||
cat <<-EOF > "${1}"
|
||||
--------------------------------------------------------------------------------
|
||||
Title: ${VENDOR} $REVISION ${BOARD^} $DISTRIBUTION $RELEASE $BRANCH
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
# check_loop_device
|
||||
# install_external_applications
|
||||
# write_uboot
|
||||
# copy_all_packages_files_for
|
||||
# customize_image
|
||||
# install_deb_chroot
|
||||
# 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()
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
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)
|
||||
chmod 700 ${bsptempdir}
|
||||
|
|
@ -27,6 +27,9 @@ create_board_package()
|
|||
mkdir -p "${destination}"/DEBIAN
|
||||
cd $destination
|
||||
|
||||
# copy general overlay from packages/bsp-cli
|
||||
copy_all_packages_files_for "bsp-cli"
|
||||
|
||||
# install copy of boot script & environment file
|
||||
local bootscript_src=${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'
|
||||
|
||||
# create board DEB file
|
||||
display_alert "Building package" "$CHOSEN_ROOTFS" "info"
|
||||
fakeroot dpkg-deb -b "${destination}" "${destination}.deb" >> "${DEST}"/debug/install.log 2>&1
|
||||
mkdir -p "${DEB_STORAGE}/${RELEASE}/"
|
||||
rsync --remove-source-files -rq "${destination}.deb" "${DEB_STORAGE}/${RELEASE}/"
|
||||
|
|
|
|||
|
|
@ -3,5 +3,6 @@
|
|||
|armbian|kernel deb packaging scripts|
|
||||
|blobs||
|
||||
|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||
|
||||
|
|
|
|||
Loading…
Reference in New Issue