Big update
This commit is contained in:
parent
47e85a6d3a
commit
1169b7fc76
16
README.md
16
README.md
@ -13,12 +13,17 @@ Aide:
|
|||||||
create_arm_img_urpmi.sh -h|--help
|
create_arm_img_urpmi.sh -h|--help
|
||||||
|
|
||||||
Vous pouvez adapter le script "second_stage_install.sh"" afin de compléter l'installation.
|
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:
|
Quick start:
|
||||||
|
|
||||||
Choose the config dir you need (rpi or xu4), else create a new config directory with "mageia4arm.cfg.template"" in and modify it as you need.
|
Choose the config dir you need (rpi or xu4), else create a new config directory with "mageia4arm.cfg.template"" in and modify it as you need.
|
||||||
@ -29,4 +34,9 @@ Help:
|
|||||||
create_arm_img_urpmi.sh -h|--help
|
create_arm_img_urpmi.sh -h|--help
|
||||||
|
|
||||||
you can adapt the script "second_stage_install.sh"" to complete the installation.
|
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.
|
||||||
|
@ -527,31 +527,32 @@ brcmfmac" >> "$BUILD_PATH"/etc/modules
|
|||||||
|
|
||||||
info "making /boot/extlinux/extlinux.conf"
|
info "making /boot/extlinux/extlinux.conf"
|
||||||
mkdir "$BUILD_PATH/boot/extlinux"
|
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"
|
info "copying firmware, overlays and dtb in /boot"
|
||||||
cp -a "$BUILD_PATH/usr/lib/linux-"* "$BOOT/dtb"
|
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/start"* "$BUILD_PATH/boot/"
|
||||||
cp -a "$FIRMWARE_PATH/$FIRMWARE_DIR/boot/fixup"* "$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/"
|
cp -a "$FIRMWARE_PATH/$FIRMWARE_DIR/boot/overlays" "$BUILD_PATH/boot/"
|
||||||
|
|
||||||
info "copying u-boot binary to /boot"
|
info "copying u-boot binary to /boot"
|
||||||
case $TARGET_VERSION in
|
case $TARGET_VERSION in
|
||||||
2)
|
2)
|
||||||
info "copying u-boot for $TARGET 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)
|
0)
|
||||||
info "copying u-boot for $TARGET 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)
|
1)
|
||||||
info "copying u-boot for $TARGET 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)
|
3_32)
|
||||||
info "copying u-boot for $TARGET 3 32 bits"
|
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
|
esac
|
||||||
|
|
||||||
@ -608,7 +609,8 @@ copyingcommon()
|
|||||||
{
|
{
|
||||||
title "Copying common files and configuration"
|
title "Copying common files and configuration"
|
||||||
rsync -aP "$SOURCE_PATH/common/" "$ROOT/"
|
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
|
if [ $# == 0 ];then
|
||||||
|
@ -14,18 +14,25 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# 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"
|
# Target plateform (xu or rpi)
|
||||||
ARM_VERSION="armv7hl"
|
# TO MODIFY
|
||||||
|
TARGET=""
|
||||||
#target plateform (xu3-4 or rpi)
|
# Target version (0,2,3 for raspi, 3or 4 for odroid)
|
||||||
TARGET="odroid"
|
#TO MODIFY
|
||||||
TARGET_VERSION="4"
|
TARGET_VERSION=""
|
||||||
|
|
||||||
# URL of the Mageia mirror used to install ( see mirrors.mageia.org )
|
# 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"
|
MIRROR="http://ftp.free.fr/mirrors/mageia.org/distrib/$MAGEIA_VERSION/$ARM_VERSION"
|
||||||
|
|
||||||
# image will be created here
|
# image will be created here
|
||||||
|
# TO MODIFY
|
||||||
INSTALL_PATH="/path/to/$TARGET"
|
INSTALL_PATH="/path/to/$TARGET"
|
||||||
|
|
||||||
# Build directory will be created here
|
# Build directory will be created here
|
||||||
@ -38,7 +45,8 @@ IMAGE="Mageia-${MAGEIA_VERSION}-$TARGET.img"
|
|||||||
BOOT="/mnt/boot"
|
BOOT="/mnt/boot"
|
||||||
ROOT="/mnt/root"
|
ROOT="/mnt/root"
|
||||||
|
|
||||||
#Default user
|
# Default user
|
||||||
|
# TO MODIFY
|
||||||
ID_USER="user login"
|
ID_USER="user login"
|
||||||
PASSWORD="user password"
|
PASSWORD="user password"
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
menu autoboot Welcome to Mageia-Minimal.
|
menu title Boot menu
|
||||||
timeout 20
|
timeout 20
|
||||||
default Mageia
|
default Mageia
|
||||||
|
|
||||||
label Mageia
|
label Mageia
|
||||||
kernel /vmlinuz
|
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/
|
fdtdir /dtb/
|
||||||
initrd /initrd
|
initrd /initrd
|
||||||
|
|
||||||
|
56
rpi/mageia4arm.cfg.original
Normal file
56
rpi/mageia4arm.cfg.original
Normal file
@ -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"
|
@ -23,7 +23,7 @@
|
|||||||
#Install all packages you need
|
#Install all packages you need
|
||||||
# No verifying rpm due to a bug in packages, some are not signed
|
# 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
|
/usr/bin/chown :chrony -R /etc/chrony.keys /var/log/chrony
|
||||||
|
29
tools/install_graphical.sh
Executable file
29
tools/install_graphical.sh
Executable file
@ -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
|
27
tools/install_graphical.sh~
Executable file
27
tools/install_graphical.sh~
Executable file
@ -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
|
0
tools/install_gstreamer.sh
Normal file → Executable file
0
tools/install_gstreamer.sh
Normal file → Executable file
3
tools/install_video_driver.sh
Normal file → Executable file
3
tools/install_video_driver.sh
Normal file → Executable file
@ -17,7 +17,8 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# 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
|
echo "#!/bin/sh
|
||||||
|
|
||||||
|
26
tools/install_video_driver.sh~
Executable file
26
tools/install_video_driver.sh~
Executable file
@ -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
|
0
tools/install_xfce.sh → tools/install_xfce.sh~
Normal file → Executable file
0
tools/install_xfce.sh → tools/install_xfce.sh~
Normal file → Executable file
Reference in New Issue
Block a user