add choice specific boot partition or not
This commit is contained in:
parent
bac0e2e1e2
commit
50c091ee5c
15
platforms/bananaPro/boot.cmd
Normal file
15
platforms/bananaPro/boot.cmd
Normal file
@ -0,0 +1,15 @@
|
||||
setenv bootargs console=ttyS0,115200 disp.screen0_output_mode=EDID:1024x768p50 hdmi.audio=EDID:0 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
|
||||
#bootargs='console=ttyS0,115200 disp.screen0_output_mode=EDID:1024x768p50 hdmi.audio=EDID:0 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait'
|
||||
#fatload mmc 0:1 0x40008000 vmlinuz
|
||||
#fatload mmc 0:1 0x44000000 sun7i-a20-bananapro.dtb
|
||||
#ext4ls mmc 0:1
|
||||
#ext4ls mmc 0:1 /boot/
|
||||
setenv memkernel 0x40008000
|
||||
setenv memdtb 0x48000000
|
||||
ext4load mmc 0:1 ${memkernel} /boot/vmlinuz
|
||||
ext4load mmc 0:1 ${memdtb} /boot/sun7i-a20-bananapro.dtb
|
||||
printenv
|
||||
bootz ${memkernel} - ${memdtb}
|
||||
#ext4load mmc 0:1 0x40008000 /boot/vmlinuz
|
||||
#ext4load mmc 0:1 0x48000000 /boot/sun7i-a20-bananapro.dtb
|
||||
#bootz 0x40008000 - 0x48000000
|
@ -62,7 +62,8 @@ ROOT_PWD="proroot"
|
||||
HOSTNAME="${TARGET}.${ID_USER}"
|
||||
|
||||
#Filesystem of boot partitions (default ext4 raspberry pi need vfat)
|
||||
BOOTFS="vfat"
|
||||
SEPARATE_BOOT_PARTITION=0
|
||||
BOOTFS="ext4"
|
||||
|
||||
#kernel package to install
|
||||
KERNEL="kernel-desktop"
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash -x
|
||||
|
||||
# Copyright (C) 2017-2018 Daniel Tartavel-jeannot <contact@librepc.com>
|
||||
#
|
||||
@ -21,14 +21,18 @@
|
||||
/usr/bin/chown :systemd-journal -R /var/log/journal
|
||||
|
||||
#Install all packages you need
|
||||
|
||||
/usr/sbin/urpmi --auto --no-verify-rpm basesystem chrony rng-tools man openssh-server rfkill wireless-tools bluez wpa_supplicant make dracut u-boot-tools rsync kernel-desktop-latest
|
||||
#/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 ./kernel-desktop-5.3.1-2.mga7-1-1.mga7.armv7hl.rpm
|
||||
# /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
|
||||
|
||||
/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
|
||||
|
||||
exit 0
|
||||
|
@ -8,17 +8,22 @@ CHANGE_TYPE=t
|
||||
CHANGE_BOOTFLAG=a
|
||||
APPLY=w
|
||||
|
||||
PART_BOOT=1
|
||||
PART_BOOT_FIRST_SECTOR=${DEFAULT}
|
||||
PART_BOOT_SIZE="+128M"
|
||||
# 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_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_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"
|
||||
|
||||
|
||||
|
||||
@ -32,14 +37,19 @@ function preImgCreation()
|
||||
|
||||
function postPrepareChroot()
|
||||
{
|
||||
info "copying update_testing/kernel-desktop in ${BUILD_PATH}/root"
|
||||
/usr/bin/cp --preserve=mode "${CONFIG_PATH}/kernel-desktop-5.3.1-2.mga7-1-1.mga7.armv7hl.rpm" "${BUILD_PATH}/root/"
|
||||
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/"
|
||||
/usr/bin/cp --preserve=mode "${CONFIG_PATH}/sun7i-a20-bananapro.dtb" "${BUILD_PATH}/boot/"
|
||||
/usr/bin/cp --preserve=mode "${CONFIG_PATH}/boot.scr" "${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
|
||||
}
|
||||
@ -47,14 +57,12 @@ function bunrningBootloader()
|
||||
function copyingCustomSystem()
|
||||
{
|
||||
#${BOOT} defined to the path to the mounted boot partition.
|
||||
# UBOOTCMD="${CONFIG_PATH}/uEnv.txt"
|
||||
UBOOTCMD="${CONFIG_PATH}/boot.scr"
|
||||
DTB="${CONFIG_PATH}/sun7i-a20-bananapro.dtb"
|
||||
VMLINUZ_LINK="${CONFIG_PATH}/vmlinuz"
|
||||
VMLINUZ_KERNEL="${CONFIG_PATH}/vmlinuz-5.3.1-desktop-2.mga7"
|
||||
/usr/bin/cp --preserve=mode "${DTB}" "${BOOT}"
|
||||
/usr/bin/cp --preserve=mode "${UBOOTCMD}" "${BOOT}/"
|
||||
/usr/bin/cp --preserve=mode "${VMLINUZ_LINK}" "${BOOT}/"
|
||||
/usr/bin/cp --preserve=mode "${VMLINUZ_KERNEL}" "${BOOT}/"
|
||||
# /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
|
||||
}
|
||||
|
Reference in New Issue
Block a user