Difference between revisions of "User:Urjaman/Building the kernel on the Pandora"
From Pandora Wiki
(Initial WIP draft of my pandora kernel building Howto) |
(Attempt 1 at wiki formatting) |
||
Line 1: | Line 1: | ||
− | |||
− | |||
This is still a WIP set of notes. Wikification in progress. | This is still a WIP set of notes. Wikification in progress. | ||
− | + | == Open up a terminal == | |
− | + | == Install local toolchain and git == | |
− | sudo opkg update | + | sudo opkg update |
− | + | This is untested and IIRC I needed to fiddle with the names a bit. | |
− | + | You can "search" for a name with eg. with sudo opkg list | grep name | |
− | sudo opkg install gcc gcc-symlinks make binutils-dev cpp cpp-symlinks g++ g++-symlinks libstdc++-dev git | + | sudo opkg install gcc gcc-symlinks make binutils-dev cpp cpp-symlinks g++ g++-symlinks libstdc++-dev git |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | == Get ext2 space == | |
− | + | === Choose from === | |
+ | ==== root in SD ==== | ||
+ | mkdir dev && cd dev | ||
+ | ==== ext2 formatted SD card ==== | ||
+ | cd /media/<ext2card> | ||
+ | mkdir dev && cd dev | ||
+ | ==== ext2 loop file (1GiB) on an SD card ==== | ||
+ | cd /media/<fatcard> | ||
+ | dd if=/dev/zero of=dev.ext2 bs=1M count=1024 | ||
+ | mke2fs -m 0 dev.ext2 | ||
+ | mkdir dev | ||
+ | sudo mount -o loop dev.ext2 dev | ||
+ | You should now be in a folder named "dev" suitable for the job. | ||
− | + | == Checkout pandora-kernel == | |
− | git clone --depth=1 git://git.openpandora.org/ | + | git clone --depth=1 git://git.openpandora.org/pandora-kernel.git |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | 3. | + | == Checkout and apply patches == |
− | + | git clone --depth=1 git://git.openpandora.org/openpandora.oe.git | |
− | + | cd pandora-kernel | |
+ | Here cross-ref against ../openpandora.oe/recipes/linux/omap3-pandora-kernel_2.6.27-pandora.bb wont hurt. | ||
+ | Warning: Mega-list-of-commands follows, formatted it as an sh script if needed | ||
+ | #!/bin/bash -e | ||
+ | patch -Np1 < ../openpandora.oe/recipes/linux/omap3-pandora-kernel/0001-Add-EHCI-patch-suggested-by-Steven-Kipisz.patch | ||
+ | patch -Np1 < ../openpandora.oe/recipes/linux/omap3-pandora-kernel/0002-Add-missing-define-to-EHCI-OMAP.c.patch | ||
+ | patch -Np1 < ../openpandora.oe/recipes/linux/omap3-pandora-kernel/no-empty-flash-warnings.patch | ||
+ | patch -Np1 < ../openpandora.oe/recipes/linux/omap3-pandora-kernel/oprofile-0.9.3.armv7.diff | ||
+ | patch -Np1 < ../openpandora.oe/recipes/linux/omap3-pandora-kernel/no-cortex-deadlock.patch | ||
+ | patch -Np1 < ../openpandora.oe/recipes/linux/omap3-pandora-kernel/read_die_ids.patch | ||
+ | patch -Np1 < ../openpandora.oe/recipes/linux/omap3-pandora-kernel/fix-install.patch | ||
+ | patch -Np1 < ../openpandora.oe/recipes/linux/omap3-pandora-kernel/mru-fix-timings.diff | ||
+ | patch -Np1 < ../openpandora.oe/recipes/linux/omap3-pandora-kernel/mru-fix-display-panning.diff | ||
+ | patch -Np1 < ../openpandora.oe/recipes/linux/omap3-pandora-kernel/mru-make-dpll4-m4-ck-programmable.diff | ||
+ | patch -Np1 < ../openpandora.oe/recipes/linux/omap3-pandora-kernel/mru-improve-pixclock-config.diff | ||
+ | patch -Np1 < ../openpandora.oe/recipes/linux/omap3-pandora-kernel/mru-make-video-timings-selectable.diff | ||
+ | patch -Np1 < ../openpandora.oe/recipes/linux/omap3-pandora-kernel/mru-enable-overlay-optimalization.diff | ||
+ | patch -Np1 < ../openpandora.oe/recipes/linux/omap3-pandora-kernel/dvb-fix-dma.diff | ||
+ | patch -Np1 < ../openpandora.oe/recipes/linux/omap3-pandora-kernel/0001-Removed-resolution-check-that-prevents-scaling-when.patch | ||
+ | patch -Np1 < ../openpandora.oe/recipes/linux/omap3-pandora-kernel/0001-Implement-downsampling-with-debugs.patch | ||
+ | patch -Np1 < ../openpandora.oe/recipes/linux/omap3-pandora-kernel/musb-rxtx.patch | ||
+ | patch -Np1 < ../openpandora.oe/recipes/linux/omap3-pandora-kernel/squashfs/0006-SquashFS-Backport-SquashFS4-to-our-2.6.27-tree.patch | ||
+ | patch -Np1 < ../openpandora.oe/recipes/linux/omap3-pandora-kernel/aufs2/0007-AUFS2-Add-latest-AUFS2-in-tree-code-for-2.6.27.patch | ||
− | + | == Fix Makefile == | |
− | + | This gem is from vminko's ebuild | |
− | + | sed -i 's/?= arm-linux-/=/' Makefile | |
− | |||
− | |||
− | |||
− | |||
+ | == Configure kernel == | ||
+ | cp ../openpandora.oe/recipes/linux/omap3-pandora-kernel/defconfig .config | ||
+ | make oldconfig | ||
+ | if you want to change configuration: | ||
+ | make menuconfig | ||
+ | You will need to change the configuration if you want the kernel name to match stock, disable General Setup -> Automatically append version information to the version string . | ||
− | + | == Build the kernel == | |
− | make modules | + | make modules |
− | make uImage | + | make uImage |
− | + | if you want to install modules: | |
− | sudo make modules_install | + | sudo make modules_install |
Revision as of 10:03, 30 October 2010
This is still a WIP set of notes. Wikification in progress.
Contents
Open up a terminal
Install local toolchain and git
sudo opkg update
This is untested and IIRC I needed to fiddle with the names a bit. You can "search" for a name with eg. with sudo opkg list | grep name
sudo opkg install gcc gcc-symlinks make binutils-dev cpp cpp-symlinks g++ g++-symlinks libstdc++-dev git
Get ext2 space
Choose from
root in SD
mkdir dev && cd dev
ext2 formatted SD card
cd /media/<ext2card> mkdir dev && cd dev
ext2 loop file (1GiB) on an SD card
cd /media/<fatcard> dd if=/dev/zero of=dev.ext2 bs=1M count=1024 mke2fs -m 0 dev.ext2 mkdir dev sudo mount -o loop dev.ext2 dev
You should now be in a folder named "dev" suitable for the job.
Checkout pandora-kernel
git clone --depth=1 git://git.openpandora.org/pandora-kernel.git
Checkout and apply patches
git clone --depth=1 git://git.openpandora.org/openpandora.oe.git cd pandora-kernel
Here cross-ref against ../openpandora.oe/recipes/linux/omap3-pandora-kernel_2.6.27-pandora.bb wont hurt. Warning: Mega-list-of-commands follows, formatted it as an sh script if needed
#!/bin/bash -e patch -Np1 < ../openpandora.oe/recipes/linux/omap3-pandora-kernel/0001-Add-EHCI-patch-suggested-by-Steven-Kipisz.patch patch -Np1 < ../openpandora.oe/recipes/linux/omap3-pandora-kernel/0002-Add-missing-define-to-EHCI-OMAP.c.patch patch -Np1 < ../openpandora.oe/recipes/linux/omap3-pandora-kernel/no-empty-flash-warnings.patch patch -Np1 < ../openpandora.oe/recipes/linux/omap3-pandora-kernel/oprofile-0.9.3.armv7.diff patch -Np1 < ../openpandora.oe/recipes/linux/omap3-pandora-kernel/no-cortex-deadlock.patch patch -Np1 < ../openpandora.oe/recipes/linux/omap3-pandora-kernel/read_die_ids.patch patch -Np1 < ../openpandora.oe/recipes/linux/omap3-pandora-kernel/fix-install.patch patch -Np1 < ../openpandora.oe/recipes/linux/omap3-pandora-kernel/mru-fix-timings.diff patch -Np1 < ../openpandora.oe/recipes/linux/omap3-pandora-kernel/mru-fix-display-panning.diff patch -Np1 < ../openpandora.oe/recipes/linux/omap3-pandora-kernel/mru-make-dpll4-m4-ck-programmable.diff patch -Np1 < ../openpandora.oe/recipes/linux/omap3-pandora-kernel/mru-improve-pixclock-config.diff patch -Np1 < ../openpandora.oe/recipes/linux/omap3-pandora-kernel/mru-make-video-timings-selectable.diff patch -Np1 < ../openpandora.oe/recipes/linux/omap3-pandora-kernel/mru-enable-overlay-optimalization.diff patch -Np1 < ../openpandora.oe/recipes/linux/omap3-pandora-kernel/dvb-fix-dma.diff patch -Np1 < ../openpandora.oe/recipes/linux/omap3-pandora-kernel/0001-Removed-resolution-check-that-prevents-scaling-when.patch patch -Np1 < ../openpandora.oe/recipes/linux/omap3-pandora-kernel/0001-Implement-downsampling-with-debugs.patch patch -Np1 < ../openpandora.oe/recipes/linux/omap3-pandora-kernel/musb-rxtx.patch patch -Np1 < ../openpandora.oe/recipes/linux/omap3-pandora-kernel/squashfs/0006-SquashFS-Backport-SquashFS4-to-our-2.6.27-tree.patch patch -Np1 < ../openpandora.oe/recipes/linux/omap3-pandora-kernel/aufs2/0007-AUFS2-Add-latest-AUFS2-in-tree-code-for-2.6.27.patch
Fix Makefile
This gem is from vminko's ebuild
sed -i 's/?= arm-linux-/=/' Makefile
Configure kernel
cp ../openpandora.oe/recipes/linux/omap3-pandora-kernel/defconfig .config make oldconfig
if you want to change configuration:
make menuconfig
You will need to change the configuration if you want the kernel name to match stock, disable General Setup -> Automatically append version information to the version string .
Build the kernel
make modules make uImage
if you want to install modules:
sudo make modules_install