Skip to contentSkip to conversation

ARM: at91: usb-a9g20: make it work out of the box again

PATCH Applied Wolfram Sang 2 participants 5 messages Apr 27, 2023 – May 2, 2023 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

cover ARM: at91: usb-a9g20: make it work out of the box again

Here are the remaining two patches to make a (for me) useable barebox with the defconfig and no other patches. Comments welcome!

Wolfram Sang (2):
ARM: at91: usb-a926x: remove nand partitions from config
defconfigs: usb-a9g20: update to a working version

 .../boards/usb-a926x/defaultenv-usb-a926x/config  |  4 ----
 arch/arm/configs/usb_a9g20_defconfig              | 15 ++++++---------
 2 files changed, 6 insertions(+), 13 deletions(-)
Signature · 1 line
2.35.1
#1 lore raw

PATCH 1/2 ARM: at91: usb-a926x: remove nand partitions from config

We define partitions as well in the board file. Leading to:

New partition nand0.at91bootstrap (0x00000000-0x0001ffff) on nand0 overlaps with partition at91bootstrap_raw (0x00000000-0x0001ffff), not creating it cannot create nand0.at91bootstrap: Invalid argument
addpart: Invalid argument

So, remove it from the config file.

---

Or shall I rather remove it from the board file?

 arch/arm/boards/usb-a926x/defaultenv-usb-a926x/config | 4 ----
 1 file changed, 4 deletions(-)
arch/arm/boards/usb-a926x/defaultenv-usb-a926x/config +0 -4
index 49199ba391..f9159cb946 100644
@@ -29,10 +29,6 @@ kernelimage=zImage
 #kernelimage=Image
 #kernelimage=Image.lzo
 
-nand_device=atmel_nand
-nand_parts="128k(at91bootstrap),256k(barebox)ro,128k(bareboxenv),128k(bareboxenv2),128k(oftree),4M(kernel),120M(rootfs),-(data)"
-rootfs_mtdblock_nand=6
-
 autoboot_timeout=3
 
 bootargs="console=ttyS0,115200"
Signature · 1 line
2.35.1
#2 lore raw

Re: [PATCH 1/2] ARM: at91: usb-a926x: remove nand partitions from config

Quoted 6 lines · Wolfram Sang

We define partitions as well in the board file. Leading to:

New partition nand0.at91bootstrap (0x00000000-0x0001ffff) on nand0 overlaps with partition at91bootstrap_raw (0x00000000-0x0001ffff), not creating it cannot create nand0.at91bootstrap: Invalid argument
addpart: Invalid argument

Quoted 6 lines

So, remove it from the config file.

---

Or shall I rather remove it from the board file?

No, doing it in the board file is preferred.

Sascha

Signature · 4 lines
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
#3 lore raw

PATCH 2/2 defconfigs: usb-a9g20: update to a working version

In reply to Wolfram Sang

The defconfig needs to be updated to get a usable barebox:

We need bigger malloc because of the increasing kernel size, soft ECC so NAND will work, ifup and relocatable for easier development. Fix the prompt while here. Sadly, because of size restrictions, FAT, NFS, menus, netconsole, and SHA1 have to go.

---
 arch/arm/configs/usb_a9g20_defconfig | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)
arch/arm/configs/usb_a9g20_defconfig +6 -9
index 20b1f27b9e..56f78ba7a8 100644
@@ -5,9 +5,11 @@ CONFIG_AEABI=y
 CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
 CONFIG_MMU=y
 CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000
+CONFIG_MALLOC_SIZE=0x800000
 CONFIG_EXPERIMENTAL=y
 CONFIG_MALLOC_TLSF=y
-CONFIG_PROMPT="USB-9G20:"
+CONFIG_RELOCATABLE=y
+CONFIG_PROMPT="USB-A9G20:"
 CONFIG_PROMPT_HUSH_PS2="y"
 CONFIG_HUSH_FANCY_PROMPT=y
 CONFIG_CMDLINE_EDITING=y
@@ -33,16 +35,14 @@ CONFIG_CMD_EXPORT=y
 CONFIG_CMD_PRINTENV=y
 CONFIG_CMD_SAVEENV=y
 CONFIG_CMD_MD5SUM=y
-CONFIG_CMD_SHA1SUM=y
 CONFIG_CMD_SLEEP=y
 CONFIG_CMD_DHCP=y
+CONFIG_NET_CMD_IFUP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
 CONFIG_CMD_ECHO_E=y
 CONFIG_CMD_EDIT=y
 CONFIG_CMD_LOGIN=y
-CONFIG_CMD_MENU=y
-CONFIG_CMD_MENU_MANAGEMENT=y
 CONFIG_CMD_PASSWD=y
 CONFIG_CMD_READLINE=y
 CONFIG_CMD_TIMEOUT=y
@@ -53,14 +53,13 @@ CONFIG_CMD_SPI=y
 CONFIG_CMD_LED_TRIGGER=y
 CONFIG_CMD_OFTREE=y
 CONFIG_NET=y
-CONFIG_NET_NFS=y
-CONFIG_NET_NETCONSOLE=y
 CONFIG_NET_RESOLV=y
 CONFIG_DRIVER_NET_MACB=y
 CONFIG_DRIVER_SPI_ATMEL=y
 CONFIG_MTD=y
 # CONFIG_MTD_OOB_DEVICE is not set
 CONFIG_NAND=y
+CONFIG_MTD_NAND_ECC_SOFT=y
 CONFIG_NAND_ATMEL=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DFU=y
@@ -72,7 +71,5 @@ CONFIG_MMC_SPI_CRC_ON=y
 CONFIG_LED=y
 CONFIG_LED_GPIO=y
 CONFIG_LED_TRIGGERS=y
+# CONFIG_VIRTIO_MENU is not set
 CONFIG_FS_TFTP=y
-CONFIG_FS_FAT=y
-CONFIG_FS_FAT_WRITE=y
-CONFIG_FS_FAT_LFN=y
Signature · 1 line
2.35.1
Applied
#4 lore raw
In reply to Wolfram Sang
Quoted 6 lines · Wolfram Sang

Here are the remaining two patches to make a (for me) useable barebox with the defconfig and no other patches. Comments welcome!

Wolfram Sang (2):
ARM: at91: usb-a926x: remove nand partitions from config
defconfigs: usb-a9g20: update to a working version

Applied, thanks

Sascha

Quoted 10 lines
 .../boards/usb-a926x/defaultenv-usb-a926x/config  |  4 ----
 arch/arm/configs/usb_a9g20_defconfig              | 15 ++++++---------
 2 files changed, 6 insertions(+), 13 deletions(-)
Signature · 1 line
2.35.1
Signature · 4 lines
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |