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
71373068
Commit
71373068
authored
Nov 21, 2007
by
Paul Mundt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sh: Merge the sh64 zImage bits.
Signed-off-by:
Paul Mundt
<
lethal@linux-sh.org
>
parent
55183e9b
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
80 additions
and
180 deletions
+80
-180
arch/sh/boot/compressed/Makefile
arch/sh/boot/compressed/Makefile
+4
-42
arch/sh/boot/compressed/Makefile_32
arch/sh/boot/compressed/Makefile_32
+43
-0
arch/sh/boot/compressed/Makefile_64
arch/sh/boot/compressed/Makefile_64
+7
-8
arch/sh/boot/compressed/cache.c
arch/sh/boot/compressed/cache.c
+12
-0
arch/sh/boot/compressed/head_32.S
arch/sh/boot/compressed/head_32.S
+0
-0
arch/sh/boot/compressed/head_64.S
arch/sh/boot/compressed/head_64.S
+14
-15
arch/sh/boot/compressed/misc_32.c
arch/sh/boot/compressed/misc_32.c
+0
-0
arch/sh/boot/compressed/misc_64.c
arch/sh/boot/compressed/misc_64.c
+0
-0
arch/sh/boot/compressed/vmlinux_64.lds
arch/sh/boot/compressed/vmlinux_64.lds
+0
-0
arch/sh64/boot/Makefile
arch/sh64/boot/Makefile
+0
-20
arch/sh64/boot/compressed/cache.c
arch/sh64/boot/compressed/cache.c
+0
-39
arch/sh64/boot/compressed/install.sh
arch/sh64/boot/compressed/install.sh
+0
-56
No files found.
arch/sh/boot/compressed/Makefile
View file @
71373068
#
ifeq
($(CONFIG_SUPERH32),y)
# linux/arch/sh/boot/compressed/Makefile
include
${srctree}/arch/sh/boot/compressed/Makefile_32
#
else
# create a compressed vmlinux image from the original vmlinux
include
${srctree}/arch/sh/boot/compressed/Makefile_64
#
targets
:=
vmlinux vmlinux.bin vmlinux.bin.gz head.o misc.o piggy.o
EXTRA_AFLAGS
:=
-traditional
OBJECTS
=
$(obj)
/head.o
$(obj)
/misc.o
ifdef
CONFIG_SH_STANDARD_BIOS
OBJECTS
+=
$(obj)
/../../kernel/sh_bios.o
endif
endif
#
# IMAGE_OFFSET is the load offset of the compression loader
#
IMAGE_OFFSET
:=
$(
shell
/bin/bash
-c
'printf "0x%08x" \
$$[
$(CONFIG_PAGE_OFFSET)
+ \
$(CONFIG_MEMORY_START)
+ \
$(CONFIG_BOOT_LINK_OFFSET)
]'
)
LIBGCC
:=
$(
shell
$(CC)
$(KBUILD_CFLAGS)
-print-libgcc-file-name
)
LDFLAGS_vmlinux
:=
-Ttext
$(IMAGE_OFFSET)
-e
startup
-T
$(obj)
/../../kernel/vmlinux.lds
$(obj)/vmlinux
:
$(OBJECTS) $(obj)/piggy.o $(LIBGCC) FORCE
$(
call
if_changed,ld
)
@
:
$(obj)/vmlinux.bin
:
vmlinux FORCE
$(
call
if_changed,objcopy
)
$(obj)/vmlinux.bin.gz
:
$(obj)/vmlinux.bin FORCE
$(
call
if_changed,gzip
)
LDFLAGS_piggy.o
:=
-r
--format
binary
--oformat
elf32-sh-linux
-T
OBJCOPYFLAGS
+=
-R
.empty_zero_page
$(obj)/piggy.o
:
$(obj)/vmlinux.scr $(obj)/vmlinux.bin.gz FORCE
$(
call
if_changed,ld
)
arch/sh/boot/compressed/Makefile_32
0 → 100644
View file @
71373068
#
# linux/arch/sh/boot/compressed/Makefile
#
# create a compressed vmlinux image from the original vmlinux
#
targets := vmlinux vmlinux.bin vmlinux.bin.gz \
head_32.o misc_32.o piggy.o
EXTRA_AFLAGS := -traditional
OBJECTS = $(obj)/head_32.o $(obj)/misc_32.o
ifdef CONFIG_SH_STANDARD_BIOS
OBJECTS += $(obj)/../../kernel/sh_bios.o
endif
#
# IMAGE_OFFSET is the load offset of the compression loader
#
IMAGE_OFFSET := $(shell /bin/bash -c 'printf "0x%08x" \
$$[$(CONFIG_PAGE_OFFSET) + \
$(CONFIG_MEMORY_START) + \
$(CONFIG_BOOT_LINK_OFFSET)]')
LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -e startup -T $(obj)/../../kernel/vmlinux.lds
$(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o $(LIBGCC) FORCE
$(call if_changed,ld)
@:
$(obj)/vmlinux.bin: vmlinux FORCE
$(call if_changed,objcopy)
$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
$(call if_changed,gzip)
LDFLAGS_piggy.o := -r --format binary --oformat elf32-sh-linux -T
OBJCOPYFLAGS += -R .empty_zero_page
$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.gz FORCE
$(call if_changed,ld)
arch/sh
64/boot/compressed/Makefile
→
arch/sh
/boot/compressed/Makefile_64
View file @
71373068
...
@@ -12,21 +12,21 @@
...
@@ -12,21 +12,21 @@
#
#
targets := vmlinux vmlinux.bin vmlinux.bin.gz \
targets := vmlinux vmlinux.bin vmlinux.bin.gz \
head.o misc.o cache.o piggy.o vmlinux.lds
head_64.o misc_64.o cache.o piggy.o
EXTRA_AFLAGS := -traditional
EXTRA_AFLAGS := -traditional
OBJECTS
:=
$(obj)
/head.o
$(obj)
/misc.o
$(obj)
/cache.o
OBJECTS := $(obj)/vmlinux_64.lds $(obj)/head_64.o $(obj)/misc_64.o \
$(obj)/cache.o
#
#
# ZIMAGE_OFFSET is the load offset of the compression loader
# ZIMAGE_OFFSET is the load offset of the compression loader
# (4M for the kernel plus 64K for this loader)
# (4M for the kernel plus 64K for this loader)
#
#
ZIMAGE_OFFSET
=
$(
shell
printf
"0x%8x"
$$
[
$(CONFIG_MEMORY_START)
+0x400000+0x10000]
)
ZIMAGE_OFFSET := $(shell /bin/bash -c 'printf "0x%08x" \
$$[$(CONFIG_PAGE_OFFSET)+0x400000+0x10000]')
LDFLAGS_vmlinux := -Ttext $(ZIMAGE_OFFSET) -e startup \
LDFLAGS_vmlinux := -Ttext $(ZIMAGE_OFFSET) -e startup \
-T
$(obj)
/../../kernel/vmlinux.lds
\
-T $(obj)/../../kernel/vmlinux.lds
--no-warn-mismatch
$(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o FORCE
$(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o FORCE
$(call if_changed,ld)
$(call if_changed,ld)
...
@@ -41,6 +41,5 @@ $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
...
@@ -41,6 +41,5 @@ $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
LDFLAGS_piggy.o := -r --format binary --oformat elf32-sh64-linux -T
LDFLAGS_piggy.o := -r --format binary --oformat elf32-sh64-linux -T
OBJCOPYFLAGS += -R .empty_zero_page
OBJCOPYFLAGS += -R .empty_zero_page
$(obj)/piggy.o
:
$(obj)/vmlinux.
lds
$(obj)/vmlinux.bin.gz FORCE
$(obj)/piggy.o: $(obj)/vmlinux.
scr
$(obj)/vmlinux.bin.gz FORCE
$(call if_changed,ld)
$(call if_changed,ld)
arch/sh/boot/compressed/cache.c
0 → 100644
View file @
71373068
int
cache_control
(
unsigned
int
command
)
{
volatile
unsigned
int
*
p
=
(
volatile
unsigned
int
*
)
0x80000000
;
int
i
;
for
(
i
=
0
;
i
<
(
32
*
1024
);
i
+=
32
)
{
(
void
)
*
p
;
p
+=
(
32
/
sizeof
(
int
));
}
return
0
;
}
arch/sh/boot/compressed/head.S
→
arch/sh/boot/compressed/head
_32
.S
View file @
71373068
File moved
arch/sh
64/boot/compressed/head
.S
→
arch/sh
/boot/compressed/head_64
.S
View file @
71373068
...
@@ -13,11 +13,10 @@
...
@@ -13,11 +13,10 @@
*
Modification
for
compressed
loader
:
*
Modification
for
compressed
loader
:
*
Copyright
(
C
)
2002
Stuart
Menefy
(
stuart
.
menefy
@
st
.
com
)
*
Copyright
(
C
)
2002
Stuart
Menefy
(
stuart
.
menefy
@
st
.
com
)
*/
*/
#include <linux/linkage.h>
#include <linux/linkage.h>
#include <asm/registers.h>
#include <asm/cache.h>
#include <asm/cache.h>
#include <asm/mmu_context.h>
#include <asm/cpu/mmu_context.h>
#include <asm/cpu/registers.h>
/*
/*
*
Fixed
TLB
entries
to
identity
map
the
beginning
of
RAM
*
Fixed
TLB
entries
to
identity
map
the
beginning
of
RAM
...
@@ -51,14 +50,14 @@ startup:
...
@@ -51,14 +50,14 @@ startup:
*
uninitialized
target
registers
.
*
uninitialized
target
registers
.
*
This
must
be
executed
before
the
first
branch
.
*
This
must
be
executed
before
the
first
branch
.
*/
*/
ptabs
/
u
ZERO
,
tr0
ptabs
/
u
r63
,
tr0
ptabs
/
u
ZERO
,
tr1
ptabs
/
u
r63
,
tr1
ptabs
/
u
ZERO
,
tr2
ptabs
/
u
r63
,
tr2
ptabs
/
u
ZERO
,
tr3
ptabs
/
u
r63
,
tr3
ptabs
/
u
ZERO
,
tr4
ptabs
/
u
r63
,
tr4
ptabs
/
u
ZERO
,
tr5
ptabs
/
u
r63
,
tr5
ptabs
/
u
ZERO
,
tr6
ptabs
/
u
r63
,
tr6
ptabs
/
u
ZERO
,
tr7
ptabs
/
u
r63
,
tr7
synci
synci
/
*
/
*
...
@@ -69,7 +68,7 @@ startup:
...
@@ -69,7 +68,7 @@ startup:
pta
1
f
,
tr1
pta
1
f
,
tr1
movi
ITLB_FIXED
,
r21
movi
ITLB_FIXED
,
r21
movi
ITLB_LAST_VAR_UNRESTRICTED
+
TLB_STEP
,
r22
movi
ITLB_LAST_VAR_UNRESTRICTED
+
TLB_STEP
,
r22
1
:
putcfg
r21
,
0
,
ZERO
/*
Clear
MMUIR
[
n
]
.
PTEH
.
V
*/
1
:
putcfg
r21
,
0
,
r63
/*
Clear
MMUIR
[
n
]
.
PTEH
.
V
*/
addi
r21
,
TLB_STEP
,
r21
addi
r21
,
TLB_STEP
,
r21
bne
r21
,
r22
,
tr1
bne
r21
,
r22
,
tr1
...
@@ -77,7 +76,7 @@ startup:
...
@@ -77,7 +76,7 @@ startup:
pta
1
f
,
tr1
pta
1
f
,
tr1
movi
DTLB_FIXED
,
r21
movi
DTLB_FIXED
,
r21
movi
DTLB_LAST_VAR_UNRESTRICTED
+
TLB_STEP
,
r22
movi
DTLB_LAST_VAR_UNRESTRICTED
+
TLB_STEP
,
r22
1
:
putcfg
r21
,
0
,
ZERO
/*
Clear
MMUDR
[
n
]
.
PTEH
.
V
*/
1
:
putcfg
r21
,
0
,
r63
/*
Clear
MMUDR
[
n
]
.
PTEH
.
V
*/
addi
r21
,
TLB_STEP
,
r21
addi
r21
,
TLB_STEP
,
r21
bne
r21
,
r22
,
tr1
bne
r21
,
r22
,
tr1
...
@@ -133,7 +132,7 @@ startup:
...
@@ -133,7 +132,7 @@ startup:
pt
1
f
,
tr1
pt
1
f
,
tr1
movi
datalabel
__bss_start
,
r22
movi
datalabel
__bss_start
,
r22
movi
datalabel
_end
,
r23
movi
datalabel
_end
,
r23
1
:
st.l
r22
,
0
,
ZERO
1
:
st.l
r22
,
0
,
r63
addi
r22
,
4
,
r22
addi
r22
,
4
,
r22
bne
r22
,
r23
,
tr1
bne
r22
,
r23
,
tr1
...
@@ -161,4 +160,4 @@ startup:
...
@@ -161,4 +160,4 @@ startup:
/
*
Shouldn
't return here, but just in case, loop forever */
/
*
Shouldn
't return here, but just in case, loop forever */
pt
1
f
,
tr0
pt
1
f
,
tr0
1
:
blink
tr0
,
ZERO
1
:
blink
tr0
,
r63
arch/sh/boot/compressed/misc.c
→
arch/sh/boot/compressed/misc
_32
.c
View file @
71373068
File moved
arch/sh
64/boot/compressed/misc
.c
→
arch/sh
/boot/compressed/misc_64
.c
View file @
71373068
File moved
arch/sh
64/boot/compressed/vmlinux.lds.S
→
arch/sh
/boot/compressed/vmlinux_64.lds
View file @
71373068
File moved
arch/sh64/boot/Makefile
deleted
100644 → 0
View file @
55183e9b
#
# arch/sh64/boot/Makefile
#
# This file is subject to the terms and conditions of the GNU General Public
# License. See the file "COPYING" in the main directory of this archive
# for more details.
#
# Copyright (C) 2002 Stuart Menefy
#
targets
:=
zImage
subdir-
:=
compressed
$(obj)/zImage
:
$(obj)/compressed/vmlinux FORCE
$(
call
if_changed,objcopy
)
@
echo
'Kernel: $@ is ready'
$(obj)/compressed/vmlinux
:
FORCE
$(Q)$(MAKE)
$(build)
=
$(obj)
/compressed
$@
arch/sh64/boot/compressed/cache.c
deleted
100644 → 0
View file @
55183e9b
/*
* arch/shmedia/boot/compressed/cache.c -- simple cache management functions
*
* Code extracted from sh-ipl+g, sh-stub.c, which has the copyright:
*
* This is originally based on an m68k software stub written by Glenn
* Engel at HP, but has changed quite a bit.
*
* Modifications for the SH by Ben Lee and Steve Chamberlain
*
****************************************************************************
THIS SOFTWARE IS NOT COPYRIGHTED
HP offers the following for use in the public domain. HP makes no
warranty with regard to the software or it's performance and the
user accepts the software "AS IS" with all faults.
HP DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED, WITH REGARD
TO THIS SOFTWARE INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
****************************************************************************/
#define CACHE_ENABLE 0
#define CACHE_DISABLE 1
int
cache_control
(
unsigned
int
command
)
{
volatile
unsigned
int
*
p
=
(
volatile
unsigned
int
*
)
0x80000000
;
int
i
;
for
(
i
=
0
;
i
<
(
32
*
1024
);
i
+=
32
)
{
(
void
*
)
*
p
;
p
+=
(
32
/
sizeof
(
int
));
}
return
0
;
}
arch/sh64/boot/compressed/install.sh
deleted
100644 → 0
View file @
55183e9b
#!/bin/sh
#
# arch/sh/boot/install.sh
#
# This file is subject to the terms and conditions of the GNU General Public
# License. See the file "COPYING" in the main directory of this archive
# for more details.
#
# Copyright (C) 1995 by Linus Torvalds
#
# Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin
# Adapted from code in arch/i386/boot/install.sh by Russell King
# Adapted from code in arch/arm/boot/install.sh by Stuart Menefy
#
# "make install" script for sh architecture
#
# Arguments:
# $1 - kernel version
# $2 - kernel image file
# $3 - kernel map file
# $4 - default install path (blank if root directory)
#
# User may have a custom install script
if
[
-x
/sbin/installkernel
]
;
then
exec
/sbin/installkernel
"
$@
"
fi
if
[
"
$2
"
=
"zImage"
]
;
then
# Compressed install
echo
"Installing compressed kernel"
if
[
-f
$4
/vmlinuz-
$1
]
;
then
mv
$4
/vmlinuz-
$1
$4
/vmlinuz.old
fi
if
[
-f
$4
/System.map-
$1
]
;
then
mv
$4
/System.map-
$1
$4
/System.old
fi
cat
$2
>
$4
/vmlinuz-
$1
cp
$3
$4
/System.map-
$1
else
# Normal install
echo
"Installing normal kernel"
if
[
-f
$4
/vmlinux-
$1
]
;
then
mv
$4
/vmlinux-
$1
$4
/vmlinux.old
fi
if
[
-f
$4
/System.map
]
;
then
mv
$4
/System.map
$4
/System.old
fi
cat
$2
>
$4
/vmlinux-
$1
cp
$3
$4
/System.map
fi
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