From: Sascha Hauer <s.hauer@pengutronix.de>
To: Raphael Poggi <poggi.raph@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH v2 03/12] arm: introduce lib64 for arm64 related stuff
Date: Wed, 15 Jun 2016 08:15:32 +0200 [thread overview]
Message-ID: <20160615061532.GD9677@pengutronix.de> (raw)
In-Reply-To: <1465888006-39463-4-git-send-email-poggi.raph@gmail.com>
On Tue, Jun 14, 2016 at 09:06:37AM +0200, Raphael Poggi wrote:
> diff --git a/arch/arm/lib64/Makefile b/arch/arm/lib64/Makefile
> new file mode 100644
> index 0000000..a424293
> --- /dev/null
> +++ b/arch/arm/lib64/Makefile
> @@ -0,0 +1,10 @@
> +obj-$(CONFIG_ARM_LINUX) += armlinux.o
> +obj-$(CONFIG_BOOTM) += bootm.o
> +obj-y += div0.o
> +obj-$(CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS) += memcpy.o
> +obj-$(CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS) += memset.o
> +extra-y += barebox.lds
> +
> +pbl-y += lib1funcs.o
> +pbl-y += ashldi3.o
> +pbl-y += div0.o
> diff --git a/arch/arm/lib64/armlinux.c b/arch/arm/lib64/armlinux.c
> new file mode 100644
> index 0000000..21a2292
> --- /dev/null
> +++ b/arch/arm/lib64/armlinux.c
> @@ -0,0 +1,275 @@
[...]
> +static void setup_tags(unsigned long initrd_address,
> + unsigned long initrd_size, int swap)
> +{
> + const char *commandline = linux_bootargs_get();
> +
> + setup_start_tag();
> + setup_memory_tags();
> + setup_commandline_tag(commandline, swap);
> +
> + if (initrd_size)
> + setup_initrd_tag(initrd_address, initrd_size);
> +
> + setup_revision_tag();
> + setup_serial_tag();
> +#ifdef CONFIG_ARM_BOARD_APPEND_ATAG
> + if (atag_appender != NULL)
> + params = atag_appender(params);
> +#endif
> + setup_end_tag();
> +
> + printf("commandline: %s\n"
> + "arch_number: %d\n", commandline, armlinux_get_architecture());
> +
> +}
All the code around ATAGs can be removed. ARM64 is device tree only and
won't ever need this.
> +
> +void start_linux(void *adr, int swap, unsigned long initrd_address,
> + unsigned long initrd_size, void *oftree)
> +{
> + void (*kernel)(int zero, int arch, void *params) = adr;
> + void *params = NULL;
> + int architecture;
> +
> + if (oftree) {
> + pr_debug("booting kernel with devicetree\n");
> + params = oftree;
> + } else {
> + setup_tags(initrd_address, initrd_size, swap);
> + params = armlinux_get_bootparams();
> + }
> + architecture = armlinux_get_architecture();
> +
> + shutdown_barebox();
> +
> + kernel(0, architecture, params);
> +}
> diff --git a/arch/arm/lib64/bootm.c b/arch/arm/lib64/bootm.c
This file is an exact copy of arch/arm/lib/bootm.c as of a324fb5a, so it
seems that either the 32bit version works for arm64 or this is untested.
Have you already booted a kernel? Does it work? Although starting a
kernel is admittedly a key feature for a bootloader, we could drop the
code from the initial arm64 porting effort if it doesn't work yet.
> diff --git a/arch/arm/lib64/module.c b/arch/arm/lib64/module.c
Please drop this file. I suppose it won't work on arm64 anyway, so
there's no need to carry a nonworking copy of arm32 module support in
the arm64 tree.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2016-06-15 6:15 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-14 7:06 Raphael Poggi
2016-06-14 7:06 ` [PATCH v2 01/12] arm: add armv8 Kconfig entries Raphael Poggi
2016-06-15 6:33 ` Sascha Hauer
2016-06-23 14:43 ` Raphaël Poggi
2016-06-14 7:06 ` [PATCH v2 02/12] arm: Makefile: rework makefile to handle armv8 Raphael Poggi
2016-06-14 7:06 ` [PATCH v2 03/12] arm: introduce lib64 for arm64 related stuff Raphael Poggi
2016-06-15 6:15 ` Sascha Hauer [this message]
2016-06-23 14:43 ` Raphaël Poggi
2016-06-14 7:06 ` [PATCH v2 04/12] arm: cpu: add arm64 specific code Raphael Poggi
2016-06-14 7:06 ` [PATCH v2 05/12] arm: include: system: add arm64 helper functions Raphael Poggi
2016-06-14 7:06 ` [PATCH v2 06/12] arm: cpu: start: arm64 does not support relocation Raphael Poggi
2016-06-14 7:06 ` [PATCH v2 07/12] arm: include: bitops: arm64 use generic __fls Raphael Poggi
2016-06-14 7:06 ` [PATCH v2 08/12] arm: include: system_info: add armv8 identification Raphael Poggi
2016-06-14 7:06 ` [PATCH v2 09/12] arm: cpu: cpuinfo: add armv8 support Raphael Poggi
2016-06-14 7:06 ` [PATCH v2 10/12] arm: cpu: disable code portion in armv8 case Raphael Poggi
2016-06-14 7:06 ` [PATCH v2 11/12] arm: cpu: add basic arm64 mmu support Raphael Poggi
2016-06-14 7:06 ` [PATCH v2 12/12] arm: boards: add mach-qemu and virt64 board Raphael Poggi
2016-06-24 8:17 ` Raphaël Poggi
2016-06-24 11:49 ` Re: Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160615061532.GD9677@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=poggi.raph@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.