Bug 37127 - make in /sys/boot/i386/boot2 and in /sys/boot/i386/loader fail
Summary: make in /sys/boot/i386/boot2 and in /sys/boot/i386/loader fail
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: Giorgos Keramidas
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-16 06:00 UTC by Peter Marrinon
Modified: 2002-07-02 04:48 UTC (History)
0 users

See Also:


Attachments
sercomm2.diff (1.16 KB, patch)
2002-06-25 18:06 UTC, k
no flags Details | Diff
sercomm3.diff (1.02 KB, patch)
2002-06-25 18:38 UTC, k
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Marrinon 2002-04-16 06:00:03 UTC
When following 15.6.4.2 in the handbook, running make in
/sys/boot/i386/boot2 and /sys/boot/i386/loader have errors.

> cd /sys/boot/i386/boot2
> make

SNIP
/usr/libexec/elf/ld: cannot open /usr/src/sys/boot/i386/boot2/../btx/lib/crt0.o: No such file or directory
*** Error code 1

AFTER FIXING ABOVE

> make
SNIP
make: don't know how to make /usr/src/sys/boot/i386/boot2/../btx/btx/btx

AFTER RUNNING make IN ../btx/btx IT WORKS

Fix: 

WORKAROUND:
It is possible to get around the problem by going to the relevant
directories and making the missing files as outlined above.

FIX:
Change the Makefile to have correct dependencies and/or change
documentation to run a higher level make before running these commands
How-To-Repeat: Follow the instruction given in section 15.6.4.2  of the handbook.
Comment 1 k 2002-05-03 03:42:58 UTC
What do you think about this change to the handbook?
Instead of

step 4
#cd /sys/boot/i386/boot2
#make
#make install
step 5
#cd /sys/boot/i386/loader
#make
#make install

is should say

step 4
#cd /sys/boot/
#make
#cd /sys/boot/i386/boot2
#make install
#cd /sys/boot/i386/boot2
#make install

This patch is to doc/en_US.ISO8859-1/books/handbook/serialcomms/chapter.sgml

--- chapter.sgml?rev=1.59	Mon Apr 29 14:22:30 2002
+++ chapter.sgml	Fri May  3 04:30:22 2002
@@ -2437,18 +2437,13 @@
 	  </step>
 	  
 	  <step>
-	    <para>Recompile and install the boot blocks:</para>
+	    <para>Recompile and install the boot blocks and the boot loader:</para>
 	    
-	    <screen>&prompt.root; <userinput>cd /sys/boot/i386/boot2</userinput>
-&prompt.root; <userinput>make</userinput>
-&prompt.root; <userinput>make install</userinput></screen>
-	  </step>
-	  
-	  <step>
-	    <para>Recompile and install the boot loader:</para>
-	    
-	    <screen>&prompt.root; <userinput>cd /sys/boot/i386/loader</userinput>
+	    <screen>&prompt.root; <userinput>cd /sys/boot</userinput>
 &prompt.root; <userinput>make</userinput>
+&prompt.root; <userinput>cd /sys/boot/i386/boot2</userinput>
+&prompt.root; <userinput>make install</userinput>
+&prompt.root; <userinput>cd /sys/boot/i386/loader</userinput>
 &prompt.root; <userinput>make install</userinput></screen>
         </step>
 	  

/Johan K
-- 
Johan Karlsson		mailto:k@numeri.campus.luth.se
Comment 2 Johan Karlsson freebsd_committer freebsd_triage 2002-05-03 03:43:37 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-doc

Over to -doc for consideration.
Comment 3 k 2002-06-15 19:44:00 UTC
Hi John,

as boot/block maintainer can you comment on my proposed
patch to the handbook about how to build and install
the boot block/loader.

See the PR for details
http://www.FreeBSD.org/cgi/query-pr.cgi?pr=kern/37127
(see the patch not the broken example I gave)

Thanks
/Johan K

-- 
Johan Karlsson		mailto:k@numeri.campus.luth.se
Comment 4 John Baldwin freebsd_committer freebsd_triage 2002-06-25 15:43:04 UTC
On 15-Jun-2002 Johan Karlsson wrote:
> 
> Hi John,
> 
> as boot/block maintainer can you comment on my proposed
> patch to the handbook about how to build and install
> the boot block/loader.
> 
> See the PR for details
> http://www.FreeBSD.org/cgi/query-pr.cgi?pr=kern/37127
> (see the patch not the broken example I gave)

Looks good.  Actually, you might as well change it to do the
following:

# cd /sys/boot/<arch>
# make
# make install

To go ahead and install all the various boot blocks.

-- 

John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/
Comment 5 k 2002-06-25 18:06:40 UTC
On Tue, Jun 25, 2002 at 10:43 (-0400) +0000, John Baldwin wrote:
> 
> Looks good.  Actually, you might as well change it to do the
> following:
> 
> # cd /sys/boot/<arch>
> # make
> # make install
> 
> To go ahead and install all the various boot blocks.

This does not work (at least not on i386 -stable)
since ficl is need to build the loader.

I suggest either

# cd /sys/boot
# make
# cd /sys/boot/<arch>
# make install

or

# cd /sys/boot
# make
# make install

On i386 -stable the result is the same but since I'm not
sure about other arch I guess the safe thing is to do the
first.

Hence I suggest to use the atteched patch.

-doc folks, note that I have used <replaceable> around 'arch' 
but I'm not sure that is the correct thing to do. Please change 
that if needed before committing.



/Johan K

-- 
Johan Karlsson		mailto:k@numeri.campus.luth.se
Comment 6 John Baldwin freebsd_committer freebsd_triage 2002-06-25 18:28:45 UTC
On 25-Jun-2002 Johan Karlsson wrote:
> On Tue, Jun 25, 2002 at 10:43 (-0400) +0000, John Baldwin wrote:
>> 
>> Looks good.  Actually, you might as well change it to do the
>> following:
>> 
>> # cd /sys/boot/<arch>
>> # make
>> # make install
>> 
>> To go ahead and install all the various boot blocks.
> 
> This does not work (at least not on i386 -stable)
> since ficl is need to build the loader.
> 
> I suggest either
> 
># cd /sys/boot
># make
># cd /sys/boot/<arch>
># make install
> 
> or
> 
># cd /sys/boot
># make
># make install

Right, duh.  This second one is best.  It also has the nice side
effect of not being as machine-specific.

> On i386 -stable the result is the same but since I'm not
> sure about other arch I guess the safe thing is to do the
> first.

Do the second. :)

-- 

John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/
Comment 7 k 2002-06-25 18:38:27 UTC
On Tue, Jun 25, 2002 at 13:28 (-0400) +0000, John Baldwin wrote:
> > I suggest either
> > 
> ># cd /sys/boot
> ># make
> ># cd /sys/boot/<arch>
> ># make install
> > 
> > or
> > 
> ># cd /sys/boot
> ># make
> ># make install
> 
> Right, duh.  This second one is best.  It also has the nice side
> effect of not being as machine-specific.
> 
> > On i386 -stable the result is the same but since I'm not
> > sure about other arch I guess the safe thing is to do the
> > first.
> 
> Do the second. :)

Ok, -doc folks please use this attached patch.

/Johan K

-- 
Johan Karlsson		mailto:k@numeri.campus.luth.se
Comment 8 Giorgos Keramidas freebsd_committer freebsd_triage 2002-07-02 04:47:10 UTC
State Changed
From-To: open->closed

Thanks for submitting the new instructions.  The patch would not 
apply, but I tried to make the changes manually.  If I've managed to 
make any mistakes in the process, drop me a note to correct this. 


Comment 9 Giorgos Keramidas freebsd_committer freebsd_triage 2002-07-02 04:47:10 UTC
Responsible Changed
From-To: freebsd-doc->keramida