From 795063e4bd943a6f8b10d4ed11ddce8aad604771 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 29 Mar 2015 04:32:01 +0000 Subject: x86: make x86_64 a subtarget instead of a standalone target Signed-off-by: Felix Fietkau git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45115 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- target/linux/x86_64/base-files/etc/inittab | 4 -- .../base-files/lib/preinit/15_essential_fs_x86 | 8 --- .../x86_64/base-files/lib/preinit/79_move_config | 15 ----- .../x86_64/base-files/lib/upgrade/platform.sh | 66 ---------------------- 4 files changed, 93 deletions(-) delete mode 100644 target/linux/x86_64/base-files/etc/inittab delete mode 100644 target/linux/x86_64/base-files/lib/preinit/15_essential_fs_x86 delete mode 100644 target/linux/x86_64/base-files/lib/preinit/79_move_config delete mode 100644 target/linux/x86_64/base-files/lib/upgrade/platform.sh (limited to 'target/linux/x86_64/base-files') diff --git a/target/linux/x86_64/base-files/etc/inittab b/target/linux/x86_64/base-files/etc/inittab deleted file mode 100644 index ca90fd8a2a..0000000000 --- a/target/linux/x86_64/base-files/etc/inittab +++ /dev/null @@ -1,4 +0,0 @@ -::sysinit:/etc/init.d/rcS S boot -::shutdown:/etc/init.d/rcS K shutdown -ttyS0::askfirst:/bin/ash --login -tty1::askfirst:/bin/ash --login diff --git a/target/linux/x86_64/base-files/lib/preinit/15_essential_fs_x86 b/target/linux/x86_64/base-files/lib/preinit/15_essential_fs_x86 deleted file mode 100644 index 5d5453093f..0000000000 --- a/target/linux/x86_64/base-files/lib/preinit/15_essential_fs_x86 +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -# Copyright (C) 2006-2010 OpenWrt.org -# Copyright (C) 2010 Vertical Communications - -do_mount_procfs() { - mount -o noatime -t proc none /proc -} - diff --git a/target/linux/x86_64/base-files/lib/preinit/79_move_config b/target/linux/x86_64/base-files/lib/preinit/79_move_config deleted file mode 100644 index cdcf683a22..0000000000 --- a/target/linux/x86_64/base-files/lib/preinit/79_move_config +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -# Copyright (C) 2012-2014 OpenWrt.org - -move_config() { - . /lib/upgrade/platform.sh - - if platform_export_bootpart; then - mount -t ext4 -o rw,noatime "$BOOTPART" /mnt - mv -f /mnt/sysupgrade.tgz / - umount /mnt - fi -} - -boot_hook_add preinit_mount_root move_config - diff --git a/target/linux/x86_64/base-files/lib/upgrade/platform.sh b/target/linux/x86_64/base-files/lib/upgrade/platform.sh deleted file mode 100644 index 73ab5ef079..0000000000 --- a/target/linux/x86_64/base-files/lib/upgrade/platform.sh +++ /dev/null @@ -1,66 +0,0 @@ -platform_export_bootpart() { - local cmdline uuid disk - - if read cmdline < /proc/cmdline; then - case "$cmdline" in - *block2mtd=*) - disk="${cmdline##*block2mtd=}" - disk="${disk%%,*}" - ;; - *root=*) - disk="${cmdline##*root=}" - disk="${disk%% *}" - ;; - esac - - case "$disk" in - PARTUUID=[a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9]-02) - uuid="${disk#PARTUUID=}" - uuid="${uuid%-02}" - for disk in /dev/[hsv]d[a-z]; do - set -- $(dd if=$disk bs=1 skip=440 count=4 2>/dev/null | hexdump -v -e '4/1 "%02x "') - if [ "$4$3$2$1" = "$uuid" ]; then - export BOOTPART="${disk}1" - return 0 - fi - done - ;; - /dev/*) - export BOOTPART="${disk%[0-9]}1" - return 0 - ;; - esac - fi - - return 1 -} - -platform_check_image() { - [ "$#" -gt 1 ] && return 1 - - case "$(get_magic_word "$1")" in - eb48|eb63) return 0;; - *) - echo "Invalid image type" - return 1 - ;; - esac -} - -platform_copy_config() { - if [ -b "$BOOTPART" ]; then - mount -t ext4 -o rw,noatime "$BOOTPART" /mnt - cp -af "$CONF_TAR" /mnt/ - umount /mnt - fi -} - -platform_do_upgrade() { - platform_export_bootpart - - if [ -b "${BOOTPART%[0-9]}" ]; then - sync - get_image "$@" | dd of="${BOOTPART%[0-9]}" bs=4096 conv=fsync - sleep 1 - fi -} -- cgit v1.2.3