On 2016-08-22 22:12, Daniel Golle wrote:
Hi Kenneth,
On Mon, Aug 22, 2016 at 09:54:46PM +0200, Kenneth Johansson wrote:
so I'm on commit 2a170e40860034a9a5157306547c1a333be3845b and moving up to
head is not really an option right now.
what I want to do is change target mt7621 to generate a rootfs in ubifs, not
ubi so no ubinize needed. In addition to this I want the kernel in uImage
format included in the rootfs in /boot/. and same for the device tree. and
it would be nice to have kernel uImage and dtb also in
$(TOPDIR)/bin/ramips/.
Can you elaborate why you need/want uImage and DTB to be inside a
filesystem instead of appending the DTB to the Kernel and storing it
inside a UBI volume?
Well the device tree is really intended to be part of the bootloader
(BIOS) and not directly attached to the kernel. Also u-boot changes some
parameters in the device tree so it really needs to have access to it
directly. Also u-boot itself can use the device tree fot it's drivers
but then it must be compiled into u-boot. Including it with the kernel
was never the intended usecase.
And I'm not particular excited about finding the device tree by
searching for a string.
sound like a 5 minute job but oh no I see no end in sight. Problem is that I
do not understand what I need to do. To many macro expansions involved in
the makefile.
so far I changed.
change the kernel code so that it takes the dtb from u-boot if it passes in
the dtb to the kernel. Before it only used the dtb that is patched in. this
works fine with the ramdisk image.
Great. Having U-Boot pass the DTB is a desirable feature indeed. And
parting ramips/mt7621 support to vanilla U-Boot would be amazing (but
supposedly also quite a lot of work).
I have it working for serial port, nand flash and ethernet and do not
intend to make more hardware work in u-boot. well I had to temporary
init USB hardware as the driver in kernel did not set it up correctly
and I have not had time to find out what it did wrong.
If you already build U-Boot from source yourself, you could also use
a FIT image containing both, DTB and Kernel which is already much
cleaner than patching it into the kernel.
Not interested as I described u-boot need access to the device tree
directly.
This then allows U-Boot to e.g. pass the MAC address appropriately via
device-tree instead of the kernel reading it from the environment or
EEPROM partition.
I have not looked into this yet. but I suspect we need to change both
u-boot and the kernel to make this work.
I added ubifs to FEATURES in target/linux/ramips/Makefile so that "make
menuconfig" can select ubifs image. I also select the option that should
include uImage and dtb in rootfs. this do not work. so I tried to fix it in
The option to include dtb and uimage in rootfs is fundamentally flawed
and broken. It was added at a time when proper support for generating
UBI images wasn't yet implemented in OpenWrt.
Maybe we should mark it as deprecated?
no you should not. there is nothing broken about it. this is how grub
works on PC you read the kernel directly out of the rootfs. It also used
the flash a bit more efficiently. just a bit but there is a cost to
create an ubi volume and as I said before the notion to combine DTB and
kernel is wrong it is just a band aid when you have bootloader that do
no understand device tree. Do not combine them.
target/linux/ramips/image/Makefile. But what changes should I do ? It is
really hard to understand what the correct change really is and so far all
my testing results in more or less no change or some other error showing up.
any suggestiongs ?? its fine to do it for master I'm sure I can backport it
once I have the correct changes to target/linux/ramips/image/Makefile.
If you really, really need a boot-filesystem instead of a volume for
any reason which cannot be addressed otherwise (eg. Buffalo uses a
JFFS2-NAND boot partition in their bootloader which doesn't support
UBI at all), please explain and we shall find a solution.
Apart from that, just use UBI/NAND support in the way intended (ie.
have a plain volume for the kernel) and you won't have any problems,
I suppose...
even this do not currently work. there is no UBI support of any kind for
mt7621 and adding it was what I was asking about.
Cheers
Daniel
_______________________________________________
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev
_______________________________________________
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev