TheSin- / rpi-img-builder

Scripts to create custom images for RaspberryPi
MIT License
107 stars 30 forks source link

E: Unable to locate package linux-image-armmp #34

Closed aostrouhhov closed 6 years ago

aostrouhhov commented 6 years ago

Trying to build Debian image based on armel for RPi 2: sudo make REPO=Debian DIST_ARCH=armel ARCH=armmp At some moment make crashes saying: E: Unable to locate package linux-image-armmp

After looking at Debian packages page I mentioned that there is really no linux-image-armmp package for armel architecture, only for armhf. What I did:

  1. Added multiarch=armhf armel line to multistrap.list.in
  2. Edited linux-image-__ARCH__ line in plugins/Debian/kernel/packages to linux-image-__ARCH__:armhf

After that I successfully built the image and flashed it via Etcher to MicroSD card. Tomorrow I will check if this image works on RPi2. In this case I can modify the script to work with armel based images and get linux kernel from packages for armhf.

TheSin- commented 6 years ago

drop ARCH=armmp

TheSin- commented 6 years ago

armel != armhf do not mix those bad things will happen.

aostrouhhov commented 6 years ago

drop ARCH=armmp

If I do, it will look for linux-image-armel, which also does not exist in Debian packages.

armel != armhf

In fact, I have one RPi 2 which has armel Debian distribution with soft-float ABI on it. But uname -a has the following words: Linux 4.1.7-v7+ armv7l GNU/Linux. As far as I understand, this is armel Debian distribution with armhf linux kernel.

TheSin- commented 6 years ago

that is because I believe it was removed with jessie, if you want true armel you'll never to set het dist to jessie IIRC. It's been a while I have an original CM that I used to have to build armel for, but I've updated to CM3 now so I haven't done it since stretch went stable.

either way feel free to do what you are doing but I won't be adding it as it's too risky, I could add it so when armel is used that it forces jessie though.

aostrouhhov commented 6 years ago

Tomorrow I will check if this image works on RPi2.

It does not work, only "rainbow screen".

So, does it mean that we cannot create armel based image with this script because there is just no suitable linux-image package?:cry:

aostrouhhov commented 6 years ago

Looks like I have found some easy workaround and it is not necessary to build your own kernel! But first of all:

armhf linux kernel

I believe this is not as simple and this statement can not be regarded as carrying a meaning.

My workaround:

  1. Repeat these steps from the first comment: Add multiarch=armhf armel line to multistrap.list.in Edit linux-image-__ARCH__ line in plugins/Debian/kernel/packages to linux-image-__ARCH__:armhf
  2. Build the image: sudo make REPO=Debian DIST_ARCH=armel ARCH=armmp
  3. Download Raspbian Stretch Lite
  4. Mount both Raspbian image and our recently built image
  5. Just copy all the files except (!) cmdline.txt from boot of Raspbian to boot of our image
  6. Now unmount our image and flash it to SD Card. Done!

Now we have working image of Debian Stretch with soft-float ABI!

aostrouhhov commented 6 years ago

I have found out that this solution will use FPU! But we still provide soft-float ABI though. It just means that calculations will perform faster than it would be with full-emulation.