gpt4 book ai didi

openwrt - OpenWRT buildroot中如何选择目标和其他功能?

转载 作者:行者123 更新时间:2023-12-02 17:06:24 30 4
gpt4 key购买 nike

我已经从 subversion 存储库成功克隆了 OpenWRT buildroot,并且我一直在使用它来构建在 Qemu 上运行的镜像。我可以在 Qemu 中运行图像。

现在我尝试为路由器(Linksys WRT54GL)构建一个镜像,但我在文档中找不到应该如何选择目标。

我猜这些是正确的选项:

  • 我选择了 Broadcom BCM947xx/953xx

  • 在“目标图像”中,我选择了jffs2和squashfs

然后,编译完成后,进入目录bin/brcm47xx,发现了大量的图片:

openwrt-brcm47xx-jffs2-128k.trx
openwrt-brcm47xx-jffs2-64k.trx
openwrt-brcm47xx-squashfs.trx
.
.
.
openwrt-wrt54g3g-em-jffs2.bin
openwrt-wrt54g3g-em-squashfs.bin
openwrt-wrt54g3g-jffs2.bin
openwrt-wrt54g3g-squashfs.bin
openwrt-wrt54g3gv2-vf-jffs2.bin
openwrt-wrt54g3gv2-vf-jffs2.noheader.bin
openwrt-wrt54g3gv2-vf-squashfs.bin
openwrt-wrt54g3gv2-vf-squashfs.noheader.bin
openwrt-wrt54g-jffs2.bin
openwrt-wrt54gs-jffs2.bin
openwrt-wrt54g-squashfs.bin
openwrt-wrt54gs-squashfs.bin
openwrt-wrt54gs_v4-jffs2.bin
openwrt-wrt54gs_v4-squashfs.bin
openwrt-wrt610n_v1-jffs2.bin
openwrt-wrt610n_v1-squashfs.bin
openwrt-wrtsl54gs-jffs2.bin
openwrt-wrtsl54gs-squashfs.bin

所以我的问题是:

  • 如何判断在目标系统目标图像中选择什么?

  • 从生成的所有图像中,我如何知道应该使用哪一个(例如,WRT54GL 不在上面的列表中;如何判断是否可以使用“openwrt-wrt54g- jffs2.bin”?

  • 我可以根据什么标准来决定使用 jffs 还是 squashfs 图像?

谢谢!

最佳答案

How do I tell what to choose in target system and target images?

目标系统您可以从硬件表中的目标/平台列推断:

http://wiki.openwrt.org/toh/start

目标镜像取决于构建的预期用途,但在大多数常见情况下(即放置在路由器上的镜像),您需要 squashfs jffs2。请参阅下面的文件系统链接。

<小时/>

From all the images generated, how do I know which one I should use (for example, the WRT54GL is not in the list above; how to tell if it's OK to use "openwrt-wrt54g-jffs2.bin"?

如果您的路由器未在自定义镜像中列出,您可能应该使用通用镜像,例如:openwrt-brcm47xx-squashfs.trx

<小时/>

What criteria can I use to decide if I'll use a jffs or a squashfs image?

来自http://wiki.openwrt.org/doc/techref/filesystems :

SquashFS

+ taking up as little space as possible

+ allowing the implementation of an idiot proof FailSafe for recovery, since it is not possible to write to it

- read only

- waste space, since each time a file contained on it is modified, actually a copy of it is being copied to the second (JFFS2) partition

JFFS

+ is writable, has journaling and wear leveling

+ is cool

- is compressed, so a program (opkg in particularly) cannot know in advance how much space a package will occupy

不要被只读部分误导

All of the OpenWrt firmwares include a fully writable root filesystem that will remain intact across a power outage. The confusion is due to the fact that squashfs is a readonly filesystem; all OpenWrt firmwares also include a jffs2 partition -- the squashfs part of the filename refers only to the filesystem included in the firmware image; additional files or changes are stored on jffs2.

  • The squashfs partition will always contain all of the files exactly as they came with the firmware; you cannot change these without reflashing. (see #6)
  • The jffs2 partition contains only your changes to the filesystem; since squashfs still contains the original version, you can easily revert files back to their original state.

It is possible to remove the squashfs partition by installing the jffs2 version of the firmware, but this isn't recommended -- it uses more space and lacks the above failsafe features.

来源:https://forum.openwrt.org/viewtopic.php?pid=36636#p36636

如果有疑问,请按照 http://wiki.openwrt.org/doc/howto/obtain.firmware.download#filesystem 使用 squashfs

关于openwrt - OpenWRT buildroot中如何选择目标和其他功能?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10814919/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com