Modify

Opened 6 years ago

Closed 3 years ago

#10730 closed defect (fixed)

Error in building ramdisk target image of AR71xx

Reported by: drkhosla@… Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: kernel Version: Trunk
Keywords: AR71xx ramdisk mikrotik Cc:

Description

I try to build r29638 for Mikrotik Router Board. When I choose target image as a ramdisk.I get following error

make[5]: Leaving directory `/openwrt/build_dir/linux-ar71xx_nand/linux-2.6.39.4'
rm -rf /openwrt/build_dir/linux-ar71xx_nand/modules
touch /openwrt/build_dir/linux-ar71xx_nand/linux-2.6.39.4/.configured
rm -f /openwrt/build_dir/linux-ar71xx_nand/linux-2.6.39.4/vmlinux /openwrt/build_dir/linux-ar71xx_nand/linux-2.6.39.4/System.map
make -C /openwrt/build_dir/linux-ar71xx_nand/linux-2.6.39.4 CROSS_COMPILE="mips-openwrt-linux-uclibc-" ARCH="mips" KBUILD_HAVE_NLS=no CONFIG_SHELL="/bin/bash" CC="mips-openwrt-linux-uclibc-gcc" modules
make[5]: Entering directory `/openwrt/build_dir/linux-ar71xx_nand/linux-2.6.39.4'
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
  CALL    scripts/checksyscalls.sh
/openwrt/build_dir/linux-ar71xx_nand/linux-2.6.39.4/usr/Makefile:58: *** multiple target patterns.  Stop.
make[5]: *** [usr] Error 2
make[5]: Leaving directory `/openwrt/build_dir/linux-ar71xx_nand/linux-2.6.39.4'
make[4]: *** [/openwrt/build_dir/linux-ar71xx_nand/linux-2.6.39.4/.modules] Error 2
make[4]: Leaving directory `/openwrt/target/linux/ar71xx'
make[3]: *** [compile] Error 2
make[3]: Leaving directory `/openwrt/target/linux'
make[2]: *** [target/linux/compile] Error 2
make[2]: Leaving directory `/openwrt'
make[1]: *** [/openwrt/staging_dir/target-mips_r2_uClibc-0.9.32/stamp/.target_compile] Error 2
make[1]: Leaving directory `/openwrt'
make: *** [world] Error 2

I am able to build other target images jffs, squash. But whenever I choose ramdisk it started showing error of multiple target patterns.

Attachments (0)

Change History (12)

comment:1 Changed 6 years ago by anonymous

I have the same issue.

I did a complete recheckout and everything seemed to work until I switched to compile the ramdisk.

Once I did that, and got the above error, I cant compile either (ramdisk image or jffs, squash, etc.).

comment:2 Changed 6 years ago by anonymous

I have a build of the backfire branch and of the trunk and this error is happening on both (r29993), and on a clean build.

Any suggestions on how to debug this make error. I'm afraid the web of openwrt makefiles is a bit beyond my experience.

comment:3 Changed 6 years ago by anonymous

I've narrowed it down. I did a complete fresh checkout (not just make clean, but a complete clean slate) and everything worked in the basic ar71xx configuration. Once I started tweaking the image and adding packages this error came back. I havent found the offending package yet, but if I dump the .config file and start fresh, that error goes away.

comment:4 Changed 6 years ago by anonymous

After adding packages back one by one, it seems usbreset or usb-modeswitch may have been the culprit. I could be totally wrong on this because it was a bit of a drawn out process.

comment:5 Changed 6 years ago by jow

Yes, usb-modeswitch-data is a very likely candidate as it contains files with colons in their name, this breaks the Makefile syntax when embedded into a target specification.

comment:6 Changed 6 years ago by anonymous

Thanks jow, any suggestions on debugging the makefiles for future reference? How would I print out line 58 of the makefile:
$(deps_initramfs): ;

I also couldn't figure out where build_dir/linux-ar71xx_nand/linux-2.6.39.4/usr/Makefile was getting called.

Thanks again!

comment:7 Changed 6 years ago by jow

Add an error call before it:

$(error $(deps_initramfs))

This will make the make process abort and print the current value of the given variable.

comment:8 follow-up: Changed 6 years ago by anonymous

Thanks jow! Yup, there are a ton of usbmodeswitch files with ":" in them (roughly 200 of them):

/OpenWrt/trunk/build_dir/target-mips_r2_uClibc-0.9.32/root-ar71xx/etc/usb_modeswitch.d/19d2:0003
......
/OpenWrt/trunk/build_dir/target-mips_r2_uClibc-0.9.32/root-ar71xx/etc/usb_modeswitch.d/0af0:d255

comment:9 in reply to: ↑ 8 Changed 6 years ago by Marcos Tadeu <marcos@…>

Replying to anonymous:

Thanks jow! Yup, there are a ton of usbmodeswitch files with ":" in them (roughly 200 of them):

/OpenWrt/trunk/build_dir/target-mips_r2_uClibc-0.9.32/root-ar71xx/etc/usb_modeswitch.d/19d2:0003
......
/OpenWrt/trunk/build_dir/target-mips_r2_uClibc-0.9.32/root-ar71xx/etc/usb_modeswitch.d/0af0:d255

Yep...
But this is not the problem. Or, is not the "real" problem.
I not use usb_switch.
The make word is ok if I not mark ramdisk in target menu;
If I mark ramdisk and run make, this do not work anymore, even I dismark ramdisk;
I need run make clean.

comment:10 Changed 6 years ago by anonymous

That was the problem for me. Maybe there is another package thats causing your issue.

I started with a fresh .config file and started adding packages (and recompiling) one at a time till it broke. I wouldn't advise that as it took forever.

You can edit the makefile with the debug line jow mentioned above:
$(error $(deps_initramfs))

Stick that just above line 58 in:
/openwrt/build_dir/linux-ar71xx_nand/linux-2.6.39.4/usr/Makefile

and do
make V=99

look for file names and paths with ":" in them. Its going to be a long list.

comment:11 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

comment:12 Changed 3 years ago by jogo

  • Resolution set to fixed
  • Status changed from new to closed

This has been fixed in r34125.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.