Skip to contentSkip to conversation

Pull request for branch for-2011.02/boards-cleanup

GIT PULL In review Thomas Petazzoni 8 participants 84 messages Dec 5, 2010 – Mar 7, 2011 1 message not in the archive Page 3 of 3

Subsystems (2)
lore
Share & tools
lore
#61 lore raw

PATCH 46/55 linux: Import minimal defconfigs as defconfigs

In reply to Thomas Petazzoni

Now that minimal kernel defconfigs are used in Buildroot, the problem is that copying those minimal configuration files to .config in the kernel source tree does not work, as kconfig will ask interactively what should be the value for all unspecified options.

On suggestion on Sam Ravnborg, the easiest way to solve this is to import the minimal defconfig file as a defconfig inside the kernel tree (in arch/$(ARCH)/configs) and configure the kernel with it.

---
 linux/linux.mk |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
linux/linux.mk +3 -1
index f7b0889..746eab0 100644
@@ -87,7 +87,9 @@ $(LINUX26_DIR)/.stamp_configured: $(LINUX26_DIR)/.stamp_patched
 ifeq ($(BR2_LINUX_KERNEL_USE_DEFCONFIG),y)
 	$(TARGET_MAKE_ENV) $(MAKE1) $(LINUX26_MAKE_FLAGS) -C $(@D) $(call qstrip,$(BR2_LINUX_KERNEL_DEFCONFIG))_defconfig
 else ifeq ($(BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG),y)
-	cp $(BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE) $(@D)/.config
+	cp $(BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE) $(@D)/arch/$(KERNEL_ARCH)/configs/buildroot_defconfig
+	$(TARGET_MAKE_ENV) $(MAKE1) $(LINUX26_MAKE_FLAGS) -C $(@D) buildroot_defconfig
+	rm $(@D)/arch/$(KERNEL_ARCH)/configs/buildroot_defconfig
 endif
 ifeq ($(BR2_ARM_EABI),y)
 	$(call KCONFIG_ENABLE_OPT,CONFIG_AEABI,$(@D)/.config)
Signature · 1 line
1.7.0.4
#62 lore raw

PATCH 47/55 linux: support a space-separated list of patches

In reply to Thomas Petazzoni

The kernel being a component that often needs a fairly important set of changes to be adapted to a particular hardware platform, having maximum flexibility on the patching process is a nice thing. Therefore, as per the discussions from the Buildroot Developer Day, we add a mechanism to apply a list of patches (that could come either from URLs, local files or local directories).

---
 linux/Config.in |    9 +++++----
 linux/linux.mk  |   23 +++++++++++------------
 2 files changed, 16 insertions(+), 16 deletions(-)
linux/Config.in +5 -4
index f10b34c..066723f 100644
@@ -70,11 +70,12 @@ config BR2_LINUX_KERNEL_VERSION
 #
 
 config BR2_LINUX_KERNEL_PATCH
-	string "Custom kernel patch"
+	string "Custom kernel patches"
 	help
-         The location can be an URL, a file path, or a directory. In
-         the case of a directory, all files matching linux-*.patch
-         will be applied.
+	  A space-separated list of patches to apply to the
+	  kernel. Each patch can be described as an URL, a local file
+	  path, or a directory. In the case of a directory, all files
+	  matching linux-*.patch in the directory will be applied.
 
 #
 # Configuration selection
linux/linux.mk +11 -12
index 746eab0..96dd2ba 100644
@@ -52,9 +52,8 @@ endif
 $(LINUX26_DIR)/.stamp_downloaded:
 	@$(call MESSAGE,"Downloading kernel")
 	$(call DOWNLOAD,$(LINUX26_SITE),$(LINUX26_SOURCE))
-ifneq ($(filter ftp://% http://%,$(LINUX26_PATCH)),)
-	$(call DOWNLOAD,$(dir $(LINUX26_PATCH)),$(notdir $(LINUX26_PATCH)))
-endif
+	$(foreach patch,$(filter ftp://% http://%,$(LINUX26_PATCH)),\
+		$(call DOWNLOAD,$(dir $(patch)),$(notdir $(patch)))$(sep))
 	mkdir -p $(@D)
 	touch $@
 
@@ -69,15 +68,15 @@ $(LINUX26_DIR)/.stamp_extracted: $(LINUX26_DIR)/.stamp_downloaded
 # Patch
 $(LINUX26_DIR)/.stamp_patched: $(LINUX26_DIR)/.stamp_extracted
 	@$(call MESSAGE,"Patching kernel")
-ifneq ($(LINUX26_PATCH),)
-ifneq ($(filter ftp://% http://%,$(LINUX26_PATCH)),)
-	toolchain/patch-kernel.sh $(@D) $(DL_DIR) $(notdir $(LINUX26_PATCH))
-else ifeq ($(shell test -d $(LINUX26_PATCH) && echo "dir"),dir)
-	toolchain/patch-kernel.sh $(@D) $(LINUX26_PATCH) linux-\*.patch
-else
-	toolchain/patch-kernel.sh $(@D) $(dir $(LINUX26_PATCH)) $(notdir $(LINUX26_PATCH))
-endif
-endif
+	for p in $(LINUX26_PATCH) ; do \
+		if echo $$p | grep -q -E "^ftp://|^http://" ; then \
+			toolchain/patch-kernel.sh $(@D) $(DL_DIR) `basename $$p` ; \
+		elif test -d $$p ; then \
+			toolchain/patch-kernel.sh $(@D) $$p linux-\*.patch ; \
+		else \
+			toolchain/patch-kernel.sh $(@D) `dirname $$p` `basename $$p` ; \
+		fi \
+	done
 	$(Q)touch $@
 
 
Signature · 1 line
1.7.0.4
#63 lore raw

PATCH 47/55 linux: support a space-separated list of patches

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Thomas> The kernel being a component that often needs a fairly important set Thomas> of changes to be adapted to a particular hardware platform, having Thomas> maximum flexibility on the patching process is a nice Thomas> thing. Therefore, as per the discussions from the Buildroot Developer Thomas> Day, we add a mechanism to apply a list of patches (that could come Thomas> either from URLs, local files or local directories).

Thomas> + for p in $(LINUX26_PATCH) ; do \
Thomas> + if echo $$p | grep -q -E "^ftp://|^http://" ; then \
Thomas> + toolchain/patch-kernel.sh $(@D) $(DL_DIR) basename $$p ; \
Thomas> + elif test -d $$p ; then \
Thomas> + toolchain/patch-kernel.sh $(@D) $$p linux-\*.patch ; \
Thomas> + else \
Thomas> + toolchain/patch-kernel.sh $(@D) dirname $$p basename $$p ; \
Thomas> + fi \

It would be a bit more efficient to do it in shell with a case statement, E.G.:

case "$$p" in

     http://*|http://*)
        toolchain/patch-kernel ..
        ;;

     *)
        if [ -d $$p ]; then
        ..

esac

But not a big deal.

Signature · 1 line
Bye, Peter Korsgaard
#64 lore raw

PATCH 47/55 linux: support a space-separated list of patches

Quoted 2 lines · On Thursday, December 16, 2010 16:34:18 Peter Korsgaard wrote:

case "$$p" in

     http://*|http://*)

guessing you meant ftp://|http://

also, this patch reminds me of common problem in buildroot. why do people use dirname and basename ? these really should be letting the shell do it
like ${f##*/} and ${f%/*}. or use make's builtins.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20101216/8b988f9c/attachment.pgp>

#65 lore raw

PATCH 47/55 linux: support a space-separated list of patches

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Mike" == Mike Frysinger <[email protected]> writes:

Quoted 2 lines · Mike> On Thursday, December 16, 2010 16:34:18 Peter Korsgaard wrote:
Quoted 2 lines

case "$$p" in
http://*|http://*)

Mike> guessing you meant ftp://|http://

Ehh, sure.

Mike> also, this patch reminds me of common problem in buildroot. why do people use Mike> dirname and basename ? these really should be letting the shell do it Mike> like ${f##*/} and ${f%/*}. or use make's builtins.

You cannot use make function as it's part of a shell loop, but shell builtins could be used, sure - Even though shell parameter expansion in combination with make escape rules starts to resemble line noise ;)

Signature · 1 line
Bye, Peter Korsgaard
#66 lore raw

PATCH 47/55 linux: support a space-separated list of patches

Quoted 7 lines · On Friday, December 17, 2010 04:41:18 Peter Korsgaard wrote:
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Mike" == Mike Frysinger writes:

also, this patch reminds me of common problem in buildroot. why do people use dirname and basename ? these really should be letting the shell do it like ${f##*/} and ${f%/*}. or use make's builtins.

You cannot use make function as it's part of a shell loop

i was making general statements

Quoted 3 lines

but shell
builtins could be used, sure - Even though shell parameter expansion in combination with make escape rules starts to resemble line noise ;)

perhaps, but i'd prefer line noise over excess build forks/execs. i think though it's more a matter of training your eyes to recognize these things.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20101217/f1c8a6e4/attachment.pgp>

#67 lore raw

PATCH 48/55 linux: always enable support for tmpfs in the kernel

In reply to Thomas Petazzoni

Our default /etc/fstab uses tmpfs to mount the /tmp directory, so it sounds like a good idea to enable this filesystem by default.

---
 linux/linux.mk |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
linux/linux.mk +2 -0
index 96dd2ba..ede9983 100644
@@ -90,6 +90,8 @@ else ifeq ($(BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG),y)
 	$(TARGET_MAKE_ENV) $(MAKE1) $(LINUX26_MAKE_FLAGS) -C $(@D) buildroot_defconfig
 	rm $(@D)/arch/$(KERNEL_ARCH)/configs/buildroot_defconfig
 endif
+	# Our fstab uses tmpfs
+	$(call KCONFIG_ENABLE_OPT,CONFIG_TMPFS,$(@D)/.config)
 ifeq ($(BR2_ARM_EABI),y)
 	$(call KCONFIG_ENABLE_OPT,CONFIG_AEABI,$(@D)/.config)
 else
Signature · 1 line
1.7.0.4
#68 lore raw

PATCH 48/55 linux: always enable support for tmpfs in the kernel

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Thomas> Our default /etc/fstab uses tmpfs to mount the /tmp directory, so it Thomas> sounds like a good idea to enable this filesystem by default.

Hmm, I'm not thrilled about this. If you don't have the full SHMEM filesystem enabled (which I would say is relatively common on the kind of small systems without swap we're targetting), you have ramfs rather than tmpfs, and you CAN use a custom fs skeleton, so tmpfs might not be needed (E.G. for an initramfs).

In general, I would like to keep the hardcoded options to a minimum.

Signature · 1 line
Bye, Peter Korsgaard
#69 lore raw

PATCH 49/55 Improve handling of mdev/udev

In reply to Thomas Petazzoni

Yegor Yefremov introduced udev/mdev integration, but it relies on devtmpfs and does not use tmpfs on /dev, which is the purpose of mdev/udev. This commit improves how mdev and udev are handled in Buildroot.

At compile time, only a minimal /dev is created in the filesystem, with only "console" and "null". This is done thanks to a small device table in target/generic/device_table_mdev_udev.txt. This is done directly at the configuration level (fs/Config.in).

Moreover, at compile time, the mounting of a tmpfs filesystem in /dev is enabled/disabled in /etc/inittab depending on whether udev/mdev are used or not. This is done in target/generic/Makefile.in, together with other hooks to tune the target filesystem (hostname, serial port, etc.).

At run time, what happens is :

* inittab sysinit actions are executed. They do: remount the root filesystem read/write, mount the proc filesystem, mount a tmpfs filesystem in /dev, create the /dev/pts directory and then mount all filesystems listed in fstab.

* initialization scripts are started, with S10mdev or S10udev being at the very beginning of the list of scripts to be executed.

Between the moment at which a tmpfs filesystem is mounted in /dev and the moment S10mdev or S10udev are executed, the /dev directory is empty of devices. This is why the "null" device is no longer used to redirect messages from sysinit actions.

The kernel compilation code is improved to only enable devtmpfs in the configuration when the devtmpfs method is used. udev/mdev do not require devtmpfs, only tmpfs.

Finally, the S10udev startup script is simplified, as it handled unnecessary things: mount sysfs, mount a tmpfs filesystem in /dev/, etc.

---
 fs/Config.in                              |   10 +++++++-
 fs/skeleton/etc/inittab                   |    7 +++--
 linux/linux.mk                            |    2 +-
 package/udev/S10udev                      |   34 -----------------------------
 target/generic/Makefile.in                |    9 +++++++
 target/generic/device_table_mdev_udev.txt |   17 ++++++++++++++
 6 files changed, 40 insertions(+), 39 deletions(-)
 create mode 100644 target/generic/device_table_mdev_udev.txt
fs/Config.in +9 -1
index 9ac3acc..2963d36 100644
@@ -35,7 +35,7 @@ config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
 
 endchoice
 
-config BR2_ROOTFS_DEVICE_TABLE
+config BR2_ROOTFS_CUSTOM_DEVICE_TABLE
 	string "Path to the device table"
 	depends on BR2_ROOTFS_DEVICE_CREATION_STATIC
 	default "target/generic/device_table.txt"
@@ -44,6 +44,14 @@ config BR2_ROOTFS_DEVICE_TABLE
 	  to the makedevs utility to create all the special device
 	  files in the target filesystem.
 
+config BR2_ROOTFS_DEVICE_TABLE
+	string
+	default $(BR2_ROOTFS_CUSTOM_DEVICE_TABLE) \
+		if BR2_ROOTFS_DEVICE_CREATION_STATIC
+	default "target/generic/device_table_mdev_udev.txt" \
+		if (BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV || \
+		    BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV)
+
 choice
 	prompt "Root FS skeleton"
 
fs/skeleton/etc/inittab +4 -3
index 4be14b8..6ed38d3 100644
@@ -16,9 +16,10 @@
 # Startup the system
 null::sysinit:/bin/mount -o remount,rw /
 null::sysinit:/bin/mount -t proc proc /proc
-null::sysinit:/bin/mkdir -p /dev/pts
-null::sysinit:/bin/mount -a
-null::sysinit:/bin/hostname -F /etc/hostname
+#::sysinit:/bin/mount -t tmpfs dev /dev # DEVTMPFS
+::sysinit:/bin/mkdir -p /dev/pts
+::sysinit:/bin/mount -a
+::sysinit:/bin/hostname -F /etc/hostname
 # now run any rc scripts
 ::sysinit:/etc/init.d/rcS
 
linux/linux.mk +1 -1
index ede9983..ca4b21c 100644
@@ -112,7 +112,7 @@ ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y)
 	$(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_SOURCE,\"$(BINARIES_DIR)/rootfs.initramfs\",$(@D)/.config)
 	$(call KCONFIG_ENABLE_OPT,CONFIG_INITRAMFS_COMPRESSION_GZIP,$(@D)/.config)
 endif
-ifneq ($(BR2_ROOTFS_DEVICE_CREATION_STATIC),y)
+ifeq ($(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS),y)
 	$(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS,$(@D)/.config)
 	$(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS_MOUNT,$(@D)/.config)
 endif
package/udev/S10udev +0 -34
index 6418f63..0d2a23a 100755
@@ -16,12 +16,6 @@
 #	/dev/zero, /dev/null -- that's needed to boot and run this script.
 #
 
-# old kernels don't use udev
-case $(uname -r) in
-    2.6*|2.7*)	;;
-    *)		exit 0;;
-esac
-
 # Check for missing binaries
 UDEV_BIN=/sbin/udevd
 test -x $UDEV_BIN || exit 5
@@ -33,41 +27,13 @@ UDEV_CONFIG=/etc/udev/udev.conf
 test -r $UDEV_CONFIG || exit 6
 . $UDEV_CONFIG
 
-# Directory where sysfs is mounted
-SYSFS_DIR=/sys
-
 case "$1" in
     start)
-        # mount sysfs if it's not yet mounted
-        if [ ! -d $SYSFS_DIR ]; then
-	    echo "${0}: SYSFS_DIR \"$SYSFS_DIR\" not found"
-	    exit 1
-        fi
-        grep -q "^sysfs $SYSFS_DIR" /proc/mounts ||
-	mount -t sysfs /sys /sys ||
-	exit 1
-
-        # mount $udev_root as ramfs if it's not yet mounted
-        # we know 2.6 kernels always support ramfs
-        if [ ! -d $udev_root ]; then
-	    echo "${0}: udev_root \"$udev_root\" not found"
-	    exit 1
-        fi
-        grep -q "^udev $udev_root" /proc/mounts ||
-	mount -t ramfs udev $udev_root ||
-	exit 1
-
-        mkdir $udev_root/pts $udev_root/shm
         mknod -m 0666 /dev/null c 1 3
-        mknod -m 0666 /dev/zero c 1 5
-        mknod -m 0600 /dev/console c 5 1
-
-        # populate /dev (normally)
         echo -n "Populating $udev_root using udev: "
         echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug
         $UDEV_BIN -d || (echo "FAIL" && exit 1)
 	$UDEVSTART_BIN || (echo "FAIL" && exit 1)
-	mount -t devpts /dev/pts /dev/pts || (echo "FAIL" && exit 1)
         echo "done"
         ;;
     stop)
target/generic/Makefile.in +9 -0
index 1ef2a9d..c952c54 100644
@@ -15,6 +15,13 @@ target-generic-getty:
 	$(SED) '/# GENERIC_SERIAL$$/s~^.*#~$(TARGET_GENERIC_GETTY)::respawn:/sbin/getty -L $(TARGET_GENERIC_GETTY) $(TARGET_GENERIC_GETTY_BAUDRATE) vt100 #~' \
 		$(TARGET_DIR)/etc/inittab
 
+target-generic-dev-tmpfs:
+ifeq ($(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV)$(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV),y)
+	$(SED) 's/#\(.*\)\(# DEVTMPFS\)$$/\1\2/' $(TARGET_DIR)/etc/inittab
+else
+	$(SED) 's/#\(.*\)\(# DEVTMPFS\)$$/#\1\2/' $(TARGET_DIR)/etc/inittab
+endif
+
 ifneq ($(TARGET_GENERIC_HOSTNAME),)
 TARGETS += target-generic-hostname
 endif
@@ -26,3 +33,5 @@ endif
 ifeq ($(BR2_TARGET_GENERIC_GETTY),y)
 TARGETS += target-generic-getty
 endif
+
+TARGETS += target-generic-dev-tmpfs
target/generic/device_table_mdev_udev.txt new file +17 -0
new file mode 100644
index 0000000..47493b3
@@ -0,0 +1,17 @@
+# Minimal device table for mdev/udev based systems
+
+# Device table entries take the form of:
+# <name>    <type>      <mode>  <uid>   <gid>   <major> <minor> <start> <inc>   <count>
+# where name is the file name,  type can be one of:
+#       f       A regular file
+#       d       Directory
+#       c       Character special device file
+#       b       Block special device file
+#       p       Fifo (named pipe)
+# uid is the user id for the target file, gid is the group id for the
+# target file.  The rest of the entries (major, minor, etc) apply only
+# to device special files.
+
+/dev		d	755	0	0	-	-	-	-	-
+/dev/console	c	666	0	0	5	1	-	-	-
+/dev/null	c	666	0	0	1	3	0	0	-
Signature · 1 line
1.7.0.4
#70 lore raw

PATCH 49/55 Improve handling of mdev/udev

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Thomas> Yegor Yefremov introduced udev/mdev integration, but it relies on Thomas> devtmpfs and does not use tmpfs on /dev, which is the purpose of Thomas> mdev/udev. This commit improves how mdev and udev are handled in Thomas> Buildroot.

Thomas> At compile time, only a minimal /dev is created in the filesystem, Thomas> with only "console" and "null". This is done thanks to a small device Thomas> table in target/generic/device_table_mdev_udev.txt. This is done Thomas> directly at the configuration level (fs/Config.in).

While I agree we need the minimal device table for /etc/shadow and similar permissions, do we really need to support mdev/udev without devtmpfs? It's been in the kernel now for close to 2 years, it's very small and it simplifies (and speeds up) the boot sequence quite a lot.

Signature · 1 line
Bye, Peter Korsgaard
#71 lore raw

PATCH 49/55 Improve handling of mdev/udev

In reply to Thomas Petazzoni
Quoted 35 lines · Thomas Petazzoni

Yegor Yefremov introduced udev/mdev integration, but it relies on devtmpfs and does not use tmpfs on /dev, which is the purpose of mdev/udev. This commit improves how mdev and udev are handled in Buildroot.

At compile time, only a minimal /dev is created in the filesystem, with only "console" and "null". This is done thanks to a small device table in target/generic/device_table_mdev_udev.txt. This is done directly at the configuration level (fs/Config.in).

Moreover, at compile time, the mounting of a tmpfs filesystem in /dev is enabled/disabled in /etc/inittab depending on whether udev/mdev are used or not. This is done in target/generic/Makefile.in, together with other hooks to tune the target filesystem (hostname, serial port, etc.).

At run time, what happens is :

* inittab sysinit actions are executed. They do: remount the root filesystem read/write, mount the proc filesystem, mount a tmpfs filesystem in /dev, create the /dev/pts directory and then mount all filesystems listed in fstab.

* initialization scripts are started, with S10mdev or S10udev being at the very beginning of the list of scripts to be executed.

Between the moment at which a tmpfs filesystem is mounted in /dev and the moment S10mdev or S10udev are executed, the /dev directory is empty of devices. This is why the "null" device is no longer used to redirect messages from sysinit actions.

The kernel compilation code is improved to only enable devtmpfs in the configuration when the devtmpfs method is used. udev/mdev do not require devtmpfs, only tmpfs.

Quoted 5 lines

Finally, the S10udev startup script is simplified, as it handled unnecessary things: mount sysfs, mount a tmpfs filesystem in /dev/, etc.

Hi Thomas/Peter,

What is the status of this patch? Will it or something similar get merged this development cycle. I'm looking to update to a newer buildroot version internally and I'll either need this patch or something I've written myself and would rather stay in sync with upstream.

Thanks
Will

Signature · 5 lines
------------------------------------------------------------------------
Will Wagner                                     will_wagner at carallon.com
Development Manager                      Office Tel: +44 (0)20 7371 2032
Carallon Ltd, Studio G20, Shepherds Building, Rockley Rd, London W14 0DA
------------------------------------------------------------------------
#72 lore raw

PATCH 49/55 Improve handling of mdev/udev

Quoted 4 lines · On Mon, 07 Mar 2011 18:52:35 +0000 William Wagner <[email protected]>…

What is the status of this patch? Will it or something similar get merged this development cycle. I'm looking to update to a newer buildroot version internally and I'll either need this patch or something I've written myself and would rather stay in sync with upstream.

I have updated this patch set last week to take into account comments from Peter, so I hope to be able to send it rather soon.

Regards!

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#73 lore raw

PATCH 50/55 xtensa: remove unused and useless skeleton patch

In reply to Thomas Petazzoni
---
 target/device/xtensa/skeleton-patch/etc/inittab |   45 -----------------------
 1 files changed, 0 insertions(+), 45 deletions(-)
 delete mode 100644 target/device/xtensa/skeleton-patch/etc/inittab
target/device/xtensa/skeleton-patch/etc/inittab deleted +0 -45
deleted file mode 100644
index de3ce70..0000000
@@ -1,45 +0,0 @@
-# /etc/inittab
-#
-# Copyright (C) 2001 Erik Andersen <[email protected]>
-#
-# Note: BusyBox init doesn't support runlevels.  The runlevels field is
-# completely ignored by BusyBox init. If you want runlevels, use
-# sysvinit.
-#
-# Format for each entry: <id>:<runlevels>:<action>:<process>
-#
-# id        == tty to run on, or empty for /dev/console
-# runlevels == ignored
-# action    == one of sysinit, respawn, askfirst, wait, and once
-# process   == program to run
-
-# Startup the system
-null::sysinit:/bin/mount -t proc proc /proc
-null::sysinit:/bin/mount -o remount,rw /
-null::sysinit:/bin/mount -a
-null::sysinit:/bin/hostname -F /etc/hostname
-# now run any rc scripts
-::sysinit:/etc/init.d/rcS
-
-# Set up a couple of getty's
-#tty1::respawn:/sbin/getty 38400 tty1
-#tty2::respawn:/sbin/getty 38400 tty2
-
-# Put a getty on the serial port
-ttyS0::respawn:/sbin/getty -L ttyS0 38400 vt100
-
-# Logging junk
-null::sysinit:/bin/touch /var/log/messages
-null::respawn:/sbin/syslogd -n -m 0
-null::respawn:/sbin/klogd -n
-#tty3::respawn:/usr/bin/tail -f /var/log/messages
-
-# Stuff to do for the 3-finger salute
-::ctrlaltdel:/sbin/reboot
-
-# Stuff to do before rebooting
-null::shutdown:/usr/bin/killall klogd
-null::shutdown:/usr/bin/killall syslogd
-null::shutdown:/bin/umount -a -r
-null::shutdown:/sbin/swapoff -a
-
Signature · 1 line
1.7.0.4
#74 lore raw

PATCH 50/55 xtensa: remove unused and useless skeleton patch

Hi Thomas,

We're using this particular inittab for our boards. I realize I haven't sync'ed buildroot recently, but is there now a more appropriate way to do this, that makes this approach "useless" ?

Thanks!
-Marc

Quoted 56 lines · Thomas Petazzoni
 --- target/device/xtensa/skeleton-patch/etc/inittab |   45

----------------------- 1 files changed, 0 insertions(+), 45 deletions(-) delete mode 100644
target/device/xtensa/skeleton-patch/etc/inittab

target/device/xtensa/skeleton-patch/etc/inittab deleted +0 -5
deleted file mode 100644
index de3ce70..0000000
--- a/target/device/xtensa/skeleton-patch/etc/inittab +++ /dev/null
@@ -1,45 +0,0 @@
-# /etc/inittab
-#
-# Copyright (C) 2001 Erik Andersen <[email protected]> -#
-# Note: BusyBox init doesn't support runlevels.  The

runlevels field is

target/device/xtensa/skeleton-patch/etc/inittab deleted +0 -39
-# completely ignored by BusyBox init. If you want runlevels, use
-# sysvinit.
-#
-# Format for each entry: <id>:<runlevels>:<action>:<process> -#
-# id        == tty to run on, or empty for /dev/console
-# runlevels == ignored
-# action    == one of sysinit, respawn, askfirst, wait, and once
-# process   == program to run
-
-# Startup the system
-null::sysinit:/bin/mount -t proc proc /proc
-null::sysinit:/bin/mount -o remount,rw /
-null::sysinit:/bin/mount -a
-null::sysinit:/bin/hostname -F /etc/hostname
-# now run any rc scripts
-::sysinit:/etc/init.d/rcS
-
-# Set up a couple of getty's
-#tty1::respawn:/sbin/getty 38400 tty1
-#tty2::respawn:/sbin/getty 38400 tty2
-
-# Put a getty on the serial port
-ttyS0::respawn:/sbin/getty -L ttyS0 38400 vt100
-
-# Logging junk
-null::sysinit:/bin/touch /var/log/messages
-null::respawn:/sbin/syslogd -n -m 0
-null::respawn:/sbin/klogd -n
-#tty3::respawn:/usr/bin/tail -f /var/log/messages
-
-# Stuff to do for the 3-finger salute
-::ctrlaltdel:/sbin/reboot
-
-# Stuff to do before rebooting
-null::shutdown:/usr/bin/killall klogd
-null::shutdown:/usr/bin/killall syslogd
-null::shutdown:/bin/umount -a -r
-null::shutdown:/sbin/swapoff -a
-
#75 lore raw

PATCH 50/55 xtensa: remove unused and useless skeleton patch

Hello Marc,

Quoted 6 lines · On Sun, 5 Dec 2010 17:08:50 -0800 Marc Gauthier <[email protected]> wrote:

Hi Thomas,

We're using this particular inittab for our boards. I realize I haven't sync'ed buildroot recently, but is there now a more appropriate way to do this, that makes this approach "useless" ?

Here is the diff between the default skeleton inittab and the xtensa specific inittab (and my comments below) :

device/xtensa/skeleton-patch/etc/inittab renamed from skeleton/etc/inittab +5 -6
@@ -14,26 +14,25 @@
 # process   == program to run
 
 # Startup the system
-null::sysinit:/bin/mount -o remount,rw /
 null::sysinit:/bin/mount -t proc proc /proc
-null::sysinit:/bin/mkdir -p /dev/pts
+null::sysinit:/bin/mount -o remount,rw /
 null::sysinit:/bin/mount -a
 null::sysinit:/bin/hostname -F /etc/hostname
 # now run any rc scripts
 ::sysinit:/etc/init.d/rcS
 
 # Set up a couple of getty's
-tty1::respawn:/sbin/getty 38400 tty1
-tty2::respawn:/sbin/getty 38400 tty2
+#tty1::respawn:/sbin/getty 38400 tty1
+#tty2::respawn:/sbin/getty 38400 tty2
 
 # Put a getty on the serial port
-#ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100 # GENERIC_SERIAL
+ttyS0::respawn:/sbin/getty -L ttyS0 38400 vt100
 
 # Logging junk
 null::sysinit:/bin/touch /var/log/messages
 null::respawn:/sbin/syslogd -n -m 0
 null::respawn:/sbin/klogd -n
-tty3::respawn:/usr/bin/tail -f /var/log/messages
+#tty3::respawn:/usr/bin/tail -f /var/log/messages
 
 # Stuff to do for the 3-finger salute
 ::ctrlaltdel:/sbin/reboot

So it does three things:

* Moves the read/write remount of the root filesystem after mounting proc, which probably makes sense to have in the default skeleton (there has been a thread recently on the list about this).

* It enables a getty on ttyS0, and we have an option to do that in Buildroot (which this patch set moves to a new "System configuration" menu).

* It removes things from tty1, tty2, tty3. They don't do much harm if tty1, tty2 and tty3 are not visible, but if we really think it's useful to be able to disable them, we can just add some more generic options in the "System configuration" menu.

So I think all those three changes can be handled without having a specific inittab, which is why I called the Xtensa specific one "useless" (sorry if the word sounded offensive, it definitely wasn't my intention).

Does this clarifies what I meant ?

Thanks for your feedback!

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#76 lore raw

PATCH 50/55 xtensa: remove unused and useless skeleton patch

Hi Thomas,

Quoted 2 lines · Thomas Petazzoni

Here is the diff between the default skeleton inittab and the xtensa specific inittab (and my comments below) :

[...]

Quoted 5 lines

So it does three things:

* Moves the read/write remount of the root filesystem after mounting proc, which probably makes sense to have in the default skeleton (there has been a thread recently on the list about this).

Ok.

Quoted 3 lines

* It enables a getty on ttyS0, and we have an option to do that in Buildroot (which this patch set moves to a new "System configuration" menu).

Ah, interesting.

Quoted 4 lines

* It removes things from tty1, tty2, tty3. They don't do much harm if tty1, tty2 and tty3 are not visible, but if we really think it's useful to be able to disable them, we can just add some more generic options in the "System configuration" menu.

I forget what effect this might have if any. Will have to try again.

Quoted 6 lines

So I think all those three changes can be handled without having a specific inittab, which is why I called the Xtensa specific one "useless" (sorry if the word sounded offensive, it definitely wasn't my intention).

Does this clarifies what I meant ?

Yes, very much. I'm happy to call the file "useless" (or whatever it rightly deserves ;-) , just wanted to understand why.

Thanks!
-Marc

Quoted 3 lines

Thanks for your feedback!

Thomas

#77 lore raw

PATCH 50/55 xtensa: remove unused and useless skeleton patch

In reply to Thomas Petazzoni
Quoted 6 lines · Marc Gauthier

Hi Thomas,

We're using this particular inittab for our boards.
I realize I haven't sync'ed buildroot recently, but is there now a more appropriate way to do this, that makes this approach "useless" ?

Sorry, missed the associated pull request. Will reply to that.

-Marc

#78 lore raw

PATCH 51/55 board: Add Qemu SH4 r2d configuration

In reply to Thomas Petazzoni

From: Philippe Reynes <[email protected]>

[ Thomas:

* renamed sh4_defconfig to qemu_sh4_r2d_defconfig, for consistency with other Qemu platforms supported
* renamed board/qemu/sh4 to board/qemu/sh4-r2d
* minor fixes in the readme.txt
* remove useless statements in the minimal defconfig
* switch to a fixed kernel version instead of "same as headers"
]

---
 ...-missing-consts-to-sys_execve-declaration.patch |   17 +++
 .../linux-sh-fix-kconfig-warning.patch             |   13 +++
 board/qemu/sh4-r2d/linux-2.6.36.config             |  106 ++++++++++++++++++++
 board/qemu/sh4-r2d/readme.txt                      |   17 +++
 configs/qemu_sh4_r2d_defconfig                     |   17 +++
 5 files changed, 170 insertions(+), 0 deletions(-)
 create mode 100644 board/qemu/sh4-r2d/kernel-patches/linux-06-17-SH-Add-missing-consts-to-sys_execve-declaration.patch
 create mode 100644 board/qemu/sh4-r2d/kernel-patches/linux-sh-fix-kconfig-warning.patch
 create mode 100644 board/qemu/sh4-r2d/linux-2.6.36.config
 create mode 100644 board/qemu/sh4-r2d/readme.txt
 create mode 100644 configs/qemu_sh4_r2d_defconfig
board/qemu/sh4-r2d/kernel-patches/linux-06-17-SH-Add-missing-consts-to-sys_execve-declaration.patch new file +17 -0
new file mode 100644
index 0000000..f702abe
@@ -0,0 +1,17 @@
+diff --git a/arch/sh/include/asm/syscalls_32.h b/arch/sh/include/asm/syscalls_32.h
+index be201fd..454538a 100644
+--- a/arch/sh/include/asm/syscalls_32.h
++++ b/arch/sh/include/asm/syscalls_32.h
+@@ -19,8 +19,10 @@ asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp,
+ asmlinkage int sys_vfork(unsigned long r4, unsigned long r5,
+ 			 unsigned long r6, unsigned long r7,
+ 			 struct pt_regs __regs);
+-asmlinkage int sys_execve(const char __user *ufilename, char __user * __user *uargv,
+-			  char __user * __user *uenvp, unsigned long r7,
++asmlinkage int sys_execve(const char __user *ufilename,
++			  const char __user *const __user *uargv,
++			  const char __user *const __user *uenvp,
++			  unsigned long r7,
+ 			  struct pt_regs __regs);
+ asmlinkage int sys_sigsuspend(old_sigset_t mask, unsigned long r5,
+ 			      unsigned long r6, unsigned long r7,
board/qemu/sh4-r2d/kernel-patches/linux-sh-fix-kconfig-warning.patch new file +13 -0
new file mode 100644
index 0000000..0ac07f2
@@ -0,0 +1,13 @@
+diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
+index 33990fa..06645b6 100644
+--- a/arch/sh/Kconfig
++++ b/arch/sh/Kconfig
+@@ -45,7 +45,7 @@ config SUPERH32
+ 	select HAVE_ARCH_KGDB
+ 	select HAVE_HW_BREAKPOINT
+ 	select HAVE_MIXED_BREAKPOINTS_REGS
+-	select PERF_EVENTS if HAVE_HW_BREAKPOINT
++	select PERF_EVENTS
+ 	select ARCH_HIBERNATION_POSSIBLE if MMU
+ 
+ config SUPERH64
board/qemu/sh4-r2d/linux-2.6.36.config new file +106 -0

106 lines not on this page · raw message

board/qemu/sh4-r2d/readme.txt new file +17 -0
new file mode 100644
index 0000000..b237596
@@ -0,0 +1,17 @@
+This little documentation explains how to build a kernel and a rootfs
+for qemu with sh4 architecture.
+
+1) Select qemu sh4 configuration and compile it :
+
+make sh4_defconfig
+make all
+
+2) Run qemu-system-sh4 with the kernel and rootfs previously generated
+
+It's recommended to use a git release for qemu (the current stable
+version has framebuffer display issues). If you want to avoid building
+all target, you can use this option on qemu configure :
+--target-list=sh4-softmmu
+
+The command is :
+qemu-system-sh4 -M r2d -kernel output/images/zImage -drive file=output/images/rootfs.ext2,if=ide,format=raw -append root=/dev/sda console=ttySC1,115200 noiotrap
configs/qemu_sh4_r2d_defconfig new file +17 -0
new file mode 100644
index 0000000..5e1f626
@@ -0,0 +1,17 @@
+# Architecture
+BR2_sh=y
+BR2_sh4=y
+
+# The kernel wants to use the -m4-nofpu option to make sure that it
+# doesn't use floating point operations.
+BR2_GCC_VERSION_4_5_X=y
+BR2_EXTRA_GCC_CONFIG_OPTIONS="--with-multilib-list=m4,m4-nofpu"
+
+# Linux kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="2.6.36"
+BR2_LINUX_KERNEL_PATCH="board/qemu/sh4-r2d/kernel-patches/"
+BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
+BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/sh4-r2d/linux-2.6.36.config"
+BR2_LINUX_KERNEL_ZIMAGE=y
Signature · 1 line
1.7.0.4
#79 lore raw

PATCH 52/55 linux: add support for ELF vmlinux image

In reply to Thomas Petazzoni

The ELF vmlinux image found at the root of the kernel source tree is the format that Qemu needs when emulating mips(el) or ppc targets, so add support for it.

---
 linux/Config.in |    4 ++++
 linux/linux.mk  |    6 ++++++
 2 files changed, 10 insertions(+), 0 deletions(-)
linux/Config.in +4 -0
index 066723f..0fa5088 100644
@@ -129,6 +129,10 @@ config BR2_LINUX_KERNEL_VMLINUX_BIN
 	bool "vmlinux.bin"
 	depends on BR2_mips || BR2_mipsel || BR2_sh || BR2_sh64
 
+config BR2_LINUX_KERNEL_VMLINUX
+	bool "vmlinux"
+	depends on BR2_mips || BR2_mipsel
+
 endchoice
 
 endif # BR2_LINUX_KERNEL
linux/linux.mk +6 -0
index ca4b21c..fe2ec37 100644
@@ -40,13 +40,19 @@ else ifeq ($(BR2_LINUX_KERNEL_ZIMAGE),y)
 LINUX26_IMAGE_NAME=zImage
 else ifeq ($(BR2_LINUX_KERNEL_VMLINUX_BIN),y)
 LINUX26_IMAGE_NAME=vmlinux.bin
+else ifeq ($(BR2_LINUX_KERNEL_VMLINUX),y)
+LINUX26_IMAGE_NAME=vmlinux
 endif
 
+ifeq ($(BR2_LINUX_KERNEL_VMLINUX),y)
+LINUX26_IMAGE_PATH=$(LINUX26_DIR)/$(LINUX26_IMAGE_NAME)
+else
 ifeq ($(KERNEL_ARCH),avr32)
 LINUX26_IMAGE_PATH=$(LINUX26_DIR)/arch/$(KERNEL_ARCH)/boot/images/$(LINUX26_IMAGE_NAME)
 else
 LINUX26_IMAGE_PATH=$(LINUX26_DIR)/arch/$(KERNEL_ARCH)/boot/$(LINUX26_IMAGE_NAME)
 endif
+endif # BR2_LINUX_KERNEL_VMLINUX
 
 # Download
 $(LINUX26_DIR)/.stamp_downloaded:
Signature · 1 line
1.7.0.4
#80 lore raw

PATCH 53/55 board: Add a Qemu PPC g3beige board

In reply to Thomas Petazzoni
---
 board/qemu/powerpc-g3beige/linux-2.6.36.config |   86 ++++++++++++++++++++++++
 board/qemu/powerpc-g3beige/readme.txt          |    6 ++
 configs/qemu_ppc_g3beige_defconfig             |   15 ++++
 3 files changed, 107 insertions(+), 0 deletions(-)
 create mode 100644 board/qemu/powerpc-g3beige/linux-2.6.36.config
 create mode 100644 board/qemu/powerpc-g3beige/readme.txt
 create mode 100644 configs/qemu_ppc_g3beige_defconfig
board/qemu/powerpc-g3beige/linux-2.6.36.config new file +86 -0
new file mode 100644
index 0000000..098dae3
@@ -0,0 +1,86 @@
+CONFIG_ALTIVEC=y
+CONFIG_EXPERIMENTAL=y
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_COMPAT_BRK=y
+CONFIG_SLAB=y
+CONFIG_LBDAF=y
+CONFIG_PPC_PMAC=y
+CONFIG_PPC_OF_BOOT_TRAMPOLINE=y
+CONFIG_PPC601_SYNC_FIX=y
+CONFIG_HIGHMEM=y
+CONFIG_NO_HZ=y
+CONFIG_BINFMT_ELF=y
+CONFIG_PROC_DEVICETREE=y
+CONFIG_PM=y
+CONFIG_SECCOMP=y
+CONFIG_PCCARD=y
+CONFIG_PCMCIA=y
+CONFIG_PCMCIA_LOAD_CIS=y
+CONFIG_PCMCIA_IOCTL=y
+CONFIG_YENTA=y
+CONFIG_ADVANCED_OPTIONS=y
+CONFIG_NET=y
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_INET=y
+CONFIG_INET_LRO=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FIRMWARE_IN_KERNEL=y
+CONFIG_CONNECTOR=y
+CONFIG_PROC_EVENTS=y
+CONFIG_BLK_DEV=y
+CONFIG_BLK_DEV_LOOP=y
+CONFIG_IDE=y
+CONFIG_IDE_GD=y
+CONFIG_IDE_GD_ATA=y
+CONFIG_BLK_DEV_IDECD=y
+CONFIG_IDE_PROC_FS=y
+CONFIG_BLK_DEV_CMD64X=y
+CONFIG_BLK_DEV_IDE_PMAC=y
+CONFIG_IEEE1394=y
+CONFIG_IEEE1394_OHCI1394=y
+CONFIG_IEEE1394_ETH1394=y
+CONFIG_IEEE1394_RAWIO=y
+CONFIG_IEEE1394_VIDEO1394=y
+CONFIG_IEEE1394_DV1394=y
+CONFIG_MACINTOSH_DRIVERS=y
+CONFIG_ADB=y
+CONFIG_ADB_CUDA=y
+CONFIG_ADB_PMU=y
+CONFIG_NETDEVICES=y
+CONFIG_NET_ETHERNET=y
+CONFIG_MACE=y
+CONFIG_BMAC=y
+CONFIG_HAPPYMEAL=y
+CONFIG_SUNGEM=y
+CONFIG_CASSINI=y
+CONFIG_NET_PCI=y
+CONFIG_PCNET32=y
+CONFIG_NE2K_PCI=y
+CONFIG_8139CP=y
+CONFIG_8139TOO=y
+CONFIG_8139TOO_PIO=y
+CONFIG_SERIO=y
+CONFIG_SERIAL_PMACZILOG=y
+CONFIG_SERIAL_PMACZILOG_TTYS=y
+CONFIG_SERIAL_PMACZILOG_CONSOLE=y
+CONFIG_HW_RANDOM=y
+CONFIG_SSB=y
+CONFIG_SSB_PCIHOST=y
+CONFIG_SSB_PCMCIAHOST=y
+CONFIG_SSB_DRIVER_PCICORE=y
+CONFIG_EXT2_FS=y
+CONFIG_EXT3_FS=y
+CONFIG_DNOTIFY=y
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+CONFIG_PROC_KCORE=y
+CONFIG_TMPFS=y
+CONFIG_MISC_FILESYSTEMS=y
+CONFIG_SQUASHFS=y
+CONFIG_LIBCRC32C=y
+CONFIG_BOOTX_TEXT=y
+CONFIG_CRYPTO_HW=y
board/qemu/powerpc-g3beige/readme.txt new file +6 -0
new file mode 100644
index 0000000..1006af9
@@ -0,0 +1,6 @@
+Run the emulation with:
+
+  qemu-system-ppc -M g3beige -kernel vmlinux -hda rootfs.ext2 -append "console=ttyS0 root=/dev/hdc" -serial stdio
+
+The login prompt will appear in the terminal that started Qemu. The
+graphical window is the framebuffer.
configs/qemu_ppc_g3beige_defconfig new file +15 -0
new file mode 100644
index 0000000..8b9212d
@@ -0,0 +1,15 @@
+# Architecture
+BR2_powerpc=y
+BR2_powerpc_440fp=y
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="2.6.36"
+BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
+BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/powerpc-g3beige/linux-2.6.36.config"
+BR2_LINUX_KERNEL_VMLINUX=y
+
+# Serial port config
+BR2_TARGET_GENERIC_GETTY=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
Signature · 1 line
1.7.0.4
#81 lore raw

PATCH 54/55 board: Add a Qemu mipsel Malta board

In reply to Thomas Petazzoni
---
 board/qemu/mipsel-malta/linux-2.6.36.config |   77 +++++++++++++++++++++++++++
 board/qemu/mipsel-malta/readme.txt          |    7 +++
 configs/qemu_mipsel_malta_defconfig         |   15 +++++
 3 files changed, 99 insertions(+), 0 deletions(-)
 create mode 100644 board/qemu/mipsel-malta/linux-2.6.36.config
 create mode 100644 board/qemu/mipsel-malta/readme.txt
 create mode 100644 configs/qemu_mipsel_malta_defconfig
board/qemu/mipsel-malta/linux-2.6.36.config new file +77 -0
new file mode 100644
index 0000000..b51de4b
@@ -0,0 +1,77 @@
+CONFIG_MIPS_MALTA=y
+CONFIG_CPU_LITTLE_ENDIAN=y
+CONFIG_CPU_MIPS32_R2=y
+CONFIG_MIPS_MT_SMP=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_HZ_100=y
+CONFIG_EXPERIMENTAL=y
+CONFIG_SYSVIPC=y
+CONFIG_LOG_BUF_SHIFT=15
+CONFIG_SYSFS_DEPRECATED_V2=y
+CONFIG_RELAY=y
+CONFIG_NAMESPACES=y
+CONFIG_UTS_NS=y
+CONFIG_IPC_NS=y
+CONFIG_PID_NS=y
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_EMBEDDED=y
+# CONFIG_SYSCTL_SYSCALL is not set
+# CONFIG_COMPAT_BRK is not set
+CONFIG_SLAB=y
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODVERSIONS=y
+CONFIG_MODULE_SRCVERSION_ALL=y
+# CONFIG_BLK_DEV_BSG is not set
+CONFIG_PCI=y
+CONFIG_PM=y
+CONFIG_NET=y
+CONFIG_PACKET=y
+CONFIG_UNIX=y
+CONFIG_INET=y
+CONFIG_IP_PNP=y
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_LRO is not set
+# CONFIG_INET_DIAG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_WIRELESS is not set
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+# CONFIG_MISC_DEVICES is not set
+CONFIG_IDE=y
+CONFIG_BLK_DEV_IDECD=y
+CONFIG_IDE_GENERIC=y
+CONFIG_BLK_DEV_GENERIC=y
+CONFIG_BLK_DEV_PIIX=y
+CONFIG_NETDEVICES=y
+CONFIG_NET_ETHERNET=y
+CONFIG_NET_PCI=y
+CONFIG_PCNET32=y
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+# CONFIG_WLAN is not set
+# CONFIG_INPUT_KEYBOARD is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_SERIO_I8042 is not set
+CONFIG_VT_HW_CONSOLE_BINDING=y
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+# CONFIG_HW_RANDOM is not set
+# CONFIG_HWMON is not set
+# CONFIG_MFD_SUPPORT is not set
+CONFIG_FB=y
+CONFIG_FB_CIRRUS=y
+# CONFIG_VGA_CONSOLE is not set
+# CONFIG_HID_SUPPORT is not set
+# CONFIG_USB_SUPPORT is not set
+CONFIG_EXT2_FS=y
+CONFIG_EXT3_FS=y
+CONFIG_QUOTA=y
+CONFIG_PROC_KCORE=y
+CONFIG_TMPFS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+CONFIG_ROOT_NFS=y
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
board/qemu/mipsel-malta/readme.txt new file +7 -0
new file mode 100644
index 0000000..b494976
@@ -0,0 +1,7 @@
+Run the emulation with:
+
+ qemu-system-mipsel -M malta -kernel vmlinux -serial stdio -hda rootfs.ext2 -append "root=/dev/hda"
+
+The login prompt will appear in the terminal that started Qemu. The
+graphical window is the framebuffer. No keyboard support has been
+enabled.
configs/qemu_mipsel_malta_defconfig new file +15 -0
new file mode 100644
index 0000000..b021c1f
@@ -0,0 +1,15 @@
+# Architecture
+BR2_mipsel=y
+BR2_mips_32r2=y
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="2.6.36"
+BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
+BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/mipsel-malta/linux-2.6.36.config"
+BR2_LINUX_KERNEL_VMLINUX=y
+
+# Serial port config
+BR2_TARGET_GENERIC_GETTY=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
Signature · 1 line
1.7.0.4
#82 lore raw

PATCH 55/55 linux: add KERNEL_ARCH_PATH to fix x86-specific issue

In reply to Thomas Petazzoni

Both i386 and x86_64 architectures are supported by the arch/x86 directory in the kernel. So, when we copy the kernel configuration file to arch/$(KERNEL_ARCH)/configs/, it does not work because arch/i386 and arch/x86_64 do not exist.

So, we introduce KERNEL_ARCH_PATH, which is the path to the architecture specific directory in the kernel source tree.

---
 linux/linux.mk |   20 ++++++++++++++++----
 1 files changed, 16 insertions(+), 4 deletions(-)
linux/linux.mk +16 -4
index fe2ec37..26674b8 100644
@@ -44,13 +44,25 @@ else ifeq ($(BR2_LINUX_KERNEL_VMLINUX),y)
 LINUX26_IMAGE_NAME=vmlinux
 endif
 
+# Compute the arch path, since i386 and x86_64 are in arch/x86 and not
+# in arch/$(KERNEL_ARCH). Even if the kernel creates symbolic links
+# for bzImage, arch/i386 and arch/x86_64 do not exist when copying the
+# defconfig file.
+ifeq ($(KERNEL_ARCH),i386)
+KERNEL_ARCH_PATH=$(LINUX26_DIR)/arch/x86
+else ifeq ($(KERNEL_ARCH),x86_64)
+KERNEL_ARCH_PATH=$(LINUX26_DIR)/arch/x86
+else
+KERNEL_ARCH_PATH=$(LINUX26_DIR)/arch/$(KERNEL_ARCH)
+endif
+
 ifeq ($(BR2_LINUX_KERNEL_VMLINUX),y)
 LINUX26_IMAGE_PATH=$(LINUX26_DIR)/$(LINUX26_IMAGE_NAME)
 else
 ifeq ($(KERNEL_ARCH),avr32)
-LINUX26_IMAGE_PATH=$(LINUX26_DIR)/arch/$(KERNEL_ARCH)/boot/images/$(LINUX26_IMAGE_NAME)
+LINUX26_IMAGE_PATH=$(KERNEL_ARCH_PATH)/boot/images/$(LINUX26_IMAGE_NAME)
 else
-LINUX26_IMAGE_PATH=$(LINUX26_DIR)/arch/$(KERNEL_ARCH)/boot/$(LINUX26_IMAGE_NAME)
+LINUX26_IMAGE_PATH=$(KERNEL_ARCH_PATH)/boot/$(LINUX26_IMAGE_NAME)
 endif
 endif # BR2_LINUX_KERNEL_VMLINUX
 
@@ -92,9 +104,9 @@ $(LINUX26_DIR)/.stamp_configured: $(LINUX26_DIR)/.stamp_patched
 ifeq ($(BR2_LINUX_KERNEL_USE_DEFCONFIG),y)
 	$(TARGET_MAKE_ENV) $(MAKE1) $(LINUX26_MAKE_FLAGS) -C $(@D) $(call qstrip,$(BR2_LINUX_KERNEL_DEFCONFIG))_defconfig
 else ifeq ($(BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG),y)
-	cp $(BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE) $(@D)/arch/$(KERNEL_ARCH)/configs/buildroot_defconfig
+	cp $(BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE) $(KERNEL_ARCH_PATH)/configs/buildroot_defconfig
 	$(TARGET_MAKE_ENV) $(MAKE1) $(LINUX26_MAKE_FLAGS) -C $(@D) buildroot_defconfig
-	rm $(@D)/arch/$(KERNEL_ARCH)/configs/buildroot_defconfig
+	rm $(KERNEL_ARCH_PATH)/configs/buildroot_defconfig
 endif
 	# Our fstab uses tmpfs
 	$(call KCONFIG_ENABLE_OPT,CONFIG_TMPFS,$(@D)/.config)
Signature · 1 line
1.7.0.4
#83 lore raw
In reply to Thomas Petazzoni
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Thomas> Hello,
Thomas> Here is the set of patches that reworks how Buildroot support Thomas> boards. Now, the principles are :

Thanks a lot! Committed everything except for patch 45, 48 and 49.

Signature · 1 line
Bye, Peter Korsgaard
#84 lore raw
Quoted 1 line · On Fri, 17 Dec 2010 17:01:05 +0100 Peter Korsgaard <[email protected]> wrote:

Thanks a lot! Committed everything except for patch 45, 48 and 49.

Thanks, I'll rework 45, 48 and 49 as per your comments, and provide a new branch with only those commits. Thanks for picking all the other patches, it's much easier to handle a 3-patches patch set than a 55-patches patch set :-)

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com