Browse Source

added platform dir

Daniel Tartavel 2 years ago
parent
commit
2a82e889e8
59 changed files with 375 additions and 7965 deletions
  1. 43 37
      create_arm_img_urpmi.sh
  2. 0 0
      platforms/rpi1/10-vchiq-permissions.rules
  3. 0 0
      platforms/rpi1/brcmfmac43430-sdio.txt
  4. 0 0
      platforms/rpi1/brcmfmac43455-sdio.clm_blob
  5. 0 0
      platforms/rpi1/brcmfmac43455-sdio.txt
  6. 0 0
      platforms/rpi1/extlinux.conf
  7. 5 6
      rpi/mageia4arm.cfg
  8. 0 0
      platforms/rpi1/mageia4arm.cfg.original
  9. 0 0
      platforms/rpi1/mageia4arm.cfg~
  10. 0 0
      platforms/rpi1/modprobe.conf
  11. 0 0
      platforms/rpi1/second_stage_install.sh
  12. 0 0
      platforms/rpi2/10-vchiq-permissions.rules
  13. 0 0
      platforms/rpi2/brcmfmac43430-sdio.txt
  14. 0 0
      platforms/rpi2/brcmfmac43455-sdio.clm_blob
  15. 0 0
      platforms/rpi2/brcmfmac43455-sdio.txt
  16. 0 0
      platforms/rpi2/extlinux.conf
  17. 0 0
      platforms/rpi2/mageia4arm.cfg
  18. 3 3
      rpi3/mageia4arm.cfg.original
  19. 2 4
      rpi/mageia4arm_dt.cfg
  20. 0 0
      platforms/rpi2/modprobe.conf
  21. 0 0
      platforms/rpi2/second_stage_install.sh
  22. 0 0
      platforms/rpi3+/10-vchiq-permissions.rules
  23. 0 0
      platforms/rpi3+/brcmfmac43430-sdio.txt
  24. 0 0
      platforms/rpi3+/brcmfmac43455-sdio.clm_blob
  25. 0 0
      platforms/rpi3+/brcmfmac43455-sdio.txt
  26. 0 0
      platforms/rpi3+/extlinux.conf
  27. 0 0
      platforms/rpi3+/mageia4arm.cfg
  28. 0 0
      platforms/rpi3+/mageia4arm.cfg.original
  29. 57 0
      platforms/rpi3+/mageia4arm.cfg~
  30. 0 0
      platforms/rpi3+/modprobe.conf
  31. 0 0
      platforms/rpi3+/second_stage_install.sh
  32. 0 0
      platforms/rpi3/10-monitor.conf
  33. 0 0
      platforms/rpi3/10-vchiq-permissions.rules
  34. 0 0
      platforms/rpi3/brcmfmac43430-sdio.txt
  35. 0 0
      platforms/rpi3/brcmfmac43455-sdio.clm_blob
  36. 0 0
      platforms/rpi3/brcmfmac43455-sdio.txt
  37. 0 0
      platforms/rpi3/extlinux.conf
  38. 0 0
      platforms/rpi3/mageia4arm.cfg
  39. 0 0
      platforms/rpi3/mageia4arm.cfg.original
  40. 57 0
      platforms/rpi3/mageia4arm.cfg~
  41. 0 0
      platforms/rpi3/modprobe.conf
  42. 0 0
      platforms/rpi3/second_stage_install.sh
  43. 11 11
      xu4/boot.ini
  44. BIN
      platforms/xu4/boot.tar.gz
  45. 10 0
      platforms/xu4/extlinux.conf
  46. 10 0
      platforms/xu4/extlinux.conf.orig
  47. 0 0
      platforms/xu4/mageia4arm.cfg
  48. 52 0
      platforms/xu4/mageia4arm.cfg~
  49. BIN
      platforms/xu4/sd_fuse/bl1.bin.hardkernel
  50. BIN
      platforms/xu4/sd_fuse/bl2.bin.hardkernel.720k_uboot
  51. 91 0
      platforms/xu4/sd_fuse/sd_fusing.sh
  52. BIN
      platforms/xu4/sd_fuse/tzsw.bin.hardkernel
  53. BIN
      platforms/xu4/sd_fuse/u-boot.bin.hardkernel
  54. 0 0
      platforms/xu4/second_stage_install.sh
  55. 34 0
      platforms/xu4/second_stage_install.sh~
  56. 0 0
      platforms/xu4/u-boot-20180507-3.mga7.armv7hl.rpm
  57. 0 7898
      rpi/config-4.9.0-6-armmp
  58. 0 6
      rpi/sed_extlinux.conf.sh
  59. BIN
      xu4/kernel-odroid-4.14.y-1.armv7hl.rpm

+ 43 - 37
create_arm_img_urpmi.sh

@@ -36,10 +36,13 @@ function error()
36 36
 	echo -e "\e[1;31m$1\e[0m"
37 37
 }
38 38
 
39
+info $0
40
+
39 41
 SOURCE_PATH="$(/bin/dirname  "$(readlink -f "$0")")"
40 42
 INSTALL_PATH="$SOURCE_PATH/arm"
41 43
 FILES_PATH="$SOURCE_PATH/files"
42
-info $0
44
+PLATFORMS_PATH="$SOURCE_PATH/platforms"
45
+
43 46
 CMDNAME=$(/bin/basename "$0")
44 47
 
45 48
 #while read -r;do
@@ -277,10 +280,10 @@ function preparechroot()
277 280
 	echo "$HOSTNAME" > "$BUILD_PATH/etc/hostname"
278 281
 
279 282
 	info "copying second stage script in $BUILD_PATH"
280
-	echo "/bin/cp $SOURCE_PATH/$CONFIG_PATH/second_stage_install.sh $BUILD_PATH/"
281
-	cp --preserve=mode "$SOURCE_PATH/$CONFIG_PATH/second_stage_install.sh" "$BUILD_PATH/second_stage_install.sh"
283
+	echo "/bin/cp $CONFIG_PATH/second_stage_install.sh $BUILD_PATH/"
284
+	cp --preserve=mode "$CONFIG_PATH/second_stage_install.sh" "$BUILD_PATH/second_stage_install.sh"
282 285
 	if [ $? -ne 0 ];then
283
-		error "line $LINENO error copying $SOURCE_PATH/$CONFIG_PATH/second_stage_install.sh : exiting"
286
+		error "line $LINENO error copying $CONFIG_PATH/second_stage_install.sh : exiting"
284 287
 		exit 1
285 288
 	fi
286 289
 
@@ -306,12 +309,12 @@ EOF" >>"$BUILD_PATH/second_stage_install.sh"
306 309
 			#TEMPORARY CODE
307 310
 			#copying kernel odroid not existing in mageia repos
308 311
 			info "copying kernel-odroid and u-boot rpms in $BUILD_PATH/root"
309
-			echo "/bin/cp $SOURCE_PATH/$CONFIG_PATH/kernel-odroid-4.14.y-1.armv7hl.rpm $BUILD_PATH/root/"
310
-			/usr/bin/cp --preserve=mode "$SOURCE_PATH/$CONFIG_PATH/kernel-odroid-4.14.y-1.armv7hl.rpm" "$BUILD_PATH/root/"
311
-			echo "/bin/cp $SOURCE_PATH/$CONFIG_PATH/u-boot-20180507-3.mga7.armv7hl.rpm $BUILD_PATH/root/"
312
-			/usr/bin/cp --preserve=mode "$SOURCE_PATH/$CONFIG_PATH/u-boot-20180507-3.mga7.armv7hl.rpm" "$BUILD_PATH/root/"
312
+			echo "/bin/cp $CONFIG_PATH/kernel-odroid-4.14.y-1.armv7hl.rpm $BUILD_PATH/root/"
313
+			/usr/bin/cp --preserve=mode "$CONFIG_PATH/kernel-odroid-4.14.y-1.armv7hl.rpm" "$BUILD_PATH/root/"
314
+			echo "/bin/cp $CONFIG_PATH/u-boot-20180507-3.mga7.armv7hl.rpm $BUILD_PATH/root/"
315
+			/usr/bin/cp --preserve=mode "$CONFIG_PATH/u-boot-20180507-3.mga7.armv7hl.rpm" "$BUILD_PATH/root/"
313 316
 			if [ $? -ne 0 ];then
314
-				error "line $LINENO error copying $SOURCE_PATH/$CONFIG_PATH/kernel-odroid-4.14.y-1.armv7hl.rpm : exiting"
317
+				error "line $LINENO error copying $CONFIG_PATH/kernel-odroid-4.14.y-1.armv7hl.rpm : exiting"
315 318
 				exit 1
316 319
 			fi
317 320
 			;;
@@ -454,9 +457,9 @@ createimage()
454 457
 	DEVICE=$(/sbin/losetup -f --show "$INSTALL_PATH/$IMAGE")
455 458
 	if [ $TARGET = "odroid" ];then
456 459
 		info "installing blobs"
457
-		pushd "$SOURCE_PATH/$CONFIG_PATH/sd_fuse"
460
+		pushd "$CONFIG_PATH/sd_fuse"
458 461
 		if [ $? -ne 0 ];then
459
-			error "line $LINENO error directory $SOURCE_PATH/$CONFIG_PATH/sd_fuse does not exists : exiting"
462
+			error "line $LINENO error directory $CONFIG_PATH/sd_fuse does not exists : exiting"
460 463
 			exit 1
461 464
 		else
462 465
 			./sd_fusing.sh "$DEVICE"
@@ -556,7 +559,7 @@ UUID=$ROOT_UUID  /               ext4    defaults        0       0" > "$BUILD_PA
556 559
 		mkdir -p "$BUILD_PATH/boot/extlinux"
557 560
 	fi
558 561
 	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"
562
+		sed -e s/\<UUID\>/$ROOT_UUID/g $CONFIG_PATH/extlinux.conf >"$BUILD_PATH/boot/extlinux/extlinux.conf"
560 563
 		KERNEL_ID=`basename $BUILD_PATH/usr/lib/linux-*`
561 564
 		sed -i -e s/\<FDTDIR\>/$KERNEL_ID/g "$BUILD_PATH/boot/extlinux/extlinux.conf"
562 565
 	fi
@@ -564,7 +567,7 @@ UUID=$ROOT_UUID  /               ext4    defaults        0       0" > "$BUILD_PA
564 567
 		rpi)
565 568
 
566 569
 			info "copying 10-vchiq-permissions.rules"
567
-			cp --preserve=mode "$SOURCE_PATH/$CONFIG_PATH/10-vchiq-permissions.rules" "$BUILD_PATH/etc/udev/rules.d/"
570
+			cp --preserve=mode "$CONFIG_PATH/10-vchiq-permissions.rules" "$BUILD_PATH/etc/udev/rules.d/"
568 571
 			info "Making /etc/modules"
569 572
 			echo "vchiq
570 573
 snd_bcm2835
@@ -576,7 +579,7 @@ brcmfmac" >> "$BUILD_PATH"/etc/modules
576 579
 				mkdir -p "$ARM_BOOT"
577 580
 			fi
578 581
 			info "copying modprobe.conf"
579
-			/usr/bin/cp -v --preserve=mode "$SOURCE_PATH/$CONFIG_PATH/modprobe.conf" "$BUILD_PATH/etc/"
582
+			/usr/bin/cp -v --preserve=mode "$CONFIG_PATH/modprobe.conf" "$BUILD_PATH/etc/"
580 583
 			chown root:root "$BUILD_PATH/etc/modprobe.conf"
581 584
 
582 585
 			info "copying firmware, overlays in rpi boot partition"
@@ -618,7 +621,7 @@ brcmfmac" >> "$BUILD_PATH"/etc/modules
618 621
 				/bin/mkdir -p "$ROOT/usr/lib/firmware/brcm/"
619 622
 			fi
620 623
 			if ! [ -f "$ROOT/usr/lib/firmware/brcm/brcmfmac434"* ];then
621
-				/bin/cp --preserve=mode "$SOURCE_PATH/$CONFIG_PATH/brcmfmac434"* "$ROOT/usr/lib/firmware/brcm/"
624
+				/bin/cp --preserve=mode "$CONFIG_PATH/brcmfmac434"* "$ROOT/usr/lib/firmware/brcm/"
622 625
 				if [ $? -ne 0 ];then
623 626
 					error "line $LINENO error copying wifi firmware in $ROOTP/usr/lib/firmware/brcm/ : exiting"
624 627
 					exit 1
@@ -626,8 +629,8 @@ brcmfmac" >> "$BUILD_PATH"/etc/modules
626 629
 			fi
627 630
 
628 631
 			info "copying Mageia image to root partition"
629
-			/bin/rsync -rlptDH --exclude "$ARM_BOOT/" --exclude "qemu-arm-static*" "$BUILD_PATH/" "$ROOT/"
630
-			/bin/rsync -rlptDH "$ARM_BOOT/" "$BOOT/"
632
+			/bin/rsync -rlptogDH --exclude "$ARM_BOOT/" --exclude "qemu-arm-static*" "$BUILD_PATH/" "$ROOT/"
633
+			/bin/rsync -rlptogDH "$ARM_BOOT/" "$BOOT/"
631 634
 			;;
632 635
 		odroid)
633 636
 			ODROID_BOOT="$BUILD_PATH/mnt/odroid_boot"
@@ -645,8 +648,8 @@ brcmfmac" >> "$BUILD_PATH"/etc/modules
645 648
 			info "Copying extlinux.conf on $ODROID_BOOT"
646 649
 			cp --preserve=mode -R "$BUILD_PATH/boot/extlinux" "$ODROID_BOOT/"
647 650
 			info "copying Mageia image to root partition"
648
-			/bin/rsync -rlptDH --exclude "$ODROID_BOOT/" --exclude "qemu-arm-static*" "$BUILD_PATH/" "$ROOT/"
649
-			/bin/rsync -rlptDH "$ODROID_BOOT/" "$BOOT/"
651
+			/bin/rsync -rlptogDH --exclude "$ODROID_BOOT/" --exclude "qemu-arm-static*" "$BUILD_PATH/" "$ROOT/"
652
+			/bin/rsync -rlptogDH "$ODROID_BOOT/" "$BOOT/"
650 653
 			;;
651 654
 	esac
652 655
 
@@ -768,7 +771,7 @@ do
768 771
 		shift 2
769 772
 		;;
770 773
 	--config)
771
-		CONFIG_PATH="$2"
774
+		CONFIG_PATH="$PLATFORMS_PATH/$2"
772 775
 		shift 2
773 776
 		;;
774 777
 	--bootfs)
@@ -792,33 +795,36 @@ done
792 795
 
793 796
 
794 797
 # path of config file
795
-if ! [ -d "$SOURCE_PATH/$CONFIG_PATH" ];then
796
-	info " Config path does not exists, defaulting to ./$TARGET"
797
-	CONFIG_PATH="$TARGET"
798
+if ! [ -d "$CONFIG_PATH" ];then
799
+	info " Config path does not exists, defaulting to ./platforms/$TARGET"
800
+	CONFIG_PATH="$PLATFORMS_PATH/$TARGET"
801
+    warning "Do you want i make it and copy the template file in? [Y|n] "
802
+    read yn
803
+    if [ -z $yn ] || [ $yn = "Y" ] || [ $yn = "y" ];then
804
+        /usr/bin/mkdir "$CONFIG_PATH/"
805
+        /usr/bin/cp --preserve=mode "$SOURCE_PATH/config.template" "$CONFIG_PATH/mageia4arm.cfg"
806
+        warning "You need now to modify the config file ($CONFIG_PATH/mageia4arm.cfg) and relaunch the script"
807
+        exit 2
808
+    else
809
+        error( "Error: Can't continue without config file, exiting" )
810
+        exit 3            
811
+    fi
798 812
 fi
799 813
 
800
-if [ -d "$SOURCE_PATH/$CONFIG_PATH" ];then
801
-	if [ -e "$SOURCE_PATH/$CONFIG_PATH/mageia4arm.cfg" ];then
802
-		info "using $SOURCE_PATH/$CONFIG_PATH/mageia4arm.cfg as config"
803
-		. "$SOURCE_PATH/$CONFIG_PATH/mageia4arm.cfg"
814
+	if [ -e "$CONFIG_PATH/mageia4arm.cfg" ];then
815
+		info "using $CONFIG_PATH/mageia4arm.cfg as config"
816
+		. "$CONFIG_PATH/mageia4arm.cfg"
804 817
 	else
805 818
 		warning "Config file does not exists, do you want i copy template ? [Y|n] "
806 819
 		read yn
807 820
 		if [ -z $yn ] || [ $yn = "Y" ] || [ $yn = "y" ];then
808
-			/usr/bin/cp --preserve=mode "$SOURCE_PATH/mageia4arm.cfg.template" "$SOURCE_PATH/$CONFIG_PATH/mageia4arm.cfg"
809
-			warning "You need now to modify the config file ($SOURCE_PATH/$CONFIG_PATH/mageia4arm.cfg) and relaunch the script"
821
+			/usr/bin/cp --preserve=mode "$SOURCE_PATH/mageia4arm.cfg.template" "$CONFIG_PATH/mageia4arm.cfg"
822
+			warning "You need now to modify the config file ($CONFIG_PATH/mageia4arm.cfg) and relaunch the script"
810 823
 			exit 2
811 824
 		fi
812 825
 	fi
813 826
 else
814
-	warning "Config directory does not exists, do you want i make it and copy the template file in? [Y|n] "
815
-	read yn
816
-	if [ -z $yn ] || [ $yn = "Y" ] || [ $yn = "y" ];then
817
-		/usr/bin/mkdir "$SOURCE_PATH/$CONFIG_PATH/"
818
-		/usr/bin/cp --preserve=mode "$SOURCE_PATH/config.template" "$SOURCE_PATH/$CONFIG_PATH/mageia4arm.cfg"
819
-		warning "You need now to modify the config file ($SOURCE_PATH/$CONFIG_PATH/mageia4arm.cfg) and relaunch the script"
820
-		exit 2
821
-	fi
827
+	
822 828
 fi
823 829
 
824 830
 if ! [ -z "$IMAGE_SIZE_P" ];then

rpi/10-vchiq-permissions.rules → platforms/rpi1/10-vchiq-permissions.rules


rpi/brcmfmac43430-sdio.txt → platforms/rpi1/brcmfmac43430-sdio.txt


rpi/brcmfmac43455-sdio.clm_blob → platforms/rpi1/brcmfmac43455-sdio.clm_blob


rpi/brcmfmac43455-sdio.txt → platforms/rpi1/brcmfmac43455-sdio.txt


rpi/extlinux.conf → platforms/rpi1/extlinux.conf


+ 5 - 6
rpi/mageia4arm.cfg

@@ -15,27 +15,27 @@
15 15
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16 16
 
17 17
 
18
-MAGEIA_VERSION="7"
19
-ARM_VERSION="armv7hl"
18
+MAGEIA_VERSION="6"
19
+ARM_VERSION="armv5tl"
20 20
 
21 21
 #target plateform (xu3-4 or rpi)
22 22
 TARGET="rpi"
23 23
 #version of the target
24 24
 # 0, 1, 2 ,3_32 for rpi and 3 or 4 for odroid
25
-TARGET_VERSION="3_32"
25
+TARGET_VERSION="1"
26 26
 
27 27
 # URL of the Mageia mirror used to install ( see mirrors.mageia.org )
28 28
 MIRROR="http://ftp.free.fr/mirrors/mageia.org/distrib/$MAGEIA_VERSION/$ARM_VERSION"
29 29
 #MIRROR="/mnt/STOCK/mageia/distrib/$MAGEIA_VERSION/$ARM_VERSION"
30 30
 # image will be created here
31 31
 
32
-INSTALL_PATH="/mnt/perso/raspi-test"
32
+INSTALL_PATH="/mnt/perso/raspi1"
33 33
 
34 34
 # Build directory will be created here
35 35
 BUILD_PATH="$INSTALL_PATH/build"
36 36
 
37 37
 #name of the image
38
-IMAGE="Mageia-${MAGEIA_VERSION}-$TARGET.img"
38
+IMAGE="Mageia-${MAGEIA_VERSION}-$TARGET$TARGET_VERSION.img"
39 39
 
40 40
 #Mount point of image's partitions
41 41
 BOOT="/mnt/boot"
@@ -58,4 +58,3 @@ BOOTFS="vfat"
58 58
 FIRMWARE_PATH="$INSTALL_PATH"
59 59
 FIRMWARE_DIR="firmware-stable"
60 60
 FIRMWARE_DOWNLOAD_URL="https://github.com/raspberrypi/firmware/archive/stable.zip"
61
-

rpi2/mageia4arm.cfg.original → platforms/rpi1/mageia4arm.cfg.original


rpi2/mageia4arm.cfg~ → platforms/rpi1/mageia4arm.cfg~


rpi/modprobe.conf → platforms/rpi1/modprobe.conf


rpi/second_stage_install.sh → platforms/rpi1/second_stage_install.sh


rpi2/10-vchiq-permissions.rules → platforms/rpi2/10-vchiq-permissions.rules


rpi2/brcmfmac43430-sdio.txt → platforms/rpi2/brcmfmac43430-sdio.txt


rpi2/brcmfmac43455-sdio.clm_blob → platforms/rpi2/brcmfmac43455-sdio.clm_blob


rpi2/brcmfmac43455-sdio.txt → platforms/rpi2/brcmfmac43455-sdio.txt


rpi2/extlinux.conf → platforms/rpi2/extlinux.conf


rpi2/mageia4arm.cfg → platforms/rpi2/mageia4arm.cfg


+ 3 - 3
rpi3/mageia4arm.cfg.original

@@ -19,7 +19,7 @@ MAGEIA_VERSION="7"
19 19
 ARM_VERSION="armv7hl"
20 20
 
21 21
 #target plateform (xu3-4 or rpi)
22
-TARGET="rpi"
22
+TARGET="rpi" 
23 23
 #version of the target
24 24
 # 0, 1, 2 ,3_32 for rpi and 3 or 4 for odroid
25 25
 TARGET_VERSION="3_32"
@@ -47,8 +47,8 @@ PASSWORD="raspberry"
47 47
 #root password
48 48
 ROOT_PWD="piroot"
49 49
 
50
-#Hostname
51
-HOSTNAME="$TARGET.$ID_USER"
50
+#Hostname 
51
+HOSTNAME="$TARGET.$ID_USER" 
52 52
 
53 53
 #Filesystem of boot partitions (default ext4 raspberry pi need vfat)
54 54
 #DO NOT CHANGE THIS

+ 2 - 4
rpi/mageia4arm_dt.cfg

@@ -15,11 +15,12 @@
15 15
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16 16
 
17 17
 
18
-MAGEIA_VERSION="cauldron"
18
+MAGEIA_VERSION="7"
19 19
 ARM_VERSION="armv7hl"
20 20
 
21 21
 #target plateform (xu3-4 or rpi)
22 22
 TARGET="rpi" 
23
+TARGET_VERSION="3"
23 24
 
24 25
 # URL of the Mageia mirror used to install ( see mirrors.mageia.org )
25 26
 MIRROR="http://ftp.free.fr/mirrors/mageia.org/distrib/$MAGEIA_VERSION/$ARM_VERSION"
@@ -51,9 +52,6 @@ HOSTNAME="$TARGET.$ID_USER"
51 52
 #Filesystem of boot partitions (default ext4 raspberry pi need vfat)
52 53
 BOOTFS="vfat"
53 54
 
54
-#kernel package to install (just needed for odroid)
55
-KERNEL=""
56
-
57 55
 #Path where the raspberry pi firmware is/will be installed
58 56
 FIRMWARE_PATH="$INSTALL_PATH"
59 57
 FIRMWARE_DIR="firmware-stable"

rpi2/modprobe.conf → platforms/rpi2/modprobe.conf


rpi2/second_stage_install.sh → platforms/rpi2/second_stage_install.sh


rpi3+/10-vchiq-permissions.rules → platforms/rpi3+/10-vchiq-permissions.rules


rpi3+/brcmfmac43430-sdio.txt → platforms/rpi3+/brcmfmac43430-sdio.txt


rpi3+/brcmfmac43455-sdio.clm_blob → platforms/rpi3+/brcmfmac43455-sdio.clm_blob


rpi3+/brcmfmac43455-sdio.txt → platforms/rpi3+/brcmfmac43455-sdio.txt


rpi3+/extlinux.conf → platforms/rpi3+/extlinux.conf


rpi3+/mageia4arm.cfg → platforms/rpi3+/mageia4arm.cfg


rpi3+/mageia4arm.cfg.original → platforms/rpi3+/mageia4arm.cfg.original


+ 57 - 0
platforms/rpi3+/mageia4arm.cfg~

@@ -0,0 +1,57 @@
1
+
2
+# Copyright (C) 2017-2018 Daniel Tartavel-jeannot   <contact@librepc.com>
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
+TARGET_VERSION="3"
24
+
25
+# URL of the Mageia mirror used to install ( see mirrors.mageia.org )
26
+MIRROR="http://ftp.free.fr/mirrors/mageia.org/distrib/$MAGEIA_VERSION/$ARM_VERSION"
27
+#MIRROR="/mnt/STOCK/mageia/distrib/$MAGEIA_VERSION/$ARM_VERSION"
28
+# image will be created here
29
+
30
+INSTALL_PATH="/mnt/perso/raspi-test"    
31
+
32
+# Build directory will be created here
33
+BUILD_PATH="$INSTALL_PATH/build"
34
+
35
+#name of the image
36
+IMAGE="Mageia-${MAGEIA_VERSION}-$TARGET.img"
37
+
38
+#Mount point of image's partitions
39
+BOOT="/mnt/boot"
40
+ROOT="/mnt/root"
41
+
42
+#Default user
43
+ID_USER="pi"
44
+PASSWORD="raspberry"
45
+
46
+#root password
47
+ROOT_PWD="piroot"
48
+
49
+#Hostname 
50
+HOSTNAME="$TARGET.$ID_USER" 
51
+
52
+#Filesystem of boot partitions (default ext4 raspberry pi need vfat)
53
+BOOTFS="vfat"
54
+
55
+#Path where the raspberry pi firmware is/will be installed
56
+FIRMWARE_PATH="$INSTALL_PATH"
57
+FIRMWARE_DIR="firmware-stable"

rpi3+/modprobe.conf → platforms/rpi3+/modprobe.conf


rpi3+/second_stage_install.sh → platforms/rpi3+/second_stage_install.sh


rpi3/10-monitor.conf → platforms/rpi3/10-monitor.conf


rpi3/10-vchiq-permissions.rules → platforms/rpi3/10-vchiq-permissions.rules


rpi3/brcmfmac43430-sdio.txt → platforms/rpi3/brcmfmac43430-sdio.txt


rpi3/brcmfmac43455-sdio.clm_blob → platforms/rpi3/brcmfmac43455-sdio.clm_blob


rpi3/brcmfmac43455-sdio.txt → platforms/rpi3/brcmfmac43455-sdio.txt


rpi3/extlinux.conf → platforms/rpi3/extlinux.conf


rpi3/mageia4arm.cfg → platforms/rpi3/mageia4arm.cfg


rpi/mageia4arm.cfg.original → platforms/rpi3/mageia4arm.cfg.original


+ 57 - 0
platforms/rpi3/mageia4arm.cfg~

@@ -0,0 +1,57 @@
1
+
2
+# Copyright (C) 2017-2018 Daniel Tartavel-jeannot   <contact@librepc.com>
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
+TARGET_VERSION="3"
24
+
25
+# URL of the Mageia mirror used to install ( see mirrors.mageia.org )
26
+MIRROR="http://ftp.free.fr/mirrors/mageia.org/distrib/$MAGEIA_VERSION/$ARM_VERSION"
27
+#MIRROR="/mnt/STOCK/mageia/distrib/$MAGEIA_VERSION/$ARM_VERSION"
28
+# image will be created here
29
+
30
+INSTALL_PATH="/mnt/perso/raspi-test"    
31
+
32
+# Build directory will be created here
33
+BUILD_PATH="$INSTALL_PATH/build"
34
+
35
+#name of the image
36
+IMAGE="Mageia-${MAGEIA_VERSION}-$TARGET.img"
37
+
38
+#Mount point of image's partitions
39
+BOOT="/mnt/boot"
40
+ROOT="/mnt/root"
41
+
42
+#Default user
43
+ID_USER="pi"
44
+PASSWORD="raspberry"
45
+
46
+#root password
47
+ROOT_PWD="piroot"
48
+
49
+#Hostname 
50
+HOSTNAME="$TARGET.$ID_USER" 
51
+
52
+#Filesystem of boot partitions (default ext4 raspberry pi need vfat)
53
+BOOTFS="vfat"
54
+
55
+#Path where the raspberry pi firmware is/will be installed
56
+FIRMWARE_PATH="$INSTALL_PATH"
57
+FIRMWARE_DIR="firmware-stable"

rpi3/modprobe.conf → platforms/rpi3/modprobe.conf


rpi3/second_stage_install.sh → platforms/rpi3/second_stage_install.sh


+ 11 - 11
xu4/boot.ini

@@ -13,11 +13,11 @@ setenv macaddr "00:1e:06:61:7a:87
13 13
 
14 14
 
15 15
 
16
-setenv bootrootfs "console=tty1 console=ttySAC2,115200n8 root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait ro fsck.repair=yes net.ifnames=0"
16
+setenv bootrootfs "console=tty1 console=ttySAC2,115200n8 root=UUID=<UUID> rootwait ro fsck.repair=yes net.ifnames=0"
17 17
 
18 18
 
19 19
 
20
-# --- Screen Configuration for HDMI --- # 
20
+# --- Screen Configuration for HDMI --- #
21 21
 # ---------------------------------------
22 22
 # Uncomment only ONE line! Leave all commented for automatic selection.
23 23
 # Uncomment only the setenv line!
@@ -43,7 +43,7 @@ setenv bootrootfs "console=tty1 console=ttySAC2,115200n8 root=UUID=e139ce78-9841
43 43
 # 1440x900 with monitor provided EDID information.
44 44
 # setenv videoconfig "video=HDMI-A-1:1440x900@60"
45 45
 # -----------------------------------------------
46
-# 1440x900 without monitor data using generic information 
46
+# 1440x900 without monitor data using generic information
47 47
 # setenv videoconfig "drm_kms_helper.edid_firmware=edid/1440x900.bin"
48 48
 # -----------------------------------------------
49 49
 # 1280x1024 without monitor data using generic information
@@ -61,16 +61,16 @@ setenv bootrootfs "console=tty1 console=ttySAC2,115200n8 root=UUID=e139ce78-9841
61 61
 # 1024x600 without monitor data using generic information (ODROID VU7+)
62 62
 # setenv videoconfig "drm_kms_helper.edid_firmware=edid/1024x600.bin"
63 63
 # -----------------------------------------------
64
-# 800x600 without monitor data using generic information 
64
+# 800x600 without monitor data using generic information
65 65
 # setenv videoconfig "drm_kms_helper.edid_firmware=edid/800x600.bin"
66 66
 # -----------------------------------------------
67 67
 # 800x480 without monitor data using generic information (ODROID 7")
68 68
 # setenv videoconfig "drm_kms_helper.edid_firmware=edid/800x480.bin"
69 69
 # -----------------------------------------------
70
-# 720x576 without monitor data using generic information 
70
+# 720x576 without monitor data using generic information
71 71
 # setenv videoconfig "drm_kms_helper.edid_firmware=edid/720x576.bin"
72 72
 # -----------------------------------------------
73
-# 720x480 without monitor data using generic information 
73
+# 720x480 without monitor data using generic information
74 74
 # setenv videoconfig "drm_kms_helper.edid_firmware=edid/720x480.bin"
75 75
 # -----------------------------------------------
76 76
 # 640x480 without monitor data using generic information
@@ -124,13 +124,13 @@ setenv disable_vu7 "true" # false
124 124
 #
125 125
 #------------------------------------------------------------------------------
126 126
 #
127
-# Forces the HDMI subsystem to ignore the check if the cable is connected or 
127
+# Forces the HDMI subsystem to ignore the check if the cable is connected or
128 128
 # not.
129 129
 # false : disable the detection and force it as connected.
130 130
 # true : let cable, board and monitor decide the connection status.
131
-# 
131
+#
132 132
 # default: true
133
-# 
133
+#
134 134
 #------------------------------------------------------------------------------
135 135
 setenv HPD "true"
136 136
 
@@ -209,7 +209,7 @@ setenv hdmi_phy_control "hdmi_tx_amp_lvl=${hdmi_tx_amp_lvl} hdmi_tx_lvl_ch0=${hd
209 209
 # Load kernel, initrd and dtb in that sequence
210 210
 fatload mmc 0:1 0x40008000 zImage
211 211
 fatload mmc 0:1 0x42000000 uInitrd
212
-fatload mmc 0:1 0x44000000 exynos5422-odroidxu3.dtb
212
+fatload mmc 0:1 0x44000000 <DTB>
213 213
 
214 214
 # set FDT address
215 215
 fdt addr 0x44000000
@@ -218,7 +218,7 @@ if test "${cecenable}" = "false"; then fdt rm /cec@101B0000; fi
218 218
 if test "${disable_vu7}" = "false"; then setenv hid_quirks "usbhid.quirks=0x0eef:0x0005:0x0004"; fi
219 219
 
220 220
 # final boot args
221
-setenv bootargs "${bootrootfs} ${videoconfig} smsc95xx.macaddr=${macaddr} governor=${governor} ${hdmi_phy_control} ${hid_quirks}" 
221
+setenv bootargs "${bootrootfs} ${videoconfig} smsc95xx.macaddr=${macaddr} governor=${governor} ${hdmi_phy_control} ${hid_quirks}"
222 222
 # drm.debug=0xff"
223 223
 # Boot the board
224 224
 bootz 0x40008000 0x42000000 0x44000000

BIN
platforms/xu4/boot.tar.gz


+ 10 - 0
platforms/xu4/extlinux.conf

@@ -0,0 +1,10 @@
1
+menu Welcome to Mageia-Minimal.
2
+timeout 20
3
+default Mageia
4
+
5
+label Mageia
6
+	kernel /boot/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 audit=0
8
+	fdtdir /usr/lib/<FDTDIR>
9
+	initrd /boot/initrd
10
+

+ 10 - 0
platforms/xu4/extlinux.conf.orig

@@ -0,0 +1,10 @@
1
+menu Welcome to Mageia-Minimal.
2
+timeout 20
3
+default Mageia
4
+
5
+label Mageia
6
+	kernel /boot/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 audit=0
8
+	fdtdir /usr/lib/<FDTDIR>
9
+	initrd /boot/initrd
10
+

xu4/mageia4arm.cfg → platforms/xu4/mageia4arm.cfg


+ 52 - 0
platforms/xu4/mageia4arm.cfg~

@@ -0,0 +1,52 @@
1
+
2
+# Copyright (C) 2017-2018 Daniel Tartavel-jeannot   <contact@librepc.com>
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="cauldron"
19
+ARM_VERSION="armv7hl"
20
+TARGET="xu4"
21
+
22
+# URL of the Mageia mirror used to install ( see mirrors.mageia.org )
23
+MIRROR="http://ftp.free.fr/mirrors/mageia.org/distrib/$MAGEIA_VERSION/$ARM_VERSION"
24
+
25
+# image will be created here
26
+INSTALL_PATH="/mnt/perso/xu4-test/"
27
+
28
+# Build directory will be created here
29
+BUILD_PATH="$INSTALL_PATH/build"
30
+
31
+#name of the image
32
+IMAGE="Mageia-${MAGEIA_VERSION}-$TARGET.img"
33
+
34
+#Mount point of image's partitions
35
+BOOT="/mnt/boot_xu4"
36
+ROOT="/mnt/root_xu4"
37
+
38
+#Default user
39
+ID_USER="odroid"
40
+PASSWORD="xu4"
41
+
42
+#root password
43
+ROOT_PWD="odroid"
44
+
45
+#Hostname
46
+HOSTNAME="xu4.odroid"
47
+
48
+#Filesystem of boot partitions (default ext4)
49
+BOOTFS=ext4
50
+
51
+#kernel package to install
52
+KERNEL=kernel-odroid

BIN
platforms/xu4/sd_fuse/bl1.bin.hardkernel


BIN
platforms/xu4/sd_fuse/bl2.bin.hardkernel.720k_uboot


+ 91 - 0
platforms/xu4/sd_fuse/sd_fusing.sh

@@ -0,0 +1,91 @@
1
+#
2
+# Copyright (C) 2011 Samsung Electronics Co., Ltd.
3
+#              http://www.samsung.com/
4
+#
5
+# This program is free software; you can redistribute it and/or modify
6
+# it under the terms of the GNU General Public License version 2 as
7
+# published by the Free Software Foundation.
8
+#
9
+####################################
10
+set -x
11
+
12
+if [ -z $1 ]
13
+then
14
+    echo "usage: ./sd_fusing.sh <SD Reader's device file>"
15
+    exit 0
16
+fi
17
+
18
+if [ -b $1 ]
19
+then
20
+    echo "$1 reader is identified."
21
+else
22
+    echo "$1 is NOT identified."
23
+    exit 0
24
+fi
25
+
26
+if [ -d /sys/block/${1##*/}boot0 ]; then
27
+    echo "$1 is an eMMC card, disabling ${1##*/}boot0 ro"
28
+    if ! echo -n 0 | sudo tee /sys/block/${1##*/}boot0/force_ro; then
29
+	echo "Enabling r/w for $1boot0 failed"
30
+	exit 1
31
+    fi
32
+    emmc=1
33
+fi
34
+
35
+####################################
36
+# fusing images
37
+
38
+if [ -n "$emmc" ]; then
39
+    signed_bl1_position=0
40
+    bl2_position=30
41
+    uboot_position=62
42
+    tzsw_position=1502
43
+    device=$1boot0
44
+else
45
+    signed_bl1_position=1
46
+    bl2_position=31
47
+    uboot_position=63
48
+    tzsw_position=1503
49
+    device=$1
50
+fi
51
+
52
+env_position=2015
53
+
54
+# Get the U-Boot blob
55
+if [ -f ./u-boot-dtb.bin ]; then
56
+  uboot="./u-boot-dtb.bin"
57
+elif [ -f ./u-boot.bin ]; then
58
+  uboot="./u-boot.bin"
59
+elif [ -f ../u-boot-dtb.bin ]; then
60
+  uboot="../u-boot-dtb.bin"
61
+elif [ -f ./u-boot.bin.hardkernel ]; then
62
+  uboot="./u-boot.bin.hardkernel"
63
+else
64
+  echo "U-Boot blob not found."
65
+  exit
66
+fi
67
+
68
+#<BL1 fusing>
69
+echo "BL1 fusing"
70
+sudo dd iflag=dsync oflag=dsync if=./bl1.bin.hardkernel of=$device seek=$signed_bl1_position
71
+
72
+#<BL2 fusing>
73
+echo "BL2 fusing"
74
+sudo dd iflag=dsync oflag=dsync if=./bl2.bin.hardkernel.720k_uboot of=$device seek=$bl2_position
75
+
76
+#<u-boot fusing>
77
+echo "u-boot fusing"
78
+sudo dd iflag=dsync oflag=dsync if=$uboot of=$device seek=$uboot_position
79
+
80
+#<TrustZone S/W fusing>
81
+echo "TrustZone S/W fusing"
82
+sudo dd iflag=dsync oflag=dsync if=./tzsw.bin.hardkernel of=$device seek=$tzsw_position
83
+
84
+#<u-boot env erase>
85
+echo "u-boot env erase..."
86
+sudo dd iflag=dsync oflag=dsync if=/dev/zero of=$device seek=$env_position bs=512 count=32
87
+
88
+####################################
89
+#<Message Display>
90
+echo "U-boot image is fused successfully."
91
+echo "Eject $1 and insert it again."

BIN
platforms/xu4/sd_fuse/tzsw.bin.hardkernel


BIN
platforms/xu4/sd_fuse/u-boot.bin.hardkernel


xu4/second_stage_install.sh → platforms/xu4/second_stage_install.sh


+ 34 - 0
platforms/xu4/second_stage_install.sh~

@@ -0,0 +1,34 @@
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
+/usr/bin/chown :shadow /etc/shadow /etc/gshadow /etc/login.defs /etc/pam.d/chage-chfn-chsh /etc/pam.d/chpasswd-newusers /etc/pam.d/system-auth /etc/pam.d/user-group-mod /bin/passwd /bin/chage
20
+
21
+/usr/bin/chown :systemd-journal -R /var/log/journal
22
+
23
+#Install all packages you need
24
+
25
+/usr/sbin/urpmi --auto --no-verify-rpm /root/kernel-odroid-4.14.y-1.armv7hl.rpm basesystem chrony rng-tools man openssh-server rfkill wireless-tools bluez wpa_supplicant make dracut u-boot-tools rsync
26
+#/usr/sbin/urpmi --urpmi-root "$BUILD_PATH"  --ignorearch --no-verify-rpm --auto --split-level 200 --split-length 200
27
+
28
+/usr/bin/chown :chrony -R /etc/chrony.keys /var/log/chrony
29
+/usr/bin/chown :daemon /etc/wpa_supplicant.conf
30
+/usr/bin/chown :tty /bin/write /bin/wall
31
+/usr/bin/chown :lock /sbin/lockdev
32
+/usr/bin/chown :bin /sbin/traceroute
33
+/usr/bin/chown polkitd /etc/polkit-1/rules.d
34
+

xu4/u-boot-20180507-3.mga7.armv7hl.rpm → platforms/xu4/u-boot-20180507-3.mga7.armv7hl.rpm


File diff suppressed because it is too large
+ 0 - 7898
rpi/config-4.9.0-6-armmp


+ 0 - 6
rpi/sed_extlinux.conf.sh

@@ -1,6 +0,0 @@
1
-#!/bin/sh
2
-cd /boot/extlinux
3
-sed -i.old -e s,/boot,,g extlinux.conf
4
-sed -i -e s,/usr/lib/.*,/fdt/,g extlinux.conf
5
-sed -i -e 's/append.*$/& audit=0 fsck.repair=1/' extlinux.conf
6
-

BIN
xu4/kernel-odroid-4.14.y-1.armv7hl.rpm