Build an e-ink am-100 Development Environment on Ubuntu

Source: Internet
Author: User
E-Ink's am-100 active matrix Prototyping Kit consists of four Boards:
6 inch active matrix display
Apollo Display Control Module
Gumstix Single Board Computer (based on Intel XScale PXA 255)
Serial Port Adapter

1. Compile gumstix
1. install required software packages.
> Sudo apt-Get install build-essential libncurses-dev bison flex texinfo zlib1g-dev gettext
Remember to check whether the makeinfo tool is available after installation. I just got stuck here for several days.

2. Install the subversion. Skip if it has been installed.
> Sudo apt-Get install subversion wget subversion-Tools

3. uncompress the compressed package thinspace-1-00.tar.gz on the am-100allocation optical disk to a directory.
I put it in/home/dmbi/thinspace. You can also use CVS to connect to the eink website to obtain the latest thinspace (the password is anonymous ):
> CVS-D: pserver: anonymous@support.eink.com:/home/cvsroot/login
> CVS-Z3-D: pserver: anonymous@support.eink.com:/home/cvsroot/CO thinspace

4. Get gumstix and put it in the sub-directory of the thinspace directory. Here I put it in the thinspace/gumstix directory (the am100soft documentation requires downloading buildroot of version 643, but not necessarily this version ).
> Cd/home/dmbi/thinspace
> Mkdir gumstix
> SVN co-r 643 http://svn.gumstix.com/gumstix-buildroot/trunk gumstix (Note: Use Export instead of CO)
PS1: The SVN server address provided in the am100soft file attached to the CD is http://svn.rungie.com/svn/gumstix-buildroot/trunk, and the slave cannot be connected.
PS2: Although it is not necessary to use version 643, The buildroot of version 1432 can be burned into the Development Board for normal operation, but the flash capacity on the AM-100 Development Board is only 4 MB, the final file system generated by the newer buildroot is about 3.5 mb. After decompression, flash only has 60 kb of space left. It is not enough to mount the mmccard. If those test programs are placed on the mmccard, they cannot be executed, only thinspace/gumstix/build_arm_nofpu/root/bin can be merged in advance and packaged into the root file system in make.

5. buildroot does not generate the C ++ cross compiler by default when making, because the test program is written in C ++, therefore, we need to set make to generate g ++.
If the downloaded buildroot version is less than or equal to 775, go to the/home/dmbi/thinspace/gumstix directory, open the makefile, find "install_libstdcpp: = false", and change it to "install_libstdcpp: = true;
If buildroot is later than 775, the variable install_libstdcpp cannot be found in makefile. Use the following method to open the C ++ option:
> Cd thinspace/gumstix
> Make menuconfig
Go to the toolchain option menu, go down, and find "build/install C ++ compiler and libstdc ++ ?", Set to enable. Save and exit.
Then delete the previous GCC settings:
> RM toolchain_build_arm_nofpu/GCC-*-final/. configured
Then enter the following command line:
> Grep libstdcpp. config
If "br2_install_libstdcpp = Y" is displayed, the C ++ option is enabled correctly.
Note: After the preceding settings are complete, make may still fail. For the sake of safety, delete the target directory before make:
> RM-RF toolchain_build_arm_nofpu

6. Compile the toolchain and kernel.
Because the demo program needs some features in the kernel, add them first:
> Cd gumstix/build_arm_nofpu/busybox-1.00
> Make arch = arm cross_compile = arm-Linux-menuconfig
Select the following options:
Archival utilities: bunzip2
Coreutilities: usleep, WC
Miscellaneous utilities: String, time
Linux system utilities: hexdump
Finally, compile the entire root file system:
> Make depmode =/bin/true
This takes a long time because you need to download a bunch of things. For version 643, these things are downloaded in the gumstix-buildroot/sources/dl directory by default, for newer buildroot, download the package in gumstix-buildroot/dl. These items can be saved and will not be downloaded in the next compilation. Note that the versions of buildroot are different, and the downloaded package versions are different and cannot be mixed. After compilation, three files, root_fs_arm_nofpu, uboot. bin, and uboot. SREC, will appear in the buildroot directory.
PS1: if you are using Ubuntu, make to execute sh patchin. sh will cause problems. Report "(" unexpected, Because ubuntu replaces bash with dash, and dash is a simplified shell. The solution is to use Bash instead:
> Cd/bin
> Sudo RM sh
> Sudo ln-s bash sh
Then return to the buildroot directory and execute make again.
PS2: Because version 643 is old, some package download links have expired. If the package cannot be downloaded, there are two solutions: search on Google and manually download the compressed package, after downloading the package, put it under % gumstix-buildroot %/sources/dl. however, if a compressed package is special, hostapd-0.3.9.tar.gz. I found that this package needs to be downloaded over the Internet every time it is made, even if it is pre-downloaded to the DL directory. Once and for all, you can search for a link that can be downloaded and modify % gumstix-buildroot %/hostap. MK file, replace hostap_url with the available Link (note that the file name of the compressed package should not be added later), for example, set hostap_url = http://ftp.escom.bg/linux/wireless.
PS3: For version 643, the name of the compiled root file system is root_fs_arm_nofpu. for newer versions, the name of the compiled root file system is rootfs. arm_nofpu.jffs2.

7. Compile the test program
First, add the compiled cross-compiler Arm-Linux-GCC and arm-Linux-G ++ to the environment variable path:
> Cd/home/dmbi/thinspace
> Source add_gumstix_tools.sh
Then compile the test program:
> Cd display_tools
> Make clean
> Make
> CD ..
> Cd gumstix_tests
> Make clean
> Make
After compilation, several executable files are generated under these two directories.

8. Install the Development Board.
First, configure minicom, enter miniconm, press Ctrl + A, and then press Z to enter the setting menu. First, press P to set the serial port parameter to 115200 8n1. Save and exit. Return to the main menu again, press O, and select Serial Port setup. In the sub menu, press a to select a serial device. Here I set it to/dev/ttys0, indicating Serial Port 1, press F and select hardware flow control as no (otherwise the keyboard will become invalid). Save and exit and restart minicom.
Extract the mmccard that comes with the Development Board and upload the following files to the mmccard:
Merge the compiled files into the mmccard:
Root_fs_arm_nofpu (for newer buildroot, it should be rootfs. arm_nofpu.jffs2)
../Gumstix_test/gcc_test
../Gumstix_test/cpp_test
../Gumstix_test/run_test.sh
../Gumstix_test/check_utils.sh
Insert the mmccard into the Development Board, open the terminal to run minicom, plug in the power of the Development Board, press any key to enter the uboot command line mode, and enter the following command:
Gum> mmcinit
Gum> fatload MMC 1 a2000000 root_fs_arm_nofpu
Gum> era-31
Gum> CP. B a2000000 40000 $ {filesize}
Gum> boot
Log On with the root account. The password is gumstix and mount the mmccard:
# Mount/mnt/MMC
# Cd/mnt/MMC
#./Run_test.sh
#./Check_util.sh
Both tests should pass correctly. Otherwise, check the previous steps.

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.