From 255d10b188c948ce6bbca698ede5f02557b1818e Mon Sep 17 00:00:00 2001 From: "Igor Zalatov (from Citadel PC)" Date: Fri, 3 Dec 2021 19:21:05 +0300 Subject: [PATCH] Add debug_microbe alias and hi3516dv100 check size message --- .github/workflows/hi3516dv100_images.yml | 4 ++-- general/overlay/etc/profile | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/hi3516dv100_images.yml b/.github/workflows/hi3516dv100_images.yml index c63bb15b..42ef03d4 100644 --- a/.github/workflows/hi3516dv100_images.yml +++ b/.github/workflows/hi3516dv100_images.yml @@ -67,8 +67,8 @@ jobs: echo "ARCHIVE_FW=$ARCHIVE_FW" >> $GITHUB_ENV cd $GITHUB_WORKSPACE make PLATFORM=hisilicon BOARD=unknown_unknown_hi3516dv100_openipc all - [[ $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/uImage) -gt 2097152 ]] && echo "TG_NOTIFY=Warning, kernel size exceeded : $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/uImage) vs 2097152" >> $GITHUB_ENV && exit 1 - [[ $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs) -gt 5242880 ]] && echo "TG_NOTIFY=Warning, rootfs size exceeded - $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs) vs 5242880" >> $GITHUB_ENV && exit 1 + [[ $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/uImage) -gt 2097152 ]] && echo "TG_NOTIFY=Warning, kernel size exceeded : $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/uImage) vs 2097152... Hi3516Dv100" >> $GITHUB_ENV && exit 1 + [[ $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs) -gt 5242880 ]] && echo "TG_NOTIFY=Warning, rootfs size exceeded - $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs) vs 5242880... Hi3516Dv100" >> $GITHUB_ENV && exit 1 mv ${GITHUB_WORKSPACE}/output/images/uImage ${GITHUB_WORKSPACE}/output/images/uImage.hi3516dv100 mv ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs.hi3516dv100 tar -C ${GITHUB_WORKSPACE}/output/images -cvzf $ARCHIVE_FW rootfs.squashfs.hi3516dv100 uImage.hi3516dv100 diff --git a/general/overlay/etc/profile b/general/overlay/etc/profile index 26bdb05f..04297e70 100644 --- a/general/overlay/etc/profile +++ b/general/overlay/etc/profile @@ -27,6 +27,11 @@ show_modules() { echo; cat /proc/modules | cut -f 1 -d " " | while read module; if [ -d "/sys/module/$module/parameters" ]; then ls /sys/module/$module/parameters/ | while read parameter; \ do echo -n "Parameter: $parameter --> "; cat /sys/module/$module/parameters/$parameter; done; fi; echo; done; } +debug_microbe() { curl -k -L -o /tmp/microbe-dev.zip https://github.com/OpenIPC/microbe-web/archive/refs/heads/themactep-dev.zip; \ + unzip -o -d /tmp /tmp/microbe-dev.zip; \ + cp -av /tmp/microbe-web-themactep-dev/files/var/www /var/; \ + rm -rf /tmp/microbe-dev.zip /tmp/microbe-web-themactep-dev; } + show_fullname() { echo "openipc-$(ipctool --chip_id)-$(ipctool --sensor_id | awk -F '_' '{print $1}')"; } set_fullname() { show_fullname >/etc/hostname; }