Hot answers tagged

182

"rpikernelhack" is a fake package name and a directory name used as part of a hack (in the sense of a dirty but expedient solution to a problem) to work around the fact that the Raspberry Pi foundation decided to make /boot a fat32 partition and dpkg does not get on well with fat32. I was the one who initially came up with the idea, though it was refined ...


66

From this Raspberry Pi forum post [Edited to reflect loader.bin as an anachronism]: When the Raspberry Pi is first turned on, the ARM core is off, and the GPU core is on. At this point the SDRAM is disabled. The GPU starts executing the first stage bootloader, which is stored in ROM on the SoC. The first stage bootloader reads the SD card, and ...


49

It's just the directory name given by the developers who have created a Raspberry Pi specific set of patches to the Linux kernel. It is a fix by the Raspbian developers to fix a FAT file-system corruption issue present in the 2016 kernel, this updates to the 2017 kernel and is nothing to worry about. To make this kernel update you need to use sudo apt ...


25

Starting with the default configuration, or one you know works already, is a good idea. Beware that for the Pi 2, you should use: make bcm2709_defconfig Instead of bcmrpi_defconfig. Note that if you want to avoid clobbering an existing kernel install of the same version, set the General setup -> Local version - append to kernel release string to a unique ...


25

First of all, make sure you use the proper kernel headers. I assume that your kernel headers and source code are more updated than the kernel you're running. Try to do an apt-get update && apt-get upgrade then reinstall the module. If the problem persists, triple check that your kernel headers match your current kernel, recompile again then try to ...


22

I don't think you can change the default without recompiling the kernel. By that I mean, the one the kernel chooses when booted up. However, you can tell it to use a different governor while running, so if you want to effectively set the default without recompiling, you can add something to /etc/rc.local or some other start-up script. The /sys directory ...


15

My (unaltered) PI2B has a /boot/cmdline.txt of dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait There should only be one uncommented line. It is not like /boot/config.txt where you have entries on multiple lines. Line starting with # are ignored so if you want to change the line I ...


15

As it turns out several overlays can be loaded by adding multiple dtoverlay variables: In this case: dtoverlay=4dpi-3x dtoverlay=w1-gpio


14

sysfs has been deprecated and has been replaced with libgpiod. https://www.beyondlogic.org/an-introduction-to-chardev-gpio-and-libgpiod-on-the-raspberry-pi/ The interactions are with /dev/gpiochipx rather than /sys/class/gpio. The only obvious improvement (to me) is that GPIO events now have a time-stamp.


12

According to https://github.com/raspberrypi/noobs/blob/9127ef2ce9301c3c8bf91b5c2ef09af90bf00216/buildroot/.config User:pass = root:raspberry


11

Quick guess: You've upgraded the OS and the system has been up for a very long time, or managed to upgrade it without replacing the kernel, because the 4.4.11-v7+ modules have already been removed from Raspbian. If there is no such directory as /lib/modules/4.4.11-v7+ (look) you should run sudo apt update then sudo apt upgrade to ensure your kernel has been ...


10

Here is a link for that file I have uploaded it to dropbox. https://www.dropbox.com/s/g8u93xblz1v1ly0/kernel-qemu?dl=0 Also, it's been made available on github. Link --> https://github.com/dhruvvyas90/qemu-rpi-kernel


10

It might be interesting to know which version you are running, and if you happened to update packages recently. I encountered a similar error message on my raspberry pi2 after upgrading to raspbian testing today (from stretch). However I fear that it may be caused by a full range of different reasons. The more precise error message I got (from journalctl -...


9

The kernel expects two things: a root filesystem, and an init daemon that resides on it. The init included with raspbian is a sysV style system. You are not tied to that -- other init systems commonly used with linux (remember: the kernel is linux) are systemd and upstart -- but you do need an init system of some sort. You can also put init in an ...


9

"In normal circumstances there is NEVER a need to run rpi-update as it always gets you to the leading edge firmware and kernel and because that may be a testing version it could leave your RPi unbootable". https://www.raspberrypi.org/forums/viewtopic.php?p=916911#p916911 Even the rpi-update documentation now warns "Even on Raspbian you should only use this ...


8

I have never tried to do this no the RPi, but I have on the Arduino platform several times, and I have used something along the lines of this Arduino code. Note you will have to rewrite a function similar to this for whatever language you are using: unsigned long last_interrupt_time = 0; void my_interrupt_handler() { unsigned long interrupt_time = ...


8

Turns out the steps to recompile and load the rtlwifi module are correct. The problem is iwconfig not working to enable/determine monitoring mode in this situation. Instead, I used iw as outlined by Steven Gordon and it worked. To summarize: STEP 6b: List the physical network interfaces available $ iw dev STEP 7: Determine if the physical interface ...


8

to take advantages on the performance This begs the question that the people who put "an existing OS" together were not concerned about performance, or that you understand it better than them (in which case you would not be asking this kind of question -- I'm not trying to belittle you, just stating the obvious). If people approached their cars the way ...


8

kernel.img is 32-bit for BCM2835 (RPi1 & Zero) kernel7.img is 32-bit for BCM2836 (RPi2) and BCM2837 (RPi3) kernel7l.img is 32-bit for BCM2711 (RPi4) kernel8.img is 64-bit for BCM2837 (RPi3) or BCM2711 (RPi4)


7

For just getting started, I think you have the wrong concept of using embedded computers (especially at the Raspberry Pi level). If you really want to build a custom OS I suggest you start at Linux from Scratch, LFS, http://www.linuxfromscratch.org/ but if you want to understand embedded computing start by Googling "embedded systems", Wikipedia, or Embedded ...


7

Go to [ https://github.com/Hexxeh/rpi-firmware/commits/master ] and find the commit key for the version you want. Then use the following command will update to the last version. sudo rpi-update 81355451bcd9a214fdf221ca322b6ca681d8da55


7

Run the command sudo raspi-config and select the Expand Filesystem option. Then you should be good to go.


7

The package that provides the Wi-Fi firmware is called firmware-brcm80211. To downgrade this package to a version that works: sudo apt-get install firmware-brcm80211=0.43+rpi5 To prevent this package from being upgraded (either before an upgrade to stretch, or after downgrading the firmware): sudo apt-mark hold firmware-brcm80211


7

Yes; /proc/config.gz, if it exists, always refers to the running kernel's configuration (but see the last few paragraph below) since procfs, like sysfs and devtmpfs, which are used to implement the trees mounted at /proc, /sys, and /dev respectively are not on-disk storage or files at all in a conventional sense (depending what your "conventional" is). They'...


7

As of systemd 235-2 this still continues with the exact same error. For people landing here from google: If you see that after apt dist-upgrade that either udev, journald or even timesyncd are crashing, Until raspi-copies-and-fills, is updated, purging it like Emmanuel Thomé suggested is the only viable solution so far.


6

I'm not sure what "kernel processes" you are talking about. There is such a thing as kernel threads aka. kernel daemons (although there are fundamental similarities, in context do not confuse this with process "threads" generally, which exist in userspace). https://stackoverflow.com/questions/9481055/what-is-a-kernel-thread https://unix....


6

I want to modify the distro according to my needs. [...] What about the source for the actual distro? Is it all there? Am I insane? The distro has sources, but these are either the same as or slightly patched versions of the original sources -- a distro does not really contain any original software per se (discounting the package manager), it is just an ...


6

No and No. The Pi has no way of waking itself up apart from a hardware reset button, which can wake the Pi up from a halt state, i.e. it will reboot the Pi. You can modify the hardware and use switching regulators rather than the linear regulators that the Pi uses out of the factory for some more energy saving. Apart from that though, you won't get ...


6

You can do: sudo rpi-update hash with the hash being the kernel version from here: https://github.com/Hexxeh/rpi-firmware For example: sudo rpi-update ba43047bec24d5f0a4150f09a37884240f8926d2 would install 3.12.35


6

There is a much simpler version here, tested on jessie and stretch. sudo apt-get install raspberrypi-kernel-headers and then when your files are in place : make -C /lib/modules/$(uname -r)/build M=$(pwd) modules Example Create the hello directory, go inside and create the following files : hello.c and Makefile. I recommend working as your normal user,...


Only top voted, non community-wiki answers of a minimum length are eligible