From owner-freebsd-arm@FreeBSD.ORG Wed Sep 5 21:23:24 2012 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 40638106566C for ; Wed, 5 Sep 2012 21:23:24 +0000 (UTC) (envelope-from ray@ddteam.net) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id B9B1D8FC08 for ; Wed, 5 Sep 2012 21:23:23 +0000 (UTC) Received: by weyx56 with SMTP id x56so856166wey.13 for ; Wed, 05 Sep 2012 14:23:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding :x-gm-message-state; bh=6Y+jBH4LY11CqLoLg9oLR6K/lG/WaVPG4ytEdzt3xQU=; b=LTmsm3e6x0uzQ8X65looAJS0uU5odTsXw+UJyK/SMqhEYF+zKijsto1ZrgE0mjMiGo zIV7404HCxd+iN5vbV79IFW4syHX1ZkqoYLOzbGEdlB1caa8Upops1Gn8GjQuz8H31Zd 4ZqMCXBROHaQ4cXT5WMcrG+xM8LiGTXjNUigvXxNgkR3oJl8Kr8lXh60uw5+v4zsahu4 Q4++bMCROz1h46QT19ROtqywUEudP4xcY7+SkUebGr78z99mwbD/koLaoggM8kTEUWLs JZKurJMcVJuUdrg3bFXWynEkZo7A+mtcHLpmp063shFcjJqYMifLA0DSswY6MxsVUupr HkTw== Received: by 10.216.197.162 with SMTP id t34mr15331760wen.5.1346880202407; Wed, 05 Sep 2012 14:23:22 -0700 (PDT) Received: from rnote.ddteam.net (162-74-133-95.pool.ukrtel.net. [95.133.74.162]) by mx.google.com with ESMTPS id w7sm645839wiz.0.2012.09.05.14.23.19 (version=SSLv3 cipher=OTHER); Wed, 05 Sep 2012 14:23:20 -0700 (PDT) Date: Thu, 6 Sep 2012 00:23:14 +0300 From: Aleksandr Rybalko To: Hans Stimer Message-Id: <20120906002314.98ffdc38.ray@ddteam.net> In-Reply-To: References: <0DCAC001-FF06-431A-A486-2B50BE913B0D@bsdimp.com> <7E18623F-3945-4EA0-B332-5A5C717B20F0@kientzle.com> X-Mailer: Sylpheed 3.1.2 (GTK+ 2.24.5; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Gm-Message-State: ALoCoQn1nDpnyYabp/a3ZtRPYUlzd1vofdm91USvAiZ3C4LUYSOMJxqLUoiEg7a/CfjLbARCMmXV Cc: arm@freebsd.org, Tim Kientzle Subject: Re: freebsd-beaglebone install problem X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Sep 2012 21:23:24 -0000 On Wed, 5 Sep 2012 11:13:14 -0700 Hans Stimer wrote: > Tried the latest in github, but uboot isn't building. I'll have some > time later today to try and figure what is going on. > > # git clone > # git://arago-project.org/git/projects/u-boot-am33x.git /usr/home/hans/extern/freebsd-beaglebone/u-boot > > # /bin/sh beaglebsd.sh > Starting at Wed Sep 5 11:05:10 PDT 2012 > Loading configuration values > Found FreeBSD xdev tools for ARM > Found suitable U-Boot sources > in /usr/home/hans/extern/freebsd-beaglebone/u-boot Found suitable > FreeBSD source tree in /usr/armsrc Patching U-Boot. (Logging > to /usr/home/hans/extern/freebsd-beaglebone/work/_.uboot.patch.log) > Applying > patch /usr/home/hans/extern/freebsd-beaglebone/config/arm/BEAGLEBONE/files/uboot_patch1_add_libc_to_link_on_FreeBSD.patch > Applying > patch /usr/home/hans/extern/freebsd-beaglebone/config/arm/BEAGLEBONE/files/uboot_patch2_add_options_to_am335x_config.patch > Applying > patch /usr/home/hans/extern/freebsd-beaglebone/config/arm/BEAGLEBONE/files/uboot_patch3_fix_api_disk_enumeration.patch > Applying > patch /usr/home/hans/extern/freebsd-beaglebone/config/arm/BEAGLEBONE/files/uboot_patch4_shrink_spl.patch > Applying > patch /usr/home/hans/extern/freebsd-beaglebone/config/arm/BEAGLEBONE/files/uboot_patch5_set_zero_bootdelay.patch > Configuring U-Boot. (Logging > to /usr/home/hans/extern/freebsd-beaglebone/work/_.uboot.configure.log) > Building U-Boot. (Logging > to /usr/home/hans/extern/freebsd-beaglebone/work/_.uboot.build.log) > Failed to build U-Boot. Log > in /usr/home/hans/extern/freebsd-beaglebone/work/_.uboot.build.log > # > > > # cat work/_.uboot.build.log > Generating include/autoconf.mk > include/common.h:43:20: error: stdarg.h: No such file or directory > In file included from include/image.h:36, > from include/common.h:117: > include/compiler.h:8:20: error: stddef.h: No such file or directory > Generating include/autoconf.mk.dep > include/common.h:43:20: error: stdarg.h: No such file or directory > In file included from include/image.h:36, > from include/common.h:117: > include/compiler.h:8:20: error: stddef.h: No such file or directory > arm-freebsd-gcc -DDO_DEPS_ONLY \ > -g -Os -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ > -DCONFIG_SYS_TEXT_BASE=0x80100000 -DCONFIG_SPL_TEXT_BASE=0x402F0400 > -I/usr/home/hans/extern/freebsd-beaglebone/u-boot/include > -fno-builtin -ffreestanding -nostdinc -isystem include -pipe > -DCONFIG_ARM -D__ARM__ -marm -mabi=aapcs-linux -mno-thumb-interwork > -march=armv5 -Wall -Wstrict-prototypes -fno-stack-protector > -Wno-format-nonliteral -Wno-format-security \ -o lib/asm-offsets.s > lib/asm-offsets.c -c -S In file included from lib/asm-offsets.c:18: > include/common.h:43:20: error: stdarg.h: No such file or directory In > file included from include/image.h:36, from include/common.h:117, > from lib/asm-offsets.c:18: include/compiler.h:8:20: error: stddef.h: > No such file or directory In file included from lib/asm-offsets.c:18: > include/common.h:687: error: expected declaration specifiers or '...' > before 'va_list' In file included from lib/asm-offsets.c:18: > include/common.h:719: error: expected declaration specifiers or '...' > before 'va_list' gmake: *** [lib/asm-offsets.s] Error 1 > # > > > On Tuesday, September 4, 2012 at 9:28 PM, Tim Kientzle wrote: > > > > > On Sep 4, 2012, at 9:22 PM, Tim Kientzle wrote: > > > > > > > > On Sep 4, 2012, at 6:07 PM, Warner Losh wrote: > > > > > > > > > > > On Sep 4, 2012, at 4:17 PM, Hans Stimer wrote: > > > > > > > > > I'm running into problems getting FreeBSD working on the > > > > > BeagleBone. > > > > > > > > > > > > > > # cu -l /dev/ttyU1 -s 115200 > > > > > > Connected > > > > > > CCCCCCCC > > > > > > > > > > > > > > > > > > > > > > > > > > > > > The ROM code for the AM3358 SoC in the BeagleBone falls > > > back to YModem if it can't load the first-stage MLO boot loader > > > from SDHC. > > > > > > If you see this, then either the FAT partition is > > > ill-formed or the MLO file is missing. > > > > > > > > I checked the logs, and this one stood out: > > > > > > > > > > > # less _.uboot.build.log > > > > > > Generating include/autoconf.mk > > > > > > include/common.h:43:20: error: stdarg.h: No such file or > > > > > > directory In file included from include/image.h:36, > > > > > > from include/common.h:117: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Yeah, looks like U-Boot didn't build. > > > > > > I haven't updated my local U-Boot sources in a while, > > > I'll go do that and get right back to you… > > > > > > > > > Please update the freebsd-beaglebone scripts and > > try again. I found and fixed a couple of problems: > > > > * I had reversed the logic to decide if patches were already > > applied, so U-Boot wasn't getting patched. > > * One of my patches needed to be updated to work with > > the newest U-Boot sources. > > * I added some logic so that the beaglebsd.sh (http://beaglebsd.sh) > > script will actually fail with an error message if the U-Boot patch, > > configure, or build steps fail. This should make problems > > like this more obvious. > > > > Let me know if you run into any other issues. > > > > Cheers, > > > > Tim > > _______________________________________________ > freebsd-arm@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" Hi, You can try to use your FreeBSD toolchain for that, it works for me: CROSS=/usr/obj/arm.armv6/usr/src/tmp/usr/bin/ gmake ARCH=arm CROSS_COMPILE=${CROSS} distclean gmake ARCH=arm CROSS_COMPILE=${CROSS} YOUR_BOARD_config gmake ARCH=arm CROSS_COMPILE=${CROSS} Replace /usr/obj/arm.armv6/usr/src/tmp/usr/bin with your path to toolchain made by FreeBSD build system for your board. Ohhh, forget about small patch to make some math symbols also from uboot sources. -------------------------------------------------------- diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile index 39a9550..ec05e33 100644 --- a/arch/arm/lib/Makefile +++ b/arch/arm/lib/Makefile @@ -49,6 +49,15 @@ endif COBJS-y += cache.o COBJS-y += cache-cp15.o +COBJS-y += div0.o +COBJS-y += _ashldi3.o +COBJS-y += _ashrdi3.o +COBJS-y += _divsi3.o +COBJS-y += _lshrdi3.o +COBJS-y += _modsi3.o +COBJS-y += _udivsi3.o +COBJS-y += _umodsi3.o + SRCS := $(GLSOBJS:.o=.S) $(GLCOBJS:.o=.c) \ $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y)) -------------------------------------------------------- Hope that helps. WBW -- Aleksandr Rybalko