Merge branch 'master' of gitorious.ps3dev.net:ps3linux/livecd
[ps3linux_livecd.git] / HOWTO
blob8c0b39ccd2cc2df568354c4e6646800109f992ed
2 BusyBox 1.21.0
3 ---------------
5 http://busybox.net/downloads/busybox-1.21.0.tar.bz2
7 tar xvjf busybox-1.21.0.tar.bz2
8 cd busybox-1.21.0
9 make menuconfig
10 make
11 ls -l busybox
13 Initramfs
14 ----------
16 KERNEL_VERSION=3.10.14
18 mkdir initramfs
19 cd initramfs
20 mkdir -p bin dev etc lib/modules/$KERNEL_VERSION mnt proc sbin sys usr/bin usr/sbin
22 cp ~/busybox-1.21.0/busybox bin/
23 cd bin
24 ln -sf busybox sh
25 cd ..
27 cp mdev.conf etc/
28 cp modules etc/
30 # set MODE in init script
32 cp init .
34 MOD_LIST="fat vfat isofs crc-ccitt crc-itu-t lzo_compress udf squashfs overlayfs
35          ps3_gelic ps3stor_lib sg ps3rom usb-common usbcore ehci-hcd ohci-hcd usb-storage"
37 for mod in $MOD_LIST; do
38         path=`find  /home/glevand/linux-$KERNEL_VERSION-build/lib/modules/$KERNEL_VERSION -name $mod.ko`
39         if [ -z "$path" ]; then
40                 echo "error: module $mod.ko was not found"
41         fi
42         cp -v $path lib/modules/$KERNEL_VERSION/
43 done
45 # creating initramfs image
47 find . | cpio -H newc -o > ../initramfs.cpio
48 cd ..
49 cat initramfs.cpio | gzip > initramfs.cpio.gz
51 # extracting initramfs image
53 gunzip initramfs.cpio.gz
54 mkdir initramfs
55 cd initramfs
56 cpio -i -d -H newc --no-absolute-filenames < ../initramfs.cpio
58 debootstrap
59 ------------
61 apt-get install debootstrap
63 mkdir livecd
65 debootstrap --arch powerpc wheezy /root/livecd http://ftp.us.debian.org/debian
67 # Enter chroot environment
69 mount -t proc none /root/livecd/proc
70 mount --rbind /dev /root/livecd/dev
71 LANG=C chroot /root/livecd /bin/bash
73 export TERM=xterm-color
75 echo "debian" > /etc/hostname
77 dpkg-reconfigure tzdata
79 # Configure network interfaces
81 cat /etc/network/interfaces
82 ---
83 auto lo
84 iface lo inet loopback
86 allow-hotplug eth0
87 iface eth0 inet dhcp
89 allow-hotplug wlan0
90 iface wlan0 inet dhcp
91     wpa-ssid ssid
92     wpa-psk psk
93 -EOF-
94          
95 # Configure APT
96          
97 cat /etc/apt/sources.list
98 ---
99 deb http://ftp.us.debian.org/debian wheezy main
100 deb-src http://ftp.us.debian.org/debian wheezy main
101          
102 deb http://security.debian.org wheezy/updates main
103 deb-src http://security.debian.org wheezy/updates main
104 -EOF-
105          
106 aptitude update
107          
108 aptitude install locales
109 dpkg-reconfigure locales
110 aptitude install console-data
111 dpkg-reconfigure console-data
112          
113 tasksel install standard
114 aptitude install debootstrap ufsutils
115 aptitude install binutils gcc make autoconf git vim openssh-server sudo
116 aptitude install wireless-tools wpasupplicant libssl-dev libncurses5-dev
117 aptitude install gcc-spu g++-spu newlib-spu spu-tools
118 aptitude install kpartx cryptsetup libreadline-dev libaio-dev libdevmapper-dev libudev-dev
119 aptitude install elinks lynx irssi tcpdump
120          
121 # Make SSH server start at boot so we could ssh to our LiveCD
122          
123 update-rc.d ssh defaults
124          
125 aptitude clean
127 passwd
128 adduser glevand
129 passwd glevand
130          
131 rm -f /etc/udev/rules.d/70-persistent-net.rules
133 # exit chroot environment
135 exit
137 rm -f /root/livecd/root/.bash_history
139 # umount dev and proc
141 umount /root/livecd/dev/pts
142 umount /root/livecd/dev/shm
143 umount /root/livecd/dev
144 umount /root/livecd/proc
146 rootfs
147 -------
149 cd livecd
150 mksquashfs * ../root.sfs
152 unsquashfs root.sfs
153 cd squashfs-root
154 mksquashfs * ../root-changed.sfs
156 Burning CD
157 -----------
159 mkdir -p iso/debianlive
160 cp root.sfs initramfs.cpio.gz vmlinux-$KERNEL_VERSION iso/debianlive
161 echo "debianlive=/debianlive/vmlinux-$KERNEL_VERSION initrd=/debianlive/initramfs.cpio.gz" > iso/kboot.conf
162 cd iso
163 mkisofs -R -J -l -o ../debianlive.iso .
164 cd ..
166 sudo cdrecord -v dev=/dev/sr0 blank=fast
167 sudo cdrecord -v dev=/dev/sr0 debianlive.iso