Project Raspberry PI: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
(One intermediate revision by the same user not shown) | |||
Line 47: | Line 47: | ||
mkdir -p "$MODULES_TEMP" | mkdir -p "$MODULES_TEMP" | ||
make ARCH=arm CROSS_COMPILE=${CCPREFIX} INSTALL_MOD_PATH=${MODULES_TEMP} modules_install | make ARCH=arm CROSS_COMPILE=${CCPREFIX} INSTALL_MOD_PATH=${MODULES_TEMP} modules_install | ||
=== Kernel Config for Can === | |||
[*] Networking support ---> | |||
....<M> CAN bus subsystem support ---> | |||
........<M> Raw CAN Protocol (raw access with CAN-ID filtering) | |||
........<M> Broadcast Manager CAN Protocol (with content filtering) | |||
............CAN Device Drivers ---> | |||
................<M> Platform CAN drivers with Netlink support | |||
................[*] CAN bit-timing calculation | |||
................<M> Microchip MCP251x SPI CAN controllers | |||
................[*] CAN devices debugging messages | |||
....Device Drivers ---> | |||
........[*] SPI support ---> | |||
............<M> BCM2798 SPI controller driver (SPI0) | |||
............<M> User mode SPI driver support | |||
.......-*- GPIO Support ---> | |||
............[*] /sys/class/gpio/... (sysfs interface) | |||
== Serielle Konsole anschließen == | == Serielle Konsole anschließen == | ||
Line 66: | Line 84: | ||
screen /dev/ttyUSBx 115200 | screen /dev/ttyUSBx 115200 | ||
== Format SD Card with Standard Linux Tools == | |||
* Edit first line to match sd device name (find that with "sudo dmesg | o") | |||
* Edit second line to match your downloaded noobs zip image | |||
d=sd_ \ | |||
&& f=~/Downloads/NOOBS_v3_2_0.zip \ | |||
&& sudo mkdir -p /dev/shm/$d \ | |||
&& sudo dd if=/dev/zero of=/dev/$d bs=1M count=1 \ | |||
&& sudo /usr/sbin/parted /dev/$d mklabel msdos \ | |||
&& sudo /usr/sbin/parted /dev/$d mkpart p fat32 0% 100% \ | |||
&& while [ ! -f /dev/${d}1 ]; do sleep 1; done \ | |||
&& sudo mkfs.vfat -n 'NOOBS_3_2_0' /dev/${d}1 \ | |||
&& sudo mount /dev/${d}1 /dev/shm/${d}1 \ | |||
&& cd /dev/shm/${d}1 \ | |||
&& sudo unzip $f \ | |||
&& cd - \ | |||
&& sudo umount /dev/shm/${d}1 \ | |||
&& sudo rmdir /dev/shm/${d}1 |
Latest revision as of 09:04, 16 September 2019
Raspberry PI
Bezugsquellen
Kernel kompilieren
Die Infos kommen von [eLinux]. Dort ggf. nach Neuigkeiten suchen.
Das Zielverzeichnis braucht im Moment 6.1 GB. Dauer der Builds (ohne git Downloads):
- auf job1:/data3/rpi ca. 9 Minuten
- auf job4:/dev/shm/rpi ca. 5 Minuten
- auf dem Raspberry Pi ca 22 Stunden! Nicht selbst getestet ;)
export RPI_DIR=/data3/rpi mkdir -p "$RPI_DIR" cd "$RPI_DIR" git clone https://github.com/raspberrypi/linux export KERNEL_SOURCE="$RPI_DIR/linux" git clone https://github.com/raspberrypi/tools export CCPREFIX="$RPI_DIR/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-" git clone git://github.com/raspberrypi/firmware.git cd linux make mrproper cp -av arch/arm/configs/bcmrpi_defconfig .config make ARCH=arm CROSS_COMPILE=${CCPREFIX} olddefconfig cp -av .config ../bcmrpi_defconfig-plus-oldconfig-and-defaults sudo zypper install gtk3-devel sudo zypper install glib2-devel sudo zypper install libglade2-devel make ARCH=arm CROSS_COMPILE=${CCPREFIX} gconfig # LOCALVERSION=jb # LOCALVERSION_AUTO=Y make ARCH=arm CROSS_COMPILE=${CCPREFIX} -j9 make ARCH=arm CROSS_COMPILE=${CCPREFIX} modules export MODULES_TEMP="$RPI_DIR/modules-temp" mkdir -p "$MODULES_TEMP" make ARCH=arm CROSS_COMPILE=${CCPREFIX} INSTALL_MOD_PATH=${MODULES_TEMP} modules_install
Kernel Config for Can
[*] Networking support ---> ....<M> CAN bus subsystem support ---> ........<M> Raw CAN Protocol (raw access with CAN-ID filtering) ........<M> Broadcast Manager CAN Protocol (with content filtering) ............CAN Device Drivers ---> ................<M> Platform CAN drivers with Netlink support ................[*] CAN bit-timing calculation ................<M> Microchip MCP251x SPI CAN controllers ................[*] CAN devices debugging messages ....Device Drivers ---> ........[*] SPI support ---> ............<M> BCM2798 SPI controller driver (SPI0) ............<M> User mode SPI driver support .......-*- GPIO Support ---> ............[*] /sys/class/gpio/... (sysfs interface)
Serielle Konsole anschließen
Adafruit USB Seriell Konverter Kabel anschließen:
- Rot = 5V = GPIO Pin in der Platinenecke (nur wenn Strom nicht schon über USB Port kommt!)
- Schwarz = GND = übernächster Pin
- Weiß = TXD 3,3V = nächster Pin
- Grün = RXD 3,3V = nächster Pin
Siehe auch [Adafruits Lesson 5]
Auf Linux Seite dann USB einstecken und Terminalprogramm starten (x=0,1, ...)
minicom -b 115200 -o -D /dev/ttyUSBx
oder
screen /dev/ttyUSBx 115200
Format SD Card with Standard Linux Tools
- Edit first line to match sd device name (find that with "sudo dmesg | o")
- Edit second line to match your downloaded noobs zip image
d=sd_ \ && f=~/Downloads/NOOBS_v3_2_0.zip \ && sudo mkdir -p /dev/shm/$d \ && sudo dd if=/dev/zero of=/dev/$d bs=1M count=1 \ && sudo /usr/sbin/parted /dev/$d mklabel msdos \ && sudo /usr/sbin/parted /dev/$d mkpart p fat32 0% 100% \ && while [ ! -f /dev/${d}1 ]; do sleep 1; done \ && sudo mkfs.vfat -n 'NOOBS_3_2_0' /dev/${d}1 \ && sudo mount /dev/${d}1 /dev/shm/${d}1 \ && cd /dev/shm/${d}1 \ && sudo unzip $f \ && cd - \ && sudo umount /dev/shm/${d}1 \ && sudo rmdir /dev/shm/${d}1