Edward Shishkin
2009-Sep-24 22:06 UTC
[patch 1/2] grub-0.97: btrfs support for a singe device configuration
Johannes Hirte
2009-Oct-27 22:35 UTC
Re: [patch 1/2] grub-0.97: btrfs support for a singe device configuration
Am Freitag 25 September 2009 00:06:32 schrieb Edward Shishkin:> >I was trying the patch and got a little confused. How did you get this work without linking against libgcc? I''ve tested it with the gentoo patches for grub and get /usr/src/portage/portage/sys-boot/grub-0.97-r10/work/grub-0.97/stage2/fsys_btrfs.c:551: undefined reference to `__udivdi3'' /usr/src/portage/portage/sys-boot/grub-0.97-r10/work/grub-0.97/stage2/fsys_btrfs.c:571: undefined reference to `__umoddi3'' /usr/src/portage/portage/sys-boot/grub-0.97-r10/work/grub-0.97/stage2/fsys_btrfs.c:575: undefined reference to `__umoddi3'' /usr/src/portage/portage/sys-boot/grub-0.97-r10/work/grub-0.97/stage2/fsys_btrfs.c:581: undefined reference to `__umoddi3'' /usr/src/portage/portage/sys-boot/grub-0.97-r10/work/grub-0.97/stage2/fsys_btrfs.c:583: undefined reference to `__udivdi3'' /usr/src/portage/portage/sys-boot/grub-0.97-r10/work/grub-0.97/stage2/fsys_btrfs.c:588: undefined reference to `__umoddi3'' /usr/src/portage/portage/sys-boot/grub-0.97-r10/work/grub-0.97/stage2/fsys_btrfs.c:589: undefined reference to `__udivdi3'' collect2: ld returned 1 exit status make[2]: *** [pre_stage2.exec] Error 1 make[2]: Leaving directory `/usr/src/portage/portage/sys-boot/grub-0.97-r10/work/grub-0.97/stage2'' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/usr/src/portage/portage/sys-boot/grub-0.97-r10/work/grub-0.97'' make: *** [all] Error 2 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Edward Shishkin
2009-Oct-27 23:01 UTC
Re: [patch 1/2] grub-0.97: btrfs support for a singe device configuration
Johannes Hirte wrote:> Am Freitag 25 September 2009 00:06:32 schrieb Edward Shishkin: > >> > I was trying the patch and got a little confused. How did you get this work > without linking against libgcc?Hmm.. Actually my Fedora stuff does link it: [...] +btrfs_stage1_5_exec_LDADD = @LIBGCC@ [...] I guess you have missed it when porting to Gentoo.. Thanks, Edward.> I''ve tested it with the gentoo patches for > grub and get > > /usr/src/portage/portage/sys-boot/grub-0.97-r10/work/grub-0.97/stage2/fsys_btrfs.c:551: undefined reference to `__udivdi3'' > /usr/src/portage/portage/sys-boot/grub-0.97-r10/work/grub-0.97/stage2/fsys_btrfs.c:571: undefined reference to `__umoddi3'' > /usr/src/portage/portage/sys-boot/grub-0.97-r10/work/grub-0.97/stage2/fsys_btrfs.c:575: undefined reference to `__umoddi3'' > /usr/src/portage/portage/sys-boot/grub-0.97-r10/work/grub-0.97/stage2/fsys_btrfs.c:581: undefined reference to `__umoddi3'' > /usr/src/portage/portage/sys-boot/grub-0.97-r10/work/grub-0.97/stage2/fsys_btrfs.c:583: undefined reference to `__udivdi3'' > /usr/src/portage/portage/sys-boot/grub-0.97-r10/work/grub-0.97/stage2/fsys_btrfs.c:588: undefined reference to `__umoddi3'' > /usr/src/portage/portage/sys-boot/grub-0.97-r10/work/grub-0.97/stage2/fsys_btrfs.c:589: undefined reference to `__udivdi3'' > collect2: ld returned 1 exit status > make[2]: *** [pre_stage2.exec] Error 1 > make[2]: Leaving directory `/usr/src/portage/portage/sys-boot/grub-0.97-r10/work/grub-0.97/stage2'' > make[1]: *** [all-recursive] Error 1 > make[1]: Leaving directory `/usr/src/portage/portage/sys-boot/grub-0.97-r10/work/grub-0.97'' > make: *** [all] Error 2 > -- > To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > >-- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Johannes Hirte
2009-Oct-28 00:01 UTC
Re: [patch 1/2] grub-0.97: btrfs support for a singe device configuration
Am Mittwoch 28 Oktober 2009 00:01:39 schrieb Edward Shishkin:> Johannes Hirte wrote: > > Am Freitag 25 September 2009 00:06:32 schrieb Edward Shishkin: > > > >> > > I was trying the patch and got a little confused. How did you get this work > > without linking against libgcc? > > Hmm.. Actually my Fedora stuff does link it: > [...] > > +btrfs_stage1_5_exec_LDADD = @LIBGCC@ > > [...] > I guess you have missed it when porting to Gentoo.."btrfs_stage1_5_exec_LDADD = @LIBGCC@" is in place, I''ve didn''t missed. My fault, the error log was too short. As far as I can see the error occours at pre_stage2_exec-stage2: mv -f .deps/pre_stage2_exec-stage2.Tpo .deps/pre_stage2_exec-stage2.Po mv -f .deps/pre_stage2_exec-graphics.Tpo .deps/pre_stage2_exec-graphics.Po mv -f .deps/pre_stage2_exec-tparm.Tpo .deps/pre_stage2_exec-tparm.Po x86_64-pc-linux-gnu-gcc -m32 -Os -fno-stack-protector -fno-builtin -nostdinc -DSUPPORT_SERIAL=1 -DSUPPORT_HERCULES=1 -DSUPPORT_GRAPHICS=1 -DFSYS_EXT2FS=1 -DFSYS_FAT=1 -DFSYS_FFS=1 -DFSYS_UFS2=1 -DFSYS_MINIX=1 -DFSYS_REISERFS=1 -DFSYS_BTRFS=1 -DFSYS_VSTAFS=1 -DFSYS_JFS=1 -DFSYS_XFS=1 -DFSYS_ISO9660=1 -DUSE_MD5_PASSWORDS=1 -g -nostdlib -Wl,-N -Wl,-Ttext -Wl,8200 -Wl,-O1 -Wl,--sort-common -Wl,-z,combreloc -Wl,--build-id=none -o pre_stage2.exec pre_stage2_exec-asm.o pre_stage2_exec-bios.o pre_stage2_exec-boot.o pre_stage2_exec-builtins.o pre_stage2_exec-char_io.o pre_stage2_exec-cmdline.o pre_stage2_exec-common.o pre_stage2_exec-console.o pre_stage2_exec-disk_io.o pre_stage2_exec-fsys_ext2fs.o pre_stage2_exec-fsys_fat.o pre_stage2_exec-fsys_ffs.o pre_stage2_exec-fsys_iso9660.o pre_stage2_exec -fsys_jfs.o pre_stage2_exec-fsys_minix.o pre_stage2_exec-fsys_reiserfs.o pre_stage2_exec-fsys_btrfs.o pre_stage2_exec-fsys_ufs2.o pre_stage2_exec-fsys_vstafs.o pre_stage2_exec-fsys_xfs.o pre_stage2_exec-gunzip.o pre_stage2_exec-hercules.o pre_stage2_exec-md5.o pre_stage2_exec-serial.o pre_stage2_exec-smp-imps.o pre_stage2_exec-stage2.o pre_stage2_exec-terminfo.o pre_stage2_exec-tparm.o pre_stage2_exec-graphics.o pre_stage2_exec-fsys_btrfs.o: In function `__btrfs_map_block'': /usr/src/portage/portage/sys-boot/grub-0.97-r10/work/grub-0.97/stage2/fsys_btrfs.c:551: undefined reference to `__udivdi3'' /usr/src/portage/portage/sys-boot/grub-0.97-r10/work/grub-0.97/stage2/fsys_btrfs.c:571: undefined reference to `__umoddi3'' /usr/src/portage/portage/sys-boot/grub-0.97-r10/work/grub-0.97/stage2/fsys_btrfs.c:575: undefined reference to `__umoddi3'' /usr/src/portage/portage/sys-boot/grub-0.97-r10/work/grub-0.97/stage2/fsys_btrfs.c:581: undefined reference to `__umoddi3'' /usr/src/portage/portage/sys-boot/grub-0.97-r10/work/grub-0.97/stage2/fsys_btrfs.c:583: undefined reference to `__udivdi3'' /usr/src/portage/portage/sys-boot/grub-0.97-r10/work/grub-0.97/stage2/fsys_btrfs.c:588: undefined reference to `__umoddi3'' /usr/src/portage/portage/sys-boot/grub-0.97-r10/work/grub-0.97/stage2/fsys_btrfs.c:589: undefined reference to `__udivdi3'' collect2: ld returned 1 exit status make[2]: *** [pre_stage2.exec] Error 1 make[2]: Leaving directory `/usr/src/portage/portage/sys-boot/grub-0.97-r10/work/grub-0.97/stage2'' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/usr/src/portage/portage/sys-boot/grub-0.97-r10/work/grub-0.97'' make: *** [all] Error 2 I''m not very familiar with autotools, but I think btrfs_stage1_5_exec_LDADD isn''t the right place to catch this. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Johannes Hirte
2009-Oct-28 21:30 UTC
Re: [patch 1/2] grub-0.97: btrfs support for a singe device configuration
Am Mittwoch 28 Oktober 2009 00:01:39 schrieb Edward Shishkin:> Johannes Hirte wrote: > > Am Freitag 25 September 2009 00:06:32 schrieb Edward Shishkin: > > > >> > > I was trying the patch and got a little confused. How did you get this work > > without linking against libgcc? > > Hmm.. Actually my Fedora stuff does link it: > [...] > > +btrfs_stage1_5_exec_LDADD = @LIBGCC@ > > [...] > I guess you have missed it when porting to Gentoo..Ok, I''ve got it. I had to add -lgcc also for some more targets in Makefile.am: if NETBOOT_SUPPORT -pre_stage2_exec_LDADD = ../netboot/libdrivers.a +pre_stage2_exec_LDADD = ../netboot/libdrivers.a -lgcc +else +pre_stage2_exec_LDADD = -lgcc endif if DISKLESS_SUPPORT @@ -197,6 +201,16 @@ -DNO_BLOCK_FILES=1 reiserfs_stage1_5_exec_LDFLAGS = $(STAGE1_5_LINK) +# For btrfs_stage1_5 target. +btrfs_stage1_5_exec_SOURCES = start.S asm.S common.c char_io.c \ + disk_io.c stage1_5.c fsys_btrfs.c bios.c +btrfs_stage1_5_exec_CFLAGS = $(STAGE1_5_COMPILE) -DFSYS_BTRFS=1 \ + -DNO_BLOCK_FILES=1 +btrfs_stage1_5_exec_CCASFLAGS = $(STAGE1_5_COMPILE) -DFSYS_BTRFS=1 \ + -DNO_BLOCK_FILES=1 +btrfs_stage1_5_exec_LDFLAGS = $(STAGE1_5_LINK) +btrfs_stage1_5_exec_LDADD = -lgcc + # For vstafs_stage1_5 target. vstafs_stage1_5_exec_SOURCES = start.S asm.S common.c char_io.c \ disk_io.c stage1_5.c fsys_vstafs.c bios.c @@ -240,7 +254,7 @@ diskless_exec_CCASFLAGS = $(STAGE2_COMPILE) $(FSYS_CFLAGS) \ -DSUPPORT_DISKLESS=1 diskless_exec_LDFLAGS = $(PRE_STAGE2_LINK) -diskless_exec_LDADD = ../netboot/libdrivers.a +diskless_exec_LDADD = ../netboot/libdrivers.a -lgcc diskless_size.h: diskless -rm -f $@ This compiles and works, but only with stage2. When using stage1_5, grub hangs on boot with GRUB loading stage1.5 and blinking cursor. Is the multidevice patch also necessary for single devices? I''ve omitted this patch, since my root-fs (with /boot) lies on a single partition. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Edward Shishkin
2009-Oct-28 23:02 UTC
Re: [patch 1/2] grub-0.97: btrfs support for a singe device configuration
Johannes Hirte wrote: [...]> This compiles and works, but only with stage2. When using stage1_5, grub hangs > on boot with > > GRUB loading stage1.5 > > and blinking cursor. Is the multidevice patch also necessary for single > devices?Yes, please use both patches! I have split the stuff because the mailing list refuse attachments >100K. Thanks, Edward.> I''ve omitted this patch, since my root-fs (with /boot) lies on a > single partition. > >-- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Johannes Hirte
2009-Oct-29 20:53 UTC
Re: [patch 1/2] grub-0.97: btrfs support for a singe device configuration
Am Donnerstag 29 Oktober 2009 00:02:08 schrieb Edward Shishkin:> Johannes Hirte wrote: > [...] > > This compiles and works, but only with stage2. When using stage1_5, grub hangs > > on boot with > > > > GRUB loading stage1.5 > > > > and blinking cursor. Is the multidevice patch also necessary for single > > devices? > > Yes, please use both patches! > I have split the stuff because the mailing list refuse attachments >100K. > > Thanks, > Edward.With both patches applied it works now with stage1_5. Thank you. The patch for gentoo is available on http://bugs.gentoo.org/show_bug.cgi?id=283637, if somebody is interested. Johannes -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Seemingly Similar Threads
- [patch 0/2] grub-0.97: btrfs support
- [PATCH 0 of 3 v2] PV-GRUB: add support for ext4 and btrfs
- [PATCH] chain.c32: add support for loading GRUB stage2
- grub-0.97: btrfs multidevice support [PATCH]
- The builtins library of compiler-rt is a performance HOG^WKILLER