Raspberry Kernel Cross-Compile auf Debian ----------------------------------------- 1. Packete installieren - apt-get update - apt-get upgrade - apt-get dist-upgrade - apt-get install build-essential - apt-get install git - apt-get install bc - apt-get install gcc - apt-get install libncurses5-dev - apt-get install kernel-package - apt-get install dkms - apt-get -f install - apt-get install inputattach - apt-get install libtool - apt-get install autoconf 2. cd /home/tool 3. mkdir raspi 4. cd raspi 5. git clone https://github.com/raspberrypi/linux.git (1.5-2GB) 6. git clone https://github.com/raspberrypi/tools (1GB) 7. export CCPREFIX=/home/tool/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf- ${CCPREFIX}gcc -v 8. cd linux 9. config.gz vom raspi (/proc/config.gz) kopieren 10. gunzip -c config.gz > .config 11. ARCH=arm CROSS_COMPILE=${CCPREFIX} make oldconfig 12. grep -v DEBUG_INFO < .config > newconfig 13. mv newconfig .config 14. ARCH=arm CROSS_COMPILE=${CCPREFIX} make oldconfig 15. debug = y / reduce = n - ARCH=arm CROSS_COMPILE=${CCPREFIX} make menuconfig -> ELO Serial Touchscreen -> M 16. ARCH=arm CROSS_COMPILE=${CCPREFIX} make 17. ${CCPREFIX}gdb vmlinux 18. print init_uts_ns.name.release 19. ARCH=arm CROSS_COMPILE=${CCPREFIX} INSTALL_MOD_PATH=../modules make modules_install 20. cd /home/tool/raspi/tools/mkimage 21. ./imagetool-uncompressed.py ../../linux/arch/arm/boot/zImage 22. copy kernel.img from /home/tool/raspi/tools/mkimage 23. cd /home/tool/raspi/modules 24. tar czf modules.tgz * 25. kernel.img & modules.tgz auf raspi nach /home/pi/own_kernel kopieren auf dem raspi: 26. Raspi neues Image aufsetzen und Einstellungen in raspi-config vornehmen 27. Raspi updaten (sollte ev am Anfang gemacht werden -> Kernel version & .config Datei) - rpi-update - apt-get update - apt-get upgrade - apt-get dist-upgrade 28. mv /home/pi/own_kernel/3.12.29+/kernel.img /boot/ -> ev muss kernel.img gar nicht kopiert werden! 29. cd / 30. tar xzf /home/pi/own_kernel/3.12.29+/modules.tgz 31. /lib/udev/rules.d/99-elo-touchscreen.rules datei anlegen mit inhalt: SUBSYSTEM=="usb-serial", KERNEL=="ttyUSB0", \ RUN+="/sbin/modprobe elo", \ RUN+="/usr/bin/inputattach -elo /dev/ttyUSB0 --daemon" 32. apt-get install inputattach 33. reboot 34. touchscreen sollte nun gehen -> calibrieren 35. cd /home/pi 36. mkdir touch_cal 37. wget http://adafruit-download.s3.amazonaws.com/xinput-calibrator_0.7.5-1_armhf.deb 38. dpkg -i -B xinput-calibrator_0.7.5-1_armhf.deb 39. xinput_calibrator oder im einstellungsmenü -> ev. das erste mal falsch klicken, bis die cal neu startet -> config sollte so ähnlich aussehen: Section "InputClass" Identifier "calibration" MatchProduct "Elo Serial TouchScreen" Option "Calibration" "62 4065 4037 26" Option "SwapAxes" "1" EndSection 40. config nach /usr/share/X11/xorg.conf.d/99-calibration.conf 41. 99-fbturbo.conf unbenennen in 95-fbturbo.conf 42. reboot Raspberry säubern: - apt-get purge --auto-remove scratch - apt-get purge --auto-remove debian-reference-en dillo idle3 python3-tk idle python-pygame python-tk - apt-get purge --auto-remove python3 python3-minimal python3-numpy python-pifacecommon - apt-get purge --auto-remove python2.7-minimal python2.7 python-rpi.gpio python-minimal python - apt-get purge midori* - apt-get autoremove - apt-get purge 43. reboot 44. Touchscreen Rechte Maustaste bei langem drücken -> in /usr/share/X11/xorg.conf.d/99-calibration.conf Option "EmulateThirdButton" "1" Option "EmulateThirdButtonTimeout" "750" Option "EmulateThirdButtonThreshold" "30" hinzufügen. 45. reboot 46. Anleitung Browser Kiosk & hide mousecursur & custom Bootscreen 47. config.txt anpassen (auflösung) & cmdline.txt anpassen (boot log) 48. fertig :)