Build platform under Ubuntu (1)

Source: Internet
Author: User
Compile the linux2.6 kernel for OMAP5912 In ubuntu.
Result:
1. the kernel image is compiled successfully, both 2.6.8-RC3 & 2.6.20;
2. After downloading to the Board, the system does not respond after uncompress kernel image;
3. u-boot1.1.6 compiled successfully, down to the board can also be used;
Todo:
Try to find the method for normal compilation by changing the platform and matching.
ECHO confirms that fc6 + 2.6.20 is acceptable.

1. Support for serial ports
If the serial port is not included in Nb, The usb2serial line can be automatically identified as/dev/ttyusb0. Use dmesg to view information:
[2, 3436.024000] USB 2-2: New full speed USB device using uhci_hcd and address 5
[2, 3436.188000] USB 2-2: configuration #1 chosen from 1 choice
[3436.192000] cp2101 2-. 0: cp2101 converter Detected
[2, 3436.304000] USB 2-2: reset full speed USB device using uhci_hcd and address 5
[2, 3436.452000] USB 2-2: cp2101 converter now attached to ttyusb0
As you can see, the chip of My USB-to-serial line is cp2101.

2. Serial Port Terminal Program minicom Configuration
> Ubuntu does not have minicom by default. You need to install minicom first. I installed v2.2;
> Set parameters:
> Select 'modem and dialing 'and ensure that 'init string' (a) is clear.
> Use/dev/ttyusb0 at 115,200 Baud, 8bps, no parity, 1 stop bit, and no flow control.

3. re-run uboot if needs
If the uboot on the board is damaged, you need to re-burn the uboot. For more information, see mdk5912 User Guide 3.3.2 by Peter he.
Note:
When I follow the step in the document, once the "download binary image (osk5912boot. BIN) to address 0x11fc0000 ", The axd will return an error:"... re-enter debug... ".
Then I directly
Step 1. Run romprog. axf;
Step 2. download binary image (osk5912boot. Bin) to address 0x11fc0000;
Step 3 .......
Then, pause the axd as if the system was flying. However, if the reboot board is successfully burned -_-!

4. Install TFTP support
By default, UBUNTU does not have the inetd/xinetd/inetd-HPA support required for TFTP and TFTP. You need to install it on your own.
I basically follow the installation steps in Reference Document 1, but it is not so good luck, all is the problem -_-!
1. Install TFTP & tftpd;
2. When netkit-inetd is installed, the system prompts: You need to uninstall the package required by tftpd & Another TFTPD;
3. PS-E | grep Inet found that the system did not run inetd, but xinetd already exists;
3. Configure/etc/xinetd. conf in other documents (it is also used in osk newbie guider, but the configuration file location is different), test get file and fail;
4. After the tftpd & inetd has been installed several times, it is found that the recipient has not been required to be detached for a certain time -_-!;
5. However, inetd reload cannot be started;
6. boot the next morning. PS-eshows that inetd and xinetd are all running;
7. refer to the documentation for connection to 10.0.0.1 during the test. During the actual test, TFTP 127.0.0.1 is OK (think too ), I really don't know if I am different from others or many people haven't tried it on their own?
8. If the test is passed, it seems that inetd plays a role. Yesterday, the key was I don't know why. inetd never ran up, RP A RP.
Reference:
--------------------------------------------------
1. Configure the TFTP service in Ubuntu
Http://my.opera.com/volans/blog/show.dml/680197
2. Development Board practice (2) -- configure the host service: NFS and TFTP
Http://www.cublog.cn/u/13991/showart_108131.html
3. kubutu TFTP Configuration
Http://www.akae.cn/space/html/24/t-1324.html
4. New Application Guide for Ubuntu Linux [2]
Http://www.enet.com.cn/article/2007/0509/A20070509577608_6.shtml
--------------------------------------------------

5. Configure the network connection

1. Set the MAC address:
OMAP # setenv ethaddr 00: 0e: 99: 02: 07: 1c
2. Set the IP address and so on:
OMAP # setenv ipaddr 138.198.177.250
OMAP # setenv serverip 138.198.177.80
OMAP # setenv netmask 255.255.252.0
OMAP # setenv gatewayip 138.198.179.254
Note:
Directly execute DHCP to replace the above steps, if your host PC supports.
3. Save Parameters
OMAP # saveenv

6. Burn and write the kernel Image
1. Send your 'uimage. CC' file to the '/tftpboot/' directory on PC;
2. Download kernel iamge to the Board:
OMAP # tftpboot 0x10000000 uimage. CC
The kernel image size is bytes transferred = 1229199 (12c18f HEX );
3. Then we erase the old kernel and put the new one on:
OMAP # erase-15
OMAP # cp. B 0x10000000 0x100000 12c18f (Note: 12c18f is what you get abve)
Tip: If you receive an error like this:
--------------------------------------------------
Copy to flash... not erased at XXXXXXXX (XXXX)
Flash not erased
--------------------------------------------------
You will need to erase more than the 8-15 range (I need erase to 17 here ).
4. Finally, we set some boot parameters for the kernel:
OMAP # setenv bootargs console = ttyusb0, 115200n8 noinitrd IP = 138.198.177.250: 138.198.177.80: container: Container 252.0: osk: eth0: off root =/dev/nfs RW nfsroot = kernel: /data/rootfs2.6, nolock mem = 32 m
OMAP # saveenv
5. You are now ready to start the kernel:
OMAP # bootm 0x100000
Bug report:
At this point, we will stop "Uncompressing Linux... Done, booting the kernel. According to osk newbie guider, This is a factory U-boot bug.
> Upgrade U-boot;
> Modify Linux Kernel File
.
6. Select the second solution in step 5. You need to build the kernel image again. This build kernel is different from the first one:
> Modify the Source Code mentioned in the osk newbie guider document;
The re-generated kernel image is saved as DOC/OMAP/**. 20070608, And the mkimage tool generated in uboot is also retained.
--------------------------------------------------
TIPS:
In the mkimage parameter, the relationship between-A and-E is as follows:
Http://www.linuxforum.net/forum/printthread.php? Cat = & board = embedded & main = 555581 & type = thread

Mkimage...-A 0xa0008000-e 0xa0008040...
I have roughly looked at it. If you use the compression method,-a-e should be the same.
-The address specified by a is the address stored after decompression, or the address of execution.
For non-compression methods, we need to add 0x40.
--------------------------------------------------
7. The final generated image still stops at booting the kernel and does not have a corresponding effect. Try again to compile a new version of U-boot.

7. Compile and install the new U-boot
Compile the arm-linux-3.3.4 successfully with the u-boot-1.1.6 pass, and the generated U-boot is saved as DOC/OMAP/u-boot.bin.20070608.
1. Download arm-linux-gcc-3.3.4
Http://www.handhelds.org/download/projects/toolchain/
2. decompress the package to/usr/local/ARM/3.3.4, change $ path, and compile uboot. For more information, see osk newbie guider;
3. Generate a u-boot.bin under the current U-boot directory;
4. Follow the osk newbie guider steps to re-run the U-boot command. After the restart, the U-boot version is 1.1.6;
Note: The system prompts "*** warning-bad CRC, using default environment" at startup"
Refer to the explanation of U-boot for the omap16xx GSM/GPRS software development platform:
--------------------------------------------------
This is harmless and will go away as soon as you have initialized and saved the environment
Variables. This indicates that the environment variables are not stored in flash. After
Environment variables are saved using saveenv command, this warning will disappear.
--------------------------------------------------
5. Reboot Linux. It's still the same!

8. Use the uboot image: osk-u-boot_8_11_05_RevD.bin provided by OMAP to replace your own U-boot, invalid.

9. re-create a non-compressed uimage and try again. invalid:
# Arm-Linux-objcopy-O Binary-R. Note-R. comment-s ARCH/ARM/boot/compressed/vmlinux Linux. Bin
# Mkimage-A arm-O Linux-T kernel-C none-A 0x10c08000-e 0x10c08000-N 'linux kernel image'-D Linux. Bin uimage. CC

10. boot directly from Ram is invalid:
OMAP5912 osk # TFTP 0x10000000 uimage. CC
OMAP5912 osk # bootm 0x10000000

11. Compile 2.6.8-RC3:
Compile Linux 2.6.8-RC3 according to omap5912osk_2.6.
1. Download source from OMAP official website;
2. Note that this time is compiled with a arm-gcc-3.3.4;
3. When making omap5912osk_deconfig, an error is returned:
--------------------------------------------------
Scripts/kconfig/mconf. C: 91: Error: static declaration of 'current _ menu'
Non-static Declaration
Scripts/kconfig/LKC. h: 63: Error: previous declaration of 'current _ menu'
Make [1]: *** [scripts/kconfig/mconf. O] Error 1
--------------------------------------------------
It is said that the conflict between 2.6.8 (or lower version) and Ubuntu's gcc-4. * is caused. A simple method is to remove the static Declaration of the error.
4. The result is still invalid!
5. The compiled uimage. CC is saved as uimage. cc.20070608 _ 2.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.