Add build instructions and license
This commit is contained in:
30
patches/buildroot-automake.patch
Normal file
30
patches/buildroot-automake.patch
Normal file
@ -0,0 +1,30 @@
|
||||
From 13f00eb4493c217269b76614759e452d8302955e Mon Sep 17 00:00:00 2001
|
||||
From: Paul Eggert <eggert@cs.ucla.edu>
|
||||
Date: Thu, 31 Mar 2016 16:35:29 -0700
|
||||
Subject: automake: port to Perl 5.22 and later
|
||||
|
||||
Without this change, Perl 5.22 complains "Unescaped left brace in
|
||||
regex is deprecated" and this is planned to become a hard error in
|
||||
Perl 5.26. See:
|
||||
http://search.cpan.org/dist/perl-5.22.0/pod/perldelta.pod#A_literal_%22{%22_should_now_be_escaped_in_a_pattern
|
||||
* bin/automake.in (substitute_ac_subst_variables): Escape left brace.
|
||||
---
|
||||
bin/automake.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/bin/automake.in b/bin/automake.in
|
||||
index a3a0aa3..2c8f31e 100644
|
||||
--- a/bin/automake.in
|
||||
+++ b/bin/automake.in
|
||||
@@ -3878,7 +3878,7 @@ sub substitute_ac_subst_variables_worker
|
||||
sub substitute_ac_subst_variables
|
||||
{
|
||||
my ($text) = @_;
|
||||
- $text =~ s/\${([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge;
|
||||
+ $text =~ s/\$[{]([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge;
|
||||
return $text;
|
||||
}
|
||||
|
||||
--
|
||||
cgit v1.0-41-gc330
|
||||
|
90
patches/buildroot-e2fsprogs.patch
Normal file
90
patches/buildroot-e2fsprogs.patch
Normal file
@ -0,0 +1,90 @@
|
||||
Date: Fri, 29 Dec 2017 10:19:51 -0800
|
||||
From: Palmer Dabbelt <palmer@...belt.com>
|
||||
To: linux-ext4@...r.kernel.org, tytso@....edu
|
||||
Cc: patches@...ups.riscv.org, Palmer Dabbelt <palmer@...belt.com>
|
||||
Subject: [PATCH v2] Rename copy_file_range to copy_file_chunk
|
||||
|
||||
As of 2.27, glibc will have a copy_file_range library call to wrap the
|
||||
new copy_file_range system call. This conflicts with the function in
|
||||
misc/create_inode.c, which this patch renames _copy_file_range.
|
||||
|
||||
Full disclosure: I found this when building e2fsprogs for RISC-V with a
|
||||
glibc-2.27 prerelease, so it's very possible I screwed something up
|
||||
here. Here's the relevant glibc commit:
|
||||
|
||||
commit bad7a0c81f501fbbcc79af9eaa4b8254441c4a1f
|
||||
Author: Florian Weimer <fweimer@...hat.com>
|
||||
Date: Fri Dec 22 10:55:40 2017 +0100
|
||||
|
||||
copy_file_range: New function to copy file data
|
||||
|
||||
The semantics are based on the Linux system call, but a very close
|
||||
emulation in user space is provided.
|
||||
...
|
||||
diff --git a/posix/unistd.h b/posix/unistd.h
|
||||
index 32b0f4898fd2..65317c79fd39 100644
|
||||
--- a/posix/unistd.h
|
||||
+++ b/posix/unistd.h
|
||||
@@ -1105,7 +1105,12 @@ extern int lockf64 (int __fd, int __cmd, __off64_t __len) __wur;
|
||||
do __result = (long int) (expression); \
|
||||
while (__result == -1L && errno == EINTR); \
|
||||
__result; }))
|
||||
-#endif
|
||||
+
|
||||
+/* Copy LENGTH bytes from INFD to OUTFD. */
|
||||
+ssize_t copy_file_range (int __infd, __off64_t *__pinoff,
|
||||
+ int __outfd, __off64_t *__poutoff,
|
||||
+ size_t __length, unsigned int __flags);
|
||||
+#endif /* __USE_GNU */
|
||||
|
||||
Changes since v1:
|
||||
|
||||
* The new name is now copy_file_chunk instead of _copy_file_range.
|
||||
|
||||
Signed-off-by: Palmer Dabbelt <palmer@...belt.com>
|
||||
---
|
||||
misc/create_inode.c | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/misc/create_inode.c b/misc/create_inode.c
|
||||
index a07f8328e5f9..51d25f8fb005 100644
|
||||
--- a/misc/create_inode.c
|
||||
+++ b/misc/create_inode.c
|
||||
@@ -398,7 +398,7 @@ static ssize_t my_pread(int fd, void *buf, size_t count, off_t offset)
|
||||
}
|
||||
#endif /* !defined HAVE_PREAD64 && !defined HAVE_PREAD */
|
||||
|
||||
-static errcode_t copy_file_range(ext2_filsys fs, int fd, ext2_file_t e2_file,
|
||||
+static errcode_t copy_file_chunk(ext2_filsys fs, int fd, ext2_file_t e2_file,
|
||||
off_t start, off_t end, char *buf,
|
||||
char *zerobuf)
|
||||
{
|
||||
@@ -472,7 +472,7 @@ static errcode_t try_lseek_copy(ext2_filsys fs, int fd, struct stat *statbuf,
|
||||
|
||||
data_blk = data & ~(fs->blocksize - 1);
|
||||
hole_blk = (hole + (fs->blocksize - 1)) & ~(fs->blocksize - 1);
|
||||
- err = copy_file_range(fs, fd, e2_file, data_blk, hole_blk, buf,
|
||||
+ err = copy_file_chunk(fs, fd, e2_file, data_blk, hole_blk, buf,
|
||||
zerobuf);
|
||||
if (err)
|
||||
return err;
|
||||
@@ -523,7 +523,7 @@ static errcode_t try_fiemap_copy(ext2_filsys fs, int fd, ext2_file_t e2_file,
|
||||
goto out;
|
||||
for (i = 0, ext = ext_buf; i < fiemap_buf->fm_mapped_extents;
|
||||
i++, ext++) {
|
||||
- err = copy_file_range(fs, fd, e2_file, ext->fe_logical,
|
||||
+ err = copy_file_chunk(fs, fd, e2_file, ext->fe_logical,
|
||||
ext->fe_logical + ext->fe_length,
|
||||
buf, zerobuf);
|
||||
if (err)
|
||||
@@ -576,7 +576,7 @@ static errcode_t copy_file(ext2_filsys fs, int fd, struct stat *statbuf,
|
||||
goto out;
|
||||
#endif
|
||||
|
||||
- err = copy_file_range(fs, fd, e2_file, 0, statbuf->st_size, buf,
|
||||
+ err = copy_file_chunk(fs, fd, e2_file, 0, statbuf->st_size, buf,
|
||||
zerobuf);
|
||||
out:
|
||||
ext2fs_free_mem(&zerobuf);
|
||||
--
|
||||
2.13.6
|
31
patches/buildroot-libtirpc.patch
Normal file
31
patches/buildroot-libtirpc.patch
Normal file
@ -0,0 +1,31 @@
|
||||
From 1521836c4e0d173767d7417fcc2682cb19ca8aba Mon Sep 17 00:00:00 2001
|
||||
From: Dagg Stompler <daggs@gmx.com>
|
||||
Date: Fri, 29 Dec 2017 15:03:33 +0200
|
||||
Subject: [PATCH] libtirpc: fix compilation error of rpcgen
|
||||
|
||||
When compiling libtirpc, without RPC support available on the host
|
||||
machine, the build of the rpcgen host program because it cannot find
|
||||
the netconfig.h and rpc/types.h headers. Instead of relying on the
|
||||
system-provided ones, let's use the ones included in the libtirpc
|
||||
source code by patching the rpcgen build logic.
|
||||
|
||||
Signed-off-by: Dagg Stompler <daggs@gmx.com>
|
||||
[Thomas: reword commit log.]
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
---
|
||||
package/libtirpc/0003-Add-rpcgen-program-from-nfs-utils-sources.patch | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/package/libtirpc/0003-Add-rpcgen-program-from-nfs-utils-sources.patch b/package/libtirpc/0003-Add-rpcgen-program-from-nfs-utils-sources.patch
|
||||
index 1cf861417c..f2b15fe2f1 100644
|
||||
--- a/package/libtirpc/0003-Add-rpcgen-program-from-nfs-utils-sources.patch
|
||||
+++ b/package/libtirpc/0003-Add-rpcgen-program-from-nfs-utils-sources.patch
|
||||
@@ -83,7 +83,7 @@ index 0000000..2277b6f
|
||||
--- /dev/null
|
||||
+++ b/rpcgen/Makefile.am
|
||||
@@ -0,0 +1,22 @@
|
||||
-+COMPILE = $(CC_FOR_BUILD) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
++COMPILE = $(CC_FOR_BUILD) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) -I../tirpc $(AM_CPPFLAGS) \
|
||||
+ $(CPPFLAGS_FOR_BUILD) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD)
|
||||
+LINK = $(CC_FOR_BUILD) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(AM_LDFLAGS) $(LDFLAGS_FOR_BUILD) -o $@
|
||||
+
|
Binary file not shown.
@ -0,0 +1,118 @@
|
||||
/dts-v1/;
|
||||
|
||||
/ {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "freechips,rocketchip-unknown-dev";
|
||||
model = "freechips,rocketchip-unknown";
|
||||
aliases {
|
||||
serial0 = &L8;
|
||||
};
|
||||
L15: cpus {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
L5: cpu@0 {
|
||||
clock-frequency = <60000000>;
|
||||
compatible = "sifive,rocket0", "riscv";
|
||||
d-cache-block-size = <64>;
|
||||
d-cache-sets = <64>;
|
||||
d-cache-size = <4096>;
|
||||
d-tlb-sets = <1>;
|
||||
d-tlb-size = <4>;
|
||||
device_type = "cpu";
|
||||
i-cache-block-size = <64>;
|
||||
i-cache-sets = <64>;
|
||||
i-cache-size = <4096>;
|
||||
i-tlb-sets = <1>;
|
||||
i-tlb-size = <4>;
|
||||
mmu-type = "riscv,sv39";
|
||||
next-level-cache = <&L12>;
|
||||
reg = <0>;
|
||||
riscv,isa = "rv64imafdc";
|
||||
status = "okay";
|
||||
timebase-frequency = <1000000>;
|
||||
tlb-split;
|
||||
L3: interrupt-controller {
|
||||
#interrupt-cells = <1>;
|
||||
compatible = "riscv,cpu-intc";
|
||||
interrupt-controller;
|
||||
};
|
||||
};
|
||||
};
|
||||
L12: memory@80000000 {
|
||||
device_type = "memory";
|
||||
reg = <0x80000000 0x10000000>;
|
||||
};
|
||||
L14: soc {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "freechips,rocketchip-unknown-soc", "simple-bus";
|
||||
ranges;
|
||||
sysclk: sysclk {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <60000000>;
|
||||
};
|
||||
L1: clint@2000000 {
|
||||
compatible = "riscv,clint0";
|
||||
interrupts-extended = <&L3 3 &L3 7>;
|
||||
reg = <0x2000000 0x10000>;
|
||||
reg-names = "control";
|
||||
};
|
||||
L2: debug-controller@0 {
|
||||
compatible = "sifive,debug-013", "riscv,debug-013";
|
||||
interrupts-extended = <&L3 65535>;
|
||||
reg = <0x0 0x1000>;
|
||||
reg-names = "control";
|
||||
};
|
||||
L7: error-device@3000 {
|
||||
compatible = "sifive,error0";
|
||||
reg = <0x3000 0x1000>;
|
||||
reg-names = "mem";
|
||||
};
|
||||
L11: gpio@64002000 {
|
||||
compatible = "sifive,gpio0";
|
||||
interrupt-parent = <&L0>;
|
||||
interrupts = <3 4 5 6 7 8 9 10>;
|
||||
reg = <0x64002000 0x1000>;
|
||||
reg-names = "control";
|
||||
};
|
||||
L0: interrupt-controller@c000000 {
|
||||
#interrupt-cells = <1>;
|
||||
compatible = "riscv,plic0";
|
||||
interrupt-controller;
|
||||
interrupts-extended = <&L3 11 &L3 9>;
|
||||
reg = <0xc000000 0x4000000>;
|
||||
reg-names = "control";
|
||||
riscv,max-priority = <7>;
|
||||
riscv,ndev = <10>;
|
||||
};
|
||||
L6: rom@10000 {
|
||||
compatible = "sifive,maskrom0";
|
||||
reg = <0x10000 0x2000>;
|
||||
reg-names = "mem";
|
||||
};
|
||||
L8: serial@64000000 {
|
||||
compatible = "sifive,uart0";
|
||||
interrupt-parent = <&L0>;
|
||||
interrupts = <1>;
|
||||
reg = <0x64000000 0x1000>;
|
||||
reg-names = "control";
|
||||
clocks = <&sysclk 0>;
|
||||
};
|
||||
L10: spi@64001000 {
|
||||
compatible = "sifive,spi0";
|
||||
interrupt-parent = <&L0>;
|
||||
interrupts = <2>;
|
||||
reg = <0x64001000 0x1000>;
|
||||
reg-names = "control";
|
||||
clocks = <&sysclk 0>;
|
||||
};
|
||||
L9: serial@64003000 {
|
||||
compatible = "klemens,terminal0";
|
||||
reg = <0x64003000 0x1000>;
|
||||
reg-names = "control";
|
||||
clocks = <&sysclk 0>;
|
||||
};
|
||||
};
|
||||
};
|
Reference in New Issue
Block a user