Browse Source

prise en charge du 3b+ et ajustements mineurs

Daniel Tartavel 2 years ago
parent
commit
22115e7251

+ 26 - 26
README.md

@@ -2,43 +2,43 @@
2 2
 
3 3
 Outils servant à  générer une image Mageia pour systèmes à base de processeurs arm
4 4
 
5
-Démarrage rapide:
5
+Démarrage rapide:  
6 6
 
7
-Choisissez le dossier de configuration adapté à votre besoin (rpi ou xu4), sinon créez un nouveau dossier de configuration, copiez le fichier "mageia4arm.cfg.template"" à l'interieur et modifiez le selon vos besoins.
8
-Par défaut l'utilisateur est "pi"" avec le mot de passe "raspberry", et l'administrateur "root" avec le mot de passe "piroot"
7
+Choisissez le dossier de configuration adapté à votre besoin (rpi ou xu4), sinon créez un nouveau dossier de configuration, copiez le fichier "mageia4arm.cfg.template" à l'interieur et modifiez le selon vos besoins.  
8
+Par défaut l'utilisateur est "pi" avec le mot de passe "raspberry", et l'administrateur "root" avec le mot de passe "piroot".  
9 9
 
10
-Créer l'image:
11
-create_arm_img_urpmi.sh --all --config <dossier de configuration>
10
+Créer l'image:  
11
+create_arm_img_urpmi.sh --all --config <dossier de configuration\>  
12 12
 
13
-Aide:
14
-create_arm_img_urpmi.sh -h|--help
13
+Aide:  
14
+create_arm_img_urpmi.sh -h|--help  
15 15
 
16
-Vous pouvez adapter le script "second_stage_install.sh"" afin de compléter l'installation.
17
-Des scripts sont disponibles dans le dossier "tools", ils sont copié dans usr/local/bin/ dans l'image.
16
+Vous pouvez adapter le script "second_stage_install.sh" afin de compléter l'installation.  
17
+Des scripts sont disponibles dans le dossier "tools", ils sont copié dans /usr/local/bin/ dans l'image.  
18 18
 
19
-Premier lancement de l'image sur le raspberry pi:
20
-. lancer drakkeyboard afin de configurer le clavier
21
-. si vous avez besoin d'un gestionnaire graphique, lancer le script:
22
-install_graphical.sh \<gestionnaire-graphique\>( xfce, lxqt, plasma, ...) voir les métapaquetages disponibles dans "Environnement graphique" dans le gestionnaire de logiciels.
19
+Premier lancement de l'image sur le raspberry pi:  
20
+-     lancer drakkeyboard afin de configurer le clavier  
21
+-      si vous avez besoin d'un gestionnaire graphique, lancer le script:  
22
+install_graphical.sh <gestionnaire-graphique\>( xfce, lxqt, plasma, ...) voir les métapaquetages disponibles dans "Environnement graphique" dans le gestionnaire de logiciels.  
23 23
 
24 24
 
25 25
 
26
-This repository contains script to make image for arm based systems from Mageia repositories.
26
+This repository contains script to make image for arm based systems from Mageia repositories.  
27 27
 
28
-Quick start:
28
+Quick start:  
29 29
 
30
-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.
31
-By default username is "pi"" with password "raspberry" and root password is "piroot".
30
+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.  
31
+By default username is "pi" with password "raspberry" and root password is "piroot".  
32 32
 
33
-create_arm_img_urpmi.sh --all --config <your config dir>
33
+create_arm_img_urpmi.sh --all --config <your config dir\>  
34 34
 
35
-Help:
36
-create_arm_img_urpmi.sh -h|--help
35
+Help:  
36
+create_arm_img_urpmi.sh -h|--help  
37 37
 
38
-you can adapt the script "second_stage_install.sh"" to complete the installation.
39
-Some scripts are available in directory "tools". they are copied in /usr/local/bin/ in the image.
38
+you can adapt the script "second_stage_install.sh" to complete the installation.  
39
+Some scripts are available in directory "tools". they are copied in /usr/local/bin/ in the image.  
40 40
 
41
-First launch of the image on raspberry pi:
42
-. launch drakkeyboard for configure keyboard layout.
43
-. if you need a graphical environment, launch the script :
44
-  install_graphical.sh \<graphical environment\> ( xfce, lxqt, plasma, ...), see "Graphical environment" in the Mageia application manager' meta packages.
41
+First launch of the image on raspberry pi:  
42
+-  launch drakkeyboard to configure keyboard layout.  
43
+-  if you need a graphical environment, launch the script :  
44
+  install_graphical.sh <graphical environment\> ( xfce, lxqt, plasma, ...), see "Graphical environment" in the Mageia application manager meta packages.  

+ 50 - 19
create_arm_img_urpmi.sh

@@ -62,17 +62,21 @@ function help()
62 62
 	echo "--all					create ready to burn image of Mageia $MAGEIA_VERSION"
63 63
 	echo "--clean				Clean all (suppress all) to make a new image"
64 64
 	echo "--size				size of image default: 7Go"
65
+	echo "--build-path			Path to the build directory of the image of Mageia $MAGEIA_VERSION"
66
+	echo "--target 				target system (for now rpi, odroid)"
67
+	echo "--target-version      version of the target (0, 1, 2, 3 for rpi, 3 or 4 for odroid)"
68
+	echo "--config				Path to config files"
69
+	echo "--bootfs              filesystem of boot partition (ext4 or vfat) default: ext4"
70
+	echo "--nonfree				activate nonfree repos"
71
+	echo "--tainted				activate tainted repos"
72
+	echo "\nBuild levels:"
65 73
 	echo "--create-chroot		Create the chroot directory"
66 74
 	echo "--addmedia			add mirrors"
67 75
 	echo "--update-mirror		update urpmi database"
68 76
 	echo "--install-basesystem	install base system"
69 77
 	echo "--chroot				chroot to arm directory and launch packages installation"
70 78
 	echo "--create-image		Create the image of Mageia $MAGEIA_VERSION"
71
-	echo "--build-path			Path to the build directory of the image of Mageia $MAGEIA_VERSION"
72
-	echo "--target 				target system (for now rpi, odroid)"
73
-	echo "--target-version      version of the target (0, 1, 2, 3 for rpi, 3 or 4 for odroid)"
74
-	echo "--config				Path to config files"
75
-	echo "--bootfs              filesystem of boot partition (ext4 or vfat) default: ext4"
79
+	
76 80
 	echo -e "\nFor image size, make sure it fit on physical support. (Default size is 7 Go)"
77 81
 }
78 82
 
@@ -182,12 +186,23 @@ function addmedia()
182 186
 		error "line $LINENO error $err - can't add medias from $MIRROR : exiting"
183 187
 		exit 1
184 188
 	fi
185
-	title "activating non-free and tainted"
186
-	/sbin/urpmi.update --urpmi-root  "$BUILD_PATH" --no-ignore Nonfree\ Release Nonfree\ Updates Tainted\ Release Tainted\ Updates
187
-	err=$?
188
-	if [ $err -ne 0 ];then
189
-		error "line $LINENO error $err - can't activate medias : exiting"
190
-		exit 1
189
+	if [ $NONFREE -eq 1 ];then
190
+		title "activating non-free repos"
191
+		/sbin/urpmi.update --urpmi-root  "$BUILD_PATH" --no-ignore Nonfree\ Release Nonfree\ Updates
192
+		err=$?
193
+		if [ $err -ne 0 ];then
194
+			error "line $LINENO error $err - can't activate medias nonfree : exiting"
195
+			exit 1
196
+		fi
197
+	fi
198
+	if [ $TAINTED -eq 1 ];then
199
+		title "activating tainted repos"
200
+		/sbin/urpmi.update --urpmi-root  "$BUILD_PATH" --no-ignore Tainted\ Release Tainted\ Updates
201
+		err=$?
202
+		if [ $err -ne 0 ];then
203
+			error "line $LINENO error $err - can't activate medias tainted : exiting"
204
+			exit 1
205
+		fi
191 206
 	fi
192 207
 }
193 208
 
@@ -536,12 +551,15 @@ copyingsystem()
536 551
 UUID=$BOOT_UUID  /mnt/arm_boot   vfat    defaults        0       0
537 552
 UUID=$ROOT_UUID  /               ext4    defaults        0       0" > "$BUILD_PATH"/etc/fstab
538 553
 
539
-info "making /boot/extlinux/extlinux.conf"
540
-mkdir -p "$BUILD_PATH/boot/extlinux"
541
-sed -e s/\<UUID\>/$ROOT_UUID/g $SOURCE_PATH/$CONFIG_PATH/extlinux.conf >"$BUILD_PATH/boot/extlinux/extlinux.conf"
542
-KERNEL_ID=`basename $BUILD_PATH/usr/lib/linux-*`
543
-sed -i -e s/\<FDTDIR\>/$KERNEL_ID/g "$BUILD_PATH/boot/extlinux/extlinux.conf"
544
-
554
+	if [ ! -d "$BUILD_PATH/boot/extlinux" ];then
555
+		info "making /boot/extlinux/extlinux.conf"
556
+		mkdir -p "$BUILD_PATH/boot/extlinux"
557
+	fi
558
+	if [ ! -f "$BUILD_PATH/boot/extlinux/extlinux.conf" ];then
559
+		sed -e s/\<UUID\>/$ROOT_UUID/g $SOURCE_PATH/$CONFIG_PATH/extlinux.conf >"$BUILD_PATH/boot/extlinux/extlinux.conf"
560
+		KERNEL_ID=`basename $BUILD_PATH/usr/lib/linux-*`
561
+		sed -i -e s/\<FDTDIR\>/$KERNEL_ID/g "$BUILD_PATH/boot/extlinux/extlinux.conf"
562
+	fi
545 563
 	case $TARGET in
546 564
 		rpi)
547 565
 
@@ -566,7 +584,7 @@ brcmfmac" >> "$BUILD_PATH"/etc/modules
566 584
 			cp -v --preserve=mode "$FIRMWARE_PATH/$FIRMWARE_DIR/boot/start"* "$ARM_BOOT/"
567 585
 			cp -v --preserve=mode "$FIRMWARE_PATH/$FIRMWARE_DIR/boot/fixup"* "$ARM_BOOT/"
568 586
 			cp -v --preserve=mode "$FIRMWARE_PATH/$FIRMWARE_DIR/boot/bootcode.bin"* "$ARM_BOOT/"
569
-			cp -v --preserve=mode "$FIRMWARE_PATH/$FIRMWARE_DIR/boot/overlays" "$ARM_BOOT/"
587
+			cp -vR --preserve=mode "$FIRMWARE_PATH/$FIRMWARE_DIR/boot/overlays" "$ARM_BOOT/"
570 588
 
571 589
 			info "copying u-boot binary to $ARM_BOOT"
572 590
 			case $TARGET_VERSION in
@@ -675,7 +693,7 @@ fi
675 693
 
676 694
 
677 695
 # parsing commandline
678
-TEMP=$(getopt -o h,a --long all,help,clean,create-chroot,addmedia,create-image,,config:,target:,target-version:,chroot,bootfs:,install-basesystem,update-mirror,build-path:,size: -n $CMDNAME  -- "$@")
696
+TEMP=$(getopt -o h,a --long all,help,clean,create-chroot,addmedia,create-image,,config:,target:,target-version:,chroot,bootfs:,install-basesystem,update-mirror,build-path:,size:,nonfree,tainted -n $CMDNAME  -- "$@")
679 697
 if [ $? -ne 0 ] ; then error "line $LINENO Failed parsing options." >&2 ; exit 1 ; fi
680 698
 eval set -- "$TEMP"
681 699
 
@@ -757,6 +775,12 @@ do
757 775
 		BOOTFS_P=$2
758 776
 		shift 2
759 777
 		;;
778
+	--nonfree)
779
+		NONFREE_P=1
780
+		;;
781
+	--tainted)
782
+		TAINTED_P=1
783
+		;;
760 784
 	--)
761 785
       shift
762 786
       break;;
@@ -812,6 +836,13 @@ fi
812 836
 if ! [ -z "$BOOTFS_P" ];then
813 837
 	BOOTFS=$BOOTFS_P
814 838
 fi
839
+if ! [ -z "$NONFREE_P" ];then
840
+	NONFREE=$NONFREE_P
841
+fi
842
+if ! [ -z "$TAINTED_P" ];then
843
+	TAINTED=$TAINTED_P
844
+fi
845
+
815 846
 info "Option: "$OPT
816 847
 
817 848
 IMAGE="Mageia-${MAGEIA_VERSION}-$TARGET$TARGET_VERSION.img"

+ 3 - 1
rpi2/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 binutils dracut u-boot rsync kernel-desktop-latest mlocate drakx-kbd-mouse-x11
26
+/usr/sbin/urpmi --auto --no-verify-rpm basesystem chrony rng-tools man openssh-server rfkill wireless-tools bluez wpa_supplicant make binutils dracut u-boot rsync kernel-desktop-latest mlocate drakx-kbd-mouse-x11 glibc-i18ndata
27 27
 
28 28
 
29 29
 /usr/bin/chown :chrony -R /etc/chrony.keys /var/log/chrony
@@ -39,3 +39,5 @@ dracut --kver $KV
39 39
 rm -f $0
40 40
 cp /boot/vmlinuz-* /boot/vmlinuz
41 41
 cp /boot/initrd-* /boot/initrd
42
+
43
+alternatives --set soundprofile /etc/sound/profiles/alsa

+ 66 - 0
rpi3+/brcmfmac43430-sdio.txt

@@ -0,0 +1,66 @@
1
+# NVRAM file for BCM943430WLPTH
2
+# 2.4 GHz, 20 MHz BW mode
3
+
4
+# The following parameter values are just placeholders, need to be updated.
5
+manfid=0x2d0
6
+prodid=0x0727
7
+vendid=0x14e4
8
+devid=0x43e2
9
+boardtype=0x0727
10
+boardrev=0x1101
11
+boardnum=22
12
+macaddr=00:90:4c:c5:12:38
13
+sromrev=11
14
+boardflags=0x00404201
15
+boardflags3=0x08000000
16
+xtalfreq=37400
17
+nocrc=1
18
+ag0=255
19
+aa2g=1
20
+ccode=ALL
21
+
22
+pa0itssit=0x20
23
+extpagain2g=0
24
+#PA parameters for 2.4GHz, measured at CHIP OUTPUT
25
+pa2ga0=-168,7161,-820
26
+AvVmid_c0=0x0,0xc8
27
+cckpwroffset0=5
28
+
29
+# PPR params
30
+maxp2ga0=84
31
+txpwrbckof=6
32
+cckbw202gpo=0
33
+legofdmbw202gpo=0x66111111
34
+mcsbw202gpo=0x77711111
35
+propbw202gpo=0xdd
36
+
37
+# OFDM IIR :
38
+ofdmdigfilttype=18
39
+ofdmdigfilttypebe=18
40
+# PAPD mode:
41
+papdmode=1
42
+papdvalidtest=1
43
+pacalidx2g=42
44
+papdepsoffset=-22
45
+papdendidx=58
46
+
47
+# LTECX flags
48
+ltecxmux=0
49
+ltecxpadnum=0x0102
50
+ltecxfnsel=0x44
51
+ltecxgcigpio=0x01
52
+
53
+il0macaddr=00:90:4c:c5:12:38
54
+wl0id=0x431b
55
+
56
+deadman_to=0xffffffff
57
+# muxenab: 0x1 for UART enable, 0x2 for GPIOs, 0x8 for JTAG
58
+muxenab=0x1
59
+# CLDO PWM voltage settings - 0x4 - 1.1 volt
60
+#cldo_pwm=0x4
61
+
62
+#VCO freq 326.4MHz
63
+spurconfig=0x3 
64
+
65
+edonthd20l=-75
66
+edoffthd20ul=-80

BIN
rpi3+/brcmfmac43455-sdio.clm_blob


+ 92 - 0
rpi3+/brcmfmac43455-sdio.txt

@@ -0,0 +1,92 @@
1
+# Cloned from bcm94345wlpagb_p2xx.txt 
2
+NVRAMRev=$Rev: 498373 $
3
+sromrev=11
4
+vendid=0x14e4
5
+devid=0x43ab
6
+manfid=0x2d0
7
+prodid=0x06e4
8
+#macaddr=00:90:4c:c5:12:38
9
+macaddr=b8:27:eb:74:f2:6c
10
+nocrc=1
11
+boardtype=0x6e4
12
+boardrev=0x1304
13
+
14
+#XTAL 37.4MHz
15
+xtalfreq=37400
16
+
17
+btc_mode=1
18
+#------------------------------------------------------
19
+#boardflags: 5GHz eTR switch by default
20
+#            2.4GHz eTR switch by default
21
+#            bit1 for btcoex
22
+boardflags=0x00480201
23
+boardflags2=0x40800000
24
+boardflags3=0x48200100
25
+phycal_tempdelta=15
26
+rxchain=1
27
+txchain=1
28
+aa2g=1
29
+aa5g=1
30
+tssipos5g=1
31
+tssipos2g=1
32
+femctrl=0
33
+AvVmid_c0=1,165,2,100,2,100,2,100,2,100
34
+pa2ga0=-129,6525,-718
35
+pa2ga1=-149,4408,-601
36
+pa5ga0=-185,6836,-815,-186,6838,-815,-184,6859,-815,-184,6882,-818
37
+pa5ga1=-202,4285,-574,-201,4312,-578,-196,4391,-586,-201,4294,-575
38
+itrsw=1
39
+pdoffsetcckma0=2
40
+pdoffset2gperchan=0,-2,1,0,1,0,1,1,1,0,0,-1,-1,0
41
+pdoffset2g40ma0=16
42
+pdoffset40ma0=0x8888
43
+pdoffset80ma0=0x8888
44
+extpagain5g=2
45
+extpagain2g=2
46
+tworangetssi2g=1
47
+tworangetssi5g=1
48
+# LTECX flags
49
+# WCI2
50
+ltecxmux=0
51
+ltecxpadnum=0x0504
52
+ltecxfnsel=0x22
53
+ltecxgcigpio=0x32
54
+
55
+maxp2ga0=80
56
+ofdmlrbw202gpo=0x0022
57
+dot11agofdmhrbw202gpo=0x4442
58
+mcsbw202gpo=0x98444422
59
+mcsbw402gpo=0x98444422
60
+maxp5ga0=82,82,82,82
61
+mcsbw205glpo=0xb9555000
62
+mcsbw205gmpo=0xb9555000
63
+mcsbw205ghpo=0xb9555000
64
+mcsbw405glpo=0xb9555000
65
+mcsbw405gmpo=0xb9555000
66
+mcsbw405ghpo=0xb9555000
67
+mcsbw805glpo=0xb9555000
68
+mcsbw805gmpo=0xb9555000
69
+mcsbw805ghpo=0xb9555000
70
+
71
+swctrlmap_2g=0x00000000,0x00000000,0x00000000,0x010000,0x3ff
72
+swctrlmap_5g=0x00100010,0x00200020,0x00200020,0x010000,0x3fe
73
+swctrlmapext_5g=0x00000000,0x00000000,0x00000000,0x000000,0x3
74
+swctrlmapext_2g=0x00000000,0x00000000,0x00000000,0x000000,0x3
75
+
76
+vcodivmode=1
77
+deadman_to=481500000
78
+
79
+ed_thresh2g=-54
80
+ed_thresh5g=-54
81
+eu_edthresh2g=-54
82
+eu_edthresh5g=-54
83
+ldo1=4
84
+rawtempsense=0x1ff
85
+cckPwrIdxCorr=3
86
+cckTssiDelay=150
87
+ofdmTssiDelay=150
88
+txpwr2gAdcScale=1
89
+txpwr5gAdcScale=1
90
+dot11b_opts=0x3aa85
91
+cbfilttype=1
92
+fdsslevel_ch11=6

+ 3 - 1
rpi3+/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 binutils dracut u-boot rsync kernel-desktop-latest mlocate drakx-kbd-mouse-x11
26
+/usr/sbin/urpmi --auto --no-verify-rpm basesystem chrony rng-tools man openssh-server rfkill wireless-tools bluez wpa_supplicant make binutils dracut u-boot rsync kernel-desktop-latest mlocate drakx-kbd-mouse-x11 glibc-i18ndata
27 27
 
28 28
 
29 29
 /usr/bin/chown :chrony -R /etc/chrony.keys /var/log/chrony
@@ -39,3 +39,5 @@ dracut --kver $KV
39 39
 rm -f $0
40 40
 cp /boot/vmlinuz-* /boot/vmlinuz
41 41
 cp /boot/initrd-* /boot/initrd
42
+
43
+alternatives --set soundprofile /etc/sound/profiles/alsa

+ 4 - 0
rpi3/mageia4arm.cfg

@@ -17,6 +17,10 @@
17 17
 
18 18
 MAGEIA_VERSION="7"
19 19
 ARM_VERSION="armv7hl"
20
+# Activate / deactivate nonfree et tainted
21
+# value 0 to deactivate or 1 to activate
22
+NONFREE="0"
23
+TAINTED="0"
20 24
 
21 25
 #target plateform (xu3-4 or rpi)
22 26
 TARGET="rpi"

+ 3 - 1
rpi3/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 binutils dracut u-boot rsync kernel-desktop-latest mlocate drakx-kbd-mouse-x11
26
+/usr/sbin/urpmi --auto --no-verify-rpm basesystem chrony rng-tools man openssh-server rfkill wireless-tools bluez wpa_supplicant make binutils dracut u-boot rsync kernel-desktop-latest mlocate drakx-kbd-mouse-x11 glibc-i18ndata
27 27
 
28 28
 
29 29
 /usr/bin/chown :chrony -R /etc/chrony.keys /var/log/chrony
@@ -39,3 +39,5 @@ dracut --kver $KV
39 39
 rm -f $0
40 40
 cp /boot/vmlinuz-* /boot/vmlinuz
41 41
 cp /boot/initrd-* /boot/initrd
42
+
43
+alternatives --set soundprofile /etc/sound/profiles/alsa

+ 1 - 0
tools/install_graphical.sh

@@ -26,5 +26,6 @@ else
26 26
 	. $PATH/install_gstreamer.sh
27 27
 	echo "installing task-$1"
28 28
 	/usr/sbin/urpmi --auto --no-verify-rpm task-$1 sox sddm
29
+	/usr/bin/alternatives --config soundprofile 
29 30
 fi
30 31
 /usr/bin/systemctl enable sddm