22 lines
433 B
Bash
22 lines
433 B
Bash
#!/bin/sh
|
|
|
|
if [ "$1" = menu ]; then
|
|
init-menu-add-entry "$0" "Partitions"
|
|
exit
|
|
fi
|
|
|
|
norparts="256k(barebox),256k(bareboxenv),3584k(kernel),-(root)"
|
|
ramparts="-(ramdisk)"
|
|
|
|
if [ -e /dev/nor0 ]; then
|
|
addpart -n /dev/nor0 "${norparts}"
|
|
|
|
global linux.mtdparts.nor
|
|
global.linux.mtdparts.nor="physmap-flash.0:${norparts}"
|
|
else
|
|
echo "NOR Flash not found."
|
|
fi
|
|
|
|
global linux.mtdparts.ram
|
|
global.linux.mtdparts.ram="mtd-ram.0:${ramparts}"
|