Difference between revisions of "Didj Kernel Build Environment"
Ca0abinary (Talk | contribs) (Created page with '==Steps to a working didj build environment using Ubuntu 9.1 (Karmic Koala)== Add the following line your "/etc/apt/sources.list": <blockquote>deb http://scratchbox.org/debian/…') |
(Add Category Didj) |
||
| (7 intermediate revisions by 2 users not shown) | |||
| Line 7: | Line 7: | ||
Install Scratchbox: | Install Scratchbox: | ||
| − | + | :sudo apt-get update | |
| − | sudo apt-get update | + | :sudo apt-get install scratchbox-core scratchbox-devkit-cputransp scratchbox-devkit-debian scratchbox-libs scratchbox-toolchain-arm-gcc4.1-uclibc20061004 |
| − | sudo apt-get install scratchbox-core scratchbox-devkit-cputransp scratchbox-devkit-debian scratchbox-libs scratchbox-toolchain-arm-gcc4.1-uclibc20061004 | + | |
| − | + | ||
Add these settings to /etc/sysctl.conf | Add these settings to /etc/sysctl.conf | ||
| − | + | :vm.vdso_enabled = 0 | |
| − | vm.vdso_enabled = 0 | + | :vm.mmap_min_addr = 4096 |
| − | vm.mmap_min_addr = 4096 | + | |
| − | + | ||
Run: | Run: | ||
| − | + | :sudo sysctl -p | |
| − | + | ||
| − | + | ||
Add yourself to the "scratchbox" user group: | Add yourself to the "scratchbox" user group: | ||
| − | + | :sudo /scratchbox/sbin/sbox_adduser "$USER" | |
| − | + | ||
| − | + | ||
Make a symbolic link to avoid sudo errors: | Make a symbolic link to avoid sudo errors: | ||
| − | + | :sudo ln -s /scratchbox/tools/bin/fakeroot /scratchbox/tools/bin/sudo | |
| − | + | ||
| − | + | ||
| Line 45: | Line 35: | ||
Enter "scratchbox" into a terminal to start the sandbox environment: | Enter "scratchbox" into a terminal to start the sandbox environment: | ||
| − | |||
# Next, enter "sb-menu" to bring up the Scratchbox configuration menu. | # Next, enter "sb-menu" to bring up the Scratchbox configuration menu. | ||
# Then you'll want to select "Setup". | # Then you'll want to select "Setup". | ||
| Line 55: | Line 44: | ||
# Select "YES" to install files on the target. Choose any extra packages to install, and then select "OK". | # Select "YES" to install files on the target. Choose any extra packages to install, and then select "OK". | ||
# Finally, choose "YES" to select the target you just created. | # Finally, choose "YES" to select the target you just created. | ||
| − | |||
Run: | Run: | ||
| − | + | :wget http://medialib.leapfrog.com/didj_opensource_code/Didj-Linux-4222-20090422-1236.tar.gz | |
| − | + | ||
| − | + | ||
And decompress it: | And decompress it: | ||
| − | + | :tar -xzf Didj-Linux-4222-20090422-1236.tar.gz | |
| − | + | ||
| − | + | ||
| − | Run: | + | Run from your home folder: |
| − | + | :nano .bashrc | |
| − | + | ||
| − | + | ||
And put in this text: | And put in this text: | ||
| − | + | :export PROJECT_PATH=~/Didj-Linux-4222-20090422-1236 | |
| − | + | :export TARGET_MACH=LF_LF1000 | |
| − | + | :export CROSS_COMPILE=sbox-arm-linux-uclibc- | |
| − | + | :export ROOTFS_PATH=~/didj-rootfs | |
| − | + | :export EROOTFS_PATH=~/didj-rootfs | |
| − | + | :export RELEASE_PATH=~/release | |
| − | + | :export TFTP_PATH=~/tftp | |
| − | + | :export KERNELDIR=~/Didj-Linux-4222-20090422-1236/linux-2.6.20-lf1000/ | |
| + | :export PATH=$PATH:/scratchbox/compilers/arm-gcc4.1-uclibc20061004/bin | ||
| − | + | Exit scratchbox | |
| − | Exit | + | |
| − | + | ||
| − | + | ||
Run: | Run: | ||
| − | + | :sudo cp /scratchbox/users/$USER/home/$USER/Didj-Linux-4222-20090422-1236/host_tools/mkimage /scratchbox/compilers/bin/ | |
| − | + | :sudo mv /scratchbox/users/$USER/home/$USER/Didj-Linux-4222-20090422-1236/host_tools/mkimage /scratchbox/users/$USER/home/$USER/Didj-Linux-4222-20090422-1236/host_tools/mkimage.disable | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| + | Now go go back into scratchbox and run: | ||
| − | + | :mkdir didj-rootfs | |
| + | :mkdir release | ||
| + | :mkdir tftp | ||
| + | :./Didj-Linux-4222-20090422-1236/scripts/make_rootfs.sh | ||
| − | + | ==Change Kernel Settings== | |
| + | If you want to change kernel options, make sure you are not in scratchbox and run these commands: | ||
| − | + | :sudo apt-get install libncurses5-dev | |
| − | + | :cd /scratchbox/users/$USER/home/$USER/Didj-Linux-4222-20090422-1236/linux-2.6.20-lf1000 | |
| − | + | :make menuconfig | |
| − | + | ||
| − | + | ==Create kernel.bin== | |
| − | + | To make a bootable kernel.bin for use in a distribution package run this command inside scratchbox: | |
| − | + | :./Didj-Linux-4222-20090422-1236/scripts/make_kernel.py | |
| − | + | The resulting kernel.bin will be in the scripts directory. | |
| − | + | [[Category:Didj]] | |
Latest revision as of 15:28, 9 May 2011
Steps to a working didj build environment using Ubuntu 9.1 (Karmic Koala)
Add the following line your "/etc/apt/sources.list":
deb http://scratchbox.org/debian/ stable main
Install Scratchbox:
- sudo apt-get update
- sudo apt-get install scratchbox-core scratchbox-devkit-cputransp scratchbox-devkit-debian scratchbox-libs scratchbox-toolchain-arm-gcc4.1-uclibc20061004
Add these settings to /etc/sysctl.conf
- vm.vdso_enabled = 0
- vm.mmap_min_addr = 4096
Run:
- sudo sysctl -p
Add yourself to the "scratchbox" user group:
- sudo /scratchbox/sbin/sbox_adduser "$USER"
Make a symbolic link to avoid sudo errors:
- sudo ln -s /scratchbox/tools/bin/fakeroot /scratchbox/tools/bin/sudo
At this point you will need to log out of and then back in to your computer and re-open terminal.
Enter "scratchbox" into a terminal to start the sandbox environment:
- Next, enter "sb-menu" to bring up the Scratchbox configuration menu.
- Then you'll want to select "Setup".
- Select "<NEW>" for a new target, then enter "didj" as your target name.
- Choose "arm-gcc4.1-uclibc20061004" as your compiler.
- Then, browse down to select the "cputransp" development kit. Then select "DONE".
- Next, select "qemu-arm-cvs" for your CPU-transparency method.
- Then, choose "NO" for extracting a rootstrap to the target.
- Select "YES" to install files on the target. Choose any extra packages to install, and then select "OK".
- Finally, choose "YES" to select the target you just created.
Run:
And decompress it:
- tar -xzf Didj-Linux-4222-20090422-1236.tar.gz
Run from your home folder:
- nano .bashrc
And put in this text:
- export PROJECT_PATH=~/Didj-Linux-4222-20090422-1236
- export TARGET_MACH=LF_LF1000
- export CROSS_COMPILE=sbox-arm-linux-uclibc-
- export ROOTFS_PATH=~/didj-rootfs
- export EROOTFS_PATH=~/didj-rootfs
- export RELEASE_PATH=~/release
- export TFTP_PATH=~/tftp
- export KERNELDIR=~/Didj-Linux-4222-20090422-1236/linux-2.6.20-lf1000/
- export PATH=$PATH:/scratchbox/compilers/arm-gcc4.1-uclibc20061004/bin
Exit scratchbox
Run:
- sudo cp /scratchbox/users/$USER/home/$USER/Didj-Linux-4222-20090422-1236/host_tools/mkimage /scratchbox/compilers/bin/
- sudo mv /scratchbox/users/$USER/home/$USER/Didj-Linux-4222-20090422-1236/host_tools/mkimage /scratchbox/users/$USER/home/$USER/Didj-Linux-4222-20090422-1236/host_tools/mkimage.disable
Now go go back into scratchbox and run:
- mkdir didj-rootfs
- mkdir release
- mkdir tftp
- ./Didj-Linux-4222-20090422-1236/scripts/make_rootfs.sh
Change Kernel Settings
If you want to change kernel options, make sure you are not in scratchbox and run these commands:
- sudo apt-get install libncurses5-dev
- cd /scratchbox/users/$USER/home/$USER/Didj-Linux-4222-20090422-1236/linux-2.6.20-lf1000
- make menuconfig
Create kernel.bin
To make a bootable kernel.bin for use in a distribution package run this command inside scratchbox:
- ./Didj-Linux-4222-20090422-1236/scripts/make_kernel.py
The resulting kernel.bin will be in the scripts directory.