Skip to content

PeterDaveHello/kernel-pdk7105

 
 

Repository files navigation

kernel-pdk7105 - NextVod's Kernel

Short history of this kernel

This section provides some hints when you want to enhance/trace or debug this kernel.

  1. STLinux porting linux 2.6.23 to STLinux 2.3 v2.6.23.17_stm23_0125
  2. NextVOD's source: SMIT porting STLinux to NextVod GB620_PDK7105_A18B
  3. suzuke porting STLinux 2.4 v2.6.32.59 to kernel-pdk7105
  4. TWPDA fork a branch kernel for sh4twbox. (developer page)

Graph of upstream sources:

Build

Install STLinux 2.4 developer environment

. ./env24.sh # stlinux 2.4

./make.sh kernel # build kernel only
./make.sh all  # build kernel & modules
./make.sh menu # or, launch menu to choose options and build all

make cscope # [optional], build cscope files for trace source code

# for source code control
./clean.sh

Some hints for porting

Study SMIT code

Search possible keyword smit gonjia wgzhu smit_ in smit kernel

  • old kernel
  • drivers/char/spi/spi25pxx.h (smit_)
  • drivers/usb/storage/usb.h (smit)
  • drivers/usb/storage/usb.c (smit)
  • arch/sh/kernel/cpu/sh4/setup-stx7105.c (smit)
  • arch/sh/boards/st/pdk7105/setup.c (smit)

Extract src.rpm from STLinux

Possible solutions:

We use simple extract method.

mkdir r ; cd r # make a workind directory
rpm2cpio foo.src.rpm | cpio -idmv
tar xf foo.tar.bz2 # extract the upstream code
for f in *.patch.gz ; do gzip -d $f ; done
# ref foo.spec, we know patch -p1 to patch the source
cd foo
for f in ../*.patch ; do patch -p1 < $f ; done

vim tips for tracing code

# yaourt -S vim-cscope
./cscope.sh # rebuild cscope db for limited files

in vim

# support 'cscope' command
:cs add cscope
:cs reset # whenever rebuild the cscope db
# support 'mak' command
:set makeprg=$PWD/make.sh
:mak  # build and show line on error message

USB mis-order problem

This issue require use stlinux24x7105_configure_usb() to solve.

  1. arch/sh/boards/mach-pdk7105/setup.c enable config_usb(0) only.
  2. patch drivers/usb/storage/usb.c and enable 2nd USB slot later.
  3. This patch will cause the following warning. That's point out storage_probe() called a __init function, but itself is not.

WARNING: modpost: Found 1 section mismatch(es). To see full details build your kernel with: 'make CONFIG_DEBUG_SECTION_MISMATCH=y'

ref: http://stackoverflow.com/questions/8832114/what-does-init-mean-in-this-linux-kernel-code

HISTORY

  • 2013/09/10 import kernel code
  • 2013/10/19 release twpda patch

About

kernel for pdk7105

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published