Skip to contentSkip to conversation

Bootloaders

Buildroot Jason Valenzuela 2 participants 12 messages May 19, 2008 – May 21, 2008

lore
Share & tools
lore
#0 lore raw

Trying to get my first root fs ready to boot and I can't seem to get any of the bootloaders to compile.

Grub complains about not finding a specific patch on the debian ftp site.

syslinux complains while building to the tune of
"as: option '-alternate' doesn't allow an argument." This is the 'as' that is provided in my default i486 slackware host system.

U-boot dies with *** No rule to make target `_config'.

pxelinux I haven't tried as my target host isn't going to be on a network.

Am I missing something stupid?

Thanks,
Jason Valenzuela

#1 lore raw

Jason,

I am new to Buildroot as well. I have successfully created an x86 target with Grub as the bootloader. I was wondering if the error you're getting says something about not being able to resolve the debian ftp site? Are you able to even download grub from the correct repository first? I just want to know if it's a compiling problem or a problem with retrieving grub. If it's the latter than the problem lies within the actual Makefile, in that the repository is broken and you need to change the path for your development system to go grab it from.

I wish I could help with your U-boot problem, but for now I am struggling just to get an ARM build done so I can test it out on QEMU (an emulator which I can use to serve as my ARM bootloader). I will soon need to build u-boot as well so if anyone responds to your questions it would be helping me out as well in the future.

Quoted 13 lines · Jason Valenzuela

Trying to get my first root fs ready to boot and I can't seem to get any of the bootloaders to compile.

Grub complains about not finding a specific patch on the debian ftp site.

syslinux complains while building to the tune of
"as: option '-alternate' doesn't allow an argument." This is the 'as' that is provided in my default i486 slackware host system.

U-boot dies with *** No rule to make target `_config'.

pxelinux I haven't tried as my target host isn't going to be on a network.

Quoted 9 lines

Am I missing something stupid?

Thanks,
Jason Valenzuela
_______________________________________________
buildroot mailing list
buildroot at uclibc.org
http://busybox.net/mailman/listinfo/buildroot

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://busybox.net/lists/buildroot/attachments/20080519/7a216a5c/attachment.htm

#2 lore raw
Quoted 8 lines · Arun Reddy

I am new to Buildroot as well. I have successfully created an x86 target with Grub as the bootloader. I was wondering if the error you're getting says something about not being able to resolve the debian ftp site? Are you able to even download grub from the correct repository first? I just want to know if it's a compiling problem or a problem with retrieving grub. If it's the latter than the problem lies within the actual Makefile, in that the repository is broken and you need to change the path for your development system to go grab it from.

Ok so the buildroot make process it trying to pull a .diff from the debian site that doesn't exist. I found that this is a known problem in buildroot's bug tracking system. I tried two things, first I found the actual .diff elsewhere, downloaded it into the dl directory and tried a make. That crashes with complaints about uClibc being built without large file support. Enabling large file support in uClibc's make menuconfig also doesn't build.

Next I tried to modify the grub.mk so that it downloads a slightly newer .diff from the debian site. Was a real long shot and of course didn't work either.

So now I'm trying to simply build grub on my host system and see if I can go from there.

Jason Valenzuela

#3 lore raw

Jason,

I had the same problem with the build process breaking and complaining about uClibc not having LFS support. There are some things you need to make sure you do. First of all, go into your Buildroot .config and make sure the LFS flag is toggled (within the toolchain submenu). Now change the uClibc .config LFS flag, which you seem to have already done. Do a make clean in both the kernel and uClibc directories (to make sure any junk binaries are cleaned out before continuing the build), then go back to the buildroot directory and make. That should take care of the LFS problem.

As for the grub.mk modification, can you post the exact error you get with the debian site not being able to be resolved? I can cross reference that with my own grub.mk and see where I downloaded grub from.

Quoted 27 lines · Jason Valenzuela
Quoted 8 lines · Arun Reddy

I am new to Buildroot as well. I have successfully created an x86 target with Grub as the bootloader. I was wondering if the error you're getting says something about not being able to resolve the debian ftp site? Are you able to even download grub from the correct repository first? I just want to know if it's a compiling problem or a problem with retrieving grub. If it's the latter than the problem lies within the actual Makefile, in that the repository is broken and you need to change the path for your development system to go grab it from.

Ok so the buildroot make process it trying to pull a .diff from the debian site that doesn't exist. I found that this is a known problem in buildroot's bug tracking system. I tried two things, first I found the actual .diff elsewhere, downloaded it into the dl directory and tried a make. That crashes with complaints about uClibc being built without large file support. Enabling large file support in uClibc's make menuconfig also doesn't build.

Next I tried to modify the grub.mk so that it downloads a slightly newer .diff from the debian site. Was a real long shot and of course didn't work either.

So now I'm trying to simply build grub on my host system and see if I can go from there.

Quoted 6 lines

Jason Valenzuela
_______________________________________________
buildroot mailing list
buildroot at uclibc.org
http://busybox.net/mailman/listinfo/buildroot

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://busybox.net/lists/buildroot/attachments/20080520/cb665b33/attachment.htm

#4 lore raw

Excuse me, I meant to say, make sure you do a "make clean" in both uClibc and the main buildroot directory before doing continuing with "make" in your Buildroot directory. There is no need to do a make clean for the kernel since you didn't modify anything in it. Sorry about that.

Quoted 11 lines · Arun Reddy

Jason,

I had the same problem with the build process breaking and complaining about uClibc not having LFS support. There are some things you need to make sure you do. First of all, go into your Buildroot .config and make sure the LFS flag is toggled (within the toolchain submenu). Now change the uClibc .config LFS flag, which you seem to have already done. Do a make clean in both the kernel and uClibc directories (to make sure any junk binaries are cleaned out before continuing the build), then go back to the buildroot directory and make. That should take care of the LFS problem.

Quoted 43 lines

As for the grub.mk modification, can you post the exact error you get with the debian site not being able to be resolved? I can cross reference that with my own grub.mk and see where I downloaded grub from.

Quoted 33 lines · Jason Valenzuela
Quoted 8 lines · Arun Reddy

I am new to Buildroot as well. I have successfully created an x86 target with Grub as the bootloader. I was wondering if the error you're getting says something about not being able to resolve the debian ftp site? Are you able to even download grub from the correct repository first? I just want to know if it's a compiling problem or a problem with retrieving grub. If it's the latter than the problem lies within the actual Makefile, in that the repository is broken and you need to change the path for your development system to go grab it from.

Ok so the buildroot make process it trying to pull a .diff from the debian site that doesn't exist. I found that this is a known problem in buildroot's bug tracking system. I tried two things, first I found the actual .diff elsewhere, downloaded it into the dl directory and tried a make. That crashes with complaints about uClibc being built without large file support. Enabling large file support in uClibc's make menuconfig also doesn't build.

Next I tried to modify the grub.mk so that it downloads a slightly newer .diff from the debian site. Was a real long shot and of course didn't work either.

So now I'm trying to simply build grub on my host system and see if I can go from there.

Jason Valenzuela
_______________________________________________
buildroot mailing list
buildroot at uclibc.org
http://busybox.net/mailman/listinfo/buildroot

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://busybox.net/lists/buildroot/attachments/20080520/9c83a14c/attachment-0001.htm

#5 lore raw
In reply to Arun Reddy
Quoted 4 lines · Arun Reddy

As for the grub.mk <http://grub.mk> modification, can you post the exact error you get with the debian site not being able to be resolved? I can cross reference that with my own grub.mk <http://grub.mk> and see where I downloaded grub from.

wget fails to get
http://ftp.debian.org/debian/pool/main/g/grub/grub_0.97-35.diff.gz

Fails with a 404 Not Found.

If I ftp manually to that site, the file is indeed not there.

Jason Valenzuela

#6 lore raw

Well I checked my x86 project and I have grub 0.97-35. I haven't touched that project since April, so they must have removed 35 from this repository pretty recently. I find that really annoying that they only keep the latest version up there.

Anyway, I am very surprised your build isn't working with version 38. I remember having the same problem with grub because version 0.97-33 wasn't available! So I changed the .mk file to direct it to 35 and it worked. I see that version 27 is up there still... can you try getting that one and see what happens?

Quoted 12 lines · Jason Valenzuela
Quoted 4 lines · Arun Reddy

As for the grub.mk <http://grub.mk> modification, can you post the exact error you get with the debian site not being able to be resolved? I can cross reference that with my own grub.mk <http://grub.mk> and see where I downloaded grub from.

wget fails to get
http://ftp.debian.org/debian/pool/main/g/grub/grub_0.97-35.diff.gz

Fails with a 404 Not Found.

Quoted 9 lines

If I ftp manually to that site, the file is indeed not there.

Jason Valenzuela
_______________________________________________
buildroot mailing list
buildroot at uclibc.org
http://busybox.net/mailman/listinfo/buildroot

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://busybox.net/lists/buildroot/attachments/20080520/befd7bd8/attachment.htm

#7 lore raw
Quoted 10 lines · Arun Reddy

Well I checked my x86 project and I have grub 0.97-35. I haven't touched that project since April, so they must have removed 35 from this repository pretty recently. I find that really annoying that they only keep the latest version up there.

Anyway, I am very surprised your build isn't working with version 38. I remember having the same problem with grub because version 0.97-33 wasn't available! So I changed the .mk file to direct it to 35 and it worked. I see that version 27 is up there still... can you try getting that one and see what happens?

I found the -35 patch with google and am currently recompiling uClibc as you directed. If that builds and grub too, I can see if the -27 builds.

I noticed that there were other grub patches within the target/x86/grub directory. Perhaps those don't work correctly with the -38 patch.

Thanks,
Jason Valenzuela

#8 lore raw
In reply to Arun Reddy

Ok, thanks for the help so far. Got uClibc and grub to build ok.

Some booting issues:

I'm looking to use this to boot from a compact flash. I've partitioned and created an ext2 file system on the CF card. I mounted this partition and untarred the root file system onto the CF. I've copied the kernel from binaries/PROJECT_NAME/ to /boot in the CF file system.

Now I'm kind of fuzzy on how to get grub to setup on it. The card shows up as /dev/hdc with the only partition being /dev/hdc1, which seems fine. If I chroot onto it and run grub, when I try and issue a root (hd2,0) I get 'Error 21: Selected disk does not exist'.

Thanks,
Jason Valenzuela

#9 lore raw

Can you post your menu.lst file? I'm mainly interested to see what's in the /kernel line.

Quoted 15 lines · Jason Valenzuela

Ok, thanks for the help so far. Got uClibc and grub to build ok.

Some booting issues:

I'm looking to use this to boot from a compact flash. I've partitioned and created an ext2 file system on the CF card. I mounted this partition and untarred the root file system onto the CF. I've copied the kernel from binaries/PROJECT_NAME/ to /boot in the CF file system.

Now I'm kind of fuzzy on how to get grub to setup on it. The card shows up as /dev/hdc with the only partition being /dev/hdc1, which seems fine. If I chroot onto it and run grub, when I try and issue a root (hd2,0) I get 'Error 21: Selected disk does not exist'.

Quoted 7 lines

Thanks,
Jason Valenzuela
_______________________________________________
buildroot mailing list
buildroot at uclibc.org
http://busybox.net/mailman/listinfo/buildroot

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://busybox.net/lists/buildroot/attachments/20080520/fa83ba0a/attachment.htm

#10 lore raw
Quoted 2 lines · Arun Reddy

Can you post your menu.lst file? I'm mainly interested to see what's in the /kernel line.

Should I have such a file at this point? I'm still working on the host system with the CF card in the PCMCIA socket, not booting the target yet.

Jason Valenzuela

#11 lore raw

[Buildroot] malloc/rpl_malloc

In reply to Arun Reddy

I'm trying to compile some packages of my own and am coming up with some problems at link time with the malloc function. According to the uclibc FAQ, MALLOC_GLIBC_COMPAT should be enabled in order for the configure script not to define malloc() to rpl_malloc(). I went to the toolchain_build_ARCH/uClibc-0.9.29 and did a 'make menuconfig'. This option under 'General Library Settings->Malloc returns live pointer for malloc(0)' was indeed enabled, causing me to believe that the uclibc in my buildroot toolchain is already correctly set.

Now going back to the build_ARCH/MY_PACKAGE directory and checking the config.h, HAVE_MALLOC has been defined as 0 and the results in config.log shows that the configure script didn't think malloc() was compatible with the GNU libc version.

Jason Valenzuela