> ## Content Index
> Fetch the complete content index at: https://sgpublic.xyz/llms.txt
> Use this file to discover other available public pages before exploring further.

# cp: cannot stat './staging_dir/target-x86_64_musl/root-x86/boot/.': No such file or directory
- URL: https://sgpublic.xyz/p/2025/03/6aac9cb1810a48000153360b/
- Published: 2025-03-10T08:11:45.000Z
- Updated: 2025-03-10T08:11:45.000Z
- Author: Haven Madray
- Tags: 网络与路由, OpenWrt, #wp-post

今天编译 OpenWrt 的时候遇到以下报错：

```
...
cp: cannot stat '/tmp/openwrt/staging_dir/target-x86_64_musl/root-x86/boot/.': No such file or directory
...
```

然后编译停止，检查目录里确实没有这个文件夹。经过网上冲浪发现答案：[https://github.com/coolsnowwolf/lede/issues/10323#issuecomment-1294942809](https://github.com/coolsnowwolf/lede/issues/10323?ref=sgpublic.xyz#issuecomment-1294942809)

修改以下两项配置，把数值设置大一点：

```
# 修改分区大小
CONFIG_TARGET_KERNEL_PARTSIZE=512
CONFIG_TARGET_ROOTFS_PARTSIZE=1024
```

再次编译则成功。