On Tue, 2014-10-14 at 15:41 +0100, Ian Campbell wrote: > On Tue, 2014-10-14 at 02:34 +0100, Ben Hutchings wrote: > > On Mon, 2014-10-13 at 16:30 +0100, Ben Hutchings wrote: > > [...] > > > Here are my generic changes, untested as I don't have such boards to > > > test with. They aren't going to cover i2c-s3c2410 (I think) or > > > USB-PHYs. > > > > > > For USB-PHYs, if MODULES=most then we would do: > > > copy_modules_dir kernel/drivers/usb/phy > > > or if MODULES=dep then: > > > add_loaded_modules 'phy[-_]*' > > [...] > > > > I've pushed these two changes to the git branch > > benh/add-more-device-types. Please test whether this works for your > > board. > > Upon install (on xgene) I get: > /usr/sbin/mkinitramfs: 252: /usr/share/initramfs-tools/hook-functions: Syntax > error: redirection unexpected > > Which is from the last line of add_loaded_modules: > done < <(cat 2>/dev/null /lib/modules/$(uname -r)/modules.builtin) > > Removing what looked like a mistake extra < I get: > /usr/sbin/mkinitramfs: 252: /usr/share/initramfs-tools/hook-functions: Syntax > error: "(" unexpected > > Ah, as I suspected, checkbashisms is confirming that <() is a bashism.
D'oh. > My fixup patch is below. > > With that in place it boots to a prompt on xgene for both modules=most > and =dep. > > I need to regroove my arndale to test there, more info on that soon. > > Ian. > > diff --git a/hook-functions b/hook-functions > index 7659517..30e57ed 100644 > --- a/hook-functions > +++ b/hook-functions > @@ -243,13 +243,13 @@ add_loaded_modules() > manual_add_modules $(basename $module) > fi > done > - while read module; do > + cat 2>/dev/null /lib/modules/$(uname -r)/modules.builtin | while read > module; do > case "$module" in > */$pattern.ko) > manual_add_modules $(basename $module .ko) > ;; > esac > - done < <(cat 2>/dev/null /lib/modules/$(uname -r)/modules.builtin) > + done > } > > # find and only copy root relevant modules I try to avoid putting variable assignments in pipelines as they may or may not run in a subshell (it varies between implementations). In this case I think it's harmless but I'd rather avoid it anyway. So I think I'll wrap this loop in a file test instead. Thanks for testing. Ben. -- Ben Hutchings Horngren's Observation: Among economists, the real world is often a special case.
signature.asc
Description: This is a digitally signed message part