bump Linux 3.18 trunk revision to 47027; bump Linux 3.18 kernel version to 3.18.21
[ps3openwrt_patches.git] / HOWTO
blobdbc40c8450009b40a26b439620703797982af416
2 # Last stable Linux 2.6.39.4 revisions
3 # trunk: 31744
4 # packages: 31800
6 # Last stable Linux 3.10 revisions
7 # trunk: 40774
8 # packages: 40750
10 # Last stable Linux 3.12 revisions
11 # trunk: 40842
12 # packages: 40817
14 # Last stable Linux 3.14 revisions
15 # trunk: 43682
17 # Last stable Linux 3.18 revisions
18 # trunk: 47027
20 # Last stable Linux 4.1 revisions
21 # trunk: 46609
23 svn co svn://svn.openwrt.org/openwrt/trunk openwrt-dev
24 cd openwrt-dev
25 svn up -r <trunk revision>
27 export PATCHES_DIR=$HOME/git/ps3openwrt/patches.git
28 export CONFIGS_DIR=$HOME/git/ps3openwrt/configs.git
29 export KMAP_DIR=$HOME/git/ps3openwrt/kmap.git
30 export PS3LINUX_DIR=$HOME/git/ps3linux
31 export SCRIPTS_DIR=$HOME/git/ps3otheros/scripts.git
33 patch -p0 < $PATCHES_DIR/feeds-oldpackages-enable.patch
35 ./scripts/feeds update -a
36 ./scripts/feeds install -a
38 # Restore PS3 target
39 # This patch is necessary since trunk revision 34765
41 patch -p0 < $PATCHES_DIR/add-ps3-target.patch
42 patch -p0 < $PATCHES_DIR/copy-initramfs-to-target-dir.patch
43 chmod 755 target/linux/ps3/petitboot/base-files/sbin/initrun
44 chmod 755 target/linux/ps3/petitboot/base-files/sbin/ps3-bl-option
45 chmod 755 target/linux/ps3/petitboot/base-files/bin/login
47 # Fix broken target
49 patch -p0 < $PATCHES_DIR/target-broken-fix.patch
51 # Create non-zipped target image
53 patch -p0 < $PATCHES_DIR/create-non-zipped-target-image.patch
55 # dropbear patches
57 patch -p0 < $PATCHES_DIR/dropbear-no-empty-host-keys.patch
58 mkdir target/linux/ps3/petitboot/base-files/etc/dropbear
59 cp $PATCHES_DIR/dropbear_dss_host_key target/linux/ps3/petitboot/base-files/etc/dropbear
60 cp $PATCHES_DIR/dropbear_rsa_host_key target/linux/ps3/petitboot/base-files/etc/dropbear
62 # package patches
64 patch -p0 < $PATCHES_DIR/parted-package.patch
65 patch -p0 < $PATCHES_DIR/sg3-utils.patch
66 patch -p0 < $PATCHES_DIR/kbd-package.patch
67 patch -p0 < $PATCHES_DIR/kmod-hid-special.patch
68 patch -p0 < $PATCHES_DIR/fix-ps3_gelic-path.patch
69 patch -p0 < $PATCHES_DIR/fix-ps3_gelic-load.patch
70 patch -p0 < $PATCHES_DIR/kernel-module-packages.patch
71 patch -p0 < $PATCHES_DIR/ps3vuart-tools-package.patch
72 patch -p0 < $PATCHES_DIR/ps3sed-package.patch
73 patch -p0 < $PATCHES_DIR/ps3lv1call-tools-package.patch
74 patch -p0 < $PATCHES_DIR/ps3lv1write-package.patch
76 # e2fsprogs patches
78 patch -p0 < $PATCHES_DIR/e2fsprogs-disable-defrag.patch
80 # petitboot patches
82 patch -p0 < $PATCHES_DIR/petitboot-install-artwork.patch
84 cp $PATCHES_DIR/030-petitboot-udevadm-action-fix.diff feeds/oldpackages/utils/petitboot/patches
85 cp $PATCHES_DIR/040-petitboot-mount-ufs2.diff feeds/oldpackages/utils/petitboot/patches
86 cp $PATCHES_DIR/050-petitboot-udev-change-event.diff feeds/oldpackages/utils/petitboot/patches
87 cp $PATCHES_DIR/060-petitboot-kexec-shutdown-fix.diff feeds/oldpackages/utils/petitboot/patches
89 mkdir -p target/linux/ps3/petitboot/base-files/etc/init.d/
90 cp $PATCHES_DIR/umount target/linux/ps3/petitboot/base-files/etc/init.d/
91 cp $PATCHES_DIR/kexec target/linux/ps3/petitboot/base-files/etc/init.d/
92 cp $PATCHES_DIR/udev target/linux/ps3/petitboot/base-files/etc/init.d/
94 # udev patches
96 mkdir -p target/linux/ps3/petitboot/base-files/etc/udev/rules.d
97 cp $PATCHES_DIR/70-persistent-ps3flash.rules target/linux/ps3/petitboot/base-files/etc/udev/rules.d
99 # sysctl patches
101 patch -p0 < $PATCHES_DIR/increase-unix-socket-qlen.patch
102 patch -p0 < $PATCHES_DIR/disable-tcp-ecn.patch
103 cp $PATCHES_DIR/sysctl target/linux/ps3/petitboot/base-files/etc/init.d
105 # kexec-tools patches
107 cp $PATCHES_DIR/0100-kexec-tools-disable-endless-verify-loop.patch package/boot/kexec-tools/patches/
108 cp $PATCHES_DIR/0150-kexec-tools-purgatory-print-sha256-regions.patch package/boot/kexec-tools/patches/
109 cp $PATCHES_DIR/0300-kexec-tools-print-sha256-digest.patch package/boot/kexec-tools/patches/
111 # console keymaps
112 # select your kmap in console file
113 # default kmap is us.kmap
115 cp $PATCHES_DIR/console target/linux/ps3/petitboot/base-files/etc/init.d
116 mkdir -p target/linux/ps3/petitboot/base-files/usr/share/keymaps
117 cp $KMAP_DIR/*.kmap target/linux/ps3/petitboot/base-files/usr/share/keymaps/
119 # BD drive authentication
121 cp $PATCHES_DIR/bd_drive_auth target/linux/ps3/petitboot/base-files/etc/init.d
123 # Enable SCSI polling in kernel
125 cp $PATCHES_DIR/rc.local target/linux/ps3/petitboot/base-files/etc/
127 # WLAN patches
128 # set your ssid and psk in target/linux/ps3/petitboot/base-files/etc/config/wireless
130 mkdir -p target/linux/ps3/petitboot/base-files/lib/wifi
131 cp $PATCHES_DIR/wext.sh target/linux/ps3/petitboot/base-files/lib/wifi/
132 patch -p0 < $PATCHES_DIR/wlan-config.patch
134 # Set root password to 'root' which disables telnet login and enables SSH login
136 cp $PATCHES_DIR/shadow target/linux/ps3/petitboot/base-files/etc
138 # Install OtherOS++ script(s)
140 cp $SCRIPTS_DIR/create_hdd_region.sh target/linux/ps3/petitboot/base-files/sbin/
141 cp $SCRIPTS_DIR/dispmngr_access.sh target/linux/ps3/petitboot/base-files/sbin/
142 cp $SCRIPTS_DIR/gpu_4kb_iopage.sh target/linux/ps3/petitboot/base-files/sbin/
143 cp $SCRIPTS_DIR/dump_lv1_console.sh target/linux/ps3/petitboot/base-files/sbin/
145 # Linux kernel patches
146 # Remove any overlayfs patches.
148 cp -r $PS3LINUX_DIR/kernel-patches-26-39.git target/linux/ps3/patches-2.6.39
149 cp -r $PS3LINUX_DIR/kernel-patches-310.git target/linux/ps3/patches-3.10
150 cp -r $PS3LINUX_DIR/kernel-patches-312.git target/linux/ps3/patches-3.12
151 cp -r $PS3LINUX_DIR/kernel-patches-314.git target/linux/ps3/patches-3.14
152 cp -r $PS3LINUX_DIR/kernel-patches-318.git target/linux/ps3/patches-3.18
153 cp -r $PS3LINUX_DIR/kernel-patches-41.git target/linux/ps3/patches-4.1
155 # Linux kernel configs
157 cp $CONFIGS_DIR/kernel-config-2.6.39 target/linux/ps3/config-2.6.39
158 cp $CONFIGS_DIR/kernel-config-3.10 target/linux/ps3/config-3.10
159 cp $CONFIGS_DIR/kernel-config-3.12 target/linux/ps3/config-3.12
160 cp $CONFIGS_DIR/kernel-config-3.14 target/linux/ps3/config-3.14
161 cp $CONFIGS_DIR/kernel-config-3.18 target/linux/ps3/config-3.18
162 cp $CONFIGS_DIR/kernel-config-4.1 target/linux/ps3/config-4.1
164 # Linux kernel version
165 # choose only one
167 patch -p0 < $PATCHES_DIR/kernel-version-2.6.39.4.patch
168 patch -p0 < $PATCHES_DIR/kernel-version-3.10.patch
169 patch -p0 < $PATCHES_DIR/kernel-version-3.12.patch
170 patch -p0 < $PATCHES_DIR/kernel-version-3.14.patch
171 patch -p0 < $PATCHES_DIR/kernel-version-3.18.patch
172 patch -p0 < $PATCHES_DIR/kernel-version-4.1.patch
174 # Build
176 cp $CONFIGS_DIR/config-huge .config
177 make V=99 menuconfig
178 make V=99 kernel_menuconfig
179 make -j4 V=99
181 # Images
183 ls -l bin/ps3/openwrt-ps3-petitboot-vmlinux-initramfs.elf
184 ls -l bin/ps3/otheros.bin
187 ps3sed and problem with missing ps3strgmngr.h
188 ----------------------------------------------
190 cp build_dir/target-powerpc_uClibc-0.9.33.2/linux-ps3_petitboot/linux-3.18.21/arch/powerpc/include/asm/ps3strgmngr.h \
191         staging_dir/toolchain-powerpc_gcc-4.8-linaro_uClibc-0.9.33.2/include/asm/
193 Debugging
194 ----------
196 Kernel hacking -> Early debugging -> PS3 gelic udbg (LV1 console udbg, Flash udbg)
198 Disable PS3 gelic device driver if you are going to use gelic udbg.
199 Disable PS3 flash device driver if you are going to use flash udbg.
201 kexec -l /root/openwrt-ps3-petitboot-vmlinux-initramfs.elf  --command-line="udbg-immortal initcall_debug keep_bootcon"
203 socat - udp4-listen:18194,reuseaddr
205 strings /dev/ps3flashg
206 dd if=/dev/zero of=/dev/ps3flashg