[PATCH v3 3/5] bcm53xx: Add support for D-Link DIR-890L
Linus Walleij
linus.walleij at linaro.org
Sat Sep 2 09:36:01 PDT 2023
On Sat, Sep 2, 2023 at 3:46 PM Arınç ÜNAL <arinc.unal at arinc9.com> wrote:
> > +# Outputs a lzma compressed U-Boot that start at 0x00008000
> > +# just like the D-Link boot loaders expect
> > +define Build/dlink-uboot-bin
> > + $(STAGING_DIR_HOST)/bin/lzma e $(STAGING_DIR_IMAGE)/$(DEVICE_NAME)-u-boot.bin -d16 $@
> > +endef
>
> I see this patch is applied. $(STAGING_DIR_IMAGE)/$(DEVICE_NAME)-u-boot.bin
> won't be created unless PACKAGE_u-boot-dir-890l is enabled.
I'm sorry if I get anything wrong here, default-selecting packages
for targets isn't my strong game and sometime I don't know if I
can ever get it right ...
package/boot/uboot-bcm53xx/Makefile looks like this:
define U-Boot/dir-890l
NAME:=D-Link DIR-890L
BUILD_DEVICES:=dlink_dir-890l
endef
So my understanding of was BUILD_DEVICES that this will make
sure the package is built for the listed device(s) and thus
$(STAGING_DIR_IMAGE)/$(DEVICE_NAME)-u-boot.bin
will be there. But I guess it doesn't work as expected.
> For some
> reason, regardless of which device is selected on menuconfig, the OpenWrt
> SDK will compile an image for every device on the target. So if any device
> other than D-Link DIR-890L is selected on menuconfig,
> PACKAGE_u-boot-dir-890l won't be enabled. Therefore, the compilation
> process will fail while preparing an image for DIR-890L.
I suppose this oneliner is needed:
diff --git a/target/linux/bcm53xx/image/Makefile
b/target/linux/bcm53xx/image/Makefile
index 39b7efbef789..9483812facca 100644
--- a/target/linux/bcm53xx/image/Makefile
+++ b/target/linux/bcm53xx/image/Makefile
@@ -283,7 +283,7 @@ TARGET_DEVICES += dlink_dir-885l
define Device/dlink_dir-890l
DEVICE_VENDOR := D-Link
DEVICE_MODEL := DIR-890L
- DEVICE_PACKAGES := $(BRCMFMAC_43602A1) $(USB2_PACKAGES) $(USB3_PACKAGES)
+ DEVICE_PACKAGES := uboot-bcm53xx $(BRCMFMAC_43602A1)
$(USB2_PACKAGES) $(USB3_PACKAGES)
# Layout: U-boot (128kb max) followed by kernel and appended DTB.
# This is done because the boot loader will only read the first 2 MB
# from the flash and decompress the LZMA it finds there after the
I sent a patch!
Yours,
Linus Walleij
More information about the openwrt-devel
mailing list