Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 292603
b: refs/heads/master
c: dfbc2d7
h: refs/heads/master
i:
  292601: c063708
  292599: f8efbb5
v: v3
  • Loading branch information
Stephen Rothwell authored and Benjamin Herrenschmidt committed Mar 21, 2012
1 parent 9fa38b8 commit 01db850
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a6626ffe09d379bad4d0e49885f9195946ac875d
refs/heads/master: dfbc2d75c1bd47c3186fa91f1655ea2f3825b0ec
22 changes: 13 additions & 9 deletions trunk/arch/powerpc/boot/wrapper
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ tmp=$tmpdir/zImage.$$.o
ksection=.kernel:vmlinux.strip
isection=.kernel:initrd
link_address='0x400000'
make_space=y

case "$platform" in
pseries)
Expand Down Expand Up @@ -210,6 +211,7 @@ ps3)
ksection=.kernel:vmlinux.bin
isection=.kernel:initrd
link_address=''
make_space=n
pie=
;;
ep88xc|ep405|ep8248e)
Expand Down Expand Up @@ -278,17 +280,19 @@ else
rm -f $vmz.$$
fi

# Round the size to next higher MB limit
round_size=$(((strip_size + 0xfffff) & 0xfff00000))
if [ "$make_space" = "y" ]; then
# Round the size to next higher MB limit
round_size=$(((strip_size + 0xfffff) & 0xfff00000))

round_size=0x$(printf "%x" $round_size)
link_addr=$(printf "%d" $link_address)
round_size=0x$(printf "%x" $round_size)
link_addr=$(printf "%d" $link_address)

if [ $link_addr -lt $strip_size ]; then
echo "INFO: Uncompressed kernel (size 0x$(printf "%x\n" $strip_size))" \
"overlaps the address of the wrapper($link_address)"
echo "INFO: Fixing the link_address of wrapper to ($round_size)"
link_address=$round_size
if [ $link_addr -lt $strip_size ]; then
echo "INFO: Uncompressed kernel (size 0x$(printf "%x\n" $strip_size))" \
"overlaps the address of the wrapper($link_address)"
echo "INFO: Fixing the link_address of wrapper to ($round_size)"
link_address=$round_size
fi
fi

vmz="$vmz$gzip"
Expand Down

0 comments on commit 01db850

Please sign in to comment.