[OpenWrt-Devel] [PATCH] ath79: add support for jjPlus JA76PF2
Petr Štetiar
ynezz at true.cz
Mon Mar 4 12:43:52 EST 2019
Tomasz Maciej Nowak <tomek_n at o2.pl> [2019-03-04 15:18:06]:
Hi,
> -routerstation_do_upgrade() {
> +redboot_fis_do_upgrade() {
> local append
> local sysup_file="$1"
> local magic=$(get_magic_word "$sysup_file")
> @@ -15,7 +15,7 @@ routerstation_do_upgrade() {
>
> [ -f "$CONF_TAR" -a "$SAVE_CONFIG" -eq 1 ] && append="-j $CONF_TAR"
> dd if="$sysup_file" bs=64k skip=1 2>/dev/null | \
> - mtd -r $append -Fkernel:$kern_length:0x80060000,rootfs write - kernel:rootfs
> + mtd -r $append -F$CI_KERNPART:$kern_length:0x80060000,rootfs write - $KERNPART:rootfs
instead of passing CI_KERNPART as global variable, wouldn't it be better to
pass CI_KERNPART as 2nd argument to this function? Something like this:
> + jjplus,ja76pf2)
> + redboot_fis_do_upgrade "$ARGV" "linux"
> ubnt,routerstation-pro)
> - routerstation_do_upgrade "$ARGV"
> + redboot_fis_do_upgrade "$ARGV" "kernel"
> + IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | combined-image | check-size $$$$(IMAGE_SIZE)
> +# IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | sysupgrade-tar rootfs=$$$$@ | append-metadata
Why is this commented line needed? It's also in your ` ath79: routerstation: prepare to use sysupgrade-tar format image` patch.
> new file mode 100644
> index 0000000000..cd41e7ceb2
> --- /dev/null
> +++ b/target/linux/ath79/patches-4.14/408-mtd-redboot_partition_scan.patch
> +--- a/drivers/mtd/redboot.c
> ++++ b/drivers/mtd/redboot.c
...
> + if (i == numslots) {
> + /* Didn't find it */
> ++ if (offset + master->erasesize < master->size) {
> ++ /* not at the end of the flash yet, maybe next block :) */
> ++ directory++;
> ++ goto restart;
> ++ }
I'm wondering if this patch could be upstreamed first, so we don't need to drag it around forever.
-- ynezz
_______________________________________________
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