armbian-oleg: curb logging from building armbian-firmware

This commit is contained in:
Ricardo Pardini
2023-01-12 23:54:14 +01:00
parent d979c73c1d
commit e8306a8712
3 changed files with 30 additions and 28 deletions

View File

@@ -8,7 +8,7 @@ compile_firmware() {
plugin_dir="armbian-firmware${FULL}"
mkdir -p "${firmwaretempdir}/${plugin_dir}/lib/firmware"
local ARMBIAN_FIRMWARE_GIT_SOURCE="${ARMBIAN_FIRMWARE_GIT_SOURCE:-"https://github.com/armbian/firmware"}"
local ARMBIAN_FIRMWARE_GIT_BRANCH="${ARMBIAN_FIRMWARE_GIT_BRANCH:-"master"}"
@@ -16,20 +16,23 @@ compile_firmware() {
if [[ -n $FULL ]]; then
fetch_from_repo "$MAINLINE_FIRMWARE_SOURCE" "linux-firmware-git" "branch:main"
# @TODO: rpardini: what is this thing with hardlinks? why?
# cp : create hardlinks
run_host_command_logged cp -af --reflink=auto "${SRC}"/cache/sources/linux-firmware-git/* "${firmwaretempdir}/${plugin_dir}/lib/firmware/"
run_host_command_logged cp -af --reflink=auto "${SRC}/cache/sources/linux-firmware-git/*" "${firmwaretempdir}/${plugin_dir}/lib/firmware/"
# cp : create hardlinks for ath11k WCN685x hw2.1 firmware since they are using the same firmware with hw2.0
run_host_command_logged cp -af --reflink=auto "${firmwaretempdir}/${plugin_dir}/lib/firmware/ath11k/WCN6855/hw2.0/" "${firmwaretempdir}/${plugin_dir}/lib/firmware/ath11k/WCN6855/hw2.1/"
fi
# overlay our firmware
# cp : create hardlinks
cp -af --reflink=auto "${SRC}"/cache/sources/armbian-firmware-git/* "${firmwaretempdir}/${plugin_dir}/lib/firmware/"
# overlay Armbian's firmware on top of the mainline firmware
run_host_command_logged cp -af --reflink=auto "${SRC}/cache/sources/armbian-firmware-git/*" "${firmwaretempdir}/${plugin_dir}/lib/firmware/"
rm -rf "${firmwaretempdir}/${plugin_dir}"/lib/firmware/.git
cd "${firmwaretempdir}/${plugin_dir}" || exit
rm -rf "${firmwaretempdir}/${plugin_dir}"/lib/firmware/.git # @TODO: would have been better waste I/O putting in there
cd "${firmwaretempdir}/${plugin_dir}" || exit_with_error "can't change directory"
# set up control file
mkdir -p DEBIAN
# @TODO: rpardini: this needs Conflicts: with the standard Ubuntu/Debian linux-firmware packages and other firmware pkgs in Debian
cat <<- END > DEBIAN/control
Package: armbian-firmware${FULL}
Version: $REVISION
@@ -39,15 +42,14 @@ compile_firmware() {
Replaces: linux-firmware, firmware-brcm80211, firmware-ralink, firmware-samsung, firmware-realtek, armbian-firmware${REPLACE}
Section: kernel
Priority: optional
Description: Linux firmware${FULL}
Description: Armbian - Linux firmware${FULL}
END
cd "${firmwaretempdir}" || exit
cd "${firmwaretempdir}" || exit_with_error "can't change directory"
# pack
mv "armbian-firmware${FULL}" "armbian-firmware${FULL}_${REVISION}_all"
display_alert "Building firmware package" "armbian-firmware${FULL}_${REVISION}_all" "info"
fakeroot_dpkg_deb_build "armbian-firmware${FULL}_${REVISION}_all"
mv "armbian-firmware${FULL}_${REVISION}_all" "armbian-firmware${FULL}"
run_host_command_logged rsync -rq "armbian-firmware${FULL}_${REVISION}_all.deb" "${DEB_STORAGE}/"
}

View File

@@ -1,13 +1,12 @@
# @TODO: code from master via Igor; not yet armbian-next'fied! warning!!
compile_plymouth_theme_armbian() {
local tmp_dir work_dir
local tmp_dir plymouth_theme_armbian_dir
tmp_dir=$(mktemp -d)
chmod 700 "${tmp_dir}"
plymouth_theme_armbian_dir=armbian-plymouth-theme_${REVISION}_all
display_alert "Building deb" "armbian-plymouth-theme" "info"
mkdir -p "${tmp_dir}/${plymouth_theme_armbian_dir}"/{DEBIAN,usr/share/plymouth/themes/armbian}
run_host_command_logged mkdir -p "${tmp_dir}/${plymouth_theme_armbian_dir}"/{DEBIAN,usr/share/plymouth/themes/armbian}
# set up control file
cat <<- END > "${tmp_dir}/${plymouth_theme_armbian_dir}"/DEBIAN/control
@@ -18,37 +17,34 @@ compile_plymouth_theme_armbian() {
Depends: plymouth, plymouth-themes
Section: universe/x11
Priority: optional
Description: boot animation, logger and I/O multiplexer - armbian theme
Description: boot animation, logger and I/O multiplexer - Armbian theme
END
cp "${SRC}"/packages/plymouth-theme-armbian/debian/{postinst,prerm,postrm} \
run_host_command_logged cp -v "${SRC}"/packages/plymouth-theme-armbian/debian/{postinst,prerm,postrm} \
"${tmp_dir}/${plymouth_theme_armbian_dir}"/DEBIAN/
chmod 755 "${tmp_dir}/${plymouth_theme_armbian_dir}"/DEBIAN/{postinst,prerm,postrm}
# this requires `imagemagick`
convert -resize 256x256 \
run_host_command_logged convert -resize 256x256 \
"${SRC}"/packages/plymouth-theme-armbian/armbian-logo.png \
"${tmp_dir}/${plymouth_theme_armbian_dir}"/usr/share/plymouth/themes/armbian/bgrt-fallback.png
# convert -resize 52x52 \
# "${SRC}"/packages/plymouth-theme-armbian/spinner.gif \
# "${tmp_dir}/${plymouth_theme_armbian_dir}"/usr/share/plymouth/themes/armbian/animation-%04d.png
convert -resize 52x52 \
run_host_command_logged convert -resize 52x52 \
"${SRC}"/packages/plymouth-theme-armbian/spinner.gif \
"${tmp_dir}/${plymouth_theme_armbian_dir}"/usr/share/plymouth/themes/armbian/throbber-%04d.png
cp "${SRC}"/packages/plymouth-theme-armbian/watermark.png \
run_host_command_logged cp -v "${SRC}"/packages/plymouth-theme-armbian/watermark.png \
"${tmp_dir}/${plymouth_theme_armbian_dir}"/usr/share/plymouth/themes/armbian/
cp "${SRC}"/packages/plymouth-theme-armbian/{bullet,capslock,entry,keyboard,keymap-render,lock}.png \
run_host_command_logged cp -v "${SRC}"/packages/plymouth-theme-armbian/{bullet,capslock,entry,keyboard,keymap-render,lock}.png \
"${tmp_dir}/${plymouth_theme_armbian_dir}"/usr/share/plymouth/themes/armbian/
cp "${SRC}"/packages/plymouth-theme-armbian/armbian.plymouth \
run_host_command_logged cp -v "${SRC}"/packages/plymouth-theme-armbian/armbian.plymouth \
"${tmp_dir}/${plymouth_theme_armbian_dir}"/usr/share/plymouth/themes/armbian/
fakeroot dpkg-deb -b "-Z${DEB_COMPRESS}" "${tmp_dir}/${plymouth_theme_armbian_dir}" > /dev/null
rsync --remove-source-files -rq "${tmp_dir}/${plymouth_theme_armbian_dir}.deb" "${DEB_STORAGE}/"
rm -rf "${tmp_dir}"
fakeroot_dpkg_deb_build "${tmp_dir}/${plymouth_theme_armbian_dir}"
run_host_command_logged rsync --remove-source-files -rq "${tmp_dir}/${plymouth_theme_armbian_dir}.deb" "${DEB_STORAGE}/"
# does not remove the tmpdir; it's under TMPDIR anyway
}

View File

@@ -20,7 +20,7 @@ compile_armbian-zsh() {
Depends: zsh, tmux
Section: utils
Priority: optional
Description: Armbian improved ZShell
Description: Armbian improved ZShell (oh-my-zsh...)
END
# set up post install script
@@ -42,6 +42,10 @@ compile_armbian-zsh() {
cp -R "${SRC}"/cache/sources/oh-my-zsh "${tmp_dir}/${armbian_zsh_dir}"/etc/
cp -R "${SRC}"/cache/sources/evalcache "${tmp_dir}/${armbian_zsh_dir}"/etc/oh-my-zsh/plugins
# @TODO: do this properly (not-copy it to begin with)
rm -rf "${tmp_dir}/${armbian_zsh_dir}"/etc/.git "${tmp_dir}/${armbian_zsh_dir}"/etc/oh-my-zsh/plugins/.git
cp "${tmp_dir}/${armbian_zsh_dir}"/etc/oh-my-zsh/templates/zshrc.zsh-template "${tmp_dir}/${armbian_zsh_dir}"/etc/skel/.zshrc
chmod -R g-w,o-w "${tmp_dir}/${armbian_zsh_dir}"/etc/oh-my-zsh/