I had time this weekend to review the current stable kernel which is
2.6.37-1 at the time of writing and created patches against buserrors
linux-2.6.32-rc8 version.
It was more or less easy. Lots of work was done by the kernel
maintainers to
include most of the ugly stuff into mainstream (ts), so "just" adding
touchscreen-activation by kernel-parameters (mini2440=...) and display
configurations had to be made.
A direct patch from buserrors kernel (2.6.32-x) against 2.6.37-1 was
not
successfull because a lot of work has undergone the ach/arm directories
after
Linus was mentioning the uglyness and sheer limitless arm-archs/plats
default-configs and what a mess this is.
Therefore arch/arm/plat-samsung and /arch/arm/mini-24xx was introduced
and many
23c* code had been moved from mini-24** into its correspndig locations,
made it
overall easier to create patches after this point.
I created patches from buserrors kernel against a vanilla 2.6.32-rc8,
manually
check the patches, google a bit, read some kernel-mailinglist entrys
and
finally patch the 2.6.37-1 with it. After several trial and error
make's i got
the thing up and running.
I want to thank buserror for his initial work bringing mini2440 to life
and
the arch/arm kernel maintainers to introduce a lot of patches into
mainstream
kernel over the last months, making it all a lot easier now.
=== Attached are a few files:
console-output
(http://www.christianroessler.net/downloads/mini2440/linux-2.6.37-1_mini2440/console-output)
The console output when booting mini2440, from uboot until login.
Just for documentation purposes. I know, my sd-card has a few bad
sectors.
devices-and-additonal-info
(http://www.christianroessler.net/downloads/mini2440/linux-2.6.37-1_mini2440/devices-and-additonal-info)
A simple ls /sys/... in the running system (which is a rather old
emdebian) to
see that (hopefully) all devices are there.
linux-2.6.37-1-mini2440.patch
(http://www.christianroessler.net/downloads/mini2440/linux-2.6.37-1_mini2440/linux-2.6.37-1-mini2440.patch)
The linux kernel 2.6.37-1 patchfile itself. Feel free to run it against
the
latest stable "2.6.37-1" available on www.kernel.org.
mini2440_defconfig
(http://www.christianroessler.net/downloads/mini2440/linux-2.6.37-1_mini2440/mini2440_defconfig)
This is my mini2440 kernel configuration file. I included some
nonsestuff here,
like powersaving-governors and ipv6. Just to play around. Feel free to
kick
this stuff out if you don't need it.
=== Questions
I don't know whether all mini2440 devices are recognized correctly and
if all
required modules are compiled either into the kernel or as module.
Can someone point me to details/readme's on how to determine a
successfull
build which includes all devices populated on the samsung SoC ?
=== Additional fix
I have had several problems getting the kernel to recognize my sdcard
which
holds my roofs. I made it "working" enabling "mmc debug". But this was
not a
nice thing to do, because it was utterly slow, filled my dmesg-log,
hitted
the /var/log partition on the card hard and was ugly.
I patched the sd-host-code after some googling
(drivers/mmc/host/s3cmci.c).
The sd/mmc patch is included in the big patchfile. Kudos to the
original author,
I don't know where i found the 2 lines of code anymore.
=== How to apply the patch / build your own kernel
Download vanilla / unpatched kernel from www.kernel.org
-> http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.37.1.tar.bz2
Extract into a folder, cd into it
run patch -p1 < PATH-TO-PATCHFILE.patch
Put "mini2440_defconfig" into arch/arm/configs folder,
overwriting existing configfiles. Or backup your existing file first,
it's up
to you.
Setup your toolchain.
Run "make mini2440_defconfig".
Run "make menuconfig" to refine the configuration or run simliar
commands.
Run "make" to compile
Run "make uImage" to create uImage for uboot or anything else, whatever
you
prefer and need.
Cheers,
Christian
Do you want to break these down into "manageable" patches using git
and re-post them ? I'll merge them with my stuff and push upstream if
you like. I got a few others that could be piggybacked.
FIY I use a much more recent kernel than the one in git myself, but I
had been reluctant to post it over the last year or so for "political"
reasons; now that at least one person made one effort to do stuff I
feel it could be time to relive this branch ;-) I got a rather
fantastic (or so I'm told) distro builder thede days called "minifs"
that I've meat to re-release. I can make a minimal distro in less than
2MB (including kernel!) and general boots in about 4 seconds..
Michael
PS: I also replied inline :
On Tue, Feb 22, 2011 at 11:18 AM, <chri...@christianroessler.net> wrote:
>
> === Questions
> I don't know whether all mini2440 devices are recognized correctly and if
> all
> required modules are compiled either into the kernel or as module.
> Can someone point me to details/readme's on how to determine a successfull
> build which includes all devices populated on the samsung SoC ?
I do have bits and pieces like PWM, ADC etc configured here. More or
less pretty much everything on the board. Did you do these ?
>
> === Additional fix
> I have had several problems getting the kernel to recognize my sdcard which
> holds my roofs. I made it "working" enabling "mmc debug". But this was not a
> nice thing to do, because it was utterly slow, filled my dmesg-log, hitted
> the /var/log partition on the card hard and was ugly.
> I patched the sd-host-code after some googling (drivers/mmc/host/s3cmci.c).
> The sd/mmc patch is included in the big patchfile. Kudos to the original
> author,
> I don't know where i found the 2 lines of code anymore.
I had a similar patch for another s3c project I'm working on. Also
have you tried "rootwait=" ? Also, SOME cards just won't work,
regardless of the efforts. It seems some take a long time to "power
up" and/or return invalid early replies thst screw up the driver..
Michael
Thanks again,
Shannon
Michael
I wonder if this work can be pushed to
http://repo.or.cz/w/linux-2.6/mini2440.git ?
Best regards.
M
--
Sent from the iPad
On 5 Mar 2011, at 11:46, Thomas Martitz <thomas....@student.htw-berlin.de> wrote:
> Am 22.02.2011 16:26, schrieb M P:
>> Thanks for that. having a diff on -1 is not very practical, as you
>> can't easily rebase on further kernels...
>>
>> Michael
>>
>> On Tue, Feb 22, 2011 at 3:21 PM, Christian Rößler