Re: [Balloon] Typical kernel hacking workflow on the Balloon…

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Nick Bane
Date:  
To: balloon
Subject: Re: [Balloon] Typical kernel hacking workflow on the Balloon board

> I am curious to learn what the typical workflow is for folks who hack
> the kernel on the Balloon board. What I have been doing seems prone
> to error and lossage and I'm sure there must be something easier.
>

That is probably mostly me - I am on 2.6.39.1 now and testing 3.0-rc1.
Feel free to ask.
> Anyway, I've checked out svn trunk and run through the build process
> to generate a kernel.
>
> Now I want to change something, say perhaps, the NOR flash
> partitioning that's defined in balloon.c. Thus far, I've simply been
> hacking away at
> build/kernel//linux-2.6.37.6/arch/arm/mach-pxa/balloon3.c.

Be aware that changing what /dev/mtdblock<n> refers to can cause confusion
- the initramfs system assumes mtdblock0 for nand boot partition. If you
can find a way to have the NOR partitions appended to the NAND partitions
then that would be very helpful.
> I already know I'm in trouble because I forgot to do a "quilt new" and
> to "quilt add" balloon.c before I started modifying it.
>
> What do folks do when they realize they've modified a file that is not
> under quilt control? Or is this just a newbie mistake that none of
> you make anymore?
>

Its a really common quilt "gotcha". I move the modified file/replace
it/quilt new/quilt add/move back/quilt refresh and try not to do it yet
again. Note that when a file like balloon.c exists in multiple series
files, applying patches needs to be done with due regard for the sequence
of patches or it gets very tangled eg if you make balloon3nor.patch which
you use on top of 3 other patches that use balloon.c , another series (say
on which misses out the vga patch) may find it doesn't apply cleanly. For
NOR it might be best to modify the base patch for balloon3.c and have the
facility selectable via kernel config setting.
> Of course, since it's in the build directory, even once I get the file
> properly under quilt control, I still need to remember to copy the
> patch& series files out of the build directory and into the
> packages/kernel directory tree, right?

Quilt refresh should leave the updated patches in the package dir and not
in the build dir.

> Or is there some easier way to do this?
>
> I feel like I know what all needs to be done, but what needs to be
> done seems ridiculously, tediously, error proneously difficult. Am I
> just a whiner, or do you all have tips and tricks that make this
> easier? Or am I just going about this the wrong way to begin with?
>

It looks a bit obscure at first but really just boils down to quilt and
series files. Chris Jones recently went up this learning curve and,
although it looked mysterious, I think he has come to be content with it.
He was also documenting his progress so that folks like yourself would have
an easier time.

I maintain my own sandpit (branches/menuconfig2) that I find fairly stable
for what I want to do (development work) while Hector merges useful patches
to trunk. Feel encouraged to make constructive criticism as it is too easy
us to forget how hard it all seems.

Nick
> --wpd
>
> _______________________________________________
> Balloon mailing list
>
> http://balloonboard.org/mailman/listinfo/balloon