diff options
author | Nicolas Dechesne <nicolas.dechesne@linaro.org> | 2016-10-18 00:23:16 +0200 |
---|---|---|
committer | Nicolas Dechesne <nicolas.dechesne@linaro.org> | 2016-10-18 00:27:21 +0200 |
commit | 5469d39ada874b073e4ff27d12f7a77514427a77 (patch) | |
tree | 5fb741e7bd6712367bc35184ad72b321a5b7840c /stretch-armhf-developer | |
parent | ae4a7fd3ecdd9a0ffd0f0410d997f174b298e3ac (diff) |
stretch: add developer and installer images for armhf and arm64
Change-Id: Iecff9c437c83ce2267abea8eac2ccf56186723c9
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Diffstat (limited to 'stretch-armhf-developer')
18 files changed, 324 insertions, 0 deletions
diff --git a/stretch-armhf-developer/Makefile b/stretch-armhf-developer/Makefile new file mode 100755 index 0000000..f644f10 --- /dev/null +++ b/stretch-armhf-developer/Makefile @@ -0,0 +1,35 @@ +#!/bin/sh + +# (C) 2012-2015 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-stretch-developer +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) + if [ -f binary-tar.tar.gz ]; then \ + 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); \ + fi + +clean: + sudo lb clean --purge + rm -f $(BASEIMG)-* + rm -rf config diff --git a/stretch-armhf-developer/README b/stretch-armhf-developer/README new file mode 100644 index 0000000..917e1f3 --- /dev/null +++ b/stretch-armhf-developer/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/stretch-armhf-developer/configure b/stretch-armhf-developer/configure new file mode 100755 index 0000000..4240d04 --- /dev/null +++ b/stretch-armhf-developer/configure @@ -0,0 +1,42 @@ +#!/bin/sh + +# (C) 2012-2015 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-secure false \ + --architectures armhf \ + --archive-areas 'main contrib non-free' \ + --backports false \ + --binary-filesystem ext4 \ + --binary-images tar \ + --bootappend-live "hostname=linaro-developer 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 stretch \ + --gzip-options '-9 --rsyncable' \ + --iso-publisher 'Linaro; http://www.linaro.org/; linaro-dev@lists.linaro.org' \ + --iso-volume 'Linaro Stretch $(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/stretch-armhf-developer/customization/archives/linaro-overlay-repo.key.chroot b/stretch-armhf-developer/customization/archives/linaro-overlay-repo.key.chroot new file mode 100644 index 0000000..31f1900 --- /dev/null +++ b/stretch-armhf-developer/customization/archives/linaro-overlay-repo.key.chroot @@ -0,0 +1,18 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.12 (GNU/Linux) + +mQENBFFKYd4BCAD1znxWHazOdG+F4BSPXdT3OrX3bwScw7ZVpyY9v4kNJwpr/PSj +BICrpFPY0OkX7TjvtFAGTJF8YA0hnq5GFA2YVCRd1Xplz0zeS/ktMDEYEBA1B4Mk +1wzX1Kp7LyJEntYBtd9g0Ge3f8Z4DCOTG15RnEONYXtbqdZ6xHGwDJtxyzU+ZPaH +RfxGDdHlIKmCaV4W17zXoJOW7KIR1NwakfgBBUgPVH+i1iuIvtniKe6mAvAUDfmN +DOMaMgofzIshKkq1wncwBmW81eW9Mg+JzTZaa0XAah1anbdCMoCS91txG2O3Gj1z +OF1tY0WXYL9oPeBxDoN+KgKPyehKiSRwQ+0XABEBAAG0E0xpbmFybyByZXBvc2l0 +b3JpZXOJATgEEwECACIFAlFKYd4CGwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheA +AAoJEOE9iPfjwdVsqAoH/RGrCKW1b9jImsxVUqrBfHPekiFk44JiG04f46qY7u/l +ZiWgsayBcE9JInUQF7GWYVamgj55263mOZfsezxEtxr+KWz0ny6miyQH+51XpI74 +8+6ljExfnYR/Fdkiplcc+Fr5oGWBZXNmTedo0nYWl3aVsjCgl7/wMt/hwbx3J/aA +66/CmG2IMAEwbXdedrk+hiTNBjBaaKnkiqCX7fOstE1Ie0q7ro6d0nhkZezxVK1a +GSOsIE2xtTOPlVp9k3YmxVVisZIRjIcEJu6YnuBI2G4MaOh6RJTQpw9Hprr58Z6v +vzJBYZzXnLMl7RrXEw0NIYmPcEM6m5cphUlDpRBd8Tg= +=dkH9 +-----END PGP PUBLIC KEY BLOCK----- diff --git a/stretch-armhf-developer/customization/archives/linaro-overlay-repo.list.chroot b/stretch-armhf-developer/customization/archives/linaro-overlay-repo.list.chroot new file mode 100644 index 0000000..31c2b30 --- /dev/null +++ b/stretch-armhf-developer/customization/archives/linaro-overlay-repo.list.chroot @@ -0,0 +1,2 @@ +deb http://repo.linaro.org/ubuntu/linaro-overlay @DISTRIBUTION@ main +deb-src http://repo.linaro.org/ubuntu/linaro-overlay @DISTRIBUTION@ main diff --git a/stretch-armhf-developer/customization/hooks/01-setup_user_linaro.chroot b/stretch-armhf-developer/customization/hooks/01-setup_user_linaro.chroot new file mode 100755 index 0000000..9c65f97 --- /dev/null +++ b/stretch-armhf-developer/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/stretch-armhf-developer/customization/hooks/02-add_linaro_to_groups.chroot b/stretch-armhf-developer/customization/hooks/02-add_linaro_to_groups.chroot new file mode 100755 index 0000000..ad43cb7 --- /dev/null +++ b/stretch-armhf-developer/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/stretch-armhf-developer/customization/hooks/03-check_sudoers_for_admin.chroot b/stretch-armhf-developer/customization/hooks/03-check_sudoers_for_admin.chroot new file mode 100755 index 0000000..fe86124 --- /dev/null +++ b/stretch-armhf-developer/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/stretch-armhf-developer/customization/hooks/04-lava_test.chroot b/stretch-armhf-developer/customization/hooks/04-lava_test.chroot new file mode 100755 index 0000000..6113b2e --- /dev/null +++ b/stretch-armhf-developer/customization/hooks/04-lava_test.chroot @@ -0,0 +1,13 @@ +#!/bin/bash + +echo "I: run apt-get update" +apt-get update + +echo "I: install extra package" +apt-get install --yes build-essential git + +echo "I: install tests" +#nano_tests=(pwrmgmt gatortests perf device-tree) +#for nano_test in ${nano_tests[@]}; do +# echo "lava-test install ${nano_test}" +#done diff --git a/stretch-armhf-developer/customization/hooks/21-silence-systemd.chroot b/stretch-armhf-developer/customization/hooks/21-silence-systemd.chroot new file mode 100755 index 0000000..14849bc --- /dev/null +++ b/stretch-armhf-developer/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/stretch-armhf-developer/customization/hooks/98-resolvconf.binary b/stretch-armhf-developer/customization/hooks/98-resolvconf.binary new file mode 100755 index 0000000..f6a3898 --- /dev/null +++ b/stretch-armhf-developer/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/stretch-armhf-developer/customization/hooks/99-cleanup_proxy.binary b/stretch-armhf-developer/customization/hooks/99-cleanup_proxy.binary new file mode 100755 index 0000000..751faf5 --- /dev/null +++ b/stretch-armhf-developer/customization/hooks/99-cleanup_proxy.binary @@ -0,0 +1,5 @@ +#!/bin/sh + +echo "I: Clean up proxy" +sed -i "s|localhost:3142/||" ./binary/etc/apt/sources.list +sed -i "s|localhost:3142/||" ./binary/etc/apt/sources.list.d/*.list diff --git a/stretch-armhf-developer/customization/includes.chroot/etc/default/locale b/stretch-armhf-developer/customization/includes.chroot/etc/default/locale new file mode 100644 index 0000000..f9c983c --- /dev/null +++ b/stretch-armhf-developer/customization/includes.chroot/etc/default/locale @@ -0,0 +1 @@ +LANG=C.UTF-8 diff --git a/stretch-armhf-developer/customization/includes.chroot/etc/hostname b/stretch-armhf-developer/customization/includes.chroot/etc/hostname new file mode 100644 index 0000000..bafc623 --- /dev/null +++ b/stretch-armhf-developer/customization/includes.chroot/etc/hostname @@ -0,0 +1 @@ +linaro-developer diff --git a/stretch-armhf-developer/customization/includes.chroot/etc/hosts b/stretch-armhf-developer/customization/includes.chroot/etc/hosts new file mode 100644 index 0000000..135dd9d --- /dev/null +++ b/stretch-armhf-developer/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-developer diff --git a/stretch-armhf-developer/customization/includes.chroot/etc/kernel-img.conf b/stretch-armhf-developer/customization/includes.chroot/etc/kernel-img.conf new file mode 100644 index 0000000..d24d4df --- /dev/null +++ b/stretch-armhf-developer/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/stretch-armhf-developer/customization/includes.chroot/etc/rc.local b/stretch-armhf-developer/customization/includes.chroot/etc/rc.local new file mode 100755 index 0000000..bd2c208 --- /dev/null +++ b/stretch-armhf-developer/customization/includes.chroot/etc/rc.local @@ -0,0 +1,17 @@ +#!/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 +test -f /etc/ssh/ssh_host_dsa_key || dpkg-reconfigure openssh-server + +exit 0 diff --git a/stretch-armhf-developer/customization/package-lists/linaro.list.chroot b/stretch-armhf-developer/customization/package-lists/linaro.list.chroot new file mode 100644 index 0000000..d097627 --- /dev/null +++ b/stretch-armhf-developer/customization/package-lists/linaro.list.chroot @@ -0,0 +1,104 @@ +# Packages needed for Linaro - Developer +96boards-tools-common +acpi-support-base +adduser +alsa-utils +apt +apt-utils +babeltrace +bluez +btrfs-tools +build-essential +bzip2 +console-setup +cpufrequtils +crda +curl +debconf +debconf-i18n +debian-keyring +default-jre-headless +#devmem2 +dnsmasq-base +eject +evtest +fbset +file +gdb +gdbserver +gdisk +git +gnupg +hostapd +i2c-tools +idlestat +ifupdown +initramfs-tools +initscripts +input-utils +iotop +iperf +iproute2 +iptables +iputils-ping +isc-dhcp-client +iw +kbd +kmod +less +linaro-overlay-minimal +lm-sensors +lsb-release +lsof +#ltrace +makedev +mawk +module-init-tools +mountall +#mutrace +net-tools +netbase +netcat-openbsd +netperf +network-manager +ntpdate +obexftp +obexpushd +openssh-client +openssh-server +#oprofile +parted +powerdebug +powertop +procps +pulseaudio-module-bluetooth +python-libsoc +python-minimal +python-mraa +python-upm +python3 +resolvconf +rfkill +rsyslog +rt-app +ssh-import-id +strace +sudo +tee-supplicant +trace-cmd +#ubuntu-keyring +udev +unzip +#ureadahead +usbutils +user-setup +vim +vim-tiny +wget +whiptail +wireless-tools +wpasupplicant +xmms2-client-cli +xmms2-plugin-mad +xmms2-plugin-pulse +xmms2-plugin-vorbis |