Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
b748febd
Commit
b748febd
authored
Sep 29, 2002
by
Pete Zaitcev
Committed by
David S. Miller
Sep 29, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[sparc] Stalingrad for kbuild army.
parent
be8ce16f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
63 additions
and
18 deletions
+63
-18
Documentation/sparc/README-2.5
Documentation/sparc/README-2.5
+46
-0
arch/sparc/Makefile
arch/sparc/Makefile
+7
-6
arch/sparc/boot/Makefile
arch/sparc/boot/Makefile
+10
-12
No files found.
Documentation/sparc/README-2.5
0 → 100644
View file @
b748febd
BTFIXUP
-------
To build new kernels you have to issue "make image". The ready kernel
in ELF format is placed in arch/sparc/boot/image. Explanation is below.
BTFIXUP is a unique feature of Linux/sparc among other architectures,
developed by Jakub Jelinek (I think... Obviously David S. Miller took
part, too). It allows to boot the same kernel at different
sub-architectures, such as sun4c, sun4m, sun4d, where SunOS uses
different kernels. This feature is convinient for people who you move
disks between boxes and for distrution builders.
To function, BTFIXUP must link the kernel "in the draft" first,
analyze the result, write a special stub code based on that, and
build the final kernel with the stub (btfix.o).
Kai Germaschewski improved the build system of the kernel in the 2.5 series
significantly. Unfortunately, the traditional way of running the draft
linking from architecture specific Makefile before the actual linking
by generic Makefile is nearly impossible to support properly in the
new build system. Therefore, the way we integrate BTFIXUP with the
build system was changed in 2.5.40. Now, generic Makefile performs
the draft linking and stores the result in file vmlinux. Architecture
specific post-processing invokes BTFIXUP machinery and final linking
in the same way as other architectures do bootstraps.
Implications of that change are as follows.
1. Hackers must type "make image" now, instead of just "make", in the same
way as s390 people do now. It is analogous to "make bzImage" on i386.
This does NOT affect sparc64, you continue to use "make" to build sparc64
kernels.
2. vmlinux is not the final kernel, so RPM builders have to adjust
their spec files (if they delivered vmlinux for debugging).
System.map generated for vmlinux is still valid.
3. Scripts that produce a.out images have to be changed. First, if they
invoke make, they have to use "make image". Second, they have to pick up
the new kernel in arch/sparc/boot/image instead of vmlinux.
4. Since we are compliant with Kai's build system now, make -j is permitted.
-- Pete Zaitcev
zaitcev@yahoo.com
arch/sparc/Makefile
View file @
b748febd
...
@@ -31,21 +31,22 @@ CFLAGS := $(CFLAGS) -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7
...
@@ -31,21 +31,22 @@ CFLAGS := $(CFLAGS) -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7
endif
endif
#LDFLAGS_vmlinux = -N -Ttext 0xf0004000
#LDFLAGS_vmlinux = -N -Ttext 0xf0004000
# Since 2.5.40, the first stage is left not btfix-ed.
# Actual linking is done with "make image".
LDFLAGS_vmlinux
=
-r
HEAD
:=
arch
/sparc/kernel/head.o
arch
/sparc/kernel/init_task.o
HEAD
:=
arch
/sparc/kernel/head.o
arch
/sparc/kernel/init_task.o
core-y
+=
arch
/sparc/kernel/
arch
/sparc/mm/
arch
/sparc/math-emu/
core-y
+=
arch
/sparc/kernel/
arch
/sparc/mm/
arch
/sparc/math-emu/
libs-y
+=
arch
/sparc/prom/
arch
/sparc/lib/
libs-y
+=
arch
/sparc/prom/
arch
/sparc/lib/
# This one has to come last
SUBDIRS
+=
arch
/sparc/boot
CORE_FILES_NO_BTFIX
:=
$(
addsuffix
built-in.o,
$
(
core-y
))
CORE_FILES
+=
arch
/sparc/boot/btfix.o
# Export what is needed by arch/sparc/boot/Makefile
# Export what is needed by arch/sparc/boot/Makefile
export
CORE_FILES_NO_BTFIX
export
CORE_FILES
export
INIT
export
INIT
image
:
vmlinux
$(MAKE)
-C
arch
/sparc/boot image
archclean
:
archclean
:
rm
-f
$(TOPDIR)
/vmlinux.aout
rm
-f
$(TOPDIR)
/vmlinux.aout
-
$(MAKE)
-C
arch
/sparc/boot clean
-
$(MAKE)
-C
arch
/sparc/boot clean
...
...
arch/sparc/boot/Makefile
View file @
b748febd
...
@@ -20,25 +20,23 @@ btfixupprep: btfixupprep.c
...
@@ -20,25 +20,23 @@ btfixupprep: btfixupprep.c
$(HOSTCC)
$(HOSTCFLAGS)
-o
btfixupprep btfixupprep.c
$(HOSTCC)
$(HOSTCFLAGS)
-o
btfixupprep btfixupprep.c
clean
:
clean
:
rm
-f
btfixupprep piggyback tftpboot.img btfix.o btfix.s
rm
-f
btfixupprep piggyback tftpboot.img btfix.o btfix.s
image
#BTOBJS := $(HEAD) init/main.o init/version.o
BTOBJS
:=
$(HEAD)
$(INIT)
BTOBJS
:=
$(HEAD)
$(INIT)
BTLIBS
:=
$(CORE_FILES
_NO_BTFIX
)
$(LIBS)
\
BTLIBS
:=
$(CORE_FILES)
$(LIBS)
\
$(DRIVERS)
$(NETWORKS)
$(DRIVERS)
$(NETWORKS)
# I wanted to make this depend upon BTOBJS so that a parallel
# Actual linking
# build would work, but this fails because $(HEAD) cannot work
image
:
btfix.o
# properly as it will cause head.o to be built with the implicit
$(LD)
$(LDFLAGS)
-T
../vmlinux.lds.s
\
# rules not the ones in kernel/Makefile. Someone please fix. --DaveM
$(
patsubst
%,
$(TOPDIR)
/%,
$(BTOBJS)
)
\
vmlinux.o
:
FORCE
$(LD)
$(LDFLAGS)
-r
$(
patsubst
%,
$(TOPDIR)
/%,
$(BTOBJS)
)
\
--start-group
\
--start-group
\
$(
patsubst
%,
$(TOPDIR)
/%,
$(BTLIBS)
)
\
$(
patsubst
%,
$(TOPDIR)
/%,
$(BTLIBS)
)
\
--end-group
-o
vmlinux.o
btfix.o
\
--end-group
-o
image
btfix.s
:
btfixupprep
vmlinux.o
btfix.s
:
btfixupprep
$(TOPDIR)/vmlinux
$(OBJDUMP)
-x
vmlinux.o
| ./btfixupprep
>
btfix.s
$(OBJDUMP)
-x
$(TOPDIR)
/vmlinux
| ./btfixupprep
>
btfix.s
btfix.o
:
btfix.s
btfix.o
:
btfix.s
$(CC)
-c
-o
btfix.o btfix.s
$(CC)
-c
-o
btfix.o btfix.s
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment