Linux Renesas SuperH

LinuxSH: Importing New Kernel Versions

This page documents how to import new kernel versions.

Note, it is not an invitation to do it yourself! This should only be done by experienced people who have been assigned the role.

The checkboxes on the left-hand side are to assist you keep track of where you're up to when doing the import.

This process typically takes half an hour to an hour.

If you're cutting and pasting command lines, one tip is to start important lines with "# ", then paste the command, then ^A to the start of the line and remove the "# ". That way if you accidentally paste in a carriage return, nothing will happen.

What you will need:

Login access to the SourceForge shell server. 
Enough space. (About 180Mb. I cd to /home/groups/linuxsh/linux-src) 
Sources for the version of Linux you want to import. (.tar.bz2 file, patches, etc) 
A pristine checkout of the latest version of Linux on SuperH. (My version of this is called "kernel") 

How to do it:

First, note that the parts you'll need to change every time are underlined. In this example, Linux kernel version 2.3.99pre5 is already in the CVS repository, and 2.3.99pre6-3 is being imported. 
Log into the SourceForge shell server. 
cd to the working area directory (linux-src in my example above). 
cd into the checked out version, and do a "cvs -q up" to verify it's pristine. 
Tag the source with the pre-import tag. 
   cvs -Q tag L2_3_99_pre6-3_BEFORE
  
cd ..
Untar the latest version of the Linux kernel. Then apply patches as necessary. The sources should be PRISTINE. Note, CVS does not control this directory. 
cd into it. (For me, "cd linux") 
export CVS_RSH=ssh
This next step does the import, so it's critical to get it right. What's happening here is that the official Linux kernel will get pulled onto the "vendor branch". (Actually, just those files that have changed). You should change the underlined parts accordingly. 

cvs -d mjd@cvs1:/cvsroot/linuxsh import -m "Import of Linux 2.3.99-pre6-3." -I '!' -ko kernel LINUS L2_3_99_pre6-3

CVS may suggest that you do a merge. That's the next step. 

Hmm, when I just did it, the cvs server "aborted with broken pipe". Can't remember that happening last time. Doesn't look like it will hurt anything, but we should keep an eye on it...

cd ../kernel
Determine the tags you'll use for the merge: 
   cvs log Makefile | grep -A 5 "^symbolic names"
   symbolic names:
        L2_3_99_pre6-3: 1.1.1.4
        L2_3_99_pre6-3_BEFORE: 1.1.1.3
        L2_3_99_pre5: 1.1.1.3
        L2_3_99_pre4: 1.1.1.2
        N_2000_03_25: 1.1.1.1
  
What you're looking for here is the two most recent "L_*" tags, excluding specials like BEFOREs and AFTERs. In this case, "L2_3_99_pre5" is the previous revision, and "L2_3_99_pre6-3" is the revision you just imported. 
This next step merges the differences between the previous vendor branch revision, and the latest one, into our main branch. This is where CVS will detect conflicts if they exist. You must specify the two vendor branch tags from above. 

cvs -q -d mjd@cvs1:/cvsroot/linuxsh update -jL2_3_99_pre5 -jL2_3_99_pre6-3

Work out how much merging work there is to do. 
   cvs -q up
  
This will show you the files that have been added, changed and removed. "M" files are modifications. "C" files are conflicts and should be noted for the next step. 

Tip: If the CVS output is very cluttered, run it a second time. And if there's more than one screenful, pipe it into "less". 

Using the list of conflicting files from above (the ones that start with "C"), edit and resolve the conflicts. 
Check in the changes. This is the step that makes the official Linux changes visible to Linux on SuperH CVS users. 
   cvs -q ci -m "Branch merge of Linux 2.3.99-pre6-3."
  
This next step involves keyword expansion. For general Linux files, we want CVS to preserve the version numbers they were given outside our project. For files owned by the Linux on SuperH project, we want our own version numbers. 
   F=`find arch/sh include/asm-sh -type f | grep -v "CVS" | grep -v "\/\.#"`
   cvs admin -kkv $F
   rm -f $F
   cvs up $F
  
Tag the source with the post-import tag. 
   cvs -Q tag L2_3_99_pre6-3_AFTER
  
Try a local import from your home or work machine. 
The "kernel" and "linux" directories are now no longer needed and can be deleted to save disk space. 
Announce the import to the linuxsh-dev mailing list. As an interim measure, also announce it to the m17n.org mailing list. 

The final step is to wait for the screams!


printer friendly Linux is a trademark of Linus Torvalds. 
SuperH and Cool Engine are registered trademarks of Hitachi, Ltd.

Last update: 28/08/2026

This page ©2003. Permission granted to copy and display.
$Id: prtemplate.php3,v 1.4 2026/08/28 16:30:56 lethal Exp $