Browse Source

Merge pull request 'Reform2 Image Build on Stock Ubuntu 20.04' (#10) from zoe/reform-system-image:reform2-redo into reform2-redo

reform2-redo
Lukas F. Hartmann 2 months ago
parent
commit
ef6bae4def
5 changed files with 36 additions and 8 deletions
  1. +4
    -0
      reform2-imx8mq/.gitignore
  2. +5
    -0
      reform2-imx8mq/cleanup.sh
  3. +3
    -1
      reform2-imx8mq/mkimage.sh
  4. +23
    -6
      reform2-imx8mq/mkuserland.sh
  5. +1
    -1
      reform2-imx8mq/multistrap.conf

+ 4
- 0
reform2-imx8mq/.gitignore View File

@@ -4,3 +4,7 @@ linux-5.7-rc6
!linux-5.7-rc6/.config
!linux-5.7-rc6/arch/arm64/boot/dts/freescale/imx8mq-mnt-reform2.dts
!linux-5.7-rc6/arch/arm64/boot/dts/freescale/imx8mq.dtsi
linux/
target-userland/
u-boot/
reform-system.img

+ 5
- 0
reform2-imx8mq/cleanup.sh View File

@@ -1,5 +1,10 @@
#!/bin/bash

for d in dev proc sys
do
umount -f target-userland/$d || echo "Umounting $d failed"
done

rm -rf target-userland
rm reform-system.img


+ 3
- 1
reform2-imx8mq/mkimage.sh View File

@@ -3,7 +3,9 @@
set -x
set -e

sudo apt install parted multistrap udisks2 gcc-aarch64-linux-gnu make device-tree-compiler qemu-user-static binfmt-support
# make sure build tools are installed
# tested with bare Ubuntu 20.04 server
sudo apt-get -y install parted multistrap udisks2 gcc-aarch64-linux-gnu make device-tree-compiler qemu-user-static binfmt-support build-essential bison flex libssl-dev

# build the linux kernel
./mkkernel.sh


+ 23
- 6
reform2-imx8mq/mkuserland.sh View File

@@ -5,11 +5,24 @@
ETC=./template-etc
SKEL=./template-skel

rm -rf ./target-userland
mkdir ./target-userland
mbind() {
for d in dev proc sys
do
mount /$d target-userland/$d -o bind || echo "Bind-mounting /$d failed"
done
}

munbind() {
for d in dev proc sys
do
umount -f target-userland/$d || echo "Umounting $d failed"
done
}

set -e

[[ -e target-userland ]] && echo "WARNING: Target userland already exist" && munbind

# create debian userland
/usr/sbin/multistrap -d target-userland -f multistrap.conf

@@ -62,12 +75,14 @@ cp $ETC/eth.network target-userland/etc/systemd/network/
mkdir -p target-userland/var/lib/alsa
cp $ETC/asound.state target-userland/var/lib/alsa/

mknod target-userland/dev/random c 1 8
mknod target-userland/dev/urandom c 1 9

chown root:root -R target-userland/*
chown root:root -R target-userland
chown root:shadow target-userland/etc/shadow

mbind

#mknod target-userland/dev/random c 1 8
#mknod target-userland/dev/urandom c 1 9

chroot target-userland /bin/bash <<EOF
export DEBIAN_FRONTEND=noninteractive
export DEBCONF_NONINTERACTIVE_SEEN=true
@@ -90,3 +105,5 @@ EOF
mkdir -p target-userland/etc/pulseaudio
cp $ETC/daemon.conf target-userland/etc/pulse/

munbind


+ 1
- 1
reform2-imx8mq/multistrap.conf View File

@@ -10,7 +10,7 @@ cleanup=true
# TODO deb-src missing!

[Debian]
packages=adduser apt apt-utils apt-file bsdmainutils procps gpgv debian-archive-keyring readline-common gnupg cpio init-system-helpers cron manpages netbase groff-base iproute2 ifupdown isc-dhcp-common isc-dhcp-client iptables iputils-ping kmod locales less net-tools netcat-traditional nfacct traceroute curl wget whiptail openssh-server openssh-client nano vim wpasupplicant htop ncdu ntpdate ntp usbutils fbset screen tmux brightnessctl coreutils alsa-utils sudo ca-certificates parted file git ed console-setup console-data unicode-data kbd gpm pciutils cryptsetup unzip telnet busybox lm-sensors systemd libpam-systemd systemd-sysv bash-completion ncurses-term sway grim slurp xwayland xterm xfce4-terminal rofi kmscube ircii mesa-utils w3m man-db pulseaudio pavucontrol zlib1g-dev patch expat bison flex libunwind-dev libwayland-dev wayland-protocols libwayland-egl-backend-dev libx11-dev libx11-xcb-dev libxdamage-dev libxfixes-dev libxcb-dri3-dev libxcb-xfixes0-dev libxcb-sync-dev libxrandr-dev libxext-dev libxcb-glx0-dev libxcb-present-dev libxcb-dri2-0-dev gettext autopoint libpixman-1-dev libbsd-dev libxkbfile-dev libxcb-composite0-dev libxcb-xinput-dev libxcb-icccm4-dev libxfont-dev nettle-dev libdbus-1-dev libsystemd-dev libpciaccess-dev llvm-dev libudev-dev libmtdev-dev libevdev-dev libxshmfence-dev xutils-dev libdrm-dev libxxf86vm-dev meson gcc g++ python3-setuptools python3-mako xfonts-utils libepoxy-dev libjson-c-dev libpcre3-dev libpango1.0-dev libxkbcommon-dev libinput-dev autoconf make libtool intltool libxml2-dev libxfce4ui-2-dev libgarcon-1-dev xfce4-dev-tools arc-theme thunar gnome-disk-utility gnome-system-monitor policykit-1 dconf-editor eog evince mpv gedit engrampa connman-gtk gnome-icon-theme breeze-icon-theme fonts-noto-color-emoji libdbusmenu-gtk3-dev libfmt-dev libgirepository1.0-dev libgtkmm-3.0-dev libjsoncpp-dev libmpdclient-dev libnl-3-dev libnl-genl-3-dev libpulse-dev libsigc++-2.0-dev libspdlog-dev gobject-introspection python3-psutil lxpolkit libblockdev-dm2 libblockdev-crypto2
packages=adduser apt apt-utils apt-file bsdmainutils procps gpgv debian-archive-keyring readline-common gnupg cpio init-system-helpers cron manpages netbase groff-base iproute2 ifupdown isc-dhcp-common isc-dhcp-client iptables iputils-ping kmod locales less net-tools netcat-traditional nfacct traceroute curl wget whiptail openssh-server openssh-client nano vim wpasupplicant htop ncdu ntpdate ntp usbutils fbset screen tmux brightnessctl coreutils alsa-utils sudo ca-certificates parted file git ed console-setup console-data unicode-data kbd gpm pciutils cryptsetup unzip telnet busybox lm-sensors systemd libpam-systemd systemd-sysv bash-completion ncurses-term sway grim slurp xwayland xterm xfce4-terminal rofi ircii mesa-utils w3m man-db pulseaudio pavucontrol zlib1g-dev patch expat bison flex libunwind-dev libwayland-dev wayland-protocols libwayland-egl-backend-dev libx11-dev libx11-xcb-dev libxdamage-dev libxfixes-dev libxcb-dri3-dev libxcb-xfixes0-dev libxcb-sync-dev libxrandr-dev libxext-dev libxcb-glx0-dev libxcb-present-dev libxcb-dri2-0-dev gettext autopoint libpixman-1-dev libbsd-dev libxkbfile-dev libxcb-composite0-dev libxcb-xinput-dev libxcb-icccm4-dev libxfont-dev nettle-dev libdbus-1-dev libsystemd-dev libpciaccess-dev llvm-dev libudev-dev libmtdev-dev libevdev-dev libxshmfence-dev xutils-dev libdrm-dev libxxf86vm-dev meson gcc g++ python3-setuptools python3-mako xfonts-utils libepoxy-dev libjson-c-dev libpcre3-dev libpango1.0-dev libxkbcommon-dev libinput-dev autoconf make libtool intltool libxml2-dev libxfce4ui-2-dev libgarcon-1-dev xfce4-dev-tools arc-theme thunar gnome-disk-utility gnome-system-monitor policykit-1 dconf-editor eog evince mpv gedit engrampa connman-gtk gnome-icon-theme breeze-icon-theme fonts-noto-color-emoji libdbusmenu-gtk3-dev libfmt-dev libgirepository1.0-dev libgtkmm-3.0-dev libjsoncpp-dev libmpdclient-dev libnl-3-dev libnl-genl-3-dev libpulse-dev libsigc++-2.0-dev libspdlog-dev gobject-introspection python3-psutil lxpolkit libblockdev-dm2 libblockdev-crypto2
# libreoffice libreoffice-gtk3 inkscape firefox-esr emacs grafx2 milkytracker
source=http://http.debian.net/debian
keyring=debian-archive-keyring


Loading…
Cancel
Save