Editing Booting Linux 2.6 kernel on running PS3 Linux with kexec

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
[[Category:OtherOS]]
[[Category:PS3]]
''' Source: graf_chokolo @ http://ps3wiki.lan.st/index.php/Booting_Linux_2.6_kernel_on_running_PS3_Linux_with_kexec '''
''' Source: graf_chokolo @ http://ps3wiki.lan.st/index.php/Petitboot '''
----
----
= Compiling kexec for PS3 Linux =
= Compiling petitboot =


* To compile the latest kexec-tools on '''Debian Squeeze''', you have to install '''autoconf''' and '''libc6-dev-ppc64''' packages
* I use petitboot to install and boot Linux from internal HDD of my PS3.
* With petitboot, you will be able to install/boot a Linux kernel from USB, HDD, BD or network.
* Compiling petitboot takes a very long time
* On my Arch Linux x86 it doesn't build without patches
* I created a new openwrt git repository which contains my patches and PS3 NOR and VFLASH block device drivers


<pre>
<pre>
$ git clone git://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git
$ git clone git://dukio.com/openwrt
$ cd kexec-tools
$ git clone git://nbd.name/packages.git openwrt_packages
$ ./bootstrap
$ ./configure
$ make
</pre>


= Booting Linux 2.6 kernel with kexec on running PS3 Linux =
$ cd openwrt/package
$ ln -s ../../openwrt_packages/libs/jpeg jpeg
$ ln -s ../../openwrt_packages/libs/libpng libpng
$ ln -s ../../openwrt_packages/libs/libtwin libtwin
$ ln -s ../../openwrt_packages/utils/ps3-utils ps3-utils
$ ln -s ../../openwrt_packages/utils/petitboot petitboot
$ ln -s ../../openwrt_packages/utils/bzip2 bzip2
$ ln -s ../../openwrt_packages/utils/sed sed
$ ln -s ../../openwrt_packages/utils/tar tar
$ ln -s ../../openwrt_packages/utils/less less
$ ln -s ../../openwrt_packages/net/dhcpcd dhcpcd
$ ln -s ../../openwrt_packages/net/wget wget
$ ln -s ../../openwrt_packages/utils/coreutils coreutils


* kexec-tools is very useful if you want to test a new Linux 2.6 kernel on PS3 without a long boot procedure with petitboot
$ cd ..
 
$ make menuconfig
<pre>
$ make kernel_menuconfig
# ./build/sbin/kexec -l /boot/vmlinux-2.6.38-rc4-00155-gb0fd285 --append="root=/dev/ps3dd1 video=720p"
$ make V=99
# swapoff -a
# sync
# ./build/sbin/kexec -e
</pre>
</pre>
= Booting Linux 3.5 kernel with kexec on running PS3 Linux =
* Boot your new kernel on petitboot or on your running kernel.
<pre>
# ./build/sbin/kexec -l /boot/vmlinux-3.5.4 --command-line="root=/dev/ps3da2 video=ps3fb:mode:0"
# ./build/sbin/kexec -u
# ./build/sbin/kexec -l /boot/vmlinux-3.5.4 --command-line="root=/dev/ps3da2 video=ps3fb:mode:0"
# sync
# reboot
</pre>
{{Linux}}<noinclude>[[Category:Main]]</noinclude>
Please note that all contributions to PS3 Developer wiki are considered to be released under the GNU Free Documentation License 1.2 (see PS3 Developer wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following hCaptcha:

Cancel Editing help (opens in new window)