Browse Source

Big update

Daniel Tartavel 3 years ago
parent
commit
1169b7fc76

+ 13 - 3
README.md

@@ -13,11 +13,16 @@ Aide:
13 13
 create_arm_img_urpmi.sh -h|--help
14 14
 
15 15
 Vous pouvez adapter le script "second_stage_install.sh"" afin de compléter l'installation.
16
-Des scprits sont disponibles dans le dossier "tools".
16
+Des scripts sont disponibles dans le dossier "tools", ils sont copié dans usr/local/bin/ dans l'image.
17
+
18
+Premier lancement de l'image sur le raspberry pi:
19
+. lancer drakkeyboard afin de configurer le clavier
20
+. si vous avez besoin d'un gestionnaire graphique, lancer le script:
21
+install_graphical.sh <gestionnaire-graphique>( xfce, lxqt, plasma, ...) voir les métapaquetages disponibles dans "Environnement graphique" dans le gestionnaire de logiciels.
17 22
 
18 23
 
19
-This repository contains script to make image for arm based systems from Mageia repositories.
20 24
 
25
+This repository contains script to make image for arm based systems from Mageia repositories.
21 26
 
22 27
 Quick start:
23 28
 
@@ -29,4 +34,9 @@ Help:
29 34
 create_arm_img_urpmi.sh -h|--help
30 35
 
31 36
 you can adapt the script "second_stage_install.sh"" to complete the installation.
32
-Some scripts are available in directory "tools"
37
+Some scripts are available in directory "tools". they are copied in /usr/local/bin/ in the image.
38
+
39
+First launch of the image on raspberry pi:
40
+. launch drakkeyboard for configure keyboard layout.
41
+. if you need a graphical environment, launch the script :
42
+  install_graphical.sh <graphical environment> ( xfce, lxqt, plasma, ...), see "Graphical environment" in the Mageia application manager' meta packages.

+ 8 - 6
create_arm_img_urpmi.sh

@@ -527,31 +527,32 @@ brcmfmac" >> "$BUILD_PATH"/etc/modules
527 527
 	
528 528
 			info "making /boot/extlinux/extlinux.conf"
529 529
 			mkdir "$BUILD_PATH/boot/extlinux"
530
-			sed -e s/\<UUID\>/$BOOT_UUID/g $SOURCE_PATH/$CONFIG_PATH/extlinux.conf >"$BUILD_PATH/boot/extlinux/extlinux.conf"
530
+			sed -e s/\<UUID\>/$ROOT_UUID/g $SOURCE_PATH/$CONFIG_PATH/extlinux.conf >"$BUILD_PATH/boot/extlinux/extlinux.conf"
531 531
 			
532 532
 			info "copying firmware, overlays and dtb in /boot"
533 533
 			cp -a "$BUILD_PATH/usr/lib/linux-"* "$BOOT/dtb"
534 534
 			cp -a "$FIRMWARE_PATH/$FIRMWARE_DIR/boot/start"* "$BUILD_PATH/boot/"
535 535
 			cp -a "$FIRMWARE_PATH/$FIRMWARE_DIR/boot/fixup"* "$BUILD_PATH/boot/"
536
+			cp -a "$FIRMWARE_PATH/$FIRMWARE_DIR/boot/bootcode.bin"* "$BUILD_PATH/boot/"
536 537
 			cp -a "$FIRMWARE_PATH/$FIRMWARE_DIR/boot/overlays" "$BUILD_PATH/boot/"
537 538
 			
538 539
 			info "copying u-boot binary to /boot"
539 540
 			case $TARGET_VERSION in
540 541
 				2)
541 542
 					info "copying u-boot for $TARGET 2"
542
-					cp "$BUILD_PATH/usr/lib/u-boot/rpi_2/u-boot.bin" "$BUILD_PATH/boot/kernel7"
543
+					cp "$BUILD_PATH/usr/lib/u-boot/rpi_2/u-boot.bin" "$BUILD_PATH/boot/kernel7.img"
543 544
 					;;
544 545
 				0)
545 546
 					info "copying u-boot for $TARGET 0"
546
-					cp "$BUILD_PATH/usr/lib/u-boot/rpi_0_w/u-boot.bin" "$BUILD_PATH/boot/kernel7"
547
+					cp "$BUILD_PATH/usr/lib/u-boot/rpi_0_w/u-boot.bin" "$BUILD_PATH/boot/kernel7.img"
547 548
 					;;
548 549
 				1)
549 550
 					info "copying u-boot for $TARGET 1"
550
-					cp "$BUILD_PATH/usr/lib/u-boot/rpi/u-boot.bin" "$BUILD_PATH/boot/kernel7"
551
+					cp "$BUILD_PATH/usr/lib/u-boot/rpi/u-boot.bin" "$BUILD_PATH/boot/kernel7.img"
551 552
 					;;
552 553
 				3_32)
553 554
 					info "copying u-boot for $TARGET 3 32 bits"
554
-					cp "$BUILD_PATH/usr/lib/u-boot/rpi_3_32b/u-boot.bin" "$BUILD_PATH/boot/kernel7"
555
+					cp "$BUILD_PATH/usr/lib/u-boot/rpi_3_32b/u-boot.bin" "$BUILD_PATH/boot/kernel7.img"
555 556
 					;;
556 557
 			esac
557 558
 				
@@ -608,7 +609,8 @@ copyingcommon()
608 609
 {
609 610
 	title "Copying common files and configuration"
610 611
 	rsync -aP "$SOURCE_PATH/common/" "$ROOT/"
611
-
612
+	rsync -aP "$SOURCE_PATH/tools/" "$ROOT/usr/local/bin/"
613
+	chown root:root "$ROOT/usr/local/bin/"
612 614
 }
613 615
 
614 616
 if [ $# == 0 ];then

+ 15 - 7
mageia4arm.cfg.template

@@ -14,18 +14,25 @@
14 14
 # You should have received a copy of the GNU General Public License
15 15
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16 16
 
17
+# Mageia version 7 or later, cauldron.
18
+# TO MODIFY
19
+MAGEIA_VERSION=""
20
+# Arm version arm7hl, aarch64
21
+# TO MODIFY
22
+ARM_VERSION=""
17 23
 
18
-MAGEIA_VERSION="6"
19
-ARM_VERSION="armv7hl"
20
-
21
-#target plateform (xu3-4 or rpi)
22
-TARGET="odroid" 
23
-TARGET_VERSION="4"
24
+# Target plateform (xu or rpi)
25
+# TO MODIFY
26
+TARGET=""
27
+# Target version (0,2,3 for raspi, 3or 4 for odroid)
28
+#TO MODIFY
29
+TARGET_VERSION=""
24 30
 
25 31
 # URL of the Mageia mirror used to install ( see mirrors.mageia.org )
26 32
 MIRROR="http://ftp.free.fr/mirrors/mageia.org/distrib/$MAGEIA_VERSION/$ARM_VERSION"
27 33
 
28 34
 # image will be created here
35
+# TO MODIFY
29 36
 INSTALL_PATH="/path/to/$TARGET"
30 37
 
31 38
 # Build directory will be created here
@@ -38,7 +45,8 @@ IMAGE="Mageia-${MAGEIA_VERSION}-$TARGET.img"
38 45
 BOOT="/mnt/boot"
39 46
 ROOT="/mnt/root"
40 47
 
41
-#Default user
48
+# Default user
49
+# TO MODIFY
42 50
 ID_USER="user login"
43 51
 PASSWORD="user password"
44 52
 

+ 2 - 2
rpi/extlinux.conf

@@ -1,10 +1,10 @@
1
-menu autoboot Welcome to Mageia-Minimal.
1
+menu title Boot menu
2 2
 timeout 20
3 3
 default Mageia
4 4
 
5 5
 label Mageia
6 6
 	kernel /vmlinuz
7
-	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"
7
+	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
8 8
 	fdtdir /dtb/
9 9
 	initrd /initrd
10 10
 

+ 56 - 0
rpi/mageia4arm.cfg.original

@@ -0,0 +1,56 @@
1
+
2
+# Copyright (C) 2017-2018 Daniel Tartavel-jeannot   <dtux@free.fr>
3
+#
4
+# This program is free software; you can redistribute it and/or modify
5
+# it under the terms of the GNU General Public License as published by
6
+# the Free Software Foundation; either version 2 of the License, or
7
+# (at your option) any later version.
8
+#
9
+# This program is distributed in the hope that it will be useful,
10
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
+# GNU General Public License for more details.
13
+#
14
+# You should have received a copy of the GNU General Public License
15
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
16
+
17
+
18
+MAGEIA_VERSION="7"
19
+ARM_VERSION="armv7hl"
20
+
21
+#target plateform (xu3-4 or rpi)
22
+TARGET="rpi" 
23
+
24
+# URL of the Mageia mirror used to install ( see mirrors.mageia.org )
25
+MIRROR="http://ftp.free.fr/mirrors/mageia.org/distrib/$MAGEIA_VERSION/$ARM_VERSION"
26
+# image will be created here
27
+INSTALL_PATH="<change this>"
28
+
29
+# Build directory will be created here
30
+BUILD_PATH="$INSTALL_PATH/build"
31
+
32
+#name of the image
33
+IMAGE="Mageia-${MAGEIA_VERSION}-$TARGET.img"
34
+
35
+#Mount point of image's partitions
36
+#no need to be changed
37
+BOOT="/mnt/boot"
38
+ROOT="/mnt/root"
39
+
40
+#Default user
41
+ID_USER="pi"
42
+PASSWORD="raspberry"
43
+
44
+#root password
45
+ROOT_PWD="piroot"
46
+
47
+#Hostname 
48
+HOSTNAME="$TARGET.$ID_USER" 
49
+
50
+#Filesystem of boot partitions (default ext4 raspberry pi need vfat)
51
+#DO NOT CHANGE THIS
52
+BOOTFS="vfat"
53
+
54
+#Path where the raspberry pi firmware is/will be downloaded
55
+FIRMWARE_PATH="$INSTALL_PATH"
56
+FIRMWARE_DIR="firmware-stable"

+ 1 - 1
rpi/second_stage_install.sh

@@ -23,7 +23,7 @@
23 23
 #Install all packages you need
24 24
 # No verifying rpm due to a bug in packages, some are not signed
25 25
 
26
-/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
26
+/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
27 27
 
28 28
 
29 29
 /usr/bin/chown :chrony -R /etc/chrony.keys /var/log/chrony

+ 29 - 0
tools/install_graphical.sh

@@ -0,0 +1,29 @@
1
+#!/bin/bash
2
+
3
+# Copyright (C) 2017-2018 Daniel Tartavel-jeannot   <contact@librepc.com>
4
+#
5
+
6
+# This program is free software; you can redistribute it and/or modify
7
+# it under the terms of the GNU General Public License as published by
8
+# the Free Software Foundation; either version 2 of the License, or
9
+# (at your option) any later version.
10
+#
11
+# This program is distributed in the hope that it will be useful,
12
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
+# GNU General Public License for more details.
15
+#
16
+# You should have received a copy of the GNU General Public License
17
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
18
+
19
+if [ "$1" = "" ];then
20
+	echo "syntax install_graphical.sh [xfce | lxde | lxqt | plasma | gnome] ( see task-* for all )"
21
+else
22
+	PATH="$(/bin/dirname  "$(readlink -f "$0")")"
23
+	echo "installing Video drivers"
24
+	. $PATH/install_video_driver.sh
25
+	echo "installing gstremer"
26
+	. $PATH/install_gstreamer.sh
27
+	echo "installing task-$1"
28
+	/usr/sbin/urpmi --auto --no-verify-rpm task-$1
29
+fi

+ 27 - 0
tools/install_graphical.sh~

@@ -0,0 +1,27 @@
1
+#!/bin/bash
2
+
3
+# Copyright (C) 2017-2018 Daniel Tartavel-jeannot   <contact@librepc.com>
4
+#
5
+
6
+# This program is free software; you can redistribute it and/or modify
7
+# it under the terms of the GNU General Public License as published by
8
+# the Free Software Foundation; either version 2 of the License, or
9
+# (at your option) any later version.
10
+#
11
+# This program is distributed in the hope that it will be useful,
12
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
+# GNU General Public License for more details.
15
+#
16
+# You should have received a copy of the GNU General Public License
17
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
18
+
19
+if [ "$1" = "" ];then
20
+	echo "syntax install_graphical.sh [xfce | lxde | lxqt | plasma | gnome] ( see task-* for all )"
21
+else
22
+	PATH="$(/bin/dirname  "$(readlink -f "$0")")"
23
+	echo "Path="$PATH
24
+	. $PATH/install_video_driver.sh
25
+	. $PATH/install_gstreamer.sh
26
+	/usr/sbin/urpmi --auto --no-verify-rpm task-$1
27
+fi

+ 2 - 1
tools/install_gstreamer.sh

@@ -17,7 +17,8 @@
17 17
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18 18
 
19 19
 
20
-/usr/sbin/urpmi --auto --no-verify-rpm x11-driver-video-fbdev
20
+/usr/sbin/urpmi --auto --no-verify-rpm x11-driver-video-fbdev xinit xclock xorg-x11 xorg-x11-75dpi-fonts drakconf
21
+
21 22
 
22 23
 echo "#!/bin/sh
23 24
 

+ 26 - 0
tools/install_video_driver.sh~

@@ -0,0 +1,26 @@
1
+#!/bin/bash
2
+
3
+# Copyright (C) 2017-2018 Daniel Tartavel-jeannot   <contact@librepc.com>
4
+#
5
+
6
+# This program is free software; you can redistribute it and/or modify
7
+# it under the terms of the GNU General Public License as published by
8
+# the Free Software Foundation; either version 2 of the License, or
9
+# (at your option) any later version.
10
+#
11
+# This program is distributed in the hope that it will be useful,
12
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
+# GNU General Public License for more details.
15
+#
16
+# You should have received a copy of the GNU General Public License
17
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
18
+
19
+
20
+/usr/sbin/urpmi --auto --no-verify-rpm x11-driver-video-fbdev xinit xclock
21
+
22
+echo "#!/bin/sh
23
+
24
+# patch for display manager service which do not start automatically
25
+systemctl start display-manager.service &" >/etc/rc.d/rc.local
26
+/usr/bin/chmod a+x /etc/rc.d/rc.local

tools/install_xfce.sh → tools/install_xfce.sh~