Modify

Opened 4 years ago

Last modified 3 years ago

#9994 accepted enhancement

TARGET_ARCH=armel need some Makefiles tweaks

Reported by: drEagle <gandalf@…> Owned by: amain
Priority: minor Milestone: milestone:next-release
Component: debian/rootfs Version: 12.09
Severity: severity 4 Keywords: arm, armel, build
Cc:

Description

make TARGET_ARCH=armel seem to work (not tested on real hardware for now).

After tweaking some scripts and Makefiles, I get a complete build done :

debian/package/broadcom-wl is the only package which not build at all.
debian/package/debwrt-net need a dependence to broadcom-wl to be removed.

Hee are my notes, hope I do not forget some modifications :
<!>


debian/rootfs/debian.mk


ifeq ($(TARGET_ARCH), armel)
define qemu-prepare

@if [ ! -x $(QEMU_BIN_STATIC) ]; then echo "E: can't find qemu ($(QEMU_BIN_STATIC))"; fi
@if [ ! -e /proc/sys/fs/binfmt_misc/qemu-arm ]; then echo "E: can't find binfmt_misc qemu-arm ( /proc/sys/fs/binfmt_misc/qemu-arm).\nE: install qemu-user-static, or\nE: disable second stage with qemu with menuconfig (DEBIAN_ROOTFS_QEMU_2ND_STAGE)."; fi
@if [ ! -x $(QEMU_BIN_STATIC) -o ! -e /proc/sys/fs/binfmt_misc/qemu-arm ]; then echo "E: abort - qemu not available in chroot"; exit 1; fi
@if [ ! -e $(ROOTFS_BUILD_DIR)$(QEMU_INTERPRETER) ]; then sudo cp $(QEMU_BIN_STATIC) $(ROOTFS_BUILD_DIR)$(QEMU_INTERPRETER); fi
@if ! sudo chroot $(ROOTFS_BUILD_DIR) /bin/ls >/dev/null; then echo "E: qemu can't execute binaries for armel"; echo "E: abort"; exit 1; fi
@if ! (mount | grep -q $(ROOTFS_BUILD_DIR)/proc); then sudo chroot $(ROOTFS_BUILD_DIR) mount -t proc none /proc; fi
@if ! (mount | grep -q $(ROOTFS_BUILD_DIR)/sys ); then sudo chroot $(ROOTFS_BUILD_DIR) mount -t sysfs none /sys; fi
@mount

endef
else
define qemu-prepare

@if [ ! -x $(QEMU_BIN_STATIC) ]; then echo "E: can't find qemu ($(QEMU_BIN_STATIC))"; fi
@if [ ! -e /proc/sys/fs/binfmt_misc/qemu-$(TARGET_ARCH) ]; then echo "E: can't find binfmt_misc qemu-$(TARGET_ARCH) ( /proc/sys/fs/binfmt_misc/qemu-$(TARGET_ARCH)).\nE: install qemu-user-static, or\nE: disable second stage with qemu with menuconfig (DEBIAN_ROOTFS_QEMU_2ND_STAGE)."; fi
@if [ ! -x $(QEMU_BIN_STATIC) -o ! -e /proc/sys/fs/binfmt_misc/qemu-$(TARGET_ARCH) ]; then echo "E: abort - qemu not available in chroot"; exit 1; fi
@if [ ! -e $(ROOTFS_BUILD_DIR)$(QEMU_INTERPRETER) ]; then sudo cp $(QEMU_BIN_STATIC) $(ROOTFS_BUILD_DIR)$(QEMU_INTERPRETER); fi
@if ! sudo chroot $(ROOTFS_BUILD_DIR) /bin/ls >/dev/null; then echo "E: qemu can't execute binaries for $(TARGET_ARCH)"; echo "E: abort"; exit 1;
@if ! (mount | grep -q $(ROOTFS_BUILD_DIR)/proc); then sudo chroot $(ROOTFS_BUILD_DIR) mount -t proc none /proc; fi
@if ! (mount | grep -q $(ROOTFS_BUILD_DIR)/sys ); then sudo chroot $(ROOTFS_BUILD_DIR) mount -t sysfs none /sys; fi
@mount

endef
endif


# Fow now: Include debwrt-packages dependencies staticly. This
# list(DEBWRT_ROOTFS_PKGLST_DEPS) is managed in debian/package/debian.mk.
debian/rootfs/bootstrap: debian/rootfs/clean-rootfs-dir
ifeq ($(TARGET_ARCH),arm)

sudo debootstrap --arch=armel\

--foreign \

--include=$(call rootfs-package-list) \

$(DEBIAN_BUILD_VERSION) \

$(ROOTFS_BUILD_DIR) \

$(CONFIG_DEBIAN_BUILDENV_REPOSITORY)

else

sudo debootstrap --arch=$(TARGET_ARCH)\

--foreign \

--include=$(call rootfs-package-list) \

$(DEBIAN_BUILD_VERSION) \

$(ROOTFS_BUILD_DIR) \

$(CONFIG_DEBIAN_BUILDENV_REPOSITORY)

endif


debian/buildenv/debian.mk


ifeq ($(TARGET_ARCH),armel)
QEMU_BIN=$(DEBIAN_BUILD_DIR)/usr/local/bin/qemu-arm
QEMU_BIN_STATIC=$(QEMU_BIN)-static
QEMU_INTERPRETER=$(shell cat /proc/sys/fs/binfmt_misc/qemu-arm 2>/dev/null | grep interpreter | awk '{print $$2}')
else
QEMU_BIN=$(DEBIAN_BUILD_DIR)/usr/local/bin/qemu-$(TARGET_ARCH)
QEMU_BIN_STATIC=$(QEMU_BIN)-static
QEMU_INTERPRETER=$(shell cat /proc/sys/fs/binfmt_misc/qemu-$(TARGET_ARCH) 2>/dev/null | grep interpreter | awk '{print $$2}')
endif


ifeq ($(TARGET_ARCH),armel)

sudo chroot $(DEBIAN_BUILD_DIR) bash -c "export LC_ALL=C; apt-get -y --force-yes install libc6-armel-cross libc6-dev-armel-cross binutils-arm-linux-gnueabi gcc-4.4-arm-linux-gnu g++-4.4-arm-linux-gnueabi linux-kernel-headers-armel-cross"

else

sudo chroot $(DEBIAN_BUILD_DIR) bash -c "export LC_ALL=C; apt-get -y --force-yes install libc6-$(TARGET_ARCH)-cross libc6-dev-$(TARGET_ARCH)-cross binutils-$(TARGET_ARCH)-linux-gnu gcc-4.3-$(TARGET_ARCH)-linux-gnu g++-4.3-$(TARGET_ARCH)-linux-gnu linux-kernel-headers-$(TARGET_ARCH)-cross"

endif


debian/buildenv/qemu-build: debian/buildenv/qemu-prepare
ifeq ($(TARGET_ARCH),armel)

$(CHROOT_USER) bash -c "cd /usr/src/qemu/qemu-$(call qstrip,$(CONFIG_DEBIAN_BUILDENV_QEMU_VERSION)) && ./configure --static --target-list=arm-linux-user && make"
$(CHROOT) bash -c "cd /usr/src/qemu/qemu-$(call qstrip,$(CONFIG_DEBIAN_BUILDENV_QEMU_VERSION)) && make install"
$(CHROOT) cp /usr/local/bin/qemu-arm /usr/local/bin/qemu-arm-static
$(CHROOT_USER) bash -c "cd /usr/src/qemu/qemu-$(call qstrip,$(CONFIG_DEBIAN_BUILDENV_QEMU_VERSION)) && ./configure --target-list=arm-linux-user && make"
$(CHROOT) bash -c "cd /usr/src/qemu/qemu-$(call qstrip,$(CONFIG_DEBIAN_BUILDENV_QEMU_VERSION)) && make install"

else

$(CHROOT_USER) bash -c "cd /usr/src/qemu/qemu-$(call qstrip,$(CONFIG_DEBIAN_BUILDENV_QEMU_VERSION)) && ./configure --static --target-list=$(TARGET_ARCH)-linux-user && make"
$(CHROOT) bash -c "cd /usr/src/qemu/qemu-$(call qstrip,$(CONFIG_DEBIAN_BUILDENV_QEMU_VERSION)) && make install"
$(CHROOT) cp /usr/local/bin/qemu-$(TARGET_ARCH) /usr/local/bin/qemu-$(TARGET_ARCH)-static
$(CHROOT_USER) bash -c "cd /usr/src/qemu/qemu-$(call qstrip,$(CONFIG_DEBIAN_BUILDENV_QEMU_VERSION)) && ./configure --target-list=$(TARGET_ARCH)-linux-user && make"
$(CHROOT) bash -c "cd /usr/src/qemu/qemu-$(call qstrip,$(CONFIG_DEBIAN_BUILDENV_QEMU_VERSION)) && make install"

endif

touch $@


debian/package/debwrt-net/debian/control


Package: debwrt-net
Architecture: all
Depends: ${shlibs:Depends}, ${misc:Depends}, robocfg (>= 1.0.1), debwrt-hostapd, swconfig, dnsmasq
Replaces: hostapd
Description: DebWrt network scripts


<!>
$ make menuconfig
-> choose target device type

MVEBU

$ make TARGET_ARCH=armel

...
Make DebWrt completed

DEBWRTVERSION : testing - 2.1-1 - [ 17 March 2014 (584) ]
TARGET_ARCH : armel
BOARD : mvebu
SUB_BOARD : Generic
LINUX_VERSION : 3.10.32 (default)

Attachments (0)

Change History (2)

comment:1 Changed 3 years ago by amain

  • Owner set to amain
  • Status changed from new to accepted

This is great! Thanks you very much for this work! It be great if you could provide a set of patch files to make my job a little easier. I will commit those patches then to DebWrt.

comment:2 Changed 3 years ago by drEagle <gandalf@…>

$ svn info

Chemin : .
Chemin racine de la copie de travail : /mnt/TRAV/DEVEL/debwrt/debwrt-trunk
URL : https://svn.debwrt.net/debwrt/trunk
Racine du dépôt : https://svn.debwrt.net/debwrt
UUID du dépôt : f5bd6770-f393-4ba4-9591-88c0b0381f3f
Révision : 584
Type de nœud : répertoire
Tâche programmée : normale
Auteur de la dernière modification : amain
Révision de la dernière modification : 584
Date de la dernière modification: 2013-12-26 12:09:39 +0100 (jeu. 26 déc. 2013)

$ svn status

?       config/archs.in.orig
M       debian/buildenv/debian.mk
M       debian/package/broadcom-wl/build.sh
M       debian/package/debian.mk
M       debian/package/debwrt-net/debian/control
M       debian/package/libnl/debian/rules
M       debian/rootfs/debian.mk
?       debian/rootfs/verify
?       debian-mod.tar.gz

$ svn diff

Index: debian/buildenv/debian.mk
===================================================================
--- debian/buildenv/debian.mk	(révision 584)
+++ debian/buildenv/debian.mk	(copie de travail)
@@ -21,9 +21,15 @@
 SB2:=sudo chroot $(DEBIAN_BUILD_DIR) su - $(USER) -c bash -c "export LC_ALL=C; cd $(SB2_ARCH)-lenny && sb2"
 SB2E:=sudo chroot $(DEBIAN_BUILD_DIR) su - $(USER) -c bash -c "export LC_ALL=C; cd $(SB2_ARCH)-lenny && sb2 -e"
 SB2EF:=sudo chroot $(DEBIAN_BUILD_DIR) su - $(USER) -c bash -c "export LC_ALL=C; cd $(SB2_ARCH)-lenny && sb2 -eR"
+ifeq ($(TARGET_ARCH),armel)
+QEMU_BIN=$(DEBIAN_BUILD_DIR)/usr/local/bin/qemu-arm
+QEMU_BIN_STATIC=$(QEMU_BIN)-static
+QEMU_INTERPRETER=$(shell cat /proc/sys/fs/binfmt_misc/qemu-arm 2>/dev/null | grep interpreter | awk '{print $$2}')
+else
 QEMU_BIN=$(DEBIAN_BUILD_DIR)/usr/local/bin/qemu-$(TARGET_ARCH)
 QEMU_BIN_STATIC=$(QEMU_BIN)-static
 QEMU_INTERPRETER=$(shell cat /proc/sys/fs/binfmt_misc/qemu-$(TARGET_ARCH) 2>/dev/null | grep interpreter | awk '{print $$2}')
+endif
 
 sb2:
 	$(SB2)
@@ -118,8 +124,8 @@
 	#sudo chroot $(DEBIAN_BUILD_DIR) apt-get -y install libmpfr1ldbl
 	sudo chroot $(DEBIAN_BUILD_DIR) apt-get -y install emdebian-archive-keyring xapt dpkg-cross
 	sudo chroot $(DEBIAN_BUILD_DIR) bash -c "export LC_ALL=C; apt-get -y --force-yes install build-essential dh-make debootstrap fakeroot zlib1g-dev openssh-client vim pkg-config dpatch libncurses5-dev devscripts subversion automake gcc-multilib g++-multilib quilt"
-ifeq ($(TARGET_ARCH),arm)
-	sudo chroot $(DEBIAN_BUILD_DIR) bash -c "export LC_ALL=C; apt-get -y --force-yes install libc6-armel-cross libc6-dev-armel-cross binutils-arm-linux-gnueabi gcc-4.3-arm-linux-gnu g++-4.4-arm-linux-gnueabi linux-kernel-headers-armel-cross"
+ifeq ($(TARGET_ARCH),armel)
+	sudo chroot $(DEBIAN_BUILD_DIR) bash -c "export LC_ALL=C; apt-get -y --force-yes install libc6-armel-cross libc6-dev-armel-cross binutils-arm-linux-gnueabi gcc-4.4-arm-linux-gnu g++-4.4-arm-linux-gnueabi linux-kernel-headers-armel-cross"
 else
 	sudo chroot $(DEBIAN_BUILD_DIR) bash -c "export LC_ALL=C; apt-get -y --force-yes install libc6-$(TARGET_ARCH)-cross libc6-dev-$(TARGET_ARCH)-cross binutils-$(TARGET_ARCH)-linux-gnu gcc-4.3-$(TARGET_ARCH)-linux-gnu g++-4.3-$(TARGET_ARCH)-linux-gnu linux-kernel-headers-$(TARGET_ARCH)-cross"
 endif
@@ -141,11 +147,21 @@
 	touch $@
 
 debian/buildenv/qemu-build: debian/buildenv/qemu-prepare
+ifeq ($(TARGET_ARCH),armel)
+	$(CHROOT_USER) bash -c "cd /usr/src/qemu/qemu-$(call qstrip,$(CONFIG_DEBIAN_BUILDENV_QEMU_VERSION)) && ./configure --static --target-list=arm-linux-user && make"
+	$(CHROOT) bash -c "cd /usr/src/qemu/qemu-$(call qstrip,$(CONFIG_DEBIAN_BUILDENV_QEMU_VERSION)) && make install"
+	$(CHROOT) cp /usr/local/bin/qemu-arm /usr/local/bin/qemu-arm-static
+	$(CHROOT_USER) bash -c "cd /usr/src/qemu/qemu-$(call qstrip,$(CONFIG_DEBIAN_BUILDENV_QEMU_VERSION)) && ./configure --target-list=arm-linux-user && make"
+	$(CHROOT) bash -c "cd /usr/src/qemu/qemu-$(call qstrip,$(CONFIG_DEBIAN_BUILDENV_QEMU_VERSION)) && make install"
+
+else
 	$(CHROOT_USER) bash -c "cd /usr/src/qemu/qemu-$(call qstrip,$(CONFIG_DEBIAN_BUILDENV_QEMU_VERSION)) && ./configure --static --target-list=$(TARGET_ARCH)-linux-user && make"
 	$(CHROOT) bash -c "cd /usr/src/qemu/qemu-$(call qstrip,$(CONFIG_DEBIAN_BUILDENV_QEMU_VERSION)) && make install"
 	$(CHROOT) cp /usr/local/bin/qemu-$(TARGET_ARCH) /usr/local/bin/qemu-$(TARGET_ARCH)-static
 	$(CHROOT_USER) bash -c "cd /usr/src/qemu/qemu-$(call qstrip,$(CONFIG_DEBIAN_BUILDENV_QEMU_VERSION)) && ./configure --target-list=$(TARGET_ARCH)-linux-user && make"
 	$(CHROOT) bash -c "cd /usr/src/qemu/qemu-$(call qstrip,$(CONFIG_DEBIAN_BUILDENV_QEMU_VERSION)) && make install"
+
+endif
 	touch $@
 
 debian/buildenv/scratchbox-prepare:
Index: debian/package/broadcom-wl/build.sh
===================================================================
--- debian/package/broadcom-wl/build.sh	(révision 584)
+++ debian/package/broadcom-wl/build.sh	(copie de travail)
@@ -42,7 +42,9 @@
 mv ${BUILD_DIR} ${NEW_BUILD_DIR}
 BUILD_DIR=${NEW_BUILD_DIR}
 
-PACKAGE_SOURCE=${PACKAGE}-${VERSION}_$ARCH.tar.bz2
+#PACKAGE_SOURCE=${PACKAGE}-${VERSION}_$ARCH.tar.bz2
+PACKAGE_SOURCE=${PACKAGE}-${VERSION}.tar.bz2
+
 DOWNLOAD_URL2=http://mirror2.openwrt.org/sources/${PACKAGE_SOURCE}
 
 if [ ! -s ${DOWNLOAD_DIR}/${PACKAGE_SOURCE} ]; then rm -f ${DOWNLOAD_DIR}/${PACKAGE_SOURCE}; wget -O ${DOWNLOAD_DIR}/${PACKAGE_SOURCE} $DOWNLOAD_URL2; fi
Index: debian/package/debian.mk
===================================================================
--- debian/package/debian.mk	(révision 584)
+++ debian/package/debian.mk	(copie de travail)
@@ -20,9 +20,13 @@
 
 CH                        := "[\(\)]"
 
-DEBWRT_ROOTFS_PKGLST      := libnl iw debwrt-kernel-headers robocfg nvram \
+#DEBWRT_ROOTFS_PKGLST      := libnl iw debwrt-kernel-headers robocfg nvram \
+#		             debwrt-hostapd shellinabox libnl-tiny swconfig \
+#		             broadcom-wl debwrt-net mjpg-streamer
+
+DEBWRT_ROOTFS_PKGLST      := debwrt-kernel-headers libnl iw robocfg nvram \
 		             debwrt-hostapd shellinabox libnl-tiny swconfig \
-		             broadcom-wl debwrt-net mjpg-streamer
+		             debwrt-net mjpg-streamer
 
 DEBWRT_ROOTFS_PKGLST_DEPS := libjpeg8
 
Index: debian/package/debwrt-net/debian/control
===================================================================
--- debian/package/debwrt-net/debian/control	(révision 584)
+++ debian/package/debwrt-net/debian/control	(copie de travail)
@@ -7,6 +7,6 @@
 
 Package: debwrt-net
 Architecture: all
-Depends: ${shlibs:Depends}, ${misc:Depends}, robocfg (>= 1.0.1), broadcom-wl, debwrt-hostapd, swconfig, dnsmasq
+Depends: ${shlibs:Depends}, ${misc:Depends}, robocfg (>= 1.0.1), debwrt-hostapd, swconfig, dnsmasq
 Replaces: hostapd
 Description: DebWrt network scripts
Index: debian/package/libnl/debian/rules
===================================================================
--- debian/package/libnl/debian/rules	(révision 584)
+++ debian/package/libnl/debian/rules	(copie de travail)
@@ -46,7 +46,7 @@
 	# ./configure $(CROSS) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs"
 	# debwrt: some weirness: add gcc to host/build args, otherwist build will fail
 	pwd
-	./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE)  --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs"
+	./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE)  --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs"
 
 configure: configure-stamp
 configure-stamp:
Index: debian/rootfs/debian.mk
===================================================================
--- debian/rootfs/debian.mk	(révision 584)
+++ debian/rootfs/debian.mk	(copie de travail)
@@ -22,16 +22,29 @@
 MODULES_VERSION=$(shell echo `basename $(DEBWRT_MODULES_ARCHIVE) 2>/dev/null` | awk -F '-' '{print $$6}')
 DEBIAN_ROOTFS_INCLUDE_PACKAGES_DEBIAN_VERSION:=$(wildcard debian/rootfs/include_packages.list.$(DEBIAN_BUILD_VERSION))
 
+ifeq ($(TARGET_ARCH), armel)
 define qemu-prepare
 	@if [ ! -x $(QEMU_BIN_STATIC) ]; then echo "E: can't find qemu ($(QEMU_BIN_STATIC))"; fi
+	@if [ ! -e /proc/sys/fs/binfmt_misc/qemu-arm ]; then echo "E: can't find binfmt_misc qemu-arm ( /proc/sys/fs/binfmt_misc/qemu-arm).\nE: install qemu-user-static, or\nE: disable second stage with qemu with menuconfig (DEBIAN_ROOTFS_QEMU_2ND_STAGE)."; fi
+	@if [ ! -x $(QEMU_BIN_STATIC) -o ! -e /proc/sys/fs/binfmt_misc/qemu-arm ]; then echo "E: abort - qemu not available in chroot"; exit 1; fi
+	@if [ ! -e $(ROOTFS_BUILD_DIR)$(QEMU_INTERPRETER) ]; then sudo cp $(QEMU_BIN_STATIC) $(ROOTFS_BUILD_DIR)$(QEMU_INTERPRETER); fi
+	@if ! sudo chroot $(ROOTFS_BUILD_DIR) /bin/ls >/dev/null; then echo "E: qemu can't execute binaries for armel"; echo "E: abort"; exit 1; fi
+	@if ! (mount | grep -q $(ROOTFS_BUILD_DIR)/proc); then sudo chroot $(ROOTFS_BUILD_DIR) mount -t proc none /proc; fi
+	@if ! (mount | grep -q $(ROOTFS_BUILD_DIR)/sys ); then sudo chroot $(ROOTFS_BUILD_DIR) mount -t sysfs none /sys; fi
+	@mount
+endef
+else
+define qemu-prepare
+	@if [ ! -x $(QEMU_BIN_STATIC) ]; then echo "E: can't find qemu ($(QEMU_BIN_STATIC))"; fi
 	@if [ ! -e /proc/sys/fs/binfmt_misc/qemu-$(TARGET_ARCH) ]; then echo "E: can't find binfmt_misc qemu-$(TARGET_ARCH) ( /proc/sys/fs/binfmt_misc/qemu-$(TARGET_ARCH)).\nE: install qemu-user-static, or\nE: disable second stage with qemu with menuconfig (DEBIAN_ROOTFS_QEMU_2ND_STAGE)."; fi
 	@if [ ! -x $(QEMU_BIN_STATIC) -o ! -e /proc/sys/fs/binfmt_misc/qemu-$(TARGET_ARCH) ]; then echo "E: abort - qemu not available in chroot"; exit 1; fi
 	@if [ ! -e $(ROOTFS_BUILD_DIR)$(QEMU_INTERPRETER) ]; then sudo cp $(QEMU_BIN_STATIC) $(ROOTFS_BUILD_DIR)$(QEMU_INTERPRETER); fi
-	@if ! sudo chroot $(ROOTFS_BUILD_DIR) /bin/ls >/dev/null; then echo "E: qemu can't execute binaries for $(TARGET_ARCH)"; echo "E: abort"; exit 1; fi
+	@if ! sudo chroot $(ROOTFS_BUILD_DIR) /bin/ls >/dev/null; then echo "E: qemu can't execute binaries for $(TARGET_ARCH)"; echo "E: abort"; exit 1; 
 	@if ! (mount | grep -q $(ROOTFS_BUILD_DIR)/proc); then sudo chroot $(ROOTFS_BUILD_DIR) mount -t proc none /proc; fi
 	@if ! (mount | grep -q $(ROOTFS_BUILD_DIR)/sys ); then sudo chroot $(ROOTFS_BUILD_DIR) mount -t sysfs none /sys; fi
 	@mount
 endef
+endif
 
 define qemu-cleanup
 	@if (mount | grep -q $(ROOTFS_BUILD_DIR)/proc); then sudo umount $(ROOTFS_BUILD_DIR)/proc; fi
@@ -138,12 +151,22 @@
 # Fow now: Include debwrt-packages dependencies staticly. This
 #          list(DEBWRT_ROOTFS_PKGLST_DEPS) is managed in debian/package/debian.mk.
 debian/rootfs/bootstrap: debian/rootfs/clean-rootfs-dir
+ifeq ($(TARGET_ARCH),arm)
+	sudo debootstrap --arch=armel\
+    	             --foreign \
+        	     --include=$(call rootfs-package-list) \
+            	     $(DEBIAN_BUILD_VERSION) \
+     	             $(ROOTFS_BUILD_DIR) \
+    	             $(CONFIG_DEBIAN_BUILDENV_REPOSITORY)
+else
 	sudo debootstrap --arch=$(TARGET_ARCH)\
     	             --foreign \
         	     --include=$(call rootfs-package-list) \
             	     $(DEBIAN_BUILD_VERSION) \
      	             $(ROOTFS_BUILD_DIR) \
     	             $(CONFIG_DEBIAN_BUILDENV_REPOSITORY)
+endif
+
 	# complete ROOTFS/dev/ with additional device files
 	sudo bash -c "cd $(ROOTFS_BUILD_DIR)/dev ; /sbin/MAKEDEV -v consoleonly"
 	sudo bash -c "cd $(ROOTFS_BUILD_DIR)/dev ; /sbin/MAKEDEV -v sda"

Add Comment

Modify Ticket

Action
as accepted The owner will remain amain.
Author


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

 
Note: See TracTickets for help on using tickets.