I cannot proceed past the "make download" step, which fails. I've attached a log where it fails directly after a clean git clone, with V=sc: https://pastebin.com/TWMZ4y0h
My host environment is Ubuntu 22.04.4.
The important part of the failure seems to be this.
make[2]: Entering directory '/opt/openwrt/toolchain/kernel-headers'
WARNING: linux-.tar.xz is missing, please run make download before re-running this check
mkdir -p /opt/openwrt/dl
SHELL= flock /opt/openwrt/tmp/.linux-.tar.xz.flock -c ' /opt/openwrt/scripts/download.pl "/opt/openwrt/dl" "linux-.tar.xz" "x" "" "@KERNEL/linux/kernel/v.x" '
Cannot find appropriate hash command, ensure the provided hash is either a MD5 or SHA256 checksum.
make[2]: *** [Makefile:117: /opt/openwrt/dl/linux-.tar.xz] Error 255
make[2]: Leaving directory '/opt/openwrt/toolchain/kernel-headers'
time: toolchain/kernel-headers/download#0.02#0.01#0.04
ERROR: toolchain/kernel-headers failed to build.
make[1]: *** [toolchain/Makefile:93: toolchain/kernel-headers/download] Error 1
"linux-.tar.xz" seems to be generated by include/kernel.mk and put into LINUX_SOURCE. I cannot seem to figure out why LINUX_VERSION is unset (or better said, how is it supposed to reach there from include/kernel-version.mk, which is where it appears to be set).
I'm just trying to build the master branch of OpenWrt, without making any changes to it. That should use kernel 6.1 for the target I'm trying to build (armsr).
$ xz
xz: Compressed data cannot be written to a terminal
xz: Try `xz --help' for more information.
$ tar
tar: You must specify one of the '-Acdtrux', '--delete' or '--test-label' options
Try 'tar --help' or 'tar --usage' for more information.
$ sudo apt install build-essential clang flex bison g++ gawk \
gcc-multilib g++-multilib gettext git libncurses-dev libssl-dev \
python3-distutils rsync unzip zlib1g-dev file wget
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
clang is already the newest version (1:19.0-58~exp2+0~20240303091736.15~1.gbp3b61b3).
bison is already the newest version (2:3.8.2+dfsg-1build1).
build-essential is already the newest version (12.9ubuntu3).
flex is already the newest version (2.6.4-8build2).
g++ is already the newest version (4:11.2.0-1ubuntu1).
g++-multilib is already the newest version (4:11.2.0-1ubuntu1).
gcc-multilib is already the newest version (4:11.2.0-1ubuntu1).
gettext is already the newest version (0.21-4ubuntu4).
wget is already the newest version (1.21.2-2ubuntu1).
file is already the newest version (1:5.41-3ubuntu0.1).
gawk is already the newest version (1:5.1.0-1ubuntu0.1).
git is already the newest version (1:2.34.1-1ubuntu1.10).
libncurses-dev is already the newest version (6.3-2ubuntu0.1).
libssl-dev is already the newest version (3.0.2-0ubuntu1.15).
python3-distutils is already the newest version (3.10.8-1~22.04).
rsync is already the newest version (3.2.7-0ubuntu0.22.04.2).
unzip is already the newest version (6.0-26ubuntu3.2).
zlib1g-dev is already the newest version (1:1.2.11.dfsg-2ubuntu9.2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.4 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.4 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
There's a pastebin link in the initial post, which shows the verbose "make download" output already.
What packages did you select with menuconfig. You can run ./scripts/diffconfig.sh that gives you the diff of the config (which you can expand later with make defconfig. E.g: