Forum Discussion
Altera_Forum
Honored Contributor
20 years ago --- Quote Start --- originally posted by jdhar@Nov 30 2005, 03:32 AM ok, so here's some other news... i got buildroot to build with the flags you told me to set. let me see if i understand this much:
- buildroot generates a toolchain which is basically similar to the toolchain i was using off the nios ii linux cd, however, this is nios2-linux-uclibc... and the other was nios2-elf-gcc...?? --- Quote End --- Yes, they are the same compiler. Only the default link library differ. <div class='quotetop'>QUOTE </div> --- Quote Start --- - I can use either to build the kernel the same way I have been doing, it's just I guess the buildroot toolchain requires an extra step to convert the vmlinux file to a .bin file that can be downloaded???[/b] --- Quote End --- Yes, you can use either. You can convert a vmlinux, which is an ELF format , to binary for programming the flash with the objcopy command.
nios2-linux-uclibc-objcopy -O binary vmlinux vmlinux.bin <div class='quotetop'>QUOTE </div> --- Quote Start --- - /buildroot/build_nios2/root <-- this is the root filesystem that I will want initramfs to use??[/b] --- Quote End --- Yes, you should copy them to another place to be used as your root fs. Remove usr/include usr/lib to save space. <div class='quotetop'>QUOTE </div> --- Quote Start --- - I should use busybox and set the target to /buildroot/build_nios2/root so it can populate it with applications??[/b] --- Quote End --- Yes, "make install" will populate it. <div class='quotetop'>QUOTE </div> --- Quote Start --- - Now busybox requires uclibc... is that something I have to download again, because buildroot already used it, didn't it? Do I have to setup the environment somehow to know where uclibc is??[/b] --- Quote End --- The buildroot builds the uclibc already. So you don't have to download again. If you use marc's patch, update Makefile,Rules.mak, seach barco and change to your staging_dir. If you use examples///busybox, and the following three line to the beginning of Rules.mak . STAGING_DIR = /usr/local/src/buildroot/build_nios2/staging_dir
UCLIBC_PLUGIN = $(STAGING_DIR)
APP_PLUGIN = $(STAGING_DIR) And in staging_dir , add symlink scripts --> lib, in staging_dir/bin, add symlink elf2flt --> nios2-linux-uclibc-elf2flt . Note, you must prepare a initial .config for busybox before menuconfig. <div class='quotetop'>QUOTE </div> --- Quote Start --- One thing I don't understand is how the nodes in /dev are created since it doesn't seem that busybox does that, or buildroot...[/b] --- Quote End --- Either use "mknod" to create them, or copy them from your Linux host. cp -a /dev/zero /dev/null /dev/console rootfs/dev