Age | Commit message (Collapse) | Author | Files | Lines |
|
Some older GCC version (at least 4.6) emits calls to __bswapsi2() when
building the XZ decompressor. The link of the compressed image then
fails with the following error:
arch/mips/boot/compressed/decompress.o: In function '__fswab32':
include/uapi/linux/swab.h:60: undefined reference to '__bswapsi2'
Add bswapsi.o to the link to fix the build with these versions.
Signed-off-by: Alban Bedel <[email protected]>
Cc: Andrew Bresticker <[email protected]>
Cc: Alex Smith <[email protected]>
Cc: Wu Zhangjin <[email protected]>
Cc: [email protected]
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/12232/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
Ingenic SoC declares ZBOOT support, but debug definitions are missing
for MACH_JZ4780 resulting in a build failure when DEBUG_ZBOOT is set.
The UART addresses are same as with JZ4740, so fix by covering JZ4780
with those as well.
Signed-off-by: Aaro Koskinen <[email protected]>
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/12830/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
As most platforms implement the PROM serial interface prom_putchar()
add a simple bridge to allow re-using this code for zboot.
Signed-off-by: Alban Bedel <[email protected]>
Cc: Alex Smith <[email protected]>
Cc: Andrew Bresticker <[email protected]>
Cc: Wu Zhangjin <[email protected]>
Cc: [email protected]
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/11811/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
Add dummy.o to the targets list, and fill targets automatically from
$(vmlinuzobjs) to avoid having to maintain two lists.
When building with XZ compression copy ashldi3.c to the build
directory to use a different object file for the kernel and zboot.
Without this the same object file need to be build with different
flags which cause a rebuild at every run.
Signed-off-by: Alban Bedel <[email protected]>
Cc: [email protected]
Cc: Alex Smith <[email protected]>
Cc: Wu Zhangjin <[email protected]>
Cc: Andrew Bresticker <[email protected]>
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/11810/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
When loading x86 64bit kernel above 4GiB with patched grub2, got kernel
gunzip error.
| early console in decompress_kernel
| decompress_kernel:
| input: [0x807f2143b4-0x807ff61aee]
| output: [0x807cc00000-0x807f3ea29b] 0x027ea29c: output_len
| boot via startup_64
| KASLR using RDTSC...
| new output: [0x46fe000000-0x470138cfff] 0x0338d000: output_run_size
| decompress: [0x46fe000000-0x47007ea29b] <=== [0x807f2143b4-0x807ff61aee]
|
| Decompressing Linux... gz...
|
| uncompression error
|
| -- System halted
the new buffer is at 0x46fe000000ULL, decompressor_gzip is using
0xffffffb901ffffff as out_len. gunzip in lib/zlib_inflate/inflate.c cap
that len to 0x01ffffff and decompress fails later.
We could hit this problem with crashkernel booting that uses kexec loading
kernel above 4GiB.
We have decompress_* support:
1. inbuf[]/outbuf[] for kernel preboot.
2. inbuf[]/flush() for initramfs
3. fill()/flush() for initrd.
This bug only affect kernel preboot path that use outbuf[].
Add __decompress and take real out_buf_len for gunzip instead of guessing
wrong buf size.
Fixes: 1431574a1c4 (lib/decompressors: fix "no limit" output buffer length)
Signed-off-by: Yinghai Lu <[email protected]>
Cc: Alexandre Courbot <[email protected]>
Cc: Jon Medhurst <[email protected]>
Cc: Stephen Warren <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
The "LD vmlinuz" line in the quiet build output is misaligned with the
rest of the output. Fix this.
Signed-off-by: Alex Smith <[email protected]>
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/11019/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
Add support for detecting a vmlinuz.bin appended dtb and overriding
the boot arguments to match the UHI interface.
To ensure _edata / __apendend_dtb points to the actual end of the
binary, align the data section to 16 bytes instead of the address
cursor.
Due to ld.script not going through the preprocessor, we can't check
for MIPS_ZBOOT_APPENDED_DTB being enabled, so always reserve space
for it. It should have no consequences for booting without it enabled
except 1 MiB more ram usage during the uncompressing stage.
Signed-off-by: Jonas Gorski <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: John Crispin <[email protected]>
Cc: Kevin Cernekee <[email protected]>
Cc: Florian Fainelli <[email protected]>
Cc: Aaro Koskinen <[email protected]>
Cc: Markos Chandras <[email protected]>
Cc: Andrew Bresticker <[email protected]>
Cc: Daniel Schwierzeck <[email protected]>
Cc: Paul Burton <[email protected]>
Cc: James Hartley <[email protected]>
Patchwork: https://patchwork.linux-mips.org/patch/9741/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
Currently, code of Loongson-2/3 is under loongson directory and code of
Loongson-1 is under loongson1 directory. Besides, there are Kconfig
options such as MACH_LOONGSON and MACH_LOONGSON1. This naming style is
very ugly and confusing. Since Loongson-2/3 are both 64-bit general-
purpose CPU while Loongson-1 is 32-bit SoC, we rename both file names
and Kconfig symbols from loongson/loongson1 to loongson64/loongson32.
[[email protected]: Resolve a number of simple conflicts.]
Signed-off-by: Huacai Chen <[email protected]>
Cc: Steven J. Hill <[email protected]>
Cc: [email protected]
Cc: Fuxin Zhang <[email protected]>
Cc: Zhangjin Wu <[email protected]>
Cc: Kelvin Cheung <[email protected]>
Patchwork: https://patchwork.linux-mips.org/patch/9790/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
!CONFIG_DEBUG_ZBOOT doesn't need puts() and puthex(), remove them and
the corrospindig strings for !CONFIG_DEBUG_ZBOOT, as a result, it saves
about 1280 bytes.
[[email protected]: Resolved reject.]
Signed-off-by: Wu Zhangjin <[email protected]>
Cc: [email protected]
Cc: Wu Zhangjin <[email protected]>
Patchwork: https://patchwork.linux-mips.org/patch/1898/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
Platforms which use raw zboot images may need to link the image at
a fixed address if there is no other way to communicate the load
address to the bootloader. Allow the per-platform Kbuild files
to specify an optional zboot image load address (zload-y) and fall
back to calc_vmlinuz_load_addr if unset.
Signed-off-by: Andrew Bresticker <[email protected]>
Cc: Lars-Peter Clausen <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: Andrew Bresticker <[email protected]>
Cc: Ezequiel Garcia <[email protected]>
Cc: James Hartley <[email protected]>
Cc: James Hogan <[email protected]>
Patchwork: https://patchwork.linux-mips.org/patch/9566/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
Commit dc4d7b37 (MIPS: ZBOOT: gather string functions into string.c)
moved the string related functions into a separate file, which might
cause the following build error, depending on the configuration:
| CC arch/mips/boot/compressed/decompress.o
| In file included from linux/arch/mips/boot/compressed/../../../../lib/decompress_unxz.c:234:0,
| from linux/arch/mips/boot/compressed/decompress.c:67:
| linux/arch/mips/boot/compressed/../../../../lib/xz/xz_dec_stream.c: In function 'fill_temp':
| linux/arch/mips/boot/compressed/../../../../lib/xz/xz_dec_stream.c:162:2: error: implicit declaration of function 'memcpy' [-Werror=implicit-function-declaration]
| cc1: some warnings being treated as errors
| linux/scripts/Makefile.build:308: recipe for target 'arch/mips/boot/compressed/decompress.o' failed
| make[6]: *** [arch/mips/boot/compressed/decompress.o] Error 1
| linux/arch/mips/Makefile:308: recipe for target 'vmlinuz' failed
It does not fail with the standard configuration, as when
CONFIG_DYNAMIC_DEBUG is not enabled <linux/string.h> gets included in
include/linux/dynamic_debug.h. There might be other ways for it to
get indirectly included.
We can't add the include directly in xz_dec_stream.c as some
architectures might want to use a different version for the boot/
directory (see for example arch/x86/boot/string.h).
Signed-off-by: Aurelien Jarno <[email protected]>
Cc: [email protected]
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/7420/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
This patch implements the stack protector code in MIPS compressed boot
phase based on the same code added to arm in commit
8779657d29c0ebcc0c94ede4df2f497baf1b563f "stackprotector: Introduce
CONFIG_CC_STACKPROTECTOR_STRONG" by Kees Cook <[email protected]>
Signed-off-by: Ben Chan <[email protected]>
Cc: Kees Cook <[email protected]>
Cc: Olof Johansson <[email protected]>
Reviewed-by: Kees Cook <[email protected]>
Cc: [email protected]
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/7175/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
None of these files are actually using any __init type directives
and hence don't need to include <linux/init.h>. Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.
Signed-off-by: Paul Gortmaker <[email protected]>
Signed-off-by: John Crispin <[email protected]>
Patchwork: http://patchwork.linux-mips.org/patch/6320/
|
|
In the worst case this adds less then 128 bytes of code
but on the other hand this makes code organization more clear.
Signed-off-by: Antony Pavlov <[email protected]>
Reviewed-by: Florian Fainelli <[email protected]>
Cc: [email protected]
Cc: Ralf Baechle <[email protected]>
Cc: John Crispin <[email protected]>
Cc: Florian Fainelli <[email protected]>
Acked-by: Florian Fainelli <[email protected]>
Signed-off-by: John Crispin <[email protected]>
Patchwork: http://patchwork.linux-mips.org/patch/6344/
|
|
Signed-off-by: Antony Pavlov <[email protected]>
Acked-by: Lars-Peter Clausen <[email protected]>
Signed-off-by: John Crispin <[email protected]>
Patchwork: http://patchwork.linux-mips.org/patch/5927/
|
|
Add support for the LZ4 compression scheme in the ZBOOT decompression
stub, in order to support it we need to:
- select the "lz4" compression tool to compress the vmlinux.bin
payload
- memcpy() is also required for decompress_unlz4.c so we share the
implementation between GZIP, XZ and now LZ4
Signed-off-by: Florian Fainelli <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/5829/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
There is currently no corresponding ELF program header for the "text"
loadable segment which is confusing for some bootloader out there such
as CFE because it expects to find a program header matching the segment
it is trying to load. The Linux kernel ELF binary "vmlinux" has a
similar program header for the text segment so we just mimic this here
too.
Signed-off-by: Florian Fainelli <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/5827/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
Add support for the XZ compression scheme in the ZBOOT decompression
stub, in order to support it we need to:
- select the "xzkern" compression tool to compress the vmlinux.bin
payload
- link with ashldi3.o for xz_dec_run() to work
- memcpy() is also required for decompress_unxz.c so we share the
implementation between GZIP and XZ
Signed-off-by: Florian Fainelli <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/5818/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
The vmlinux load address and entry address is calculated in multiple
places:
- arch/mips/Makefile defines load-y from CONFIG_PHYSICAL_START (or
defined by the platform) and passes it to
arch/mips/boot/compressed/Makefile.
- arch/mips/boot/compressed/Makefile calculates kernel entry using nm.
- arch/mips/lasat/image/Makefile calculates both load and entry address
using nm.
Lets combine these in the main Makefile and then pass them as Make
parameters to each of the three boot image Makefiles (in boot/,
boot/compressed, lasat/image/). The boot/ Makefile doesn't currently use
them, but will soon need to for U-Boot image targets.
The existing load-y definition is used in preference to calculating the
load address using nm.
Signed-off-by: James Hogan <[email protected]>
Cc: Ralf Baechle <[email protected]>
Cc: Florian Fainelli <[email protected]>
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/5794/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
When building with -fstack-protector, gcc emits the __stack_chk_guard and
__stack_chk_fail symbols to check for stack stability. These symbols are
defined in vmlinux but the generated vmlinux.bin that is used to create
the compressed vmlinuz image has no symbol table so the linker can't find
these symbols during the final linking phase. As a result of which, we
need either to redefine these symbols just for the compressed image or drop
the -fstack-protector option when building the compressed image. This patch
implements the latter of two options.
Fixes the following linking problem:
dbg.c:(.text+0x7c): undefined reference to `__stack_chk_guard'
dbg.c:(.text+0x80): undefined reference to `__stack_chk_guard'
dbg.c:(.text+0xd4): undefined reference to `__stack_chk_guard'
dbg.c:(.text+0xec): undefined reference to `__stack_chk_fail'
[[email protected]: I'm applying this before the patch that actually adds
stack protector support for MIPS. This means, it will not be possible
to trigger above error message with any commit from the tree but rather
they are what one would hit without this commit.]
Signed-off-by: Markos Chandras <[email protected]>
Cc: [email protected]
Cc: Markos Chandras <[email protected]>
Patchwork: https://patchwork.linux-mips.org/patch/5575/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
Add SYS_SUPPORTS_ZBOOT and SYS_SUPPORTS_ZBOOT_UART16550 config options
for XLR and XLP.
Update boot/compressed/uart-16550.c to add UART port for XLR and XLP.
Signed-off-by: Jayachandran C <[email protected]>
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/5417/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
Fix uart-16550.c for adding XLR/XLP support, changes are:
* Make register read/write use volatile pointers
* Support 32 bit IO read/write
* Increase timeout in waiting for UART LSR
Signed-off-by: Jayachandran C <[email protected]>
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/5416/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
Having received another series of whitespace patches I decided to do this
once and for all rather than dealing with this kind of patches trickling
in forever.
Signed-off-by: Ralf Baechle <[email protected]>
|
|
Combine support for the DB1200/PB1200, DB1300 and DB1550 boards into
a single kernel image.
defconfig-generated image verified on DB1200, DB1300 and DB1550.
Signed-off-by: Manuel Lauss <[email protected]>
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/4335/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
This patch adds support for building a compressed kernel for the JZ4740
architecture.
Signed-off-by: Lars-Peter Clausen <[email protected]>
Signed-off-by: Maarten ter Huurne <[email protected]>
Cc: Sergei Shtylyov <[email protected]>
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/3563/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
Signed-off-by: Manuel Lauss <[email protected]>
To: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/2867/
Patchwork: https://patchwork.linux-mips.org/patch/2919/
Patchwork: https://patchwork.linux-mips.org/patch/2928/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
Detect CPU type at runtime and setup uarts accordingly; also clean up the
uart base address mess in the process as far as possible.
Signed-off-by: Manuel Lauss <[email protected]>
To: Linux-MIPS <[email protected]>
Cc: Florian Fainelli <[email protected]>
Cc: Wolfgang Grandegger <[email protected]>
Patchwork: https://patchwork.linux-mips.org/patch/2352/
Signed-off-by: Ralf Baechle <[email protected]
|
|
HOSTCC arch/mips/boot/compressed/calc_vmlinuz_load_addr
arch/mips/boot/compressed/calc_vmlinuz_load_addr.c: In function 'main':
arch/mips/boot/compressed/calc_vmlinuz_load_addr.c:35:2: warning: format '%llx' expects type 'long long unsigned int *', but argument 3 has type 'uint64_t *'
arch/mips/boot/compressed/calc_vmlinuz_load_addr.c:54:2: warning: format '%llx' expects type 'long long unsigned int', but argument 2 has type 'uint64_t'
Signed-off-by: Ralf Baechle <[email protected]>
|
|
* 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus:
MIPS: Enable ISA_DMA_API config to fix build failure
MIPS: 32-bit: Fix build failure in asm/fcntl.h
MIPS: Remove all generated vmlinuz* files on "make clean"
MIPS: do_sigaltstack() expects userland pointers
MIPS: Fix error values in case of bad_stack
MIPS: Sanitize restart logics
MIPS: secure_computing, syscall audit: syscall number should in r2, not r0.
MIPS: Don't block signals if we'd failed to setup a sigframe
|
|
[Ralf: I changed the patch to explicitly list all files to be deleted out
of paranoia.]
Signed-off-by: Wu Zhangjin <[email protected]>
Patchwork: http://patchwork.linux-mips.org/patch/1590/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
Fix VMLINUZ_LOAD_ADDRESS calculation to be based on the length of
vmlinux.bin, the actual uncompressed kernel binary.
Previously it was based on the length of KBUILD_IMAGE (the unstripped ELF
vmlinux), which is bigger than vmlinux.bin. As a result, vmlinuz was
loaded into a memory address higher then actually needed - a problem for
small memory platforms.
Signed-off-by: Shmulik Ladkani <[email protected]>
To: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/1564/
Acked-by: Wu Zhangjin <[email protected]>
Signed-off-by: Ralf Baechle <[email protected]>
|
|
This patch use "strip -s" to strip the .symtab and .strtab sections of
vmlinuz.
Note: This patch is based on http://patchwork.linux-mips.org/patch/1324/
Signed-off-by: Wu Zhangjin <[email protected]>
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/1383/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
We have calculated VMLINUZ_LOAD_ADDRESS in shell, which is indecipherable. This
patch rewrites it in C.
Signed-off-by: Wu Zhangjin <[email protected]>
To: linux-mips <[email protected]>
Cc: Alexander Clouter <[email protected]>
Cc: Manuel Lauss <[email protected]>
Cc: Sam Ravnborg <[email protected]>
Acked-by: Sam Ravnborg <[email protected]>
Reviewed-by: Alexander Clouter <[email protected]>
Patchwork: https://patchwork.linux-mips.org/patch/1324/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
- Remove several outdated comments
- Clearify the definition of zimage_start and zimage_size and the their
usage
Signed-off-by: Wu Zhangjin <[email protected]>
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/1382/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
- Remove unused symbols: _fdata, _text; only _edata and _end are needed by
head.S
- Remove unused sections: .sbss, .stab, .gptab.sdata, .gptab.sbss
- Change the alignment to 16 bytes to ensure it is greater than any
fundamental type of a MIPS compiler.
- Clean up comments
Signed-off-by: Wu Zhangjin <[email protected]>
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/1381/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
The compressed vmlinux.bin is only a temp file so it's ok to use the same
suffix .z for them (.gz,.lzo,.lzma...) to remove several lines and simpify
the maintenance (no need to add the "suffix_$(xxx) := suffix" line).
Signed-off-by: Wu Zhangjin <[email protected]>
To: linux-mips <[email protected]>
Cc: Alexander Clouter <[email protected]>
Cc: Manuel Lauss <[email protected]>
Cc: Sam Ravnborg <[email protected]>
Patchwork: https://patchwork.linux-mips.org/patch/1323/
Signed-off-by: Ralf Baechle <[email protected]>
---
|
|
Remove the CONFIG_SOC_AU1X00 Kconfig symbol since its job can also be done
by MACH_ALCHEMY, now renamed to MIPS_ALCHEMY.
Signed-off-by: Manuel Lauss <[email protected]>
To: Linux-MIPS <[email protected]>
Patchwork: https://patchwork.linux-mips.org/patch/1461/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
- use hostprogs-y for the elf2ecoff
- list all *.o file in targets
- renamed obj-y to vmlinuzobjs-y (it was confusing to re-use a kbuild variable)
- fix all uses of if_changed/cmd
- use kbuild rules to beautify output
- update clean-file to clean vmlinuz.* in top-level directory
- simplied logic in arch/mips/Makefile for compressed targets
The net result is a more kbuild conformant Makefile but
readability did not increase.
Signed-off-by: Sam Ravnborg <[email protected]>
To: linux-mips <[email protected]>
To: Wu Zhangjin <[email protected]>
Patchwork: https://patchwork.linux-mips.org/patch/1304/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
This patch adds a new DEBUG_ZBOOT option to allow the users to enable it
to debug the compressed kernel support for a new board and this optoin
should be disabled to reduce the kernel image size and speed up the
kernel booting procedure when the compressed kernel support is stable.
Signed-off-by: Wu Zhangjin <[email protected]>
To: Ralf Baechle <[email protected]>
Cc: Manuel Lauss <[email protected]>
Cc: [email protected]
Patchwork: http://patchwork.linux-mips.org/patch/918/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
Found by
$ find arch/mips/ -name "*.c" | xargs -i grep -H weak {} | grep -v __weak
[Ralf: Made this bulletproof by including <linux/compiler.h>]
Signed-off-by: Wu Zhangjin <[email protected]>
Cc: [email protected]
Patchwork: http://patchwork.linux-mips.org/patch/874/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
Hook up the compressed debug output for all Alchemy systems supported
by current kernel codebase.
Signed-off-by: Manuel Lauss <[email protected]>
To: Linux-MIPS <[email protected]>
Cc: Wu Zhangjin <[email protected]>
Patchwork: http://patchwork.linux-mips.org/patch/879/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
This patch removes a useless "\" (line break) and tunes the format of a
long line.
Signed-off-by: Wu Zhangjin <[email protected]>
Cc: [email protected]
Patchwork: http://patchwork.linux-mips.org/patch/869/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
Currently [email protected] is not usable; change it to [email protected].
Signed-off-by: Wu Zhangjin <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Patchwork: http://patchwork.linux-mips.org/patch/829/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
POSIX requires $((<expression>)) arithmetic in sh only to have long
arithmetic so on 32-bit sh binaries might do only 32-bit arithmetic but
the arithmetic done in arch/mips/boot/compressed/Makefile needs 64-bit.
I play with the AR7 platform, so VMLINUX_LOAD_ADDRESS is
0xffffffff94100000, and for an example 4MiB kernel
VMLINUZ_LOAD_ADDRESS is made out to be:
----
alex@berk:~$ bash -c 'printf "%x\n" $((0xffffffff94100000 + 0x400000))'
ffffffff94500000
alex@berk:~$ dash -c 'printf "%x\n" $((0xffffffff94100000 + 0x400000))'
80000000003fffff
----
The former is obviously correct whilst the later breaks things royally.
Fortunately working with only the lower 32bit's works for both bash and
dash:
----
$ bash -c 'printf "%x\n" $((0x94100000 + 0x400000))'
94500000
$ dash -c 'printf "%x\n" $((0x94100000 + 0x400000))'
94500000
----
So, we can split the original 64bit string to two parts, and only
calculate the low 32bit part, which is big enough (1GiB kernel sizes
anyone?) for a normal Linux kernel image file, now, we calculate the
VMLINUZ_LOAD_ADDRESS like this:
1. if present, append top 32bit of VMLINUX_LOAD_ADDRESS" as a prefix
2. get the sum of the low 32bit of VMLINUX_LOAD_ADDRESS + VMLINUX_SIZE
This patch fixes vmlinuz kernel builds on systems where only a
32bit-only math shell is available.
Patch Changelog:
Version 2
- simplified method by using 'expr' for 'substr' and making it work
with dash once again
Version 1
- Revert the removals of '-n "$(VMLINUX_SIZE)"' to avoid the error
of "make clean"
- Consider more cases of the VMLINUX_LOAD_ADDRESS
Version 0
- initial release
Signed-off-by: Alexander Clouter <[email protected]>
Acked-by: Wu Zhangjin <[email protected]>
Patchwork: http://patchwork.linux-mips.org/patch/861/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
The necessary changes to the x86 Kconfig and boot/compressed to allow the
use of this new compression method.
Signed-off-by: Wu Zhangjin <[email protected]>
Cc: [email protected]
Cc: Sergei Shtylyov <[email protected]>
Patchwork: http://patchwork.linux-mips.org/patch/857/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
o Remove the .initrd section. The initrd section was already handled
when vmlinux was linked.
o Discard .MIPS.options, .options, .pdr, .reginfo, .comment and .note
sections. If .MIPS.options is not removed, kernels compiled with gcc
3.4.6 will not boot.
o Clean up the file format.
o Remove several other unneeded sections.
Tested with GCC 3.4.6 and 4.4.1 with and without initrd.
Signed-off-by: Wu Zhangjin <[email protected]>
Cc: [email protected]
Patchwork: http://patchwork.linux-mips.org/patch/785/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
This patch helps to generate smaller kernel images for linux-MIPS,
Here is the effect when using lzma:
$ ls -sh vmlinux
7.1M vmlinux
$ ls -sh vmlinuz
1.5M vmlinuz
Have tested the 32bit kernel on Qemu/Malta and 64bit kernel on FuLoong
Mini PC. both of them work well. and also, tested by Alexander Clouter
on an AR7 based Linksys WAG54Gv2, and by Manuel Lauss on an Alchemy
board.
This -v2 version incorporate the feedback from Ralf, and add the
following changes:
1. add .ecoff, .bin, .erec format support
2. only enable it and the debug source code for the machines we tested
3. a dozen of fixups and cleanups
and if you want to enable it for your board, please try to select
SYS_SUPPORTS_ZBOOT for it, and if the board have an 16550 compatible
uart, you can select SYS_SUPPORTS_ZBOOT_UART16550 directly. and then
sending the relative patches to Ralf.
Tested-by: Manuel Lauss <[email protected]>
Tested-by: Alexander Clouter <[email protected]>
Signed-off-by: Wu Zhangjin <[email protected]>
Signed-off-by: Ralf Baechle <[email protected]>
|