MAJ
This commit is contained in:
parent
55533d5184
commit
854ce6b5cc
24
platforms/bananaPro/boot.cmd
Normal file
24
platforms/bananaPro/boot.cmd
Normal file
@ -0,0 +1,24 @@
|
||||
setenv KERNEL_FILE /boot/vmlinuz
|
||||
setenv INIT_FILE /boot/initrd.img
|
||||
#setenv DTB_FILE /boot/sun7i-a20-bananapro.dtb
|
||||
setenv DTB_FILE /boot/u-boot.dtb
|
||||
|
||||
setenv KERNEL_ADDR 0x40008000
|
||||
#setenv INIT_ADDR 0x45000000
|
||||
setenv INIT_ADDR -
|
||||
setenv DTB_ADDR 0x48000000
|
||||
|
||||
ext4load mmc 0:1 ${KERNEL_ADDR} ${KERNEL_FILE}
|
||||
#ext4load mmc 0:1 ${INIT_ADDR} ${INIT_FILE}
|
||||
ext4load mmc 0:1 ${DTB_ADDR} ${DTB_FILE}
|
||||
|
||||
setenv bootargs console=ttyS0,115200 disp.screen0_output_mode=EDID:1024x768p50 hdmi.audio=EDID:0 root=/dev/mmcblk0p1 rootfstype=ext4 elevator=deadline rootwait
|
||||
|
||||
#printenv
|
||||
bootz ${KERNEL_ADDR} ${INIT_ADDR} ${DTB_ADDR}
|
||||
|
||||
#Compile boot.scr : mkimage -C none -A arm -T script -d "${CONFIG_PATH}/boot.cmd" "${CONFIG_PATH}/boot.scr"
|
||||
|
||||
# ext4load mmc 0:1 0x40008000 /boot/vmlinuz
|
||||
# ext4load mmc 0:1 0x48000000 /boot/u-boot.dtb
|
||||
# bootz 0x40008000 - 0x48000000
|
74
platforms/bananaPro/mageia4arm.cfg
Normal file
74
platforms/bananaPro/mageia4arm.cfg
Normal file
@ -0,0 +1,74 @@
|
||||
|
||||
# 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/>.
|
||||
|
||||
#BananaPro informations : http://wiki.lemaker.org/BananaPro/Pi:Building_u-boot,_script.bin_and_linux-kernel#Installation
|
||||
#BananaPro sources : https://github.com/LeMaker/lemaker-bsp
|
||||
# Kernel : https://github.com/LeMaker/linux-sunxi
|
||||
# FEX (DTS) : https://github.com/LeMaker/sunxi-boards
|
||||
|
||||
# Mageia version 7 or later, cauldron.
|
||||
# TO MODIFY
|
||||
MAGEIA_VERSION="7"
|
||||
# Arm version armv7hl, aarch64
|
||||
# TO MODIFY
|
||||
ARM_VERSION="armv7hl"
|
||||
|
||||
# Target plateform (odroid or rpi)
|
||||
# TO MODIFY
|
||||
TARGET="bananaPro"
|
||||
# Target version (0,2,3 for raspi, 3 or 4 for odroid)
|
||||
#TO MODIFY
|
||||
TARGET_VERSION="1"
|
||||
|
||||
# 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
|
||||
# TO MODIFY
|
||||
INSTALL_PATH="./${TARGET}"
|
||||
|
||||
# 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
|
||||
BOOT="/mnt/boot"
|
||||
ROOT="/mnt/root"
|
||||
|
||||
# Default user
|
||||
# TO MODIFY
|
||||
ID_USER="banana"
|
||||
PASSWORD="bananaPro"
|
||||
|
||||
#root password
|
||||
ROOT_PWD="ProR00t"
|
||||
|
||||
#Hostname
|
||||
HOSTNAME="${TARGET}.${ID_USER}"
|
||||
|
||||
#Filesystem of boot partitions (default ext4 raspberry pi need vfat)
|
||||
SEPARATE_BOOT_PARTITION=0
|
||||
BOOTFS="ext4"
|
||||
|
||||
#kernel package to install
|
||||
KERNEL="kernel-desktop"
|
||||
|
||||
#Path where the raspberry pi firmware is/will be installed ( just needed for raspberry pi )
|
||||
FIRMWARE_PATH="${INSTALL_PATH}/"
|
||||
#FIRMWARE_DIR="firmware-stable"
|
||||
#FIRMWARE_DOWNLOAD_URL="https://github.com/raspberrypi/firmware/archive/stable.zip"
|
51
platforms/bananaPro/second_stage_install.sh
Normal file
51
platforms/bananaPro/second_stage_install.sh
Normal file
@ -0,0 +1,51 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# 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/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
|
||||
|
||||
#Install all packages you need
|
||||
/usr/sbin/urpmi --auto --no-verify-rpm basesystem dracut chrony rng-tools man openssh-server rfkill wireless-tools bluez wpa_supplicant make u-boot-tools rsync kernel-desktop-latest systemd-bootchart libcap-utils keyutils mindi-busybox plymouth-scripts lvm2 binutils #dmsetup
|
||||
#/usr/sbin/urpmi --urpmi-root "$BUILD_PATH" --ignorearch --no-verify-rpm --auto --split-level 200 --split-length 200
|
||||
# /usr/sbin/urpmi --auto --no-verify-rpm /root/kernel-desktop-5.3.1-2.mga7-1-1.mga7.armv7hl.rpm
|
||||
# echo "Install kernel from testing :"
|
||||
# /usr/sbin/urpmi.update Testing
|
||||
# /usr/sbin/urpmi --media Testing kernel-desktop-5.3.2-1.mga7
|
||||
# /usr/sbin/urpme kernel-desktop-5.2.13-2.mga7-1-1.mga7.armv7hl
|
||||
echo "Urpmi finished."
|
||||
# dracut --no-compress --force
|
||||
# ls -v1r /boot/vmlinuz*
|
||||
# echo "--"
|
||||
# ls -v1r /boot/vmlinuz-[[:digit:]]*
|
||||
# rm -f /boot/vmlinuz
|
||||
# ln -r -s $(ls -v1r /boot/vmlinuz-[[:digit:]]* | grep -m 1 "vmlinuz") ./boot/vmlinuz
|
||||
# ls -v1r /boot/initrd-[[:digit:]]*
|
||||
# rm -f /boot/initrd.img
|
||||
# ln -r -s $(ls -v1r /boot/initrd-[[:digit:]]* | grep -m 1 "initrd") ./boot/initrd.img
|
||||
# echo "--"
|
||||
# dracut --print-cmdline
|
||||
|
||||
/usr/bin/chown :chrony -R /etc/chrony.keys /var/log/chrony
|
||||
/usr/bin/chown :daemon /etc/wpa_supplicant.conf
|
||||
/usr/bin/chown :tty /bin/write /bin/wall
|
||||
/usr/bin/chown :lock /sbin/lockdev
|
||||
/usr/bin/chown :bin /sbin/traceroute
|
||||
/usr/bin/chown polkitd /etc/polkit-1/rules.d
|
||||
|
||||
#DO NOT EXIT THE SCRIPT. A second part is automatically added in this script during the process in order to create the default user and set root password.
|
70
platforms/bananaPro/specialFunctions.sh
Normal file
70
platforms/bananaPro/specialFunctions.sh
Normal file
@ -0,0 +1,70 @@
|
||||
#!/bin/bash
|
||||
|
||||
#RPI partitionning :
|
||||
DEFAULT=""
|
||||
NEW_PART=n
|
||||
PRIMARY=p
|
||||
CHANGE_TYPE=t
|
||||
CHANGE_BOOTFLAG=a
|
||||
APPLY=w
|
||||
|
||||
# PART_BOOT=1
|
||||
# PART_BOOT_FIRST_SECTOR=${DEFAULT}
|
||||
# PART_BOOT_SIZE="+128M"
|
||||
#
|
||||
# PART_ROOT=2
|
||||
# PART_ROOT_FIRST_SECTOR=${DEFAULT}
|
||||
# PART_ROOT_SIZE=${DEFAULT}
|
||||
|
||||
PART_BOOTandROOT=1
|
||||
PART_BOOTandROOT_FIRST_SECTOR=${DEFAULT}
|
||||
PART_BOOTandROOT_SIZE=${DEFAULT}
|
||||
|
||||
TYPE_FAT32LBA=c
|
||||
|
||||
#FDISK_SCRIPT="${NEW_PART}\n${PRIMARY}\n${PART_BOOT}\n${PART_BOOT_FIRST_SECTOR}\n${PART_BOOT_SIZE}\n${CHANGE_TYPE}\n${TYPE_FAT32LBA}\n${NEW_PART}\n${PRIMARY}\n${PART_ROOT}\n${PART_ROOT_FIRST_SECTOR}\n${PART_ROOT_SIZE}\n${CHANGE_BOOTFLAG}\n${PART_BOOT}\n${CHANGE_BOOTFLAG}\n${PART_ROOT}\n${APPLY}\n"
|
||||
FDISK_SCRIPT="${NEW_PART}\n${PRIMARY}\n${PART_BOOTandROOT}\n${PART_BOOT_FIRST_SECTOR}\n${PART_PART_BOOTandROOT_SIZE}\n${CHANGE_BOOTFLAG}\n${PART_PART_BOOTandROOT}\n${APPLY}\n"
|
||||
|
||||
|
||||
|
||||
function preImgCreation()
|
||||
{
|
||||
title "Creating Banana Pro image"
|
||||
#Nothing to download.
|
||||
# mkimage -C none -A arm -T script -d "${CONFIG_PATH}/boot.cmd" "${CONFIG_PATH}/boot.scr"
|
||||
return 0
|
||||
}
|
||||
|
||||
|
||||
function postPrepareChroot()
|
||||
{
|
||||
info "copying kernel-desktop, dtb, boot.scr and vmlinuz symlink in ${BUILD_PATH}/boot"
|
||||
# /usr/bin/cp --preserve=mode "${CONFIG_PATH}/kernel-desktop-5.3.1-2.mga7-1-1.mga7.armv7hl.rpm" "${BUILD_PATH}/root/"
|
||||
mkimage -C none -A arm -T script -d "${CONFIG_PATH}/boot.cmd" "${BUILD_PATH}/boot/boot.scr"
|
||||
/usr/bin/cp --preserve=mode "${CONFIG_PATH}/sun7i-a20-bananapro.dtb" "${BUILD_PATH}/boot/"
|
||||
/usr/bin/cp --preserve=mode "${CONFIG_PATH}/u-boot.dtb" "${BUILD_PATH}/boot/"
|
||||
# /usr/bin/cp --preserve=mode "${CONFIG_PATH}/uboot.env" "${BUILD_PATH}/boot/"
|
||||
/usr/bin/cp --preserve=mode -d "${CONFIG_PATH}/vmlinuz" "${BUILD_PATH}/boot/"
|
||||
return 0
|
||||
}
|
||||
|
||||
function bunrningBootloader()
|
||||
{
|
||||
# DEVICE is set just before this function and looped.
|
||||
title "Burning the bootloader..."
|
||||
dd if=${CONFIG_PATH}/u-boot-sunxi-with-spl.bin of=${DEVICE} bs=1024 seek=8
|
||||
return 0
|
||||
}
|
||||
|
||||
function copyingCustomSystem()
|
||||
{
|
||||
#${BOOT} defined to the path to the mounted boot partition.
|
||||
# /usr/bin/cp --preserve=mode "${CONFIG_PATH}/vmlinuz-5.3.1-desktop-2.mga7" "${BOOT}"
|
||||
# /usr/bin/cp --preserve=mode "${CONFIG_PATH}/sun7i-a20-bananapro.dtb" "${BOOT}"
|
||||
# /usr/bin/cp --preserve=mode "${CONFIG_PATH}/boot.scr" "${BOOT}/"
|
||||
# /usr/bin/cp --preserve=mode "${CONFIG_PATH}/uboot.env" "${BOOT}/"
|
||||
# /usr/bin/cp --preserve=mode "${CONFIG_PATH}/uEnv.txt" "${BOOT}/"
|
||||
# /usr/bin/cp --preserve=mode -d "${CONFIG_PATH}/vmlinuz" "${BOOT}/"
|
||||
cp --preserve=mode -R "${BUILD_PATH}/boot/extlinux" "${BOOT}/"
|
||||
return 0
|
||||
}
|
BIN
platforms/bananaPro/sun7i-a20-bananapro.dtb
Normal file
BIN
platforms/bananaPro/sun7i-a20-bananapro.dtb
Normal file
Binary file not shown.
Reference in New Issue
Block a user