added platform dir

This commit is contained in:
Daniel Tartavel committed 2019-09-29 06:50:44 +02:00
1 parent 22115e7251
commit 2a82e889e8
59 files changed
+375 -7965

No files matched your search

+43 -37
View File
@@ -36,10 +36,13 @@ function error()
echo -e "\e[1;31m$1\e[0m"
}
info $0
SOURCE_PATH="$(/bin/dirname "$(readlink -f "$0")")"
INSTALL_PATH="$SOURCE_PATH/arm"
FILES_PATH="$SOURCE_PATH/files"
info $0
PLATFORMS_PATH="$SOURCE_PATH/platforms"
CMDNAME=$(/bin/basename "$0")
#while read -r;do
@@ -277,10 +280,10 @@ function preparechroot()
echo "$HOSTNAME" > "$BUILD_PATH/etc/hostname"
info "copying second stage script in $BUILD_PATH"
echo "/bin/cp $SOURCE_PATH/$CONFIG_PATH/second_stage_install.sh $BUILD_PATH/"
cp --preserve=mode "$SOURCE_PATH/$CONFIG_PATH/second_stage_install.sh" "$BUILD_PATH/second_stage_install.sh"
echo "/bin/cp $CONFIG_PATH/second_stage_install.sh $BUILD_PATH/"
cp --preserve=mode "$CONFIG_PATH/second_stage_install.sh" "$BUILD_PATH/second_stage_install.sh"
if [ $? -ne 0 ];then
error "line $LINENO error copying $SOURCE_PATH/$CONFIG_PATH/second_stage_install.sh : exiting"
error "line $LINENO error copying $CONFIG_PATH/second_stage_install.sh : exiting"
exit 1
fi
@@ -306,12 +309,12 @@ EOF" >>"$BUILD_PATH/second_stage_install.sh"
#TEMPORARY CODE
#copying kernel odroid not existing in mageia repos
info "copying kernel-odroid and u-boot rpms in $BUILD_PATH/root"
echo "/bin/cp $SOURCE_PATH/$CONFIG_PATH/kernel-odroid-4.14.y-1.armv7hl.rpm $BUILD_PATH/root/"
/usr/bin/cp --preserve=mode "$SOURCE_PATH/$CONFIG_PATH/kernel-odroid-4.14.y-1.armv7hl.rpm" "$BUILD_PATH/root/"
echo "/bin/cp $SOURCE_PATH/$CONFIG_PATH/u-boot-20180507-3.mga7.armv7hl.rpm $BUILD_PATH/root/"
/usr/bin/cp --preserve=mode "$SOURCE_PATH/$CONFIG_PATH/u-boot-20180507-3.mga7.armv7hl.rpm" "$BUILD_PATH/root/"
echo "/bin/cp $CONFIG_PATH/kernel-odroid-4.14.y-1.armv7hl.rpm $BUILD_PATH/root/"
/usr/bin/cp --preserve=mode "$CONFIG_PATH/kernel-odroid-4.14.y-1.armv7hl.rpm" "$BUILD_PATH/root/"
echo "/bin/cp $CONFIG_PATH/u-boot-20180507-3.mga7.armv7hl.rpm $BUILD_PATH/root/"
/usr/bin/cp --preserve=mode "$CONFIG_PATH/u-boot-20180507-3.mga7.armv7hl.rpm" "$BUILD_PATH/root/"
if [ $? -ne 0 ];then
error "line $LINENO error copying $SOURCE_PATH/$CONFIG_PATH/kernel-odroid-4.14.y-1.armv7hl.rpm : exiting"
error "line $LINENO error copying $CONFIG_PATH/kernel-odroid-4.14.y-1.armv7hl.rpm : exiting"
exit 1
fi
;;
@@ -454,9 +457,9 @@ createimage()
DEVICE=$(/sbin/losetup -f --show "$INSTALL_PATH/$IMAGE")
if [ $TARGET = "odroid" ];then
info "installing blobs"
pushd "$SOURCE_PATH/$CONFIG_PATH/sd_fuse"
pushd "$CONFIG_PATH/sd_fuse"
if [ $? -ne 0 ];then
error "line $LINENO error directory $SOURCE_PATH/$CONFIG_PATH/sd_fuse does not exists : exiting"
error "line $LINENO error directory $CONFIG_PATH/sd_fuse does not exists : exiting"
exit 1
else
./sd_fusing.sh "$DEVICE"
@@ -556,7 +559,7 @@ UUID=$ROOT_UUID / ext4 defaults 0 0" > "$BUILD_PA
mkdir -p "$BUILD_PATH/boot/extlinux"
fi
if [ ! -f "$BUILD_PATH/boot/extlinux/extlinux.conf" ];then
sed -e s/\<UUID\>/$ROOT_UUID/g $SOURCE_PATH/$CONFIG_PATH/extlinux.conf >"$BUILD_PATH/boot/extlinux/extlinux.conf"
sed -e s/\<UUID\>/$ROOT_UUID/g $CONFIG_PATH/extlinux.conf >"$BUILD_PATH/boot/extlinux/extlinux.conf"
KERNEL_ID=`basename $BUILD_PATH/usr/lib/linux-*`
sed -i -e s/\<FDTDIR\>/$KERNEL_ID/g "$BUILD_PATH/boot/extlinux/extlinux.conf"
fi
@@ -564,7 +567,7 @@ UUID=$ROOT_UUID / ext4 defaults 0 0" > "$BUILD_PA
rpi)
info "copying 10-vchiq-permissions.rules"
cp --preserve=mode "$SOURCE_PATH/$CONFIG_PATH/10-vchiq-permissions.rules" "$BUILD_PATH/etc/udev/rules.d/"
cp --preserve=mode "$CONFIG_PATH/10-vchiq-permissions.rules" "$BUILD_PATH/etc/udev/rules.d/"
info "Making /etc/modules"
echo "vchiq
snd_bcm2835
@@ -576,7 +579,7 @@ brcmfmac" >> "$BUILD_PATH"/etc/modules
mkdir -p "$ARM_BOOT"
fi
info "copying modprobe.conf"
/usr/bin/cp -v --preserve=mode "$SOURCE_PATH/$CONFIG_PATH/modprobe.conf" "$BUILD_PATH/etc/"
/usr/bin/cp -v --preserve=mode "$CONFIG_PATH/modprobe.conf" "$BUILD_PATH/etc/"
chown root:root "$BUILD_PATH/etc/modprobe.conf"
info "copying firmware, overlays in rpi boot partition"
@@ -618,7 +621,7 @@ brcmfmac" >> "$BUILD_PATH"/etc/modules
/bin/mkdir -p "$ROOT/usr/lib/firmware/brcm/"
fi
if ! [ -f "$ROOT/usr/lib/firmware/brcm/brcmfmac434"* ];then
/bin/cp --preserve=mode "$SOURCE_PATH/$CONFIG_PATH/brcmfmac434"* "$ROOT/usr/lib/firmware/brcm/"
/bin/cp --preserve=mode "$CONFIG_PATH/brcmfmac434"* "$ROOT/usr/lib/firmware/brcm/"
if [ $? -ne 0 ];then
error "line $LINENO error copying wifi firmware in $ROOTP/usr/lib/firmware/brcm/ : exiting"
exit 1
@@ -626,8 +629,8 @@ brcmfmac" >> "$BUILD_PATH"/etc/modules
fi
info "copying Mageia image to root partition"
/bin/rsync -rlptDH --exclude "$ARM_BOOT/" --exclude "qemu-arm-static*" "$BUILD_PATH/" "$ROOT/"
/bin/rsync -rlptDH "$ARM_BOOT/" "$BOOT/"
/bin/rsync -rlptogDH --exclude "$ARM_BOOT/" --exclude "qemu-arm-static*" "$BUILD_PATH/" "$ROOT/"
/bin/rsync -rlptogDH "$ARM_BOOT/" "$BOOT/"
;;
odroid)
ODROID_BOOT="$BUILD_PATH/mnt/odroid_boot"
@@ -645,8 +648,8 @@ brcmfmac" >> "$BUILD_PATH"/etc/modules
info "Copying extlinux.conf on $ODROID_BOOT"
cp --preserve=mode -R "$BUILD_PATH/boot/extlinux" "$ODROID_BOOT/"
info "copying Mageia image to root partition"
/bin/rsync -rlptDH --exclude "$ODROID_BOOT/" --exclude "qemu-arm-static*" "$BUILD_PATH/" "$ROOT/"
/bin/rsync -rlptDH "$ODROID_BOOT/" "$BOOT/"
/bin/rsync -rlptogDH --exclude "$ODROID_BOOT/" --exclude "qemu-arm-static*" "$BUILD_PATH/" "$ROOT/"
/bin/rsync -rlptogDH "$ODROID_BOOT/" "$BOOT/"
;;
esac
@@ -768,7 +771,7 @@ do
shift 2
;;
--config)
CONFIG_PATH="$2"
CONFIG_PATH="$PLATFORMS_PATH/$2"
shift 2
;;
--bootfs)
@@ -792,33 +795,36 @@ done
# path of config file
if ! [ -d "$SOURCE_PATH/$CONFIG_PATH" ];then
info " Config path does not exists, defaulting to ./$TARGET"
CONFIG_PATH="$TARGET"
if ! [ -d "$CONFIG_PATH" ];then
info " Config path does not exists, defaulting to ./platforms/$TARGET"
CONFIG_PATH="$PLATFORMS_PATH/$TARGET"
warning "Do you want i make it and copy the template file in? [Y|n] "
read yn
if [ -z $yn ] || [ $yn = "Y" ] || [ $yn = "y" ];then
/usr/bin/mkdir "$CONFIG_PATH/"
/usr/bin/cp --preserve=mode "$SOURCE_PATH/config.template" "$CONFIG_PATH/mageia4arm.cfg"
warning "You need now to modify the config file ($CONFIG_PATH/mageia4arm.cfg) and relaunch the script"
exit 2
else
error( "Error: Can't continue without config file, exiting" )
exit 3
fi
fi
if [ -d "$SOURCE_PATH/$CONFIG_PATH" ];then
if [ -e "$SOURCE_PATH/$CONFIG_PATH/mageia4arm.cfg" ];then
info "using $SOURCE_PATH/$CONFIG_PATH/mageia4arm.cfg as config"
. "$SOURCE_PATH/$CONFIG_PATH/mageia4arm.cfg"
if [ -e "$CONFIG_PATH/mageia4arm.cfg" ];then
info "using $CONFIG_PATH/mageia4arm.cfg as config"
. "$CONFIG_PATH/mageia4arm.cfg"
else
warning "Config file does not exists, do you want i copy template ? [Y|n] "
read yn
if [ -z $yn ] || [ $yn = "Y" ] || [ $yn = "y" ];then
/usr/bin/cp --preserve=mode "$SOURCE_PATH/mageia4arm.cfg.template" "$SOURCE_PATH/$CONFIG_PATH/mageia4arm.cfg"
warning "You need now to modify the config file ($SOURCE_PATH/$CONFIG_PATH/mageia4arm.cfg) and relaunch the script"
/usr/bin/cp --preserve=mode "$SOURCE_PATH/mageia4arm.cfg.template" "$CONFIG_PATH/mageia4arm.cfg"
warning "You need now to modify the config file ($CONFIG_PATH/mageia4arm.cfg) and relaunch the script"
exit 2
fi
fi
else
warning "Config directory does not exists, do you want i make it and copy the template file in? [Y|n] "
read yn
if [ -z $yn ] || [ $yn = "Y" ] || [ $yn = "y" ];then
/usr/bin/mkdir "$SOURCE_PATH/$CONFIG_PATH/"
/usr/bin/cp --preserve=mode "$SOURCE_PATH/config.template" "$SOURCE_PATH/$CONFIG_PATH/mageia4arm.cfg"
warning "You need now to modify the config file ($SOURCE_PATH/$CONFIG_PATH/mageia4arm.cfg) and relaunch the script"
exit 2
fi
fi
if ! [ -z "$IMAGE_SIZE_P" ];then
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -15,27 +15,27 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
MAGEIA_VERSION="7"
ARM_VERSION="armv7hl"
MAGEIA_VERSION="6"
ARM_VERSION="armv5tl"
#target plateform (xu3-4 or rpi)
TARGET="rpi"
#version of the target
# 0, 1, 2 ,3_32 for rpi and 3 or 4 for odroid
TARGET_VERSION="3_32"
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"
#MIRROR="/mnt/STOCK/mageia/distrib/$MAGEIA_VERSION/$ARM_VERSION"
# image will be created here
INSTALL_PATH="/mnt/perso/raspi-test"
INSTALL_PATH="/mnt/perso/raspi1"
# Build directory will be created here
BUILD_PATH="$INSTALL_PATH/build"
#name of the image
IMAGE="Mageia-${MAGEIA_VERSION}-$TARGET.img"
IMAGE="Mageia-${MAGEIA_VERSION}-$TARGET$TARGET_VERSION.img"
#Mount point of image's partitions
BOOT="/mnt/boot"
@@ -58,4 +58,3 @@ BOOTFS="vfat"
FIRMWARE_PATH="$INSTALL_PATH"
FIRMWARE_DIR="firmware-stable"
FIRMWARE_DOWNLOAD_URL="https://github.com/raspberrypi/firmware/archive/stable.zip"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -19,7 +19,7 @@ MAGEIA_VERSION="7"
ARM_VERSION="armv7hl"
#target plateform (xu3-4 or rpi)
TARGET="rpi"
TARGET="rpi"
#version of the target
# 0, 1, 2 ,3_32 for rpi and 3 or 4 for odroid
TARGET_VERSION="3_32"
@@ -47,8 +47,8 @@ PASSWORD="raspberry"
#root password
ROOT_PWD="piroot"
#Hostname
HOSTNAME="$TARGET.$ID_USER"
#Hostname
HOSTNAME="$TARGET.$ID_USER"
#Filesystem of boot partitions (default ext4 raspberry pi need vfat)
#DO NOT CHANGE THIS
@@ -15,11 +15,12 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
MAGEIA_VERSION="cauldron"
MAGEIA_VERSION="7"
ARM_VERSION="armv7hl"
#target plateform (xu3-4 or rpi)
TARGET="rpi"
TARGET_VERSION="3"
# 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"
@@ -51,9 +52,6 @@ HOSTNAME="$TARGET.$ID_USER"
#Filesystem of boot partitions (default ext4 raspberry pi need vfat)
BOOTFS="vfat"
#kernel package to install (just needed for odroid)
KERNEL=""
#Path where the raspberry pi firmware is/will be installed
FIRMWARE_PATH="$INSTALL_PATH"
FIRMWARE_DIR="firmware-stable"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+57
View File
@@ -0,0 +1,57 @@
# 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/>.
MAGEIA_VERSION="7"
ARM_VERSION="armv7hl"
#target plateform (xu3-4 or rpi)
TARGET="rpi"
TARGET_VERSION="3"
# 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"
#MIRROR="/mnt/STOCK/mageia/distrib/$MAGEIA_VERSION/$ARM_VERSION"
# image will be created here
INSTALL_PATH="/mnt/perso/raspi-test"
# 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
ID_USER="pi"
PASSWORD="raspberry"
#root password
ROOT_PWD="piroot"
#Hostname
HOSTNAME="$TARGET.$ID_USER"
#Filesystem of boot partitions (default ext4 raspberry pi need vfat)
BOOTFS="vfat"
#Path where the raspberry pi firmware is/will be installed
FIRMWARE_PATH="$INSTALL_PATH"
FIRMWARE_DIR="firmware-stable"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+57
View File
@@ -0,0 +1,57 @@
# 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/>.
MAGEIA_VERSION="7"
ARM_VERSION="armv7hl"
#target plateform (xu3-4 or rpi)
TARGET="rpi"
TARGET_VERSION="3"
# 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"
#MIRROR="/mnt/STOCK/mageia/distrib/$MAGEIA_VERSION/$ARM_VERSION"
# image will be created here
INSTALL_PATH="/mnt/perso/raspi-test"
# 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
ID_USER="pi"
PASSWORD="raspberry"
#root password
ROOT_PWD="piroot"
#Hostname
HOSTNAME="$TARGET.$ID_USER"
#Filesystem of boot partitions (default ext4 raspberry pi need vfat)
BOOTFS="vfat"
#Path where the raspberry pi firmware is/will be installed
FIRMWARE_PATH="$INSTALL_PATH"
FIRMWARE_DIR="firmware-stable"
File renamed without changes.
File renamed without changes.
+11 -11
View File
@@ -13,11 +13,11 @@ setenv macaddr "00:1e:06:61:7a:87
setenv bootrootfs "console=tty1 console=ttySAC2,115200n8 root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait ro fsck.repair=yes net.ifnames=0"
setenv bootrootfs "console=tty1 console=ttySAC2,115200n8 root=UUID=<UUID> rootwait ro fsck.repair=yes net.ifnames=0"
# --- Screen Configuration for HDMI --- #
# --- Screen Configuration for HDMI --- #
# ---------------------------------------
# Uncomment only ONE line! Leave all commented for automatic selection.
# Uncomment only the setenv line!
@@ -43,7 +43,7 @@ setenv bootrootfs "console=tty1 console=ttySAC2,115200n8 root=UUID=e139ce78-9841
# 1440x900 with monitor provided EDID information.
# setenv videoconfig "video=HDMI-A-1:1440x900@60"
# -----------------------------------------------
# 1440x900 without monitor data using generic information
# 1440x900 without monitor data using generic information
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/1440x900.bin"
# -----------------------------------------------
# 1280x1024 without monitor data using generic information
@@ -61,16 +61,16 @@ setenv bootrootfs "console=tty1 console=ttySAC2,115200n8 root=UUID=e139ce78-9841
# 1024x600 without monitor data using generic information (ODROID VU7+)
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/1024x600.bin"
# -----------------------------------------------
# 800x600 without monitor data using generic information
# 800x600 without monitor data using generic information
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/800x600.bin"
# -----------------------------------------------
# 800x480 without monitor data using generic information (ODROID 7")
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/800x480.bin"
# -----------------------------------------------
# 720x576 without monitor data using generic information
# 720x576 without monitor data using generic information
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/720x576.bin"
# -----------------------------------------------
# 720x480 without monitor data using generic information
# 720x480 without monitor data using generic information
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/720x480.bin"
# -----------------------------------------------
# 640x480 without monitor data using generic information
@@ -124,13 +124,13 @@ setenv disable_vu7 "true" # false
#
#------------------------------------------------------------------------------
#
# Forces the HDMI subsystem to ignore the check if the cable is connected or
# Forces the HDMI subsystem to ignore the check if the cable is connected or
# not.
# false : disable the detection and force it as connected.
# true : let cable, board and monitor decide the connection status.
#
#
# default: true
#
#
#------------------------------------------------------------------------------
setenv HPD "true"
@@ -209,7 +209,7 @@ setenv hdmi_phy_control "hdmi_tx_amp_lvl=${hdmi_tx_amp_lvl} hdmi_tx_lvl_ch0=${hd
# Load kernel, initrd and dtb in that sequence
fatload mmc 0:1 0x40008000 zImage
fatload mmc 0:1 0x42000000 uInitrd
fatload mmc 0:1 0x44000000 exynos5422-odroidxu3.dtb
fatload mmc 0:1 0x44000000 <DTB>
# set FDT address
fdt addr 0x44000000
@@ -218,7 +218,7 @@ if test "${cecenable}" = "false"; then fdt rm /cec@101B0000; fi
if test "${disable_vu7}" = "false"; then setenv hid_quirks "usbhid.quirks=0x0eef:0x0005:0x0004"; fi
# final boot args
setenv bootargs "${bootrootfs} ${videoconfig} smsc95xx.macaddr=${macaddr} governor=${governor} ${hdmi_phy_control} ${hid_quirks}"
setenv bootargs "${bootrootfs} ${videoconfig} smsc95xx.macaddr=${macaddr} governor=${governor} ${hdmi_phy_control} ${hid_quirks}"
# drm.debug=0xff"
# Boot the board
bootz 0x40008000 0x42000000 0x44000000
Binary file not shown.
+10
View File
@@ -0,0 +1,10 @@
menu Welcome to Mageia-Minimal.
timeout 20
default Mageia
label Mageia
kernel /boot/vmlinuz
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
fdtdir /usr/lib/<FDTDIR>
initrd /boot/initrd
+10
View File
@@ -0,0 +1,10 @@
menu Welcome to Mageia-Minimal.
timeout 20
default Mageia
label Mageia
kernel /boot/vmlinuz
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
fdtdir /usr/lib/<FDTDIR>
initrd /boot/initrd
File renamed without changes.
+52
View File
@@ -0,0 +1,52 @@
# 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/>.
MAGEIA_VERSION="cauldron"
ARM_VERSION="armv7hl"
TARGET="xu4"
# 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
INSTALL_PATH="/mnt/perso/xu4-test/"
# 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_xu4"
ROOT="/mnt/root_xu4"
#Default user
ID_USER="odroid"
PASSWORD="xu4"
#root password
ROOT_PWD="odroid"
#Hostname
HOSTNAME="xu4.odroid"
#Filesystem of boot partitions (default ext4)
BOOTFS=ext4
#kernel package to install
KERNEL=kernel-odroid
Binary file not shown.
Binary file not shown.
+91
View File
@@ -0,0 +1,91 @@
#
# Copyright (C) 2011 Samsung Electronics Co., Ltd.
# http://www.samsung.com/
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
####################################
set -x
if [ -z $1 ]
then
echo "usage: ./sd_fusing.sh <SD Reader's device file>"
exit 0
fi
if [ -b $1 ]
then
echo "$1 reader is identified."
else
echo "$1 is NOT identified."
exit 0
fi
if [ -d /sys/block/${1##*/}boot0 ]; then
echo "$1 is an eMMC card, disabling ${1##*/}boot0 ro"
if ! echo -n 0 | sudo tee /sys/block/${1##*/}boot0/force_ro; then
echo "Enabling r/w for $1boot0 failed"
exit 1
fi
emmc=1
fi
####################################
# fusing images
if [ -n "$emmc" ]; then
signed_bl1_position=0
bl2_position=30
uboot_position=62
tzsw_position=1502
device=$1boot0
else
signed_bl1_position=1
bl2_position=31
uboot_position=63
tzsw_position=1503
device=$1
fi
env_position=2015
# Get the U-Boot blob
if [ -f ./u-boot-dtb.bin ]; then
uboot="./u-boot-dtb.bin"
elif [ -f ./u-boot.bin ]; then
uboot="./u-boot.bin"
elif [ -f ../u-boot-dtb.bin ]; then
uboot="../u-boot-dtb.bin"
elif [ -f ./u-boot.bin.hardkernel ]; then
uboot="./u-boot.bin.hardkernel"
else
echo "U-Boot blob not found."
exit
fi
#<BL1 fusing>
echo "BL1 fusing"
sudo dd iflag=dsync oflag=dsync if=./bl1.bin.hardkernel of=$device seek=$signed_bl1_position
#<BL2 fusing>
echo "BL2 fusing"
sudo dd iflag=dsync oflag=dsync if=./bl2.bin.hardkernel.720k_uboot of=$device seek=$bl2_position
#<u-boot fusing>
echo "u-boot fusing"
sudo dd iflag=dsync oflag=dsync if=$uboot of=$device seek=$uboot_position
#<TrustZone S/W fusing>
echo "TrustZone S/W fusing"
sudo dd iflag=dsync oflag=dsync if=./tzsw.bin.hardkernel of=$device seek=$tzsw_position
#<u-boot env erase>
echo "u-boot env erase..."
sudo dd iflag=dsync oflag=dsync if=/dev/zero of=$device seek=$env_position bs=512 count=32
####################################
#<Message Display>
echo "U-boot image is fused successfully."
echo "Eject $1 and insert it again."
Binary file not shown.
Binary file not shown.
File renamed without changes.
+34
View File
@@ -0,0 +1,34 @@
#!/bin/bash
# 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 /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
#/usr/sbin/urpmi --urpmi-root "$BUILD_PATH" --ignorearch --no-verify-rpm --auto --split-level 200 --split-length 200
/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
File diff suppressed because it is too large. Load diff
-6
View File
@@ -1,6 +0,0 @@
#!/bin/sh
cd /boot/extlinux
sed -i.old -e s,/boot,,g extlinux.conf
sed -i -e s,/usr/lib/.*,/fdt/,g extlinux.conf
sed -i -e 's/append.*$/& audit=0 fsck.repair=1/' extlinux.conf
Binary file not shown.