how to rebuild rootfs in buildroot

醉酒当歌 提交于 2019-11-30 20:01:18

The make command build all targets

You do not want to do that (until Buildroot is configured).
You first need to configure Buildroot by specifying the target board.
Per the manual you can start from scratch, or create a Buildroot config file for your AT91SAM9X25 board derived from a similar board such as configs/at91sam9g20dfc_defconfig

Besides the Buildroot config file, you will also need a Linux kernel config file (unless you want to try configuring the kernel from scratch).
The kernel config file for Atmel's eval board with a AT91SAM9x5 is at91sam9x5ek_defconfig

You should also read section 3.4.2. Creating your own board support

So the first my question is: Is there some way to remake rootfs without building toolchain? It takes a lot of time.

The answer depends on how you define "remake rootfs". If you delete the directory output/images/, then the files of the rootfs are rewritten.
If you delete directories in output/build/, then those packages or subsystems are recompiled from source.

If you configure Buildroot to use your own or an external tool chain, then make clean would not remove them. If you configure Buildroot to install the toolchain it builds outside of its directory, then it may leave it alone during a make clean.

Of course the Buildroot make is smart enough to know what has changed since the last build and what has to be recompiled.
It should be the rare case that you need to delete directories in output/build/ to force recompilation.

So the second question is: How to build linux within buildroot if I want to use Initial RAM filesystem?

You need to properly configure both Buildroot and the Linux kernel.

make menuconfig
    Filesystem images --->
make linux-menuconfig
    General setup --->
make

More concise information on using Buildroot for AT91SAM9x5 is this Linx4SAM page

Possibly are there more efficient alternatives than buildroot?

There are other tools such as Open Embedded, but describing them as "more efficient" is subjective.


ADDENDUM

how to rebuild rootfs in buildroot

To force the rootfs to be rebuilt (in this case an initramfs) delete three hidden files in the output/build/linux-x.xx.xx directory

    .stamp_images_installed
    .stamp_initramfs_rebuilt
    .stamp_target_installed

Rebuild rootfs in buildroot

  1. View dependencies : make show-targets eg : rootfs-cpio rootfs-tar rootfs-ubi rootfs-ubifs
  2. make rootfs-ubi rebuild // Buildroot will rebuild rootfs-ubi
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!