Buildroot FAQ
What are the prerequisites to use jffs2 root filesystem?
A: You should enable the following kernel config
Memory Technology Device (MTD) support
|
+--MTD partitioning support
Command line partition table parsing
NAND Device Support
|
+--Support for NAND Flash / SmartMedia on AT91
ECC management for NAND Flash / SmartMedia on AT91 (Software ECC)
File systems
|
+--Miscellaneous filesystems
|
+--Journalling Flash File System v2 (JFFS2) support
Set the variable
bootargs to pass Linux kernel boot argument "command line" in u-boot:
setenv bootargs 'mem=64M console=ttyS0,115200 root=/dev/name_of_block_device rw rootfstype=jffs2'
What are the prerequisites to use cramfs root filesystem?
A: You should enable the following kernel config
File systems
|
+--Miscellaneous filesystems
|
+--Compressed ROM file system support (cramfs)
Set the variable
bootargs to pass Linux kernel boot argument "command line" in u-boot:
setenv bootargs 'mem=64M console=ttyS0,115200 initrd=0x21100000,17000000 ramdisk_size=15360 root=/dev/ram0'
What are the prerequisites to use ext2 root filesystem?
A: You should enable the following kernel config
File systems
|
+--Second extended fs support
Set the
variable bootargs to pass Linux kernel boot argument "command line" in u-boot:
setenv bootargs 'mem=64M console=ttyS0,115200 root=/dev/name_of_block_device rw rootfstype=ext2'
Buildroot throws out an error "Undefined reference to `crc32_table'", what happened?
A: When compiling mkfs.jffs2, you may encounter errors about undefined reference to crc32_table.
The error message is something like:
mtd_orig/crc32.h:15: undefined reference to 'crc32_table'
mtd_orig/crc32.h:15: undefined reference to 'crc32_table'
mtd_orig/crc32.h:15: undefined reference to `crc32_table'
mtd_orig/crc32.h:15: undefined reference to `crc32_table'
mtd_orig/crc32.h:15: undefined reference to `crc32_table'
mkfs.jffs2.o: mtd_orig/crc32.h:15: more undefined references to `crc32_table' follow
mkfs.jffs2.o: In function `write_regular_file':
Solution is to delete the directory toolchain_build_arm_nofpu/mtd_orig and type make to continue the build process.
Why compiling makedevs.c produces an error: warn_unused_result
On certain host systems we meet the following error :
/usr/bin/gcc -Wall -Werror -O2 /opt/AT91SAM/buildroot-v23434/build_arm/makedevs/makedevs.c -o /opt/AT91SAM/buildroot-v23434/build_arm/makedevs/makedevs
cc1: warnings being treated as errors
/opt/AT91SAM/buildroot-v23434/build_arm/makedevs/makedevs.c: In function ‘main’:
/opt/AT91SAM/buildroot-v23434/build_arm/makedevs/makedevs.c:531: error: ignoring return value of ‘system’, declared with attribute warn_unused_result
make: *** [/opt/AT91SAM/buildroot-v23434/build_arm/makedevs/makedevs] Error 1
A: This is due to the -Werror option set to the compiler. You will have to modify the makedevs.c source code applying this patch :
--- buildroot.orig/target/makedevs/makedevs.c
+++ buildroot/target/makedevs/makedevs.c
@@ -528,7 +528,8 @@
}
fclose(table);
- system("/bin/sync");
+ if (system("/bin/sync"))
+ bb_error_msg("sync failed, continuing anyway");
return 0;
}
This change adds a simple warning if system() fails. The
system() return code is thus taken into account.
This modification is now included in newer version of Buildroot : see the
Buildroot SVN log
Failed to mount rootfs, system hangs when booting up, the error messages are something like: Freeing init memory: 104K, Kernel panic - not syncing: Attempted to kill init! What happened?
A: The most possible cause is you don't configure the Linux Kernel as EABI featured.
As the root file system is built with EABI option,
to keep consistency, you need to configure the kernel as follows:
Kernel Features
|
+--Use the ARM EABI to compile the kernel
Allow old ABI binaries to run with this kernel
Why does it take so long time to login?
A: When you use a rootfs of cramfs image, it may take a long time before you can enter the Shell and type "root" to log in.
You'll see the message:
Starting dropbear sshd: mkdir: cannot create directory '/etc/dropbear': Read-only file system
generating rsa key... generating dsa key... OK
It takes time to generate the keys, and the keys can't be stored because cramfs is read-only.
Every time the cramfs is mounted, the keys have to be generated again.
A better way is to use jffs2 image so that only for the first time the keys are generated and then they will be
stored in the rootfs.