From 86a52fa755c3af47633b4e52950ee863218a80d5 Mon Sep 17 00:00:00 2001 From: Jybz Date: Sun, 5 Jan 2020 12:26:18 +0100 Subject: rpi3b+64b --- platforms/rpi3+64/firmware-stable.zip | Bin 21999616 -> 0 bytes platforms/rpi3+64/mageia4arm.cfg | 46 ++++++++++++++++++++++++--- platforms/rpi3+64/second_stage_install.sh | 24 ++++++++++---- platforms/rpi3+64/specialFunctions.sh | 50 +++++++++++++++++------------- platforms/rpi3+64/stable.zip | Bin 2945024 -> 0 bytes 5 files changed, 87 insertions(+), 33 deletions(-) delete mode 100644 platforms/rpi3+64/firmware-stable.zip delete mode 100644 platforms/rpi3+64/stable.zip (limited to 'platforms') diff --git a/platforms/rpi3+64/firmware-stable.zip b/platforms/rpi3+64/firmware-stable.zip deleted file mode 100644 index b8e29c3..0000000 Binary files a/platforms/rpi3+64/firmware-stable.zip and /dev/null differ diff --git a/platforms/rpi3+64/mageia4arm.cfg b/platforms/rpi3+64/mageia4arm.cfg index f852972..7efe3b8 100644 --- a/platforms/rpi3+64/mageia4arm.cfg +++ b/platforms/rpi3+64/mageia4arm.cfg @@ -17,6 +17,7 @@ MAGEIA_VERSION="7" ARM_VERSION="aarch64" +# ARM_VERSION="armv7hl" #target plateform (xu3-4 or rpi) TARGET="rpi" @@ -38,11 +39,11 @@ BUILD_PATH="${INSTALL_PATH}/build" IMAGE="Mageia-${MAGEIA_VERSION}-${TARGET}.img" #Default user -ID_USER="pi" -PASSWORD="raspberry" +# ID_USER="pi" +# PASSWORD="raspberry" #root password -ROOT_PWD="piroot" +# ROOT_PWD="piroot" #Hostname HOSTNAME="${TARGET}" @@ -61,5 +62,40 @@ BOOT_ARGS='dwc_otg.lpm_enable=0 console=ttyS0,115200 kgdboc=ttyS0,115200 console #Path where the raspberry pi firmware is/will be installed FIRMWARE_PATH="$INSTALL_PATH" FIRMWARE_DIR="firmware-stable" -FIRMWARE_DOWNLOAD_URL="https://github.com/raspberrypi/firmware/archive/stable.zip" - +INFORMATION=" +https://elinux.org/RPi_Software +https://www.raspberrypi.org/documentation/configuration/config-txt/boot.md + +https://github.com/raspberrypi/firmware/blob/master/boot/bootcode.bin +https://github.com/raspberrypi/firmware/blob/master/boot/bcm2710-rpi-3-b-plus.dtb + +https://github.com/raspberrypi/firmware/blob/master/boot/fixup.dat +https://github.com/raspberrypi/firmware/blob/master/boot/start.elf +https://github.com/raspberrypi/firmware/blob/master/boot/fixup4.dat #Rpi4 +https://github.com/raspberrypi/firmware/blob/master/boot/start4.elf #Rpi4 + +#Debug (implicitly used with start_debug=1) +https://github.com/raspberrypi/firmware/blob/master/boot/fixup_db.dat +https://github.com/raspberrypi/firmware/blob/master/boot/start_db.elf +https://github.com/raspberrypi/firmware/blob/master/boot/start4db.elf #Rpi4 +https://github.com/raspberrypi/firmware/blob/master/boot/fixup4db.dat #Rpi4 + +#Low GPU Memory (=16MB) +https://github.com/raspberrypi/firmware/blob/master/boot/fixup_cd.dat +https://github.com/raspberrypi/firmware/blob/master/boot/start_cd.elf +https://github.com/raspberrypi/firmware/blob/master/boot/start4cd.elf #Rpi4 +https://github.com/raspberrypi/firmware/blob/master/boot/fixup4cd.dat #Rpi4 + +#Testing versions (eXtra features) (like camera module) (implicitly used with start_x=1 ) : +https://github.com/raspberrypi/firmware/blob/master/boot/fixup_x.dat +https://github.com/raspberrypi/firmware/blob/master/boot/start_x.elf +https://github.com/raspberrypi/firmware/blob/master/boot/start4x.elf #Rpi4 +https://github.com/raspberrypi/firmware/blob/master/boot/fixup4x.dat #Rpi4 +" +FIRMWARE_DOWNLOAD_URL="https://github.com/raspberrypi/firmware/raw/master/boot/bootcode.bin +https://github.com/raspberrypi/firmware/raw/master/boot/bcm2710-rpi-3-b-plus.dtb +https://github.com/raspberrypi/firmware/raw/master/boot/fixup.dat +https://github.com/raspberrypi/firmware/raw/master/boot/start.elf +https://github.com/raspberrypi/firmware/raw/master/boot/fixup_x.dat +https://github.com/raspberrypi/firmware/raw/master/boot/start_x.elf +" diff --git a/platforms/rpi3+64/second_stage_install.sh b/platforms/rpi3+64/second_stage_install.sh index 0eea945..aee1d53 100644 --- a/platforms/rpi3+64/second_stage_install.sh +++ b/platforms/rpi3+64/second_stage_install.sh @@ -1,6 +1,7 @@ #!/bin/bash # Copyright (C) 2017-2018 Daniel Tartavel-jeannot +# Copyright (C) 2019-2020 Jean-Baptiste Biernacki # # This program is free software; you can redistribute it and/or modify @@ -16,6 +17,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +export ARCH=arm + /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 /usr/bin/chown :systemd-journal -R /var/log/journal @@ -33,11 +36,20 @@ /usr/bin/chown :bin /sbin/traceroute /usr/bin/chown polkitd /etc/polkit-1/rules.d -KV=`basename /boot/vmlinuz-*` -KV=${KV#vmlinuz-} -dracut --kver $KV -rm -f $0 -cp /boot/vmlinuz-* /boot/vmlinuz -cp /boot/initrd-* /boot/initrd +# KV=$(basename /boot/vmlinuz-*) +# KV=${KV#vmlinuz-} +# dracut --kver $KV + +VMLINUZ=$(ls --sort=time -1 /boot/vmlinuz-[[:digit:]]* | head -n 1) +# Normally, /boot/vmlinuz is generated with the /sbin/installkernel script, but it is not generated with chroot. +rm -f /boot/vmlinuz +ln -r -s "${VMLINUZ}" /boot/vmlinuz #For extlinux.conf + +rm -f ${0} + +K_INST_VERSION=$(rpm -q kernel-desktop-latest | sed -e 's/kernel-\([[:alnum:]]*\)-latest-\([\.[:digit:]]*\)-\([\.[:alnum:]]*\).*$/\2-\1-\3/') +dracut --no-compress --force --no-hostonly --local --no-early-microcode --confdir "/etc/dracut.conf.d" --kmoddir="/lib/modules/${K_INST_VERSION}" --xz --printsize --kernel-image /boot/vmlinuz --fstab /boot/initrd-${K_INST_VERSION}.img ${K_INST_VERSION} +ln -r -s /boot/initrd-${K_INST_VERSION}.img /boot/initrd.img +echo "Dracut done." alternatives --set soundprofile /etc/sound/profiles/alsa diff --git a/platforms/rpi3+64/specialFunctions.sh b/platforms/rpi3+64/specialFunctions.sh index c239b89..a62c794 100755 --- a/platforms/rpi3+64/specialFunctions.sh +++ b/platforms/rpi3+64/specialFunctions.sh @@ -40,29 +40,35 @@ FDISK_SCRIPT="${NEW_PART}\n${PRIMARY}\n${PART_BOOT}\n${PART_BOOT_FIRST_SECTOR}\n function preImgCreation() { + + title "Download binary blob for Rpi" + for i in ${FIRMWARE_DOWNLOAD_URL}; do + info "Download ${i}" + curl -L -O -J ${i} -s + done + +# if ! [ -d "${FIRMWARE_PATH}/${FIRMWARE_DIR}" ]; then # the firmware directory does not exists +# echo "$(ls *.zip| wc -l)" +# if [ "$(ls *.zip| wc -l)" -eq 0 ]; then # the firmware archive does not exists +# warning "The raspberry pi firmware need to be downloaded" +# info "Downloading FIRMWARE_FILENAME" +# wget ${FIRMWARE_DOWNLOAD_URL} +# # curl -L -O -J ${FIRMWARE_DOWNLOAD_URL} +# # curl -L ${FIRMWARE_DOWNLOAD_URL} -o firmware-stable.zip +# if [ ${?} -ne 0 ]; then +# error "line ${LINENO} error downloading raspberry firmware at ${FIRMWARE_DOWNLOAD_URL}: exiting" +# exit 1 +# fi +# fi +# info "extracting firmware" +# unzip -d "${FIRMWARE_PATH}" *.zip +# if [ ${?} -ne 0 ]; then +# error "line ${LINENO} error unzipping ${FIRMWARE_PATH} : exiting" +# exit 1 +# fi +# fi + title "Creating Pi image" - - if ! [ -d "${FIRMWARE_PATH}/${FIRMWARE_DIR}" ]; then # the firmware directory does not exists - echo "$(ls *.zip| wc -l)" - if [ "$(ls *.zip| wc -l)" -eq 0 ]; then # the firmware archive does not exists - warning "The raspberry pi firmware need to be downloaded" - info "Downloading FIRMWARE_FILENAME" - wget ${FIRMWARE_DOWNLOAD_URL} -# curl -L -O -J ${FIRMWARE_DOWNLOAD_URL} -# curl -L ${FIRMWARE_DOWNLOAD_URL} -o firmware-stable.zip - if [ ${?} -ne 0 ]; then - error "line ${LINENO} error downloading raspberry firmware at ${FIRMWARE_DOWNLOAD_URL}: exiting" - exit 1 - fi - fi - info "extracting firmware" - unzip -d "${FIRMWARE_PATH}" *.zip - if [ ${?} -ne 0 ]; then - error "line ${LINENO} error unzipping ${FIRMWARE_PATH} : exiting" - exit 1 - fi - fi - title "Making raspberry pi image" return 0 } diff --git a/platforms/rpi3+64/stable.zip b/platforms/rpi3+64/stable.zip deleted file mode 100644 index fd6dc63..0000000 Binary files a/platforms/rpi3+64/stable.zip and /dev/null differ -- cgit v1.2.1