Hi Aarya,

 

sounds great. Very good that you got the programmer. And very good that you already dived into the code.

 

AFAICS you now have a good understanding of the problem to be solved. J The details of how to implement a better solution is part of the project.

 

I think there is not much to do before the project starts (you understand the problem + you have got hardware to test = you are quite ready to start). However if you are curious and want to do some more steps you are very welcome to do the following steps:

 

* Have a look at https://review.coreboot.org/c/flashrom/+/58467 , the comments will give you a deeper understanding of the problem and possible starting points (and by the way will show you that there are people willing to help kindly J ). I think we are running into something like using a look-ahead algorithm to determine which erase-function to use.

 

* Get familiar with writing only certain regions of a flash (i.e. using a layout file) for better understanding of all the use cases

 

Just let us know if you got any further questions or ideas.

 

Regards,

 

Simon

 

 

 

 

Von: Aarya Chaumal <aarya.chaumal@gmail.com>
Gesendet: Montag, 21. März 2022 22:16
An: Buhrow, Simon <simon.buhrow@sieb-meyer.de>
Cc: Anastasia Klimchuk <aklm@chromium.org>; flashrom@flashrom.org
Betreff: Re: [flashrom] Re: Questions regarding Easy project and GSoC

 

Hi Simon,

 

I got my hardware yesterday and I played around with it and flashrom. I also studied the code flow for the erase functions. I saw that flashrom tries different erase functions given in the flashctx->chip->block_erasers[] by iterating through the list. Assuming these functions are in order of the length (number of sectors)  they erase, the first one would get selected most of the time as it erases the smallest length. But this would be inefficient as the function which erases more length would do the job faster although it might not give the required granularity. A better approach could be to use the latter (if necessary) until the remaining length is less than the length that this function can erase.

 

Aarya

 

On Wed, Mar 16, 2022 at 4:45 PM Buhrow, Simon <simon.buhrow@sieb-meyer.de> wrote:

Hi Aarya,

 

nice progress!

 

I´m writing having "optimizing erase-function" in mint. However the following might apply fully or in parts to the other topic(s) as well:

 

As written to Hui Xiang:

As it´s never a good idea to experiment with the workhorse itself, I would recommend to do tests on extra hardware. (There might be some things you can test with software dummies, someone else must tell you about that). A very cheap programmer often mentioned here is the CH341A Programmer, however there are many other affordable programmers with ftdi chips, the raspberry pi and other manufactures as well (https://www.flashrom.org/Supported_programmers).

In addition you would need any supported Flash in a DIP package or a in SO-Package plus DIP-adapter.

There are several examples along the internet using flashrom and a programmer plus flash or target board with a soldered flash. Just pick any and start with that.

 

 

>> Can you suggest some tasks so that I can know more about these projects

> A question from me: have you tried to build and run flashrom from your local repo source code?

 

Building flashrom is a good start. Furthermore possible steps to play a bit around would be this:

* Read a good article (e.g. wikipedia) about flash memory technology and understand why there are “block erase” functions (instead of byte wise erase).

* When you have done so and have any supported programmer plus flash at your hands (see above), take the datasheet of the flash and explore the parts about the different erase functions.

* Then try running erase (parts of or the entire) flash memory. Check (via debugging/print messages/verbose output) which block erase function is used.

* Compare the result with the best theoretical option derived from datasheet values. (“best” = fastest)

 

Hope this helps and you´ve got some dollars for the hardware. If anyone else has some thoughts about making progress without proposing a purchase, just let Aarya know.

 

Regards,

 

Simon

 

 

Von: Anastasia Klimchuk <aklm@chromium.org>
Gesendet: Sonntag, 13. März 2022 07:45
An: flashrom@flashrom.org; Aarya Chaumal <aarya.chaumal@gmail.com>
Betreff: [flashrom] Re: Questions regarding Easy project and GSoC

 

Aarya,

 

Thank you so much for your patches, awesome work!

 

Don't worry about merging for now. Merging almost never happens immediately. Reviewers will come back to the patches, check that everything is fine, all the comments are resolved etc. If everything is alright, reviewers will approve and then at some point merge.

It can also happen that you get another iteration of comments: but don't worry this is a normal process!

From your side, you always (for now, and for future) need to understand all the comments, resolve and reply - once this is done, it is the Reviewer's turn :)

 

It is very good that you identified two projects that are interesting for you. You will discuss a project in more detail with someone who plans to be Mentor for the project. Let me check who that will be. 

Also, if someone who plans to be a Mentor for "optimizing erase-function" or "fixing endianness issues" is reading this, you can just reply :) What would be the best next steps for Aarya to prepare?

 

A question from me: have you tried to build and run flashrom from your local repo source code? To begin with you can run

 

flashrom -h

 

which is help information. It tells you all command line operations and arguments. It is served by cli_classic.c file.

So you can read about "erase" operation and then explore the code which implements it.

 

Meanwhile, just to check, have you read official resources from gsoc? These ones:

 

Anastasia.

 

On Sun, Mar 13, 2022 at 1:44 PM Aarya Chaumal <aarya.chaumal@gmail.com> wrote:

As suggested, I have been doing some of the easy projects till now and
I have enjoyed it. I have submitted a few patches till now and some of
them have gotten +2 code-reviews but still, they were not merged. Is
there anything that is required to get the changes to be merged?
Also, I have fixed most of the issues I got by running scan-build,
only 2 classes of issues were remaining which I feel are false
positives (showing underflow error but those cases won't occur or are
handled seprately) created by the tool and can be ignored.
As was going through your proposed projects for GSoC, I found
"optimizing erase-function" and "fixing endianness issues"
interesting and would like to do that in the summer. Can you suggest
some tasks so that I can know more about these projects and get an
idea of how to write my proposal for GSoC for doing this project?
Thanks :)

On Thu, Mar 10, 2022 at 10:45 AM Anastasia Klimchuk <aklm@chromium.org> wrote:
>
> Hello Aarya,
>
> Nice to meet you! I think I saw your question on the IRC channel, and someone replied, was that your question?
> Do you still need more info? Let us know if yes.
>
> Thanks!
>
> On Wed, Mar 9, 2022 at 2:42 PM Aarya Chaumal <aarya.chaumal@gmail.com> wrote:
>>
>> Hello there,
>>
>> I hope you are well today when you receive this email. I am Aarya Chaumal, a Computer Engineering student at the College of Engineering Pune, India. While going through organizations for this year's Google's Summer of Code I came across your organization, Flashrom.
>>
>> I am a  part of onboard computers subsystem at my college's satellite initiative. Through this, I have closely worked on Atmel SAM E70 XPLAINED board. Also, I have strong knowledge about C/C++ and assembly language. From your list of GSoC project ideas, I liked the idea of “Remove global state from flashrom” and "Optimize Erase-Function Selection", although I am not quite sure which one is more suitable for me. Can you guide me through this?
>>
>> As mentioned in your Contributor commitments and requirements, I started to do one of the easy projects - Add new flash chip definitions. For this, I read the relevant datasheets, one from the unlisted chips and another of a listed one (for reference) but still, I am not getting the information about some fields for the structure in the datasheet, namely the feature_bits, probe_timing. Also, do I have to write the probe, read, write and erase functions for the chip separately? Also, how do I test if my code is working as I don't have relevant hardware with me? Can you help me with this? Also what resources should I use to learn more about it?
>>
>> Thank you for looking into this for me.
>> Sincerely,
>> Aarya Chaumal
>> _______________________________________________
>> flashrom mailing list -- flashrom@flashrom.org
>> To unsubscribe send an email to flashrom-leave@flashrom.org
>
>
>
> --
> Anastasia.


 

--

Anastasia.