defaultenv-2: mtdparts-add: Use new partition parameter
mtd devices now have a partition parameter to create mtd partitions. Use it to simplify the mtdparts-add script. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
341f7d5574
commit
cd7feae00b
|
@ -26,13 +26,12 @@ if [ -z "${parts}" ]; then
|
|||
exit
|
||||
fi
|
||||
|
||||
if [ -e /tmp/mtdparts/${device} ]; then
|
||||
delpart /dev/${device}.*
|
||||
${device}.partitions="$parts"
|
||||
if [ $? != 0 ]; then
|
||||
echo "Failed to add partitions $parts to $device"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
addpart -n /dev/${device} "$parts" || exit
|
||||
mkdir -p /tmp/mtdparts/${device}
|
||||
|
||||
if [ -n ${kernelname} ]; then
|
||||
global linux.mtdparts.${device}
|
||||
global.linux.mtdparts.${device}="${kernelname}:${parts}"
|
||||
|
|
Loading…
Reference in New Issue