Firefly开源社区

12
发表新贴
打印 上一主题 下一主题

[技术讨论] roc-rk3566-pc-buildroot.mk固件打包错误

30

积分

0

威望

0

贡献

技术小白

积分
30
发表于 2022-9-28 17:58:47        只看该作者  11#
Liuth 发表于 2022-9-28 17:53
那就是你修改了device/rockchip里的分区表rk356x/parameter-buildroot-fit.txt导致的

您好, 我并没有修改这分区的内存, ./build.sh 编译之后默认的.
FIRMWARE_VER: 1.0
MACHINE_MODEL: RK3568
MACHINE_ID: 007
MANUFACTURER: RK3568
MAGIC: 0x5041524B
ATAG: 0x00200800
MACHINE: 0xffffffff
CHECK_MASK: 0x80
PWR_HLD: 0,0,A,0,1
TYPE: GPT
CMDLINE: mtdparts=rk29xxnand:0x00002000@0x00004000(uboot),0x00002000@0x00006000(misc),0x00040000@0x00008000(boot:bootable),0x00020000@0x00048000(recovery),0x00010000@0x00068000(backup),0x00040000@0x00078000(oem),0x18ac00@0x000b8000(rootfs),-@0x242c00(userdata:grow)
uuid:rootfs=614e0000-0000-4b53-8000-1d28000054a9
回复

使用道具 举报

2129

积分

20

威望

24

贡献

中级创客

Rank: 4

积分
2129
发表于 2022-9-29 09:15:52        只看该作者  12#
本帖最后由 Liuth 于 2022-9-29 09:17 编辑

git reset --hard HEAD还原回去,然后再编译试试
回复

使用道具 举报

1306

积分

0

威望

0

贡献

中级创客

Rank: 4

积分
1306
发表于 2022-9-29 10:00:24        只看该作者  13#
执行 ./mkfirmware.sh 链接文件;
看下有没有 userdata.img,ls -l rockdev/
回复

使用道具 举报

30

积分

0

威望

0

贡献

技术小白

积分
30
发表于 2022-9-29 13:29:51        只看该作者  14#
时间的蝴蝶 发表于 2022-9-29 10:00
执行 ./mkfirmware.sh 链接文件;
看下有没有 userdata.img,ls -l rockdev/

./mkfirmware.sh
/usr/bin/fakeroot
Source buildroot/build/envsetup.sh
Top of tree: /home2/yh11000/3566-linux-sdk/rk356x_linux_release_20211019
===========================================

#TARGET_BOARD=rk3568
#OUTPUT_DIR=output/rockchip_rk3568
#CONFIG=rockchip_rk3568_defconfig

===========================================
make: Entering directory '/home2/yh11000/3566-linux-sdk/rk356x_linux_release_20211019/buildroot'
  GEN     /home2/yh11000/3566-linux-sdk/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/Makefile
/home2/yh11000/3566-linux-sdk/rk356x_linux_release_20211019/buildroot/build/defconfig_hook.py -m /home2/yh11000/3566-linux-sdk/rk356x_linux_release_20211019/buildroot/configs/rockchip_rk3568_defconfig /home2/yh11000/3566-linux-sdk/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/.rockchipconfig
BR2_DEFCONFIG='' KCONFIG_AUTOCONFIG=/home2/yh11000/3566-linux-sdk/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/build/buildroot-config/auto.conf KCONFIG_AUTOHEADER=/home2/yh11000/3566-linux-sdk/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/build/buildroot-config/autoconf.h KCONFIG_TRISTATE=/home2/yh11000/3566-linux-sdk/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/build/buildroot-config/tristate.config BR2_CONFIG=/home2/yh11000/3566-linux-sdk/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/.config HOST_GCC_VERSION="6" BUILD_DIR=/home2/yh11000/3566-linux-sdk/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/build SKIP_LEGACY= BR2_DEFCONFIG=/home2/yh11000/3566-linux-sdk/rk356x_linux_release_20211019/buildroot/configs/rockchip_rk3568_defconfig /home2/yh11000/3566-linux-sdk/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/build/buildroot-config/conf --defconfig=/home2/yh11000/3566-linux-sdk/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/.rockchipconfig Config.in
/home2/yh11000/3566-linux-sdk/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/.rockchipconfig:285:warning: override: reassigning to symbol BR2_PACKAGE_ROCKCHIP_MPP
/home2/yh11000/3566-linux-sdk/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/.rockchipconfig:286:warning: override: reassigning to symbol BR2_PACKAGE_ROCKCHIP_MPP_ALLOCATOR_DRM
/home2/yh11000/3566-linux-sdk/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/.rockchipconfig:288:warning: override: reassigning to symbol BR2_PACKAGE_ROCKCHIP_RGA
/home2/yh11000/3566-linux-sdk/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/.rockchipconfig:313:warning: override: reassigning to symbol BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_RTP
/home2/yh11000/3566-linux-sdk/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/.rockchipconfig:314:warning: override: reassigning to symbol BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_RTPMANAGER
/home2/yh11000/3566-linux-sdk/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/.rockchipconfig:315:warning: override: reassigning to symbol BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_RTSP
/home2/yh11000/3566-linux-sdk/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/.rockchipconfig:321:warning: override: reassigning to symbol BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VIDEORATE
/home2/yh11000/3566-linux-sdk/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/.rockchipconfig:322:warning: override: reassigning to symbol BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VORBIS
/home2/yh11000/3566-linux-sdk/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/.rockchipconfig:323:warning: override: reassigning to symbol BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_OGG
/home2/yh11000/3566-linux-sdk/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/.rockchipconfig:326:warning: override: reassigning to symbol BR2_PACKAGE_BLUEZ5_UTILS
/home2/yh11000/3566-linux-sdk/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/.rockchipconfig:345:warning: override: reassigning to symbol BR2_PACKAGE_ROCKCHIP_TEST
/home2/yh11000/3566-linux-sdk/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/.rockchipconfig:348:warning: override: reassigning to symbol BR2_PACKAGE_RKWIFIBT
#
# configuration written to /home2/yh11000/3566-linux-sdk/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/.config
#
make: Leaving directory '/home2/yh11000/3566-linux-sdk/rk356x_linux_release_20211019/buildroot'
Linking parameter.txt from /home2/yh11000/3566-linux-sdk/rk356x_linux_release_20211019/device/rockchip/rk356x/parameter-buildroot-fit.txt...
Done linking parameter.txt
Linking uboot.img from /home2/yh11000/3566-linux-sdk/rk356x_linux_release_20211019/u-boot/uboot.img...
./mkfirmware.sh: line 98: "4194304" / 1024 : syntax error: operand expected (error token is ""4194304" / 1024 ")
Linking MiniLoaderAll.bin from /home2/yh11000/3566-linux-sdk/rk356x_linux_release_20211019/u-boot/rk356x_spl_loader_v1.13.112.bin...
Done linking MiniLoaderAll.bin
Linking boot.img from /home2/yh11000/3566-linux-sdk/rk356x_linux_release_20211019/kernel/extboot.img...
./mkfirmware.sh: line 98: "134217728" / 1024 : syntax error: operand expected (error token is ""134217728" / 1024 ")
Linking recovery.img from /home2/yh11000/3566-linux-sdk/rk356x_linux_release_20211019/buildroot/output/rockchip_rk356x_recovery/images/recovery.img...
./mkfirmware.sh: line 98: "33886208" / 1024 : syntax error: operand expected (error token is ""33886208" / 1024 ")
Linking misc.img from /home2/yh11000/3566-linux-sdk/rk356x_linux_release_20211019/device/rockchip/rockimg/misc.img...
Fallback to /home2/yh11000/3566-linux-sdk/rk356x_linux_release_20211019/device/rockchip/rockimg/wipe_all-misc.img
./mkfirmware.sh: line 98: "49152" / 1024 : syntax error: operand expected (error token is ""49152" / 1024 ")
Linking rootfs.img from /home2/yh11000/3566-linux-sdk/rk356x_linux_release_20211019/rockdev/rootfs.ext4...
./mkfirmware.sh: line 98: "54" / 1024 : syntax error: operand expected (error token is ""54" / 1024 ")
Packing oem.img from /home2/yh11000/3566-linux-sdk/rk356x_linux_release_20211019/device/rockchip/oem/oem_normal...
Making /home2/yh11000/3566-linux-sdk/rk356x_linux_release_20211019/rockdev/oem.img from /home2/yh11000/3566-linux-sdk/rk356x_linux_release_20211019/device/rockchip/oem/oem_normal (auto sized)
Making /home2/yh11000/3566-linux-sdk/rk356x_linux_release_20211019/rockdev/oem.img from /home2/yh11000/3566-linux-sdk/rk356x_linux_release_20211019/device/rockchip/oem/oem_normal with size(17056KB)
mke2fs 1.46.5 (30-Dec-2021)
Discarding device blocks: done
Creating filesystem with 17056 1k blocks and 4272 inodes
Filesystem UUID: 828f00e9-b624-40c7-ac37-100e9d4d9875
Superblock backups stored on blocks:
        8193

Allocating group tables: done
Writing inode tables: done
Copying files into the device: done
Writing superblocks and filesystem accounting information: done

tune2fs 1.46.5 (30-Dec-2021)
Setting maximal mount count to -1
Setting interval between checks to 0 seconds
./mkfirmware.sh: line 98: "17465344" / 1024 : syntax error: operand expected (error token is ""17465344" / 1024 ")
Images in /home2/yh11000/3566-linux-sdk/rk356x_linux_release_20211019/rockdev are ready!


ls -l rockdev/
total 954996
lrwxrwxrwx 1 yh11000 yh11000        21 Sep 29 13:27 boot.img -> ../kernel/extboot.img
lrwxrwxrwx 1 yh11000 yh11000        41 Sep 29 13:27 MiniLoaderAll.bin -> ../u-boot/rk356x_spl_loader_v1.13.112.bin
lrwxrwxrwx 1 yh11000 yh11000        44 Sep 29 13:27 misc.img -> ../device/rockchip/rockimg/wipe_all-misc.img
-rw-rw-r-- 1 yh11000 yh11000  17465344 Sep 29 13:27 oem.img
drwxrwxr-x 2 yh11000 yh11000      4096 Sep 28 15:08 pack
lrwxrwxrwx 1 yh11000 yh11000        53 Sep 29 13:27 parameter.txt -> ../device/rockchip/rk356x/parameter-buildroot-fit.txt
lrwxrwxrwx 1 yh11000 yh11000        64 Sep 29 13:27 recovery.img -> ../buildroot/output/rockchip_rk356x_recovery/images/recovery.img
lrwxrwxrwx 1 yh11000 yh11000        54 Sep 29 11:57 rootfs.ext4 -> ../buildroot/output/rockchip_rk3568/images/rootfs.ext2
lrwxrwxrwx 1 yh11000 yh11000        54 Sep 29 13:27 rootfs.img -> ../buildroot/output/rockchip_rk3568/images/rootfs.ext2
lrwxrwxrwx 1 yh11000 yh11000        19 Sep 29 13:27 uboot.img -> ../u-boot/uboot.img
-rw-rw-r-- 1 yh11000 yh11000 965449728 Sep 29 12:39 update.img

您好, 没有 userdata.img 文件

回复

使用道具 举报

30

积分

0

威望

0

贡献

技术小白

积分
30
发表于 2022-9-29 13:35:09        只看该作者  15#
本帖最后由 向朗向明朗 于 2022-9-29 13:53 编辑
Liuth 发表于 2022-9-29 09:15
git reset --hard HEAD还原回去,然后再编译试试

您好, 重新编译好多次了, 还是不行, 一样的问题
回复

使用道具 举报

1306

积分

0

威望

0

贡献

中级创客

Rank: 4

积分
1306
发表于 2022-9-29 14:52:40        只看该作者  16#
向朗向明朗 发表于 2022-9-29 13:29
./mkfirmware.sh
/usr/bin/fakeroot
Source buildroot/build/envsetup.sh

按下面,把 device/rockchip/common/mkfirmware.sh 的 PART_SIZE  这行改掉,再按之前的操作。

diff --git a/common/mkfirmware.sh b/common/mkfirmware.sh
index 9cde466..7f5113d 100755
--- a/common/mkfirmware.sh
+++ b/common/mkfirmware.sh
@@ -85,7 +85,7 @@ assert_size() {

     IMG_SIZE=$(stat -c "%s" "$IMG")

-    if [ $PART_SIZE -lt $(( "$IMG_SIZE" / 1024 )) ]; then
+    if [ $PART_SIZE -lt $(( $IMG_SIZE / 1024 )) ]; then
         fatal "error: $IMG's size exceed parameter.txt's limit!"
     fi
}
回复

使用道具 举报

30

积分

0

威望

0

贡献

技术小白

积分
30
发表于 2022-9-29 15:14:32        只看该作者  17#
时间的蝴蝶 发表于 2022-9-29 14:52
按下面,把 device/rockchip/common/mkfirmware.sh 的 PART_SIZE  这行改掉,再按之前的操作。

diff - ...

谢谢谢谢, 编过了, 感谢两位前辈的帮助   谢谢
回复

使用道具 举报

2129

积分

20

威望

24

贡献

中级创客

Rank: 4

积分
2129
发表于 2022-9-29 19:44:41        只看该作者  18#
向朗向明朗 发表于 2022-9-29 15:14
谢谢谢谢, 编过了, 感谢两位前辈的帮助   谢谢

这个问题在ubuntu18上应该不会出现,所以你是在ubuntu16上编译的吧
维基里说了推荐ubuntu18,用别的就会出现这种奇奇怪怪的问题
下次要记得按照维基推荐来部署环境
回复

使用道具 举报

30

积分

0

威望

0

贡献

技术小白

积分
30
发表于 2022-9-30 11:08:29        只看该作者  19#
Liuth 发表于 2022-9-29 19:44
这个问题在ubuntu18上应该不会出现,所以你是在ubuntu16上编译的吧
维基里说了推荐ubuntu18,用别的就会 ...

是的   确实是部署的环境有问题, 谢谢指点
回复

使用道具 举报

返回列表
12
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表