Building FreeBSD World: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
|||
(19 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
[[Category:OtherOS]] | |||
=Introduction= | =Introduction= | ||
Line 4: | Line 6: | ||
* Unfortunately, you can not change monitor resolution on PS3 FreeBSD dynamically yet. That means, you have to patch the loader and kernel syscon driver for your monitor resolution. | * Unfortunately, you can not change monitor resolution on PS3 FreeBSD dynamically yet. That means, you have to patch the loader and kernel syscon driver for your monitor resolution. | ||
= | =Fetching Source Code= | ||
<pre> | |||
svn co svn://svn.freebsd.org/base/releng/9.1 /usr/devel | |||
</pre> | |||
Or use the head branch (very unstable): | |||
<pre> | <pre> | ||
svn co svn://svn.freebsd.org/base/head /usr/devel | svn co svn://svn.freebsd.org/base/head /usr/devel | ||
Line 17: | Line 24: | ||
<pre> | <pre> | ||
cd /usr/devel | |||
# First apply patches if you want | |||
# Update LV1 calls | |||
cd /usr/devel/sys/powerpc/ps3 | |||
awk -f ps3-hv-asm.awk < ps3-hvcall.master > ps3-hvcall.S | |||
awk -f ps3-hv-header.awk < ps3-hvcall.master > ps3-hvcall.h | |||
cd /usr/devel/sys/powerpc/conf | cd /usr/devel/sys/powerpc/conf | ||
mkdir /root/kernels | mkdir /root/kernels | ||
Line 25: | Line 42: | ||
env MAKEOBJDIRPREFIX=/usr/obj/PS3 make buildworld buildkernel installkernel installworld distribution \ | env MAKEOBJDIRPREFIX=/usr/obj/PS3 make buildworld buildkernel installkernel installworld distribution \ | ||
TARGET=powerpc TARGET_ARCH=powerpc64 KERNCONF=PS3 DESTDIR=/root/PS3 | TARGET=powerpc TARGET_ARCH=powerpc64 KERNCONF=PS3 DESTDIR=/root/PS3 | ||
cd /root/PS3 | |||
tar cvJf ../freebsd_world.tar.xz . | |||
</pre> | </pre> | ||
=Rebuilding Loader= | =Rebuilding Loader= | ||
* If you make changes to loader source then you don't have to rebuild the whole world again. You can recompile the loader only. | |||
<pre> | <pre> | ||
Line 37: | Line 59: | ||
=Rebuilding Kernel= | =Rebuilding Kernel= | ||
* If you change your kernel configuration or make changes to kernel source then you don't have to rebuild the whole world again. You can recompile the kernel only. | |||
<pre> | <pre> | ||
Line 63: | Line 87: | ||
mount -t msdosfs /dev/da0s1 /tmp/usb | mount -t msdosfs /dev/da0s1 /tmp/usb | ||
mount -t ufs /dev/ | mount -t ufs /dev/ps3disk3p3 /tmp/ufs | ||
cd /tmp/ufs | cd /tmp/ufs | ||
Line 75: | Line 99: | ||
/dev/ps3disk3p1 none swap sw 0 0 | /dev/ps3disk3p1 none swap sw 0 0 | ||
proc /proc procfs rw 0 0 | proc /proc procfs rw 0 0 | ||
</pre> | |||
==/etc/rc.conf== | |||
<pre> | |||
hostname="freebsd" | |||
ifconfig_glc0="SYNCDHCP" | |||
sshd_enable="YES" | |||
keyrate="fast" | |||
keymap="us.iso" | |||
#keymap="fr.iso" | |||
#keymap="german.iso" | |||
scrnmap="NO" | |||
font8x16="iso15-8x16" | |||
font8x14="iso15-8x14" | |||
font8x8="iso15-8x8" | |||
</pre> | </pre> | ||
==/etc/kboot.conf== | ==/etc/kboot.conf== | ||
* My latest petitboot supports mounting UFS2 filesystems. In this case petitboot will add the FreeBSD boot entry automatically. With old petitboot image you have to mount UFS2 filesystem manually and kexec the file loader.ps3 | |||
<pre> | <pre> | ||
freebsd=/boot/loader.ps3 | freebsd=/boot/loader.ps3 | ||
</pre> | </pre> | ||
{{BSD}}<noinclude>[[Category:Main]]</noinclude> |
Latest revision as of 01:37, 3 February 2014
Introduction[edit | edit source]
- You can either cross-compile the FreeBSD world on your PC FreeBSD or compile it natively on PS3.
- Unfortunately, you can not change monitor resolution on PS3 FreeBSD dynamically yet. That means, you have to patch the loader and kernel syscon driver for your monitor resolution.
Fetching Source Code[edit | edit source]
svn co svn://svn.freebsd.org/base/releng/9.1 /usr/devel
Or use the head branch (very unstable):
svn co svn://svn.freebsd.org/base/head /usr/devel
Kernel Patches[edit | edit source]
Building World[edit | edit source]
cd /usr/devel # First apply patches if you want # Update LV1 calls cd /usr/devel/sys/powerpc/ps3 awk -f ps3-hv-asm.awk < ps3-hvcall.master > ps3-hvcall.S awk -f ps3-hv-header.awk < ps3-hvcall.master > ps3-hvcall.h cd /usr/devel/sys/powerpc/conf mkdir /root/kernels cp GENERIC64 /root/kernels/PS3 ln -s /root/kernels/PS3 cd ../../.. env MAKEOBJDIRPREFIX=/usr/obj/PS3 make buildworld buildkernel installkernel installworld distribution \ TARGET=powerpc TARGET_ARCH=powerpc64 KERNCONF=PS3 DESTDIR=/root/PS3 cd /root/PS3 tar cvJf ../freebsd_world.tar.xz .
Rebuilding Loader[edit | edit source]
- If you make changes to loader source then you don't have to rebuild the whole world again. You can recompile the loader only.
cd /usr/devel env MAKEOBJDIRPREFIX=/usr/obj/PS3 make TARGET=powerpc TARGET_ARCH=powerpc64 buildenv cd sys/boot make all install DESTDIR=/root/PS3
Rebuilding Kernel[edit | edit source]
- If you change your kernel configuration or make changes to kernel source then you don't have to rebuild the whole world again. You can recompile the kernel only.
cd /usr/devel env MAKEOBJDIRPREFIX=/usr/obj/PS3 make buildkernel installkernel \ TARGET=powerpc TARGET_ARCH=powerpc64 KERNCONF=PS3 DESTDIR=/root/PS3
Installing World on PS3 HDD[edit | edit source]
- Use a PS3 FreeBSD LiveCD
Creating New Filesystem[edit | edit source]
newfs -U /dev/ps3disk3p3
Extracting World[edit | edit source]
- Store your FreeBSD world on a USB drive.
mkdir /tmp/usb mkdir /tmp/ufs mount -t msdosfs /dev/da0s1 /tmp/usb mount -t ufs /dev/ps3disk3p3 /tmp/ufs cd /tmp/ufs tar xvJf /tmp/usb/freebsd_world.tar.xz
/etc/fstab[edit | edit source]
/dev/ps3disk3p3 / ufs rw 1 1 /dev/ps3disk3p1 none swap sw 0 0 proc /proc procfs rw 0 0
/etc/rc.conf[edit | edit source]
hostname="freebsd" ifconfig_glc0="SYNCDHCP" sshd_enable="YES" keyrate="fast" keymap="us.iso" #keymap="fr.iso" #keymap="german.iso" scrnmap="NO" font8x16="iso15-8x16" font8x14="iso15-8x14" font8x8="iso15-8x8"
/etc/kboot.conf[edit | edit source]
- My latest petitboot supports mounting UFS2 filesystems. In this case petitboot will add the FreeBSD boot entry automatically. With old petitboot image you have to mount UFS2 filesystem manually and kexec the file loader.ps3
freebsd=/boot/loader.ps3
|