diff mbox

[v2,3/3] configs: add defconfig for Atmel AT91SAM9260-EK Nand Flash Boot

Message ID 1366184503-16875-4-git-send-email-fabio.porcedda@gmail.com
State Superseded
Headers show

Commit Message

Fabio Porcedda April 17, 2013, 7:41 a.m. UTC
This is a configuration that provides a basic setup for generating
bootable nandflash images:
- at91bootstrap
- barebox
- kernel
- rootfs

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
---
 .../linux-ARM-at91-enable-nand-ubifs-boot.patch    | 44 ++++++++++++++++++++++
 configs/at91sam9260eknf_defconfig                  | 15 ++++++++
 2 files changed, 59 insertions(+)
 create mode 100644 board/atmel/at91sam9260ek/linux-ARM-at91-enable-nand-ubifs-boot.patch
 create mode 100644 configs/at91sam9260eknf_defconfig

Comments

Thomas Petazzoni May 1, 2013, 9:14 p.m. UTC | #1
Dear Fabio Porcedda,

On Wed, 17 Apr 2013 09:41:43 +0200, Fabio Porcedda wrote:
> This is a configuration that provides a basic setup for generating
> bootable nandflash images:
> - at91bootstrap
> - barebox
> - kernel
> - rootfs
> 
> Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
> ---
>  .../linux-ARM-at91-enable-nand-ubifs-boot.patch    | 44 ++++++++++++++++++++++

I think we generally prefer to store a kernel defconfig, rather than a
patch against one of the intree kernel defconfigs.


> diff --git a/configs/at91sam9260eknf_defconfig b/configs/at91sam9260eknf_defconfig
> new file mode 100644
> index 0000000..5d26798
> --- /dev/null
> +++ b/configs/at91sam9260eknf_defconfig
> @@ -0,0 +1,15 @@
> +BR2_arm=y
> +BR2_PREFER_STATIC_LIB=y

This shouldn't be in a defconfig.

> +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y
> +BR2_PACKAGE_HOST_SAM_BA=y
> +BR2_TARGET_ROOTFS_UBIFS=y
> +BR2_TARGET_ROOTFS_UBI=y
> +BR2_TARGET_AT91BOOTSTRAP=y
> +BR2_TARGET_AT91BOOTSTRAP_BOARD="at91sam9260ek"
> +BR2_TARGET_AT91BOOTSTRAP_NANDFLASH=y
> +BR2_TARGET_BAREBOX=y
> +BR2_TARGET_BAREBOX_BOARD_DEFCONFIG="at91sam9260ek"
> +BR2_LINUX_KERNEL=y
> +BR2_LINUX_KERNEL_PATCH="board/atmel/at91sam9260ek"
> +BR2_LINUX_KERNEL_DEFCONFIG="at91sam9260"
> +BR2_LINUX_KERNEL_ZIMAGE=y

Thanks!

Thomas
Fabio Porcedda May 1, 2013, 10:04 p.m. UTC | #2
On Wed, May 1, 2013 at 11:14 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Dear Fabio Porcedda,

Hi Thomas,
thanks for reviewing.

> On Wed, 17 Apr 2013 09:41:43 +0200, Fabio Porcedda wrote:
>> This is a configuration that provides a basic setup for generating
>> bootable nandflash images:
>> - at91bootstrap
>> - barebox
>> - kernel
>> - rootfs
>>
>> Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
>> ---
>>  .../linux-ARM-at91-enable-nand-ubifs-boot.patch    | 44 ++++++++++++++++++++++
>
> I think we generally prefer to store a kernel defconfig, rather than a
> patch against one of the intree kernel defconfigs.

I prefer to modify the defconfig intree kernel to be able to use newer
versions of
the kernel smoothly with little effort if not any effort.

IMHO if i store a custom defconfig i need to change it more often
(maybe for every new kernel version),
instead patching the intree kernel defconfig is less work for me and
for the buildroot maintainers.

IMHO storing a kernel defconfig is better when someone want to use a
specific kernel version
and not the latest upstream version with little modifications.

>
>> diff --git a/configs/at91sam9260eknf_defconfig b/configs/at91sam9260eknf_defconfig
>> new file mode 100644
>> index 0000000..5d26798
>> --- /dev/null
>> +++ b/configs/at91sam9260eknf_defconfig
>> @@ -0,0 +1,15 @@
>> +BR2_arm=y
>> +BR2_PREFER_STATIC_LIB=y
>
> This shouldn't be in a defconfig.

Ok i will send a corrected version without it.

>
>> +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y
>> +BR2_PACKAGE_HOST_SAM_BA=y
>> +BR2_TARGET_ROOTFS_UBIFS=y
>> +BR2_TARGET_ROOTFS_UBI=y
>> +BR2_TARGET_AT91BOOTSTRAP=y
>> +BR2_TARGET_AT91BOOTSTRAP_BOARD="at91sam9260ek"
>> +BR2_TARGET_AT91BOOTSTRAP_NANDFLASH=y
>> +BR2_TARGET_BAREBOX=y
>> +BR2_TARGET_BAREBOX_BOARD_DEFCONFIG="at91sam9260ek"
>> +BR2_LINUX_KERNEL=y
>> +BR2_LINUX_KERNEL_PATCH="board/atmel/at91sam9260ek"
>> +BR2_LINUX_KERNEL_DEFCONFIG="at91sam9260"
>> +BR2_LINUX_KERNEL_ZIMAGE=y
>
> Thanks!
>
> Thomas
> --
> Thomas Petazzoni, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com


Best regards
--
Fabio Porcedda
Thomas Petazzoni May 2, 2013, 9:59 a.m. UTC | #3
Dear Fabio Porcedda,

On Thu, 2 May 2013 00:04:41 +0200, Fabio Porcedda wrote:

> > I think we generally prefer to store a kernel defconfig, rather
> > than a patch against one of the intree kernel defconfigs.
> 
> I prefer to modify the defconfig intree kernel to be able to use newer
> versions of
> the kernel smoothly with little effort if not any effort.
> 
> IMHO if i store a custom defconfig i need to change it more often
> (maybe for every new kernel version),
> instead patching the intree kernel defconfig is less work for me and
> for the buildroot maintainers.
> 
> IMHO storing a kernel defconfig is better when someone want to use a
> specific kernel version
> and not the latest upstream version with little modifications.

Well, fair enough. I'm not sure it's really easier to maintain, but I
don't have a strong opinion on this.

Thanks,

Thomas
diff mbox

Patch

diff --git a/board/atmel/at91sam9260ek/linux-ARM-at91-enable-nand-ubifs-boot.patch b/board/atmel/at91sam9260ek/linux-ARM-at91-enable-nand-ubifs-boot.patch
new file mode 100644
index 0000000..e71a487
--- /dev/null
+++ b/board/atmel/at91sam9260ek/linux-ARM-at91-enable-nand-ubifs-boot.patch
@@ -0,0 +1,44 @@ 
+From 17f439282c3fc92587e60935ff9efd13ea78e353 Mon Sep 17 00:00:00 2001
+From: Fabio Porcedda <fabio.porcedda@gmail.com>
+Date: Tue, 15 Jan 2013 11:17:42 +0100
+Subject: [PATCH] ARM: at91: enable nand ubifs boot
+
+Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
+---
+ arch/arm/configs/at91sam9260_defconfig | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/arch/arm/configs/at91sam9260_defconfig b/arch/arm/configs/at91sam9260_defconfig
+index 505b376..a438192 100644
+--- a/arch/arm/configs/at91sam9260_defconfig
++++ b/arch/arm/configs/at91sam9260_defconfig
+@@ -1,5 +1,6 @@
+ CONFIG_EXPERIMENTAL=y
+ # CONFIG_LOCALVERSION_AUTO is not set
++CONFIG_KERNEL_LZO=y
+ # CONFIG_SWAP is not set
+ CONFIG_SYSVIPC=y
+ CONFIG_LOG_BUF_SHIFT=14
+@@ -43,6 +44,11 @@ CONFIG_IP_PNP_BOOTP=y
+ # CONFIG_INET_LRO is not set
+ # CONFIG_IPV6 is not set
+ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
++CONFIG_MTD=y
++CONFIG_MTD_CMDLINE_PARTS=y
++CONFIG_MTD_NAND=y
++CONFIG_MTD_NAND_ATMEL=y
++CONFIG_MTD_UBI=y
+ CONFIG_BLK_DEV_RAM=y
+ CONFIG_BLK_DEV_RAM_SIZE=8192
+ CONFIG_SCSI=y
+@@ -82,6 +88,7 @@ CONFIG_RTC_DRV_AT91SAM9=y
+ CONFIG_EXT2_FS=y
+ CONFIG_VFAT_FS=y
+ CONFIG_TMPFS=y
++CONFIG_UBIFS_FS=y
+ CONFIG_CRAMFS=y
+ CONFIG_NLS_CODEPAGE_437=y
+ CONFIG_NLS_CODEPAGE_850=y
+-- 
+1.8.0.3
+
diff --git a/configs/at91sam9260eknf_defconfig b/configs/at91sam9260eknf_defconfig
new file mode 100644
index 0000000..5d26798
--- /dev/null
+++ b/configs/at91sam9260eknf_defconfig
@@ -0,0 +1,15 @@ 
+BR2_arm=y
+BR2_PREFER_STATIC_LIB=y
+BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y
+BR2_PACKAGE_HOST_SAM_BA=y
+BR2_TARGET_ROOTFS_UBIFS=y
+BR2_TARGET_ROOTFS_UBI=y
+BR2_TARGET_AT91BOOTSTRAP=y
+BR2_TARGET_AT91BOOTSTRAP_BOARD="at91sam9260ek"
+BR2_TARGET_AT91BOOTSTRAP_NANDFLASH=y
+BR2_TARGET_BAREBOX=y
+BR2_TARGET_BAREBOX_BOARD_DEFCONFIG="at91sam9260ek"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_PATCH="board/atmel/at91sam9260ek"
+BR2_LINUX_KERNEL_DEFCONFIG="at91sam9260"
+BR2_LINUX_KERNEL_ZIMAGE=y