Giter Site home page Giter Site logo

drtyhlpr / rpi23-gen-image Goto Github PK

View Code? Open in Web Editor NEW
306.0 29.0 122.0 622 KB

Advanced Debian "stretch" and "buster" bootstrap script for RPi 0/1/2/3 and QEMU

License: GNU General Public License v2.0

Shell 99.70% Yacc 0.30%
debian stretch raspberry raspberrypi bootstrap script armhf armv7 armv8 buster

rpi23-gen-image's People

Contributors

amanharitsh123 avatar bobberty avatar brainstone avatar burnbabyburn avatar cmjdiff avatar daniell1 avatar darktohka avatar denismosolov avatar dkraemer avatar drtyhlpr avatar felgru avatar fpytloun avatar g-vidal avatar jenskapitza avatar justin-friel avatar kelnos avatar mafgh avatar michalciolek avatar nicomanso avatar petterreinholdtsen avatar rfswarm avatar stevebrandli avatar stylesuxx avatar svamberg avatar tobix avatar tswaehn avatar vknecht avatar vonox avatar xtaran avatar youxiaojie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rpi23-gen-image's Issues

Bad depends for Stretch

Hi,

On build RELEASE=stretch ENABLE_MINBASE=true ENABLE_REDUCE=true ENABLE_MINGPU=true BUILD_KERNEL=true ENABLE_UBOOT=true I have:

`+ chroot_exec apt-get -q -y --force-yes --no-install-recommends install linux-compiler-gcc-4.8-arm g++ make bc

  • LANG=C LC_ALL=C DEBIAN_FRONTEND=noninteractive chroot /home/mati75/rpi2-gen-image/images/stretch/build/chroot apt-get -q -y --force-yes --no-install-recommends install linux-compiler-gcc-4.8-arm g++ make bc
    Reading package lists...
    Building dependency tree...
    E: Unable to locate package linux-compiler-gcc-4.8-arm
    E: Couldn't find any package by glob 'linux-compiler-gcc-4.8-arm'
    E: Couldn't find any package by regex 'linux-compiler-gcc-4.8-arm'
    `
    Package in stretch have name linux-compiler-gcc-5-arm.

Serial console problems

during testing I currently run into massive problems using the serial console. Hard to track the error down but I am almost sure it has todo with systemd.

Unable to locate package crossbuild-essential-armhf

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

  • RPI_MODEL=3
  • RPI2_DTB_FILE=bcm2709-rpi-2-b.dtb
  • RPI2_UBOOT_CONFIG=rpi_2_defconfig
  • RPI3_DTB_FILE=bcm2710-rpi-3-b.dtb
  • RPI3_UBOOT_CONFIG=rpi_3_32b_defconfig
  • RELEASE=jessie
  • KERNEL_ARCH=arm
  • RELEASE_ARCH=armhf
  • CROSS_COMPILE=arm-linux-gnueabihf-
  • COLLABORA_KERNEL=3.18.0-trunk-rpi2
  • KERNEL_DEFCONFIG=bcm2709_defconfig
  • KERNEL_IMAGE=kernel7.img
  • QEMU_BINARY=/usr/bin/qemu-arm-static
  • KERNEL_URL=https://github.com/raspberrypi/linux
  • FIRMWARE_URL=https://github.com/raspberrypi/firmware/raw/master/boot
  • WLAN_FIRMWARE_URL=https://github.com/RPi-Distro/firmware-nonfree/raw/master/brcm80211/brcm
  • COLLABORA_URL=https://repositories.collabora.co.uk/debian
  • FBTURBO_URL=https://github.com/ssvb/xf86-video-fbturbo.git
  • UBOOT_URL=git://git.denx.de/u-boot.git
  • pwd
  • BASEDIR=/home/alex/rpi23-gen-image/images/jessie
  • BUILDDIR=/home/alex/rpi23-gen-image/images/jessie/build
  • R=/home/alex/rpi23-gen-image/images/jessie/build/chroot
  • ETC_DIR=/home/alex/rpi23-gen-image/images/jessie/build/chroot/etc
  • LIB_DIR=/home/alex/rpi23-gen-image/images/jessie/build/chroot/lib
  • BOOT_DIR=/home/alex/rpi23-gen-image/images/jessie/build/chroot/boot/firmware
  • KERNEL_DIR=/home/alex/rpi23-gen-image/images/jessie/build/chroot/usr/src/linux
  • WLAN_FIRMWARE_DIR=/home/alex/rpi23-gen-image/images/jessie/build/chroot/lib/firmware/brcm
  • RPI_FIRMWARE_DIR=
  • HOSTNAME=rpi3-jessie
  • PASSWORD=raspberry
  • DEFLOCAL=en_US.UTF-8
  • TIMEZONE=Europe/Berlin
  • EXPANDROOT=true
  • XKB_MODEL=
  • XKB_LAYOUT=
  • XKB_VARIANT=
  • XKB_OPTIONS=
  • ENABLE_DHCP=true
  • NET_ADDRESS=
  • NET_GATEWAY=
  • NET_DNS_1=
  • NET_DNS_2=
  • NET_DNS_DOMAINS=
  • NET_NTP_1=
  • NET_NTP_2=
  • APT_PROXY=
  • APT_SERVER=ftp.debian.org
  • ENABLE_CONSOLE=true
  • ENABLE_IPV6=true
  • ENABLE_SSHD=true
  • ENABLE_NONFREE=false
  • ENABLE_WIRELESS=false
  • ENABLE_SOUND=true
  • ENABLE_DBUS=true
  • ENABLE_HWRANDOM=true
  • ENABLE_MINGPU=false
  • ENABLE_XORG=false
  • ENABLE_WM=
  • ENABLE_RSYSLOG=true
  • ENABLE_USER=true
  • USER_NAME=pi
  • ENABLE_ROOT=false
  • ENABLE_ROOT_SSH=false
  • ENABLE_MINBASE=false
  • ENABLE_REDUCE=false
  • ENABLE_UBOOT=false
  • ENABLE_FBTURBO=false
  • ENABLE_HARDNET=false
  • ENABLE_IPTABLES=false
  • ENABLE_SPLITFS=false
  • ENABLE_INITRAMFS=false
  • ENABLE_IFNAMES=true
  • BUILD_KERNEL=false
  • KERNEL_REDUCE=false
  • KERNEL_THREADS=1
  • KERNEL_HEADERS=true
  • KERNEL_MENUCONFIG=false
  • KERNEL_REMOVESRC=true
  • KERNELSRC_DIR=
  • KERNELSRC_CLEAN=false
  • KERNELSRC_CONFIG=true
  • KERNELSRC_PREBUILT=false
  • REDUCE_APT=true
  • REDUCE_DOC=true
  • REDUCE_MAN=true
  • REDUCE_VIM=false
  • REDUCE_BASH=false
  • REDUCE_HWDB=true
  • REDUCE_SSHD=true
  • REDUCE_LOCALE=true
  • ENABLE_CRYPTFS=false
  • CRYPTFS_PASSWORD=
  • CRYPTFS_MAPPING=secure
  • CRYPTFS_CIPHER=aes-xts-plain64:sha512
  • CRYPTFS_XTSKEYSIZE=512
  • DISABLE_FBI=false
  • CHROOT_SCRIPTS=
  • APT_INCLUDES=
  • APT_INCLUDES=,apt-transport-https,apt-utils,ca-certificates,debian-archive-keyring,dialog,sudo,systemd,sysvinit-utils
  • REQUIRED_PACKAGES=debootstrap debian-archive-keyring qemu-user-static binfmt-support dosfstools rsync bmap-tools whois git
  • MISSING_PACKAGES=
  • set +x
    dpkg-query: no packages found matching crossbuild-essential-armhf
    the following packages needed by this script are not installed:
    crossbuild-essential-armhf

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

No i2c dev available with the constructed image (device-tree problem)

Hi
I cannot set up /dev/i2c* devices in the raspberry with the image built with rpi2-gen-image... I have tried allt ricks I have found on the web with no effect and finally I asked the question on Rasberry forum and the engineer sends me back here with the following message : Raspberry Pi forum

The dtparam directive in config.txt constructs a device tree in memory, then passes its address to the kernel. If your kernel is u-boot then it is likely that the message isn't getting through. You'll have to ask the maintainers of your distribution what to do. If your u-boot is expecting the device-tree at 0x100 then you might be able to use:

`device_tree_address=0x100`

in config.txt. The correct technique is for u-boot to either specify the required DTB load address using a custom stub file or to read the actual load address from address 0xf8 (see raspberrypi/tools )

Device Tree is required when using our 4.4 kernels, so attempts to disable it will be ignored.

This comment is beyond my competencies, but I suppose that some other users may like to be able to use i2c bus on their raspberry , I hope this comment may help to solve the problem...

Thanks again for your work

sources.list and debootstrap disagree about syntax

If you run rpi2-gen-image.sh with APT_SERVER=ftp.au.debian.org (or whatever server), debootstrap will fail with unknown location ftp.debian.org/debian/dists/jessie/Release because it's expecting a 'http://' in front of the location.

However, later on the sources.list is generated from the same variable

# Set up initial sources.list
cat <<EOM >$R/etc/apt/sources.list
deb http://${APT_SERVER}/debian ${RELEASE} main contrib
#deb-src http://${APT_SERVER}/debian ${RELEASE} main contrib

So if you make APT_SERVER correct by adding a http in front of it, you'll end up with an invalid sources.list later

Raspbian and Raspberry ?

Is there a way to make the project compatible with Raspbian and Raspberry ?
Will Raspbian and Raspberry repository be or already are in the roadmap ?

Adding xf86-video-fbturbo support

the fbturbo driver is not available as Debian package. I am currently doing tests to let the script compile xf86-video-fbturbo in the chroot (like the ENABLE_UBOOT section). expect to have that parameter running next week.

Please enable non-free

I hate to ask this, but I use a wifi dongle with my Pi 2 and it needs non-free firmware, please enable it or give a choice (default=no) to enable non-free

thanks

Building other debian versions... is that possible ? And issue with language.

Hi,
Many thanks for this great work, I was wondering if it could be possible to build a debian "stretch" image or more conveniently a "testing" image. I have seen the progress with rpi3 I will get one shortly I can help with tests if you need.

I have also found a bug, the image building process crashes if I choose a different locale than "en_EN.utf8" I have found a hint using :
DEFLOCAL="fr_FR.utf8" ENABLE_MINBASE=true

I am unfornately not able to propose a clean patch (I'll try again if I can find some time but I am not a dev...)

Calculation of image size

When calculcating the image file size, something goes wrong.

For example: The build directory is 421612 bytes in size, but I get an image that is 1GB in size.
If I now plug that into the calculation for image size I get the following values

CHROOT_SIZE=$(expr 421612 / 1024 ) # = 411
IMAGE_SIZE=`expr $(expr 411 / 1024 + 1) * 1024` # = 1024
IMAGE_SECTORS=`expr $(expr 1024 * 1048576) / 512 - 133120` # = 1964032

OK, now this translates to a size limit for the root partition of IMAGE_SIZE - 64 = 960 MB

The steps in which the image "grows" is 1GB, so it is at least of size 1GB.

So this works for image builds where the chroot is below the size of 960MB in total (minus the rootfs).

Now if for example the size of the chroot is 999MB, the resulting image will still be max 1GB in size.
The first 64MB are used for the /boot partition, leaving 960MB for the rootfs, which in reality is 999MB - (size of the boot partition) which in my case is 22MB. This concludes that I am left with 977MB to write to a partition with 960MB, which results in a "no space left" IO error when copying the files.

My suggestions would be the following:

  • Add the 64MB used for /boot to the initial image size calculation
  • Only produce an image of the size that is actually needed

I will happily contribute this, if you tell me what you think about it.

Problems adding ENABLE_INITRAMFS=true parameter

I have problems enabling a initramfs. no matter if I use default raspberry bootloader or uboot. one way or another it always ends with mmc0/sdhci/ext4 write(?) errors - so the system is even bootable sometimes. maybe someone has an idea on how to fix this.

BUILD_KERNEL=true KERNELSRC_DIR=/tmp/linux ENABLE_MINBASE=true ./rpi2-gen-image.sh
...
apt-get -y install initramfs-utils
mkinitramfs -o /boot/firmware/initrd

(also tested with update-initramfs, custom cpio ramfs, hardcoded kernel i2c/spi/rnd)
(kernel initramfs support is enabled in default kernel config used)
(tested mount options inside custom busbox-cpio-initramfs - nope even with same mount options as in fstab... errors)

A - Add initramfs to default rpi bootloader (/boot/firmware/config.txt)

initramfs initrd followkernel
ramfsfile=initrd
ramfsaddr=-1

B - Add initramfs to uboot
(convert initrd to initrd.uboot - using mkimage -A arm -O linux -T ramdisk ...)

# Add initramfs to default uboot bootloader
# Set device tree file
setenv fdtfile bcm2709-rpi-2-b.dtb

# Tell Linux that it is booting on a Raspberry Pi2
setenv machid 0x00000c42

# Save these changes to u-boot's environment
saveenv

# Load the existing Linux kernel into RAM
fatload mmc 0:1 ${kernel_addr_r} kernel7.img
fatload mmc 0:1 ${fdt_addr_r} ${fdtfile}
fatload mmc 0:1 ${ramdisk_addr_r} initrd.uboot

# Boot the kernel we have just loaded
bootz ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}
(re-generate boot.scr mkimage -A arm -O linux -T script ...)

expect write (no read?) errors...mmc 0x900 and such..lead to ext4 etc.

ps. my sdcard(s) are fine and still work

pps. this initramfs support would be important for the next planned feature ENABLE_CRYPTOFS=luks parameters... also known as ENABLE_FBI=false :)

Upcoming Debian stretch support

I did first tests to support the Debian "stretch" release. You can try to create a bootable (but unstable) system using RELEASE=stretch parameter. Currently the init, systemd and systemd-sysv packages cause trouble with the "stretch" release.

I used RELEASE=stretch ENABLE_MINBASE=true APT_INCLUDES="systemd"
and added a simple apt-get install systemd-sysv at the end of the script.

So far no success on building (default) ENABLE_MINBASE=false "stretch" releases. Feel free to support.

Replace ENABLE_FLUXBOX with ENABLE_WM

ENABLE_WM should be used so the user can decide what X window manager to install. Requires a lot of testing: blackBox, openbox, fluxbox, jwm, dwm, awsome and other tiny window managers should be supported.

Packages required for bootstrapping are installed without further notice

Packages required for bootstrapping

REQUIRED_PACKAGES="debootstrap debian-archive-keyring qemu-user-static dosfstools rsync bmap-tools whois git-core"
apt-get -q -y install ${REQUIRED_PACKAGES}

${REQUIRED_PACKAGES} are currently forcefully installed (-y) - sorry about that - fixing soon - thought about getchar y/n fix...

[RPI_MODEL=2] It doesn't boot - 7 green blink

build-22431209.txt
Hi,
I've built the image yesterday evening whit the attached parameters, when I plug the power chord the rasp doesn't boot.
According whit this table[1], rasp is saying "kernel.img not found", but looking in the /boot mntpoint i see these files:

-rw-r--r-- 1 root root 17840 dic 28 2014 bootcode.bin
-rw-r--r-- 1 root root 192 set 12 23:01 cmdline.txt
-rw-r--r-- 1 root root 1311 set 12 23:01 config.txt
-rw-r--r-- 1 root root 2352 dic 28 2014 fixup_cd.dat
-rw-r--r-- 1 root root 6140 dic 28 2014 fixup.dat
-rw-r--r-- 1 root root 9188 dic 28 2014 fixup_x.dat
-rw-r--r-- 1 root root 3304216 set 12 23:01 kernel7.img
-rw-r--r-- 1 root root 550584 dic 28 2014 start_cd.elf
-rw-r--r-- 1 root root 2636696 dic 28 2014 start.elf
-rw-r--r-- 1 root root 3593672 dic 28 2014 start_x.elf

Following some information I hope can help you:

The host where I've built the image is a debian stretch:

debootstrap:all/testing 1.0.81 uptodate
debian-archive-keyring:all/testing 2014.3 uptodate
qemu-user-static:amd64/testing 1:2.6+dfsg-3 uptodate
binfmt-support:amd64/testing 2.1.6-1 uptodate
dosfstools:amd64/testing 4.0-2 uptodate
rsync:amd64/testing 3.1.1-3 uptodate
bmap-tools:all/testing 3.2-4 uptodate
whois:amd64/testing 5.2.12 uptodate
git:amd64/testing 1:2.9.3-1 uptodate

The card is a Raspberry Pi 2 B+ V 1.2 (2014)

My parameters:

script -c 'RPI_MODEL=2 ENABLE_CONSOLE=true ENABLE_DHCP=true APT_INCLUDES="firmware-linux-free,network-manager" TIMEZONE="Europe/Rome" XKB_LAYOUT="it" USER_NAME=pi ./rpi23-gen-image.sh'
./build-$(date +%H%M%d%m)

This seems not help, 7 green blink:

APT_INCLUDES="firmware-linux-free,firmware-linux-nonfree,firmware-brcm80211,firmware-realtek,network-manager"
ENABLE_NONFREE=true

This one not work, when I enable UBOOT rasp blink one green and then nothing:

ENABLE_UBOOT=true

To try out the SD and rasp integrity, after the rpi23-gen-image test I've flashed 2016-05-27-raspbian-jessie-lite.img in the same SD and it work.

[1] http://elinux.org/R-Pi_Troubleshooting#Green_LED_blinks_in_a_specific_pattern

Inject ssh keys

Hello

this is a request for improvement, could you add a setting to inject a ssh key for the root user?
I do it manually before "burning" the image to the sd.

thanks!

SOUND_ENABLE not fully working

1/2 The ENABLE_SOUND was not fully tested and alsa packages are missing - needs some testing - please give me some time.

2/2 The ENABLE_SOUND=false does not work - the snd modules are still loaded no matter if they are listed in the modules blacklist file. working on a fix.

Detached screen terminals get terminated when you log out

GNU Screen works in a weird way in the image generated using your script - detached screen terminals get terminated when you log out.

To test this, you need to connect to your Raspberry Pi 2 via SSH, and then do the following:

$ ssh $IP_ADDRESS
$ screen
# type in ctrl +d to detach your screen session
$ screen -r
# re-attachment works correctly
# type in ctrl +d to detach your screen session
$ exit # we are logging out from 
#let's log back in via SSH
ssh $IP_ADDRESS
$ screen -r
There is no screen to be resumed.

I have no idea how to fix this, apologies if I haven't explained myself properly. I have never encountered this problem before, I have no idea what to type in to Google in order to search for solutions.

This is how I generated my image:

APT_SERVER="http.debian.net" HOSTNAME="vanguard" PASSWORD="afvzsdcx" DEFLOCAL="en_GB.UTF-8" TIMEZONE="Europe/London" ENABLE_CONSOLE=true ENABLE_IPV6=true ENABLE_SSHD=true ENABLE_SOUND=false ENABLE_MINGPU=true ENABLE_DBUS=false ENABLE_XORG=false ENABLE_UBOOT=true ./rpi2-gen-image.sh

I had to install dbus after generating the image by running:

sudo apt-get install dbus

License inconsistencies

The file LICENSE includes GPL-3 while the header of rpi2-gen-image.sh mentions GPL-2 or later, like the original rpi2-build-image.sh from Ryan Finnie did.

Was it your intention to make use of the "or later" clause and switch to GPL-3 (or later)? Then I would change the header of rpi2-gen-image.sh accordingly. Otherwise you might replace LICENSE with the GPL-2 which you can get here.

Config to activate I2C on Raspberry PI3

Hi all,
In the image built with rpi23-gen-image I2C bus is not activated. To do so things have slightly changed from rpi2 situation. Two things must be done :

  1. enable the i2c modules by un commenting 2 lines in the /lib/modules-load.d/rpi2.conf file
# bcm2708_rng
snd_bcm2835
i2c-bcm2708
i2c-dev
# rtc-ds1307
  1. add the following lines to /boot/firmware/config.txt file
dtoverlay=i2c0-bcm2708
dtoverlay=i2c1-bcm2708

Then reboot and you'll get the wanted /dev/i2c-0 and /dev/i2c-1 devices; of course if you need just one bus activate only one line.

sudo i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- 18 -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: 60 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- 77                         

Best regards

Scripts work for raspi2 & raspi3 -> request for enhancements (please...)

Hi all,
This script works like a charm! The image produced can run identically on Raspi2 AND Raspi3.
For display manager and window manager I have tested lightdm and lxde (it works perfectly, tested in its minimalist form without background and lxde "goodies").
Thanks for enabling the non-free which permits to use much easily the wifi but some improvements will reduce the necessary initial manipulations (see below).
I used the following parameters to build my image among other more specific (name,login country, etc...):

APT_INCLUDES="firmware-linux-free,firmware-linux-nonfree,firmware-brcm80211,firmware-realtek,network-manager,network-manager-gnome,lxde" 
ENABLE_NONFREE=true 
ENABLE_WM="lightdm" 

Things that may help a lot :

  • When the non-free firmware packages are added, the raspi starts the wifi but unfortunately it cannot connect to it because it needs some config parameters that can be given when it has booted with the wire... It should be very interesting if such parameters could be passed through the script because in that case no need of a wired connection any more to start! For exemple it might be possible for network-manager users to provide a file from /etc/NetworkManager/system-connections or its contents
  • Unfortunately the driver of the raspi3 wifi is not available and the only way to get it I have found is to copy it from raspbian :-( see Raspberry forum

I think you'll need to lift /lib/firmware/brcm/* from a Raspbian card.
I've put a 7zipped version on Github at: DougieLawson

I do not know what will be the proper way to handle this but it is frustrating to se that the correct driver is there but it does not work and finally the only solution is to copy Raspbian's one ! (I spent too much time finding that even if the driver name was correct the content was not! :-( )

Thanks for this very usefull work, hope you may find some time to consider my proposals.

Best regards.

ARMHF ?

I apologize a lot for this question.

Nowhere I found the fact nor a hint to follow to fact that your version is based on armhf ...

Could you update readme.md for that ?

Generating Debian packages for kernel upgrades

I'm running the script regulary to compile new kernel images. It's not too much of a hassle to install the new images and modules by hand, however it is kind of slow and tedious. Generating Debian packages would make this step faster and more reliable. I reckon it to be a rather simple task to implement this functionality. If I successfully implement this, I will send an PR request. Unless of course somebody else does it first or points out that it is already done somewhere.

Custom dependencies

Hey,
thank you for your hard work, this is very close to what I am looking for.
Maybe I have missed it in the README, but is there a way to add custom packages during image build?
This are the use cases I am looking for:

  • Install custom dependencies during debootstrapping, I want to provide a list of packages from the official repository that are baked into the final image.
  • Install custom dependencies from an external reposiory, aka add a custom sources.list file and pull some packages from there.

Those two things should preferably happen through a config file and not by editing the script directly.

If this is not possible yet, but something you would like to see, let me know and I would happily contribute that functionality.

RPi3 with Stretch does not boot

The current stretch release does currently not boot on RPi3 (hangs after WLAN detection, no matter if firmware available or not). If you have ideas how to fix it - feel free to help

Wrong links in /lib/modules/$(uname -r)

The build and source links in /lib/modules/$(uname -r) have a destination that is on the build machine:

$ pwd
/lib/modules/4.4.6-rt14-v7+
$ ls -l build source 
lrwxrwxrwx 1 root root 82 Sep  7 16:07 build -> /home/simark/polarsys-os/rpi23-gen-image/images/stretch/build/chroot/usr/src/linux
lrwxrwxrwx 1 root root 82 Sep  7 16:07 source -> /home/simark/polarsys-os/rpi23-gen-image/images/stretch/build/chroot/usr/src/linux

As a result, it's not possible to build external kernel modules. The workaround is simply to make the links point at the right place.

In my setup, I use a kernel that I build myself beforehand (KERNELSRC_PREBUILT=true). I guess these links are installed by the make modules_install step? Perhaps it needs to be done from inside the chroot, or the links need to be fixed up afterwards?

Keyboard settings seems to not working with console-setup on RPI3

The script /bin/setupcon compare date (with test <cached_file> -ot <config_file>) to regenerate the cached files. My raspberry doesn't have a real clock. So the <config_file> is generated in 2014 and <cached_file> is newer.
(My solution or temporay hack is to remove cached files to force the regeneration in a custom script)
(I do not look at keyboard under X11)

Beta feature: configuration template files

The script and its parameters have grown quite big. I will try to find a simple way to implement configuration template (files) support. So you can simply write down the desired script command line parameter variables into a file and load that with "CONFIG_TEMPLATE=basic" parameter (detect if other params are used together with CONIFG_TEMPLATE and A: overwrite or B: deny execution with warning) or such...

Move initramfs

It appears that the initramfs is located in /boot rather than /boot/firmware. This means that I can't add modules that are needed during the boot process easily - I want to convert my rootfs to btrfs.

Dependencies missing

For using the scripts I had to install the following extra dependencies under Debian Jessie:

  • psmisc
  • build-essential (I guess for gcc and libc6-dev)
  • bc
  • dbus

Is it possible to add during the build a package that is not in the debian repositories ?

Hi,
I am using the Raspberry to share meteorological data from a weatherstation. I am using weewx software to get data from the WeatherStation and unfortunately, even if it is very active and opensource, the software is not in the debian repositories. A .deb package can be dowloaded from weewx site.
Would it be possible to include this deb file in the process of building the image to have it installed automatically (Maybe also usefull for other makers that may have "non-standard packages").

Thanks again, best regards

Dri2

Hi. Perfectly everything is compiled. But at start of kodi constantly I have libEGL warning error: DRI2: failed to authenticate. Tried ubunu mate, arch linux, raspbian and there I have no such mistakes.

Severe console lag

Successfully built for rpi3.
Gui works fluidly. No problems, but there is a severe lag in console activity. Both with keystroke input and with regular console activity such as executing a search within aptitude. The characters you type to search took a long time simply to show up after you type them.

Again, using aptitude as an example, it takes an inordinate amount of time to move from one highlighted file name to the next. but there is no lag in moving from one category to the next. Strange.

Also, it makes no difference whether the application is run from a terminal (within GUI) or from a console (tty2, etc...)

Is this a framebuffer issue> Has anyone encountered or solved this issue?

Running script in chroot

Hey,
I would like to run one or more script as last step of the image building process, or better said as the last step before the image is actually built.

Is this planned, or would you like to see this feature? If so, I am willing to contribute this functionality.

binfmt-support is required on stretch/sid

Your build host needs binfmt-support installed, or the kernel won't know what do with the armhf binaries.

Trivial change, but it's cost me half an hour of looking at it, never having done this before.

Ta.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.