drtyhlpr / rpi23-gen-image

Advanced Debian "stretch" and "buster" bootstrap script for RPi 0/1/2/3 and QEMU
GNU General Public License v2.0
305 stars 122 forks source link

Unable to locate package crossbuild-essential-armhf #56

Closed Alexrocksdude closed 7 years ago

Alexrocksdude commented 7 years ago

Not sure what else I can add other than the output:

``alex@debian:~/rpi23-gen-image$ echo y | sudo RPI_MODEL=3 ./rpi23-gen-image.sh -e

RPi2/3 Bootstrap Settings

do you want to install the missing packages right now? [y/n] E: Unable to locate package crossbuild-essential-armhf``

shaardie commented 7 years ago

I have installed it under Debian Jessie using the following: https://wiki.debian.org/CrossToolchains#Installation

It also seems to be able to install it native in Debian Stretch https://packages.debian.org/stretch/crossbuild-essential-armhf

Maybe it can help...

drtyhlpr commented 7 years ago

hm sorry for the delay. if its still important: what host linux os are you using?

https://wiki.debian.org/CrossToolchains#For_jessie_.28Debian_8.29

denismosolov commented 7 years ago

I got a similar issue on Ubuntu 16.04. I replaced crossbuild-essential-armhf with gcc-arm-linux-gnueabihf and it's gone:

https://github.com/denismosolov/rpi2-gen-image/commit/f885521a0f43845b9c14e1424b136c8400f2123e

drtyhlpr commented 7 years ago

oh I wasn't even aware that this script able to run on a ubuntu build host hehe. I am just working on a patch to get it running on a "fresh installed" jessie and stretch with "standard system utilities" packages.

so if you @Alexrocksdude are using a Debian jessie build host you need to do the following:

echo "deb http://emdebian.org/tools/debian/ jessie main" > /etc/apt/sources.list.d/crosstools.list
sudo -u nobody wget -O - http://emdebian.org/tools/debian/emdebian-toolchain-archive.key | apt-key add -
dpkg --add-architecture armhf
apt-get update

ps. there is a "gcc-arm-none-eabi" in debian default packages so maybe it works without added the emdebian.org.

thanks for the patch @denismosolov but this only works on ubuntu. hm maybe I can add a debian/ubuntu detection in the script.

hm or I will just update the readme because I do not want to modify configuration files of the build system by the script. (auto installing software with confirmation: Ok, but patching apt sources and importing pgp keys (https is not available for this key lol) to the build OS should not be performed by an untrusted script.

quozl commented 7 years ago

i am reviewing prior to using rpi23-gen-image. i was about to try ubuntu, but will focus on debian first. i couldn't find build host specs in the readme.

denismosolov commented 7 years ago

@drtyhlpr we run the script with the patch on Debian Jessie (inside a Docker container). Here is the Dockerfile:

FROM debian:jessie
MAINTAINER Evgeny Golyshev <eugulixes@gmail.com>

ENV HOME /root

RUN echo  deb http://ftp.ru.debian.org/debian jessie main    > /etc/apt/sources.list \
 && echo  deb http://emdebian.org/tools/debian/ jessie main >> /etc/apt/sources.list \
 && echo "APT::Default-Release \"stable\";" > /etc/apt/apt.conf

RUN dpkg --add-architecture armhf

RUN apt-get clean && apt-get update && apt-get install -y \
    curl \
 && apt-get install -y --force-yes \
    git \
    libpq-dev \
    locales \
    python3 \
    python3-pip \
    supervisor \

    # Dependencies for rpi2-gen-image
    bc \
    binfmt-support \
    debootstrap \
    dosfstools \
    bmap-tools \
    gcc-arm-linux-gnueabihf \
    psmisc \
    qemu-user-static \
    sudo \
    whois \
 && apt-get clean \
 && rm -rf /var/lib/apt/lists/*

RUN mkdir $HOME/.ssh
COPY id_rsa $HOME/.ssh/id_rsa
COPY id_rsa.pub $HOME/.ssh/id_rsa.pub

RUN ssh-keyscan bitbucket.org > $HOME/.ssh/known_hosts \
 && cd \
 && pip3 install --upgrade pip \
 && git clone git@bitbucket.org:cusdeb/dominion.git \
 && cd dominion \
 && pip install -r requirements.txt \
 && python3 setup.py install

RUN mkdir /var/dominion \
 && cd /var/dominion \
 && git clone -b dominion https://github.com/denismosolov/rpi2-gen-image.git

VOLUME ["/var/dominion/workspace"]

COPY ./dominion/config/supervisord.conf /etc/supervisor/supervisord.conf
COPY ./dominion/run_dominion.sh /usr/bin/run_dominion.sh
COPY ./dominion/run_worker.sh /usr/bin/run_worker.sh

But I can also run the script with the path on my Ubuntu 16.04. Actually, we are trying to add a web UI to the script https://cusdeb.com/

drtyhlpr commented 7 years ago

wow gj :) maybe I can add a reference to it in the readme. I want to update the "Build dependencies" saying that the bootstrapping was tested on minimal jessie and stretch linux systems together with the crossbuild-essential-armhf toolchain. Building on other Linux build systems or using other compiler toolchains is of course possible too but was not tested.

the problem is my time - i dont have mutch of it currently. I even tought about adding support for other boards: Arietta G25 Aria G25 Acqua A5 Beaglebones even x86-arm64 why not ? :) (because the have a very up-to-date kernel-patch github). I decided not to do it because the constant testing and patching "little changes" I do not have continuesly have time for)

drtyhlpr commented 7 years ago

https://cusdeb.com/ nice idea and page !

some time ago there was a little hype on german it news pages: http://www.pibakery.org/ - looks nice but very colorfull - maybe you can get some inspiration. (never tested it)

ps. btw what realy makes this script unique (and one of the very very early reasons I created it) is the support of generated rootfs full encrypted images. I took me f$%!ing ages... special the auto-resizing. The next months I am planing to release further patches to: encrypt the ramfs, hide the dm-crypt keys ouside the ram (neon cpu registers). A "idea-research" topic is still "how to boot the encrypted device with a key or password" using a untrusted unencrypted initramfs environment (to be precise: you don't even know the source of your 1st stage bootloader :)). I had some ideas to store the checksummed bootpartition fs on an write protected external device, auto mounting/syncing it to ramfs on boot...(other ideas why not use network boot - dont know about cryptfs auth there) this will not prevent attacks (like keyloggers) on the cryptfs authentication but will make it as hard of possible without using the beloved TPM (and their vulns) :)

drtyhlpr commented 7 years ago

crossbuild-essential-armhf: information added to readme