2011/1/16 wu zhangjin <[email protected]>:
> Hi, folks
>
> Just made Kexec work on 32bit system[o32] with 32bit kernel on
> Loongson, which means Linux for Loongson is ready as bootloader.
>
> If you have interest, please read the quick start steps and advantage
> introductions.
>
> 1. Quickstart
>
> 1.1 Get a kernel image which supports Kexec on Loongson
>
> Clone, pull or fetch the latest tiny36 branch from our LLC git repo[1]
>
> $ mkdir tiny36 && cd tiny36 && git init
> $ git fetch git://dev.lemote.com/linux-loongson-community.git tiny36
>

Don't forget to merge it after fetch:

$ git merge FETCH_HEAD

or pull direclty:

$ git pull git://dev.lemote.com/linux-loongson-community.git tiny36

> Compile it with the default yeeloong_kexec_defconfig, please ensure
> KEXEC is enabled.
>
> Then, Boot into the new kernel
>
> 1.2. Prepare a user-space kexec tool for Loongson
>
> Download the latest kexec-tools from the mainline
>
> $ git clone git://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git
>
> Remove the redefined virt_to_phys() function from kexec/virt_to_phys.c
> + #if 0
>  .... virt_to_phys()
> + #endif
>
> Configure, compile and install it, please refer to the INSTALL file
>
> $ autoconf && configure && make && make install
>
> 1.3. Load a new kernel image from the kernel who supports kexec
>
> Ensure your are running the kernel with kexec support
>
> Then, copy a kernel image to your machine. both vmlinux and vmlinuz should 
> work.
>
> Load it:
>
> $ kexec -l /path/to/vmlinux --command-line="$(</proc/cmdline)"
>
> (If no command line passed, the default command line from the original
> bootloader will be used)
>
> Execute the new kernel:
>
> $ kexec -e
>
> Then, you will find the new kernel boots quickly and then, you will
> get a new kernel, that's cool.
>
> 2. About Kexec on Loongson
>
> The 64bit support and the crash/kdump support are still in progress.
>
> With this kexec support on Loongson, we may get:
>
> 2.1. Run Linux as bootloader
>
> The kexec-bootloader of course is available as a new bootloader for
> Loongson, although I didn't touch it, but you can get a try at first:
>
> git://git.linuxtogo.org/home/groups/kexecboot/kexecboot.git
>
> This is the most important feature, in the future, perhaps we can put
> Linux into 512K EEPROM and use it as our bootloader, this is my
> long-term plan ;-) In reality, with the help of the tiny36 project, I
> have gotten 400k image booting well on YeeLoong. More efforts are in
> progress. a new bootloader(X-loader) may be ported to Loongson
> platform and work as the 1st stage bootloader, the size of this 1st
> stage bootloader can be limited to about several KiloBytes(e.g. 20kb).
> This 1st stage bootloader did the necessary initialization and then
> enter into Linux as fast as it can, I guess, including the 1st stage
> bootloader, the kernel may start in about 5s, and then, this kernel
> can enter into X system(TinyX is needed) directly or provide a menu to
> start the other full-feature kernel.
>
> 2.2. Will be more convenient to develop/test a new kernel feature or driver
>
> New kernel can be quickly loaded from the current kernel without the
> old bootloader reboot. with my test, it is really very fast.
>
> 2.3. With the coming crash/kdump support, the recover from panic will
> be supported, then Loongson will get the CGL feature
>
> ** The tiny36(Linux-Tiny for MIPS/Loongson, currently, only for
> 2.6.36, so, I name it tiny36) project is an open & free project
> launched by myself in my spare time, any good idea, suggestion,
> patches and even sponsors are welcome. This should be a long-term
> project, the aim is making Linux as tiny/fast as possible on
> MIPS/Loongson platform. **
>
> Enjoy it!
>          Wu Zhangjin
> -------------
> [1] http://dev.lemote.com/code/linux-loongson-community
>

-- 
You received this message because you are subscribed to the Google Groups 
"loongson-dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/loongson-dev?hl=en.

Reply via email to