openwrt / openwrt

This repository is a mirror of https://git.openwrt.org/openwrt/openwrt.git It is for reference only and is not active for check-ins. We will continue to accept Pull Requests here. They will be merged via staging trees then into openwrt.git.
Other
19.95k stars 10.37k forks source link

ipq806x: /lib/upgrade/asrock.sh: line 1: /lib/functions.sh: No such file or directory #9350

Closed okibcn closed 2 years ago

okibcn commented 2 years ago

When building the image for ipq806x - NETGEAR Nighthawk X4S 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/lib/upgrade/asrock.sh: line 1: /lib/functions.sh: No such file or directory
Enabling boot
/home/oki/kk/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/root-ipq806x/lib/upgrade/asrock.sh: line 1: /lib/functions.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) A similar issue was fixed in bootcount for this target in issue #9345.

This modification in file openwrt/openwrt/tree/master/target/linux/ipq806x/base-files/lib/upgrade/asrock.sh in the ipq806x target should fix the issue:

-. /lib/functions.sh
+. "$IPKG_INSTROOT/lib/functions.sh"

asrock_bootconfig_mangle() {
Ansuel commented 2 years ago

@ynezz i think both fix are wrong.... IPKG_INSTROOT is not present on a real system and is only present in the buildroot... We already fixed this for other script so let me check the correct fix.