diff --git a/CHANGELOG.md b/CHANGELOG.md index 25e9aece..0eb2e926 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,12 @@ This is a note for developers about the recommended tags to keep track of the ch Dates must be YEAR-MONTH-DAY --> +## [1.2.1] - 2022-10-3 +### Changed + +- update skywire to 1.2.1 +- APT repo and skybian releases migrated to github. + ## [1.1.0] - 2022-08-27 ### Changed diff --git a/PKGBUILD b/PKGBUILD index 0d78cb38..f0606148 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -15,7 +15,7 @@ _debdeps="" source=("skybian-static.tar.gz" "skybian-script.tar.gz") sha256sums=('3111f03858e7aa857b938e6b7902fcf615bcb80e8167eeac0f58212fc9fa48c9' - 'c6e11e08d051a3ef5d754c9e340fc2dd6e028597efc32ca6fbfe5e70a796a56c') + '1009a6672475ad6b051e322f022f4a8c983f616d35031d4ee7d382c9303515d6') build() { for i in ${_pkgarches[@]}; do diff --git a/script/skywire.conf b/script/skywire.conf new file mode 100644 index 00000000..ccf8b08c --- /dev/null +++ b/script/skywire.conf @@ -0,0 +1,2 @@ +[Service] +ExecStart=/bin/skywire -mp diff --git a/skybian-conf.sh b/skybian-conf.sh new file mode 100644 index 00000000..69f44b23 --- /dev/null +++ b/skybian-conf.sh @@ -0,0 +1,149 @@ +#skybian-conf.sh +pkgname=skybian-${_board}${ENABLEAUTOPEER} +pkgdesc="Skybian ${_board} image build" +_img="Armbian_22.08.2_${_imgname}_bullseye_current_5.15.69.img" +_imgxz="${_img}.xz" +_imgsha="Bullseye_current.sha" +_imgshalink="https://redirect.armbian.com/${_board}/${_imgsha}" +_xzlink="https://www.armbian.com/dl/${_board}/archive/${_imgxz}" +#pkgver & pkgrel match the version & release of the skywire .deb in the apt repo +pkgver='1.2.1' +pkgrel=1 +arch=('any') +_imgarch="arm64" +_hostarch="$(dpkg --print-architecture)" +_torrent="${_xzlink}.torrent" +_imgfinal="${pkgname}-${pkgver}.img" +_root_partition=/dev/loop0p1 +_defaultuser=root +_skywiredeb="skywire-bin-${pkgver}-${pkgrel}-${_imgarch}.deb" +_skybiandeb="skybian-${_imgarch}.deb" +url="http://github.com/skycoin/skybian" +makedepends=('arch-install-scripts' 'aria2' 'dpkg' 'dtrx' 'gnome-disk-utility' 'qemu-user-static' 'qemu-user-static-binfmt') +_aptrepo="https://github.com/skycoin/apt-repo/releases/download" +source=("${_torrent}" +"${_torrent}.md5" +"${_imgshalink}" +"${_aptrepo}/archive/${_skywiredeb}" +"${_aptrepo}/current/${_skybiandeb}" +"skybian-conf.sh" +) +#"https://fl.us.mirror.archlinuxarm.org/aarch64/extra/gnu-netcat-0.7.1-8-aarch64.pkg.tar.xz" +noextract=("${_skywiredeb}" "${_skybiandeb}") + +prepare() { +cd "${srcdir}" +if [[ ! -f ${_imgxz} ]] && [[ ! -f ../${_imgxz} ]]; then +_msg2 "Downloading sources via torrent" # very fast! +aria2c -V --seed-time=0 ${_torrent} +mv ${_imgxz} ../${_imgxz} +else +_msg2 "found downloaded sources" +if [[ ! -f ../${_imgxz} ]]; then +mv ${_imgxz} ../${_imgxz} +fi +fi +} + +build() { +#standard extraction utilities don't recognizes the armbian archive for some reason. +[[ ! -f ../${_img} ]] && _msg2 "extracting with dtrx" && dtrx ../${_imgxz} && mv ${_img} ../${_img} +_msg2 "checking image archive integrity" +_sum=$(sha256sum ../${_imgxz}) +_msg2 "image sha256sum: ${_sum%%' '*}" +_check=$(cat ${_imgsha}) +_msg2 "${_imgsha}: ${_check%%' '*}" +[[ "${_check%%' '*}" != "${_sum%%' '*}" ]] && _error "image integrity verification failed" && rm ${_imgsha} && exit 1 +[[ "${_check%%' '*}" == "${_sum%%' '*}" ]] && _msg2 "image checksums verified" && rm ${_imgsha} +_msg2 "copying image.." #so we don't have to extract it every time +cp -b ../${_img} ${_imgfinal} +_msg2 "adding extra space" #may or may not be necessary +truncate -s +512M ${_imgfinal} +echo ", +" | sfdisk -N1 ${_imgfinal} +_msg2 "creating mount dir" +sudo umount -l ${srcdir}/mnt && _msg2 "unmounted lingering mounted dir" || true +rm -rf ${srcdir}/mnt +sudo losetup -d /dev/loop0 && _msg2 "detatched loop device after previous unclean exit" || true +mkdir -p ${srcdir}/mnt +_msg2 "mounting image to loop device.." +sudo gnome-disk-image-mounter -w ${_imgfinal} +_msg2 "mounting ${_root_partition} to mount point" +sudo mount ${_root_partition} ${srcdir}/mnt +_msg2 "copying packages into image" +sudo install -Dm644 ${srcdir}/${_skywiredeb} ${srcdir}/mnt/root/${_skywiredeb} +sudo install -Dm644 ${srcdir}/${_skybiandeb} ${srcdir}/mnt/root/${_skybiandeb} +#_msg2 "installing newer version of netcat binary to the image" +#sudo install -Dm755 ${srcdir}/usr/bin/netcat ${srcdir}/mnt/usr/bin/ +#sudo install -Dm755 ${srcdir}/usr/bin/nc ${srcdir}/mnt/usr/bin/ +_msg2 "copying qemu-aarch64-static command to chroot bin" +sudo cp "$(command -v qemu-aarch64-static)" "${srcdir}/mnt/usr/bin/" +################## chroot modifications for apt repo & package ################# +#sudo is used for all commands to give correct environmental vars in chroot +_msg2 "disabling user creation on first login" +sudo rm -f ${srcdir}/mnt/root/.not_logged_in_yet +##set password for _defaultuser +_msg2 "CHROOT: setting password skybian for ${_defaultuser}" +echo ${_defaultuser}:skybian | sudo arch-chroot ${srcdir}/mnt sudo chpasswd +sleep 1 +_msg2 "CHROOT: installing skywire with dpkg" +sudo arch-chroot ${srcdir}/mnt sudo NOAUTOCONFIG=true dpkg -i /root/${_skywiredeb} +sudo rm ${srcdir}/mnt/root/${_skywiredeb} +_msg2 "CHROOT: installing packages in chroot with dpkg" +if [[ ${ENABLEAUTOPEER} == "-autopeer" ]] ; then +sudo arch-chroot ${srcdir}/mnt sudo INSTALLFIRSTBOOT=1 CHROOTCONFIG=true dpkg -i /root/${_skybiandeb} +else +sudo arch-chroot ${srcdir}/mnt sudo INSTALLFIRSTBOOT=1 dpkg -i /root/${_skybiandeb} +fi +sudo rm ${srcdir}/mnt/root/${_skybiandeb} +## included from chroot-commands.sh +_msg2 "CHROOT: Setting the chroot clock to now to avoid bugs with the date..." +sudo arch-chroot ${srcdir}/mnt sudo /sbin/fake-hwclock save force +_msg2 "CHROOT: Generating locale en_US.UTF-8..." +sudo arch-chroot ${srcdir}/mnt sudo locale-gen en_US.UTF-8 +#fix console / tty +_msg2 "CHROOT: setting TERM=linux in /root/.bashrc" +echo 'TERM=linux' | sudo arch-chroot ${srcdir}/mnt tee -a /root/.bashrc +#set SKYBIAN=true +_msg2 "CHROOT: exporting SKYBIAN=true in /root/.bashrc" +echo 'export SKYBIAN=true' | sudo arch-chroot ${srcdir}/mnt tee -a /root/.bashrc +if [[ ${ENABLEAUTOPEER} == "-autopeer" ]] ; then +_msg2 "CHROOT: exporting AUTOPEER=1 in /root/.bashrc" +echo 'export AUTOPEER=1' | sudo arch-chroot ${srcdir}/mnt tee -a /root/.bashrc +fi +_msg2 "CHROOT: configuring unattended-upgrades" +echo unattended-upgrades unattended-upgrades/enable_auto_updates boolean true | sudo arch-chroot ${srcdir}/mnt sudo debconf-set-selections +sudo arch-chroot ${srcdir}/mnt sudo dpkg-reconfigure -f noninteractive unattended-upgrades +######################## end chroot modifications ############################## +[[ -d ${srcdir}/mnt/lost+found ]] && sudo rm -rf ${srcdir}/mnt/lost+found +_msg2 "Unmounting image" +sudo umount ${srcdir}/mnt +_msg2 "detatching /dev/loop0" +sudo losetup -d /dev/loop0 +mv ${_imgfinal} ../${_imgfinal} +cd .. +echo "created image(s):" +ls $_imgfinal +} + +package() { +#let makepkg compress the archive as it does automatically for any package +#afterwards remove the metadata from the archive and change the extension +#avoid the compression step with makepkg --noarchive +#package only, assuming ${_imgfinal} exists with makepkg -R +install -Dm644 ${srcdir}/../${_imgfinal} ${pkgdir}/ +cd ${pkgdir} +_msg2 "Creating image checksum" +sha256sum ${_imgfinal} > ${_imgfinal}.sha +cat ${_imgfinal}.sha +} + +_msg2() { +(( QUIET )) && return +local mesg=$1; shift +printf "${BLUE} ->${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" +} + +_error() { +local mesg=$1; shift +printf "${RED}==> $(gettext "ERROR:")${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2 +} diff --git a/skybian-script.tar.gz b/skybian-script.tar.gz index 6ca77f94..bb8281a2 100644 Binary files a/skybian-script.tar.gz and b/skybian-script.tar.gz differ diff --git a/skybian.opi3.IMGBUILD b/skybian.opi3.IMGBUILD index 4589a671..fb299a62 100755 --- a/skybian.opi3.IMGBUILD +++ b/skybian.opi3.IMGBUILD @@ -1,141 +1,11 @@ -pkgname=skybian-opi3 -pkgdesc="Skybian orange pi 3 image build" -_img="Armbian_22.08.1_Orangepi3_bullseye_current_5.15.63.img" -_imgxz="${_img}.xz" -_imgsha="Bullseye_current.sha" -_imgshalink="https://redirect.armbian.com/orangepi3/${_imgsha}" -_xzlink="https://www.armbian.com/dl/orangepi3/archive/${_imgxz}" -#pkgver & pkgrel match the version & release of the skywire .deb in the apt repo -pkgver='1.1.0' -pkgrel=1 -arch=('any') -_imgarch="arm64" -_hostarch="$(dpkg --print-architecture)" -_torrent="${_xzlink}.torrent" -_imgfinal="${pkgname}-${pkgver}.img" -_root_partition=/dev/loop0p1 -_defaultuser=root -_aptrepo="http://176.9.28.105" #omit DNS issues by using server IP -if [[ "${TESTDEPLOYMENT}" == "1" ]] ; then - _aptrepo="http://deb.skywire.dev" #omit DNS issues by using server IP -fi -_skywiredeb="skywire-bin-${pkgver}-${pkgrel}-${_imgarch}.deb" -_skybiandeb="skybian-${_imgarch}.deb" -url="http://github.com/skycoin/skybian" -makedepends=('arch-install-scripts' 'aria2' 'dpkg' 'dtrx' 'gnome-disk-utility' 'qemu-arm-static') -source=("${_torrent}" -"${_torrent}.md5" -"${_imgshalink}" -"${_aptrepo}/archive/${_skywiredeb}" -"${_aptrepo}/archive/${_skybiandeb}" -) -noextract=("${_skywiredeb}" "${_skybiandeb}") -sha256sums=('1ee4e520317c28c1a4d347d1c9994625ab7d52c47363558ab2fa75767fc20017' - '2ff57465b18cdc8be9e285dd53e1de48a21d555f716e7a5e5a1205446a4656af' - 'db8f02fdfa740a6e107aadee45d8b9b83b2b1fa9d83d399b921ec8c74d583934' - '1949f6d6c1204cea27bbc1e6776d9549daaf64bb79b7145b897a690476cb763e' - 'ef0e00774ab3a1170cbb165a5f82b737d27dbdc75f0ba3a968aabb89ba488518') - -prepare() { -cd "${srcdir}" -if [[ ! -f ${_imgxz} ]] && [[ ! -f ../${_imgxz} ]]; then -_msg2 "Downloading sources via torrent" # very fast! -aria2c -V --seed-time=0 ${_torrent} -mv ${_imgxz} ../${_imgxz} -else -_msg2 "found downloaded sources" -if [[ ! -f ../${_imgxz} ]]; then -mv ${_imgxz} ../${_imgxz} -fi -fi -} - -build() { -#standard extraction utilities don't recognizes the armbian archive for some reason. -[[ ! -f ../${_img} ]] && _msg2 "extracting with dtrx" && dtrx ../${_imgxz} && mv ${_img} ../${_img} -_msg2 "checking image archive integrity" -_sum=$(sha256sum ../${_imgxz}) -_msg2 "image sha256sum: ${_sum%%' '*}" -_check=$(cat ${_imgsha}) -_msg2 "${_imgsha}: ${_check%%' '*}" -[[ "${_check%%' '*}" != "${_sum%%' '*}" ]] && _error "image integrity verification failed" && rm ${_imgsha} && exit 1 -[[ "${_check%%' '*}" == "${_sum%%' '*}" ]] && _msg2 "image checksums verified" && rm ${_imgsha} -_msg2 "copying image.." #so we don't have to extract it every time -cp -b ../${_img} ${_imgfinal} -_msg2 "adding extra space" #may or may not be necessary -truncate -s +512M ${_imgfinal} -echo ", +" | sfdisk -N1 ${_imgfinal} -_msg2 "mounting image to loop device.." -sudo gnome-disk-image-mounter -w ${_imgfinal} -_msg2 "creating mount dir" -mkdir -p ${srcdir}/mnt -_msg2 "mounting ${_root_partition} to mount point" -sudo mount ${_root_partition} ${srcdir}/mnt -_msg2 "copying packages into image" -sudo install -Dm644 ${srcdir}/${_skywiredeb} ${srcdir}/mnt/root/${_skywiredeb} -sudo install -Dm644 ${srcdir}/${_skybiandeb} ${srcdir}/mnt/root/${_skybiandeb} -_msg2 "copying qemu-aarch64-static command to chroot bin" -sudo cp "$(command -v qemu-aarch64-static)" "${srcdir}/mnt/usr/bin/" -################## chroot modifications for apt repo & package ################# -#sudo is used for all commands to give correct environmental vars in chroot -_msg2 "disabling user creation on first login" -sudo rm -f ${srcdir}/mnt/root/.not_logged_in_yet -##set password for _defaultuser -_msg2 "CHROOT: setting password skybian for ${_defaultuser}" -echo ${_defaultuser}:skybian | sudo arch-chroot ${srcdir}/mnt sudo chpasswd -sleep 1 -_msg2 "CHROOT: installing skywire with dpkg" -sudo arch-chroot ${srcdir}/mnt sudo NOAUTOCONFIG=true dpkg -i /root/${_skywiredeb} -sudo rm ${srcdir}/mnt/root/${_skywiredeb} -sudo arch-chroot ${srcdir}/mnt sudo systemctl enable skywire-autoconfig -_msg2 "CHROOT: installing packages in chroot with dpkg" -sudo arch-chroot ${srcdir}/mnt sudo INSTALLFIRSTBOOT=1 dpkg -i /root/${_skybiandeb} -sudo rm ${srcdir}/mnt/root/${_skybiandeb} -## included from chroot-commands.sh -_msg2 "CHROOT: Setting the chroot clock to now to avoid bugs with the date..." -sudo arch-chroot ${srcdir}/mnt sudo /sbin/fake-hwclock save force -_msg2 "CHROOT: Generating locale en_US.UTF-8..." -sudo arch-chroot ${srcdir}/mnt sudo locale-gen en_US.UTF-8 -#fix console / tty -_msg2 "CHROOT: setting TERM=linux in /root/.bashrc" -echo 'TERM=linux' | sudo arch-chroot ${srcdir}/mnt tee -a /root/.bashrc -#set SKYBIAN=true -_msg2 "CHROOT: exporting SKYBIAN=true in /root/.bashrc" -echo 'export SKYBIAN=true' | sudo arch-chroot ${srcdir}/mnt tee -a /root/.bashrc -_msg2 "CHROOT: configuring unattended-upgrades" -echo unattended-upgrades unattended-upgrades/enable_auto_updates boolean true | sudo arch-chroot ${srcdir}/mnt sudo debconf-set-selections -sudo arch-chroot ${srcdir}/mnt sudo dpkg-reconfigure -f noninteractive unattended-upgrades -######################## end chroot modifications ############################## -[[ -d ${srcdir}/mnt/lost+found ]] && sudo rm -rf ${srcdir}/mnt/lost+found -_msg2 "Unmounting image" -sudo umount ${srcdir}/mnt -_msg2 "detatching /dev/loop0" -sudo losetup -d /dev/loop0 -mv ${_imgfinal} ../${_imgfinal} -cd .. -echo "created image(s):" -ls $_imgfinal -} - -package() { -#let makepkg compress the archive as it does automatically for any package -#afterwards remove the metadata from the archive and change the extension -#avoid the compression step with makepkg --noarchive -#package only, assuming ${_imgfinal} exists with makepkg -R -install -Dm644 ${srcdir}/../${_imgfinal} ${pkgdir}/ -cd ${pkgdir} -_msg2 "Creating image checksum" -sha256sum ${_imgfinal} > ${_imgfinal}.sha -cat ${_imgfinal}.sha -} - -_msg2() { -(( QUIET )) && return -local mesg=$1; shift -printf "${BLUE} ->${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" -} - -_error() { -local mesg=$1; shift -printf "${RED}==> $(gettext "ERROR:")${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2 -} +#makepkg -fp skybian.opi3.IMGBUILD +#export ENABLEAUTOPEER="-autopeer" +_imgname="Orangepi3" +_board="orangepi3" +source skybian-conf.sh +sha256sums=('91afc8e6717a748bd82824b67eda8bdd9bab71f9d8df600db7a72692ccc07409' + '4068a03635b16bda430ce4ac8dbc2e8714272bcf9b0439f31814961843390c44' + 'b645a1257c93a85b5094cca4f1310d76dc7d7faf17da781ed1d8c827eacf30b5' + 'cc69909c80c952d2e6ede9b4bb5bd45414ae21d499931615a07c34d71fdaec1e' + '823f73dd44003c80bb0c7900a0ce50820d417bbadd8e977f9c58f44163c91f39' + '06fddcb9c972a1fd36eb3c30aedad82284f4aa4d67afa3345f4b500901a40cdb') diff --git a/skybian.prime.IMGBUILD b/skybian.prime.IMGBUILD index ac1a5f5b..9f4f4880 100755 --- a/skybian.prime.IMGBUILD +++ b/skybian.prime.IMGBUILD @@ -1,154 +1,11 @@ +#makepkg -fp skybian.prime.IMGBUILD #export ENABLEAUTOPEER="-autopeer" -pkgname=skybian-prime${ENABLEAUTOPEER} -pkgdesc="Skybian orange pi prime image build" -_img="Armbian_22.08.1_Orangepiprime_bullseye_current_5.15.63.img" -_imgxz="${_img}.xz" -_imgsha="Bullseye_current.sha" -_imgshalink="https://redirect.armbian.com/orangepiprime/${_imgsha}" -_xzlink="https://www.armbian.com/dl/orangepiprime/archive/${_imgxz}" -#pkgver & pkgrel match the version & release of the skywire .deb in the apt repo -pkgver='1.1.0' -pkgrel=1 -arch=('any') -_imgarch="arm64" -_hostarch="$(dpkg --print-architecture)" -_torrent="${_xzlink}.torrent" -_imgfinal="${pkgname}-${pkgver}.img" -_root_partition=/dev/loop0p1 -_defaultuser=root -_aptrepo="http://176.9.28.105" #omit DNS issues by using server IP -#export TESTDEPLOYMENT=1 -if [[ "${TESTDEPLOYMENT}" == "1" ]] ; then - _aptrepo="http://deb.skywire.dev" #omit DNS issues by using server IP -fi -_skywiredeb="skywire-bin-${pkgver}-${pkgrel}-${_imgarch}.deb" -_skybiandeb="skybian-${_imgarch}.deb" -url="http://github.com/skycoin/skybian" -makedepends=('arch-install-scripts' 'aria2' 'dpkg' 'dtrx' 'gnome-disk-utility' 'qemu-arm-static') -source=("${_torrent}" -"${_torrent}.md5" -"${_imgshalink}" -"${_aptrepo}/archive/${_skywiredeb}" -"${_aptrepo}/archive/${_skybiandeb}" -) -#"https://fl.us.mirror.archlinuxarm.org/aarch64/extra/gnu-netcat-0.7.1-8-aarch64.pkg.tar.xz" -noextract=("${_skywiredeb}" "${_skybiandeb}") -sha256sums=('29af44d04419fec5070a2919e6c3b656bfe113dabcd04179af4e5786de8b0107' - '944abd576ed93434b88a4b9b24c95a3d744cc79a16962468bd3647177c3b7dd6' - '8ec92b6015761ad25641049593b38d8771858ebf827aa0728ef0d91235c34ddd' - '1949f6d6c1204cea27bbc1e6776d9549daaf64bb79b7145b897a690476cb763e' - 'ef0e00774ab3a1170cbb165a5f82b737d27dbdc75f0ba3a968aabb89ba488518') - -prepare() { -cd "${srcdir}" -if [[ ! -f ${_imgxz} ]] && [[ ! -f ../${_imgxz} ]]; then -_msg2 "Downloading sources via torrent" # very fast! -aria2c -V --seed-time=0 ${_torrent} -mv ${_imgxz} ../${_imgxz} -else -_msg2 "found downloaded sources" -if [[ ! -f ../${_imgxz} ]]; then -mv ${_imgxz} ../${_imgxz} -fi -fi -} - -build() { -#standard extraction utilities don't recognizes the armbian archive for some reason. -[[ ! -f ../${_img} ]] && _msg2 "extracting with dtrx" && dtrx ../${_imgxz} && mv ${_img} ../${_img} -_msg2 "checking image archive integrity" -_sum=$(sha256sum ../${_imgxz}) -_msg2 "image sha256sum: ${_sum%%' '*}" -_check=$(cat ${_imgsha}) -_msg2 "${_imgsha}: ${_check%%' '*}" -[[ "${_check%%' '*}" != "${_sum%%' '*}" ]] && _error "image integrity verification failed" && rm ${_imgsha} && exit 1 -[[ "${_check%%' '*}" == "${_sum%%' '*}" ]] && _msg2 "image checksums verified" && rm ${_imgsha} -_msg2 "copying image.." #so we don't have to extract it every time -cp -b ../${_img} ${_imgfinal} -_msg2 "adding extra space" #may or may not be necessary -truncate -s +512M ${_imgfinal} -echo ", +" | sfdisk -N1 ${_imgfinal} -_msg2 "mounting image to loop device.." -sudo gnome-disk-image-mounter -w ${_imgfinal} -_msg2 "creating mount dir" -mkdir -p ${srcdir}/mnt -_msg2 "mounting ${_root_partition} to mount point" -sudo mount ${_root_partition} ${srcdir}/mnt -_msg2 "copying packages into image" -sudo install -Dm644 ${srcdir}/${_skywiredeb} ${srcdir}/mnt/root/${_skywiredeb} -sudo install -Dm644 ${srcdir}/${_skybiandeb} ${srcdir}/mnt/root/${_skybiandeb} -#_msg2 "installing newer version of netcat binary to the image" -#sudo install -Dm755 ${srcdir}/usr/bin/netcat ${srcdir}/mnt/usr/bin/ -#sudo install -Dm755 ${srcdir}/usr/bin/nc ${srcdir}/mnt/usr/bin/ -_msg2 "copying qemu-aarch64-static command to chroot bin" -sudo cp "$(command -v qemu-aarch64-static)" "${srcdir}/mnt/usr/bin/" -################## chroot modifications for apt repo & package ################# -#sudo is used for all commands to give correct environmental vars in chroot -_msg2 "disabling user creation on first login" -sudo rm -f ${srcdir}/mnt/root/.not_logged_in_yet -##set password for _defaultuser -_msg2 "CHROOT: setting password skybian for ${_defaultuser}" -echo ${_defaultuser}:skybian | sudo arch-chroot ${srcdir}/mnt sudo chpasswd -sleep 1 -_msg2 "CHROOT: installing skywire with dpkg" -sudo arch-chroot ${srcdir}/mnt sudo NOAUTOCONFIG=true dpkg -i /root/${_skywiredeb} -sudo rm ${srcdir}/mnt/root/${_skywiredeb} -_msg2 "CHROOT: installing packages in chroot with dpkg" -if [[ ${ENABLEAUTOPEER} == "-autopeer" ]] ; then -sudo arch-chroot ${srcdir}/mnt sudo INSTALLFIRSTBOOT=1 CHROOTCONFIG=true dpkg -i /root/${_skybiandeb} -else -sudo arch-chroot ${srcdir}/mnt sudo INSTALLFIRSTBOOT=1 dpkg -i /root/${_skybiandeb} -fi -sudo rm ${srcdir}/mnt/root/${_skybiandeb} -## included from chroot-commands.sh -_msg2 "CHROOT: Setting the chroot clock to now to avoid bugs with the date..." -sudo arch-chroot ${srcdir}/mnt sudo /sbin/fake-hwclock save force -_msg2 "CHROOT: Generating locale en_US.UTF-8..." -sudo arch-chroot ${srcdir}/mnt sudo locale-gen en_US.UTF-8 -#fix console / tty -_msg2 "CHROOT: setting TERM=linux in /root/.bashrc" -echo 'TERM=linux' | sudo arch-chroot ${srcdir}/mnt tee -a /root/.bashrc -#set SKYBIAN=true -_msg2 "CHROOT: exporting SKYBIAN=true in /root/.bashrc" -echo 'export SKYBIAN=true' | sudo arch-chroot ${srcdir}/mnt tee -a /root/.bashrc -if [[ ${ENABLEAUTOPEER} == "-autopeer" ]] ; then -_msg2 "CHROOT: exporting AUTOPEER=1 in /root/.bashrc" -echo 'export AUTOPEER=1' | sudo arch-chroot ${srcdir}/mnt tee -a /root/.bashrc -fi -_msg2 "CHROOT: configuring unattended-upgrades" -echo unattended-upgrades unattended-upgrades/enable_auto_updates boolean true | sudo arch-chroot ${srcdir}/mnt sudo debconf-set-selections -sudo arch-chroot ${srcdir}/mnt sudo dpkg-reconfigure -f noninteractive unattended-upgrades -######################## end chroot modifications ############################## -[[ -d ${srcdir}/mnt/lost+found ]] && sudo rm -rf ${srcdir}/mnt/lost+found -_msg2 "Unmounting image" -sudo umount ${srcdir}/mnt -_msg2 "detatching /dev/loop0" -sudo losetup -d /dev/loop0 -mv ${_imgfinal} ../${_imgfinal} -cd .. -echo "created image(s):" -ls $_imgfinal -} - -package() { -#let makepkg compress the archive as it does automatically for any package -#afterwards remove the metadata from the archive and change the extension -#avoid the compression step with makepkg --noarchive -#package only, assuming ${_imgfinal} exists with makepkg -R -install -Dm644 ${srcdir}/../${_imgfinal} ${pkgdir}/ -cd ${pkgdir} -_msg2 "Creating image checksum" -sha256sum ${_imgfinal} > ${_imgfinal}.sha -cat ${_imgfinal}.sha -} - -_msg2() { -(( QUIET )) && return -local mesg=$1; shift -printf "${BLUE} ->${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" -} - -_error() { -local mesg=$1; shift -printf "${RED}==> $(gettext "ERROR:")${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2 -} +_imgname="Orangepiprime" +_board="orangepiprime" +source skybian-conf.sh +sha256sums=('0e4ed422b68bf8d70062a0c63c93504fe3df7f8202abf5153df7b69aa6d5dfa7' + '2071b546fbba6f688474014b353e062de8fe328c677c88c9abaa0d4aa5c7d338' + '7985902ebb9a399791046d7a14e4689d50d91141565e404749b76b8c192a4488' + 'cc69909c80c952d2e6ede9b4bb5bd45414ae21d499931615a07c34d71fdaec1e' + '823f73dd44003c80bb0c7900a0ce50820d417bbadd8e977f9c58f44163c91f39' + '06fddcb9c972a1fd36eb3c30aedad82284f4aa4d67afa3345f4b500901a40cdb') diff --git a/skyraspbian-conf.sh b/skyraspbian-conf.sh new file mode 100644 index 00000000..dce629dd --- /dev/null +++ b/skyraspbian-conf.sh @@ -0,0 +1,119 @@ +pkgname=skyraspbian-${_imgarch} +pkgdesc="Skyraspbian ${_imgarch} image build" +pkgver='1.2.1' +pkgrel=1 +arch=('any') +_hostarch=$(dpkg --print-architecture) +_img="2022-04-04-raspios-bullseye-${_imgarch}-lite.img" +_imgxz="${_img}.xz" +_xzlink="https://downloads.raspberrypi.org/raspios_lite_${_imgarch}/images/raspios_lite_${_imgarch}-2022-04-07/${_imgxz}" +_torrent="${_xzlink}.torrent" +_imgfinal="${pkgname}-${pkgver}.img" +_root_partition=/dev/loop0p2 +_boot_partition=/dev/loop0p1 +_defaultuser=pi +_skywiredeb="skywire-bin-${pkgver}-${pkgrel}-${_imgarch}.deb" +_skybiandeb="skybian-${_imgarch}.deb" +url="http://github.com/skycoin/skybian" +makedepends=('arch-install-scripts' 'aria2' 'dpkg' 'dtrx' 'gnome-disk-utility' 'qemu-user-static') +depends=() +_aptrepo="https://github.com/skycoin/apt-repo/releases/download" +source=("${_torrent}" +"${_aptrepo}/archive/${_skywiredeb}" +"${_aptrepo}/current/${_skybiandeb}" +"skyraspbian-conf.sh" +) +noextract=("${_skywiredeb}" "${_skybiandeb}") + +prepare() { +cd "${srcdir}" +if [[ ! -f ${_imgxz} ]] && [[ ! -f ../${_imgxz} ]]; then +_msg2 "Downloading sources via torrent" # very fast! +aria2c -V --seed-time=0 ${_torrent} +mv ${_imgxz} ../${_imgxz} +else +_msg2 "found downloaded sources" +if [[ ! -f ../${_imgxz} ]]; then +mv ${_imgxz} ../${_imgxz} +fi +fi +} + +build() { +#standard extraction utilities don't recognizes this archive for some reason. +[[ ! -f ../${_img} ]] && _msg2 "extracting with dtrx" && dtrx -no ../${_imgxz} && mv ${_img} ../${_img} +_msg2 "copying image.." #so we don't have to extract it every time +cp -b ../${_img} ${_imgfinal} +_msg2 "mounting image to loop device.." +sudo gnome-disk-image-mounter -w ${_imgfinal} +_msg2 "creating mount dir" +_mntdir="${srcdir}/mnt" +mkdir -p ${_mntdir} +_msg2 "mounting ${_root_partition} to mount point" +sudo mount ${_root_partition} ${_mntdir} +_msg2 "copy packages into apt cache" +sudo install -Dm644 ${srcdir}/${_skywiredeb} ${srcdir}/mnt/root/${_skywiredeb} +sudo install -Dm644 ${srcdir}/${_skybiandeb} ${srcdir}/mnt/root/${_skybiandeb} +_msg2 "copy qemu-aarch64-static command to chroot bin" +sudo cp "$(command -v qemu-aarch64-static)" "${srcdir}/mnt/usr/bin/" +################# chroot modifications for apt repo & package ################# +#sudo is used for all commands to give correct environmental vars in chroot +_msg2 "CHROOT: installing skywire with dpkg" +sudo arch-chroot ${srcdir}/mnt sudo NOAUTOCONFIG=true dpkg -i /root/${_skywiredeb} +sudo rm ${srcdir}/mnt/root/${_skywiredeb} +_msg2 "CHROOT: installing packages in chroot with dpkg" +sudo arch-chroot ${srcdir}/mnt sudo INSTALLFIRSTBOOT=1 dpkg -i /root/${_skybiandeb} +sudo rm ${srcdir}/mnt/root/${_skybiandeb} +sudo arch-chroot ${_mntdir} sudo systemctl enable skywire-autoconfig +##set password for _defaultuser +_msg2 "CHROOT: setting password skybian for ${_defaultuser}" +echo ${_defaultuser}:skybian | sudo arch-chroot ${srcdir}/mnt sudo chpasswd +sleep 1 +## included from chroot-commands.sh +_msg2 "CHROOT: Setting the chroot clock to now to avoid bugs with the date..." +sudo arch-chroot ${_mntdir} sudo /sbin/fake-hwclock save force +_msg2 "CHROOT: Generating locale en_US.UTF-8..." +sudo arch-chroot ${_mntdir} sudo locale-gen en_US.UTF-8 +#set SKYBIAN=true +_msg2 "CHROOT: exporting SKYBIAN=true in /root/.bashrc" +echo 'export SKYBIAN=true' | sudo arch-chroot ${srcdir}/mnt tee -a /root/.bashrc +_msg2 "Unmounting image root partition" +sudo umount ${_mntdir} +######################## end chroot modifications ############################## +################# SKYRASPBIAN SPECIFIC BOOT CONFIG PARAMS ###################### +_msg2 "creating mount dir for boot partition" +_mntdir="${srcdir}/boot" +mkdir -p ${_mntdir} +_msg2 "mounting ${_boot_partition} to mount point" +sudo mount ${_boot_partition} ${_mntdir} +_msg2 "Enabling UART" +sudo sed -i '/^#dtparam=spi=on.*/a enable_uart=1' "${_mntdir}/config.txt" +_msg2 "Enabling HDMI" +sudo sed -i 's/#hdmi_force_hotplug=1/hdmi_force_hotplug=1/' "${_mntdir}/config.txt" +_msg2 "Enabling SSH" +sudo touch "${_mntdir}/SSH.txt" +_msg2 "Unounting image boot partition" +sudo umount ${_mntdir} +########################## end boot param modifications ####################### +_msg2 "detatching /dev/loop0" +sudo losetup -d /dev/loop0 +mv ${_imgfinal} ../${_imgfinal} +} + +package() { +#Just let makepkg compress the archive as it does automatically for a package +#and then remove the metadata from the archive and change the extension +#avoid the compression step with makepkg --noarchive +#package only, assuming ${_imgfinal} exists with makepkg -R +install -Dm644 ${srcdir}/../${_imgfinal} ${pkgdir}/ +cd ${pkgdir} +_msg2 "Creating image checksums" +sha256sum ${_imgfinal} > ${_imgfinal}.sha +cat ${_imgfinal}.sha +} + +_msg2() { +(( QUIET )) && return +local mesg=$1; shift +printf "${BLUE} ->${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" +} diff --git a/skyraspbian.rpi3.IMGBUILD b/skyraspbian.rpi3.IMGBUILD index d80ca23b..d5c83e92 100755 --- a/skyraspbian.rpi3.IMGBUILD +++ b/skyraspbian.rpi3.IMGBUILD @@ -1,125 +1,6 @@ -pkgname=skyraspbian-rpi3 -pkgdesc="Skyraspbian armhf image build" _imgarch="armhf" -pkgver='1.1.0' -pkgrel=1 -arch=('any') -_hostarch=$(dpkg --print-architecture) -_img="2022-04-04-raspios-bullseye-${_imgarch}-lite.img" -_imgxz="${_img}.xz" -_xzlink="https://downloads.raspberrypi.org/raspios_lite_${_imgarch}/images/raspios_lite_${_imgarch}-2022-04-07/${_imgxz}" -_torrent="${_xzlink}.torrent" -_imgfinal="${pkgname}-${pkgver}.img" -_root_partition=/dev/loop0p2 -_boot_partition=/dev/loop0p1 -_defaultuser=pi -_aptrepo="http://176.9.28.105" #omit DNS issues by using server IP -if [[ "${TESTDEPLOYMENT}" == "1" ]] ; then - _aptrepo="http://deb.skywire.dev" #omit DNS issues by using server IP -fi -_skywiredeb="skywire-bin-${pkgver}-${pkgrel}-${_imgarch}.deb" -_skybiandeb="skybian-${_imgarch}.deb" -url="http://github.com/skycoin/skybian" -makedepends=('arch-install-scripts' 'aria2' 'dpkg' 'dtrx' 'gnome-disk-utility' 'qemu-arm-static') -depends=() -source=("${_torrent}" -"${_aptrepo}/archive/${_skywiredeb}" -"${_aptrepo}/archive/${_skybiandeb}" -) -noextract=("${_skywiredeb}" "${_skybiandeb}") +source skyraspbian-conf.sh sha256sums=('cff9b71924560032bb6884d7f78a8c84852f5c38171385aa1446f5281ecbb6a6' - 'c63d1025c3655ef6cdd5e4f69a91f1c5a6f7e7b067af87d49d792e9660e40d16' - '6781d7cdb12719d3251d1a681282dbc19400bebfb9d99cf654bb3153539ec8f0') - -prepare() { -cd "${srcdir}" -if [[ ! -f ${_imgxz} ]] && [[ ! -f ../${_imgxz} ]]; then -_msg2 "Downloading sources via torrent" # very fast! -aria2c -V --seed-time=0 ${_torrent} -mv ${_imgxz} ../${_imgxz} -else -_msg2 "found downloaded sources" -if [[ ! -f ../${_imgxz} ]]; then -mv ${_imgxz} ../${_imgxz} -fi -fi -} - -build() { -#standard extraction utilities don't recognizes this archive for some reason. -[[ ! -f ../${_img} ]] && _msg2 "extracting with dtrx" && dtrx -no ../${_imgxz} && mv ${_img} ../${_img} -_msg2 "copying image.." #so we don't have to extract it every time -cp -b ../${_img} ${_imgfinal} -_msg2 "mounting image to loop device.." -sudo gnome-disk-image-mounter -w ${_imgfinal} -_msg2 "creating mount dir" -_mntdir="${srcdir}/mnt" -mkdir -p ${_mntdir} -_msg2 "mounting ${_root_partition} to mount point" -sudo mount ${_root_partition} ${_mntdir} -_msg2 "copy packages into apt cache" -sudo install -Dm644 ${srcdir}/${_skywiredeb} ${srcdir}/mnt/root/${_skywiredeb} -sudo install -Dm644 ${srcdir}/${_skybiandeb} ${srcdir}/mnt/root/${_skybiandeb} -_msg2 "copy qemu-aarch64-static command to chroot bin" -sudo cp "$(command -v qemu-aarch64-static)" "${srcdir}/mnt/usr/bin/" -################# chroot modifications for apt repo & package ################# -#sudo is used for all commands to give correct environmental vars in chroot -_msg2 "CHROOT: installing skywire with dpkg" -sudo arch-chroot ${srcdir}/mnt sudo NOAUTOCONFIG=true dpkg -i /root/${_skywiredeb} -sudo rm ${srcdir}/mnt/root/${_skywiredeb} -_msg2 "CHROOT: installing packages in chroot with dpkg" -sudo arch-chroot ${srcdir}/mnt sudo INSTALLFIRSTBOOT=1 dpkg -i /root/${_skybiandeb} -sudo rm ${srcdir}/mnt/root/${_skybiandeb} -sudo arch-chroot ${_mntdir} sudo systemctl enable skywire-autoconfig -##set password for _defaultuser -_msg2 "CHROOT: setting password skybian for ${_defaultuser}" -echo ${_defaultuser}:skybian | sudo arch-chroot ${srcdir}/mnt sudo chpasswd -sleep 1 -## included from chroot-commands.sh -_msg2 "CHROOT: Setting the chroot clock to now to avoid bugs with the date..." -sudo arch-chroot ${_mntdir} sudo /sbin/fake-hwclock save force -_msg2 "CHROOT: Generating locale en_US.UTF-8..." -sudo arch-chroot ${_mntdir} sudo locale-gen en_US.UTF-8 -#set SKYBIAN=true -_msg2 "CHROOT: exporting SKYBIAN=true in /root/.bashrc" -echo 'export SKYBIAN=true' | sudo arch-chroot ${srcdir}/mnt tee -a /root/.bashrc -_msg2 "Unmounting image root partition" -sudo umount ${_mntdir} -######################## end chroot modifications ############################## -################# SKYRASPBIAN SPECIFIC BOOT CONFIG PARAMS ###################### -_msg2 "creating mount dir for boot partition" -_mntdir="${srcdir}/boot" -mkdir -p ${_mntdir} -_msg2 "mounting ${_boot_partition} to mount point" -sudo mount ${_boot_partition} ${_mntdir} -_msg2 "Enabling UART" -sudo sed -i '/^#dtparam=spi=on.*/a enable_uart=1' "${_mntdir}/config.txt" -_msg2 "Enabling HDMI" -sudo sed -i 's/#hdmi_force_hotplug=1/hdmi_force_hotplug=1/' "${_mntdir}/config.txt" -_msg2 "Enabling SSH" -sudo touch "${_mntdir}/SSH.txt" -_msg2 "Unounting image boot partition" -sudo umount ${_mntdir} -########################## end boot param modifications ####################### -_msg2 "detatching /dev/loop0" -sudo losetup -d /dev/loop0 -mv ${_imgfinal} ../${_imgfinal} -} - -package() { -#Just let makepkg compress the archive as it does automatically for a package -#and then remove the metadata from the archive and change the extension -#avoid the compression step with makepkg --noarchive -#package only, assuming ${_imgfinal} exists with makepkg -R -install -Dm644 ${srcdir}/../${_imgfinal} ${pkgdir}/ -cd ${pkgdir} -_msg2 "Creating image checksums" -sha256sum ${_imgfinal} > ${_imgfinal}.sha -cat ${_imgfinal}.sha -} - -_msg2() { -(( QUIET )) && return -local mesg=$1; shift -printf "${BLUE} ->${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" -} + 'bf25ad613391b62cc325fde148318bafd2e56bf94f6a747978c419eef32080a0' + '72732f65d0afc82b81b65d01ce4265d3696387419e79f543d4bce87c689e6c2c' + '15c2164c9cea421c8eed3515d46c1cdc0503743641984eb933b9bf62743bfe55') diff --git a/skyraspbian.rpi4.IMGBUILD b/skyraspbian.rpi4.IMGBUILD index 25144ed9..9d435550 100755 --- a/skyraspbian.rpi4.IMGBUILD +++ b/skyraspbian.rpi4.IMGBUILD @@ -1,125 +1,6 @@ -pkgname=skyraspbian-rpi4 -pkgdesc="Skyraspbian arm64 image build" _imgarch="arm64" -pkgver='1.1.0' -pkgrel=1 -arch=('any') -_hostarch=$(dpkg --print-architecture) -_img="2022-04-04-raspios-bullseye-${_imgarch}-lite.img" -_imgxz="${_img}.xz" -_xzlink="https://downloads.raspberrypi.org/raspios_lite_${_imgarch}/images/raspios_lite_${_imgarch}-2022-04-07/${_imgxz}" -_torrent="${_xzlink}.torrent" -_imgfinal="${pkgname}-${pkgver}.img" -_root_partition=/dev/loop0p2 -_boot_partition=/dev/loop0p1 -_defaultuser=pi -_aptrepo="http://176.9.28.105" #omit DNS issues by using server IP -if [[ "${TESTDEPLOYMENT}" == "1" ]] ; then - _aptrepo="http://deb.skywire.dev" #omit DNS issues by using server IP -fi -_skywiredeb="skywire-bin-${pkgver}-${pkgrel}-${_imgarch}.deb" -_skybiandeb="skybian-${_imgarch}.deb" -url="http://github.com/skycoin/skybian" -makedepends=('arch-install-scripts' 'aria2' 'dpkg' 'dtrx' 'gnome-disk-utility' 'qemu-arm-static') -depends=() -source=("${_torrent}" -"${_aptrepo}/archive/${_skywiredeb}" -"${_aptrepo}/archive/${_skybiandeb}" -) -noextract=("${_skywiredeb}" "${_skybiandeb}") +source skyraspbian-conf.sh sha256sums=('113eed9f7facaefd01ea9903c4a108679d6c2ba621d754bbd701440e54127a00' - '1949f6d6c1204cea27bbc1e6776d9549daaf64bb79b7145b897a690476cb763e' - 'ef0e00774ab3a1170cbb165a5f82b737d27dbdc75f0ba3a968aabb89ba488518') - -prepare() { -cd "${srcdir}" -if [[ ! -f ${_imgxz} ]] && [[ ! -f ../${_imgxz} ]]; then -_msg2 "Downloading sources via torrent" # very fast! -aria2c -V --seed-time=0 ${_torrent} -mv ${_imgxz} ../${_imgxz} -else -_msg2 "found downloaded sources" -if [[ ! -f ../${_imgxz} ]]; then -mv ${_imgxz} ../${_imgxz} -fi -fi -} - -build() { -#standard extraction utilities don't recognizes this archive for some reason. -[[ ! -f ../${_img} ]] && _msg2 "extracting with dtrx" && dtrx -no ../${_imgxz} && mv ${_img} ../${_img} -_msg2 "copying image.." #so we don't have to extract it every time -cp -b ../${_img} ${_imgfinal} -_msg2 "mounting image to loop device.." -sudo gnome-disk-image-mounter -w ${_imgfinal} -_msg2 "creating mount dir" -_mntdir="${srcdir}/mnt" -mkdir -p ${_mntdir} -_msg2 "mounting ${_root_partition} to mount point" -sudo mount ${_root_partition} ${_mntdir} -_msg2 "copy packages into apt cache" -sudo install -Dm644 ${srcdir}/${_skywiredeb} ${srcdir}/mnt/root/${_skywiredeb} -sudo install -Dm644 ${srcdir}/${_skybiandeb} ${srcdir}/mnt/root/${_skybiandeb} -_msg2 "copy qemu-aarch64-static command to chroot bin" -sudo cp "$(command -v qemu-aarch64-static)" "${srcdir}/mnt/usr/bin/" -################# chroot modifications for apt repo & package ################# -#sudo is used for all commands to give correct environmental vars in chroot -_msg2 "CHROOT: installing skywire with dpkg" -sudo arch-chroot ${srcdir}/mnt sudo NOAUTOCONFIG=true dpkg -i /root/${_skywiredeb} -sudo rm ${srcdir}/mnt/root/${_skywiredeb} -_msg2 "CHROOT: installing packages in chroot with dpkg" -sudo arch-chroot ${srcdir}/mnt sudo INSTALLFIRSTBOOT=1 dpkg -i /root/${_skybiandeb} -sudo rm ${srcdir}/mnt/root/${_skybiandeb} -sudo arch-chroot ${_mntdir} sudo systemctl enable skywire-autoconfig -##set password for _defaultuser -_msg2 "CHROOT: setting password skybian for ${_defaultuser}" -echo ${_defaultuser}:skybian | sudo arch-chroot ${srcdir}/mnt sudo chpasswd -sleep 1 -## included from chroot-commands.sh -_msg2 "CHROOT: Setting the chroot clock to now to avoid bugs with the date..." -sudo arch-chroot ${_mntdir} sudo /sbin/fake-hwclock save force -_msg2 "CHROOT: Generating locale en_US.UTF-8..." -sudo arch-chroot ${_mntdir} sudo locale-gen en_US.UTF-8 -#set SKYBIAN=true -_msg2 "CHROOT: exporting SKYBIAN=true in /root/.bashrc" -echo 'export SKYBIAN=true' | sudo arch-chroot ${srcdir}/mnt tee -a /root/.bashrc -_msg2 "Unmounting image root partition" -sudo umount ${_mntdir} -######################## end chroot modifications ############################## -################# SKYRASPBIAN SPECIFIC BOOT CONFIG PARAMS ###################### -_msg2 "creating mount dir for boot partition" -_mntdir="${srcdir}/boot" -mkdir -p ${_mntdir} -_msg2 "mounting ${_boot_partition} to mount point" -sudo mount ${_boot_partition} ${_mntdir} -_msg2 "Enabling UART" -sudo sed -i '/^#dtparam=spi=on.*/a enable_uart=1' "${_mntdir}/config.txt" -_msg2 "Enabling HDMI" -sudo sed -i 's/#hdmi_force_hotplug=1/hdmi_force_hotplug=1/' "${_mntdir}/config.txt" -_msg2 "Enabling SSH" -sudo touch "${_mntdir}/SSH.txt" -_msg2 "Unounting image boot partition" -sudo umount ${_mntdir} -########################## end boot param modifications ####################### -_msg2 "detatching /dev/loop0" -sudo losetup -d /dev/loop0 -mv ${_imgfinal} ../${_imgfinal} -} - -package() { -#Just let makepkg compress the archive as it does automatically for a package -#and then remove the metadata from the archive and change the extension -#avoid the compression step with makepkg --noarchive -#package only, assuming ${_imgfinal} exists with makepkg -R -install -Dm644 ${srcdir}/../${_imgfinal} ${pkgdir}/ -cd ${pkgdir} -_msg2 "Creating image checksums" -sha256sum ${_imgfinal} > ${_imgfinal}.sha -cat ${_imgfinal}.sha -} - -_msg2() { -(( QUIET )) && return -local mesg=$1; shift -printf "${BLUE} ->${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" -} + 'cc69909c80c952d2e6ede9b4bb5bd45414ae21d499931615a07c34d71fdaec1e' + '823f73dd44003c80bb0c7900a0ce50820d417bbadd8e977f9c58f44163c91f39' + '15c2164c9cea421c8eed3515d46c1cdc0503743641984eb933b9bf62743bfe55')