Commit ae84077c authored by mntmn's avatar mntmn

create 2 images: rescue image and normal image

parent d21c78ce
......@@ -17,18 +17,36 @@ sudo ./mkuserland.sh
# chroot into the userland and build custom packages (mesa, xserver...)
sudo ./mkuserland2.sh
SIZE=9000M
#SIZE=2048M
# Rescue System ---------------------------------------------------------
# create ext4 partition from target root directory directly at 4MiB offset, 8192MiB (8GiB) image size
sudo /sbin/mke2fs -v -L 'MNTREFORM' -N 0 -O 64bit -E offset=4194304 -d target-userland -m 5 -r 1 -t ext4 reform-system.img $SIZE
SIZE=2048M
# create ext4 partition from target root directory directly at 4MiB offset
sudo /sbin/mke2fs -v -L 'MNTRESCUE' -N 0 -O 64bit -E offset=4194304 -d target-userland -m 5 -r 1 -t ext4 reform-system.img $SIZE
sudo /sbin/parted -s reform-system.img "mklabel msdos"
sudo /sbin/parted -s reform-system.img "mkpart primary ext4 4MiB -1s"
sudo /sbin/parted -s reform-system.img print
# mkuboot.sh needs to run before. this creates flash.bin.
# install u-boot for i.MX8M
# install u-boot for i.MX8MQ
sudo dd if=./u-boot/flash.bin of=reform-system.img conv=notrunc bs=1k seek=33
echo Reform Rescue System Image created: reform-rescue-system.img
# Full System -----------------------------------------------------------
# chroot into the userland and add extra applications
sudo ./mkuserland3.sh
SIZE=9000M
# create ext4 partition from target root directory directly at 4MiB offset
sudo /sbin/mke2fs -v -L 'MNTREFORM' -N 0 -O 64bit -E offset=4194304 -d target-userland -m 5 -r 1 -t ext4 reform-system.img $SIZE
sudo /sbin/parted -s reform-system.img "mklabel msdos"
sudo /sbin/parted -s reform-system.img "mkpart primary ext4 4MiB -1s"
sudo /sbin/parted -s reform-system.img print
# install u-boot for i.MX8MQ
sudo dd if=./u-boot/flash.bin of=reform-system.img conv=notrunc bs=1k seek=33
echo Reform system image created: reform-system.img
echo Reform Full System Image created: reform-system.img
......@@ -14,6 +14,11 @@ cp linux/arch/arm64/boot/dts/freescale/imx8mq-mnt-reform2.dtb target-userland/im
cp linux/arch/arm64/boot/dts/freescale/imx8mq-mnt-reform2-hdmi.dtb target-userland/imx8mq-mnt-reform2-dual-display.dtb
# default to single display (less flickery)
cp linux/arch/arm64/boot/dts/freescale/imx8mq-mnt-reform2.dtb target-userland/imx8mq-mnt-reform2.dtb
# provide a copy of u-boot for (re)flashing
mkdir -p target-userland/boot
cp ./u-boot/flash.bin target-userland/boot/
cp ./u-boot/flash-rescue.bin target-userland/boot/
cp ./u-boot/flash-rescue.sh target-userland/boot/
# default audio settings, or PCM will be muted
mkdir -p target-userland/var/lib/alsa
......@@ -34,7 +39,7 @@ cp $ETC/ld.so.conf target-userland/etc # or our libraries won't be picked up
cp $ETC/resolv.conf target-userland/etc
mkdir -p target-userland/etc/dhcp
cp $ETC/dhclient.conf target-userland/etc/dhcp
cp $ETC/motd target-userland/etc
cp $ETC/motd-rescue target-userland/etc # we start with the rescue system
cp $ETC/hostname target-userland/etc
cp $ETC/hosts target-userland/etc
cp $ETC/reform-* target-userland/etc
......@@ -54,6 +59,7 @@ export LANGUAGE=C
export LANG=C
echo "root:root" | chpasswd
passwd -d root # remove root password
# mount /proc if it doesn't exist
if [[ ! -e /proc/version ]]; then
......@@ -90,19 +96,6 @@ mv /default.conf /usr/share/pulseaudio/alsa-mixer/profile-sets/
mv /etc/reform-hw-setup.service /etc/systemd/system/
systemctl enable reform-hw-setup.service
# install applications
apt install -y libreoffice libreoffice-gtk3 inkscape firefox-esr emacs gimp wmaker
apt install -y chromium evolution freecad ardour sxiv neverball scummvm dosbox wf-recorder wev linphone-desktop
# install patched software from mntre
apt install -y kicad minetest libjsoncpp1 blender=2.79b+mntreform
# install a minimal gnome3
apt install -y --no-install-recommends gnome-control-center gnome-session
# install build dependencies
apt install -y 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 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 libsdl2-gfx-dev libsdl2-mixer-dev libsdl2-net-dev libsdl2-ttf-dev libsdl2-dev libsdl2-image-dev libflac-dev libmpg123-dev libpng-dev libmpeg2-4-dev
......
#!/bin/bash
#
# This script installs extra applications that are not included in the minimal rescue image.
#
set -e
ETC=./template-etc
SKEL=./template-skel
# populate /etc
cp $ETC/motd target-userland/etc
chroot target-userland /bin/bash <<EOF
export DEBIAN_FRONTEND=noninteractive
export DEBCONF_NONINTERACTIVE_SEEN=true
export LC_ALL=C
export LANGUAGE=C
export LANG=C
# install applications
apt install -y libreoffice libreoffice-gtk3 inkscape firefox-esr emacs gimp wmaker
apt install -y chromium evolution freecad ardour sxiv neverball scummvm dosbox wf-recorder wev linphone-desktop
# install patched software from mntre
apt install -y kicad minetest libjsoncpp1 blender=2.79b+mntreform
# install a minimal gnome3
apt install -y --no-install-recommends gnome-control-center gnome-session
EOF
                     [?25h[?1;5;2004lWelcome to Debian GNU/Linux
on MNT Reform
Rescue System Image: 2021-03-04
https://mntre.com/reform
https://www.debian.org
This is the Rescue System on eMMC flash (mmcblk0).
It is intended for repairs on your main system
on SD card (mmcblk1) or NVMe SSD.
If you don't need a Rescue System, you can
overwrite it with an OS of your choice.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment