Message ID | 20201201173602.415324-2-tmn505@gmail.com |
---|---|
State | Superseded |
Headers | show |
Series | [1/2] ath79: add support for Mojo Networks AirTight C-75 | expand |
> diff --git a/target/linux/ath79/image/generic.mk > b/target/linux/ath79/image/generic.mk > index 0f90c00b9c43..b7618a8ab33c 100644 > --- a/target/linux/ath79/image/generic.mk > +++ b/target/linux/ath79/image/generic.mk > @@ -1199,7 +1199,7 @@ define Device/mojo_c-75 > DEVICE_ALT0_VENDOR := WatchGuard > DEVICE_ALT0_MODEL := AP320 > DEVICE_PACKAGES := ath10k-firmware-qca988x kmod-ath10k-ct kmod- > usb2 > - IMAGE_SIZE := 15936k > + IMAGE_SIZE := 32320k I'm not sure whether that's possible or whether the image itself is restricted to a single consecutive area to be written to (i.e. the flash can be concatenated and used, but the _image_ is limited to the first partition _in_ it) Best Adrian > endef > TARGET_DEVICES += mojo_c-75 > > -- > 2.29.2 > > > _______________________________________________ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/mailman/listinfo/openwrt-devel
W dniu 01.12.2020 o 20:50, Adrian Schmutzler pisze: >> diff --git a/target/linux/ath79/image/generic.mk >> b/target/linux/ath79/image/generic.mk >> index 0f90c00b9c43..b7618a8ab33c 100644 >> --- a/target/linux/ath79/image/generic.mk >> +++ b/target/linux/ath79/image/generic.mk >> @@ -1199,7 +1199,7 @@ define Device/mojo_c-75 >> DEVICE_ALT0_VENDOR := WatchGuard >> DEVICE_ALT0_MODEL := AP320 >> DEVICE_PACKAGES := ath10k-firmware-qca988x kmod-ath10k-ct kmod- >> usb2 >> - IMAGE_SIZE := 15936k >> + IMAGE_SIZE := 32320k > > I'm not sure whether that's possible or whether the image itself is restricted to a single consecutive area to be written to (i.e. the flash can be concatenated and used, but the _image_ is limited to the first partition _in_ it) The mtd-concat creates virtual mtd device, which whole space we name as 'firmware' partiton, and for kernel it's completely transparent, as for mtd-splitter and mtd command. > > Best > > Adrian Regards.
Hi, > -----Original Message----- > From: Tomasz Maciej Nowak [mailto:tmn505@gmail.com] > Sent: Dienstag, 8. Dezember 2020 18:05 > To: Adrian Schmutzler <mail@adrianschmutzler.de>; openwrt- > devel@lists.openwrt.org > Cc: 'Vladimir Georgievsky' <vladimir.georgievsky@yahoo.com> > Subject: Re: [PATCH 2/2] ath79: mojo c-75: use second flash chip > > W dniu 01.12.2020 o 20:50, Adrian Schmutzler pisze: > >> diff --git a/target/linux/ath79/image/generic.mk > >> b/target/linux/ath79/image/generic.mk > >> index 0f90c00b9c43..b7618a8ab33c 100644 > >> --- a/target/linux/ath79/image/generic.mk > >> +++ b/target/linux/ath79/image/generic.mk > >> @@ -1199,7 +1199,7 @@ define Device/mojo_c-75 > >> DEVICE_ALT0_VENDOR := WatchGuard > >> DEVICE_ALT0_MODEL := AP320 > >> DEVICE_PACKAGES := ath10k-firmware-qca988x kmod-ath10k-ct kmod- > >> usb2 > >> - IMAGE_SIZE := 15936k > >> + IMAGE_SIZE := 32320k > > > > I'm not sure whether that's possible or whether the image itself is > restricted to a single consecutive area to be written to (i.e. the flash can be > concatenated and used, but the _image_ is limited to the first partition _in_ > it) > > The mtd-concat creates virtual mtd device, which whole space we name as > 'firmware' partiton, and for kernel it's completely transparent, as for mtd- > splitter and mtd command. That might hold for OpenWrt-internal sysupgrade (I'm actually not sure here), but will it also be true for initial flashing? Best Adrian > > > > > Best > > > > Adrian > > Regards. > > -- > TMN
W dniu 14.12.2020 o 17:30, Adrian Schmutzler pisze: > Hi, > >> -----Original Message----- >> From: Tomasz Maciej Nowak [mailto:tmn505@gmail.com] >> Sent: Dienstag, 8. Dezember 2020 18:05 >> To: Adrian Schmutzler <mail@adrianschmutzler.de>; openwrt- >> devel@lists.openwrt.org >> Cc: 'Vladimir Georgievsky' <vladimir.georgievsky@yahoo.com> >> Subject: Re: [PATCH 2/2] ath79: mojo c-75: use second flash chip >> >> W dniu 01.12.2020 o 20:50, Adrian Schmutzler pisze: >>>> diff --git a/target/linux/ath79/image/generic.mk >>>> b/target/linux/ath79/image/generic.mk >>>> index 0f90c00b9c43..b7618a8ab33c 100644 >>>> --- a/target/linux/ath79/image/generic.mk >>>> +++ b/target/linux/ath79/image/generic.mk >>>> @@ -1199,7 +1199,7 @@ define Device/mojo_c-75 >>>> DEVICE_ALT0_VENDOR := WatchGuard >>>> DEVICE_ALT0_MODEL := AP320 >>>> DEVICE_PACKAGES := ath10k-firmware-qca988x kmod-ath10k-ct kmod- >>>> usb2 >>>> - IMAGE_SIZE := 15936k >>>> + IMAGE_SIZE := 32320k >>> >>> I'm not sure whether that's possible or whether the image itself is >> restricted to a single consecutive area to be written to (i.e. the flash can be >> concatenated and used, but the _image_ is limited to the first partition _in_ >> it) >> >> The mtd-concat creates virtual mtd device, which whole space we name as >> 'firmware' partiton, and for kernel it's completely transparent, as for mtd- >> splitter and mtd command. > > That might hold for OpenWrt-internal sysupgrade (I'm actually not sure here), but will it also be true for initial flashing? That's why the installation is done from initramfs image, where everything is properly set-up. Thinking about it more, the U-Boot might be not capable of loading kernel image spanned through two flash chips, so I'll add KERNEL_SIZE variable. > > Best > > Adrian > Regards.
diff --git a/target/linux/ath79/dts/qca9550_mojo_c-75.dts b/target/linux/ath79/dts/qca9550_mojo_c-75.dts index 51046a740a02..30cff65b39b5 100644 --- a/target/linux/ath79/dts/qca9550_mojo_c-75.dts +++ b/target/linux/ath79/dts/qca9550_mojo_c-75.dts @@ -40,6 +40,23 @@ linux,default-trigger = "phy1tpt"; }; }; + + mtd-concat { + compatible = "mtd-concat"; + devices = <&concat0 &concat1>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "firmware"; + reg = <0x0 0x1f90000>; + compatible = "denx,uimage"; + }; + }; + }; }; ð0 { @@ -121,10 +138,8 @@ read-only; }; - partition@60000 { - label = "firmware"; + concat0: partition@60000 { reg = <0x060000 0xf90000>; - compatible = "denx,uimage"; }; art: partition@ff0000 { @@ -145,8 +160,7 @@ #address-cells = <1>; #size-cells = <1>; - partition@0 { - label = "opt"; + concat1: partition@0 { reg = <0x0 0x1000000>; }; }; diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index 0f90c00b9c43..b7618a8ab33c 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -1199,7 +1199,7 @@ define Device/mojo_c-75 DEVICE_ALT0_VENDOR := WatchGuard DEVICE_ALT0_MODEL := AP320 DEVICE_PACKAGES := ath10k-firmware-qca988x kmod-ath10k-ct kmod-usb2 - IMAGE_SIZE := 15936k + IMAGE_SIZE := 32320k endef TARGET_DEVICES += mojo_c-75
The flash capacity is divided in two flash chips and currently only first is used. Increase available space for OpenWrt by additional 16 MiB using mtd-concat driver. Cc: Vladimir Georgievsky <vladimir.georgievsky@yahoo.com> Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com> --- target/linux/ath79/dts/qca9550_mojo_c-75.dts | 24 ++++++++++++++++---- target/linux/ath79/image/generic.mk | 2 +- 2 files changed, 20 insertions(+), 6 deletions(-)