Commit Graph

21 Commits (93aa8604052305830ea6801f0b93ffe2f0d55721)

Author SHA1 Message Date
Christian Lamparter 93aa860405 procd: nand: make it possible to configure kernel and ubi partition
With this patch, the nand.sh script no longer overwrites
CI_KERNELPART and CI_UBIPART if they have been set before.

This allows platforms specify alternative values for these
variables.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 years ago
Felix Fietkau 4d8da82c29 procd: add support for overriding the tar sysupgrade board name
Useful for providing images that work for multiple devices

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Mathias Kresin 3004298e62 sysupgrade: unmount filesystems before reboot
sysupgrade immediately reboots after flashing an image and doesn't
allow to unmount filesystems. At least in case the image used for
sysupgrade is stored on a FAT formatted usb flash drive, the following
warning is printed during the next mount of the flash drive:

FAT-fs (sda1): Volume was not properly unmounted. Some data may be
corrupt. Please run fsck.

Although a data corruption during read operations is unlikely, there is
no need to scare the users.

Signed-off-by: Mathias Kresin <dev@kresin.me>
8 years ago
John Crispin f99c61a94a procd: add 'platform_nand_pre_upgrade'
Add 'platform_nand_pre_upgrade' callback to allow platform specific
preparation right before flashinng, when already in ramdisk.

Example uses might be setting correct values for CI_{KERNPART,UBIPART}.

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>

SVN-Revision: 47879
9 years ago
Rafał Miłecki 0d5915d2fe procd: drop nand_upgrade_stage1 from sysupgrade_pre_upgrade hooks
Now we have all targets using platform_pre_upgrade (and calling
nand_do_upgrade directly) we don't need nand_upgrade_stage1 to be in
sysupgrade_pre_upgrade hooks anymore.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 47489
9 years ago
Rafał Miłecki a24f7305cc procd: make nand_do_platform_check check image only
Recently all targets have been updated to call nand_do_upgrade directly.
It's not needed anymore to leave a magic /tmp/sysupgrade-nand-path mark
during image check.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Acked-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 47079
9 years ago
John Crispin 093c341473 procd: add helper for starting NAND sysupgrade
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 45339
9 years ago
Rafał Miłecki 15355dd212 procd: fix typo in nand.sh s/TRX/TAR/
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 43423
10 years ago
John Crispin db69761f94 procd: fix/clean some conditions in nand.sh
1) nand_upgrade_tar: use a simpler condition that matches if () { }
   logic and fix check of $kernel_length variable
2) nand_do_upgrade_stage2: use case, otherwise one could believe we
   always call nand_upgrade_tar

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 43373
10 years ago
John Crispin 19c18eba93 procd: document nand.sh a bit
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 43372
10 years ago
John Crispin 20940138ac scripts: fix wrong usage of '==' operator
[base-files] shell-scripting: fix wrong usage of '==' operator

normally the '==' is used for invoking a regex parser and is a bashism.
all of the fixes just want to compare a string. the used busybox-ash
will silently "ignore" this mistake, but make it portable/clean at least.

this patch does not change the behavior/logic of the scripts.

Signed-off-by: Bastian Bittorf <bittorf@bluebottle.com>

SVN-Revision: 42911
10 years ago
Felix Fietkau 4c490c79b2 procd: fix initial nand sysupgrade
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 42884
10 years ago
Felix Fietkau 41363b1ecb procd: fix parsing of the has_env parameter
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 42883
10 years ago
Imre Kaloz ecb68ba6b4 allow overriding the kernel partition's name
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>

SVN-Revision: 41646
10 years ago
Imre Kaloz 2ddcf5dd8a we already have a get_magic_long() in common.sh for sysupgrade, don't break it
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>

SVN-Revision: 41628
10 years ago
John Crispin 72efa88b64 procd: correctly identify ubifs in tar file
A missing path prevents the rootfs type contained in a SysupgradeNAND
tar file from being determined correctly.

This fixes it, and also corrects a minor spelling mistake.

Signed-off-by: Ben Mulvihill <ben.mulvihill@gmail.com>

SVN-Revision: 41564
10 years ago
John Crispin 9b714b6e7b procd: fix nand.sh kernel_length typo
sysupgrade otherwise skips kernel part on devices which got
kernel in ubi due to kern_length being undefined, kernel_length
is being used instead.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>

SVN-Revision: 41327
10 years ago
John Crispin 54faeadb07 procd: various improvements to nand.sh
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 41278
10 years ago
John Crispin 1a3ebd51ad procd: some cleanup for SysupgradeNAND
Removed unused ubi file file from template as ubinized images are
passed directly and not inside the tarball.
Also removed left-over white-space.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>

SVN-Revision: 41237
10 years ago
John Crispin 3dca5a158d procd: various cleanups to /lib/upgrade/nand.sh
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 41222
10 years ago
John Crispin 1e876b4191 procd: update to latest git HEAD
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 41129
10 years ago