diff options
author | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2020-01-18 02:21:13 +0100 |
---|---|---|
committer | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2020-01-21 14:24:49 +0100 |
commit | 1fa04b5d9fb1cba56a8597d6da9e1d52b8030f6b (patch) | |
tree | da02f4bb267128497f1ad7e3c755c8685d8005d1 /target/linux/mvebu/base-files/lib/preinit/82_uDPU | |
parent | e93626f1f47ec6c1995067c9ed3798ebd468cda3 (diff) | |
download | upstream-1fa04b5d9fb1cba56a8597d6da9e1d52b8030f6b.tar.gz upstream-1fa04b5d9fb1cba56a8597d6da9e1d52b8030f6b.tar.bz2 upstream-1fa04b5d9fb1cba56a8597d6da9e1d52b8030f6b.zip |
mvebu: split base-files across subtargets
For the mvebu target in particular, there is a lot of files in
base-files that are only relevant for one subtarget. Improve
overview and reduce size per subtarget by moving/splitting
base-files depending on the subtarget they belong to.
While at it, consolidate 01_leds by using the model part of
the board name as variable.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Acked-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
Diffstat (limited to 'target/linux/mvebu/base-files/lib/preinit/82_uDPU')
-rw-r--r-- | target/linux/mvebu/base-files/lib/preinit/82_uDPU | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/target/linux/mvebu/base-files/lib/preinit/82_uDPU b/target/linux/mvebu/base-files/lib/preinit/82_uDPU deleted file mode 100644 index 12bbfc3725..0000000000 --- a/target/linux/mvebu/base-files/lib/preinit/82_uDPU +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2014-2019 OpenWrt.org -# Copyright (C) 2016 LEDE-Project.org -# - -preinit_mount_udpu() { - . /lib/functions.sh - . /lib/upgrade/common.sh - - case $(board_name) in - methode,udpu) - # Check which device is detected - [ -b "/dev/mmcblk0" ] && mmcdev="/dev/mmcblk0" || mmcdev="/dev/mmcblk1" - - if [ -b "${mmcdev}p4" ]; then - mkdir /misc - mount -t f2fs ${mmcdev}p4 /misc - [ -f "/misc/$BACKUP_FILE" ] && { - echo "- Restoring configuration files -" - tar xzf "/misc/$BACKUP_FILE" -C / - rm -f "/misc/$BACKUP_FILE" - sync - } - [ -f "/misc/firmware/recovery.itb" ] && { - echo "- Updating /recovery partition -" - mkfs.ext4 -q ${mmcdev}p2 | echo y &> /dev/null - mkdir -p /tmp/recovery - mount ${mmcdev}p2 /tmp/recovery - cp /misc/firmware/recovery.itb /tmp/recovery - [ -f "/misc/firmware/boot.scr" ] && \ - cp /misc/firmware/boot.scr /tmp/recovery - sync - umount /tmp/recovery - rm -rf /tmp/recovery - - # Replace previous backup with the new one - [ -d "/misc/firmware_old" ] && rm -rf /misc/firmware_old - [ -d "/misc/firmware" ] && mv /misc/firmware /misc/firmware_old - } - fi - - # Legacy support - if rootfs was booted, instruct u-boot to keep the current root dev - [ "$(df | grep /dev/root)" ] && fw_setenv root_ok '2' - ;; - esac -} - -boot_hook_add preinit_main preinit_mount_udpu |