[OpenWrt-Devel] [PATCH v3 1/2] include/image.mk: Introduce generic option to wrap kernel into JFFS2

Benjamin Berg benjamin at sipsolutions.net
Fri Nov 6 11:54:29 EST 2015


On Fr, 2015-11-06 at 17:46 +0100, Felix Fietkau wrote:
> On 2015-11-06 17:25, Benjamin Berg wrote:
> > Some devices require the kernel to be in a JFFS2 file system. Make the
> > support for this more generic so that it can be used by other devices.
> > 
> > Signed-off-by: Benjamin Berg <benjamin at sipsolutions.net>
> > ---
> >  include/image.mk                   | 15 +++++++++++++++
> >  target/linux/ar71xx/image/Makefile | 19 +++----------------
> >  2 files changed, 18 insertions(+), 16 deletions(-)
> > 
> > diff --git a/include/image.mk b/include/image.mk
> > index 43980bc..753bd48 100644
> > --- a/include/image.mk
> > +++ b/include/image.mk
> > @@ -1135,15 +1121,16 @@ endef
> >  TARGET_DEVICES += ubnt-rs ubnt-rspro ubnt-ls-sr71
> >  
> >  define Device/ubnt-uap-pro
> > +  KERNEL_SIZE := 1536k
> >    IMAGE_SIZE := 15744k
> >    MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,1536k(kernel),14208k(rootfs),256k(cfg)ro,64k(EEPROM)ro,15744k at 0x50000(firmware)
> >    UBNT_TYPE := BZ
> >    UBNT_CHIP := ar934x
> >    BOARDNAME := UAP-PRO
> >    DEVICE_PROFILE := UBNT UAPPRO
> > -  KERNEL := kernel-bin | patch-cmdline | lzma | uImage lzma | mkubntkernelimage
> > +  KERNEL := kernel-bin | patch-cmdline | lzma | uImage lzma | jffs2 kernel0
> >    IMAGES := sysupgrade.bin factory.bin
> > -  IMAGE/sysupgrade.bin = append-kernel 1536k | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
> > +  IMAGE/sysupgrade.bin = append-kernel $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
> >    IMAGE/factory.bin = $$(IMAGE/sysupgrade.bin) | mkubntimage2
> >  endef
> Why did you add the KERNEL_SIZE variable here if you only use it in one
> place?

As I understand it the "Device/Build/kernel" define will check that the
kernel fits into KERNEL_SIZE if the variable is set. So while this is a
relatively unrelated change it should help to catch issues.

Benjamin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20151106/2f7f97f1/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list