Patches for kernel 3.0 and a couple of questions

75 views
Skip to first unread message

Ole Andre Rodlie

unread,
Nov 8, 2012, 2:15:47 PM11/8/12
to biffe...@googlegroups.com
Hi, I've been using the Bifferboard for some months now, and I'm very
satisfied with the device. I started out with kernel 2.6.32 with adapted
patches from 2.6.30.5-biff. I "ported" the patches I used from .32 to
3.0 (.32 had some minor issues), and things seems to work ok (at least
what I use the device for). I've included them here if someone needs
them (tested on 3.0->3.0.50).

And now to my question; Do I need extra patches to enable the flash
device (mtd)? I only want to add a squashfs filesystem on the device and
boot from that (something like root=/dev/mtdX rootfstype=squashfs).

Kernel configs, patches, tips and tricks are welcome :)

Regards

Ole Andre

patch-3.0.x-fx1

Andrew Scheller

unread,
Nov 8, 2012, 3:13:21 PM11/8/12
to biffe...@googlegroups.com
> And now to my question; Do I need extra patches to enable the flash
> device (mtd)? I only want to add a squashfs filesystem on the device and
> boot from that (something like root=/dev/mtdX rootfstype=squashfs).
> Kernel configs, patches, tips and tricks are welcome :)

Sounds like you know what you're doing, so instead of pointing you at
https://sites.google.com/site/bifferboard/Home/openwrt-git I'll just
point you at the arch/x86/mach-rdc321x/boards/bifferboard.c file which
is contained inside
https://github.com/bifferos/bb/blob/master/openwrt/target/linux/rdc/patches-2.6.38/100-rdc_boards.patch
:-)

Lurch

Ole Andre Rodlie

unread,
Nov 10, 2012, 8:12:39 PM11/10/12
to biffe...@googlegroups.com
I should check things more before I ask question :P I had everything I
needed with the patch I posted earlier, I just forgot to add the
Amd/Fujitsu Query table in my kernel config. I'm not that experienced
with MTD, so the kernel configuration has been a bit frustration (what
to include or not to include).

Creating 3 MTD partitions on "ENLV640B":
0x000000000000-0x000000200000 : "kernel"
mtd: Giving out device 0 to kernel
0x000000200000-0x0000007f0000 : "rootfs"
mtd: Giving out device 1 to rootfs
0x0000007f0000-0x000000800000 : "biffboot"
mtd: Giving out device 2 to biffboot


Thanks for the link to the openwrt stuff, but last time I looked at the
patches I gave up. Their kernel are too far from the vanilla kernel to
have any use for me.

Btw, my last patch had an error (I didn't test MTD), bifferboard-flash.c
needs to be adjusted to reflect changes in the kernel:

--- drivers/mtd/maps/bifferboard-flash.c.orig 2012-11-11
01:05:33.589576232 +0100
+++ drivers/mtd/maps/bifferboard-flash.c 2012-11-11
01:05:55.086739121 +0100
@@ -209,7 +209,7 @@
}

bb_mtd->owner = THIS_MODULE;
- ret = add_mtd_partitions(bb_mtd, bb_parts, part_len);
+ ret = mtd_device_register(bb_mtd, bb_parts, part_len);
if (ret)
{
pr_err(DRV "add_mtd_partitions\n");
@@ -229,7 +229,7 @@

static void __exit exit_bb_map(void)
{
- del_mtd_partitions(bb_mtd);
+ mtd_device_unregister(bb_mtd);
map_destroy(bb_mtd);
iounmap(bb_map.virt);
}

MTD now works 100% :)


Regards

Ole Andre Rodlie


biff...@yahoo.co.uk

unread,
Nov 11, 2012, 5:20:25 AM11/11/12
to biffe...@googlegroups.com

On Sunday, November 11, 2012 1:12:39 AM UTC, olear wrote:
Thanks for the link to the openwrt stuff, but last time I looked at the
patches I gave up. Their kernel are too far from the vanilla kernel to
have any use for me.

 I think you will find that 98% of the patches applied to the OpenWrt kernel either apply to other platforms, or have no particular use on the Bifferboard and therefore can be excluded.  I once went through the exercise of trying to work out exactly what was needed, reduced it down to about 1/4 of the patches but then gave up as I decided most people would just use the stock OpenWrt kernels.

regards,
Biff.

Ole Andre Rodlie

unread,
Nov 11, 2012, 10:07:40 AM11/11/12
to biffe...@googlegroups.com
I tried using patches from openwrt-bb (2.6.37) on a plain kernel
(2.6.37), but the simple act of applying the patches failed. Using only
the patches from the rdc folder didn't help either, they depend on (new)
features added by the generic folder etc. For me it's just too much work
finding out the inner-workings of openwrt(-bb) just to get the
Bifferboard working (the way I want). OpenWrt is a nice project, and I
understand why you standardized on it, but for me it just complicate things.

I will maintain your old patches from 2.6.30, and use them.

I'm currently at kernel 3.4, with support for 3.2 and 3.0 as well. I
need to modify the old watchdog driver due to changes in 3.4, but that
should be no major task.

My current plan is to support the latest longterm kernels (currently
3.0/3.2/3.4).

I will probably use the 3.2 kernel myself due too upstream support until
2015, 3.0 and 3.4 will be supported upstream until 2014(-ish).

Regards

Ole Andre.




biff...@yahoo.co.uk

unread,
Nov 11, 2012, 2:01:00 PM11/11/12
to Bifferboard

On Nov 11, 3:07 pm, Ole Andre Rodlie <ol...@dracolinux.org> wrote:
> OpenWrt is a nice project, and I
> understand why you standardized on it, but for me it just complicate things.

There was really one major reason why I standardized on OpenWrt and
that was the support for JFFS. The earlier 2.6 kernels would have
taken a lot of work to get that working, but I guess that should have
changed now with the 3.4 series. In fact, since 3.X kernels work out
of the box on the Bifferboard with a few minor issues I find myself
resorting more and more to virtually un-patched kernels with buildroot
initrd systems for my own stuff. Since I can normally do what I want
in 1MB flash and I have a mix of 1, 4 and 8MB devices I can use the
same images for all of them. Once you put a few configuration options
(like IP address) in the kernel command-line and extract it out with a
script on boot you can remove the requirement for flash from many
simple apps.

cheers,
Biff.
Reply all
Reply to author
Forward
0 new messages