PATCH: make h2200-bootloader load & depend on mtdblock
Hi there,
The attached patch fixes bug 4451 by making h2200-bootloader depend on kernel-module-mtdblock and load the mtdblock module before attempting to use it.
http://bugs.openembedded.net/show_bug.cgi?id=4451
Does this look OK?
Cheers,
Paul
#
# old_revision [87bf384fc6b31f73e5ad8bbd29b113adcc5cd9e0] # # patch "packages/h2200-bootloader/h2200-bootloader.bb" # from [d015a17dbeb17e4fef0f6d6df88a9ca9620cc88f] # to [80838c3d05408a49597b6fad5a441fecf5af0af7] # ============================================================ --- packages/h2200-bootloader/h2200-bootloader.bb d015a17dbeb17e4fef0f6d6df88a9ca9620cc88f +++ packages/h2200-bootloader/h2200-bootloader.bb 80838c3d05408a49597b6fad5a441fecf5af0af7 @@ -1,6 +1,7 @@ DESCRIPTION = "Bootloader firmware extra DESCRIPTION = "Bootloader firmware extractor for the h2200 iPAQ" +RDEPENDS = kernel-module-mtdblock ALLOW_EMPTY = "1" -PR="r2" +PR="r3"
COMPATIBLE_MACHINE = "h2200"
#it is a shell script, but lets protect the innocent some more
@@ -9,5 +10,6 @@ mkdir -p /lib/firmware
pkg_postinst() {
#!/bin/sh
mkdir -p /lib/firmware
+modprobe mtdblock
dd if=/dev/mtdblock0 of=/lib/firmware/h2200_bootloader.bin 2>/dev/null }
Hi Paul,
two very minor comments
Quoted 1 line · Paul Eggleton
+RDEPENDS = kernel-module-mtdblock
RDEPENDS = "kernel-module-mtdblock"
Quoted 1 line
+PR="r3"
PR = "r3"
Regards
Rolf
Quoted 9 lines · Paul Eggleton
Hi there,
The attached patch fixes bug 4451 by making h2200-bootloader depend on kernel-module-mtdblock and load the mtdblock module before attempting to use it.
http://bugs.openembedded.net/show_bug.cgi?id=4451
Does this look OK?
No
+RDEPENDS = kernel-module-mtdblock
Never ever rdepend on a kernelmodules, since it might be built in to the kernel in the future (like it was in the past), only use
RRECOMMENDS_${PN} = "kernel-module-foo"
regards,
Koen
Quoted 4 lines · Koen Kooi
Never ever rdepend on a kernelmodules, since it might be built in to the kernel in the future (like it was in the past), only use
RRECOMMENDS_${PN} = "kernel-module-foo"
OK, so please excuse my ignorance and I don't have OE in front of me to test it, but does that mean that kernel-module-mtdblock will be included in images where h2200-bootloader is included? If not, then it needs to be done some other way.
Cheers,
Paul
Quoted 10 lines · Paul Eggleton
Quoted 4 lines · Koen Kooi
Never ever rdepend on a kernelmodules, since it might be built in to the kernel in the future (like it was in the past), only use
RRECOMMENDS_${PN} = "kernel-module-foo"
OK, so please excuse my ignorance and I don't have OE in front of me to test it, but does that mean that kernel-module-mtdblock will be included in images where h2200-bootloader is included? If not, then it needs to be done some other way.
It means that h2200-bootloader (but not the -dev and -dbg packages) with have this in its opkg controlfile:
Recommends: kernel-module-foo
regards,
Koen
Quoted 10 lines · Paul Eggleton
Quoted 4 lines · Koen Kooi
Never ever rdepend on a kernelmodules, since it might be built in to the kernel in the future (like it was in the past), only use
RRECOMMENDS_${PN} = "kernel-module-foo"
OK, so please excuse my ignorance and I don't have OE in front of me to test it, but does that mean that kernel-module-mtdblock will be included in images where h2200-bootloader is included? If not, then it needs to be done some other way.
Yes, its standard practise to RRECOMMEND kernel modules since if they're built into the kernel you get build failures otherwise. The RRECOMMEND is a standard approach and well tested.
Regards,
Richard
Quoted 3 lines · Richard Purdie
Yes, its standard practise to RRECOMMEND kernel modules since if they're built into the kernel you get build failures otherwise. The RRECOMMEND is a standard approach and well tested.
Apart from this discussion, sorry to interrupt, but does mtdchar 9related to mtdblock I guess) actually work?
On my H2200('s) it fails to properly flash a kernel.
It doesn't matter much now because we boot from SD, but nevertheless it is strange.
The mtd folks refuse to help me when I repeatedly queried them.
Udo
Quoted 11 lines · Udo van den Heuvel
Quoted 3 lines · Richard Purdie
Yes, its standard practise to RRECOMMEND kernel modules since if they're built into the kernel you get build failures otherwise. The RRECOMMEND is a standard approach and well tested.
Apart from this discussion, sorry to interrupt, but does mtdchar 9related to mtdblock I guess) actually work?
On my H2200('s) it fails to properly flash a kernel.
It doesn't matter much now because we boot from SD, but nevertheless it is strange.
The mtd folks refuse to help me when I repeatedly queried them.
Yes, mtdchar usually works. It may not do exactly what you expect though as its a bit different from a normal character device.
Cheers,
Richard
Quoted 5 lines · Richard Purdie
Quoted 4 lines · Udo van den Heuvel
Quoted 3 lines · Richard Purdie
Yes, its standard practise to RRECOMMEND kernel modules since if they're built into the kernel you get build failures otherwise. The RRECOMMEND is a standard approach and well tested.
Quoted 8 lines
Quoted 6 lines
Apart from this discussion, sorry to interrupt, but does mtdchar 9related to mtdblock I guess) actually work?
On my H2200('s) it fails to properly flash a kernel.
It doesn't matter much now because we boot from SD, but nevertheless it is strange.
The mtd folks refuse to help me when I repeatedly queried them.Yes, mtdchar usually works.
'usually' sounds atypical here:
http://bugs.openembedded.net/show_bug.cgi?id=4354
but also:
http://bugs.openembedded.net/show_bug.cgi?id=4324
and:
http://bugs.openembedded.net/show_bug.cgi?id=4362
So a whole slew of flash-related issues, all based on mtd-related code. My ipaq ran win2003 mobile fine.
Quoted 1 line
It may not do exactly what you expect though
That is what I observe, others see similar issues.
Udo
Quoted 3 lines · Richard Purdie
Yes, its standard practise to RRECOMMEND kernel modules since if they're built into the kernel you get build failures otherwise. The RRECOMMEND is a standard approach and well tested.
Works like a charm. I have committed the changes including all recommendations. Thanks all!
Cheers,
Paul