Received: from list by lists.gnu.org with archive (Exim 4.71) id 1RvSet-0008Ur-JU for mharc-grub-devel@gnu.org; Thu, 09 Feb 2012 06:59:27 -0500 Received: from eggs.gnu.org ([140.186.70.92]:39596) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvSen-0008Sp-J2 for grub-devel@gnu.org; Thu, 09 Feb 2012 06:59:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RvSeh-0000RT-GY for grub-devel@gnu.org; Thu, 09 Feb 2012 06:59:21 -0500 Received: from mailslv1.informatik.hu-berlin.de ([141.20.20.51]:43042) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvSeh-0000RF-6z for grub-devel@gnu.org; Thu, 09 Feb 2012 06:59:15 -0500 Received: from laptux.home.zz ([141.20.6.195]) (authenticated bits=0) by mailslv1.informatik.hu-berlin.de (8.14.2+Sun/8.14.2/INF-2.0-MA-SOLARIS-2.10-26) with ESMTP id q19BxCu1016876 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 9 Feb 2012 12:59:12 +0100 (CET) Message-ID: <4F33B510.30408@informatik.hu-berlin.de> Date: Thu, 09 Feb 2012 12:59:12 +0100 From: Robert Schumann User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.23) Gecko/20090812 Lightning/0.9 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 MIME-Version: 1.0 To: The development of GNU GRUB Subject: Re: grub 1.99 add own module / dep problem References: <4F33963E.1070406@informatik.hu-berlin.de> <4F33AA6C.8060101@gmail.com> In-Reply-To: <4F33AA6C.8060101@gmail.com> X-Enigmail-Version: 1.3.2 OpenPGP: url=http://remembrance.de/gpg/0xA5A5FAA2.asc Content-Type: text/plain; charset=UTF-8 X-Virus-Scanned: clamav-milter 0.96.3 at sigma X-Virus-Status: Clean Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by mailslv1.informatik.hu-berlin.de id q19BxCu1016876 X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 141.20.20.51 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Feb 2012 11:59:25 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Vladimir! Thanks for your timely response :) Am 09.02.2012 12:13, schrieb Vladimir '=CF=86-coder/phcoder' Serbinenko: > On 09.02.2012 10:47, Robert Schumann wrote: Heyho guys! >=20 > I'm sorry if I didn't RTFM somewhere but I just couldn't find > _any_ information on how to correctly add/patch own modules into > the grub 1.99. The problem: >=20 > 1. mymod.c depends on a function in biosdisk.c >> Avoid this as much as possible. Biosdisk is arch-specific, use >> generic disk functions. Totally agreed here, but this is the use-case, which I think I cannot modify. I have to stick with biosdisk functions for now, but I'll look into better alternatives (for future use). > 2. mymod.c includes the biosdisk.h header correctly I suppose 3. I > patched grub-core/Makefile.core.def with >=20 > module =3D { name =3D mymod; common =3D mymod/mymod.c; enable =3D > biosdisk; >> enable=3Di386_pc; not biosdisk Alright, I had this too but still with Makefile.core.am changes, maybe that's why it didn't work ;-) > }; >=20 > 4. I patched grub-core/Makefile.core.am with basically a copy from > the hello.c module stuff (although I should probably take the arch=20 > dependend definitions from biosdisk mod? but I'm building i386 so > it should work any way?) >> Don't touch this file. Just rerun ./autogen.sh Oh ok, that sounds indeed simple, thanks for this pointer! > 5. ./configure&& make works as expected for another module which=20 > doesn't include a foreign function. >=20 > 6. For mymod.c I receive mymod/mymod.c:68: error: implicit > declaration of function 'grub_biosdisk_get_diskinfo_standard' >> This function is static ("private"). Moreover it's for very old >> C/H/S addressing. Looks like you're going the wrong way. Can you >> detail what's your end goal? Basically it's about NTFS system partition imaging. Relocating of the NT bootloader ntldr seems to need a run of "ntfsreloc" with the proper BIOS values in CHS format. I'm open to every better idea, but that seemed to be the only reliable way (at least on this i386 Win XP platform). > which is of course in biosdisk.c. Now my question: How do I solve > this mystery on a code/patch base? ;) I know that I can add the > biosdisk.c to the common code functions, but that shouldn't be > necessary, huh? I thought that enable =3D biosdisk would do the trick > with linked functions, but well... maybe you could shed some light > on it. >> Dependencies are tracked automatically. Another good news, thank you very much! Cheers Robert - --=20 |-------------------------------------------------address-+ | work: jacob-und-wilhelm-grimm-zentrum | geschwister-scholl-str. 1, 10117 berlin | mail: humboldt-universit=C3=A4t zu berlin | computer- und medienservice | unter den linden 6, 10099 berlin |-------------------------------------------------contact-+ | mail: schumann@informatik.hu-berlin.de | icq: 93163687 | xmpp: betulichergutmensch@gmail.com | fb: fb.com/rschumann | phone: +49(0)30-2093-70133 |-------------------------------------------------gpg/pgp-+ | key: remembrance.de/gpg/0xA5A5FAA2.asc | fprnt: 9220-9732-7390-7A0C-5623-3336-4233-FDF8-A5A5-FAA2 |---------------------------------------------------------+ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk8ztRAACgkQQjP9+KWl+qKmAQCffcAHDBNL+W+GQeuycPnkDuc6 V0gAoJanFp9klu6ffLgWuRe+kQp3yvQk =3DNprO -----END PGP SIGNATURE-----