[Security Spotlight] Upgrade OpenSSL to 1.0.1g - Heartbleed Bug - Urgent!

So, thats no joke: OpenSSL broke badly!
Here is the background: http://heartbleed.com/

And as there is no zero-hour-fix for Ubuntu (including 12.04 LTS...), I decided to take chances and overwrite my existing OpenSSL 1.0.1 with the new code. It worked out flawlessly - but your system could *REALLY* break. Thats as dirty as it possibly could get!


wget http://www.openssl.org/source/openssl-1.0.1g.tar.gz
tar -xvzf openssl-1.0.1g.tar.gz
cd openssl-1.0.1g/
./config --prefix=/usr
sudo make
sudo make test
sudo make install

[RaspPi] OpenWRT Trunk with latest Raspberry Pi 3.10.32+ #648 Kernel – as Image download

As a lot of people asked for the OpenWRT / Raspberry Pi Images, I decided to make a new version which replaces the old one from this post ([RaspPi] OpenWRT Trunk with latest Raspberry Pi 3.10.18+ #585 Kernel – as Image download).

That said, the rules haven't changed:
- It is the trunk version of OpenWRT, injected with the latest Raspberry Pi Kernel
- opkg list does contain the current stable package list for the OpenWRT RPi port of the latest stable release and will work out of the box (opkg update, opkg install..) Most packages like apache should work out of the box – but kernel moduls could/will probably fail. I won’t build an package mirror and won’t build packages because of limitied time. Sorry!
- Other than the normal behavior, the RPi does use DHCP to get its IP Adress. To connect for the first time, use nmap to find your RPi in your network. (Then connect via telnet, set an password with passwd and you’re good to use SSH finally!)
- The main partition size has been changed from 48 MB to 64 MB – giving you additional space

You can just download and use the (7zip-ed) image here: rpi_openwrt_2.7z [ 6.1 MB ]

I WON'T BUILD PACKAGES!
This is for the fact that I neither got enough time, nor CPU power at hand.
Sorry :(!

[Ubuntu 12.04] Resolve Grub Boot Problems

If you killed your trusty grub (i.e. by new Install of Windows 8.. :/) you can repair it quite easily:
- Boot with an Ubuntu 12.04 Live CD
- CTRL + ALT + T
sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair

And click on the repair button! Done!

Source: http://askubuntu.com/questions/333483/how-to-restore-grub-after-deleting-it-from-windows-8-disk-manager

[RaspPi] OpenWRT Trunk with latest Raspberry Pi 3.10.18+ #585 Kernel - as Image download

THIS POST IS OUTDATED! A NEW IMAGE HAS BEEN POSTED! PLEASE USE THE SEARCH FUNCTION TO FIND THE LATEST VERSION!

As I found out that the old tutorials weren't helpful and either the OpenWRT Trunk OR the Raspberry Pi Kernel broke the build process (you can still build it successfully, but you won't be able to use the RPi after boot!) - I sat down and found an new way. This time I don't let the kernel build by the OpenWRT enviroment, but insert an healthy and prebuilt one by the RPi Team ;)!

You can just download and use the (7zip-ed) image here: rpi_openwrt.7z [ 6.1 MB ]

There are several changes to the normal version:
- opkg list does contain the current stable package list for the OpenWRT RPi port of the latest stable release and will work out of the box (opkg update, opkg install..) Most packages like apache should work out of the box - but kernel moduls could/will probably fail. I won't build an package mirror and won't build packages because of limitied time. Sorry!
- Other than the normal behavior, the RPi does use DHCP to get its IP Adress. To connect for the first time, use nmap to find your RPi in your network. (Then connect via telnet, set an password with passwd and you're good to use SSH finally!)
- The main partition size has been changed from 48 MB to 64 MB - giving you additional space

All the best,

Nico

[RaspPi] Build Raspberry Pi Kernel 3.10 / NEXT for Debian Wheezy / Raspbian with eGalax Touchscreen Support on Ubuntu 12.04

This is about building the latest Kernel / 3.10 for RPi. Bleeding Edge.
# Preperations
sudo apt-get install git libncurses5 libncurses5-dev qt4-dev-tools qt4-qmake pkg-config build-essential gcc-arm-linux-gnueabi bc
# NEEDS BC!!!!

# Clone Stuff
mkdir rpi_kernel_10
cd rpi_kernel_10
git clone https://github.com/raspberrypi/tools.git
git clone https://github.com/raspberrypi/linux.git
cd ~/rpi_kernel_10/linux/.git
git branch -a
cd ~/rpi_kernel_10/linux
git checkout -t -b rpi-3.10.y remotes/origin/rpi-3.10.y
git pull
cd ~/rpi_kernel_10
git clone https://github.com/raspberrypi/firmware.git
cd ~/rpi_kernel_10/firmware/.git
git branch -a
cd ~/rpi_kernel_10/firmware
git checkout -t -b next remotes/origin/next
git pull
cd ~/rpi_kernel_10

# Make Kernel
cd linux
make mrproper
mkdir ../kernel
# Kernel Types
# find . -name *bcmrpi*config -print
# ./arch/arm/configs/bcmrpi_emergency_defconfig
# ./arch/arm/configs/bcmrpi_defconfig
# ./arch/arm/configs/bcmrpi_cutdown_defconfig
make O=../kernel/ ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- bcmrpi_defconfig
make O=../kernel/ ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- menuconfig #xconfig
#Device Drivers->Input Device Support->TouchScreens->USB Touchscreen Driver (Build it into or as module, check if eGalax here!)
make O=../kernel/ ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- -k -j3
cd ../
cd tools/mkimage
./imagetool-uncompressed.py ../../kernel/arch/arm/boot/Image
cd ../../

# Make Modules
cd kernel
mkdir ../modules/
make modules_install ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- INSTALL_MOD_PATH=../modules/
# Install Kernel on existing RPi SD Card / Raspbian
# mount sdcard in your Ubuntu (I made an folder sdb1 for boot partiton and sdb2 for the root partition)
cd ~
mkdir sdb1 sdb2
mount /dev/sdb1 sdb1
mount /dev/sdb2 sdb2

# boot partition
#replace /sdb1/boot/bootcode.bin with rpi_kernel_10/firmware/boot/bootcode.bin
sudo rm ~/sdb1/bootcode.bin
cp ~/rpi_kernel_10/firmware/boot/bootcode.bin ~/sdb1/
#replace /sdb1/boot/kernel.img with the previously created kernel image
sudo rm ~/sdb1/kernel.img
cp ~/rpi_kernel_10/tools/mkimage/kernel.img ~/sdb1/
#replace /sdb1/boot/start.elf with rpi_kernel_10/firmware/boot/start.elf
sudo rm ~/sdb1/start.elf
cp ~/rpi_kernel_10/firmware/boot/start.elf ~/sdb1/

# root partition
#replace /sdb2/lib/firmware with <modules_builded_above_folder>/lib/firmware
sudo rm -rf ~/sdb2/lib/firmware/
sudo cp -a ~/rpi_kernel_10/modules/lib/firmware/ ~/sdb2/lib/
#replace /sdb2/lib/modules with <modules_builded_above_folder>/lib/modules
sudo rm -rf ~/sdb2/lib/modules/
sudo cp -a ~/rpi_kernel_10/modules/lib/modules/ ~/sdb2/lib/
#replace /sdb2/opt/vc with firmware-next/hardfp/opt/vc/
sudo rm -rf ~/sdb2/opt/vc
sudo cp -a ~/rpi_kernel_10/firmware/hardfp/opt/vc/ ~/sdb2/opt/

# sync usb mount
sync

# Unmount sdcard
cd ~
umount sdb1
umount sdb2
# Boot Pi and calibrate Touchscreen
# This stuff happens on the Pi!
# Preperations
sudo apt-get install libx11-dev libxext-dev libxi-dev x11proto-input-dev

# Install Tool / xinput_calibrator
cd ~
wget http://github.com/downloads/tias/xinput_calibrator/xinput_calibrator-0.7.5.tar.gz
tar -xvzf xinput_calibrator-0.7.5.tar.gz
cd xinput_calibrator-0.7.5
./configure
make
sudo make install

# Calibrate (in Xserver, so open Terminal while beeing in Graphical User Mode)
xinput_calibrator

It will give output like this:
Calibrating EVDEV driver for "eGalax Inc. USB TouchController" id=8
current calibration values (from XInput): min_x=1938, max_x=114 and min_y=1745, max_y=341

Doing dynamic recalibration:
Setting new calibration data: 121, 1917, 317, 1741
--> Making the calibration permanent <--
copy the snippet below into '/etc/X11/xorg.conf.d/99-calibration.conf'
Section "InputClass"
Identifier "calibration"
MatchProduct "eGalax Inc. USB TouchController"
Option "Calibration" "121 1917 317 1741"
Option "SwapAxes" "1"
EndSection

Use the Output after "--> Making the calibration permanent <--
copy the snippet below into '/etc/X11/xorg.conf.d/99-calibration.conf'"
And copy the part after that into following file:

sudo mkdir /etc/X11/xorg.conf.d
sudo vi /etc/X11/xorg.conf.d/01-input.conf

After that, save, exit and reboot.
That should conclude your newly "Custom baked Kernel" and your EGalax Touchscreen Support.

Thanks a lot to http://engineering-diy.blogspot.de/2013/01/adding-7inch-display-with-touchscreen.html

Raspberry Pi Kernel Compile


and http://karuppuswamy.com/wordpress/2013/01/17/how-to-get-evtouch-touch-screen-kit-working-in-linux/
from which I learnt and borrowed most of the stuff and tips and rewrote this How To with minor changes
Upgrade
cd linux
make mrproper
git pull
cd ../tools
git pull
cd ../firmware
git pull

[Ubuntu 12.04] EEE PC 1015 PN with Ubuntu 12.04 LTS

I could not help myself but felt the need to have at least one real "Dual Boot" system (not VMWare Stuff) - so I setup my Asus EEE PC 1015 PN with the Ubuntu 12.04 LTS according to mtrons excellent Tutorial ( https://sites.google.com/site/mtrons/howtos/eeepc-1015pn ) which worked out right out of the box.

But - as I haid some trouble with the old Broadcom Wifi/BT Card in Windows 7, I went for an Intel 6250 AGN/WiMax Card. I do not use WiMax and would love an BT option - but the price point of that card on ebay finally got me to press the "Buy now" button. I thought "Well, it is an Intel Card - that should work quite well and stop throwing me out of the University Wifi with no chance but doing an hard reboot of the Laptop to solve the problem" - yeah - it really did. BUT - somehow, after some time and updates to the Ubuntu System, I lost connectivity: Network Manager was nagging for the password all the time - without a reason. Finally I found the solution on this website: http://askubuntu.com/questions/104651/how-do-i-get-wireless-working-on-an-asus-notebook-u56e - with some changes.

From Kernel > 3.1 on, the wifi driver is not called iwlagn but iwlwifi, so your changes would go in that way:

sudo /etc/modprobe.d/iwl.conf

and add these options to the file. First does deactivate the not existing BT Module on the card, second does disable N networks, which could avoid other problems:

options iwlagn bt_coex_active=0
options iwlagn 11n_disable=1

Reboot and you are done

 

Another problem was the Optimus system: The Dual GPU Option of the system, packing an Intel GMA as well as an Nvidia ION Graphics on the board, with the choice of changing between both on the fly. That *did* work according to mtrons guide, BUT after an kernel upgrade - the acpi_call module did not work anymore - and with that the optimus tool. Help to that problem could be found here: http://hybrid-graphics-linux.tuxfamily.org/index.php?title=Acpi_call with the following changes:

cd /usr/src/acpi_call-1.1.1/
# got an newer version of acpi_call
sudo dkms add -m acpi_call -v 1.1.1
# did throw an error as the module already existed
sudo dkms build -m acpi_call -v 1.1.1
# rebuild the module
sudo dkms install -m acpi_call -v 1.1.1
# reinstalled it to the kernel
sudo modprobe acpi_call
# reload module
modinfo acpi_call
# show some infos

And thats it!

I am quite happy with the performance of Ubuntu on the system and I will keep it a while. I also tried the latest Debian, but was not that satisfied with it :/! So long!

[RaspPi] Build Raspberry Pi Kernel for Debian Wheezy / Raspbian with eGalax Touchscreen Support on Ubuntu 12.04

# Preperations
sudo apt-get install git libncurses5 libncurses5-dev qt4-dev-tools qt4-qmake pkg-config build-essential gcc-arm-linux-gnueabi bc

# Clone Stuff
mkdir rpi_kernel
cd rpi_kernel
git clone https://github.com/raspberrypi/tools.git
git clone https://github.com/raspberrypi/linux.git
git clone https://github.com/raspberrypi/firmware.git
cd ~/rpi_kernel/firmware/.git
git branch -a
cd ~/rpi_kernel/firmware
git checkout -t -b next remotes/origin/next
git pull
cd ~/rpi_kernel

# Make Kernel
cd linux
make mrproper
mkdir ../kernel
# Kernel Types
# find . -name *bcmrpi*config -print
# ./arch/arm/configs/bcmrpi_emergency_defconfig
# ./arch/arm/configs/bcmrpi_defconfig
# ./arch/arm/configs/bcmrpi_cutdown_defconfig
make O=../kernel/ ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- bcmrpi_defconfig
make O=../kernel/ ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- menuconfig #xconfig
#Device Drivers->Input Device Support->TouchScreens->USB Touchscreen Driver (Build it into or as module, check if eGalax here!)
make O=../kernel/ ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- -k -j3
cd ../
cd tools/mkimage
./imagetool-uncompressed.py ../../kernel/arch/arm/boot/Image
cd ../../

# Make Modules
cd kernel
mkdir ../modules/
make modules_install ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- INSTALL_MOD_PATH=../modules/
# Install Kernel on existing RPi SD Card / Raspbian
# mount sdcard in your Ubuntu (I made an folder sdb1 for boot partiton and sdb2 for the root partition)
cd ~
mkdir sdb1 sdb2
mount /dev/sdb1 sdb1
mount /dev/sdb2 sdb2

# backup config
cp ~/sdb1/config.txt ~/rpi_kernel/
# boot partition
sudo rm -rf ~/sdb1/*
# Copy all Files from boot
cp -R ~/rpi_kernel/firmware/boot/* ~/sdb1/
#replace /sdb1/boot/kernel.img with the previously created kernel image
sudo rm ~/sdb1/kernel.img
cp ~/rpi_kernel/tools/mkimage/kernel.img ~/sdb1/
# restore config
cp ~/rpi_kernel/config.txt ~/sdb1/

# root partition
#replace /sdb2/lib/firmware with <modules_builded_above_folder>/lib/firmware
sudo rm -rf ~/sdb2/lib/firmware/
sudo cp -R ~/rpi_kernel/modules/lib/firmware/ ~/sdb2/lib/
#replace /sdb2/lib/modules with <modules_builded_above_folder>/lib/modules
sudo rm -rf ~/sdb2/lib/modules/
sudo cp -R ~/rpi_kernel/modules/lib/modules/ ~/sdb2/lib/
#replace /sdb2/opt/vc with firmware-next/hardfp/opt/vc/
sudo rm -rf ~/sdb2/opt/vc
sudo cp -R ~/rpi_kernel/firmware/hardfp/opt/vc/ ~/sdb2/opt/

# sync usb mount
sync

# Unmount sdcard
cd ~
umount sdb1
umount sdb2
# Boot Pi and calibrate Touchscreen
# This stuff happens on the Pi!
# Preperations
sudo apt-get install libx11-dev libxext-dev libxi-dev x11proto-input-dev

# Install Tool / xinput_calibrator
cd ~
wget http://github.com/downloads/tias/xinput_calibrator/xinput_calibrator-0.7.5.tar.gz
tar -xvzf xinput_calibrator-0.7.5.tar.gz
cd xinput_calibrator-0.7.5
./configure
make
sudo make install

# Calibrate (in Xserver, so open Terminal while beeing in Graphical User Mode)
xinput_calibrator

It will give output like this:
Calibrating EVDEV driver for "eGalax Inc. USB TouchController" id=8
current calibration values (from XInput): min_x=1938, max_x=114 and min_y=1745, max_y=341

Doing dynamic recalibration:
Setting new calibration data: 121, 1917, 317, 1741
--> Making the calibration permanent <--
copy the snippet below into '/etc/X11/xorg.conf.d/99-calibration.conf'
Section "InputClass"
Identifier "calibration"
MatchProduct "eGalax Inc. USB TouchController"
Option "Calibration" "121 1917 317 1741"
Option "SwapAxes" "1"
EndSection

Use the Output after "--> Making the calibration permanent <--
copy the snippet below into '/etc/X11/xorg.conf.d/99-calibration.conf'"
And copy the part after that into following file:

sudo mkdir /etc/X11/xorg.conf.d
sudo vi /etc/X11/xorg.conf.d/01-input.conf

After that, save, exit and reboot.
That should conclude your newly "Custom baked Kernel" and your EGalax Touchscreen Support.

Thanks a lot to http://engineering-diy.blogspot.de/2013/01/adding-7inch-display-with-touchscreen.html

Raspberry Pi Kernel Compile


and http://karuppuswamy.com/wordpress/2013/01/17/how-to-get-evtouch-touch-screen-kit-working-in-linux/
from which I learnt and borrowed most of the stuff and tips and rewrote this How To with minor changes
Upgrade
cd linux
make mrproper
git pull
cd ../tools
git pull
cd ../firmware
git pull
# then make and build like shown above

Check hard/softfp version of OS
${CCPREFIX}gcc -v 2>&1 | grep hard