From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1UOtGx-0007h2-I5 for mharc-grub-devel@gnu.org; Sun, 07 Apr 2013 13:20:55 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40659) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UOtGp-0007gY-Th for grub-devel@gnu.org; Sun, 07 Apr 2013 13:20:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UOtGh-00038E-4e for grub-devel@gnu.org; Sun, 07 Apr 2013 13:20:47 -0400 Received: from mail-ea0-x230.google.com ([2a00:1450:4013:c01::230]:48640) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UOtGg-00037w-RW for grub-devel@gnu.org; Sun, 07 Apr 2013 13:20:39 -0400 Received: by mail-ea0-f176.google.com with SMTP id h10so1907060eaj.7 for ; Sun, 07 Apr 2013 10:20:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :x-enigmail-version:content-type; bh=2VHJmUofEuXisbFNKIYzbfah8WoJQ+O7WoE6exlVsiE=; b=GrDtraF4zuGDeRBIX6TRY6/LYn1jFHfHYQ/DCXL8P6ADjsqyS7sKNNuHCPMi7/ClLE iRI6E5tjOxNG1AwHTUJyFRyE52NdYYqmcwSMpEZ0GtAVcIdGmSidtMCt2c9gh1CeOF7x b6Kutn9bf7H9rJc4stOTQMRtAu9H8r+2reAWCy8fO1u64ggeyBllXmyQoiWMf1UwGAf+ uyBJnqC/UrizLtPk2jawv99dL8+KM6bprjdMlZdnrNRrNrm3ou4rhgz1NLYV6WVkRpjF wEUMJmRwFBDbOmN+zyWiZLOtqtPJzrszuKFIp+4b/ACjQTUyzib+IffS7g1habpjoWlc V6JA== X-Received: by 10.15.76.132 with SMTP id n4mr20871393eey.16.1365355237824; Sun, 07 Apr 2013 10:20:37 -0700 (PDT) Received: from debian.x201.phnet (245-188.1-85.cust.bluewin.ch. [85.1.188.245]) by mx.google.com with ESMTPS id u44sm27351506eel.7.2013.04.07.10.20.37 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 07 Apr 2013 10:20:37 -0700 (PDT) Message-ID: <5161AAE3.6050403@gmail.com> Date: Sun, 07 Apr 2013 19:20:35 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12 MIME-Version: 1.0 To: The development of GRUB 2 Subject: Raspberry pi support X-Enigmail-Version: 1.4.1 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig0185BDF0865EA2767FBA9B54" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c01::230 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: Sun, 07 Apr 2013 17:20:55 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig0185BDF0865EA2767FBA9B54 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Based on Leif Lindholm's patches I could go to GRUB console on raspberry = pi. The biggest problem is that cache flushing is simply skipped. Another pro= blem is that due to different linux image format linux loader doesn't work. I = didn't test grub-install but fed GRUB to uboot using kermit. Is there any advantage in building armv6 binary by default unless user ov= errides through TARGET_CFLAGS? Some of the fixes are to make tools work on amd64 =3D=3D=3D modified file 'conf/Makefile.common' --- conf/Makefile.common 2013-04-07 00:41:07 +0000 +++ conf/Makefile.common 2013-04-07 16:08:07 +0000 @@ -40,8 +40,7 @@ if COND_arm # Image entry point always in ARM (A32) state - ensure proper functional= ity if # the rest is built for the Thumb (T32) state. - CFLAGS_PLATFORM +=3D -mthumb-interwork -mno-unaligned-access -mlong-ca= lls - CCASFLAGS_PLATFORM =3D -Wa,-mimplicit-it=3Dthumb + CFLAGS_PLATFORM +=3D -mthumb-interwork -march=3Darmv6 -mlong-calls LDFLAGS_PLATFORM =3D -Wl,--wrap=3D__clear_cache endif =20 =3D=3D=3D modified file 'configure.ac' --- configure.ac 2013-04-07 00:41:07 +0000 +++ configure.ac 2013-04-07 16:08:07 +0000 @@ -717,7 +717,7 @@ fi =20 # Check for libgcc symbols -AC_CHECK_FUNCS(__bswapsi2 __bswapdi2 __ashldi3 __ashrdi3 __lshrdi3 __ucm= pdi2 _restgpr_14_x __udivsi3 __umoddi3 __udivdi3 __divsi3 __modsi3 __umod= si3 __moddi3 __divdi3 __ctzdi2 __ctzsi2) +AC_CHECK_FUNCS(__bswapsi2 __bswapdi2 __ashldi3 __ashrdi3 __lshrdi3 __ucm= pdi2 _restgpr_14_x __udivsi3 __umoddi3 __udivdi3 __divsi3 __modsi3 __umod= si3 __moddi3 __divdi3 __ctzdi2 __ctzsi2 __aeabi_ulcmp) =20 if test "x$TARGET_APPLE_CC" =3D x1 ; then CFLAGS=3D"$TARGET_CFLAGS -nostdlib" =3D=3D=3D modified file 'grub-core/kern/arm/dl.c' --- grub-core/kern/arm/dl.c 2013-04-07 00:41:07 +0000 +++ grub-core/kern/arm/dl.c 2013-04-07 16:08:07 +0000 @@ -27,9 +27,6 @@ #ifdef GRUB_UTIL # include #else -# if !defined(__thumb2__) -# error "Relocations not implemented for A32 ("ARM") instruction set ye= t!" -# endif =20 grub_err_t reloc_jump24 (grub_uint32_t *addr, Elf32_Addr sym_addr); grub_err_t reloc_thm_call (grub_uint16_t *addr, Elf32_Addr sym_addr); @@ -169,8 +166,8 @@ } =20 #ifdef GRUB_UTIL - grub_util_info (" relative destination =3D 0x%08x", - (unsigned int)target + offset); + grub_util_info (" relative destination =3D 0x%08lx", + (unsigned long)target + offset); #endif =20 /* Reassemble instruction word */ @@ -358,6 +355,7 @@ return retval; } break; + case R_ARM_CALL: case R_ARM_JUMP24: { retval =3D reloc_jump24 (target, sym_addr); =3D=3D=3D modified file 'grub-core/kern/dl.c' --- grub-core/kern/dl.c 2013-03-19 19:25:09 +0000 +++ grub-core/kern/dl.c 2013-04-07 16:08:07 +0000 @@ -588,7 +588,7 @@ { grub_dprintf ("modules", "flushing 0x%lx bytes at %p\n", (unsigned long) mod->sz, mod->base); - grub_arch_sync_caches (mod->base, mod->sz); + // grub_arch_sync_caches (mod->base, mod->sz); } =20 /* Load a module from core memory. */ =3D=3D=3D modified file 'include/grub/libgcc.h' --- include/grub/libgcc.h 2013-04-07 00:41:07 +0000 +++ include/grub/libgcc.h 2013-04-07 16:08:07 +0000 @@ -122,4 +122,5 @@ void EXPORT_FUNC (__aeabi_uidiv) (void); void EXPORT_FUNC (__aeabi_uidivmod) (void); void EXPORT_FUNC (__wrap___clear_cache) (void *, void *); +void EXPORT_FUNC (__aeabi_ulcmp) (void); #endif =3D=3D=3D modified file 'include/grub/uboot/api_public.h' --- include/grub/uboot/api_public.h 2013-04-07 00:41:07 +0000 +++ include/grub/uboot/api_public.h 2013-04-07 16:08:07 +0000 @@ -61,9 +61,6 @@ =20 typedef int (*scp_t) (int, int *, ...); =20 -typedef grub_uint16_t uint16_t; -typedef grub_uint32_t uint32_t; - #define API_SIG_VERSION 1 #define API_SIG_MAGIC "UBootAPI" #define API_SIG_MAGLEN 8 @@ -71,8 +68,8 @@ struct api_signature { char magic[API_SIG_MAGLEN]; /* magic string */ - uint16_t version; /* API version */ - uint32_t checksum; /* checksum of this sig struct */ + grub_uint16_t version; /* API version */ + grub_uint32_t checksum; /* checksum of this sig struct */ scp_t syscall; /* entry point to the API */ }; =20 =3D=3D=3D modified file 'util/grub-mkimagexx.c' --- util/grub-mkimagexx.c 2013-04-07 00:41:07 +0000 +++ util/grub-mkimagexx.c 2013-04-07 16:08:07 +0000 @@ -553,7 +553,7 @@ case R_ARM_THM_CALL: case R_ARM_THM_JUMP24: { - grub_util_info (" THM_JUMP24:\ttarget=3D0x%08x\toffset=3D(0x%0= 8x)", (unsigned int) target, sym_addr); + grub_util_info (" THM_JUMP24:\ttarget=3D0x%08lx\toffset=3D(0x%= 08x)", (unsigned long) target, sym_addr); sym_addr -=3D offset; /* Thumb instructions can be 16-bit aligned */ reloc_thm_call ((grub_uint16_t *) target, sym_addr); --------------enig0185BDF0865EA2767FBA9B54 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iF4EAREKAAYFAlFhquMACgkQNak7dOguQglAEgEArKVo89i333yiqK0QCrv/Zcav 51kfK02gTEJeTtwXUUoA/AhSl9+fHx7vQEvOVKNTNkSNQqwymyICeOloaP8H20ai =ElhX -----END PGP SIGNATURE----- --------------enig0185BDF0865EA2767FBA9B54--