From owner-freebsd-ppc@FreeBSD.ORG Fri Jan 25 12:15:13 2013 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A24289E0 for ; Fri, 25 Jan 2013 12:15:13 +0000 (UTC) (envelope-from adutkowski@gmail.com) Received: from mail-ob0-f173.google.com (mail-ob0-f173.google.com [209.85.214.173]) by mx1.freebsd.org (Postfix) with ESMTP id 770036E0 for ; Fri, 25 Jan 2013 12:15:13 +0000 (UTC) Received: by mail-ob0-f173.google.com with SMTP id dn14so269035obc.4 for ; Fri, 25 Jan 2013 04:15:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=YVYCkvWXNKjqtBC0LSfG9NZswWWC56L3iaI0YZQxe6k=; b=NlJflI/bLuM7JWeCbvxqxIrq9LPgvFeQyvemjQsyBTIy0837pyhNT8onBwpgjFDoBx d71a69ivBwj/soiRj/iE70ttQXiEYKRjw8MLnaZxTXP5Ocn8aEQv6V9rhIPi1h8hDs0+ QUgLZwow/8FWP4C8dJaNlAeujbdaUC7O9IWyGFWVZusK7YTpag383ue7uDfuMe8Z4Lha 7Qlwq99WVus3ux9KSQKt79jaT0TOr1HJkOGeguH2QdFGjT0zyACnammOC/xBNzMSOrtN shSfbPK6hidTQmhIT12J1X5IBvTvEjGdHK1icAw/SGS4rPhbXD1sl0WsVzc0qN5Hj4ws PRHA== MIME-Version: 1.0 X-Received: by 10.182.95.133 with SMTP id dk5mr4420632obb.14.1359115805239; Fri, 25 Jan 2013 04:10:05 -0800 (PST) Received: by 10.76.135.103 with HTTP; Fri, 25 Jan 2013 04:10:05 -0800 (PST) Date: Fri, 25 Jan 2013 13:10:05 +0100 Message-ID: Subject: OpenFirmware issue on P1010 From: Aleksander Dutkowski To: freebsd-ppc@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jan 2013 12:15:13 -0000 hi! I am porting FreeBSD on P1010RDB platform. I modified existing MPC85XX config (i.e. removed SMP), created p1010rdb.dts from p1020rdb.dts etc, and ran the kernel via u-boot: tftp 0x1000000 fbsd.elf go 0x10000e0 Nothing happened, so I used CodeWarrior IDE with CW USB Tap, and it turned out, that OF_install() call in sys/powerpc/booke/machedp.c returns false. I inspected this function and moreover, I inspected the structure, which is pointer from set_ofw_set linker set: $ powerpc-rtems-objdump -s kernel | grep set_ofw_set Contents of section set_ofw_set: c03694f0 c037ab54 .7.T (gdb) p (ofw_def_t)*0xc037ab54 $1 = {name = 0xc03339a4 "ofw_fdt", methods = 0xc0319350, size = 0, baseclasses = 0x0, refs = 0, ops = 0x0} As we can se, name field is correct. But this function seems to fail in strcmp(). I have found the issue [1] on bugtracker, so Im quite sure, that the problem is ith linker sets on powerpc (but this issue is quite old now ;) ), but the fix is not working for me - it crashes while compiling: cc -c -O -pipe -std=c99 -Wa,-me500 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -nostdinc -I. -I/usr/home/aleek/src/p1010-github/sys -I/usr/home/aleek/src/p1010-github/sys/contrib/altq -I/usr/home/aleek/src/p1010-github/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=15000 --param inline-unit-growth=100 --param large-function-growth=1000 -msoft-float -Wa,-many -fno-omit-frame-pointer -msoft-float -mno-altivec -ffreestanding -fstack-protector -Werror /usr/home/aleek/src/p1010-github/sys/dev/ofw/openfirm.c cc1: warnings being treated as errors /usr/home/aleek/src/p1010-github/sys/dev/ofw/openfirm.c: In function 'OF_install': /usr/home/aleek/src/p1010-github/sys/dev/ofw/openfirm.c:126: warning: assignment from incompatible pointer type /usr/home/aleek/src/p1010-github/sys/dev/ofw/openfirm.c:126: warning: comparison of distinct pointer types lacks a cast Do you have any idea, how to fix this? [1] http://www.freebsd.org/cgi/query-pr.cgi?pr=140241 -- regards aleek