Compiled Debian kernel does not work.

50 views
Skip to first unread message

rhyvu

unread,
Apr 13, 2010, 8:13:19 AM4/13/10
to Bifferboard
I have been running Debian on my Bifferboard using the version by Ivan
Zahariev (famzah) and wanted to enable swap so I followed the
instructions in the "build-a-debian-linux-kernel-for-bifferboard-as-
deb-packages" post by famzah which completed without any errors.
Unfortunately after I upload it to the Bifferboard it does not start
at all, the Bifferboard just stops responding after Biffboot finishes
to initialize.

I tried to compile without enabling swap, on a different computer,
downloaded on a different network, using a different distribution then
Debian to compile the kernel, etc... but no matter what I try I just
can not seem to get it to work. Any suggestions?

Andrew Scheller

unread,
Apr 13, 2010, 9:23:15 AM4/13/10
to biffe...@googlegroups.com
> I tried to compile without enabling swap, on a different computer,
> downloaded on a different network, using a different distribution then
> Debian to compile the kernel, etc... but no matter what I try I just
> can not seem to get it to work. Any suggestions?

Bifferboard needs a 32-bit kernel - are you trying to compile on a
64-bit machine? (I made this mistake myself at first)
If you are, the easiest way round it is to setup a 32-bit linux
install inside a VirtualBox VM and compile the kernel inside that.

Lurch

Kyle Gordon

unread,
Apr 13, 2010, 1:57:10 PM4/13/10
to biffe...@googlegroups.com
I encountered exactly the same problem when trying to obtain swap
support. It would compile just great, flash fine, but would stall
immediately after the bootloader. I compiled on Ubuntu x86, but will be
trying Debian x32 in a VM this evening. Not sure if it'll work. It might
have been something as daft as a libc problem or somesuch.

Will keep folks updated :-)

Kyle

Nelson Neves

unread,
Apr 13, 2010, 4:40:04 PM4/13/10
to biffe...@googlegroups.com


--
You received this because you are subscribed to the "Bifferboard" Google group - honest!
To unsubscribe from this group, send email to bifferboard...@googlegroups.com

To unsubscribe, reply using "remove me" as the subject.


Swap support in Debian is also something that I was requiring but to the lack of time could not investigate any further.
Feedback on this would be much appreciated.

Regards,
Nelson.

biff...@yahoo.co.uk

unread,
Apr 13, 2010, 4:46:43 PM4/13/10
to Bifferboard

Can't you just use the kernel from Slackware? It has swap enabled,
and can't be configured much differently.

Or, perish the thought, you could just use Slackware...

Biff.

On Apr 13, 9:40 pm, Nelson Neves <nelson.s.ne...@gmail.com> wrote:


> On Tue, Apr 13, 2010 at 6:57 PM, Kyle Gordon <k...@lodge.glasgownet.com>wrote:
>
>
>
> > On 13/04/10 14:23, Andrew Scheller wrote:
>
> >> I tried to compile without enabling swap, on a different computer,
> >>> downloaded on a different network, using a different distribution then
> >>> Debian to compile the kernel, etc... but no matter what I try I just
> >>> can not seem to get it to work. Any suggestions?
>
> >> Bifferboard needs a 32-bit kernel - are you trying to compile on a
> >> 64-bit machine? (I made this mistake myself at first)
> >> If you are, the easiest way round it is to setup a 32-bit linux
> >> install inside a VirtualBox VM and compile the kernel inside that.
>
> >> Lurch
>
> > I encountered exactly the same problem when trying to obtain swap support.
> > It would compile just great, flash fine, but would stall immediately after
> > the bootloader. I compiled on Ubuntu x86, but will be trying Debian x32 in a
> > VM this evening. Not sure if it'll work. It might have been something as
> > daft as a libc problem or somesuch.
>
> > Will keep folks updated :-)
>
> > Kyle
>
> > --
> > You received this because you are subscribed to the "Bifferboard" Google
> > group - honest!
> > To unsubscribe from this group, send email to

> > bifferboard...@googlegroups.com<bifferboard%2Bunsu...@googlegroups.com>

rhyvu

unread,
Apr 13, 2010, 4:53:54 PM4/13/10
to Bifferboard
So it seems I am not the only one experiencing issues compiling the
kernel. Well I currently have no running x64 systems that I can use to
compile, so all my compilations where done on x86 on distributions
such as Ubuntu Karmic x86 and Debian Lenny x86. I even tried to
compile on Windows XP SP3 x86 running Oracle Virtualbox which was
running Debian Lenny x86 compiling the kernel, but still without much
success. The only thing I have not tried under Virtualbox is uploading
the kernel because I upload it through the console port and I need
native access for it to work correctly, but since it uploads all other
kernels fine I can not see why this would have anything to do with
it.

This is very weird, for me enabling swap or keeping it disabled did
not make any difference, still not booting even with swap disabled.
Any contribution is appreciated, especially if it leads to resolving
the boot issue.

d1savowed

unread,
Apr 13, 2010, 5:39:14 PM4/13/10
to Bifferboard
Figured I would chip in here, as im a little confused by this all.
I've had no problems compiling Bifferboard kernels, though admittidly
I don't use famzah's system but rather my own. I'm also compiling it
on an Ubuntu system without problems. What version of the kernel are
you trying to compile? I will give it a go here and test.

Stu

David Prieto

unread,
Apr 13, 2010, 5:41:43 PM4/13/10
to biffe...@googlegroups.com
This is how I got Debian with swap in bifferboard (the easy way)

I followed the steps at: http://blog.famzah.net/2009/11/18/debian-rootfs-installation-customized-for-bifferboard/ to get a USB disk with a debian rootfs. But some things didn't work. That kernel has no swap support and my usb sound was not working ("not enough bandwith" errors).

Then I found a different Debian "distro" for bifferboard: the one from Graham Marshal (sunspot):
http://www.sunspot.co.uk/Projects/Bifferboard/Debian_distro.html

I flashed the bifferboard with  vmlinuz-2.6.32 from that distro and copied only the lib/modules/2.6.32-... files from its rootfs in my usb disk (maintaining my previous and almost-working debian files). Just a kernel upgrade.

Everything works as expected. I have swap support and my usb sound problems disappeared.

Regards!
--
Un saludo,
David Prieto.

David Prieto

unread,
Apr 13, 2010, 5:45:03 PM4/13/10
to biffe...@googlegroups.com

Then I found a different Debian "distro" for bifferboard: the one from Graham Marshal (sunspot):
http://www.sunspot.co.uk/Projects/Bifferboard/Debian_distro.html

I flashed the bifferboard with  vmlinuz-2.6.32 from that distro and copied only the lib/modules/2.6.32-... files from its rootfs in my usb disk (maintaining my previous and almost-working debian files). Just a kernel upgrade.


BTW: probably you don't need to install the famzah.net distro and then copy sunspot's files. Probably just installing sunspot's distro you have Debian working with swap. But I already had my usb disk configured and with some apps installed and... did't want to re-install everything.

Kyle Gordon

unread,
Apr 13, 2010, 7:16:18 PM4/13/10
to biffe...@googlegroups.com
--
You received this because you are subscribed to the "Bifferboard" Google group - honest!
To unsubscribe from this group, send email to bifferboard...@googlegroups.com
That's an excellent idea. Cheers :-)

Kyle

-- 
Kyle Gordon - 2M1DIQ
Web: http://lodge.glasgownet.com
Jabber/Email/SIP: ky...@lodge.glasgownet.com

Kyle Gordon

unread,
Apr 13, 2010, 7:21:45 PM4/13/10
to biffe...@googlegroups.com
Using the kernel from Slackware is definitely an option...

As for the Slackware distro, I tried it and found it was missing just
about every package I required, and slapt-get was awful. Short of
compiling everything from scratch in a virtual machine, I opted to use a
distro that I had plenty of experience of :)

Kyle

Kyle Gordon

unread,
Apr 13, 2010, 7:26:53 PM4/13/10
to biffe...@googlegroups.com
On 13/04/10 21:40, Nelson Neves wrote:
>
> Swap support in Debian is also something that I was requiring but to
> the lack of time could not investigate any further.
> Feedback on this would be much appreciated.
>
> Regards,
> Nelson.
> --
> You received this because you are subscribed to the "Bifferboard"
> Google group - honest!
> To unsubscribe from this group, send email to
> bifferboard...@googlegroups.com
Well, it built just great. During the make menuconfig portion, I jumped
in and enabled swap. Compiled fine, extracted the kernel and tried to
flash it on. Howeber, bb_upload8.py timed out after chunk 118. Any
attempts to boot were met with a hang immediately after the bootloader.

Attempts to flash the original back on over ethernet were met with
'IOError: Error 2 writing data at 0', and I had success only with
bb_upload8.py instead.

I think I'll give Sunspots kernel and module tree a shot instead :-)

Kyle

Sunspot

unread,
Apr 14, 2010, 3:54:42 AM4/14/10
to Bifferboard
The "distro" is here -
http://www.sunspot.co.uk/Projects/Bifferboard/Debian_distro.html
(with a few new edits [GPIO was working all the time it seems - thanks
to David Prieto])
Note the non standard i2c pins.
The only problem that bothers me is the inability to read from rs232
using a web page - the same procedure worked fine in my OpenWrt
version.

> Jabber/Email/SIP: k...@lodge.glasgownet.com

David Prieto

unread,
Apr 14, 2010, 3:59:36 AM4/14/10
to biffe...@googlegroups.com

The only problem that bothers me is the inability to read from rs232
using a web page - the same procedure worked fine in my OpenWrt
version.


maybe a permissions problem? how do you read the rs232 port from a web page? what httpd server do you use?
 

rhyvu

unread,
Apr 14, 2010, 5:52:55 AM4/14/10
to Bifferboard
It is great that there is an alternative that works, I will try it
later today when I get the opportunity. Still I would like to know why
compiling the kernel myself failed if for no other reason then to
learn and understand, therefore if someone ever figures it out then
please tell.

Ivan Zahariev (famzah)

unread,
Apr 21, 2010, 8:08:38 AM4/21/10
to Bifferboard
Hi all,

I've compiled new Debian kernels (2.6.30.5 and 2.6.32) which have the
following enabled/changed:
- "Noop" as default I/O scheduler.
- Swap support.

The installation instructions on my Debian blog page have been
updated:
http://blog.famzah.net/2009/11/20/running-debian-on-bifferboard/

I've also added automated scripts which build the kernel from source:
http://bifferboard.svn.sourceforge.net/viewvc/bifferboard/debian/kernel/

The scripts must be executed on a Debian "lenny" system.

@rhyvu: Please review the "README.txt" instructions at the SVN
repository, and let us know if you still have issues compiling the
kernel. Please copy/paste the commands you executed as well as their
output and errors.

Cheers.
--famzah

Nelson Neves

unread,
Apr 21, 2010, 8:56:58 AM4/21/10
to biffe...@googlegroups.com
Thanks Ivan,


The scripts must be executed on a Debian "lenny" system.

Will there be any problem with my Ubuntu 9.10 system ? Don't have a Debian at the moment!
At least the last time I've tried to compile from the SVN in my Ubuntu it was OK!

Regards,
Nelson.

Ivan Zahariev (famzah)

unread,
Apr 21, 2010, 1:43:13 PM4/21/10
to Bifferboard
The kernel will build and work OK.
However, the generated .deb packages (linux-headers-??.deb and linux-
image-??.deb) will depend on the newer libc6, which is available on
Ubuntu 9.10 and not on Debian "lenny".

Note that I don't have a separate machine with a Debian "lenny"
installation either. Using "debootstrap" you can install a Debian
"lenny" system in a directory on your Ubuntu system. All you have to
do then, is:
0) Assuming you installed the Debian "lenny" in /debian-lenny
1) Mount proc by executing "sudo mount -t proc proc /debian-lenny/
proc"
2) (optionally but recommended) Mount dev by executing "sudo mount --
bind /dev /debian-lenny/dev"
3) Chroot into the Debian system: "sudo chroot /debian-lenny"
4) Whoalla, you are running a Debian installation inside your Ubuntu
system. Checkout the whole SVN repository and go on with the
compilation. Before that, execute "apt-get install build-essential"
and whatever else you may need for the compiling to succeed.

Cheers.
--famzah

Andrew Scheller

unread,
Apr 21, 2010, 2:35:22 PM4/21/10
to biffe...@googlegroups.com
> The kernel will build and work OK.
> However, the generated .deb packages (linux-headers-??.deb and linux-
> image-??.deb) will depend on the newer libc6, which is available on
> Ubuntu 9.10 and not on Debian "lenny".

??? How is that possible? I thought all the kernel-related files had
to be independent of any shared libs (including libc6) ?

Before reading this email I tried running your build.sh on an Ubuntu
8.10 install, and the first time I tried running it, it failed with:
Couldn't find make-kpkg

...which I managed to fix by installing the "kernel-package" package.
And the second time round it downloaded the kernel source again (maybe
your script could check if the source has already been downloaded?),
and eventually (it took ages because there's loads of kernel modules
enabled) it seemed to build without errors.
I've not tried flashing this kernel to my BB yet though cos I've not
setup a Debian rootfs image yet.

Seems to be a bit of duplication between the scripts in
http://bifferboard.svn.sourceforge.net/viewvc/bifferboard/kernel/ and
http://bifferboard.svn.sourceforge.net/viewvc/bifferboard/debian/kernel/
? :(

Lurch

Nelson Neves

unread,
Apr 21, 2010, 6:22:08 PM4/21/10
to biffe...@googlegroups.com
Thanks for the info famzah, I've seen references for the "debootstrap"
but didn't image that it was that easy! I'll try it, seems pretty forward!
This looks pretty interesting :)

Regards,
Nelson.

Kyle Gordon

unread,
Apr 21, 2010, 7:21:32 PM4/21/10
to biffe...@googlegroups.com
On 21/04/10 13:08, Ivan Zahariev (famzah) wrote:
> Hi all,
>
> I've compiled new Debian kernels (2.6.30.5 and 2.6.32) which have the
> following enabled/changed:
> - "Noop" as default I/O scheduler.
> - Swap support.
Hi Famzah,

Just wanted to say thank you very much!

Regards

Kyle

biff...@yahoo.co.uk

unread,
Apr 21, 2010, 9:35:07 PM4/21/10
to Bifferboard
On Apr 21, 7:35 pm, Andrew Scheller <ya...@loowis.durge.org> wrote:
> > The kernel will build and work OK.
> > However, the generated .deb packages (linux-headers-??.deb and linux-
> > image-??.deb) will depend on the newer libc6, which is available on
> > Ubuntu 9.10 and not on Debian "lenny".
>
> ??? How is that possible? I thought all the kernel-related files had
> to be independent of any shared libs (including libc6) ?

Well, there is some argument that the headers are a function of the
kernel and the libc headers, however in almost all cases, if one
simply takes the stock kernel headers from distro XXX, and combines
them with a slightly newer kernel there is no problem. At least, I've
never heard of any such problem, since you'll probably just miss a
define or two if that. The kernel-userland interface almost never
changes, what changes are the internal kernel interfaces, so you might
be affected if using the kernel build system to build your own modules
independent of the kernel. In such cases you probably want the entire
kernel source anyhow.

My advice to Ivan: Drop the generation of linux-headers-??? and
simply use the stock Debian ones if possible. Nobody will notice the
difference. This was the approach I took in Slackware, and it seems
to work fine.

> Before reading this email I tried running your build.sh on an Ubuntu
> 8.10 install, and the first time I tried running it, it failed with:
> Couldn't find make-kpkg

I would like to know what this make-kpkg does. If it's a script,
please post it somewhere.

> ...which I managed to fix by installing the "kernel-package" package.
> And the second time round it downloaded the kernel source again (maybe
> your script could check if the source has already been downloaded?),
> and eventually (it took ages because there's loads of kernel modules
> enabled) it seemed to build without errors.
> I've not tried flashing this kernel to my BB yet though cos I've not
> setup a Debian rootfs image yet.
>
> Seems to be a bit of duplication between the scripts inhttp://bifferboard.svn.sourceforge.net/viewvc/bifferboard/kernel/andhttp://bifferboard.svn.sourceforge.net/viewvc/bifferboard/debian/kernel/
> ? :(

I've added a makefile to the Debian directory, as an example of how I
think this could work. It builds the debian kernel using my scripts,
but the packaging part has to wait until I know how to synthesize that
on Slackware!

regards,
Biff.

Andrew Scheller

unread,
Apr 21, 2010, 10:09:51 PM4/21/10
to biffe...@googlegroups.com
>> Before reading this email I tried running your build.sh on an Ubuntu
>> 8.10 install, and the first time I tried running it, it failed with:
>> Couldn't find make-kpkg
>
> I would like to know what this make-kpkg does. If it's a script,
> please post it somewhere.

A quick bit of googling finds
http://newbiedoc.sourceforge.net/system/kernel-pkg.html#KPKG-KERNEL-PKG
and
http://packages.debian.org/source/lenny/kernel-package
(make-kpkg is a shell script inside the .tar.gz)

Lurch

rhyvu

unread,
Apr 21, 2010, 11:27:30 PM4/21/10
to Bifferboard
Great news about the updated kernel and compilation scripts, will try
it all out later. I already have an installation of Debian Lenny that
I can use to compile the kernel so that shouldn't be a problem. By the
way was the "tmpfs no free inodes" issue resolved on the provided
kernels?

On Apr 22, 4:09 am, Andrew Scheller <ya...@loowis.durge.org> wrote:
> >> Before reading this email I tried running your build.sh on an Ubuntu
> >> 8.10 install, and the first time I tried running it, it failed with:
> >> Couldn't find make-kpkg
>
> > I would like to know what this make-kpkg does. If it's a script,
> > please post it somewhere.
>
> A quick bit of googling findshttp://newbiedoc.sourceforge.net/system/kernel-pkg.html#KPKG-KERNEL-PKG
> andhttp://packages.debian.org/source/lenny/kernel-package

Andrew Scheller

unread,
Apr 22, 2010, 6:47:06 AM4/22/10
to biffe...@googlegroups.com
> way was the "tmpfs no free inodes" issue resolved on the provided
> kernels?

It's not a kernel problem, it's a rootfs problem - see this discussion
http://groups.google.com/group/bifferboard/browse_thread/thread/970beac2489ee507

Ivan Zahariev (famzah)

unread,
Apr 22, 2010, 6:54:54 AM4/22/10
to Bifferboard
@rhyvu: I added the following to the rootfs building script, in order
to fix the inode problem:

# using the new kernel patches, udev runs out of free inodes and
starts giving "no free space" errors
echo 'tmpfs_size="10M,nr_inodes=10000"' >> /etc/udev/udev.conf

It's not too late to execute it on an already installed Debian system.

@Lurch: I have no idea why the kernel packaging programs mark a
dependency on libc. You are right - this is wrong. I'm no expert in
building kernels - I've read the official docs at the Debian pages,
followed them manually, they worked well, and finally I created an
automated script to build the Debian kernel, in the way the Debian
maintainers do it. The official package Debian "linux-
headers-2.6.31-17-generic" also depends on libc6 (>= 2.8), even though
I don't see why - but that's for a bug report at the Debian mailing
list, not here :)

About the duplication of work - I'm currently working with Biff to
refine the scripts and building processes.

rhyvu

unread,
Apr 29, 2010, 11:56:25 AM4/29/10
to Bifferboard
With the new scripts for compiling the Debian kernel it worked just
fine on and I used the exactly same system I did last time to compile
the kernel. I am very confused why it worked this time, but not the
last time (I also followed the instructions correctly the last time).
Anyway it works now so thanks for the great work.

Since your new kernel has swap enabled I do not need to compile my own
kernel anymore so I am currently using yours, but I am still having
low memory problems which makes me wonder, do I need to do anything
special to get swap working with your kernel and distribution?

Lastly I do not recall if I had this problem before also, but I can
not get the Debian time and date to be preserved between restarts. Any
suggestions?


On Apr 22, 12:54 pm, "Ivan Zahariev (famzah)" <fam...@famzah.net>
wrote:

Andrew Scheller

unread,
Apr 29, 2010, 1:02:20 PM4/29/10
to biffe...@googlegroups.com
> Lastly I do not recall if I had this problem before also, but I can
> not get the Debian time and date to be preserved between restarts. Any
> suggestions?

Bifferboard doesn't include an RTC - it's nothing Debian-specific :)

Either install ntp (if your bifferboard has a permanent internet
connection) or use a startup-hack like the one I helped develop for
slackware (see the bit about hwclock near the bottom of the page)
http://sites.google.com/site/bifferboard/Home/desktop-linux-distributions/slackware

rhyvu

unread,
Apr 29, 2010, 9:06:49 PM4/29/10
to Bifferboard
> Bifferboard doesn't include an RTC - it's nothing Debian-specific :)
>
> Either install ntp (if your bifferboard has a permanent internet
> connection) or use a startup-hack like the one I helped develop for
> slackware (see the bit about hwclock near the bottom of the page)http://sites.google.com/site/bifferboard/Home/desktop-linux-distribut...

Thanks, I had completely forgotten that the Bifferboard lacks an RTC
so I will take a look at your startup hack and see what I can get
working. Now I need to find out if swap is working correctly on my
board or not.

Ivan Zahariev (famzah)

unread,
Apr 30, 2010, 2:12:16 PM4/30/10
to Bifferboard
You have to set up swap:
1. Create a new partition on your disk storage device. Let's assume
that you created "/dev/sda2".
2. Format it as swap by executing: mkswap /dev/sda2
3. Add the following to "/etc/fstab":
/dev/sda2 none swap sw 0 0
4. Reboot.
5. You can find out if you have swap by executing "free". It's output
is similar to:
total used free shared buffers
cached
Mem: 20602972 19470716 1132256 0 761096
14912092
-/+ buffers/cache: 3797528 16805444
Swap: 3906240 174600 3731640

If the number for "Swap:" is bigger than zero, then you have swap
enabled.

If you can't re-partition your storage device, then create a file-base
swap. The following tutorial will guide you through:
http://www.go2linux.org/Swap-memory-increase-with-swap-file

Best regards,
Ivan

rhyvu

unread,
Apr 30, 2010, 8:53:57 PM4/30/10
to Bifferboard
Thanks, I had done everything except add it in the "/etc/fstab" which
I can not understand how I could forget to do. For some reasons lately
I have been skipping a step or two that is essential and then
wondering why it doesn't work, I guess I need to take a break soon.


On Apr 30, 8:12 pm, "Ivan Zahariev (famzah)" <fam...@famzah.net>
wrote:
Reply all
Reply to author
Forward
0 new messages