aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md16
-rwxr-xr-xcreate_arm_img_urpmi.sh14
-rw-r--r--mageia4arm.cfg.template22
-rw-r--r--rpi/extlinux.conf4
-rw-r--r--rpi/mageia4arm.cfg.original56
-rw-r--r--rpi/second_stage_install.sh2
-rwxr-xr-xtools/install_graphical.sh29
-rwxr-xr-xtools/install_graphical.sh~27
-rwxr-xr-x[-rw-r--r--]tools/install_gstreamer.sh0
-rwxr-xr-x[-rw-r--r--]tools/install_video_driver.sh3
-rwxr-xr-xtools/install_video_driver.sh~26
-rwxr-xr-x[-rw-r--r--]tools/install_xfce.sh~ (renamed from tools/install_xfce.sh)0
12 files changed, 179 insertions, 20 deletions
diff --git a/README.md b/README.md
index 6f653c2..7b5d7f1 100644
--- a/README.md
+++ b/README.md
@@ -13,11 +13,16 @@ Aide:
create_arm_img_urpmi.sh -h|--help
Vous pouvez adapter le script "second_stage_install.sh"" afin de compléter l'installation.
-Des scprits sont disponibles dans le dossier "tools".
+Des scripts sont disponibles dans le dossier "tools", ils sont copié dans usr/local/bin/ dans l'image.
+
+Premier lancement de l'image sur le raspberry pi:
+. lancer drakkeyboard afin de configurer le clavier
+. si vous avez besoin d'un gestionnaire graphique, lancer le script:
+install_graphical.sh <gestionnaire-graphique>( xfce, lxqt, plasma, ...) voir les métapaquetages disponibles dans "Environnement graphique" dans le gestionnaire de logiciels.
-This repository contains script to make image for arm based systems from Mageia repositories.
+This repository contains script to make image for arm based systems from Mageia repositories.
Quick start:
@@ -29,4 +34,9 @@ Help:
create_arm_img_urpmi.sh -h|--help
you can adapt the script "second_stage_install.sh"" to complete the installation.
-Some scripts are available in directory "tools"
+Some scripts are available in directory "tools". they are copied in /usr/local/bin/ in the image.
+
+First launch of the image on raspberry pi:
+. launch drakkeyboard for configure keyboard layout.
+. if you need a graphical environment, launch the script :
+ install_graphical.sh <graphical environment> ( xfce, lxqt, plasma, ...), see "Graphical environment" in the Mageia application manager' meta packages.
diff --git a/create_arm_img_urpmi.sh b/create_arm_img_urpmi.sh
index 836905e..1b9274b 100755
--- a/create_arm_img_urpmi.sh
+++ b/create_arm_img_urpmi.sh
@@ -527,31 +527,32 @@ brcmfmac" >> "$BUILD_PATH"/etc/modules
info "making /boot/extlinux/extlinux.conf"
mkdir "$BUILD_PATH/boot/extlinux"
- sed -e s/\<UUID\>/$BOOT_UUID/g $SOURCE_PATH/$CONFIG_PATH/extlinux.conf >"$BUILD_PATH/boot/extlinux/extlinux.conf"
+ sed -e s/\<UUID\>/$ROOT_UUID/g $SOURCE_PATH/$CONFIG_PATH/extlinux.conf >"$BUILD_PATH/boot/extlinux/extlinux.conf"
info "copying firmware, overlays and dtb in /boot"
cp -a "$BUILD_PATH/usr/lib/linux-"* "$BOOT/dtb"
cp -a "$FIRMWARE_PATH/$FIRMWARE_DIR/boot/start"* "$BUILD_PATH/boot/"
cp -a "$FIRMWARE_PATH/$FIRMWARE_DIR/boot/fixup"* "$BUILD_PATH/boot/"
+ cp -a "$FIRMWARE_PATH/$FIRMWARE_DIR/boot/bootcode.bin"* "$BUILD_PATH/boot/"
cp -a "$FIRMWARE_PATH/$FIRMWARE_DIR/boot/overlays" "$BUILD_PATH/boot/"
info "copying u-boot binary to /boot"
case $TARGET_VERSION in
2)
info "copying u-boot for $TARGET 2"
- cp "$BUILD_PATH/usr/lib/u-boot/rpi_2/u-boot.bin" "$BUILD_PATH/boot/kernel7"
+ cp "$BUILD_PATH/usr/lib/u-boot/rpi_2/u-boot.bin" "$BUILD_PATH/boot/kernel7.img"
;;
0)
info "copying u-boot for $TARGET 0"
- cp "$BUILD_PATH/usr/lib/u-boot/rpi_0_w/u-boot.bin" "$BUILD_PATH/boot/kernel7"
+ cp "$BUILD_PATH/usr/lib/u-boot/rpi_0_w/u-boot.bin" "$BUILD_PATH/boot/kernel7.img"
;;
1)
info "copying u-boot for $TARGET 1"
- cp "$BUILD_PATH/usr/lib/u-boot/rpi/u-boot.bin" "$BUILD_PATH/boot/kernel7"
+ cp "$BUILD_PATH/usr/lib/u-boot/rpi/u-boot.bin" "$BUILD_PATH/boot/kernel7.img"
;;
3_32)
info "copying u-boot for $TARGET 3 32 bits"
- cp "$BUILD_PATH/usr/lib/u-boot/rpi_3_32b/u-boot.bin" "$BUILD_PATH/boot/kernel7"
+ cp "$BUILD_PATH/usr/lib/u-boot/rpi_3_32b/u-boot.bin" "$BUILD_PATH/boot/kernel7.img"
;;
esac
@@ -608,7 +609,8 @@ copyingcommon()
{
title "Copying common files and configuration"
rsync -aP "$SOURCE_PATH/common/" "$ROOT/"
-
+ rsync -aP "$SOURCE_PATH/tools/" "$ROOT/usr/local/bin/"
+ chown root:root "$ROOT/usr/local/bin/"
}
if [ $# == 0 ];then
diff --git a/mageia4arm.cfg.template b/mageia4arm.cfg.template
index 8db59e0..1aaafdd 100644
--- a/mageia4arm.cfg.template
+++ b/mageia4arm.cfg.template
@@ -14,18 +14,25 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# Mageia version 7 or later, cauldron.
+# TO MODIFY
+MAGEIA_VERSION=""
+# Arm version arm7hl, aarch64
+# TO MODIFY
+ARM_VERSION=""
-MAGEIA_VERSION="6"
-ARM_VERSION="armv7hl"
-
-#target plateform (xu3-4 or rpi)
-TARGET="odroid"
-TARGET_VERSION="4"
+# Target plateform (xu or rpi)
+# TO MODIFY
+TARGET=""
+# Target version (0,2,3 for raspi, 3or 4 for odroid)
+#TO MODIFY
+TARGET_VERSION=""
# URL of the Mageia mirror used to install ( see mirrors.mageia.org )
MIRROR="http://ftp.free.fr/mirrors/mageia.org/distrib/$MAGEIA_VERSION/$ARM_VERSION"
# image will be created here
+# TO MODIFY
INSTALL_PATH="/path/to/$TARGET"
# Build directory will be created here
@@ -38,7 +45,8 @@ IMAGE="Mageia-${MAGEIA_VERSION}-$TARGET.img"
BOOT="/mnt/boot"
ROOT="/mnt/root"
-#Default user
+# Default user
+# TO MODIFY
ID_USER="user login"
PASSWORD="user password"
diff --git a/rpi/extlinux.conf b/rpi/extlinux.conf
index 7f6b846..3226883 100644
--- a/rpi/extlinux.conf
+++ b/rpi/extlinux.conf
@@ -1,10 +1,10 @@
-menu autoboot Welcome to Mageia-Minimal.
+menu title Boot menu
timeout 20
default Mageia
label Mageia
kernel /vmlinuz
- append root=UUID=<UUID> dwc_otg.lpm_enable=0 console=ttyS0,115200 kgdboc=ttyS0,115200 console=tty1 rootwait fsck.repair=1 8250.nr_uarts=1 elevator=deadline cma=256M\@512M"
+ append root=UUID=78fa0462-5bcf-46ea-beb3-40cab8fe97c3 dwc_otg.lpm_enable=0 console=ttyS0,115200 kgdboc=ttyS0,115200 console=tty1 rootwait fsck.repair=1 8250.nr_uarts=1 elevator=deadline cma=256M\@512M audit=0
fdtdir /dtb/
initrd /initrd
diff --git a/rpi/mageia4arm.cfg.original b/rpi/mageia4arm.cfg.original
new file mode 100644
index 0000000..e1b78d9
--- /dev/null
+++ b/rpi/mageia4arm.cfg.original
@@ -0,0 +1,56 @@
+
+# Copyright (C) 2017-2018 Daniel Tartavel-jeannot <dtux@free.fr>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+MAGEIA_VERSION="7"
+ARM_VERSION="armv7hl"
+
+#target plateform (xu3-4 or rpi)
+TARGET="rpi"
+
+# URL of the Mageia mirror used to install ( see mirrors.mageia.org )
+MIRROR="http://ftp.free.fr/mirrors/mageia.org/distrib/$MAGEIA_VERSION/$ARM_VERSION"
+# image will be created here
+INSTALL_PATH="<change this>"
+
+# Build directory will be created here
+BUILD_PATH="$INSTALL_PATH/build"
+
+#name of the image
+IMAGE="Mageia-${MAGEIA_VERSION}-$TARGET.img"
+
+#Mount point of image's partitions
+#no need to be changed
+BOOT="/mnt/boot"
+ROOT="/mnt/root"
+
+#Default user
+ID_USER="pi"
+PASSWORD="raspberry"
+
+#root password
+ROOT_PWD="piroot"
+
+#Hostname
+HOSTNAME="$TARGET.$ID_USER"
+
+#Filesystem of boot partitions (default ext4 raspberry pi need vfat)
+#DO NOT CHANGE THIS
+BOOTFS="vfat"
+
+#Path where the raspberry pi firmware is/will be downloaded
+FIRMWARE_PATH="$INSTALL_PATH"
+FIRMWARE_DIR="firmware-stable"
diff --git a/rpi/second_stage_install.sh b/rpi/second_stage_install.sh
index a22a8fe..b337a92 100644
--- a/rpi/second_stage_install.sh
+++ b/rpi/second_stage_install.sh
@@ -23,7 +23,7 @@
#Install all packages you need
# No verifying rpm due to a bug in packages, some are not signed
-/usr/sbin/urpmi --auto --no-verify-rpm basesystem chrony rng-tools man openssh-server rfkill wireless-tools bluez wpa_supplicant make dracut u-boot rsync kernel-desktop-latest
+/usr/sbin/urpmi --auto --no-verify-rpm basesystem chrony rng-tools man openssh-server rfkill wireless-tools bluez wpa_supplicant make dracut u-boot rsync kernel-desktop-latest mlocate drakx-kbd-mouse-x11
/usr/bin/chown :chrony -R /etc/chrony.keys /var/log/chrony
diff --git a/tools/install_graphical.sh b/tools/install_graphical.sh
new file mode 100755
index 0000000..1423865
--- /dev/null
+++ b/tools/install_graphical.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+# Copyright (C) 2017-2018 Daniel Tartavel-jeannot <contact@librepc.com>
+#
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if [ "$1" = "" ];then
+ echo "syntax install_graphical.sh [xfce | lxde | lxqt | plasma | gnome] ( see task-* for all )"
+else
+ PATH="$(/bin/dirname "$(readlink -f "$0")")"
+ echo "installing Video drivers"
+ . $PATH/install_video_driver.sh
+ echo "installing gstremer"
+ . $PATH/install_gstreamer.sh
+ echo "installing task-$1"
+ /usr/sbin/urpmi --auto --no-verify-rpm task-$1
+fi
diff --git a/tools/install_graphical.sh~ b/tools/install_graphical.sh~
new file mode 100755
index 0000000..adba427
--- /dev/null
+++ b/tools/install_graphical.sh~
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+# Copyright (C) 2017-2018 Daniel Tartavel-jeannot <contact@librepc.com>
+#
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if [ "$1" = "" ];then
+ echo "syntax install_graphical.sh [xfce | lxde | lxqt | plasma | gnome] ( see task-* for all )"
+else
+ PATH="$(/bin/dirname "$(readlink -f "$0")")"
+ echo "Path="$PATH
+ . $PATH/install_video_driver.sh
+ . $PATH/install_gstreamer.sh
+ /usr/sbin/urpmi --auto --no-verify-rpm task-$1
+fi
diff --git a/tools/install_gstreamer.sh b/tools/install_gstreamer.sh
index 83880da..83880da 100644..100755
--- a/tools/install_gstreamer.sh
+++ b/tools/install_gstreamer.sh
diff --git a/tools/install_video_driver.sh b/tools/install_video_driver.sh
index dd81382..30c8354 100644..100755
--- a/tools/install_video_driver.sh
+++ b/tools/install_video_driver.sh
@@ -17,7 +17,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-/usr/sbin/urpmi --auto --no-verify-rpm x11-driver-video-fbdev
+/usr/sbin/urpmi --auto --no-verify-rpm x11-driver-video-fbdev xinit xclock xorg-x11 xorg-x11-75dpi-fonts drakconf
+
echo "#!/bin/sh
diff --git a/tools/install_video_driver.sh~ b/tools/install_video_driver.sh~
new file mode 100755
index 0000000..a0ba320
--- /dev/null
+++ b/tools/install_video_driver.sh~
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+# Copyright (C) 2017-2018 Daniel Tartavel-jeannot <contact@librepc.com>
+#
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+/usr/sbin/urpmi --auto --no-verify-rpm x11-driver-video-fbdev xinit xclock
+
+echo "#!/bin/sh
+
+# patch for display manager service which do not start automatically
+systemctl start display-manager.service &" >/etc/rc.d/rc.local
+/usr/bin/chmod a+x /etc/rc.d/rc.local
diff --git a/tools/install_xfce.sh b/tools/install_xfce.sh~
index 24118d0..24118d0 100644..100755
--- a/tools/install_xfce.sh
+++ b/tools/install_xfce.sh~