[OpenWrt-Devel] [PATCH 3/7] mvebu: shrink amount of packages and reorganize them

Tomasz Maciej Nowak tomek_n at o2.pl
Thu Mar 21 14:57:23 EDT 2019


Since most of devices using SD card image to boot, use ext4 as boot
files system we can drop fat fs related packages. Also move packages
which are added repeatedly across subtargets to their default packages,
with droping the ones that are enabled in target kernel configugation.

Signed-off-by: Tomasz Maciej Nowak <tomek_n at o2.pl>
---
 .../mvebu/base-files/lib/preinit/79_move_config    | 14 ++++++++++----
 target/linux/mvebu/cortexa53/target.mk             |  1 +
 target/linux/mvebu/cortexa72/target.mk             |  1 +
 target/linux/mvebu/image/cortex-a53.mk             |  2 --
 target/linux/mvebu/image/cortex-a72.mk             |  3 ---
 target/linux/mvebu/image/cortex-a9.mk              |  4 ++--
 6 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/target/linux/mvebu/base-files/lib/preinit/79_move_config b/target/linux/mvebu/base-files/lib/preinit/79_move_config
index 1735ad8849..73ddf09155 100644
--- a/target/linux/mvebu/base-files/lib/preinit/79_move_config
+++ b/target/linux/mvebu/base-files/lib/preinit/79_move_config
@@ -3,12 +3,18 @@
 
 BOOTPART=/dev/mmcblk0p1
 
+. /lib/functions.sh
+
 move_config() {
 	if [ -b $BOOTPART ]; then
-		insmod nls_cp437
-		insmod nls_iso8859-1
-		insmod fat
-		insmod vfat
+		case $(board_name) in
+			turris-omnia)
+			insmod nls_cp437
+			insmod nls_iso8859-1
+			insmod fat
+			insmod vfat
+			;;
+		esac
 		mkdir -p /boot
 		mount -o rw,noatime $BOOTPART /boot
 		[ -f /boot/sysupgrade.tgz ] && mv -f /boot/sysupgrade.tgz /
diff --git a/target/linux/mvebu/cortexa53/target.mk b/target/linux/mvebu/cortexa53/target.mk
index acc18d3454..d420fd9f59 100644
--- a/target/linux/mvebu/cortexa53/target.mk
+++ b/target/linux/mvebu/cortexa53/target.mk
@@ -11,5 +11,6 @@ ARCH:=aarch64
 BOARDNAME:=Marvell Armada 3700LP (ARM64)
 CPU_TYPE:=cortex-a53
 FEATURES+=ext4
+DEFAULT_PACKAGES+=e2fsprogs ethtool mkf2fs
 
 KERNELNAME:=Image dtbs
diff --git a/target/linux/mvebu/cortexa72/target.mk b/target/linux/mvebu/cortexa72/target.mk
index 670c402a56..a9384f3fa6 100644
--- a/target/linux/mvebu/cortexa72/target.mk
+++ b/target/linux/mvebu/cortexa72/target.mk
@@ -11,5 +11,6 @@ ARCH:=aarch64
 BOARDNAME:=Marvell Armada 7k/8k (ARM64)
 CPU_TYPE:=cortex-a72
 FEATURES+=ext4
+DEFAULT_PACKAGES+=e2fsprogs ethtool mkf2fs
 
 KERNELNAME:=Image dtbs
diff --git a/target/linux/mvebu/image/cortex-a53.mk b/target/linux/mvebu/image/cortex-a53.mk
index 89c3363448..dd6176100b 100644
--- a/target/linux/mvebu/image/cortex-a53.mk
+++ b/target/linux/mvebu/image/cortex-a53.mk
@@ -4,7 +4,6 @@ define Device/globalscale-espressobin
   KERNEL_NAME := Image
   KERNEL := kernel-bin
   DEVICE_TITLE := ESPRESSObin (Marvell Armada 3700 Community Board)
-  DEVICE_PACKAGES := e2fsprogs ethtool mkf2fs kmod-fs-vfat kmod-usb2 kmod-usb3 kmod-usb-storage
   IMAGES := sdcard.img.gz
   IMAGE/sdcard.img.gz := boot-scr | boot-img-ext4 | sdcard-img-ext4 | gzip | append-metadata
   DEVICE_DTS := armada-3720-espressobin
@@ -17,7 +16,6 @@ define Device/armada-3720-db
   KERNEL_NAME := Image
   KERNEL := kernel-bin
   DEVICE_TITLE := Marvell Armada 3720 Development Board DB-88F3720-DDR3
-  DEVICE_PACKAGES := e2fsprogs ethtool mkf2fs kmod-fs-vfat kmod-usb2 kmod-usb3 kmod-usb-storage
   IMAGES := sdcard.img.gz
   IMAGE/sdcard.img.gz := boot-scr | boot-img-ext4 | sdcard-img-ext4 | gzip | append-metadata
   DEVICE_DTS := armada-3720-db
diff --git a/target/linux/mvebu/image/cortex-a72.mk b/target/linux/mvebu/image/cortex-a72.mk
index ac5b80233b..38099fdd19 100644
--- a/target/linux/mvebu/image/cortex-a72.mk
+++ b/target/linux/mvebu/image/cortex-a72.mk
@@ -4,7 +4,6 @@ define Device/armada-macchiatobin
   KERNEL_NAME := Image
   KERNEL := kernel-bin
   DEVICE_TITLE := MACCHIATObin (SolidRun Armada 8040 Community Board)
-  DEVICE_PACKAGES := e2fsprogs ethtool mkf2fs kmod-fs-vfat kmod-mmc
   IMAGES := sdcard.img.gz
   IMAGE/sdcard.img.gz := boot-scr | boot-img-ext4 | sdcard-img-ext4 | gzip | append-metadata
   DEVICE_DTS := armada-8040-mcbin
@@ -17,7 +16,6 @@ define Device/armada-8040-db
   KERNEL_NAME := Image
   KERNEL := kernel-bin
   DEVICE_TITLE := Marvell Armada 8040 DB board
-  DEVICE_PACKAGES := e2fsprogs ethtool mkf2fs kmod-fs-vfat kmod-mmc
   IMAGES := sdcard.img.gz
   IMAGE/sdcard.img.gz := boot-img-ext4 | sdcard-img-ext4 | gzip | append-metadata
   DEVICE_DTS := armada-8040-db
@@ -30,7 +28,6 @@ define Device/armada-7040-db
   KERNEL_NAME := Image
   KERNEL := kernel-bin
   DEVICE_TITLE := Marvell Armada 7040 DB board
-  DEVICE_PACKAGES := e2fsprogs ethtool mkf2fs kmod-fs-vfat kmod-mmc
   IMAGES := sdcard.img.gz
   IMAGE/sdcard.img.gz := boot-img-ext4 | sdcard-img-ext4 | gzip | append-metadata
   DEVICE_DTS := armada-7040-db
diff --git a/target/linux/mvebu/image/cortex-a9.mk b/target/linux/mvebu/image/cortex-a9.mk
index 610ce36cd7..9d84283525 100644
--- a/target/linux/mvebu/image/cortex-a9.mk
+++ b/target/linux/mvebu/image/cortex-a9.mk
@@ -126,7 +126,7 @@ define Device/armada-388-clearfog-pro
   KERNEL_INSTALL := 1
   KERNEL := kernel-bin
   DEVICE_TITLE := SolidRun ClearFog Pro
-  DEVICE_PACKAGES := mkf2fs e2fsprogs swconfig kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1
+  DEVICE_PACKAGES := mkf2fs e2fsprogs swconfig
   IMAGES := sdcard.img.gz
   IMAGE/sdcard.img.gz := boot-scr | boot-img-ext4 | sdcard-img-ext4 | gzip | append-metadata
   DEVICE_DTS := armada-388-clearfog-pro armada-388-clearfog-base
@@ -139,7 +139,7 @@ define Device/armada-388-clearfog-base
   KERNEL_INSTALL := 1
   KERNEL := kernel-bin
   DEVICE_TITLE := SolidRun ClearFog Base
-  DEVICE_PACKAGES := mkf2fs e2fsprogs kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1
+  DEVICE_PACKAGES := mkf2fs e2fsprogs
   IMAGES := sdcard.img.gz
   IMAGE/sdcard.img.gz := boot-scr | boot-img-ext4 | sdcard-img-ext4 | gzip | append-metadata
   DEVICE_DTS := armada-388-clearfog-pro armada-388-clearfog-base
-- 
2.21.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list