diff options
author | Nicolas Dechesne <nicolas.dechesne@linaro.org> | 2017-09-04 17:19:37 +0200 |
---|---|---|
committer | Nicolas Dechesne <nicolas.dechesne@linaro.org> | 2017-09-05 11:15:41 +0200 |
commit | bab470d88e68fe2cc81f5e39c5b231b7bc93619d (patch) | |
tree | 0f216883f273ce6a48c50bab622d7078eafd53da /sid-armhf-blend | |
parent | 8328a94dc0f2ea3dcfeec7870f195f2cd145ad2f (diff) |
sid-{armhf,arm64}-*: add developer, alip, installer and blend for sid
Change-Id: I06ba689f121c13091fc2d148b86a1faa05381122
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Diffstat (limited to 'sid-armhf-blend')
16 files changed, 227 insertions, 0 deletions
diff --git a/sid-armhf-blend/Makefile b/sid-armhf-blend/Makefile new file mode 100755 index 0000000..090c241 --- /dev/null +++ b/sid-armhf-blend/Makefile @@ -0,0 +1,33 @@ +#!/bin/sh + +# (C) 2012-2016 Fathi Boudra <fathi.boudra@linaro.org> + +# Calls all necessary live-build programs in the correct order to complete +# the bootstrap, chroot, binary, and source stage. + +# You need live-build package installed and superuser privileges. + +BUILD_NUMBER?=1 +BASEIMG=linaro-sid-blend +IMAGEPREFIX=$(BASEIMG)-`date +%Y%m%d`-$(BUILD_NUMBER) +LOGFILE=$(IMAGEPREFIX).build-log.txt +CONFIGFILE=$(IMAGEPREFIX).config.tar.bz2 +LISTFILE=$(IMAGEPREFIX).contents +PKGSFILE=$(IMAGEPREFIX).packages +TARGZFILE=$(IMAGEPREFIX).tar.gz +MD5SUMSFILE=$(IMAGEPREFIX).md5sums.txt +SHA1SUMSFILE=$(IMAGEPREFIX).sha1sums.txt + +all: + set -e; sudo lb build 2>&1 | tee $(LOGFILE) + tar -jcf $(CONFIGFILE) auto/ config/ configure; + sudo mv binary.contents $(LISTFILE); + sudo mv chroot.packages.live $(PKGSFILE); + sudo mv binary-tar.tar.gz $(TARGZFILE); + md5sum $(LOGFILE) $(CONFIGFILE) $(LISTFILE) $(PKGSFILE) $(TARGZFILE) > $(MD5SUMSFILE); + sha1sum $(LOGFILE) $(CONFIGFILE) $(LISTFILE) $(PKGSFILE) $(TARGZFILE) > $(SHA1SUMSFILE); + +clean: + sudo lb clean --purge + rm -f $(BASEIMG)-* + rm -rf config diff --git a/sid-armhf-blend/README b/sid-armhf-blend/README new file mode 100644 index 0000000..917e1f3 --- /dev/null +++ b/sid-armhf-blend/README @@ -0,0 +1,16 @@ +* To build binary image: + * install live-build qemu-user-static + * run configure + * run make + +* Scripts: + * configure + * Makefile + +* Configuration Layout + +`-- ./config + +* Customization Layout + +`-- ./customization diff --git a/sid-armhf-blend/configure b/sid-armhf-blend/configure new file mode 100755 index 0000000..3508ad6 --- /dev/null +++ b/sid-armhf-blend/configure @@ -0,0 +1,43 @@ +#!/bin/sh + +# (C) 2012-2016 Fathi Boudra <fathi.boudra@linaro.org> + +# Create configuration for live-build. + +# You need live-build package installed. + +set -e + +echo "I: create configuration" +export LB_BOOTSTRAP_INCLUDE="apt-transport-https gnupg" +lb config \ + --apt-indices false \ + --apt-recommends false \ + --apt-secure false \ + --architectures armhf \ + --archive-areas 'main contrib non-free' \ + --backports false \ + --binary-filesystem ext4 \ + --binary-images tar \ + --bootappend-live "hostname=linaro-blend username=linaro" \ + --bootstrap-qemu-arch armhf \ + --bootstrap-qemu-static /usr/bin/qemu-arm-static \ + --cache false \ + --chroot-filesystem none \ + --compression gzip \ + --debootstrap-options "--variant=minbase --include=apt-transport-https,gnupg" \ + --distribution sid \ + --gzip-options '-9 --rsyncable' \ + --iso-publisher 'Linaro; http://www.linaro.org/; linaro-dev@lists.linaro.org' \ + --iso-volume 'Linaro Sid $(date +%Y%m%d-%H:%M)' \ + --linux-flavours none \ + --linux-packages none \ + --mode debian \ + --security true \ + --system normal \ + --updates true + +echo "I: copy customization" +test -d customization && cp -rf customization/* config/ + +echo "I: done" diff --git a/sid-armhf-blend/customization/hooks/01-setup_user_linaro.chroot b/sid-armhf-blend/customization/hooks/01-setup_user_linaro.chroot new file mode 100755 index 0000000..9c65f97 --- /dev/null +++ b/sid-armhf-blend/customization/hooks/01-setup_user_linaro.chroot @@ -0,0 +1,7 @@ +#!/bin/sh + +echo "I: create linaro user" +adduser --gecos linaro --disabled-login linaro + +echo "I: set linaro user password" +echo "linaro:linaro" | chpasswd diff --git a/sid-armhf-blend/customization/hooks/02-add_linaro_to_groups.chroot b/sid-armhf-blend/customization/hooks/02-add_linaro_to_groups.chroot new file mode 100755 index 0000000..ad43cb7 --- /dev/null +++ b/sid-armhf-blend/customization/hooks/02-add_linaro_to_groups.chroot @@ -0,0 +1,18 @@ +#!/bin/sh -x + +DEFGROUPS="adm,dialout,cdrom,audio,dip,video,plugdev,bluetooth,pulse-access,sudo,systemd-journal,netdev,staff" + +IFS=',' +for group in $DEFGROUPS; do + /bin/egrep -i "^$group" /etc/group + if [ $? -eq 0 ]; then + echo "Group '$group' exists in /etc/group" + else + echo "Group '$group' does not exists in /etc/group, creating" + groupadd $group + fi +done +unset IFS + +echo "I: add linaro to ($DEFGROUPS) groups" +usermod -a -G ${DEFGROUPS} linaro diff --git a/sid-armhf-blend/customization/hooks/03-check_sudoers_for_admin.chroot b/sid-armhf-blend/customization/hooks/03-check_sudoers_for_admin.chroot new file mode 100755 index 0000000..fe86124 --- /dev/null +++ b/sid-armhf-blend/customization/hooks/03-check_sudoers_for_admin.chroot @@ -0,0 +1,17 @@ +#!/bin/sh + +# check to make sure sudoers file has ref for the sudo group +SUDOEXISTS="$(awk '$1 == "%sudo" { print $1 }' /etc/sudoers)" +if [ -z "$SUDOEXISTS" ]; then + # append sudo entry to sudoers + echo "# Members of the sudo group may gain root privileges" >> /etc/sudoers + echo "%sudo ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers +fi + +# make sure that NOPASSWD is set for %sudo +# expecially in the case that we didn't add it to /etc/sudoers +# just blow the %sudo line away and force it to be NOPASSWD +sed -i -e ' +/\%sudo/ c \ +%sudo ALL=(ALL) NOPASSWD: ALL +' /etc/sudoers diff --git a/sid-armhf-blend/customization/hooks/21-silence-systemd.chroot b/sid-armhf-blend/customization/hooks/21-silence-systemd.chroot new file mode 100755 index 0000000..14849bc --- /dev/null +++ b/sid-armhf-blend/customization/hooks/21-silence-systemd.chroot @@ -0,0 +1,9 @@ +#!/bin/sh + +# Make systemd less spammy + +sed -i 's/#LogLevel=info/LogLevel=warning/' \ + /etc/systemd/system.conf + +sed -i 's/#LogTarget=journal-or-kmsg/LogTarget=journal/' \ + /etc/systemd/system.conf diff --git a/sid-armhf-blend/customization/hooks/22-disable-systemd-services.chroot b/sid-armhf-blend/customization/hooks/22-disable-systemd-services.chroot new file mode 100755 index 0000000..beced9a --- /dev/null +++ b/sid-armhf-blend/customization/hooks/22-disable-systemd-services.chroot @@ -0,0 +1,9 @@ +#!/bin/bash + +# workaround 90s delay +services=(NetworkManager systemd-networkd) +for service in ${services[@]}; do + systemctl mask ${service}-wait-online.service +done + +systemctl mask wpa_supplicant@ diff --git a/sid-armhf-blend/customization/hooks/98-resolvconf.binary b/sid-armhf-blend/customization/hooks/98-resolvconf.binary new file mode 100755 index 0000000..f6a3898 --- /dev/null +++ b/sid-armhf-blend/customization/hooks/98-resolvconf.binary @@ -0,0 +1,6 @@ +#!/bin/sh + +echo "I: Create /etc/resolv.conf link" +ln -sf /etc/resolvconf/run/resolv.conf binary/etc/resolv.conf +echo "I: Install fallback DNS to 8.8.8.8" +echo "nameserver 8.8.8.8" > binary/etc/resolvconf/resolv.conf.d/tail diff --git a/sid-armhf-blend/customization/includes.chroot/etc/default/locale b/sid-armhf-blend/customization/includes.chroot/etc/default/locale new file mode 100644 index 0000000..f9c983c --- /dev/null +++ b/sid-armhf-blend/customization/includes.chroot/etc/default/locale @@ -0,0 +1 @@ +LANG=C.UTF-8 diff --git a/sid-armhf-blend/customization/includes.chroot/etc/hostname b/sid-armhf-blend/customization/includes.chroot/etc/hostname new file mode 100644 index 0000000..f2a22a2 --- /dev/null +++ b/sid-armhf-blend/customization/includes.chroot/etc/hostname @@ -0,0 +1 @@ +linaro-blend diff --git a/sid-armhf-blend/customization/includes.chroot/etc/hosts b/sid-armhf-blend/customization/includes.chroot/etc/hosts new file mode 100644 index 0000000..af8efff --- /dev/null +++ b/sid-armhf-blend/customization/includes.chroot/etc/hosts @@ -0,0 +1,7 @@ +127.0.0.1 localhost +::1 localhost ip6-localhost ip6-loopback +fe00::0 ip6-localnet +ff00::0 ip6-mcastprefix +ff02::1 ip6-allnodes +ff02::2 ip6-allrouters +127.0.1.1 linaro-blend diff --git a/sid-armhf-blend/customization/includes.chroot/etc/kernel-img.conf b/sid-armhf-blend/customization/includes.chroot/etc/kernel-img.conf new file mode 100644 index 0000000..d24d4df --- /dev/null +++ b/sid-armhf-blend/customization/includes.chroot/etc/kernel-img.conf @@ -0,0 +1,6 @@ +# Kernel image management overrides +# See kernel-img.conf(5) for details +do_symlinks = yes +do_bootloader = no +do_initrd = yes +link_in_boot = yes diff --git a/sid-armhf-blend/customization/includes.chroot/etc/rc.local b/sid-armhf-blend/customization/includes.chroot/etc/rc.local new file mode 100755 index 0000000..39d1427 --- /dev/null +++ b/sid-armhf-blend/customization/includes.chroot/etc/rc.local @@ -0,0 +1,22 @@ +#!/bin/sh -e +# +# rc.local +# +# This script is executed at the end of each multiuser runlevel. +# Make sure that the script will "exit 0" on success or any other +# value on error. +# +# In order to enable or disable this script just change the execution +# bits. +# +# By default this script does nothing. + +# Generate the SSH keys if non-existent +if [ ! -f /etc/ssh/ssh_host_rsa_key ] +then + # else ssh service start in dpkg-reconfigure will fail + systemctl stop ssh.socket||true + dpkg-reconfigure openssh-server +fi + +exit 0 diff --git a/sid-armhf-blend/customization/package-lists/linaro.list.chroot b/sid-armhf-blend/customization/package-lists/linaro.list.chroot new file mode 100644 index 0000000..172e295 --- /dev/null +++ b/sid-armhf-blend/customization/package-lists/linaro.list.chroot @@ -0,0 +1,31 @@ +# Packages needed for Linaro - ALIP +build-essential +dbus-x11 +dhcpcd5 +dialog +file +gdb +gdisk +ifupdown +iputils-ping +kmod +libgl1-mesa-dri +locales +nano +net-tools +netbase +nfs-common +obconf +openbox +openssh-server +psmisc +python +resolvconf +systemd +systemd-sysv +valgrind +vim +weston +xdg-user-dirs-gtk +xfce4-terminal +xorg diff --git a/sid-armhf-blend/customization/preseed/dictionaries-common.cfg.chroot b/sid-armhf-blend/customization/preseed/dictionaries-common.cfg.chroot new file mode 100644 index 0000000..b86c980 --- /dev/null +++ b/sid-armhf-blend/customization/preseed/dictionaries-common.cfg.chroot @@ -0,0 +1 @@ +dictionaries-common dictionaries-common/default-wordlist select american (American English) |