Posts

Showing posts with the label uboot

mtd partitions in u-boot

With the recent merge of mtdparts patch for beagleboard u-boot Texas Instruments X-Loader 1.4.2 (Jan 30 2009 - 19:16:17) Loading u-boot.bin from nand U-Boot 2009.03-00325-gf75a729 (Apr 09 2009 - 13:36:05) OMAP3530-GP rev 2, CPU-OPP2 L3-165MHz OMAP3 Beagle board + LPDDR/NAND DRAM: 256 MB NAND: 256 MiB In: serial Out: serial Err: serial Board revision C Die ID #0a8600030000000004013f780600a00e OMAP3 beagleboard.org # you can now do cool things without having to remember the offsets of which partition was where.... (lets say you want to copy the kernel to nand flash) Step1: setup the partitions OMAP3 beagleboard.org # mtdparts default Step 2: erase the nand flash for kernel partition OMAP3 beagleboard.org # nand erase kernel NAND erase: device 0 offset 0x280000, size 0x400000 Erasing at 0x660000 -- 100% complete. OK Step 3: copy the kernel from RAM to the kernel partition in nand flash: OMAP3 beagleboard.org # nand write 0x80000000 kernel NAND write: device 0 offset 0x280000, si...

OMAP support in U-boot-v1

Finally! After months of effort by many, mostly Dirk driving hard, we have omap3 support in: a) beagleboard b) overo c) evm d) pandora e) zoom1. This should ideally make omapzoom git based u-boo t redundant. Lets see if this happens in the upcoming days.. v2009.02 will have official support :).. Hip Hip Hooraah!!

Towards creating a beagleboard NAND recovery script

NOTE: This is a work in progress yet.. Get Code base: x-loader: git clone git://www.sakoman.net/git/x-load-omap3.git u-boot-v1 - omap3: git clone git://www.sakoman.net/git/u-boot-omap3.git cd u-boot-omap3 git checkout --track -b omap3-dev origin/omap3-dev Updated: see here if this did not work.. u-boot-v2: git clone git://git.denx.de/u-boot-v2.git omap-uboot-utils: git clone git://github.com/nmenon/omap-u-boot-utils.git signGP tool: wget http://beagleboard.googlecode.com/files/signGP.c Compilers: Cross compiler: arm-none-eabi-gcc: 2007q3-53 (4.2.1) Host compiler: x64bit: (Ubuntu 4.3.2-1ubuntu11) Build commands: Before starting the build process, lets set up a simple alias command: alias mymake='make ARCH=arm CROSS_COMPILE=arm-none-eabi- V=1' U-boot-arm: mymake omap3_beagle_config mymake U-Boot-v2: mymake omap3530_beagle_per_uart_defconfig mymake X-Loader: mymake omap3530beagle_config mymake [Update: 2008-12-13 - I completely forgot that we need to sign an image for it to boot ...

omap-uboot-utils supports usb2serial device

It has been a long time desire to use usb2serial convertors for pserial application. :(.. Anyways, yesterday night, I looped back my usb2serial back to my PCI serial port and tried to write a bit of loopback code.. to figure out the issue with pserial, I wrote a simple little app to print the ttySx flags: #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <termios.h> #include <stdio.h> #include <string.h> #include <unistd.h> #include <errno.h> /************* VARS ***************/ static int fd; static struct termios oldtio; int main(int argc,char * argv[]) { int ret; int i; if (argc!=2){ printf ( "error no args..%d\n" ,argc); return 1; } printf ( "port: %s\n" ,argv[1]); fd = open(argv[1], O_RDWR | O_NOCTTY); if (!fd) { printf( "terminal is not open!\n" ); return 1; } /* sa...

Long gone yet dreaming

It has been a hectic few weeks recently.. couple of more weeks to go before i get enough time to get to opensource again.. but it has been interesting few days, some real cool new devices to play with, pretty short challenging timelines, and yet, things seem to go fine.. Some interesting news: Sacha did finally put out a branch on u-boot v2 for i2c I still need to look at that. this is required for getting u-boot v2's USB mode working talking to TWL4030/5030 transciever is over i2c. Dirk has been reminding me to put out patches I had been stocking the last few days: nand, etc.. I was hoping I could do it today, but i am worn out :( (sorry Dirk.. I break my promise yet again.. ).. And guess what? I finally did get my Head mounted display last week.. kinda low res at 640x480.. and composite video.. should be fine though for beagle. Khasim did say that he got USB camera streaming working on Angstrom, + Koen reports having Sphinx voice recognition and festival text to speech working...

Reversing the U-Boot's kermit protocol

See http://code.google.com/p/omap-u-boot-utils/ for Code and binary details. Background: Few days back, I had written a app which came from a need to be able to script download operations to U-Boot V2 . Now, that I have a bit of time on hand.. here is the detail for supporting an app for kermit for U-Boot. Of course, you are free to read ckermit code, or pay up some well deserved money for kermit95 .. but there is something called as gkermit (also from columbia univ) which is GPLed. There is also something called as ekermit which is kinda neat.. You can find Loadb here . For me personally, drawing the sequence of code as implemented by loadb was enough and did not require looking at the massive code base of gkermit. Details: Kermit protocol in it's simplest form is described as a transmission followed by a end of transmission character. Each transmission consists of multiple packets. Each packet can be a session initiation, data packet or many other packet types. The app I wro...

Horrah!!! First OMAP Uboot V2 support merged to mainline

Thanks to Sascha.. http://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot/u-boot-v2.git;a=summary has U-Boot V2 support for SDP3430 merged. This weekend, will provide support for Beagle, zoom MDK and send out patches.. I am meanwhile plodding thru i2c arch from kernel to pull into u-boot v2. + point.. Existing i2c drivers should work with small effort on U-boot v2. There is a bunch of other stuff to do: after i2c, USB, NAND, MMC, NOR, etc...

loadb worked!

UbootV2 update: Got broken loadb working today. Infact, loadb+go also works(I somehow dont trust it though..)! things remaining: a) write a reverse of loadb.c which will work on windows and linux.. probably playaround with Dirk's code a bit.. This should give a possible flashing alternative (phase 1). b) port/customize lm sensor i2c (David Brownell's new arch) to U-Boot V2. (I need this for twl4030 / twl5030 access). c) Hard part: port usbtty to u-boot v2! this is a messy affair.. :( Steve K promized me with some 2430 ref code.. for some unmentionable reasons, I cant look at musb documentation, so gotta trust the code..and make some sane judgements.. keeping my fingers crossed. d) another hard part: NAND/NOR/OneNAND for SDP, NAND for zoom MDK and Beagle: Sigh... if only NAND was easy to port.. the code rt now in U-Boot V2 is MESSY !!! wishing MTD could be brought over straight.. (Windows COM1 using modified perlscript) C:\PerlScripts>perl omap_flash.pl -p 1 -s z:\tmp\uboot....

Uboot V2 Prompt Ahoy!!

Image
First look: prompt of Uboot V2 on SDP3430!!! ok different thing it crashed right after that.. still need to figure out.. but the exciting thing.. it is running from SRAM and using malloc and stack space in SDRAM! Kinda neat! I still have to do tons of things before I can send the patches out.. been hacking a lot in code.. need to clean things up first. probably I should be able to send the patch in a week. this will enable us to replace X-loader completely! do make config1 -> u get x-loader, make config2 ->get uboot! simple life.. this will also enable me to do peripheral download.. weeeeeee....

U-Boot v2 Finally in progress

Phew, things are not settled yet, but U-Boot V2 work has started, the single man army is crunching code ;)... anyways.. for folks interested in my U-Boot patches and discussions on the list, here is quick link for TI ID and this one for gmail id I have been having on the list ;) I have been struggling the past few days trying to reduce the size of U-Boot (other than OMAP code) to less than 20K. this'd include a simple parser, the very minimal config. Drat! the amount of libraries being packed in was around 53K in size.. I do know that TI's compiler TMS470 is intelligent in not linking stuff which are unused.. after a fair amount of digging, did finally hit the gcc flags. now the bad part.. it kicked out my init functions! drat.. finally tracked it down to the lds KEEP() wrapper. so while i work on OMAP patches at office, I started peeking at Sandbox at home.. and well.. make C=2 does in fact throw tons of warnings-> will look at it if no one is interested in fixing them....

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...

caramba! back to uboot-v2

Just started off with uboot-v2 port on my "unamed" board. My objectives: a) get uboot build to work from SRAM with basic uart support, probably usb later on if i can port the gadget driver from linux kernel. b) configure clocks and get SDRAM up and running. c) attempt kernel bootup - now, this i expect to be a pain... d) support nand e) support nor, and get support for SDP (low in personal priority currently - but should be a no-brainer hopefully). Schedule is going to go thru one file a day(or atleast a week depending on my "office work" load).. Today is going to be start.s lets see if we can get a concensus or flame war on the list.. this is critical as most boards share the same code.. as long as it is V4 ISA, things should be fine.. I would not dream of thumb in this peice of code.. by the way, Sascha Hauer is the custodian for uboot-v2 as I was told on the uboot irc.

uboot 2 for omap in development..

So, I am on a slow roll on uboot2 changes for OMAP.. uboot 2 is lot less mature as it can be seen digging into the code, but it is most promising. The main reason I want to jump on uboot2 is that omap support is very nascent here, and lots can be done.. Some areas of concern: * i2c seems pretty unclear * I like the dev concept, but should modules of OMAP be also dev based? I dont think so.. generic modules - yes..i2c etc.. * on dev -> it looks very immature considering that include/driver.h has: 45 struct driver_d { 55 ssize_t (*erase) (struct device_d*, size_t count, unsigned long offset); 56 int (*protect)(struct device_d*, size_t count, unsigned long offset, int prot); 59 void (*info) (struct device_d *); Errrr... erase,protect,info ?? that is flash type device struct rt? it does not fit into a generic driver structure.. * I dont like the fact that there is still a config.h (include/configs/xyz.h SYMLINKed to include/config.h) which makes NO sense to me.. on...

uboot follies!

Ok today I had a look of Makefile.. Denx supports a unified make file unlike the strategy in kernel. There are some interesting snippets of code in the same. In short, we could have something for configs as follows: _ _ _config Where, SiliconName = omap2420, omap3430,et.al. boardName = sdp,osk,apollon etc Special = Boot Mode -> e.g. nand/onenand or defined boot mode for that platform. Now, should i have es versions??? 3430 es1 and es2 are different enough to have two code definitions? One thing I don’t agree to : u-boot.arm/doc/README.ARM-SoC cpu/$(CPU)/$(SOC)/ does not facilitate re-use -> coz I might want to reuse across arm versions.. and this does not let me do it.. I am getting diverted again -> this time it is U-boot v2!!!! cg-clone http://www.denx.de/git/u-boot-v2.git/ u-boot.v2 let me see what sacha has got...

Day 1: getting a feel and a few thoughts

Where are the files? u-boot.arm is what i am basing myself on. Directory : u-boot.arm/lib_arm/ Description: ARM specific library function implementation Files: armlinux.c _ashrdi3.S cache.c _divsi3.S _modsi3.S _umodsi3.S _ashldi3.S board.c div0.c Makefile _udivsi3.S Contains: some important (if I may use such a word - all look important): bootm implementation, banner display cache functions start_armboot Directory :/u-boot.arm/cpu/arm1136 Description: ARM1136 CPU specific logic. This is kind of common for most part. I can see that ARM integrator and 2420 are the two folks using this so far at least.. Files: config.mk cpu.c interrupts.c Makefile start.S Contains: start.s is the basic starting point of the boot process.. __start is where the code starts the boot.. So... after almost an year and a half of CCS assembly, I need to brush up the GNU ARM Assembly.. i got it somewhere.. hmm.. Ref: GNU ARM Assembly Quick Reference Guide: http://www.microcross.com/GNU-ARM-Assy-Quick-Ref.pdf An I...

OMAP Uboot port work started

I am starting off with a fresh OMAP port of uboot . Nothing is proper unless i answer some of my questions.. Why Do this? * The main reason of doing this is coz I am sick and tired of crappy code and repatch folks have been doing.. and am hoping that I can do a clean reuse for OMAP platform * U-boot is largely ignored for maybe the lack of fame and fortune stuff, but I kinda like it at the moment, coz it reminds me the first line of code i wrote for 2430 port.. it was in uboot .. on virtual platform. kind of presilicon . pressures were high, could never do a clean job then.. here is a chance to get things right.. * I am kind of tired doing my "project" work * My wife is getting busy for her exams and other than an hour's walk, I wont get troubled much for a week at least (I hope ;) ). What is my plan? I am hoping to integrate a lot of modules and avoid repetitions where possible.. e.g.: why have multiple board file for each of omap 2420 platforms? GPMC as an example...

Duh Ubooot!!!

With Denx opening the gates on Dat's Das Uboot, it is kind of interesting to see how things will flow on the "much belated" uboot push into the uboot official tree. For those interested: Uboot home page: http://www.denx.de/wiki/UBoot Custodians: http://www.denx.de/wiki/UBoot/Custodians ARM custodian is:Peter Pearse ARM Tree weblink: http://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot/u-boot-arm.git;a=summary How to pull a uboot git: http://www.denx.de/wiki/UBoot/CustodianGitTrees Patch status: http://www.denx.de/wiki/UBoot/PatchStatus Compiler to use was already covered in my document: http://www.geocities.com/crecmca98/Linux/omap2430_From_almost_scratch.pdf Codegen is the best.. Things I am planning on doing: start with 2430, move to 3430 patches. I am thinking strongly of forcing muxing of individual drivers(not in uboot) to be done exclusively by kernel..