[PATCH 1/3] ramips: lzma-loader: make FLASH_START configurable
Chuanhong Guo
gch981213 at gmail.com
Wed Sep 2 21:22:18 EDT 2020
Hi!
On Thu, Sep 3, 2020 at 1:03 AM Adrian Schmutzler
<mail at adrianschmutzler.de> wrote:
> > --- a/target/linux/ramips/image/lzma-loader/src/loader.c
> > +++ b/target/linux/ramips/image/lzma-loader/src/loader.c
> > @@ -28,9 +28,6 @@
> > #include "printf.h"
> > #include "LzmaDecode.h"
> >
> > -#define AR71XX_FLASH_START 0x1f000000
> > -#define AR71XX_FLASH_END 0x1fe00000
> > -
>
> Am I understanding this right, that if FLASH_START is not defined and set in ramips/image/Makefile, then compilation will fail here as the CONFIG_FLASH_START symbol is not defined?
That's my intention. It'll actually fail...
> > #define KSEG0 0x80000000
> > #define KSEG1 0xa0000000
> >
> > @@ -178,7 +175,7 @@ static void lzma_init_data(void)
> > unsigned long kernel_ofs;
> > unsigned long kernel_size;
> >
> > - flash_base = (unsigned char *) KSEG1ADDR(AR71XX_FLASH_START);
> > + flash_base = (unsigned char *) KSEG1ADDR(CONFIG_FLASH_START);
...here. It'll fail if CONFIG_FLASH_START isn't defined and no lzma
blob is provided.
--
Regards,
Chuanhong Guo
More information about the openwrt-devel
mailing list