Leandro Dorileo

Dorileo`s web place

Another monday and I need to write a gsoc-update. It`s two weeks after my last update, I coulnd`t write an update last week since I hadn`t a good progress.

I suppose every body could notice the problems based on the emails I sent to the project`s mentors. I faced problems to run coreboot on my real hardware.

One week later - now - I run coreboot successfully on a real hardware. To express the happenings a bit better I need to tell a kind of story.

  • Flashed coreboot but didn`t get any vga output(did everything correctly but no vga output - now I understand I was doing all right, but wasn`t sure that time);
  • Couldn`t understand why no vga output, went to IRC and asked some questions, some one told me I needed a video rom prepended to my coreboot final image;
  • Asked Jason if he used to prepend a video rom and he confirmed, in that time I thought I should do the same;
  • Reading the coreboot wiki I learnt how to extract a video rom, not hard, but started to try to prepend it to coreboot;
  • I couldn`t understand the semantics behind ROM_SIZE, ROM_IMAGE_SIZE and few other configurations, started to test many combinations. needed to learn and understand how the many ways to build a coreboot image work;
  • Went to source code of buildrom to understand what and how it does, learned it just merges coreboot and the payload;
  • Learnt there`s no reason to have a coreboot image without a payload, so don`t even try to have a coreboot image without a payload, it doesn`t make any sense;
  • Learnt I can use cbfs to build the coreboot image, but not every targets uses it, discovered a bug on cbfstool but didn`t get the chance and time to dig on it;
  • After many tries I understood I couldn`t make any progress without a serial cable and a serial console set up, went to buy a cable and after some time I could see coreboot was being loaded but no vga output;
  • Noticed whatever payload I used it wasn`t being loaded
  • Felt weird the output on my serial console and asked Carl-Daniel to take a look, after some time trying to discover the problem Uwe Hermann appeared on IRC, he asked me if I installed my single memory module on DIMM_B1 slot;
  • I felt it so obvious, and didn`t think this could be my problem once the Award Bios was running properly;
  • Moved the memory module from DIMM_B2 to DIMM_B1 and immediately the payload was loaded and I could see vga output;
  • Uwe Hermann told me I didn`t need to prepend a vga rom to coreboot since my motherboard doesn`t have an onboard vga(in that time I wasn`t even prepending the vga rom I extracted any more, I was watching the serial outputs);
  • With Uwe Hermann help I understood I really didn`t need a vga rom
  • My real problem was a memory module installed in the wrong slot;

I need to be sure of things, so I kept asking people if I was doing the correct thing, if the way I was building coreboot was right, now I can be sure, I was even doing the right thing.

It`s not good to spend so much time on it but I learnt a lot in the process. Thank you everybody who helped me, I appreciate so much your help.

Introduction

The GSoC 2009 has officially started on May 23rd and I haven`t made any update since May 18th when I stated my hardware lacking. I finally got a functional development environment by around June 2nd(last week) when my backup LPC chip arrived to Cuiabá(my living town).

It`s a little difficult to buy some hardwares(specially some old age ones) here in my city. The only hardware I could purchase here was the processor and DDR400 memory. I had to wait about 7-10 days for the other hardwares. I also had funds problems(I didn`t have the whole money to buy everything at once). Now the PCI USB expansion card is the only lacking hardware, but I don`t think it`s blocking the project but I can buy it in the coming days.

Tasks and Code

Few things to point:

  • Option Rom Assembly Link Code:
    I`m using the source code from Darmawan, Jason has also used that. Stefan has mentioned some licensing issues, he said he would ask Darmawan to register his source code to some coreboot compatible license since we may want vendors to include the option ROM in their motherboards. Stefan also said about using his option ROM source code instead. With that I started to work with Stefan`s source code to make it work(I couldn`t run it). Jason may take it over since he`s responsible to the option ROM initialization code and assembly bits.
  • libpayload linking:
    The makefile I`ve copied/modified from FILO source base is theoretically linking the option ROM to libpayload but I couln`t call any function from libpayload yet. I`ve not spent too much time on it, I can fix it in the next days. Jason has faced this problem as well. I used FILO to complete the tests I wanted to do with libpayload API since it`s been successfully linked to libpayload.
  • bootable USB preparation:
    I worked few ours last week to prepare a bootable USB stick.

Comunication and Repos

I`ll keep posting the updates on my blog, I have a dedicated category to that, you can follow that for updates, I`ll not stop mailing all the mentors but a simple mail stating an update will be sent every week.

I would like to remember you that we(Jason and I) have used repositories on my server for hosting the source code we produce.

Update: Jason has just told me he`s rewriting the ldscript we`ve got from Darmawan. So we`ll not need to care about the licensing issues any more.

My motherboard has arrived about two weeks ago, and the purchase of few other hadwares like processor, memory, cooler has been delayed some weeks.

I run out of credits, haven’t received my monthly payment and google hasn`t submitted the first payments, so, I don`t have enough money to buy the other hardwares, I`ll have to wait until May 21st when I receive my monthly payment.

More news coming soon….

I`ve just rearranged our git repositories, I named my preliminary and test option ROM - previously named usbrom.git - to usbrom-dlx.git.

Jason is about to set up an definitive code base option ROM and named it usbrom.git. So, don`t get confused, usbrom.git is intended to be the final usb option ROM to coreboot.

More soon…

I changed my usbrom test code to print some hello world. I wasn`t patching the checksums of the PCI PnP Expansion ROM binary, that`s the why you couldn`t see the option - or it wasn`t loaded by your bios. The source code can - as usually - be browsed or cloned from here.

The option ROM I`m working on - to test the libpayload USB stack - has been updated, now it builds properly and can be used for any test purpose.

I used some source code I took from FILO to the basic infra structure, it uses kbuild and has a copy of libpayload inside the source dir. I know the focus is not an test option ROM development, but I have few things I want to change, so we can reuse the ideas for the final usb option ROM. Here follows a small TODO:

  • Remove util/kbuild and place it in a separated repository;
  • Remove libpayload;
  • Write a small shell script to checkout kbuild and libpayload before building the option ROM;

While waiting my motherboard I decided to write an option rom to test the libpayload`s usb stack implementation. I don`t know how Patrick has tested it until now but I`ve though about testing it with an option rom. It`s not working yet but you can clone it from here. It`s basically an join of sources from FILO and other things I`ve touched last weeks.

Other repositories

Now that I`ve set up an - final - environment for my personal git hosting I took some time to push some source code I`ve here in my computer. You can browse the repositories using the gitweb I`ve installed, or directly clone the invadersrom git repository - for example - by:

$ git clone http://vps.dorilex.net/pub/scm/invadersrom.git

Well, now I`m still waiting for my mother board to arrive from São Paulo. It was much cheaper to buy it from Mercado Livre than in local stores. Meanwhile I`m reading the most specs I can. I`ll have this little time since Jason has to learn how to work with git. Now time to head back to the papers.