[OpenWrt-Devel] [PATCH v2] mpc85xx: add support for Sophos RED 15w Rev.1
Christian Lamparter
chunkeey at gmail.com
Thu Jan 10 13:03:18 EST 2019
On Tuesday, January 8, 2019 1:20:56 AM CET David Bauer wrote:
> Hardware
> ========
> CPU: Freescale P1010 PowerPC
> RAM: 128M DDR3
> NAND: 128MiB
> ETH: RTL8211F SGMII PHY
> RTL8367B 5-port RGMII switch
> (not connected to SoC - unmanaged)
> WiFi: SparkLan WPEA-121N
> - Atheros AR9382 2T2R abgn
> USB: 1x USB 2.0
> LED: System, Router, Internet, Tunnel controllable
> LAN1-4, WAN, Power non-controllable
> BTN: None
>
> Installation
> ============
> 1. Power on the device while attached to the Console port.
>
> 2. Halt the U-Boot by pressing Enter when prompted.
>
> 3. Set the correct bootcmd for booting OpenWRT:
> > setenv bootargs_owrt "setenv bootargs console=ttyS0,115200"
> > setenv bootcmd "run bootargs_owrt;
> nand read 0x1000000 0x300000 0x800000;
> bootm 0x1000000;"
> > saveenv
>
> 5. Rename OpenWRT initramfs image to 'kernel.bin' and place it in a
> TFTP server root-directory served on 192.168.1.2/24. Connect your
> computer to one of the LAN-ports.
>
> 4. Boot OpenWRT initramfs image with
> > run bootargs_owrt; tftpboot 0x1000000 192.168.1.2:kernel.bin;
> bootm 0x1000000;
>
> 6. (Optional)
> Make a Backup of 'sophos-os1', 'sophos-os2' and 'sophos-data' in case
> you ever want to go back to the vendor firmware.
>
> 7. Create Ubi Volume on mtd4 by executing
> > ubiformat /dev/mtd4 -y
>
> 8. Transfer OpenWRT sysupgrade image to the device via SCP and install it
> with
> > sysupgrade -n <openwrt-image-file>
>
> Back to Stock
> =============
> If you want to go back to the stock firmware, here is the bootcmd of the
> vendor firmware:
> > setenv bootargs console=ttyS0,115200 root=/dev/mtdblock5;
> nand read 0xc00000 0x00300000 0x100000;
> nand read 0x1000000 0x00400000 0x00800000;
> bootm 0x1000000 - 0xc00000
>
> Set it via 'setenv' from the U-Boot shell and don't forget to save it
> using 'saveenv'!
>
> After this, boot the OpenWRT initramfs image just like you would for
> installation. Write back the three vendor partitions using mtd. Reboot
> the device afterwards.
>
> Signed-off-by: David Bauer <mail at david-bauer.net>
> ---
> v2:
> - move kernel configuration to subtarget
> - move nand feature to subtarget
> - move partition layout to "fixed-partition" subnode
> - add SPDX license-identifier to red15w_rev1.c
> - use pr_info instead of printk in red15w_rev1.c
>
> target/linux/mpc85xx/Makefile | 2 +-
> target/linux/mpc85xx/base-files/etc/diag.sh | 3 +
> .../etc/hotplug.d/ieee80211/10-fix-wifi-mac | 20 ++
> .../base-files/lib/upgrade/platform.sh | 13 +-
> target/linux/mpc85xx/config-4.14 | 1 +
> target/linux/mpc85xx/config-4.19 | 1 +
> .../arch/powerpc/boot/dts/red-15w-rev1.dts | 207 ++++++++++++++++++
> .../arch/powerpc/platforms/85xx/red15w_rev1.c | 87 ++++++++
> target/linux/mpc85xx/generic/config-default | 16 ++
> target/linux/mpc85xx/generic/target.mk | 1 +
> target/linux/mpc85xx/image/Makefile | 12 +
> target/linux/mpc85xx/p1020/target.mk | 1 -
> .../104-powerpc-85xx-red-15w-rev1.patch | 33 +++
> .../103-powerpc-85xx-red-15w-rev1.patch | 33 +++
> 14 files changed, 427 insertions(+), 3 deletions(-)
> create mode 100644 target/linux/mpc85xx/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac
> create mode 100644 target/linux/mpc85xx/files/arch/powerpc/boot/dts/red-15w-rev1.dts
> create mode 100644 target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/red15w_rev1.c
> create mode 100644 target/linux/mpc85xx/patches-4.14/104-powerpc-85xx-red-15w-rev1.patch
> create mode 100644 target/linux/mpc85xx/patches-4.19/103-powerpc-85xx-red-15w-rev1.patch
>
> diff --git a/target/linux/mpc85xx/Makefile b/target/linux/mpc85xx/Makefile
> index 552f16e82f..0affc38f61 100644
> --- a/target/linux/mpc85xx/Makefile
> +++ b/target/linux/mpc85xx/Makefile
> @@ -10,7 +10,7 @@ ARCH:=powerpc
> BOARD:=mpc85xx
> BOARDNAME:=Freescale MPC85xx
> CPU_TYPE:=8540
> -FEATURES:=squashfs
> +FEATURES:=squashfs ramdisk
> MAINTAINER:=Imre Kaloz <kaloz at openwrt.org>
> SUBTARGETS:=generic p1020
>
Hm, this might clash with the github PR:
"mpc85xx: add support for Freescale (NXP) P2020RDB"
<https://github.com/openwrt/openwrt/pull/1688> since
he seemingly disabled (commented it out, but left it in place)
the ramdisk feature for his p2020.
I've notified Pawel as well. I don't really think this is much of an
issue and both of you are currently familiar with the target
and the devices. I'm fine with just a short note whenever the feature
should be enabled for all targets or just those the individual
subtargets and I'll then make the change locally.
Thanks,
Christian
_______________________________________________
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