Compile a k/ubuntu kernel

Because of the issues that I have had with a 4GB of RAM and the nvidia onboard graphics trying to grab memory where the system RAM was placed. The nvidia onboard graphics was told to grab the memory from 0xb0000000 – 0xbfffffff because that was where the ACER BIOS was telling it where to go!!. (Here for more details)

Anyway, because of this, I am having to compile up the linux kernel ubuntu style. I am using 9.10 kubuntu at present.

I have used this ubuntu guide on how to compile up a linux kernel from this ubuntu website, kernel/compile.

The main parts that I have run are, (I am not using sudo because I setup the root password so that I do not have to type in sudo all of the time, I setup the root password by sudo passwd root)

cd /usr/src/
apt-get install fakeroot kernel-wedge build-essential makedumpfile
 
apt-get build-dep linux
 
apt-get build-dep linux-image-$(uname -r)
apt-get source linux-image-$(uname -r)
 
debian/rules updateconfigs
 
cd debian.master/scripts/misc 
chmod a+x *
cd -
debian/rules updateconfigs

I go into the /usr/src, because when you get the apt-get source of a the latest linux-image it places the files within the present directory that you are using and usually the linux kernel source files are placed in /usr/src.

The reason for the chmod a+x * is because some of the debian(.master)/scripts/misc need to be updated to have there execute permissions granted.

Make some changes to the kernel files, in my case the arch/x86/pci/i386.c file. Then to compile up the kernel

fakeroot debian/rules clean
CONCURRENCY_LEVEL=2 AUTOBUILD=1 NOEXTRAS=1 fakeroot debian/rules binary-generic

Joining program

Since I was downloading a couple of files that needed to be joined together, I thought that I would write a bash script to do this for me.

The file that I was getting was from a friend whom had created a home movie of his son walking but could not send the whole thing but had to send in parts, he used a program called HJSplit, but I wanted to join them together using just linux command line commands. So after doing that I have done a small bash script that will do a similar task for me every-time without needing to type in a few commands.

#!/bin/bash
# Ian Porter : http://www.codingfriends.com
# joining program, that will join files together similar to hjsplit.
 
# get the input values
input=$1
output=$2
 
# if input is equal to 2 parameters then
if [ $# -eq 2 ]
then
        # ls all of the files that meet the requirements of the 1st parameter
        for i in `ls $input*`;
        do
                echo "Adding file $i to $output"
                cat $i >> $output
        done
else
        echo "input filename(s) | output filename"
        echo "..."
        echo "example arv arv.avi"
        echo "Please input the searchable filename and the output filename"
fi

If you save that as hj.sh and then change the execute writes on it

chmod 755 hj.sh

This will allow you to run the program without typing in sh , to use it for example just use

./hj.sh files_to_join big_file

4GB – 32bit northbridge BAR1 error

With the Laptop that I have, it appears to have a 32 bit northbridge with a 64 bit cpu’s, I have logged this error with the PCI kernel group because hopefully they will be able to give some advice and also I am giving data back to the Linux group on the whole.

Shall put any advice on the kernel PCI group list back on this page regarding the error, if anyone wants to look over the 2GB/4GB dmesg + /proc/iomem files just say.

“I have a acer aspire 9815 with from what I have read a 32bit Northbridge and when you add 4GB of RAM with a nVidia 256 of “virtual
ram” causes a base address registers (BAR1), but works fine with 2GB because there is a problem with the way that Linux kernel is
allocating the memory associated with the devices and places then out of range.

Here is my lspci for the PCI host bridge

Host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and
945GT Express Memory Controller Hub (rev 03)
PCI bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and
945GT Express PCI Express Root Port (rev 03)

From this website it appears that some one was trying to update the PCI IOMEM part of the kernl

http://tjworld.net/wiki/Linux/PCIDynamicResourceAllocationManagement

but says that it will be in the .30 / .31 kernel but I am not able to still use the 4GB of ram and I am using the 2.6.31-10-generic
#35-Ubuntu SMP Tue Sep 22 17:33:42 UTC 2009 i686 GNU/Linux from a kubuntu 9.10 setup and was hoping to have the fix already applied.

Was wondering since I am using the k/ubuntu kernel does the “real” kernel have the PCI IOMEM Upgrade ? or do I have pass some kernel
parameters on grub to allow for this to work correctly ? or has there been another upgrade to the PCI structure that will come in a later
release ?

Also there was some advice to update the BIOS for some laptops and set the upper memory limit, does this make the PC memory have a virtual
head to it and thus the OS will not see the rest of RAM ? or is it just for the PCI setup aspects that look at the upper memory limit and
the rest of the OS can see the and use the rest of the RAM ?

Any advice would be great.”

UPDATE

The only advice was that how about trying out the 64bit kernel, which is what I am using.

Firefox – Show results from navigation bar

In Firefox the navigation bar will display the first search result if you type in something that is not a valid URL, e.g. if you type in CodingFriends.com then it will display codingfriends.com web site, but if you typed in codingfriends then it would display the first result which is this website.

But to alter the default settings in the navigation bar so that it will display your favorite search engine, I use Google search engine.

If you type in the navigation bar

about:config

This will display

about:config
about:config

Once you have clicked the button, then do a search for

keyword.URL

Double click on the value (the one on the right) and change

http://www.google.com/search?ie=UTF-8&oe=UTF-8&sourceid=navclient&gfns=1&q=

To

http://www.google.com/search?q=

You are taking out the gfns=1, which means goto the first result.
I have taken more than the gfns because the rest are encoding standards for text.

Linux – memory and where is it

To find out what memory you have onboard and also where it is, here is a neat command

lshw -class memory

Here is my output

  *-firmware                                 
       description: BIOS
       vendor: Acer
       physical id: 0
       version: V2.04 (01/15/07)
       size: 103KiB
       capabilities: isa pci pcmcia pnp apm upgrade shadowing escd cdboot acpi usb agp biosbootspecification
  *-cache:0
       description: L1 cache
       physical id: 5
       slot: L1 Cache
       size: 16KiB
       capacity: 16KiB
       capabilities: asynchronous internal write-back
  *-cache:1
       description: L2 cache
       physical id: 6
       slot: L2 Cache
       size: 4MiB
       capabilities: burst external write-back
  *-memory
       description: System Memory
       physical id: 12
       slot: System board or motherboard
       size: 2GiB
     *-bank:0
          description: SODIMM Synchronous
          physical id: 0
          slot: M1
          size: 1GiB
          width: 32 bits
     *-bank:1
          description: SODIMM Synchronous
          physical id: 1
          slot: M2
          size: 1GiB
          width: 32 bits

I basically have 2GiB of memory and also L1 cache (on die cache on the cpu) of 16KiB and 4MiB L2 Cache.

Here is a wiki page that details what L1 and L2 cache are CPU cache, basically L1 means on CPU die, and L2 means slightly further away from the L1 cache. If there is a memory call L1 is the first hit, then L2 and then the memory and then swap space (harddrive), the lower down the line means slower result time.

DeVeDe – convert video files to DVD’s

To convert video files into Video DVD’s for general usage well there is allot of applications out there that can do the job, command line (bash) if you want to or just use a GUI. I personally used to use a commmand line but now I am using a GUI because personally it just is as easy and sometimes it is nice to use a gui and not have to think as such.

The application that I use is called DeVeDe and it just makes the conversion very nice. Here is a step by step guide to use it.

Here is the output types that you can choose from, I have never used anything else but Video DVD.

Type of output

Start the create of the DVD structure, e.g. files and titles names.

The Title of the film

Properties of the title name(s) that you would like to come up on the main menu of the DVD.

Add the film

Add the files that you want to associated with the title on the main menu of the DVD, these could be of any type of file Xvid, MPEG, etc.

Pick the video

Titles and the files that are associated with the DVD structure.

Create the video

Create the DVD, this will progress to where to place the ISO image of the DVD structure.

The name of the files for temporary usage

Create the Full DVD Structure

Job done!

Finished!! all done.

Create DVD Properties Properties Title Properties Titles and file Create DVD Create DVD file names Create DVD files Finish