Hi Ian,
the patch looks good to me now, however, it doesn't apply:
Applying: mvebu: add support for iEi Puzzle-M901/Puzzle-M902
error: corrupt patch at line 433
Patch failed at 0001 mvebu: add support for iEi Puzzle-M901/Puzzle-M902
hint: Use 'git am --show-current-patch=diff' to see the failed patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
When trying to apply it manually outside of git, I also doesn'y apply:
checking file target/linux/mvebu/cortexa72/base-files/etc/board.d/02_network
Hunk #1 succeeded at 10 (offset -1 lines).
checking file target/linux/mvebu/cortexa72/base-files/lib/upgrade/emmc.sh
checking file target/linux/mvebu/cortexa72/base-files/lib/upgrade/platform.sh
checking file
target/linux/mvebu/files/arch/arm64/boot/dts/marvell/cn9131-puzzle-m901.dts
patch: malformed patch at line 433: diff --git
a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/cn9132-puzzle-m902.dts
b/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/cn9132-puzzle-m902.dts
Please fix the patch so it applies cleanly.
I can't see obvious causes for this, linebreaks and such seem alright.
Try sending it again directly with 'git-send-email'.
Cheers
Daniel
On Wed, Jul 07, 2021 at 07:30:20PM +0800, eveans2...@gmail.com wrote:
> From: Ian Chang
>
> Hardware specification
> --
> * CN9130 SoC, Quad-core ARMv8 Cortex-72 @ 2200 MHz
> * 4 GB DDR
> * 4 GB eMMC
> * mmcblk0
> - mmcblk0p164M kernel_1
> - mmcblk0p264M kernel_2
> - mmcblk0p3 512M rootfs_1
> - mmcblk0p4 512M rootfs_2
> - mmcblk0p5 512M Reserved
> - mmcblk0p664M Reserved
> - mmcblk0p7 1.8G rootfs_data
>
> * 4 MB (SPI Flash)
> * 6 x 2.5 Gigabit ports (Puzzle-M901)
> - External PHY with 6 ports (AQR112R)
> * 6 x 2.5 Gigabit ports (Puzzle-M902)
> - External PHY with 6 ports (AQR112R)
>3 x 10 Gigabit ports (Puzzle-M902)
> - External PHY with 3 ports (AQR113R)
>
> * 4 x Front panel LED
> * 1 x USB 3.0
> * Reset button on Rear panel
> * UART (115200 8N1,header on PCB)
>
> Flash instructions:
> The original firmware is based on OpenWrt.
> Flash firmware using LuCI and CLI
>
> Signed-off-by: Ian Chang
> ---
> .../base-files/etc/board.d/02_network | 6 +
> .../cortexa72/base-files/lib/upgrade/emmc.sh | 36 ++
> .../base-files/lib/upgrade/platform.sh| 8 +
> .../boot/dts/marvell/cn9131-puzzle-m901.dts | 326
> .../boot/dts/marvell/cn9132-puzzle-m902.dts | 491 ++
> target/linux/mvebu/image/cortexa72.mk | 18 +
> ...l-Add-support-for-Marvell-CN9130-SoC.patch | 61 +++
> 7 files changed, 946 insertions(+)
> create mode 100644
> target/linux/mvebu/cortexa72/base-files/lib/upgrade/emmc.sh
> create mode 100644
> target/linux/mvebu/files/arch/arm64/boot/dts/marvell/cn9131-puzzle-m901.dts
> create mode 100644
> target/linux/mvebu/files/arch/arm64/boot/dts/marvell/cn9132-puzzle-m902.dts
> create mode 100644
> target/linux/mvebu/patches-5.4/000-v5.5-arm64-dts-marvell-Add-support-for-Marvell-CN9130-SoC.patch
>
> diff --git a/target/linux/mvebu/cortexa72/base-files/etc/board.d/02_network
> b/target/linux/mvebu/cortexa72/base-files/etc/board.d/02_network
> index 9ab3c8174d..e0a4bc3015 100755
> --- a/target/linux/mvebu/cortexa72/base-files/etc/board.d/02_network
> +++ b/target/linux/mvebu/cortexa72/base-files/etc/board.d/02_network
> @@ -11,6 +11,12 @@ board_config_update
> board=$(board_name)
>
> case "$board" in
> +iei,puzzle-m901)
> + ucidef_set_interfaces_lan_wan "eth1 eth2 eth3 eth4 eth5" "eth0"
> + ;;
> +iei,puzzle-m902)
> + ucidef_set_interfaces_lan_wan "eth1 eth2 eth3 eth4 eth5 eth10 eth11
> eth12" "eth0"
> + ;;
> marvell,armada8040-mcbin-doubleshot|\
> marvell,armada8040-mcbin-singleshot)
> ucidef_set_interfaces_lan_wan "eth0 eth1 eth3" "eth2"
> diff --git a/target/linux/mvebu/cortexa72/base-files/lib/upgrade/emmc.sh
> b/target/linux/mvebu/cortexa72/base-files/lib/upgrade/emmc.sh
> new file mode 100644
> index 00..90ed7ae79a
> --- /dev/null
> +++ b/target/linux/mvebu/cortexa72/base-files/lib/upgrade/emmc.sh
> @@ -0,0 +1,36 @@
> +platform_do_upgrade_emmc() {
> + local board=$(board_name)
> + local diskdev partdev
> +
> + export_bootdevice && export_partdevice diskdev 0 || {
> + v "Unable to determine upgrade device"
> + return 1
> + }
> + sync
> + if [ "$UPGRADE_OPT_SAVE_PARTITIONS" = "1" ]; then
> + get_partitions "/dev/$diskdev" bootdisk
> + v "Extract boot sector from the image"
> + get_image_dd "$1" of=/tmp/image.bs count=1 bs=512b
> + get_partitions /tmp/image.bs image
> + fi
> +
> + #iterate over each partition from the image and write it to the boot
> disk
> + while read part start size; do
> + if export_partd