Upd 20-12-2013 : OpenSuSE RPI 13.1 20131206I + 3.11.x+hack


3 posts
by remsnet » Mon Apr 15, 2013 6:13 pm
Hello Folks,

This kernel hack FIXed the SHDC / SHDX kernel issues on OpenSuSE 12.3 with class 6/10 cards Bigger then 16GB.
Myself have 64GB SD Cards from Kingson / Sandisk in use.

Bernhard made the raspberrypi-opensuse-20131206Image avalible :
http://www.zq1.de/bernhard/linux/opensuse/raspberrypi-opensuse-20131206x.img.xz

I Found an workaround : Installed the Debianbetta kernel on Open Suse 13.1 Raspberrry .
OpenSuSE RPI and debian RPI seems to use the SAME Kernel source repro at Current.

I got 3.8.13 ( rpi-update "next" BRANCH current ) /
3.9.3 ( selfcompiled ) running on the 20130407 Image

How HACK that kernel Update on you RPI:
( assume you have 3.6.11 as current i.e , but works for older as well - NO warranty - TEST KERNEL - ):

#----Simple Users Guide -----RPI-TEST-Desktop-Kernel---------

1- backup :
Code: Select all
 tar cpfj  /root/bootsuseold3611.tar.bz2 /boot


bevor we start , do:

Code: Select all
 
zypper update
zypper upgrade
reboot


2- Instal git, sudo, wget, 7z
Code: Select all
   zypper  install git-core sudo wget p7zip


3- Install the rpi-update script ( from GIt-HUB , RPI Linux, popcornmix and others )
Code: Select all
 wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update && sudo chmod +x /usr/bin/rpi-update



4- kernel Update to 3.11.x Latest ~ ( DEC 2013 ) ALPHA TEST KERNEL & Firmware
Code: Select all
BRANCH=next rpi-update

see at https://github.com/Hexxeh/rpi-firmware/ for latest Prebuild RPI Firmware.

Note - rpi-update
if rpi-update does not update - saing you have it allready -
then delete the repro copy at /root/.rpi-firmware just and run rpi-update again
Code: Select all
 rm -rf  /root/.rpi-firmware
 



5. reboot

6- "next" Kernel 3.11.x+ or newer - Have fun using your new kernel.

lb2:~ # uname -a
Linux app1 3.10.19+ #600 PREEMPT Sat Nov 16 20:34:43 GMT 2013 armv6l GNU/Linux

Note 08-May-2013 - BRANCH=next featgers
This test RPI Update 3.8.x have ´nd LCX , KRB5 , DLM , USBLP , SPI options at Current,
ipvs and aprd where added at 3.8.10 due my requests, thus nfsroot shuold work with rarp now.

Note IPVS & ipvsadm
ipvs been successfuly with an patched ipvsadm ( rasberian debian 1.26.-2 are incomplete patched )
an patched & precompiled RPI ipvsadm Tarball are droped to https://www.dropbox.com/sh/2pkbntk4enwt ... RPI-binary
reported gotten issues with ipvsadm to lvs-users mailing list.

Myself provide this Guide for selfhelp..
Someone ask me do delete this help .. sorry fellows - I don´t do that .

So many SD card Corruption and / or stabilty issues
with +16G issues with class 6/10 seen here past Weeks ,
and most Users ask for FIX or either an workarround.
Reinstall the OS all 3 weeks / manualy fsck on sutch cards may the wrong way.

AnyHow : DON´T Juge the PI for Software issues with RPI Firmware & Kernels.

#----Enhanced Users Guide --build own RPI kernel----RPI-Server-Kernel---------

7. Compile & Install your own Kernel +3.8.7 and up

- see http://elinux.org/RPi_Kernel_Compilation

- get and Install required Software to compile kernel:

Code: Select all
  zypper install   gcc  make  autoconf  automake  bison  flex  gettext  u-boot-tools ncurses-devel
 


- download attached config-3.8.7.ipvs+krb5+arpd.tar.bzip2 to /usr/src:

Code: Select all
cd /usr/src
wget http://www.raspberrypi.org/phpBB3/download/file.php?mode=view&id=3174&sid=960bc650c8639db17984e8c8de720450


.. use GIT or ZIP or whatever you like ...

- get RPI 3.8.y source as GIT clone from GitHUB and push the config

Code: Select all
cd /usr/src

cat  >git3.8.y-update.sh << EOF

#!/bin/sh

# Simple GIT fetch latest RPI "next" Kernel source tar ball script ..

cd /usr/src
if [ ! -d SOURCES ]; then
  mkdir SOURCES
fi
if [ ! -d GIT ]; then
        mkdir GIT
fi
cd GIT
        if [ -d .git ]; then
                rm -rf .git
                rm .gitignore .mailmap
        fi
git init

D=`date +"%m-%d-%Y"`

if [ -d rpi-3.8.y.$D ]; then
        rm -rf rpi-3.8.y.$D
fi
mkdir  rpi-3.8.y.$D
git fetch git://github.com/raspberrypi/linux.git rpi-3.8.y:refs/remotes/origin/rpi-3.8.y
git checkout rpi-3.8.y
cd /usr/src/GIT
mv ./* rpi-3.8.y.$D

tar cpfj /usr/src/SOURCES/rpi-3.8.y.$D.tar.bz2    rpi-3.8.y.$D
#
# EOF

chmod 755 git3.8.y-update.sh
./git3.8.y-update.sh

cd /usr/src
tar xpfj  SOURCES/rpi-3.8.y.$D.tar
rm linux
ln -s linux-rpi-3.8.y.$D linux


tar xpfj config-3.8.7.ipvs+krb5+arpd.tar.bzip2
cp linux/.config .config_386



- get RPI 3.8.y source as ZIP from GitHUB and push the config

Code: Select all
cd /usr/src; D=`date +"%m-%d-%Y"`
wget https://github.com/raspberrypi/linux/archive/rpi-3.8.y.zip
mv rpi-3.8.y.zip rpi.3.8.y.D.zip
7z x rpi-3.8.y.$D.zip 2>/dev/null
rm linux
ln -s linux-rpi-3.8.y linux

tar xpfj config-3.8.7.ipvs+krb5+arpd.tar.bzip2
cp linux/.config .config_386


#---EDIT3-22042013- updated patch instructions for 3.8.x --------------------------------
- Updated attached .config to my selfcompiled v3.8.7 kernel.
- KRB5 options enabled ( secure NFS with KRB requirement )
- ARPD / RAP options enabled ( Linux Virtual Server & NFS boot
- IP_VS options enabled. ( Linux Virtual Server requirement )
- CONFIG_FUSE_FS=m enabled ( fuse ZFS requirement )
- CONFIG_CIFS_SMB2=y enabled ( samba 4 requirement )
- CONFIG_SQUASHFS=m enabled
-CONFIG_SECURITY_SELINUX enabled.
- CONFIG_CRYPTO* CONFIG_XZ* and subfeatgers enabled

Notes & Issues :
- CONFIG_MMC_BCM2708=[m|y] failed to build - disabled , code bug
see https://github.com/raspberrypi/linux/issues/277

- CONFIG_BCM_VC_CMA=y , can´t build as Module anyhow.
see https://github.com/raspberrypi/linux/issues/277

-mfloat-abi=hard compiled kernel seems not work with any < 3.9.x <
see https://github.com/raspberrypi/linux/issues/276


- using-Class 6 and 10 SD cards seems Forbidd to use OverClocking allways
when use SDcards and often also USB-sticks devices.
It been reported as well when use external Terabyte USB 2.0 Disks as ROOT disks .
This will cause to Coorupt ANY Filesystem type on the used devices - verified.
Root cause seems : The used RPI SD card controler are overvolated and overfrequenced and go OUT of SPEC.

see i.e https://github.com/raspberrypi/linux/issues/280


- Adding LXC will one of my next targets -
seems require extra patches( i.e CONFIG_MMC_BCM2708 ) ,
if any Coder can help , send me an personal Note.

- rpi-3.8.y "next" seems updated to 3.8.12 so no extra Incremental Patching at current.
just wait for next :-)

#-------------------------------------------------------------------------
Make the kernel

Code: Select all
cd /usr/src/linux
make oldconfig
 nohup make \
 CPPFLAGS="-Ofast -mfpu=vfp -march=armv6zk -mtune=arm1176jzf-s" \
 CFLAGS="-Ofast -mfpu=vfp -march=armv6zk -mtune=arm1176jzf-s" \
 dep zImage modules &



go sleep :-) ######### … hours later ... i.e Next day if you compile on the PI Model B
install kernel same way as described here :
http://elinux.org/Talk:RPi_Kernel_Compi ... le_example

Code: Select all

cd /usr/src/linux
kversion=$(make -s kernelrelease)
echo $kversion

cp System.map /boot/System.map-$kversion
cp System.map /boot/System.map

make ARCH=arm modules_install INSTALL_MOD_PATH=/

make ARCH=arm INSTALL_PATH=/boot/ install 

cp .config /boot/config-$kversion
cp ./Module.symvers  /boot/symvers-$kversion
cp arch/arm/boot/Image /boot/kernel.img



if you want an compressed kernel : make ARCH=arm INSTALL_PATH=/boot/ zinstall

Check it :

ls -l /lib/modules/3.8.6-4-raspberrypi/
ls -l /boot/

Update please /boot/cmdline.txt and /boot/config.txt and /etc/sysctl.conf , uppon your own needs

lb2:/boot # cp cmdline.txt cmdline.txt.orig
lb2:/boot # cp config.txt config.txt.orig

vi /boot/cmdline.txt
Code: Select all
console=ttyAMA0,115200 kgdboc=ttyAMA0,115200  elevator=noop sdhci-bcm2708.missing_status=0 sdhci-bcm2708.sync_after_dma=0 profile=2 loglevel=7  console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 rootflags=commit=120,data=writeback rootwait ro



http://blogofterje.wordpress.com/2012/01/14/optimizing-fs-on-sd-card/
To further reduce IO and increase performance,
the following seem to be common recommendations, that he did:

Change /etc/fstab so that entry for root partition fourth parameter
is changed from “default” to “default,noatime,nodiratime”
Add linux boot parameter “elevator=noop” in u-boot so that the kernel does not
assume that the disk is a spinning medium and does not try to incorrectly optimize the IO.


The Important flags for SD(HC/HX) cards +16G ( i.e class 6 / 10 ) are the
elevator=noop
sdhci-bcm2708.missing_status=0
sdhci-bcm2708.sync_after_dma=0


This are the AFAIK default settings for some more :

dwc_otg.microframe_schedule=1
dwc_otg.fiq_fix_enable=1
sdhci-bcm2708.enable_llm=1
dwc_otg.lpm_enable=0


If it doesn't help, you can install the "watchdog"-package. Add the "bcm2708_wdog" module to /etc/modules (and invoke "modprobe bcm2708_wdog"), install the watchdog package and uncomment the line with "watchdog-device =" in it.


vi /etc/fstab
Code: Select all
...
/dev/mmcblk0p2  /               ext4    default,noatime,nodiratime  0       1
...


vi /boot/config.txt
Code: Select all
# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
disable_overscan=0

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

# WARNING for Class 6 & 10 cards ( any size, any vendor ) : DON`T  overclock
# see :
#  http://elinux.org/index.php?title=RPiconfig&section=14|SD#SD_Card_Usage_with_Overclocking
#

#uncomment to overclock the arm. 700 MHz is the default.
arm_freq=700

# for more options see http://elinux.org/RPi_config.txt
gpu_mem=32
core_freq=250
sdram_freq=400
over_voltage=0



vi /etc/sysctl.conf
Code: Select all
# /etc/sysctl.conf
# Generated file - do not edit.
# Disable the hung task timer by default. (bnc#552820)
kernel.hung_task_timeout_secs = 0

# Increase defaults for IPC (bnc#146656)
kernel.msgmax = 65536
kernel.msgmnb = 65536
kernel.sem = 250 256000 32 1024

# ipv4 , reed by cluster
net.ipv4.ip_forward = 1

# ipv6 disabled ( currently )
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.all.forwarding = 0



reboot if Ok all here

If failed , restore kernel from backup tar.

HAPPY KERNEL hacking !!

lsmod
Module Size Used by
spidev 5509 0
i2c_bcm2708 3613 0
spi_bcm2708 4722 0
rtl8150 9236 0
ip_vs 159069 0
nf_conntrack 83958 1 ip_vs
xfs 500984 0
dm_mod 73179 0


# uname -a
Linux ad1 3.11.4-1-raspberrypi #1 PREEMPT Fri Oct 11 00:02:13 UTC 2013 (f1558bf) armv6l armv6l armv6l GNU/Linux


cat /etc/SuSE-release
openSUSE 13.1 (armv6hl)
VERSION = 13.1
CODENAME = Bottle

------------------


Anyhow : This hack works on Debian weezly and Fedora remix 18 as well. :o

BUG reports for the TEST kernel please to : https://github.com/raspberrypi/linux/issues?state=open

Hope this helps.
Attachments
config-3.8.7.ipvs+krb5+arpd.tar.bz2
(19.39 KiB) Downloaded 779 times
Last edited by remsnet on Fri Dec 20, 2013 7:23 pm, edited 6 times in total.
Posts: 151
Joined: Wed Dec 19, 2012 7:32 pm
Location: Planet Gaia
by bmwiedemann » Tue Oct 29, 2013 9:26 am
note new image with openSUSE-13.1 and 3.6.11 kernel
http://www.zq1.de/bernhard/linux/opensu ... 029.img.xz
Posts: 3
Joined: Thu Oct 18, 2012 12:37 pm
by remsnet » Thu Dec 19, 2013 8:24 pm
bmwiedemann wrote:note new image with openSUSE-13.1 and 3.6.11 kernel
....


Good Job Bernhard .. i like your work.

.. fyi berndard published raspberrypi-opensuse-20131206x.img.xz

best regards
Posts: 151
Joined: Wed Dec 19, 2012 7:32 pm
Location: Planet Gaia