Skip to content

Commit

Permalink
Merge pull request #502 from YoeDistro/kraj/master
Browse files Browse the repository at this point in the history
Fix updater for sama5d27
  • Loading branch information
cbrake authored Nov 23, 2020
2 parents 65df7e0 + 18d7162 commit 704634b
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 471 deletions.
2 changes: 0 additions & 2 deletions conf/site.conf
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ INITRAMFS_IMAGE_qemuall = ""
IMAGE_BOOT_FILES_remove = "${@bb.utils.contains('INITRAMFS_IMAGE_BUNDLE', '1', '${KERNEL_IMAGETYPE}', '', d)}"
IMAGE_BOOT_FILES_append = "${@bb.utils.contains('INITRAMFS_IMAGE_BUNDLE', '1', ' ${KERNEL_IMAGETYPE}-initramfs-${MACHINE}.bin;${KERNEL_IMAGETYPE}', '', d)}"

WKS_FILE_sama5d27-som1-ek-sd = "yoe-sdimage.wks"

IMG_VERSION = "0.0.1"
#####################################################################
# add project specific configuration below this line
Expand Down
2 changes: 1 addition & 1 deletion sama5d27-som1-ek-sd-envsetup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,5 +122,5 @@ yoe_sam_install_bootstrap_files() {

cp ${OE_DEPLOY_DIR}/zImage-initramfs-${MACHINE}.bin $1/zImage
cp ${OE_DEPLOY_DIR}/at91-sama5d27_som1_ek.dtb $1
cp ${OE_BASE}/images/${MACHINE}_${IMG_VERSION}.upd $1
cp ${OE_BASE}/deploy/${MACHINE}_${IMG_VERSION}.upd $1
}
13 changes: 8 additions & 5 deletions sources/meta-yoe/recipes-core/images/machines/beaglebone.inc
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ UPDATE_IMAGES = "version.txt ${BOOTLOADER_ARTEFACTS} ${KERNEL_ARTEFACTS} ${ROOTF

do_updater() {
echo "IMG_VERSION = ${IMG_VERSION}"
install -d ${TOPDIR}/deploy
cd ${TOPDIR}/deploy
rm -rf ${TOPDIR}/deploy/${MACHINE}
install -d ${TOPDIR}/deploy/${MACHINE}
OLDPWD="$PWD"
cd ${TOPDIR}/deploy/${MACHINE}
echo "${IMG_VERSION}" > version.txt
install ${DEPLOY_DIR_IMAGE}/yoe-installer-image-${MACHINE}.wic.xz ${MACHINE}_${IMG_VERSION}.wic.xz
install ${DEPLOY_DIR_IMAGE}/yoe-installer-image-${MACHINE}.wic.bmap ${MACHINE}_${IMG_VERSION}.wic.bmap
install ${DEPLOY_DIR_IMAGE}/${IMAGE_BASENAME}-${MACHINE}.tar.xz ${ROOTFS_ARTEFACTS}
for f in ${KERNEL_ARTEFACTS} ${BOOTLOADER_ARTEFACTS}
do
Expand All @@ -42,6 +42,9 @@ do_updater() {
sha256sum ${UPDATE_IMAGES} > update.sha256
rm -rf ${TOPDIR}/deploy/${UPDATE_IMAGE_NAME}_${IMG_VERSION}.upd
ls ${UPDATE_IMAGES_} | cpio -ov -H newc > ${TOPDIR}/deploy/${UPDATE_IMAGE_NAME}_${IMG_VERSION}.upd
rm -rf ${UPDATE_IMAGES_}
install ${DEPLOY_DIR_IMAGE}/yoe-installer-image-${MACHINE}.wic.xz ${TOPDIR}/deploy/${MACHINE}_${IMG_VERSION}.wic.xz
install ${DEPLOY_DIR_IMAGE}/yoe-installer-image-${MACHINE}.wic.bmap ${TOPDIR}/deploy/${MACHINE}_${IMG_VERSION}.wic.bmap
cd ${OLDPWD}
rm -rf ${TOPDIR}/deploy/${MACHINE}
}

Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ UPDATE_IMAGES = "version.txt ${BOOTLOADER_ARTEFACTS} ${KERNEL_ARTEFACTS} ${DTBO_

do_updater() {
echo "IMG_VERSION = ${IMG_VERSION}"
install -d ${TOPDIR}/deploy
cd ${TOPDIR}/deploy
rm -rf ${TOPDIR}/deploy/${MACHINE}
install -d ${TOPDIR}/deploy/${MACHINE}
OLDPWD="$PWD"
cd ${TOPDIR}/deploy/${MACHINE}
echo "${IMG_VERSION}" > version.txt
install ${DEPLOY_DIR_IMAGE}/yoe-installer-image-${MACHINE}.wic.xz ${MACHINE}_${IMG_VERSION}.wic.xz
install ${DEPLOY_DIR_IMAGE}/yoe-installer-image-${MACHINE}.wic.bmap ${MACHINE}_${IMG_VERSION}.wic.bmap
install ${DEPLOY_DIR_IMAGE}/${IMAGE_BASENAME}-${MACHINE}.tar.xz ${ROOTFS_ARTEFACTS}
for f in ${KERNEL_ARTEFACTS} ${BOOTLOADER_ARTEFACTS}
do
Expand All @@ -63,5 +63,8 @@ do_updater() {
sha256sum ${UPDATE_IMAGES} > update.sha256
rm -rf ${TOPDIR}/deploy/${UPDATE_IMAGE_NAME}_${IMG_VERSION}.upd
ls ${UPDATE_IMAGES_} | cpio -ov -H newc > ${TOPDIR}/deploy/${UPDATE_IMAGE_NAME}_${IMG_VERSION}.upd
rm -rf ${UPDATE_IMAGES_}
install ${DEPLOY_DIR_IMAGE}/yoe-installer-image-${MACHINE}.wic.xz ${MACHINE}_${IMG_VERSION}.wic.xz
install ${DEPLOY_DIR_IMAGE}/yoe-installer-image-${MACHINE}.wic.bmap ${MACHINE}_${IMG_VERSION}.wic.bmap
cd ${OLDPWD}
rm -rf ${TOPDIR}/deploy/${MACHINE}
}
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ do_updater() {
echo "IMG_VERSION = ${IMG_VERSION}"
rm -rf ${TOPDIR}/deploy/${MACHINE}
install -d ${TOPDIR}/deploy/${MACHINE}
OLDPWD="$PWD"
cd ${TOPDIR}/deploy/${MACHINE}
echo "${IMG_VERSION}" > version.txt
# rootfs
Expand Down Expand Up @@ -103,5 +104,6 @@ do_updater() {
ls ${UPDATE_IMAGES_} | cpio -ov -H newc > ${TOPDIR}/deploy/${UPDATE_IMAGE_NAME}_${IMG_VERSION}.upd
install ${DEPLOY_DIR_IMAGE}/yoe-installer-image-${MACHINE}.wic.xz ${TOPDIR}/deploy/${MACHINE}_${IMG_VERSION}.wic.xz
install ${DEPLOY_DIR_IMAGE}/yoe-installer-image-${MACHINE}.wic.bmap ${TOPDIR}/deploy/${MACHINE}_${IMG_VERSION}.wic.bmap
cd ${OLDPWD}
rm -rf ${TOPDIR}/deploy/${MACHINE}
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ do_updater() {
echo "IMG_VERSION = ${IMG_VERSION}"
rm -rf ${TOPDIR}/deploy/${MACHINE}
install -d ${TOPDIR}/deploy/${MACHINE}
OLDPWD="$PWD"
cd ${TOPDIR}/deploy/${MACHINE}
echo "${IMG_VERSION}" > version.txt
# rootfs
Expand Down Expand Up @@ -97,5 +98,6 @@ do_updater() {
ls ${UPDATE_IMAGES_} | cpio -ov -H newc > ${TOPDIR}/deploy/${UPDATE_IMAGE_NAME}_${IMG_VERSION}.upd
install ${DEPLOY_DIR_IMAGE}/yoe-installer-image-${MACHINE}.wic.xz ${TOPDIR}/deploy/${MACHINE}_${IMG_VERSION}.wic.xz
install ${DEPLOY_DIR_IMAGE}/yoe-installer-image-${MACHINE}.wic.bmap ${TOPDIR}/deploy/${MACHINE}_${IMG_VERSION}.wic.bmap
cd ${OLDPWD}
rm -rf ${TOPDIR}/deploy/${MACHINE}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
UPDATE_IMAGES ?= "\
version.txt \
u-boot.bin \
uboot.env \
BOOT.BIN \
zImage \
at91-sama5d27_som1_ek.dtb \
Expand All @@ -9,17 +10,21 @@ UPDATE_IMAGES ?= "\

do_updater () {
echo "IMG_VERSION = ${IMG_VERSION}"
install -d ${TOPDIR}/deploy
cd ${TOPDIR}/deploy
rm -rf ${TOPDIR}/deploy/${MACHINE}
install -d ${TOPDIR}/deploy/${MACHINE}
cd ${TOPDIR}/deploy/${MACHINE}
echo "${IMG_VERSION}" > version.txt
install ${DEPLOY_DIR_IMAGE}/${IMAGE_BASENAME}-${MACHINE}.wic.xz ${MACHINE}_${IMG_VERSION}.wic.xz
install ${DEPLOY_DIR_IMAGE}/${IMAGE_BASENAME}-${MACHINE}.tar.xz rootfs.tar.xz
install ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE} zImage
install ${DEPLOY_DIR_IMAGE}/at91-sama5d27_som1_ek.dtb at91-sama5d27_som1_ek.dtb
install ${DEPLOY_DIR_IMAGE}/BOOT.BIN BOOT.BIN
install ${DEPLOY_DIR_IMAGE}/u-boot.bin u-boot.bin
install ${DEPLOY_DIR_IMAGE}/uboot.env uboot.env
sha256sum ${UPDATE_IMAGES} > update.sha256
rm -rf ${TOPDIR}/deploy/${UPDATE_IMAGE_NAME}_${IMG_VERSION}.upd
ls ${UPDATE_IMAGES_} | cpio -ov -H newc > ${TOPDIR}/deploy/${UPDATE_IMAGE_NAME}_${IMG_VERSION}.upd
rm -rf ${UPDATE_IMAGES_}
install ${DEPLOY_DIR_IMAGE}/yoe-installer-image-${MACHINE}.wic.xz ${TOPDIR}/deploy/${MACHINE}_${IMG_VERSION}.wic.xz
install ${DEPLOY_DIR_IMAGE}/yoe-installer-image-${MACHINE}.wic.bmap ${TOPDIR}/deploy/${MACHINE}_${IMG_VERSION}.wic.bmap
cd ${OLDPWD}
rm -rf ${TOPDIR}/deploy/${MACHINE}
}
Loading

0 comments on commit 704634b

Please sign in to comment.