refactory recipes, move system dependencies code to board specific layer
This commit is contained in:
parent
b333742f9f
commit
8791a5d86d
@ -41,12 +41,6 @@ IMAGE_PREPROCESS_COMMAND += "image_patch;"
|
||||
image_patch () {
|
||||
# delete unused image
|
||||
rm -rf ${IMAGE_ROOTFS}/boot/*
|
||||
# create /etc/fstab
|
||||
cat << EOF > ${IMAGE_ROOTFS}/etc/fstab
|
||||
/dev/mmcblk1p1 /boot auto defaults 0 0
|
||||
/dev/mmcblk1p4 /home auto defaults 0 0
|
||||
|
||||
EOF
|
||||
cat << EOF > ${IMAGE_ROOTFS}/etc/hostname
|
||||
diya-recovery
|
||||
EOF
|
||||
|
@ -3,8 +3,10 @@
|
||||
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||
DESC="Auto deployment configuration from media"
|
||||
|
||||
. /etc/profile
|
||||
|
||||
if [ -z "$DISK" ]; then
|
||||
DISK="mmcblk1"
|
||||
DISK="mmcblk0"
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
|
@ -1,7 +1,8 @@
|
||||
#! /bin/sh
|
||||
. /etc/profile
|
||||
|
||||
if [ -z "$DISK" ]; then
|
||||
DISK="mmcblk1"
|
||||
DISK="mmcblk0"
|
||||
fi
|
||||
|
||||
if [ "$(/usr/bin/id -u)" -ne 0 ]; then
|
||||
|
@ -2,15 +2,18 @@
|
||||
|
||||
. /etc/profile
|
||||
|
||||
if [ -z "$DISK" ]; then
|
||||
DISK="mmcblk0"
|
||||
fi
|
||||
|
||||
DEFAULT_ROOTFS_NAME="rootfs-$MACHINE.tar.bz2"
|
||||
DEFAULT_KERNEL_NAME="Image-$MACHINE.bin"
|
||||
DEFAULT_INITRAMFS_NAME="recovery-$MACHINE.cpio.gz"
|
||||
UPDATE_SRC_PATH="/home/diya/.update"
|
||||
ROOTFS_DEV="/dev/mmcblk1p2"
|
||||
ROOTFS_DEV="/dev/${DISK}p2"
|
||||
SUPPORTED_COMMAND="rootfs kernel initramfs all"
|
||||
TMP_MOUNT="/tmp/rootfs"
|
||||
|
||||
|
||||
rootfs()
|
||||
{
|
||||
filename=$1
|
||||
@ -54,9 +57,9 @@ rootfs()
|
||||
echo "Patch /etc/fstab"
|
||||
cat << EOF >> $TMP_MOUNT/etc/fstab
|
||||
|
||||
/dev/mmcblk1p1 /boot vfat defaults 0 0
|
||||
/dev/mmcblk1p3 /var/etc ext4 defaults 0 0
|
||||
/dev/mmcblk1p4 /home ext4 defaults 0 0
|
||||
/dev/${DISK}p1 /boot vfat defaults 0 0
|
||||
/dev/${DISK}p3 /var/etc ext4 defaults 0 0
|
||||
/dev/${DISK}p4 /home ext4 defaults 0 0
|
||||
|
||||
EOF
|
||||
sync
|
||||
|
@ -1,12 +0,0 @@
|
||||
# short-description: Create Raspberry Pi SD card image
|
||||
# long-description: Creates a partitioned SD card image for use with
|
||||
|
||||
part u-boot --source rawcopy --sourceparams="file=${SPL_BINARY}" --ondisk mmcblk1 --no-table --align 8
|
||||
part /boot --source bootimg-partition --ondisk mmcblk1 --fstype=vfat --label boot --active --align 4096 --size 32
|
||||
# read only roofs
|
||||
part / --source rootfs --ondisk mmcblk1 --fstype=ext4 --label root --align 4096 --size 150 --exclude-path home/ --exclude-path var/etc/ --exclude-path boot/
|
||||
# modifiable configurations stored in /var/etc
|
||||
part /var/etc --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var/etc --ondisk mmcblk1 --fstype=ext4 --label diya --align 1024 --size 32
|
||||
# home partition
|
||||
part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --ondisk mmcblk1 --fstype=ext4 --label home --align 1024 --size 16
|
||||
# part /home --ondisk mmcblk1 --fstype=vfat --label music --active --align 1024 --size 16
|
Loading…
x
Reference in New Issue
Block a user