Add SVN revision for HEAD; add SSH configuration; correct password configuration
[ps3freebsd_kernel_patches.git] / HOWTO
blob542e8950ca52d1fd2989fe3cd877c650b308a3be
2 Build world
3 ------------
5 SRC_DIR=/usr/src
7 # First checkout source code, a stable branch or the head
9 svn co svn://svn.freebsd.org/base/releng/10.0 $SRC_DIR
13 svn co svn://svn.freebsd.org/base/head $SRC_DIR
14 svn up -r 282143
16 cd $SRC_DIR
18 # Apply patches here
20 for file in /home/glevand/git/ps3freebsd/kernel-patches.git/*.patch; do
21         patch -p0 < $file
22 done
24 # Update LV1 calls
26 cd $SRC_DIR/sys/powerpc/ps3
27 awk -f ps3-hv-asm.awk < ps3-hvcall.master > ps3-hvcall.S
28 awk -f ps3-hv-header.awk < ps3-hvcall.master > ps3-hvcall.h
30 # Create a kernel configuration
32 cd $SRC_DIR/sys/powerpc/conf
33 mkdir /root/kernels
34 cp GENERIC64 /root/kernels/PS3
35 ln -s /root/kernels/PS3
36 cd ../../..
38 # Build world
40 chflags -R noschg /root/PS3
41 rm -rf /root/PS3
43 env MAKEOBJDIRPREFIX=/usr/obj/PS3 make -j4 buildworld TARGET=powerpc TARGET_ARCH=powerpc64 KERNCONF=PS3 DESTDIR=/root/PS3
44 env MAKEOBJDIRPREFIX=/usr/obj/PS3 make -j4 buildkernel TARGET=powerpc TARGET_ARCH=powerpc64 KERNCONF=PS3 DESTDIR=/root/PS3
45 env MAKEOBJDIRPREFIX=/usr/obj/PS3 make -j4 installkernel TARGET=powerpc TARGET_ARCH=powerpc64 KERNCONF=PS3 DESTDIR=/root/PS3
46 env MAKEOBJDIRPREFIX=/usr/obj/PS3 make -j4 installworld TARGET=powerpc TARGET_ARCH=powerpc64 KERNCONF=PS3 DESTDIR=/root/PS3
47 env MAKEOBJDIRPREFIX=/usr/obj/PS3 make -j4 distribution TARGET=powerpc TARGET_ARCH=powerpc64 KERNCONF=PS3 DESTDIR=/root/PS3
49 cd /root/PS3
50 tar cvJf ../freebsd_world.tar.xz .
52 Install world on target
53 ------------------------
55 newfs -U /dev/ps3disk3p3
57 mkdir /tmp/usb
58 mkdir /tmp/ufs
60 mount -t msdosfs /dev/da0s1 /tmp/usb
61 mount -t ufs /dev/ps3disk3p3 /tmp/ufs
63 cd /tmp/ufs
64 tar xvJf /tmp/usb/freebsd_world.tar.xz
66 cat >boot/loader.conf <<EOF
67 autoboot_delay="-1"
68 #boot_single="1"
69 EOF
71 cat >etc/fstab <<EOF
72 /dev/ps3disk3p3         /       ufs     rw      1 1
73 /dev/ps3disk3p1         none    swap    sw      0 0
74 proc                    /proc   procfs  rw      0 0
75 EOF
77 cat >etc/rc.conf <<EOF
78 hostname="freebsd"
80 ifconfig_glc0="SYNCDHCP"
82 sshd_enable="YES"
84 keyrate="fast"
85 keymap="us"
86 #keymap="fr"
87 #keymap="de"
88 scrnmap="NO"
89 font8x16="iso15-8x16"
90 font8x14="iso15-8x14"
91 font8x8="iso15-8x8"
92 EOF
94 cat >etc/kboot.conf <<EOF
95 freebsd=/boot/loader.ps3
96 EOF
98 # Set up user accounts
100 cp /etc/passwd /etc/group /etc/master.passwd /etc/resolv.conf /tmp/ufs/etc/
101 mount -t devfs devfs /tmp/ufs/dev
102 mount -t procfs procfs /tmp/ufs/proc
103 chroot /tmp/ufs /bin/csh
104 pwd_mkdb -p /etc/master.passwd
105 exit
106 umount /tmp/ufs/dev
107 umount /tmp/ufs/proc
109 # Enable SSH password login for root
111 vi /tmp/ufs/etc/ssh/sshd_config
113 PermitRootLogin yes
117 umount /tmp/ufs
118 umount /tmp/usb
120 Build loader
121 -------------
123 cd $SRC_DIR
124 env MAKEOBJDIRPREFIX=/usr/obj/PS3 make TARGET=powerpc TARGET_ARCH=powerpc64 buildenv
125 cd sys/boot
126 make all install DESTDIR=/root/PS3
128 Build kernel
129 -------------
131 cd $SRC_DIR
132 env MAKEOBJDIRPREFIX=/usr/obj/PS3 make -j4 buildkernel installkernel \
133         TARGET=powerpc TARGET_ARCH=powerpc64 KERNCONF=PS3 DESTDIR=/root/PS3
135 Build module
136 -------------
138 cd $SRC_DIR
139 env MAKEOBJDIRPREFIX=/usr/obj/PS3 SYSDIR=$SRC_DIR/sys \
140         make TARGET=powerpc TARGET_ARCH=powerpc64 buildenv
141 cd ~/ps3gpu
142 make