Buildroot on Windows

From GumstixDocsWiki

Jump to: navigation, search

Contents

Building with VMware player and Fedora Core FC6

(most of the text has been copied from the old Wiki; changes have been made to accommodate recent FC6)

Requires

VMware player, www.vmware.com/products/player

  • Several GB of hard drive space
  • Approx. 512MB of RAM

Procedure

Follow the instructions for downloading the free VMware player and install it.

  • Get the Fedora Core 6 virtual machine image from www.thoughtpolice.co.uk/vmware
  • Unzip the FC6 image into a suitable directory.
  • Run VMware player and browse to the FC6 directory and open the .vmx file.

You now have a fully functional FC6 linux distribution running on Windows.

For convenience, you make wish to adjust the size of the virtual screen (ie the window). There are instructions at step 4 of this page.
  • Run the software updater and get all updates, the root password is thoughtpolice
(It will take some time to update ...
The update process may run automatically the first time you log in. If not, start it under Applications > System Tools > Software Updater
  • Run the software installer and install the following packages as a minimum: autoconf, automake, bison, byacc, flex, gcc, gcc-c++, make, makeinfo, ncurses-devel, subversion, texinfo , zlib-devel
Instead of using Add/Remove Software GUI, you can use following command line utility to install above packages.
      yum install 'packname'
% yum install autoconf automake bison byacc flex gcc gcc-c++ make makeinfo ncurses-devel subversion texinfo zlib-devel


Issue the following commands:

Using a basix, connex or recent verdex (>= 1449):

% svn co http://svn.gumstix.com/gumstix-buildroot/trunk gumstix-buildroot

Using an older Verdex (< 1449)

% svn co http://svn.gumstix.com/gumstix-buildroot/branches/users/craig/clemens-270/ gumstix-buildroot

Then issue the following to make

% cd gumstix-buildroot
% make defconfig
% make menuconfig
 ... default binutils 2.17 is supported
 ... Try to compile using all the default settings first, Later on you can try to add/remove package and recompile. ...
% make


To use the PC's serial port as /dev/ttyS0, just add the following to the .vmx configuration file (associated with the virtual image):

serial0.present = "TRUE" serial0.autodetect = "TRUE"

or to "hardwire" it to COM1

serial0.present = "TRUE" serial0.autodetect = "FALSE" serial0.fileName = "COM1"

Just click on the "Serial" button on VMPlayer's title-bar in order to transfer control from Windows to the virtual Linux image. (Credit for the serial stuff to Mark Craig Jr. (mlcraig) ).

Using Windows Hyperterm to Transfer File

If you can't find a Kermit or equivalent on your vmware Player Linux installation, you can transfer the rootfs.arm_nofpu.jffs2 file to Windows, and then use Hyperterm to send the file to U-Boot so that you can try Replacing the filesystem image.

Transferring a file from a vmware guest to the host OS isn't simple. But it can be done using FTP.

  • Install the free Xlight ftp server and start it running.
    • The setup.exe installation is smooth and defaults seem reasonable.
    • When it starts, click on the first button in the toolbar to add a new virtual server. The defaults seem to be mostly ok.
    • Select the newly added server (red icon) and then click "Modify configuration" button on the toolbar.
    • Under Public Path (in the left margin navigation), add a new path (using the green "+" button at the right) mapping / to My Documents or similar. Exit from the Modify Configuration.
    • Click on the User List button in the toolbar, and then add a new user.
    • Tick "Create anonymous user" (or choose username and password). You can leave the home path blank and it will use the / mapping entered above.
    • Exit the User List window with the red X in the title bar.
    • Start the server by clicking the green "play" button (triangle inside a square) underneath the list of virtual servers.
  • Go to your vmplayer guest OS, and ftp the file to your machine's normal address. (My guest OS has a different IP address.)
    • ftp 192.168.1.2 (or whatever your host OS IP address is - use ipconfig from a Command Prompt to find out)
    • Enter username anonymous or appropriate
    • Enter password if appropriate (for anonymous, just type at least a single letter)
    • Enter the command bin to select binary upload
    • Type put rootfs.arm_nofpu.jffs2
    • After approximately 5 seconds the file will be uploaded to Windows.
  • Transfer the file to U-Boot.
    • Set up U-Boot to receive the file as described in Replacing the filesystem image#Flashing over serial
    • Once U-Boot is waiting for the file, choose Hyperterminal's Transfer > Send File menu option.
    • Locate the file, and choose Kermit as the protocol, and press send.
    • Be aware that it could take up to 30 minutes to transfer the file over a serial link.

Just the Tool Chain on Cygwin

This does not work right now... But I think that this is a viable strategy.

Here is an outline on how to build just the tool chain under cygwin for windows. Please flash this out as needed.

  • get cygwin.
  • get the build root
  • modify config.in in the root of build root.
comment out the lines about the package and target configs.  
Package is busy box, etc.  
Target is the root file system.  
Neither one do we want.
#source "package/Config.in"
#source "target/Config.in"
  • Modify the Makefile removing references to the package and target directories
...
#include package/Makefile.in
...
#include package/*/*.mk
#include target/*/*.mk
# target stuff is last so it can override anything else
#include target/Makefile.in
  • make the tool chain now.
  • the tool chain is in:
build_arm_nofpu/staging_dir/bin
Personal tools