Petitboot: Difference between revisions

From PS3 Developer wiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[Category:Linux]]
[[Category:OtherOS]]
Crossreference: [http://portal.gitbrew.org/wikibrew/Petitboot gitbrew.org::Petitboot] <br />
Crossreference: [http://portal.gitbrew.org/wikibrew/Petitboot gitbrew.org::Petitboot] <br />


Line 11: Line 11:


<li>Install Dependencies:
<li>Install Dependencies:
<pre>   $ sudo apt-get install quilt build-essential subversion libncurses5-dev zlib1g-dev gawk flex</pre></li>
{{keyboard|content=<syntaxhighlight lang="bash">$ sudo apt-get install quilt build-essential subversion libncurses5-dev zlib1g-dev gawk flex</syntaxhighlight>}}</li>


<li>Clone Gits: <pre>   $ mkdir petitboot
<li>Clone Gits:  
  $ cd petitboot
{{keyboard|content=<syntaxhighlight lang="bash">
  $ git clone git://foxbrew.org/ps3linux/petitboot/openwrt.git
$ mkdir petitboot
  $ git clone git://foxbrew.org/ps3linux/petitboot/openwrt_packages.git</pre></li>
$ cd petitboot
$ git clone git://foxbrew.org/ps3linux/petitboot/openwrt.git
$ git clone git://foxbrew.org/ps3linux/petitboot/openwrt_packages.git
</syntaxhighlight>}}</li>


<li>Link packages:
<li>Link packages:
<pre>   packages to link are in the file ps3_petitboot_howto</pre></li>
{{keyboard|content=<syntaxhighlight lang="bash">packages to link are in the file ps3_petitboot_howto</syntaxhighlight>}}</li>


<li>Copy the configuration:
<li>Copy the configuration:
<pre>   $ cp ps3_petitboot_config .config</pre></li>
{{keyboard|content=<syntaxhighlight lang="bash">$ cp ps3_petitboot_config .config</syntaxhighlight>}}</li>


<li>Build: <br />
<li>Build: <br />
The first time you build, a cross-compiling toolchain will be downloaded and built. This takes a very long time. Subsequent builds are much quicker (~10 minutes).
The first time you build, a cross-compiling toolchain will be downloaded and built. This takes a very long time. Subsequent builds are much quicker (~10 minutes).
<pre>   $ make V=99</pre></li>
{{keyboard|content=<syntaxhighlight lang="bash">$ make V=99</syntaxhighlight>}}</li>


</ol>
</ol>
Line 40: Line 43:
# enable base system -> wireless-tools, kernel modules-> wireless drivers -> kmod-ps3-jupiter, and Network -> wpa-supplicant(if needed see WPA below) as builtin (*) in menuconfig
# enable base system -> wireless-tools, kernel modules-> wireless drivers -> kmod-ps3-jupiter, and Network -> wpa-supplicant(if needed see WPA below) as builtin (*) in menuconfig
# enable networking support->wireless -> wireless-extensions as builtin (*) in kernel_menuconfig (you should highlight wireless to make all the other options appear)
# enable networking support->wireless -> wireless-extensions as builtin (*) in kernel_menuconfig (you should highlight wireless to make all the other options appear)
# apply kexec script patch (http://pastie.org/2627401)  
# modify kexec to unmount the new modules also ('''ps3_jupiter_sta''' '''ps3_jupiter''')


(If you choose (M) it will be compiled but not included in the dtbImage. Useful for debugging a module that hangs the kernel :D)
(If you choose (M) it will be compiled but not included in the dtbImage. Useful for debugging a module that hangs the kernel :D)


  $ cd package
{{keyboard|content=<syntaxhighlight lang="bash">
  $ git clone git://github.com/DirtyJerz/ps3-jupiter.git
$ cd package
  $ cd ..
$ git clone git://github.com/DirtyJerz/ps3-jupiter.git
  $ make menuconfig
$ cd ..
  $ make kernel_menuconfig
$ make menuconfig
  $ cd target/linux/ps3/petitboot/base-files/etc/init.d
$ make kernel_menuconfig
  $ nano kexec.patch
$ cd target/linux/ps3/petitboot/base-files/etc/init.d
  $ patch < kexec.patch
$ nano kexec --modify MODULES="ps3_jupiter_sta ps3_jupiter.."
</syntaxhighlight>}}


===WPA===
===WPA===
Line 62: Line 66:
put those files in package/base-files and apply the patches with  
put those files in package/base-files and apply the patches with  


  $ patch < Makefile.patch
{{keyboard|content=<syntaxhighlight lang="bash">
  $ patch < image-config.in.patch
$ patch < Makefile.patch
$ patch < image-config.in.patch
</syntaxhighlight>}}


you can now enter your SSID and wpa2 PSK in menuconfig and wpa_supplicant.conf will be added to /etc in petitboot.
you can now enter your SSID and wpa2 PSK in menuconfig and wpa_supplicant.conf will be added to /etc in petitboot.




----
----




Line 81: Line 85:
* I created a new openwrt git repository which contains my patches and PS3 NOR and VFLASH block device drivers
* I created a new openwrt git repository which contains my patches and PS3 NOR and VFLASH block device drivers


<pre>At this moment, the officiel GIT server is down :
At this moment, the official GIT server is down :


{{keyboard|content=<syntaxhighlight lang="bash">
$ git clone git://foxbrew.org/ps3linux/petitboot/openwrt.git
$ git clone git://foxbrew.org/ps3linux/petitboot/openwrt.git
$ git clone git://foxbrew.org/ps3linux/petitboot/openwrt_packages.git
git clone git://foxbrew.org/ps3linux/petitboot/openwrt_packages.git
</syntaxhighlight>}}


{{keyboard|content=<syntaxhighlight lang="bash">
$ cd openwrt/package
$ cd openwrt/package
$ ln -s ../../openwrt_packages/libs/jpeg jpeg
ln -s ../../openwrt_packages/libs/jpeg jpeg
$ ln -s ../../openwrt_packages/libs/libpng libpng
ln -s ../../openwrt_packages/libs/libpng libpng
$ ln -s ../../openwrt_packages/libs/libtwin libtwin
ln -s ../../openwrt_packages/libs/libtwin libtwin
$ ln -s ../../openwrt_packages/utils/ps3-utils ps3-utils
ln -s ../../openwrt_packages/utils/ps3-utils ps3-utils
$ ln -s ../../openwrt_packages/utils/petitboot petitboot
ln -s ../../openwrt_packages/utils/petitboot petitboot
$ ln -s ../../openwrt_packages/utils/bzip2 bzip2
ln -s ../../openwrt_packages/utils/bzip2 bzip2
$ ln -s ../../openwrt_packages/utils/sed sed
ln -s ../../openwrt_packages/utils/sed sed
$ ln -s ../../openwrt_packages/utils/tar tar
ln -s ../../openwrt_packages/utils/tar tar
$ ln -s ../../openwrt_packages/utils/less less
ln -s ../../openwrt_packages/utils/less less
$ ln -s ../../openwrt_packages/net/dhcpcd dhcpcd
ln -s ../../openwrt_packages/net/dhcpcd dhcpcd
$ ln -s ../../openwrt_packages/net/wget wget
ln -s ../../openwrt_packages/net/wget wget
$ ln -s ../../openwrt_packages/utils/coreutils coreutils
ln -s ../../openwrt_packages/utils/coreutils coreutils
</syntaxhighlight>}}


# link here more packages if you want to
<nowiki>#</nowiki> link here more packages if you want to


{{keyboard|content=<syntaxhighlight lang="bash">
$ ln -sf ../../openwrt_packages/utils/bc bc
$ ln -sf ../../openwrt_packages/utils/bc bc
$ ln -sf ../../openwrt_packages/utils/sg3-utils sg3-utils
ln -sf ../../openwrt_packages/utils/sg3-utils sg3-utils
$ ln -sf ../../openwrt_packages/utils/cifsmount cifsmount
ln -sf ../../openwrt_packages/utils/cifsmount cifsmount
$ ln -sf ../../openwrt_packages/net/nmap nmap
ln -sf ../../openwrt_packages/net/nmap nmap
$ ln -sf ../../openwrt_packages/net/ncftp ncftp
ln -sf ../../openwrt_packages/net/ncftp ncftp
$ ln -sf ../../openwrt_packages/mail/mutt mutt
ln -sf ../../openwrt_packages/mail/mutt mutt
$ ln -sf ../../openwrt_packages/devel/make make
ln -sf ../../openwrt_packages/devel/make make
$ ln -sf ../../openwrt_packages/devel/patch patch
ln -sf ../../openwrt_packages/devel/patch patch
$ ln -sf ../../openwrt_packages/libs/db47 db47
ln -sf ../../openwrt_packages/libs/db47 db47
$ ln -sf ../../openwrt_packages/libs/gdbm gdbm
ln -sf ../../openwrt_packages/libs/gdbm gdbm
$ ln -sf ../../openwrt_packages/libs/libxml2 libxml2
ln -sf ../../openwrt_packages/libs/libxml2 libxml2
</syntaxhighlight>}}


{{keyboard|content=<syntaxhighlight lang="bash">
$ cd ..
$ cd ..
$ cp ps3_petitboot_config_minimal .config
cp ps3_petitboot_config_minimal .config
$ make menuconfig
make menuconfig # optional
$ make kernel_menuconfig
make kernel_menuconfig # optional
$ make V=99
make V=99
</pre>
</syntaxhighlight>}}
 
''' Old Source: graf_chokolo @ http://ps3wiki.lan.st/index.php/Petitboot '''
 
 


''' Source: graf_chokolo @ http://ps3wiki.lan.st/index.php/Petitboot '''
{{Linux}}<noinclude>[[Category:Main]]</noinclude>

Revision as of 19:05, 15 September 2021

Crossreference: gitbrew.org::Petitboot

Petitboot

Setup Buildroot

First thing we need to do is setup our buildroot. Most of this is ripped from how-to's around the nets.

  1. Install Dependencies:
    Type This
    $ sudo apt-get install quilt build-essential subversion libncurses5-dev zlib1g-dev gawk flex
    
  2. Clone Gits:
    Type This
    $ mkdir petitboot
    $ cd petitboot
    $ git clone git://foxbrew.org/ps3linux/petitboot/openwrt.git
    $ git clone git://foxbrew.org/ps3linux/petitboot/openwrt_packages.git
    
  3. Link packages:
    Type This
    packages to link are in the file ps3_petitboot_howto
    
  4. Copy the configuration:
    Type This
    $ cp ps3_petitboot_config .config
    
  5. Build:
    The first time you build, a cross-compiling toolchain will be downloaded and built. This takes a very long time. Subsequent builds are much quicker (~10 minutes).
    Type This
    $ make V=99
    

EXTRAS

WIFI(SLIMS)

you can use / to search in menuconfig (thanks jevin)

  1. cd into package folder
  2. clone my ps3-jupiter fork on github
  3. enable base system -> wireless-tools, kernel modules-> wireless drivers -> kmod-ps3-jupiter, and Network -> wpa-supplicant(if needed see WPA below) as builtin (*) in menuconfig
  4. enable networking support->wireless -> wireless-extensions as builtin (*) in kernel_menuconfig (you should highlight wireless to make all the other options appear)
  5. modify kexec to unmount the new modules also (ps3_jupiter_sta ps3_jupiter)

(If you choose (M) it will be compiled but not included in the dtbImage. Useful for debugging a module that hangs the kernel :D)

Type This
$ cd package
$ git clone git://github.com/DirtyJerz/ps3-jupiter.git
$ cd ..
$ make menuconfig
$ make kernel_menuconfig
$ cd target/linux/ps3/petitboot/base-files/etc/init.d
$ nano kexec --modify MODULES="ps3_jupiter_sta ps3_jupiter.."

WPA

If you use WPA2 as I do, you can apply these patchs to package/base-files to enable a the generation of a wpa_supplicant.conf file. It will also add 2 lines to rc.local to automatically connect to your router on boot.

  Makefile.patch - http://pastie.org/2624949
  image-config.in.patch - http://pastie.org/2624956

put those files in package/base-files and apply the patches with

Type This
$ patch < Makefile.patch
$ patch < image-config.in.patch

you can now enter your SSID and wpa2 PSK in menuconfig and wpa_supplicant.conf will be added to /etc in petitboot.




Compiling petitboot (graf's method)

  • 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 ( actually, it take a long time during the very first compilation, because it compile the powerpc64 toolchain too, but after that, is you re-launch another compilation, it's "fast" )
  • 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

At this moment, the official GIT server is down :

Type This
$ git clone git://foxbrew.org/ps3linux/petitboot/openwrt.git
git clone git://foxbrew.org/ps3linux/petitboot/openwrt_packages.git
Type This
$ 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

# link here more packages if you want to

Type This
$ ln -sf ../../openwrt_packages/utils/bc bc
ln -sf ../../openwrt_packages/utils/sg3-utils sg3-utils
ln -sf ../../openwrt_packages/utils/cifsmount cifsmount
ln -sf ../../openwrt_packages/net/nmap nmap
ln -sf ../../openwrt_packages/net/ncftp ncftp
ln -sf ../../openwrt_packages/mail/mutt mutt
ln -sf ../../openwrt_packages/devel/make make
ln -sf ../../openwrt_packages/devel/patch patch
ln -sf ../../openwrt_packages/libs/db47 db47
ln -sf ../../openwrt_packages/libs/gdbm gdbm
ln -sf ../../openwrt_packages/libs/libxml2 libxml2
Type This
$ cd ..
cp ps3_petitboot_config_minimal .config
make menuconfig # optional
make kernel_menuconfig # optional
make V=99

Old Source: graf_chokolo @ http://ps3wiki.lan.st/index.php/Petitboot