* [Buildroot] [PATCH 1/1] rpi-firmware: do not rename startup files @ 2020-06-24 11:50 Stéphane Veyret 2020-06-24 16:54 ` Yann E. MORIN 0 siblings, 1 reply; 8+ messages in thread From: Stéphane Veyret @ 2020-06-24 11:50 UTC (permalink / raw) To: buildroot Bug: 13026 When booting, a Raspberry Pi will load the appropriate start files, depending on the provided configuration. For example, if the config.txt file contains: gpu_mem=16 the board will automatically load the cut-down startup files (start_cd.elf and fixup_cd.dat on non-Rpi4). Unfortunately, even when the appropriate version is selected in the configuration menu (in this example, BR2_PACKAGE_RPI_FIRMWARE_BOOT="_cd") if the rpi-firmware makefile takes the good files, it renames them to non-qualified, i.e. start.elf and fixup.dat. But as these are not the files searched by the Raspberry Pi, the board will not start. Signed-off-by: St?phane Veyret <sveyret@gmail.com> --- package/rpi-firmware/rpi-firmware.mk | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/package/rpi-firmware/rpi-firmware.mk b/package/rpi-firmware/rpi-firmware.mk index 6ad67ab0e5..2f4b2b05bf 100644 --- a/package/rpi-firmware/rpi-firmware.mk +++ b/package/rpi-firmware/rpi-firmware.mk @@ -44,14 +44,14 @@ endif # INSTALL_VCDBG ifeq ($(BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4),y) # bootcode.bin is not used on rpi4, because it has been replaced by boot code in the onboard EEPROM define RPI_FIRMWARE_INSTALL_BOOT - $(INSTALL) -D -m 0644 $(@D)/boot/start4$(BR2_PACKAGE_RPI_FIRMWARE_BOOT).elf $(BINARIES_DIR)/rpi-firmware/start4.elf - $(INSTALL) -D -m 0644 $(@D)/boot/fixup4$(BR2_PACKAGE_RPI_FIRMWARE_BOOT).dat $(BINARIES_DIR)/rpi-firmware/fixup4.dat + $(INSTALL) -D -m 0644 $(@D)/boot/start4$(BR2_PACKAGE_RPI_FIRMWARE_BOOT).elf $(BINARIES_DIR)/rpi-firmware/ + $(INSTALL) -D -m 0644 $(@D)/boot/fixup4$(BR2_PACKAGE_RPI_FIRMWARE_BOOT).dat $(BINARIES_DIR)/rpi-firmware/ endef else define RPI_FIRMWARE_INSTALL_BOOT - $(INSTALL) -D -m 0644 $(@D)/boot/bootcode.bin $(BINARIES_DIR)/rpi-firmware/bootcode.bin - $(INSTALL) -D -m 0644 $(@D)/boot/start$(BR2_PACKAGE_RPI_FIRMWARE_BOOT).elf $(BINARIES_DIR)/rpi-firmware/start.elf - $(INSTALL) -D -m 0644 $(@D)/boot/fixup$(BR2_PACKAGE_RPI_FIRMWARE_BOOT).dat $(BINARIES_DIR)/rpi-firmware/fixup.dat + $(INSTALL) -D -m 0644 $(@D)/boot/bootcode.bin $(BINARIES_DIR)/rpi-firmware/ + $(INSTALL) -D -m 0644 $(@D)/boot/start$(BR2_PACKAGE_RPI_FIRMWARE_BOOT).elf $(BINARIES_DIR)/rpi-firmware/ + $(INSTALL) -D -m 0644 $(@D)/boot/fixup$(BR2_PACKAGE_RPI_FIRMWARE_BOOT).dat $(BINARIES_DIR)/rpi-firmware/ endef endif -- 2.26.2 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/1] rpi-firmware: do not rename startup files 2020-06-24 11:50 [Buildroot] [PATCH 1/1] rpi-firmware: do not rename startup files Stéphane Veyret @ 2020-06-24 16:54 ` Yann E. MORIN 2020-06-25 16:23 ` Peter Seiderer 0 siblings, 1 reply; 8+ messages in thread From: Yann E. MORIN @ 2020-06-24 16:54 UTC (permalink / raw) To: buildroot St?phane, All, Please wrap your commit logs properly, at a 72-or-so boundary. On 2020-06-24 13:50 +0200, St?phane Veyret spake thusly: > Bug: 13026 > > When booting, a Raspberry Pi will load the appropriate start files, depending on the provided configuration. For example, if the config.txt file contains: > gpu_mem=16 > the board will automatically load the cut-down startup files (start_cd.elf and fixup_cd.dat on non-Rpi4). So, the startup file loaded depends on the amount of memory the user enables, and maybe other configurations, who knows? This somewhat goes directly agains the user selecting a specific startup file to use. See below... > Unfortunately, even when the appropriate version is selected in the configuration menu (in this example, BR2_PACKAGE_RPI_FIRMWARE_BOOT="_cd") if the rpi-firmware makefile takes the good files, it renames them to non-qualified, i.e. start.elf and fixup.dat. But as these are not the files searched by the Raspberry Pi, the board will not start. > > Signed-off-by: St?phane Veyret <sveyret@gmail.com> > --- > package/rpi-firmware/rpi-firmware.mk | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/package/rpi-firmware/rpi-firmware.mk b/package/rpi-firmware/rpi-firmware.mk > index 6ad67ab0e5..2f4b2b05bf 100644 > --- a/package/rpi-firmware/rpi-firmware.mk > +++ b/package/rpi-firmware/rpi-firmware.mk > @@ -44,14 +44,14 @@ endif # INSTALL_VCDBG > ifeq ($(BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4),y) > # bootcode.bin is not used on rpi4, because it has been replaced by boot code in the onboard EEPROM > define RPI_FIRMWARE_INSTALL_BOOT > - $(INSTALL) -D -m 0644 $(@D)/boot/start4$(BR2_PACKAGE_RPI_FIRMWARE_BOOT).elf $(BINARIES_DIR)/rpi-firmware/start4.elf > - $(INSTALL) -D -m 0644 $(@D)/boot/fixup4$(BR2_PACKAGE_RPI_FIRMWARE_BOOT).dat $(BINARIES_DIR)/rpi-firmware/fixup4.dat > + $(INSTALL) -D -m 0644 $(@D)/boot/start4$(BR2_PACKAGE_RPI_FIRMWARE_BOOT).elf $(BINARIES_DIR)/rpi-firmware/ > + $(INSTALL) -D -m 0644 $(@D)/boot/fixup4$(BR2_PACKAGE_RPI_FIRMWARE_BOOT).dat $(BINARIES_DIR)/rpi-firmware/ > endef > else > define RPI_FIRMWARE_INSTALL_BOOT > - $(INSTALL) -D -m 0644 $(@D)/boot/bootcode.bin $(BINARIES_DIR)/rpi-firmware/bootcode.bin > - $(INSTALL) -D -m 0644 $(@D)/boot/start$(BR2_PACKAGE_RPI_FIRMWARE_BOOT).elf $(BINARIES_DIR)/rpi-firmware/start.elf > - $(INSTALL) -D -m 0644 $(@D)/boot/fixup$(BR2_PACKAGE_RPI_FIRMWARE_BOOT).dat $(BINARIES_DIR)/rpi-firmware/fixup.dat > + $(INSTALL) -D -m 0644 $(@D)/boot/bootcode.bin $(BINARIES_DIR)/rpi-firmware/ > + $(INSTALL) -D -m 0644 $(@D)/boot/start$(BR2_PACKAGE_RPI_FIRMWARE_BOOT).elf $(BINARIES_DIR)/rpi-firmware/ > + $(INSTALL) -D -m 0644 $(@D)/boot/fixup$(BR2_PACKAGE_RPI_FIRMWARE_BOOT).dat $(BINARIES_DIR)/rpi-firmware/ I think we should instead force the name of the startup files in the config.txt (in package/rpi-firmware/config.txt): start_file=start.elf fixup_file=fixup.dat Which will always be exactly what to load. I was pretty farn sure that's what we already did, but I remembered wrong... See: https://github.com/raspberrypi/documentation/blob/master/configuration/config-txt/boot.md Can you respin a patch to that effect, please? Regards, Yann E. MORIN. Regards, Yann E. MORIN. > endef > endif > > -- > 2.26.2 > > _______________________________________________ > buildroot mailing list > buildroot at busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot -- .-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/1] rpi-firmware: do not rename startup files 2020-06-24 16:54 ` Yann E. MORIN @ 2020-06-25 16:23 ` Peter Seiderer 2020-06-25 16:38 ` Stéphane Veyret 0 siblings, 1 reply; 8+ messages in thread From: Peter Seiderer @ 2020-06-25 16:23 UTC (permalink / raw) To: buildroot Hello Yann, St?phane, On Wed, 24 Jun 2020 18:54:05 +0200, "Yann E. MORIN" <yann.morin.1998@free.fr> wrote: > St?phane, All, > > Please wrap your commit logs properly, at a 72-or-so boundary. > > On 2020-06-24 13:50 +0200, St?phane Veyret spake thusly: > > Bug: 13026 > > > > When booting, a Raspberry Pi will load the appropriate start files, depending on the provided configuration. For example, if the config.txt file contains: > > gpu_mem=16 > > the board will automatically load the cut-down startup files (start_cd.elf and fixup_cd.dat on non-Rpi4). > > So, the startup file loaded depends on the amount of memory the user > enables, and maybe other configurations, who knows? > > This somewhat goes directly agains the user selecting a specific startup > file to use. See below... > > > Unfortunately, even when the appropriate version is selected in the configuration menu (in this example, BR2_PACKAGE_RPI_FIRMWARE_BOOT="_cd") if the rpi-firmware makefile takes the good files, it renames them to non-qualified, i.e. start.elf and fixup.dat. But as these are not the files searched by the Raspberry Pi, the board will not start. > > > > Signed-off-by: St?phane Veyret <sveyret@gmail.com> > > --- > > package/rpi-firmware/rpi-firmware.mk | 10 +++++----- > > 1 file changed, 5 insertions(+), 5 deletions(-) > > > > diff --git a/package/rpi-firmware/rpi-firmware.mk b/package/rpi-firmware/rpi-firmware.mk > > index 6ad67ab0e5..2f4b2b05bf 100644 > > --- a/package/rpi-firmware/rpi-firmware.mk > > +++ b/package/rpi-firmware/rpi-firmware.mk > > @@ -44,14 +44,14 @@ endif # INSTALL_VCDBG > > ifeq ($(BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4),y) > > # bootcode.bin is not used on rpi4, because it has been replaced by boot code in the onboard EEPROM > > define RPI_FIRMWARE_INSTALL_BOOT > > - $(INSTALL) -D -m 0644 $(@D)/boot/start4$(BR2_PACKAGE_RPI_FIRMWARE_BOOT).elf $(BINARIES_DIR)/rpi-firmware/start4.elf > > - $(INSTALL) -D -m 0644 $(@D)/boot/fixup4$(BR2_PACKAGE_RPI_FIRMWARE_BOOT).dat $(BINARIES_DIR)/rpi-firmware/fixup4.dat > > + $(INSTALL) -D -m 0644 $(@D)/boot/start4$(BR2_PACKAGE_RPI_FIRMWARE_BOOT).elf $(BINARIES_DIR)/rpi-firmware/ > > + $(INSTALL) -D -m 0644 $(@D)/boot/fixup4$(BR2_PACKAGE_RPI_FIRMWARE_BOOT).dat $(BINARIES_DIR)/rpi-firmware/ > > endef > > else > > define RPI_FIRMWARE_INSTALL_BOOT > > - $(INSTALL) -D -m 0644 $(@D)/boot/bootcode.bin $(BINARIES_DIR)/rpi-firmware/bootcode.bin > > - $(INSTALL) -D -m 0644 $(@D)/boot/start$(BR2_PACKAGE_RPI_FIRMWARE_BOOT).elf $(BINARIES_DIR)/rpi-firmware/start.elf > > - $(INSTALL) -D -m 0644 $(@D)/boot/fixup$(BR2_PACKAGE_RPI_FIRMWARE_BOOT).dat $(BINARIES_DIR)/rpi-firmware/fixup.dat > > + $(INSTALL) -D -m 0644 $(@D)/boot/bootcode.bin $(BINARIES_DIR)/rpi-firmware/ > > + $(INSTALL) -D -m 0644 $(@D)/boot/start$(BR2_PACKAGE_RPI_FIRMWARE_BOOT).elf $(BINARIES_DIR)/rpi-firmware/ > > + $(INSTALL) -D -m 0644 $(@D)/boot/fixup$(BR2_PACKAGE_RPI_FIRMWARE_BOOT).dat $(BINARIES_DIR)/rpi-firmware/ > > I think we should instead force the name of the startup files in the > config.txt (in package/rpi-firmware/config.txt): > > start_file=start.elf > fixup_file=fixup.dat Or one step further, copy the start/fixup file verbatim and only change the start_file/fixup_file entry in config.txt (with the advantage to make it transparent which files are installed/in-use)... Regards, Peter > > Which will always be exactly what to load. I was pretty farn sure that's > what we already did, but I remembered wrong... > > See: https://github.com/raspberrypi/documentation/blob/master/configuration/config-txt/boot.md > > Can you respin a patch to that effect, please? > > Regards, > Yann E. MORIN. > > Regards, > Yann E. MORIN. > > > endef > > endif > > > > -- > > 2.26.2 > > > > _______________________________________________ > > buildroot mailing list > > buildroot at busybox.net > > http://lists.busybox.net/mailman/listinfo/buildroot > ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/1] rpi-firmware: do not rename startup files 2020-06-25 16:23 ` Peter Seiderer @ 2020-06-25 16:38 ` Stéphane Veyret 2020-06-25 17:20 ` Peter Seiderer 0 siblings, 1 reply; 8+ messages in thread From: Stéphane Veyret @ 2020-06-25 16:38 UTC (permalink / raw) To: buildroot Hi Peter, Le jeu. 25 juin 2020 ? 18:23, Peter Seiderer <ps.report@gmx.net> a ?crit : > > I think we should instead force the name of the startup files in the > > config.txt (in package/rpi-firmware/config.txt): > > > > start_file=start.elf > > fixup_file=fixup.dat > > Or one step further, copy the start/fixup file verbatim and only change the > start_file/fixup_file entry in config.txt (with the advantage to make it > transparent which files are installed/in-use)... If the file name is already the appropriate one (this is the first version of my patch), using start_file and fixup_file is useless. And I don't feel it is a good idea to set start_file and fixup_file if the files already have expected names, because using these options is discouraged: https://www.raspberrypi.org/documentation/configuration/config-txt/boot.md. ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/1] rpi-firmware: do not rename startup files 2020-06-25 16:38 ` Stéphane Veyret @ 2020-06-25 17:20 ` Peter Seiderer 2020-06-25 17:30 ` Stéphane Veyret 2020-06-25 19:50 ` Yann E. MORIN 0 siblings, 2 replies; 8+ messages in thread From: Peter Seiderer @ 2020-06-25 17:20 UTC (permalink / raw) To: buildroot Hello St?phane, On Thu, 25 Jun 2020 18:38:02 +0200, St?phane Veyret <sveyret@gmail.com> wrote: > Hi Peter, > > Le jeu. 25 juin 2020 ? 18:23, Peter Seiderer <ps.report@gmx.net> a ?crit : > > > I think we should instead force the name of the startup files in the > > > config.txt (in package/rpi-firmware/config.txt): > > > > > > start_file=start.elf > > > fixup_file=fixup.dat > > > > Or one step further, copy the start/fixup file verbatim and only change the > > start_file/fixup_file entry in config.txt (with the advantage to make it > > transparent which files are installed/in-use)... > > If the file name is already the appropriate one (this is the first > version of my patch), using start_file and fixup_file is useless. And > I don't feel it is a good idea to set start_file and fixup_file if the > files already have expected names, because using these options is > discouraged: https://www.raspberrypi.org/documentation/configuration/config-txt/boot.md. The options are not discouraged, but 'advanced options' and should be handled with care ;-) The advantage of the explicit start_file/fixup_file entries is that it is clear/determined which files are used (instead of relaying on the RPi 'magic' depending on the combination of other options).... Regards, Peter ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/1] rpi-firmware: do not rename startup files 2020-06-25 17:20 ` Peter Seiderer @ 2020-06-25 17:30 ` Stéphane Veyret 2020-06-25 21:31 ` Yann E. MORIN 2020-06-25 19:50 ` Yann E. MORIN 1 sibling, 1 reply; 8+ messages in thread From: Stéphane Veyret @ 2020-06-25 17:30 UTC (permalink / raw) To: buildroot > > Le jeu. 25 juin 2020 ? 18:23, Peter Seiderer <ps.report@gmx.net> a ?crit : > > > > I think we should instead force the name of the startup files in the > > > > config.txt (in package/rpi-firmware/config.txt): > > > > > > > > start_file=start.elf > > > > fixup_file=fixup.dat > > > > > > Or one step further, copy the start/fixup file verbatim and only change the > > > start_file/fixup_file entry in config.txt (with the advantage to make it > > > transparent which files are installed/in-use)... > > > > If the file name is already the appropriate one (this is the first > > version of my patch), using start_file and fixup_file is useless. And > > I don't feel it is a good idea to set start_file and fixup_file if the > > files already have expected names, because using these options is > > discouraged: https://www.raspberrypi.org/documentation/configuration/config-txt/boot.md. > > The options are not discouraged, but 'advanced options' and should be handled with care ;-) > > The advantage of the explicit start_file/fixup_file entries is that it is clear/determined > which files are used (instead of relaying on the RPi 'magic' depending on the combination > of other options).... OK, I understand. Yann, do you agree? Shall I create a v3 patch? -- Bien cordialement, / Plej kore, St?phane Veyret ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/1] rpi-firmware: do not rename startup files 2020-06-25 17:30 ` Stéphane Veyret @ 2020-06-25 21:31 ` Yann E. MORIN 0 siblings, 0 replies; 8+ messages in thread From: Yann E. MORIN @ 2020-06-25 21:31 UTC (permalink / raw) To: buildroot St?phane, All, On 2020-06-25 19:30 +0200, St?phane Veyret spake thusly: > > > Le jeu. 25 juin 2020 ? 18:23, Peter Seiderer <ps.report@gmx.net> a ?crit : > > > > > I think we should instead force the name of the startup files in the > > > > > config.txt (in package/rpi-firmware/config.txt): > > > > > start_file=start.elf > > > > > fixup_file=fixup.dat > > > > Or one step further, copy the start/fixup file verbatim and only change the > > > > start_file/fixup_file entry in config.txt (with the advantage to make it > > > > transparent which files are installed/in-use)... > > > If the file name is already the appropriate one (this is the first > > > version of my patch), using start_file and fixup_file is useless. And > > > I don't feel it is a good idea to set start_file and fixup_file if the > > > files already have expected names, because using these options is > > > discouraged: https://www.raspberrypi.org/documentation/configuration/config-txt/boot.md. > > The options are not discouraged, but 'advanced options' and should be handled with care ;-) > > The advantage of the explicit start_file/fixup_file entries is that it is clear/determined > > which files are used (instead of relaying on the RPi 'magic' depending on the combination > > of other options).... > OK, I understand. Yann, do you agree? Shall I create a v3 patch? I do agree that we better force the names of the file to load, yes. No, you do not need to send a v3, as I explained in my reply to Peter. I'll will probably apply your v2 patch as-is shortly... Regards, Yann E. MORIN. -- .-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/1] rpi-firmware: do not rename startup files 2020-06-25 17:20 ` Peter Seiderer 2020-06-25 17:30 ` Stéphane Veyret @ 2020-06-25 19:50 ` Yann E. MORIN 1 sibling, 0 replies; 8+ messages in thread From: Yann E. MORIN @ 2020-06-25 19:50 UTC (permalink / raw) To: buildroot Peter, St?phane, All, On 2020-06-25 19:20 +0200, Peter Seiderer spake thusly: > On Thu, 25 Jun 2020 18:38:02 +0200, St?phane Veyret <sveyret@gmail.com> wrote: > > Le jeu. 25 juin 2020 ? 18:23, Peter Seiderer <ps.report@gmx.net> a ?crit : > > > > I think we should instead force the name of the startup files in the > > > > config.txt (in package/rpi-firmware/config.txt): > > > > start_file=start.elf > > > > fixup_file=fixup.dat > > > Or one step further, copy the start/fixup file verbatim and only change the > > > start_file/fixup_file entry in config.txt (with the advantage to make it > > > transparent which files are installed/in-use)... > > If the file name is already the appropriate one (this is the first > > version of my patch), using start_file and fixup_file is useless. And > > I don't feel it is a good idea to set start_file and fixup_file if the > > files already have expected names, because using these options is > > discouraged: https://www.raspberrypi.org/documentation/configuration/config-txt/boot.md. > > The options are not discouraged, but 'advanced options' and should be > handled with care ;-) > > The advantage of the explicit start_file/fixup_file entries is that it > is clear/determined which files are used (instead of relaying on the > RPi 'magic' depending on the combination of other options).... That. So, we force the files to load. We have two options: - always load the same known filenames, and copy the appropriate files and name them to those known filenames, or - always copy the appropriate files and keep their original filenames, and tweak config.txt to load the appropriate filenames, risking hitting some corner cases in the opaque binary blobs. The first option has the advantage of just caring about the source of the copy; the destiantion filenames and filenames to load are constant. The second soltuion needs to care about the source filenames, the destination filenames and change config.txt. Guess which is the easiest to implement, review, and maintain? ;-) Regards, Yann E. MORIN. -- .-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-06-25 21:31 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2020-06-24 11:50 [Buildroot] [PATCH 1/1] rpi-firmware: do not rename startup files Stéphane Veyret 2020-06-24 16:54 ` Yann E. MORIN 2020-06-25 16:23 ` Peter Seiderer 2020-06-25 16:38 ` Stéphane Veyret 2020-06-25 17:20 ` Peter Seiderer 2020-06-25 17:30 ` Stéphane Veyret 2020-06-25 21:31 ` Yann E. MORIN 2020-06-25 19:50 ` Yann E. MORIN
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox