From owner-freebsd-current@FreeBSD.ORG Mon Feb 4 13:35:15 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F2CD16A419 for ; Mon, 4 Feb 2008 13:35:15 +0000 (UTC) (envelope-from qpadla@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.176]) by mx1.freebsd.org (Postfix) with ESMTP id E00C213C4CC for ; Mon, 4 Feb 2008 13:35:14 +0000 (UTC) (envelope-from qpadla@gmail.com) Received: by wa-out-1112.google.com with SMTP id k17so2455677waf.3 for ; Mon, 04 Feb 2008 05:35:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:reply-to:to:subject:date:user-agent:references:in-reply-to:cc:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; bh=YG95X3rtyOcLf2hp5E/a2xmTRKK+2l8c8HuARp0sRNU=; b=miApJKy3WEu6cEVXMc5b0t0vFJa6wnzPFgVK5xxDxmT7TXy5mz/xaveKJKUO6hIE53+OBACRcyzI4bAxyJn3w3l4Avj9uc3HpzpmPTuN1OjOHbSMcPulC4h0Q51C39I2sZnSP9vTlMA2YUJuG+9y2vKuAoW36HIXK2S++kzrN0Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:reply-to:to:subject:date:user-agent:references:in-reply-to:cc:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=pMfkKL6JYi7qAyOB34ZFocIxyRFSmqLQlwDkHX3G0qG3smoylaWboCWyixg4WJHZd0zM6sxQ7ThoD42XocOYKF5aA0EvcscFYm4Vgd2s1NdblzHdTYF60hOurAB3uXRK4vLvasy0xfFDWvXgnDel+Rx5p2zWqQxGtHnAh1Z8TOA= Received: by 10.114.57.1 with SMTP id f1mr6926364waa.15.1202132114125; Mon, 04 Feb 2008 05:35:14 -0800 (PST) Received: from atlas.local ( [89.162.141.1]) by mx.google.com with ESMTPS id 5sm19950555nfv.32.2008.02.04.05.35.11 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 04 Feb 2008 05:35:12 -0800 (PST) From: Nikolay Pavlov To: Oliver Fromme Date: Mon, 4 Feb 2008 15:35:07 +0200 User-Agent: KMail/1.9.6 (enterprise 0.20070907.709405) References: <200802041237.m14CbiaU070447@lurza.secnetix.de> In-Reply-To: <200802041237.m14CbiaU070447@lurza.secnetix.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200802041535.08296.qpadla@gmail.com> Cc: freebsd-current@freebsd.org Subject: Re: Broken loader on 7.0-RC1 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: qpadla@gmail.com List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2008 13:35:15 -0000 On Monday 04 February 2008 14:37:44 Oliver Fromme wrote: > Nikolay Pavlov wrote: > > While building 7.0-RC1 i've discovered that the loader file is broken > > in my box and i am unable to boot using it. I've already hit this > > problem 2 months ago. After playing a bit i've found the way on how > > to reproduce it easily: > > > > ~# cd /usr/src/sys/boot/i386 > > /usr/src/sys/boot/i386# make btx libi386 loader > > I'm afraid I can't reproduce it. I've tried the exact same > command, and it built a working loader for me. Are you > building on i386 or amd64? They use the same i386 loader, > but there are slight differences in the build process. > > Note that your command does not build ficl nor libstand, > both of which are required for the loader. Did you build > them before? (However, you should get an error message > if one of them is missing.) > > A simple way to check is to use this command: > strings loader | grep /src/ > Compare the output for the working and the non-working > loader. > > > [...] > > client: fmt=elf size=283b0 text=22038 data=4248 bss=60b8 entry=0 > > Mine looks like this: > > client: fmt=elf size=3b3b0 text=342d8 data=5248 bss=60d8 entry=0 > > Clearly your loader.bin ELF binary (called "client" in BTX > terms) is much smaller. Something must be missing. > > You can also check and compare the link commands (that's > the last "cc" command in the make process, only a few lines > above the snippet that you posted). Mine looks like this: > > cc -O2 -fno-strict-aliasing -pipe -DLOADER_NFS_SUPPORT -DBOOT_FORTH > -I/usr/src/sys/boot/i386/loader/../../ficl > -I/usr/src/sys/boot/i386/loader/../../ficl/i386 -DLOADER_GZIP_SUPPORT > -I/usr/src/sys/boot/i386/loader/../../common -I. -Wall > -I/usr/src/sys/boot/i386/loader/.. > -I/usr/src/sys/boot/i386/loader/../btx/lib -ffreestanding > -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 > -mno-sse3 -static -Ttext 0x0 -nostdlib -o loader.sym > /usr/obj/usr/src/sys/boot/i386/loader/../btx/lib/crt0.o main.o conf.o > vers.o boot.o commands.o console.o devopen.o interp.o interp_backslash.o > interp_parse.o ls.o misc.o module.o panic.o load_elf32.o > load_elf32_obj.o reloc_elf32.o load_elf64.o load_elf64_obj.o > reloc_elf64.o bcache.o isapnp.o pnp.o interp_forth.o > /usr/obj/usr/src/sys/boot/i386/loader/../../ficl/libficl.a > /usr/obj/usr/src/sys/boot/i386/loader/../libi386/libi386.a -lstand > > If you're on amd64, there should be additional options > "-m32 -march=i386 -m elf_i386_fbsd", but other than that > it should look exactly the same. > > Best regards > Oliver Ok. I've found the source of the problem. I have "WITHOUT_FORTH=YES" variable in my src.conf. There would be no errors during the compilation with this variable set and you'll get the broken loader. I think it should be documented in src.conf manual. In any way sorry for that noise. -- ====================================================================== - Best regards, Nikolay Pavlov. <<<----------------------------------- ======================================================================