Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ipq806x: bootcount: line 5: /lib/upgrade/asrock.sh: No such file or directory #9345

Closed
okibcn opened this issue Feb 26, 2022 · 2 comments
Closed
Labels
release/21.02 pull request/issue targeted (also) for OpenWrt 21.02 release target/ipq806x pull request/issue for ipq806x target

Comments

@okibcn
Copy link

okibcn commented Feb 26, 2022

When building the image for Netgear R7800 I am getting this error:

Finalizing root filesystem...
/home/oki/kk/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/root-ipq806x/etc/init.d/bootcount: line 5: /lib/upgrade/asrock.sh: No such file or directory
Enabling boot
./etc/init.d/bootcount: line 5: /lib/upgrade/asrock.sh: No such file or directory
Enabling bootcount

It is not happening for other targets, as I have tested the image for the Netgear R6020 (ramips)

at https://www.mail-archive.com/openwrt-devel@lists.openwrt.org/msg58508.html there is a proposed modification of bootcount that could solve the issue:

 START=99
 
-. /lib/upgrade/asrock.sh
+. "$IPKG_INSTROOT/lib/upgrade/asrock.sh"
 
 boot() {
        case $(board_name) in
        asrock,g10)
-               asrock_bootconfig_mangle "bootcheck"
-               if [ $? -eq 0 ]; then
-                       reboot
-               fi
+               asrock_bootconfig_mangle "bootcheck" && reboot
                ;;
@ynezz ynezz added release/21.02 pull request/issue targeted (also) for OpenWrt 21.02 release target/ipq806x pull request/issue for ipq806x target labels Feb 26, 2022
jow- pushed a commit that referenced this issue Feb 26, 2022
Fixes following error while executing the init script on the buildhost:

 Enabling boot
 ./etc/init.d/bootcount: line 5: /lib/upgrade/asrock.sh: No such file or directory
 Enabling bootcount

While at it fix following shellcheck issue:

 base-files/etc/init.d/bootcount line 11:
    if [ $? -eq 0 ]; then
         ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.

Fixes: #9345
Cc: Ansuel Smith <ansuelsmth@gmail.com>
Cc: Pawel Dembicki <paweldembicki@gmail.com>
Cc: Christian Lamparter <chunkeey@gmail.com>
Fixes: 98b8629 ("ipq806x: add support for ASRock G10")
References: https://gitlab.com/ynezz/openwrt/-/jobs/1243290743#L1444
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit ce8af0a)
@ynezz
Copy link
Member

ynezz commented Feb 26, 2022

Should be fixed, thank you for reporting it.

@okibcn
Copy link
Author

okibcn commented Feb 26, 2022

The error persists after the fix was applied, as the script /lib/upgrade/asrock.sh successfully executed now by bootcount has the same issue as bootcount script. No need to reopen this issue as I have created issue #9350 to take care of the problem inside /lib/upgrade/asrock.sh

ArtelMike pushed a commit to ArtelMike/openwrt-1 that referenced this issue Jan 31, 2023
Fixes following error while executing the init script on the buildhost:

 Enabling boot
 ./etc/init.d/bootcount: line 5: /lib/upgrade/asrock.sh: No such file or directory
 Enabling bootcount

While at it fix following shellcheck issue:

 base-files/etc/init.d/bootcount line 11:
    if [ $? -eq 0 ]; then
         ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.

Fixes: openwrt#9345
Cc: Ansuel Smith <ansuelsmth@gmail.com>
Cc: Pawel Dembicki <paweldembicki@gmail.com>
Cc: Christian Lamparter <chunkeey@gmail.com>
Fixes: af7148a ("ipq806x: add support for ASRock G10")
References: https://gitlab.com/ynezz/openwrt/-/jobs/1243290743#L1444
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit 6329520)
ohabu referenced this issue in ohabu/openwrt May 12, 2023
Fixes following error while executing the init script on the buildhost:

 Enabling boot
 ./etc/init.d/bootcount: line 5: /lib/upgrade/asrock.sh: No such file or directory
 Enabling bootcount

While at it fix following shellcheck issue:

 base-files/etc/init.d/bootcount line 11:
    if [ $? -eq 0 ]; then
         ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.

Fixes: #9345
Cc: Ansuel Smith <ansuelsmth@gmail.com>
Cc: Pawel Dembicki <paweldembicki@gmail.com>
Cc: Christian Lamparter <chunkeey@gmail.com>
Fixes: 98b8629 ("ipq806x: add support for ASRock G10")
References: https://gitlab.com/ynezz/openwrt/-/jobs/1243290743#L1444
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit ce8af0a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release/21.02 pull request/issue targeted (also) for OpenWrt 21.02 release target/ipq806x pull request/issue for ipq806x target
Projects
None yet
Development

No branches or pull requests

2 participants