Wednesday, April 09, 2008

Uboot-v2 - Kinda neat!!

Was finally getting time to lookinto uboot-v2 again today (atleast for 1 hr before my mailbox announced another firefighting.. :( ).. anyways.. in that time here goes....

Weee.. using uboot sandbox was a breeze.. but u need gcc 4.1.3 (4.1.1 did not compile neat for sandbox in my office vmware.. anyways, did not dig in to the reasons)..
menon@coyote:~/Src/opensource/clone/u-boot.v2$ gcc --version
gcc (GCC) 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
nmenon@coyote:~/Src/opensource/clone/u-boot.v2$ make sandbox_defconfig;
.

This is kind of neat - for folks working with kernel.. this is right up your alley...
* Network drivers
*
smc911x ethernet driver (DRIVER_NET_SMC911X) [N/y/?] n
tap Ethernet driver (DRIVER_NET_TAP) [N/y] n
*
* SPI drivers
*
MC13783 a.k.a. PMIC driver (DRIVER_SPI_MC13783) [N/y] (NEW) n
*
* flash drivers
*

#
# configuration written to .config
#
If you are interested.. you can do a make menuconfig and enable, disable items.. now.. dont i love that and no more messing around with include/configs/xys.h and no more tons of #define blahblah..

a simple make reveals the similar framework it has with linux kernel..
CC arch/sandbox/lib/tap.o
LD arch/sandbox/lib/built-in.o
LDS arch/sandbox/lib/u-boot.lds
CC board/sandbox/board.o
CC board/sandbox/clock.o
CC board/sandbox/hostfile.o
CC board/sandbox/console.o
LD board/sandbox/built-in.o
LD uboot
SYSMAP System.map
nmenon@coyote:~/Src/opensource/clone/u-boot.v2$

then.. the fun part running uboot on my laptop.. and folks who love uboot are gonna love this, and linux users are potentially gonna get confused..;)
nmenon@coyote:~/Src/opensource/clone/u-boot.v2$ ./uboot


U-Boot 2.0.0-rc5-git (Apr 9 2008 - 17:42:31)

Board: sandbox
Malloc Space: 0x2ab609d11010 -> 0x2ab60a511010 (size 8 MB)
Open /dev/env0 No such file or directory
running /env/bin/init...
not found
uboot:/ ls -al
ls: invalid option -- a
drwxrwxrwx 0 .
drwxrwxrwx 0 ..
drwxrwxrwx 0 dev
uboot:/ ls /dev
console0 mem
uboot:/ ls -al /dev
ls: invalid option -- a
c--------- 0 console0
crw------- 4294967295 mem
uboot:/
Now, Does that look familiar.. dont blame me for doing a "ps -ef" and doing a "ls /proc /sys" :D only Ctrl+C, CTRL+\ etc seem not to kill it.. (did a kill -9 pid worked).
Heh heh.. there are things now I can interestingly do with it.. need to figure more out.. but guess what? it is lot cleaner..

1 comment:

Ragha said...

I tried reset for exit!