Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Jul 2016 09:46:33 +0900 (JST)
From:      Mori Hiroki <yamori813@yahoo.co.jp>
To:        "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org>
Subject:   How to change gcc from clang at build kernel and world?
Message-ID:  <800231.77121.qm@web101710.mail.ssk.yahoo.co.jp>

next in thread | raw e-mail | index | archive | help
Hi.=0A=0AI make support Eventtimer and FDT and INTRNG to cns11xx code.=0A=
=0AThis is almost done. But hang up at init. I think it's a interrupt issue=
.=0A=0Ahttps://gist.github.com/yamori813/ae047a28a825aac255e436fd8ccaf785=
=0A=0A=0Ahttps://github.com/yamori813/freebsd/tree/zrouter/sys/arm/cavium/c=
ns11xx=0A=0A=0Acns11xx is arm4(not arm4t). =A0arm build on head is change t=
o use clang=0Aseveral month ago.=A0I want use gcc at buildworld and buildke=
rnel.=0A=0ABecause of clang use bx instruction. bx instruction not support =
arm4.=0A=0AHow do I change to gcc from clang?=0A=0AI found bx=A0instruction=
=A0at=A0=0A=0Acontrib/compiler-rt/lib/builtins/arm/=0A=0AIt must be changed=
 bx to mov instruction.=0A=0ARegards.=0A=0AHiroki Mori=0A
From owner-freebsd-arm@freebsd.org  Mon Jul  4 02:33:49 2016
Return-Path: <owner-freebsd-arm@freebsd.org>
Delivered-To: freebsd-arm@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF024B9068D
 for <freebsd-arm@mailman.ysv.freebsd.org>;
 Mon,  4 Jul 2016 02:33:49 +0000 (UTC) (envelope-from db@db.net)
Received: from diana.db.net (unknown [IPv6:2620:64:0:1:223:7dff:fea2:c8f2])
 by mx1.freebsd.org (Postfix) with ESMTP id E13D82047
 for <freebsd-arm@FreeBSD.org>; Mon,  4 Jul 2016 02:33:49 +0000 (UTC)
 (envelope-from db@db.net)
Received: from night.db.net (localhost [127.0.0.1])
 by diana.db.net (Postfix) with ESMTP id 1771E2AA3A4
 for <freebsd-arm@FreeBSD.org>; Sun,  3 Jul 2016 20:33:02 -0600 (MDT)
Received: by night.db.net (Postfix, from userid 1000)
 id C72DE1CDE4; Sun,  3 Jul 2016 22:33:39 -0400 (EDT)
Date: Sun, 3 Jul 2016 22:33:39 -0400
From: Diane Bruce <db@db.net>
To: freebsd-arm@FreeBSD.org
Subject: RPI 3
Message-ID: <20160704023339.GA17333@night.db.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.6.1 (2016-04-27)
X-BeenThere: freebsd-arm@freebsd.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: "Porting FreeBSD to ARM processors." <freebsd-arm.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-arm>,
 <mailto:freebsd-arm-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-arm/>;
List-Post: <mailto:freebsd-arm@freebsd.org>
List-Help: <mailto:freebsd-arm-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-arm>,
 <mailto:freebsd-arm-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 04 Jul 2016 02:33:50 -0000

I've been poking at the RPi 3 using source and image from hardened BSD via
Sean Webb trying to get our head of tree to boot RPi3


======= This works from hardened BSD
N.B. I added the printf("ZZz cninit!\n"); after the cninit();

FreeBSD Raspberry Pi 3 loader
Booting kernel at 0x200000, size 9787000
DTB: 0xc47000 0xffffff8000a47000
entry: 0x201000 9400003d ffffff8000a4a000
ZZZ cninit!
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 2013-2016 The HardenedBSD Project.

...
a readelf on working hardened bsd kernel
readelf -a kernel

  Entry point address:               0xffffff8000001000
======= Non working from head

FreeBSD Raspberry Pi 3 loader
Booting kernel at 0x200000, size 9539832
DTB: 0xc0b000 0xffffff8000a0b000

N.B. *no* print out of entry

readelf -a kernel
  Entry point address:               0xffff000000001000

Doing
objcopy kernel kernel.fix --set-start=0xffffff8000001000
readelf -a kernel.fix
  Entry point address:               0xffffff8000001000

using kernel.fix with rpi3 boot
FreeBSD Raspberry Pi 3 loader
Booting kernel at 0x200000, size 9539832
DTB: 0xc0b000 0xffffff8000a0b000
entry: 0x201000 94000037 ffffff8000a0e000

*NOW* shows printout of "entry: " line but still does not boot.

======

Still tracking this down.
-- 
- db@FreeBSD.org db@db.net http://www.db.net/~db



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?800231.77121.qm>