User:Ckamas

How to program a bare board
break into the boot loader setenv serverip 10.4.11.119 setenv ipaddr 10.4.11.43 tftp a2000000 u-boot.bin protect off 1:0-1 erase 1:0-1 cp.b a2000000 0 ${filesize} saveenv protect on 1:0-1 tftp a2000000 rootfs.arm_nofpu.jffs2 erase all cp.b a2000000 40000 ${filesize} reset

boot into linux username root: password: password ifconfig for ip address run gs.sh ipaddr scrip in cygwin

Notes on how to get build environment up for Gumstix
1)	Download Ubuntu version This version (Edgy Eft) was released in October 2006 so its version number is 6.10. 2)	Install in vmware 3)	Install ubuntu on vmware 4)	Use System, Administration, Synaptic Package Manager to add new packages: http://docwiki.gumstix.org/Buildroot_on_Ubuntu build-essential, libncurses-dev, bison, flex, texinfo, zlib1g-dev, gettext, subversion, wget, ckermit, tftpd-hpa, tftpd, autogen, autoconf /bin/sh is symlinked to a program called dash. Change the symlink to be /bin/bash. Install the vmware tools… you will have to compile them Launch the tools sudo vmware-tools Background the process Get a specific version from the archive svn co -r1200 http://svn.gumstix.com/gumstix-buildroot/trunk gumstix-buildroot results in: build-root/Config.in  build-root/docs build-root/Makefile build-root/package build-root/target toolchain 9)	make cd gumstix-buildroot  make menuconfig  package selection for the target  turn on bash, finutils, grep  tool chain options  turn on gdb builds  make 10)	 Rebuild a.	Normal rebuild: rm * -r –f gumstix-buildroot/build_arm_nofpu/root/* b.	or if you really want to clean it: cd gumstix-buildroot rm -rf toolchain_arm_nofpu c.	Then: make 11)	Download to the board a.	Serial download SMB share the build directory of the Ubuntu vmware machine  loadb a2000000  protect on 1:0-1  erase all  cp.b a2000000 40000 ${filesize}  boot b.	or tftp download  setenv serverip 10.4.11.119  setenv ipaddr 10.4.11.?  saveenv  tftp a2000000 rootfs.arm_nofpu.jffs2  protect on 1:0-1  erase all  cp.b a2000000 40000 ${filesize}  boot 12)	 boot from nfs instead: http://docwiki.gumstix.org/Root_filesystems sudo vim /etc/exports sudo exportfs –ra setup das u boot setenv bootargs 'console=ttyS0,115200n8 root=/dev/nfs rw nfsroot=10.4.11.142:/var/gum,nolock ip=10.4.11.43:10.4.11.142:10.4.11.1:255.255.255.0:disposable::none panic=10\; tftpb a2000000 uImage && bootm a2000000' setenv bootcmd 'tftpb a2000000 uImage\; bootm a2000000' saveenv http://db.assam-glug.org/documentations/Howto/BootPrompt-HOWTO-3.html

How to build under cygwin
mount -o managed -X `cygpath -m /home/ckamas/gumstik/gumstix-buildroot` /home/ckamas/gumstik/gumstix-buildroot svn co -r1200 http://svn.gumstix.com/gumstix-buildroot/trunk gumstix-buildroot make menuconfig GNU build hostname suffix pc-cygwin ? or i686-pc-cygwin Number of jobs to run simultaneously 1 make depmod.exe for cygwin follow: http://docwiki.gumstix.org/Buildroot_on_Linux_2.4 vim configure and kill the stuff around dude! make -k ignore all of the errors cp depmod.exe /sbin try and make buildroot nice –n 10 make > make.out 2>&1

how to compile on linux called from windows
C:\Program Files\PuTTY\plink.exe -ssh -l (user name) -pw (password) gumstix cd /mnt/hgfs/Shared/Disposables; make

How to set the date
rdate -s 192.43.244.18 rdate -s tick.greyware.com

how to get ntp to build:
Anyway, I did get it to compile with the latest buildroot. Attached is my edited ntp.mk file. Drop this in over the ntp.mk file in the package/ntp directory. While you're at it go ahead and delete the 2 .patch files in that directory as you won't need them. Then you should be able to compile without errors. In a nutshell, all I did was change the ntp version from 4.2.0 to 4.2.4 and pass --disable-tickadj to the configure script.

a Linux utility which allows reading/writing of the u-boot environment variables when in Linux.
The utilities are called fw_printenv and fw_setenv.

Note that the proc_gpio module will probably have to be loaded to make this work.
 This is controlled by the file /etc/modules:


 * 1) cat /etc/modules
 * 2) MMC support -- uncomment the next two lines to enable MMC if not using CF
 * 3) mmc_block
 * 4) pxamci


 * 1) Compact Flash support -- Must load smc91x first!!
 * 2) smc91x
 * 3) pcmcia


 * 1) GPIO control
 * 2) proc_gpio

good links
tips and tricks

auto load modules

Modifying U-boot
set build path cd ~/gumstix/gumstix-buildroot/build_arm_nofpu/staging_dir/bin PATH=`pwd`:$PATH cd ../../u-boot-1.1.4/ make clean; make Replacing u-boot setenv serverip 10.4.11.119 setenv ipaddr 10.4.11.43 tftp a2000000 u-boot.bin protect off 1:0-1 erase 1:0-1 cp.b a2000000 0 ${filesize} saveenv protect on 1:0-1 reset for testing: tftp a2000000 u-boot.bin; go a2000000

Building GDB for windows
 Svn co gumstix-buildroot/trunk gumstix-buildroot Make defconfig Make menuconfig

-> build options Number of jobs:1 Gnu build hostname suffix: pc-cygwin

 toolchain options Build/install c++ Build gdb client for host Select version 6.6

 package selection: Deselect all… nothing left selected

 target options: Deselect all… nothing left selected

Cd toolchain/gdb Mkdir 6.6 Edit Config.in to add 6.6 Replacing u-boot

setenv serverip 10.4.11.119 setenv ipaddr 10.4.11.43 tftp a2000000 u-boot.bin protect off 1:0-1 erase 1:0-1 cp.b a2000000 0 ${filesize} saveenv protect on 1:0-1 reset

for testing: tftp a2000000 u-boot.bin; go a2000000



for 1587
edit /etc/modules and remove all except for smc911 edit /etc/network/interface remove all except eth0 and lo no auto!

for uboot 1.2.0
links: Replacing_the_filesystem_image

For 1.2.0 -- in u-boot setenv serverip 10.71.1.116 setenv ipaddr 10.71.1.43 tftp a2000000 u-boot.bin protect off 1:0-1 erase 1:0-1 cp.b a2000000 0 ${filesize} protect on 1:0-1 reset

now load the kernel and rootfs setenv serverip 10.71.1.116 setenv ipaddr 10.71.1.43 saveenv protect on 1:0-1 erase all tftp a2000000 rootfs.arm_nofpu.jffs2 cp.b a2000000 40000 ${filesize}

Now, load the kernel: tftp a2000000 uImage katinstall 100000 katload 100000 bootm

or all in one step setenv serverip 10.71.1.116 && setenv ipaddr 10.71.1.43 && tftp a2000000 u-boot.bin && protect off 1:0-1 && erase 1:0-1 && cp.b a2000000 0 ${filesize} && protect on 1:0-1 setenv serverip 10.71.1.116 && setenv ipaddr 10.71.1.43 && saveenv && protect on 1:0-1 && tftp a2000000 rootfs.arm_nofpu.jffs2 && erase all && cp.b a2000000 40000 ${filesize} && tftp a2000000 uImage && katinstall 100000 && katload 100000
 * 1) load uboot
 * 1) load root fs and kernel
 * 1) done

to copy over files without errors
edit ./target/jffs2/jffs2root.mk line 48 and comment it out: from : -@find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIP) 2>/dev/null || true; to: #-@find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIP) 2>/dev/null || true;

this is done in the kernel patch below now... copy over the i2c_pxa.c file from C:\Work\Disposables\GPLcode\i2c to   G:\gumstix-buildroot\build_arm_nofpu\linux-2.6.21gum\drivers\i2c\busses

patch kernel copy C:\Work\Disposables\GPLcode\kernel-patches to G:\gumstix-buildroot\target\device\Gumstix\kernel-patches copy C:\Work\Disposables\GPLcode\basix-connex\linux.config to G:\gumstix-buildroot\target\device\Gumstix\basix-connex\linux.config