aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/x86/base-files/lib/preinit
Commit message (Collapse)AuthorAgeFilesLines
* treewide: don't hardcode "sysupgrade.tgz" file nameRafał Miłecki2019-09-121-2/+2
| | | | | | | | | 1) Add BACKUP_FILE and use it when copying an archive to be restored after sysupgrade (on the next preinit). 2) Use CONF_TAR for copying backup prepared by the /sbin/sysupgrade Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit bf390478727ac5f4f9d6fb684de48b8150bcec67)
* x86: make sysupgrade.tgz reachable againTomasz Maciej Nowak2018-12-031-1/+1
| | | | | | | | | Moving binding mount before check for saved sysupgrade configuration made it unreachable. Fix it by moving binding mount after the check. Fixes: f78b2616 (x86: mount writable bootfs) Reported-by: Lucian Cristian <luci@powerneth.ro> Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
* Revert "x86: add intel microcode entries to grub config"John Crispin2018-11-271-4/+2
| | | | | | This reverts commit 546fced2a23557e95dd34246744c3aa6cad92fe6. Signed-off-by: John Crispin <john@phrozen.org>
* Revert "x86: add amd microcode entries to grub config"John Crispin2018-11-271-0/+12
| | | | | | This reverts commit a822283c7e56bb3b409712e0eb9af5a91aac247d. Signed-off-by: John Crispin <john@phrozen.org>
* x86: add amd microcode entries to grub configTomasz Maciej Nowak2018-11-261-12/+0
| | | | | | | | Create initrd enries for x86 images, that'll load amd microcode as early as possible. Also remove the preinit script responsible for late load of microcode. Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
* x86: add intel microcode entries to grub configTomasz Maciej Nowak2018-11-261-2/+4
| | | | | | | | | Create initrd enries for x86 images, that'll load intel microcode as early as possible. To achieve that the test module for grub is enabled which provides shell-like conditionals. Also restrict the late load of microcode to AMD processors. Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
* x86: mount writable bootfsTomasz Maciej Nowak2018-11-261-8/+4
| | | | | | | Mount boot file system with rw option to allow installation of packages which install files to /boot directory. Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
* x86: add preinit hook to reload microcodeZoltan HERPAI2018-02-111-0/+10
| | | | Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
* x86: preinit: use board_name on Sm Super ServersPhilip Prindeville2018-01-041-1/+8
| | | | | | | | | Supermicro puts "Super Server" into their product_name DMI value for a whole slew of products, making this value about as useful as not having been filled in at all. Instead, fall back on the board_name instead. Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
* x86: preinit: make name rewrite into reusable functionPhilip Prindeville2018-01-041-6/+10
| | | | | | | | There might be other places (such as vendor-supplied preinit scripts) where we wish to take a DMI name and clean it up in a consistent way, so make the sed command into a function. Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
* treewide: populate boardname and model earlierMathias Kresin2017-07-151-0/+0
| | | | | | | | | | | | | For targets using the generic board detection and board specific settings in diag.sh, the board name is still unset at the time the set_state() provided by diag.sh is called by 10_indicate_preinit. Change the execution order to ensure the boardname is populated before required the first time. Do the target specific board detection as early as possible, directly followed by the generic one to allow a seamless switch to the generic function for populating /tmp/sysinfo/. Signed-off-by: Mathias Kresin <dev@kresin.me>
* x86: keep /boot mounted for kexecDaniel Golle2017-05-051-4/+7
| | | | Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* base-files: export x86 platform upgrade functions to common.shYousong Zhou2017-01-051-2/+2
| | | | Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
* x86: move sysupgrade.tgz only if it existsYousong Zhou2017-01-051-3/+6
| | | | | | | | To squash error messages at boot time mv: can't rename '/mnt/sysupgrade.tgz': No such file or directory Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
* x86: use sysfs DMI information to populate sysinfoJo-Philipp Wich2016-06-061-0/+28
| | | | | | | | | | | | | | | | | | Use the DMI data available in sysfs to extract manufacturer and model info and write it to /tmp/sysinfo/. The data will be picked up by board_detect and can be used by e.g. LuCI to display a more appropriate model description. On an APU board the files will contain the following values: # cat /tmp/sysinfo/model PC Engines APU # cat /tmp/sysinfo/board_name pc-engines-apu Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* x86: generalize partition discovery for sysupgradeJo-Philipp Wich2016-05-241-2/+4
| | | | | | | | | | | | | | | Generalize the partition discovery in sysupgrade in order to fix sysupgrade and config backup/recovery on MMC block devices which use a different naming scheme compared to mtdblock or sd* devices. The change also adds the find applet to the ramdisk utilities so that upgrade code can rely on it. The commit is based on the initial submission by Russell Senior at http://patchwork.ozlabs.org/patch/625440/ . Signed-off-by: Russell Senior <russell@personaltelco.net> Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* x86: use PARTUUID instead explicitly specifying the device by defaultJo-Philipp Wich2015-03-241-14/+7
| | | | | | | | | | | | | This changes the x86 image generation to match x86_64, using the PARTUUID for the rootfs instead of explicitly configuring the device. It unbreaks KVM with VirtIO, which uses /dev/vda2 instead of /dev/sda2. Tested in QEMU/KVM with VirtIO, VirtualBox and VMware. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net> SVN-Revision: 44966
* x86: fix sysupgradeFelix Fietkau2014-03-211-1/+1
| | | | | | | | | | | | | | | | | | | Function move_config should be called after or during preinit_mount_root hook in do_mount_root function. At this state sysupgrade.tgz is not in its place during that time when do_mount_root is called. Function move_config is called later so the sysupgrade.tgz stays in root directory to the second restart when it is unpacked properly. This patch adds move_config function to preinit_mount_root hook instead of preinit_main and changes the filename of script to be called before 80_mount_root is called. It will prepare the sysupgrade archive for do_mount_root within preinit_mount_root hook. This patch solves ticket #15042 and #14088. Signed-off-by: Jiri Slachta <slachta@cesnet.cz> SVN-Revision: 39996
* preinit: move cmdline failsafe= handling ot the generic codeJohn Crispin2013-04-251-13/+0
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 36430
* Do not overload mount-call - trying to reduce confusionMirko Vogt2012-12-191-1/+1
| | | | | | | | | | | The behaviour of calling 'mount' differed depending on whether it called the busybox-mount, the mount of util-linux, the mount defined in /lib/functions.sh and /lib/functions/boot.sh /etc/preinit even included /lib/functions.sh and /lib/functions/boot.sh, both re-defining 'mount'. SVN-Revision: 34792
* x86: add grub2 iso supportFelix Fietkau2012-10-071-0/+5
| | | | SVN-Revision: 33639
* Fix sysupgrade for squashfs, jffs2 and ext4 imagesVasilis Tsiligiannis2012-06-191-0/+22
| | | | | | | * use 'fsync' with 'dd' for image writing * save config to boot partition SVN-Revision: 32465
* base-files: remove redundant "Press " when writing enter failsafe messageJo-Philipp Wich2010-03-231-1/+0
| | | | SVN-Revision: 20393
* preinit: use grep -q where applicableJo-Philipp Wich2010-02-011-1/+1
| | | | SVN-Revision: 19479
* preinit: Remove Ctrl-C prompt...impossible on /dev/console (patch by cshore)Felix Fietkau2010-01-281-1/+1
| | | | SVN-Revision: 19367
* add preinit modularization work by Daniel Dickinson (cshore)Felix Fietkau2010-01-252-0/+22
SVN-Revision: 19331