Busy Box Compilation for Arm

Alexander Reddy Vatti
Hello All

please anyone can say, how to compile busybox
Where it will generate output.

I am using Mini2440 +3.5 lcd board

busybox          :  busybox-1.13.3-mini2440
Toolchain        :arm-linux-gcc-4.3.2
Operating system :Fedora 6

Please let me any other tools are required,if required please sugget me the
internet path(where can i get).

Please let me busy box compilation,to go the things better.

Thank you very much

davef
mkdir mini2440-bootstrap
mkdir target
mkdir busybox-1.13.3
   and extract the source here

in your host (.profile):

export PATH=/home/user/mini2440-bootstrap/arm-2008q3/bin:$PATH

CROSS_COMPILE=arm-none-linux-gnueabi-
CC=”${CROSS_COMPILE}gcc –march=armv4t –mtune=arm920t”
export CROSS_COMPILE
export CC

navigate to this directory

[busybox-1.13.3] # make defconfig
[busybox-1.13.3] # make ARCH=arm menuconfig
[busybox-1.13.3] # make clean
[busybox-1.13.3] # make ARCH=arm
[busybox-1.13.3] # make ARCH=arm
 CONFIG_PREFIX=/home/user/mini2440-
 bootstrap/target install

You'll find your output in target

pascal
Hello,

I have a micro2440 + 1Gb NAND + x35 lcd. I would like ro run
linux-kernel-2.6.32.2 and busybox-1.16.0 via NFS. I followed the
instruction on this site to do that:
http://cchia-cwp.blogspot.com/2010/03/mini2440-friendlyarm-for-embedded....

The problem is that there is always the Kernel panic error! I have added
the option user_debug=31 to kernel command-line parameter to see what
happened but I couldn't identify the problem. Below is the message sent
when the system is booting:

U-Boot 1.3.2-micro2440 (May 21 2011 - 21:55:14)                            
                                    
                                                                           
                                    
I2C:   ready                                                               
                                    
DRAM:  64 MB                                                               
                                    
NOR Flash not found. Use hardware switch and 'flinit'                      
                                    
Flash:  0 kB                                                               
                                    
NAND:  Bad block table not found for chip 0                                
                                    
Bad block table not found for chip 0                                       
                                    
1024 MiB                                                                   
                                    
Found Environment offset in OOB..                                          
                                    
USB:   S3C2410 USB Deviced                                                 
                                    
In:    serial                                                              
                                    
Out:   serial                                                              
                                    
Err:   serial                                                              
                                    
MAC: 08:08:11:18:12:27                                                     
                                    
Hit any key to stop autoboot:  0                                           
                                    
dm9000 i/o: 0x20000300, id: 0x90000a46                                     
                                    
DM9000: running in 16 bit mode                                             
                                    
MAC: 08:08:11:18:12:27                                                     
                                    
TFTP from server 192.168.1.95; our IP address is 192.168.1.65              
                                    
Filename 'uImage'.                                                         
                                    
Load address: 0x32000000
Loading: T
#################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #######################################
done
Bytes transferred = 2857108 (2b9894 hex)
## Booting kernel from Legacy Image at 32000000 ...
   Image Name:   
   Created:      2011-06-13  13:44:22 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2857044 Bytes =  2.7 MB
   Load Address: 30008000
   Entry Point:  30008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing
Linux...........................................................................
...............................................................
Linux version 2.6.32.2-FriendlyARM (khang@ThinkpadR500) (gcc version 4.4.1
(Sourcery G++ Lite 2009q3-67) ) #5 Mon Jun 13 15:33:47 CEST 2011
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
CPU: VIVT data cache, VIVT instruction cache
Machine: FriendlyARM Mini2440 development board
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)
S3C24XX Clocks, (c) 2004 Simtec Electronics
S3C244X: core 405.000 MHz, memory 101.250 MHz, peripheral 50.625 MHz
CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
Kernel command line: console=ttySAC0,115200 root=/dev/nfs rw
nfsroot=192.168.1.95:/home/khang/Workspace/devel/exports/rootfs
ip=192.168.1.65 rootdelay=1 noi1
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 59188KB available (5060K code, 464K data, 160K init, 0K highmem)
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:85
irq: clearing pending status 02000000
irq: clearing subpending status 00000002
Console: colour dummy device 80x30
console [ttySAC0] enabled
Calibrating delay loop... 201.93 BogoMIPS (lpj=504832)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics
DMA channel 0 at c4808000, irq 33
DMA channel 1 at c4808040, irq 34
DMA channel 2 at c4808080, irq 35
DMA channel 3 at c48080c0, irq 36
S3C244X: Clock Support, DVS off
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
s3c-i2c s3c2440-i2c: slave address 0x10
s3c-i2c s3c2440-i2c: bus frequency set to 98 KHz
s3c-i2c s3c2440-i2c: i2c-0: S3C I2C adapter
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
NetWinder Floating Point Emulator V0.97 (double precision)
yaffs Jun 13 2011 15:29:25 Installing. 
JFFS2 version 2.2. (NAND) &#65533;&#65533;&#65533;&#65533;&#65533;&#65533;
2001-2006 Red Hat, Inc.
JFS: nTxBlock = 462, nTxLock = 3703
msgmni has been set to 115
alg: No test for stdrng (krng)
io scheduler noop registered (default)
Console: switching to colour frame buffer device 30x20
fb0: s3c2410fb frame buffer device
backlight       initialized
leds    initialized
buttons initialized
pwm     initialized
adc     initialized
s3c2440-uart.0: s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2440
s3c2440-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2440
s3c2440-uart.2: s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2440
loop: module loaded
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c24xx-nand s3c2440-nand: Tacls=3, 29ns Twrph0=7 69ns, Twrph1=3 29ns
s3c24xx-nand s3c2440-nand: NAND soft ECC
NAND device: Manufacturer ID: 0xec, Chip ID: 0xd3 (Samsung NAND 1GiB 3,3V
8-bit)
Scanning device for bad blocks
Bad eraseblock 200 at 0x000001900000
Creating 5 MTD partitions on "NAND 1GiB 3,3V 8-bit":
0x000000000000-0x000000040000 : "supervivi"
0x000000040000-0x000000060000 : "param"
0x000000060000-0x000000560000 : "Kernel"
0x000000560000-0x000040560000 : "root"
mtd: partition "root" extends beyond the end of device "NAND 1GiB 3,3V
8-bit" -- size truncated to 0x3faa0000
0x000000000000-0x000040000000 : "nand"
dm9000 Ethernet Driver, V1.31
eth0: dm9000e at c48ac300,c48b0304 IRQ 51 MAC: 08:90:90:90:90:90 (chip)
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
usb usb1: New USB device found, idVendor=1d6b, idProduct=0001
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: S3C24XX OHCI
usb usb1: Manufacturer: Linux 2.6.32.2-FriendlyARM ohci_hcd
usb usb1: SerialNumber: s3c24xx
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver ums-alauda
usbcore: registered new interface driver ums-cypress
usbcore: registered new interface driver ums-datafab
usbcore: registered new interface driver ums-freecom
usbcore: registered new interface driver ums-isd200
usbcore: registered new interface driver ums-jumpshot
usbcore: registered new interface driver ums-karma
usbcore: registered new interface driver ums-onetouch
usbcore: registered new interface driver ums-sddr09
usbcore: registered new interface driver ums-sddr55
usbcore: registered new interface driver ums-usbat
usbcore: registered new interface driver usbserial
USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial Driver core
USB Serial support regist...stripped-down

pascal
I would like to add some command-line settings:

MICRO2440 # setenv bootargs_init init=/sbin/init 
MICRO2440 # setenv root_nand root=/dev/mtdblock3 
MICRO2440 # setenv boot_tftp bootp 0x32000000 /tftpboot/uImage 
MICRO2440 # setenv root_nfs root=/dev/nfs rw
nfsroot=192.168.1.95:/home/khang/Workspace/devel/exports/rootfs 
MICRO2440 # setenv bootdelay 1 
MICRO2440 # setenv bootfile /tftpboot/uImage 
MICRO2440 # setenv boot_tftp_nfs 'run boot_tftp ; run set_bootargs_nfs ;
bootm' 
MICRO2440 # setenv boot_nand_nfs 'nboot.e kernel ; run set_bootargs_nfs ;
bootm' 
MICRO2440 # setenv boot_nand_only 'nboot.e kernel;bootm' 
MICRO2440 # setenv ifconfig_dhcp ip=static 
MICRO2440 # setenv bootcmd run boot_tftp_nfs_without_dhcp 
MICRO2440 # setenv netmask 255.255.255.0 
MICRO2440 # setenv ipaddr 192.168.1.65 
MICRO2440 # setenv serverip 192.168.1.95 
MICRO2440 # setenv bootargs console=ttySAC0,115200 noinitrd init=/sbin/init
user_debug=31 mini2440=0tb root=/dev/nfs rw
nfsroot=192.168.1.95:/home/khang/Workspace/devel/exports/rootfs
ip=192.168.1.65 
MICRO2440 # setenv boot_tftp_nfs_without_dhcp 'tftp 0x32000000 uImage;run
set_bootargs_nfs;bootm' 
MICRO2440 # setenv set_bootargs_nfs setenv bootargs console=ttySAC0,115200
root=/dev/nfs rw
nfsroot=192.168.1.95:/home/khang/Workspace/devel/exports/rootfs
ip=192.168.1.65 rootdelay=1 noinitrd init=/sbin/init user_debug=31
MICRO2440 # saveenv

Thanks so much!

pascal
Hello,

Just to say that I have solved this problem. a -march=armv4t option is need
for the compiler. Now I can mount the file system but I have another
problem with the command-prompt: 

[\u@\h \W]\# 

Could anybody tell me where to set these variables : username@host:PWD?

Thanks so much!

Pascal