mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-19 11:16:32 +00:00
mvebu: image: don't create unnecessarily shell variables
Use make syntax to pass the U-Boot image location and boot with root partitions size, instead of relying on shell functions and variables. Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
This commit is contained in:
parent
9509a6df0b
commit
30b5554411
@ -42,25 +42,19 @@ define Build/boot-img-ext4
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/sdcard-img
|
define Build/sdcard-img
|
||||||
if [ -n "$(UBOOT)" ]; then UBOOT="$(STAGING_DIR_IMAGE)/$(UBOOT)"; fi; \
|
|
||||||
BOOTFS_SIZE=$$(( $(CONFIG_TARGET_KERNEL_PARTSIZE) * 1024 * 2 )); \
|
|
||||||
ROOTFS_SIZE=$$(( $(CONFIG_TARGET_ROOTFS_PARTSIZE) * 1024 * 2 )); \
|
|
||||||
SIGNATURE="$(SIGNATURE)" \
|
SIGNATURE="$(SIGNATURE)" \
|
||||||
./gen_mvebu_sdcard_img.sh $@ \
|
./gen_mvebu_sdcard_img.sh $@ \
|
||||||
$$UBOOT \
|
$(if $(UBOOT),$(STAGING_DIR_IMAGE)/$(UBOOT)) \
|
||||||
c $$BOOTFS_SIZE $@.boot \
|
c $(CONFIG_TARGET_KERNEL_PARTSIZE) $@.boot \
|
||||||
83 $$ROOTFS_SIZE $(IMAGE_ROOTFS)
|
83 $(CONFIG_TARGET_ROOTFS_PARTSIZE) $(IMAGE_ROOTFS)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/sdcard-img-ext4
|
define Build/sdcard-img-ext4
|
||||||
if [ -n "$(UBOOT)" ]; then UBOOT="$(STAGING_DIR_IMAGE)/$(UBOOT)"; fi; \
|
|
||||||
BOOTFS_SIZE=$$(( $(CONFIG_TARGET_KERNEL_PARTSIZE) * 1024 * 2 )); \
|
|
||||||
ROOTFS_SIZE=$$(( $(CONFIG_TARGET_ROOTFS_PARTSIZE) * 1024 * 2 )); \
|
|
||||||
SIGNATURE="$(SIGNATURE)" \
|
SIGNATURE="$(SIGNATURE)" \
|
||||||
./gen_mvebu_sdcard_img.sh $@ \
|
./gen_mvebu_sdcard_img.sh $@ \
|
||||||
$$UBOOT \
|
$(if $(UBOOT),$(STAGING_DIR_IMAGE)/$(UBOOT)) \
|
||||||
83 $$BOOTFS_SIZE $@.bootimg \
|
83 $(CONFIG_TARGET_KERNEL_PARTSIZE) $@.bootimg \
|
||||||
83 $$ROOTFS_SIZE $(IMAGE_ROOTFS)
|
83 $(CONFIG_TARGET_ROOTFS_PARTSIZE) $(IMAGE_ROOTFS)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/omnia-medkit-initramfs
|
define Build/omnia-medkit-initramfs
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "$0 <outfile> [<bootloader> <type_partitionN> <sectors_partitionN> <img_partitionN>]?"
|
echo "$0 <outfile> [<bootloader> <type_partitionN> <size_partitionN> <img_partitionN>]?"
|
||||||
}
|
}
|
||||||
|
|
||||||
# always require first 2 or 3 arguments
|
# always require first 2 or 3 arguments
|
||||||
@ -46,7 +46,7 @@ dd if=/dev/zero of="$OUTFILE" bs=512 count=1 >/dev/null
|
|||||||
printf "Done\n"
|
printf "Done\n"
|
||||||
|
|
||||||
while [ "$#" -ge 3 ]; do
|
while [ "$#" -ge 3 ]; do
|
||||||
ptgen_args="$ptgen_args -t $1 -p $(($2 / 2 + 256))"
|
ptgen_args="$ptgen_args -t $1 -p $(($2 * 1024 + 256))"
|
||||||
parts="$parts$3 "
|
parts="$parts$3 "
|
||||||
shift; shift; shift
|
shift; shift; shift
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user