Message ID | 1465456010-9166-2-git-send-email-thuth@redhat.com |
---|---|
State | Superseded |
Headers | show |
On 09/06/16 17:06, Thomas Huth wrote: > These prefixes prevent that the files can easily be moved to another > folder, so let's use proper "-I" statements in the Makefiles instead. > > Signed-off-by: Thomas Huth <thuth@redhat.com> > --- > clients/net-snk/app/netapps/Makefile | 2 +- > clients/net-snk/app/netapps/netapps.h | 2 +- > clients/net-snk/app/netapps/netboot.c | 16 ++++++++-------- > clients/net-snk/app/netapps/ping.c | 8 ++++---- > clients/net-snk/app/netlib/Makefile | 2 +- > clients/net-snk/app/netlib/dhcp.c | 2 +- > clients/net-snk/app/netlib/dhcp.h | 7 +------ > clients/net-snk/app/netlib/dhcpv6.c | 12 ++++++------ > clients/net-snk/app/netlib/dhcpv6.h | 2 +- > clients/net-snk/app/netlib/icmpv6.c | 10 +++++----- > clients/net-snk/app/netlib/icmpv6.h | 4 ++-- > clients/net-snk/app/netlib/ipv6.c | 10 +++++----- > clients/net-snk/app/netlib/ipv6.h | 2 +- > clients/net-snk/app/netlib/ndp.c | 6 +++--- > clients/net-snk/app/netlib/ndp.h | 2 +- > clients/net-snk/app/netlib/tftp.h | 2 +- > 16 files changed, 42 insertions(+), 47 deletions(-) > > diff --git a/clients/net-snk/app/netapps/Makefile b/clients/net-snk/app/netapps/Makefile > index 70b990a..1e50226 100644 > --- a/clients/net-snk/app/netapps/Makefile > +++ b/clients/net-snk/app/netapps/Makefile > @@ -16,7 +16,7 @@ ifndef TOP > endif > include $(TOP)/make.rules > > -CFLAGS += -I../ -I../../../../lib/ -Wall -W > +CFLAGS += -I.. -I../netlib -I../../../../lib/ -Wall -W > > OBJS = netboot.o ping.o args.o > > diff --git a/clients/net-snk/app/netapps/netapps.h b/clients/net-snk/app/netapps/netapps.h > index 20879c5..d3f7eb2 100644 > --- a/clients/net-snk/app/netapps/netapps.h > +++ b/clients/net-snk/app/netapps/netapps.h > @@ -13,7 +13,7 @@ > #ifndef _NETAPPS_H_ > #define _NETAPPS_H_ > > -#include <netlib/tftp.h> > +#include <tftp.h> > > #define F_IPV4 4 > #define F_IPV6 6 > diff --git a/clients/net-snk/app/netapps/netboot.c b/clients/net-snk/app/netapps/netboot.c > index bb1db03..d99aa29 100644 > --- a/clients/net-snk/app/netapps/netboot.c > +++ b/clients/net-snk/app/netapps/netboot.c > @@ -10,21 +10,21 @@ > * IBM Corporation - initial implementation > *****************************************************************************/ > > -#include <netlib/tftp.h> > -#include <netlib/ethernet.h> > -#include <netlib/dhcp.h> > -#include <netlib/dhcpv6.h> > -#include <netlib/ipv4.h> > -#include <netlib/ipv6.h> > -#include <netlib/dns.h> > +#include <tftp.h> > +#include <ethernet.h> > +#include <dhcp.h> > +#include <dhcpv6.h> > +#include <ipv4.h> > +#include <ipv6.h> > +#include <dns.h> > #include <string.h> > #include <stdio.h> > #include <time.h> > #include <stdlib.h> > #include <sys/socket.h> > -#include <netapps/args.h> > #include <libbootmsg/libbootmsg.h> > #include <of.h> > +#include "args.h" > #include "netapps.h" > > #define IP_INIT_DEFAULT 5 > diff --git a/clients/net-snk/app/netapps/ping.c b/clients/net-snk/app/netapps/ping.c > index f55e0db..def3179 100644 > --- a/clients/net-snk/app/netapps/ping.c > +++ b/clients/net-snk/app/netapps/ping.c > @@ -10,15 +10,15 @@ > * IBM Corporation - initial implementation > *****************************************************************************/ > > -#include <netlib/ipv4.h> > -#include <netlib/dhcp.h> > -#include <netlib/ethernet.h> > +#include <ipv4.h> > +#include <dhcp.h> > +#include <ethernet.h> > #include <sys/socket.h> > #include <string.h> > #include <stdio.h> > #include <stdlib.h> > #include <time.h> > -#include <netapps/args.h> > +#include "args.h" > #include "netapps.h" > > struct ping_args { > diff --git a/clients/net-snk/app/netlib/Makefile b/clients/net-snk/app/netlib/Makefile > index df09bf8..610e189 100644 > --- a/clients/net-snk/app/netlib/Makefile > +++ b/clients/net-snk/app/netlib/Makefile > @@ -16,7 +16,7 @@ ifndef TOP > endif > include $(TOP)/make.rules > > -CFLAGS += -I../ > +CFLAGS += -I../netapps > > ifeq ($(SNK_USE_MTFTP), 1) > CFLAGS += -DUSE_MTFTP > diff --git a/clients/net-snk/app/netlib/dhcp.c b/clients/net-snk/app/netlib/dhcp.c > index 7e2e88c..0cb4fa4 100644 > --- a/clients/net-snk/app/netlib/dhcp.c > +++ b/clients/net-snk/app/netlib/dhcp.c > @@ -48,7 +48,7 @@ > #include <ipv4.h> > #include <udp.h> > #include <dns.h> > -#include <netapps/args.h> > +#include <args.h> > > #include <stdio.h> > #include <string.h> > diff --git a/clients/net-snk/app/netlib/dhcp.h b/clients/net-snk/app/netlib/dhcp.h > index 54fb1ee..4432c9b 100644 > --- a/clients/net-snk/app/netlib/dhcp.h > +++ b/clients/net-snk/app/netlib/dhcp.h > @@ -14,12 +14,7 @@ > #define _DHCP_H_ > > #include <stdint.h> > - > -#ifdef USE_MTFTP > -#include <netlib/mtftp.h> > -#else > -#include <netlib/tftp.h> > -#endif > +#include "tftp.h" You are getting rid of MTFTP references by tiny bits? :) Another thing - it does not compile without 2/3 applied: > make distclean [CLEAN] time/ [CLEAN] netlib/ [CLEAN] netapps/ [CLEAN] netapps/ [CLEAN] netapps/ > make qemu ******** Building qemu system ******** ====== Building clients ====== [CC] depend [CC] init.o [CC] crt0.o [CC] systemcall.o [CC] timer.o [CC] entry.o In file included from main.c:16:0: ./netapps/netapps.h:16:18: fatal error: tftp.h: No such file or directory compilation terminated. /home/aik/p/slof/clients/net-snk/make.depend:16: recipe for target 'depend' failed make[4]: *** [depend] Error 1 Makefile:62: recipe for target '.depend' failed make[3]: *** [.depend] Error 2 make[3]: *** Waiting for unfinished jobs.... Also, while we are on this topic, could you write a small text explaining the romfs layout? Thanks!
On 10.06.2016 06:56, Alexey Kardashevskiy wrote: > On 09/06/16 17:06, Thomas Huth wrote: >> These prefixes prevent that the files can easily be moved to another >> folder, so let's use proper "-I" statements in the Makefiles instead. >> >> Signed-off-by: Thomas Huth <thuth@redhat.com> >> --- ... >> diff --git a/clients/net-snk/app/netlib/dhcp.h b/clients/net-snk/app/netlib/dhcp.h >> index 54fb1ee..4432c9b 100644 >> --- a/clients/net-snk/app/netlib/dhcp.h >> +++ b/clients/net-snk/app/netlib/dhcp.h >> @@ -14,12 +14,7 @@ >> #define _DHCP_H_ >> >> #include <stdint.h> >> - >> -#ifdef USE_MTFTP >> -#include <netlib/mtftp.h> >> -#else >> -#include <netlib/tftp.h> >> -#endif >> +#include "tftp.h" > > > You are getting rid of MTFTP references by tiny bits? :) The MTFTP code is not in the repository, so we don't need that anymore. But I can also put that into a separate patch if you prefer. > Another thing - it does not compile without 2/3 applied: > >> make distclean > [CLEAN] time/ > [CLEAN] netlib/ > [CLEAN] netapps/ > [CLEAN] netapps/ > [CLEAN] netapps/ > >> make qemu > ******** Building qemu system ******** > ====== Building clients ====== > [CC] depend > [CC] init.o > [CC] crt0.o > [CC] systemcall.o > [CC] timer.o > [CC] entry.o > In file included from main.c:16:0: > ./netapps/netapps.h:16:18: fatal error: tftp.h: No such file or directory > compilation terminated. > /home/aik/p/slof/clients/net-snk/make.depend:16: recipe for target 'depend' > failed Darn, sorry, I thought I had tested it ... I'll send a v2 where it is fixed. > Also, while we are on this topic, could you write a small text explaining > the romfs layout? Thanks! The different parts of the firmware are already explained in the README, isn't that enough? Thomas
On 10/06/16 16:43, Thomas Huth wrote: > On 10.06.2016 06:56, Alexey Kardashevskiy wrote: >> On 09/06/16 17:06, Thomas Huth wrote: >>> These prefixes prevent that the files can easily be moved to another >>> folder, so let's use proper "-I" statements in the Makefiles instead. >>> >>> Signed-off-by: Thomas Huth <thuth@redhat.com> >>> --- > ... >>> diff --git a/clients/net-snk/app/netlib/dhcp.h b/clients/net-snk/app/netlib/dhcp.h >>> index 54fb1ee..4432c9b 100644 >>> --- a/clients/net-snk/app/netlib/dhcp.h >>> +++ b/clients/net-snk/app/netlib/dhcp.h >>> @@ -14,12 +14,7 @@ >>> #define _DHCP_H_ >>> >>> #include <stdint.h> >>> - >>> -#ifdef USE_MTFTP >>> -#include <netlib/mtftp.h> >>> -#else >>> -#include <netlib/tftp.h> >>> -#endif >>> +#include "tftp.h" >> >> >> You are getting rid of MTFTP references by tiny bits? :) > > The MTFTP code is not in the repository, so we don't need that anymore. I noticed this. It is just a bit confusing that you removed one mtftp reference but left all others. > But I can also put that into a separate patch if you prefer. For this patch, just do not remove mtftp, or make another patch before this one which ditches mtftp completely. > >> Another thing - it does not compile without 2/3 applied: >> >>> make distclean >> [CLEAN] time/ >> [CLEAN] netlib/ >> [CLEAN] netapps/ >> [CLEAN] netapps/ >> [CLEAN] netapps/ >> >>> make qemu >> ******** Building qemu system ******** >> ====== Building clients ====== >> [CC] depend >> [CC] init.o >> [CC] crt0.o >> [CC] systemcall.o >> [CC] timer.o >> [CC] entry.o >> In file included from main.c:16:0: >> ./netapps/netapps.h:16:18: fatal error: tftp.h: No such file or directory >> compilation terminated. >> /home/aik/p/slof/clients/net-snk/make.depend:16: recipe for target 'depend' >> failed > > Darn, sorry, I thought I had tested it ... I'll send a v2 where it is fixed. > >> Also, while we are on this topic, could you write a small text explaining >> the romfs layout? Thanks! > > The different parts of the firmware are already explained in the README, > isn't that enough? romfs contains how many files? I could not spot this from the README. I assume it is paflof (with llfw/lib/board-qemu compiled in), network drivers and clients (takeover and net-snk), no?
On 14.06.2016 04:10, Alexey Kardashevskiy wrote: > On 10/06/16 16:43, Thomas Huth wrote: >> On 10.06.2016 06:56, Alexey Kardashevskiy wrote: >>> On 09/06/16 17:06, Thomas Huth wrote: >>>> These prefixes prevent that the files can easily be moved to another >>>> folder, so let's use proper "-I" statements in the Makefiles instead. >>>> >>>> Signed-off-by: Thomas Huth <thuth@redhat.com> >>>> --- >> ... >>>> diff --git a/clients/net-snk/app/netlib/dhcp.h b/clients/net-snk/app/netlib/dhcp.h >>>> index 54fb1ee..4432c9b 100644 >>>> --- a/clients/net-snk/app/netlib/dhcp.h >>>> +++ b/clients/net-snk/app/netlib/dhcp.h >>>> @@ -14,12 +14,7 @@ >>>> #define _DHCP_H_ >>>> >>>> #include <stdint.h> >>>> - >>>> -#ifdef USE_MTFTP >>>> -#include <netlib/mtftp.h> >>>> -#else >>>> -#include <netlib/tftp.h> >>>> -#endif >>>> +#include "tftp.h" >>> >>> >>> You are getting rid of MTFTP references by tiny bits? :) >> >> The MTFTP code is not in the repository, so we don't need that anymore. > > I noticed this. It is just a bit confusing that you removed one mtftp > reference but left all others. > >> But I can also put that into a separate patch if you prefer. > > For this patch, just do not remove mtftp, or make another patch before this > one which ditches mtftp completely. Ok, I've already added a separate patch in v2 of my patch series that I've posted last Friday. [...] >>> Also, while we are on this topic, could you write a small text explaining >>> the romfs layout? Thanks! >> >> The different parts of the firmware are already explained in the README, >> isn't that enough? > > romfs contains how many files? I could not spot this from the README. I > assume it is paflof (with llfw/lib/board-qemu compiled in), network drivers > and clients (takeover and net-snk), no? To show the contents of the romfs, you've got two options: 1) Use the "sloffs" tool from Adrian's repository (ttp://lisas.de/~adrian/slof/slof.git) ... and maybe consider to include it in the main SLOF repository, too. 2) At the firmware prompt, simply type "romfs-list" The romfs mainly consists of the various .fs files that get included while the Forth code is running. The other files are: stage1 : Low-level firmware (llfw), i.e. early setup code xvect : The exception vectors of Paflof ofw_main : The Paflof binary + OF.fs bootinfo : Not sure, seems to be used for js2x takeover snk : The net-snk binary default-font.bin : Font for SLOF when using VGA console build_info.img : Information from the GCC version that has been used I can write up a chapter for the README about this if you like - but I'd prefer if that could wait until I've finished my net-snk cleanup, so I don't have to explain that thing just to remove it again afterwards. Thomas
On 14/06/16 17:19, Thomas Huth wrote: > On 14.06.2016 04:10, Alexey Kardashevskiy wrote: >> On 10/06/16 16:43, Thomas Huth wrote: >>> On 10.06.2016 06:56, Alexey Kardashevskiy wrote: >>>> On 09/06/16 17:06, Thomas Huth wrote: >>>>> These prefixes prevent that the files can easily be moved to another >>>>> folder, so let's use proper "-I" statements in the Makefiles instead. >>>>> >>>>> Signed-off-by: Thomas Huth <thuth@redhat.com> >>>>> --- >>> ... >>>>> diff --git a/clients/net-snk/app/netlib/dhcp.h b/clients/net-snk/app/netlib/dhcp.h >>>>> index 54fb1ee..4432c9b 100644 >>>>> --- a/clients/net-snk/app/netlib/dhcp.h >>>>> +++ b/clients/net-snk/app/netlib/dhcp.h >>>>> @@ -14,12 +14,7 @@ >>>>> #define _DHCP_H_ >>>>> >>>>> #include <stdint.h> >>>>> - >>>>> -#ifdef USE_MTFTP >>>>> -#include <netlib/mtftp.h> >>>>> -#else >>>>> -#include <netlib/tftp.h> >>>>> -#endif >>>>> +#include "tftp.h" >>>> >>>> >>>> You are getting rid of MTFTP references by tiny bits? :) >>> >>> The MTFTP code is not in the repository, so we don't need that anymore. >> >> I noticed this. It is just a bit confusing that you removed one mtftp >> reference but left all others. >> >>> But I can also put that into a separate patch if you prefer. >> >> For this patch, just do not remove mtftp, or make another patch before this >> one which ditches mtftp completely. > > Ok, I've already added a separate patch in v2 of my patch series that > I've posted last Friday. I noticed, thanks. > [...] >>>> Also, while we are on this topic, could you write a small text explaining >>>> the romfs layout? Thanks! >>> >>> The different parts of the firmware are already explained in the README, >>> isn't that enough? >> >> romfs contains how many files? I could not spot this from the README. I >> assume it is paflof (with llfw/lib/board-qemu compiled in), network drivers >> and clients (takeover and net-snk), no? > > To show the contents of the romfs, you've got two options: > > 1) Use the "sloffs" tool from Adrian's repository > (ttp://lisas.de/~adrian/slof/slof.git) ... and maybe consider to include > it in the main SLOF repository, too. I already considered, however I doubt I can pick bits I like from there without asking a permission or violating a license, although the license is the same and it is BSD. Or this is a beauty of the BSD license when anyone can borrow anything? :) > 2) At the firmware prompt, simply type "romfs-list" Thanks, this is exactly what I was looking for. > The romfs mainly consists of the various .fs files that get included > while the Forth code is running. The other files are: > > stage1 : Low-level firmware (llfw), i.e. early setup code > xvect : The exception vectors of Paflof > ofw_main : The Paflof binary + OF.fs > bootinfo : Not sure, seems to be used for js2x takeover > snk : The net-snk binary > default-font.bin : Font for SLOF when using VGA console > build_info.img : Information from the GCC version that has been used > > I can write up a chapter for the README about this if you like - but I'd > prefer if that could wait until I've finished my net-snk cleanup, so I > don't have to explain that thing just to remove it again afterwards. Thanks! No, I am pretty happy with this post already, hold it for the times when you get really (really) bored :)
On Wed, Jun 15, 2016 at 04:00:18PM +1000, Alexey Kardashevskiy wrote: even more [...] > > [...] > >>>> Also, while we are on this topic, could you write a small text explaining > >>>> the romfs layout? Thanks! > >>> > >>> The different parts of the firmware are already explained in the README, > >>> isn't that enough? > >> > >> romfs contains how many files? I could not spot this from the README. I > >> assume it is paflof (with llfw/lib/board-qemu compiled in), network drivers > >> and clients (takeover and net-snk), no? > > > > To show the contents of the romfs, you've got two options: > > > > 1) Use the "sloffs" tool from Adrian's repository > > (ttp://lisas.de/~adrian/slof/slof.git) ... and maybe consider to include > > it in the main SLOF repository, too. > > I already considered, however I doubt I can pick bits I like from there > without asking a permission or violating a license, although the license is > the same and it is BSD. > > Or this is a beauty of the BSD license when anyone can borrow anything? :) Oh, wow. SLOF is still alive. I can cherry-pick the old commits from my repository and submit them for the new repository. Adrian
This brings the sloffs code to read, copy and append files to an existing boot_rom.bin from my repository at https://lisas.de/~adrian/slof/slof.git/ . This code was written in 2008 and all patches have been cherry-picked without modifications. Only the last patch (13/13) updates the code to work with today's compilers. I was able to test that the code still does what it is supposed to do: $ ./sloffs -l ../boot_rom.bin Offset File Name Size Flags =================================================================== 0x00000000 header 0000136 (0x000088) 0x00000000 0x000000d8 stage1 0049832 (0x00c2a8) 0x00000001 0x0000c3b0 xvect 0016128 (0x003f00) 0x00000000 $ ./sloffs ../boot_rom.bin -a sloffs -o new.bin $ ./sloffs -d new.bin Magic : magic123 Platform : qemu0 Version : adrian Build Date : 2016-06-15 09:15 Modify Date : 2016-06-15 10:16 Image Length: 906216 (0xdd3e8) bytes Revision : 1 Header CRC : 0x0000000060a8d884 CRC check: [OK] Image CRC : 0x00000000fbacd40d CRC check: [OK] Files : 50 Adrian Reber (13): tools: added initial version of sloffs tools: remove unused parts from the Makefile tools: added sloffs to Makefile tools: fixed compiler warnings tools: describe the options in the help printout tools: added function to dump header romfs: factored out crc code, to make it usable from other locations tools: use crc checking code from romfs/tools tools: added file append functionality tools: added support to sloffs to read from /dev/slof_flash tools: removed a cpu_to_be64() in CRC calculation tools: add copy functionality sloffs: fix compiler warnings romfs/tools/Makefile | 2 +- romfs/tools/crclib.c | 260 +++++++++++++++ romfs/tools/crclib.h | 23 ++ romfs/tools/create_crc.c | 263 +-------------- tools/.gitignore | 1 + tools/Makefile | 21 +- tools/sloffs.c | 740 +++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 1039 insertions(+), 271 deletions(-)
On 15.06.2016 10:29, Adrian Reber wrote: > This brings the sloffs code to read, copy and append files to an existing > boot_rom.bin from my repository at https://lisas.de/~adrian/slof/slof.git/ . > > This code was written in 2008 and all patches have been cherry-picked > without modifications. Only the last patch (13/13) updates the code > to work with today's compilers. Cool, thanks for posting it! I also gave it a try, and it works for me fine with the current boot_rom.bin images, too. However, I still get some compiler warnings here (gcc 4.8.5): sloffs.c: In function ‘sloffs_dump’: sloffs.c:434:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] if (be64_to_cpu(*(uint64_t *)header->date)) { ^ sloffs.c:435:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] printf("%04x", be16_to_cpu(*(uint16_t *)(header->date + 2))); ^ sloffs.c:445:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] if (be64_to_cpu(*(uint64_t *)header->mdate)) { ^ sloffs.c:446:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] printf("%04x", be16_to_cpu(*(uint16_t *)(header->mdate + 2))); ^ We already changed most Makefiles of SLOF to use -fno-strict-aliasing, so we should maybe use that for tools/Makefile, too - or simply fix the aliasing problems ;-) Thomas
On Wed, Jun 15, 2016 at 09:36:13PM +0200, Thomas Huth wrote: > On 15.06.2016 10:29, Adrian Reber wrote: > > This brings the sloffs code to read, copy and append files to an existing > > boot_rom.bin from my repository at https://lisas.de/~adrian/slof/slof.git/ . > > > > This code was written in 2008 and all patches have been cherry-picked > > without modifications. Only the last patch (13/13) updates the code > > to work with today's compilers. > > Cool, thanks for posting it! I also gave it a try, and it works for me > fine with the current boot_rom.bin images, too. > > However, I still get some compiler warnings here (gcc 4.8.5): > > sloffs.c: In function ‘sloffs_dump’: > sloffs.c:434:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] > if (be64_to_cpu(*(uint64_t *)header->date)) { > ^ > sloffs.c:435:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] > printf("%04x", be16_to_cpu(*(uint16_t *)(header->date + 2))); > ^ > sloffs.c:445:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] > if (be64_to_cpu(*(uint64_t *)header->mdate)) { > ^ > sloffs.c:446:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] > printf("%04x", be16_to_cpu(*(uint16_t *)(header->mdate + 2))); > ^ Interesting. With gcc 6.1.1 on Fedora 24 I do not see those warnings. > We already changed most Makefiles of SLOF to use -fno-strict-aliasing, > so we should maybe use that for tools/Makefile, too - or simply > fix the aliasing problems ;-) Whatever fits better to the remaining code. The romfs structs are broken and the actual dates are stored in the padding fields behind date and mdate. Adrian
On 16/06/16 06:06, Adrian Reber wrote: > On Wed, Jun 15, 2016 at 09:36:13PM +0200, Thomas Huth wrote: >> On 15.06.2016 10:29, Adrian Reber wrote: >>> This brings the sloffs code to read, copy and append files to an existing >>> boot_rom.bin from my repository at https://lisas.de/~adrian/slof/slof.git/ . >>> >>> This code was written in 2008 and all patches have been cherry-picked >>> without modifications. Only the last patch (13/13) updates the code >>> to work with today's compilers. >> >> Cool, thanks for posting it! I also gave it a try, and it works for me >> fine with the current boot_rom.bin images, too. >> >> However, I still get some compiler warnings here (gcc 4.8.5): >> >> sloffs.c: In function ‘sloffs_dump’: >> sloffs.c:434:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] >> if (be64_to_cpu(*(uint64_t *)header->date)) { >> ^ >> sloffs.c:435:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] >> printf("%04x", be16_to_cpu(*(uint16_t *)(header->date + 2))); >> ^ >> sloffs.c:445:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] >> if (be64_to_cpu(*(uint64_t *)header->mdate)) { >> ^ >> sloffs.c:446:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] >> printf("%04x", be16_to_cpu(*(uint16_t *)(header->mdate + 2))); >> ^ > > Interesting. With gcc 6.1.1 on Fedora 24 I do not see those warnings. > >> We already changed most Makefiles of SLOF to use -fno-strict-aliasing, >> so we should maybe use that for tools/Makefile, too - or simply >> fix the aliasing problems ;-) > > Whatever fits better to the remaining code. The romfs structs are broken > and the actual dates are stored in the padding fields behind date and > mdate. I am a bit confused here. As I read the code, the dates are stored in both date and padding fields, it is just shifted by 2 bytes so padding is used. And the tool does not handle properly written dates at all as romfs is always wrong - where are these dates are stored? Cannot we fix that spot and then fix the tool not to have this workaround? Another question - I prefer merging all these patches into one before pushing, any objections to this?
On Mon, Jun 27, 2016 at 01:02:59PM +1000, Alexey Kardashevskiy wrote: > On 16/06/16 06:06, Adrian Reber wrote: > > On Wed, Jun 15, 2016 at 09:36:13PM +0200, Thomas Huth wrote: > >> On 15.06.2016 10:29, Adrian Reber wrote: > >>> This brings the sloffs code to read, copy and append files to an existing > >>> boot_rom.bin from my repository at https://lisas.de/~adrian/slof/slof.git/ . > >>> > >>> This code was written in 2008 and all patches have been cherry-picked > >>> without modifications. Only the last patch (13/13) updates the code > >>> to work with today's compilers. > >> > >> Cool, thanks for posting it! I also gave it a try, and it works for me > >> fine with the current boot_rom.bin images, too. > >> > >> However, I still get some compiler warnings here (gcc 4.8.5): > >> > >> sloffs.c: In function ‘sloffs_dump’: > >> sloffs.c:434:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] > >> if (be64_to_cpu(*(uint64_t *)header->date)) { > >> ^ > >> sloffs.c:435:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] > >> printf("%04x", be16_to_cpu(*(uint16_t *)(header->date + 2))); > >> ^ > >> sloffs.c:445:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] > >> if (be64_to_cpu(*(uint64_t *)header->mdate)) { > >> ^ > >> sloffs.c:446:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] > >> printf("%04x", be16_to_cpu(*(uint16_t *)(header->mdate + 2))); > >> ^ > > > > Interesting. With gcc 6.1.1 on Fedora 24 I do not see those warnings. > > > >> We already changed most Makefiles of SLOF to use -fno-strict-aliasing, > >> so we should maybe use that for tools/Makefile, too - or simply > >> fix the aliasing problems ;-) > > > > Whatever fits better to the remaining code. The romfs structs are broken > > and the actual dates are stored in the padding fields behind date and > > mdate. > > I am a bit confused here. > > As I read the code, the dates are stored in both date and padding fields, > it is just shifted by 2 bytes so padding is used. And the tool does not > handle properly written dates at all as romfs is always wrong - where are > these dates are stored? Cannot we fix that spot and then fix the tool not > to have this workaround? Yes, the structures defining the romfs header and the romfs code unfortunately disagree. My tool just tries to cope with the broken code. The definition is in include/calculatecrc.h and it written in romfs/tools/create_crc.c. There is also some forth code reading this field: bdate2human I discussed this already on IRC with Thomas and it should be easy fix it. It just means sloffs will never display the correct dates of old romfs files. Which is probably not that important... > Another question - I prefer merging all these patches into one before > pushing, any objections to this? I can understand that, but as I was able to cherry-pick all commits without any fixups, I would prefer to keep the history as it was. But as you will be the one committing the patches it is your decision how you want to merge the patches. Adrian
On 27.06.2016 08:11, Adrian Reber wrote: > On Mon, Jun 27, 2016 at 01:02:59PM +1000, Alexey Kardashevskiy wrote: >> On 16/06/16 06:06, Adrian Reber wrote: >>> On Wed, Jun 15, 2016 at 09:36:13PM +0200, Thomas Huth wrote: >>>> On 15.06.2016 10:29, Adrian Reber wrote: >>>>> This brings the sloffs code to read, copy and append files to an existing >>>>> boot_rom.bin from my repository at https://lisas.de/~adrian/slof/slof.git/ . >>>>> >>>>> This code was written in 2008 and all patches have been cherry-picked >>>>> without modifications. Only the last patch (13/13) updates the code >>>>> to work with today's compilers. >>>> >>>> Cool, thanks for posting it! I also gave it a try, and it works for me >>>> fine with the current boot_rom.bin images, too. >>>> >>>> However, I still get some compiler warnings here (gcc 4.8.5): >>>> >>>> sloffs.c: In function ‘sloffs_dump’: >>>> sloffs.c:434:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] >>>> if (be64_to_cpu(*(uint64_t *)header->date)) { >>>> ^ >>>> sloffs.c:435:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] >>>> printf("%04x", be16_to_cpu(*(uint16_t *)(header->date + 2))); >>>> ^ >>>> sloffs.c:445:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] >>>> if (be64_to_cpu(*(uint64_t *)header->mdate)) { >>>> ^ >>>> sloffs.c:446:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] >>>> printf("%04x", be16_to_cpu(*(uint16_t *)(header->mdate + 2))); >>>> ^ >>> >>> Interesting. With gcc 6.1.1 on Fedora 24 I do not see those warnings. >>> >>>> We already changed most Makefiles of SLOF to use -fno-strict-aliasing, >>>> so we should maybe use that for tools/Makefile, too - or simply >>>> fix the aliasing problems ;-) >>> >>> Whatever fits better to the remaining code. The romfs structs are broken >>> and the actual dates are stored in the padding fields behind date and >>> mdate. >> >> I am a bit confused here. >> >> As I read the code, the dates are stored in both date and padding fields, >> it is just shifted by 2 bytes so padding is used. And the tool does not >> handle properly written dates at all as romfs is always wrong - where are >> these dates are stored? Cannot we fix that spot and then fix the tool not >> to have this workaround? > > Yes, the structures defining the romfs header and the romfs code > unfortunately disagree. My tool just tries to cope with the broken code. > > The definition is in include/calculatecrc.h and it written in > romfs/tools/create_crc.c. There is also some forth code reading this > field: bdate2human > > I discussed this already on IRC with Thomas and it should be easy > fix it. It just means sloffs will never display the correct dates of old > romfs files. Which is probably not that important... I think we should simply replace the "char date[6]" field in struct stH with "char date[8]" and remove the padding[2]. Then add a big fat comment that the first two bytes of date[] are unused and should be ignored ... that way the code should look better and we keep the compatibility with old boot_rom.bin files. Thomas
On 27/06/16 16:39, Thomas Huth wrote: > On 27.06.2016 08:11, Adrian Reber wrote: >> On Mon, Jun 27, 2016 at 01:02:59PM +1000, Alexey Kardashevskiy wrote: >>> On 16/06/16 06:06, Adrian Reber wrote: >>>> On Wed, Jun 15, 2016 at 09:36:13PM +0200, Thomas Huth wrote: >>>>> On 15.06.2016 10:29, Adrian Reber wrote: >>>>>> This brings the sloffs code to read, copy and append files to an existing >>>>>> boot_rom.bin from my repository at https://lisas.de/~adrian/slof/slof.git/ . >>>>>> >>>>>> This code was written in 2008 and all patches have been cherry-picked >>>>>> without modifications. Only the last patch (13/13) updates the code >>>>>> to work with today's compilers. >>>>> >>>>> Cool, thanks for posting it! I also gave it a try, and it works for me >>>>> fine with the current boot_rom.bin images, too. >>>>> >>>>> However, I still get some compiler warnings here (gcc 4.8.5): >>>>> >>>>> sloffs.c: In function ‘sloffs_dump’: >>>>> sloffs.c:434:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] >>>>> if (be64_to_cpu(*(uint64_t *)header->date)) { >>>>> ^ >>>>> sloffs.c:435:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] >>>>> printf("%04x", be16_to_cpu(*(uint16_t *)(header->date + 2))); >>>>> ^ >>>>> sloffs.c:445:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] >>>>> if (be64_to_cpu(*(uint64_t *)header->mdate)) { >>>>> ^ >>>>> sloffs.c:446:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] >>>>> printf("%04x", be16_to_cpu(*(uint16_t *)(header->mdate + 2))); >>>>> ^ >>>> >>>> Interesting. With gcc 6.1.1 on Fedora 24 I do not see those warnings. >>>> >>>>> We already changed most Makefiles of SLOF to use -fno-strict-aliasing, >>>>> so we should maybe use that for tools/Makefile, too - or simply >>>>> fix the aliasing problems ;-) >>>> >>>> Whatever fits better to the remaining code. The romfs structs are broken >>>> and the actual dates are stored in the padding fields behind date and >>>> mdate. >>> >>> I am a bit confused here. >>> >>> As I read the code, the dates are stored in both date and padding fields, >>> it is just shifted by 2 bytes so padding is used. And the tool does not >>> handle properly written dates at all as romfs is always wrong - where are >>> these dates are stored? Cannot we fix that spot and then fix the tool not >>> to have this workaround? >> >> Yes, the structures defining the romfs header and the romfs code >> unfortunately disagree. My tool just tries to cope with the broken code. >> >> The definition is in include/calculatecrc.h and it written in >> romfs/tools/create_crc.c. There is also some forth code reading this >> field: bdate2human >> >> I discussed this already on IRC with Thomas and it should be easy >> fix it. It just means sloffs will never display the correct dates of old >> romfs files. Which is probably not that important... > > I think we should simply replace the "char date[6]" field in struct stH > with "char date[8]" and remove the padding[2]. Then add a big fat > comment that the first two bytes of date[] are unused and should be > ignored ... that way the code should look better and we keep the > compatibility with old boot_rom.bin files. Is it slof-only ROM filesystem type or it is from something like ieee1275? We could just legalize the existing behaviour if it is not the latter :)
On Mon, Jun 27, 2016 at 06:22:23PM +1000, Alexey Kardashevskiy wrote: > On 27/06/16 16:39, Thomas Huth wrote: > > On 27.06.2016 08:11, Adrian Reber wrote: > >> On Mon, Jun 27, 2016 at 01:02:59PM +1000, Alexey Kardashevskiy wrote: > >>> On 16/06/16 06:06, Adrian Reber wrote: > >>>> On Wed, Jun 15, 2016 at 09:36:13PM +0200, Thomas Huth wrote: > >>>>> On 15.06.2016 10:29, Adrian Reber wrote: > >>>>>> This brings the sloffs code to read, copy and append files to an existing > >>>>>> boot_rom.bin from my repository at https://lisas.de/~adrian/slof/slof.git/ . > >>>>>> > >>>>>> This code was written in 2008 and all patches have been cherry-picked > >>>>>> without modifications. Only the last patch (13/13) updates the code > >>>>>> to work with today's compilers. > >>>>> > >>>>> Cool, thanks for posting it! I also gave it a try, and it works for me > >>>>> fine with the current boot_rom.bin images, too. > >>>>> > >>>>> However, I still get some compiler warnings here (gcc 4.8.5): > >>>>> > >>>>> sloffs.c: In function ‘sloffs_dump’: > >>>>> sloffs.c:434:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] > >>>>> if (be64_to_cpu(*(uint64_t *)header->date)) { > >>>>> ^ > >>>>> sloffs.c:435:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] > >>>>> printf("%04x", be16_to_cpu(*(uint16_t *)(header->date + 2))); > >>>>> ^ > >>>>> sloffs.c:445:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] > >>>>> if (be64_to_cpu(*(uint64_t *)header->mdate)) { > >>>>> ^ > >>>>> sloffs.c:446:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] > >>>>> printf("%04x", be16_to_cpu(*(uint16_t *)(header->mdate + 2))); > >>>>> ^ > >>>> > >>>> Interesting. With gcc 6.1.1 on Fedora 24 I do not see those warnings. > >>>> > >>>>> We already changed most Makefiles of SLOF to use -fno-strict-aliasing, > >>>>> so we should maybe use that for tools/Makefile, too - or simply > >>>>> fix the aliasing problems ;-) > >>>> > >>>> Whatever fits better to the remaining code. The romfs structs are broken > >>>> and the actual dates are stored in the padding fields behind date and > >>>> mdate. > >>> > >>> I am a bit confused here. > >>> > >>> As I read the code, the dates are stored in both date and padding fields, > >>> it is just shifted by 2 bytes so padding is used. And the tool does not > >>> handle properly written dates at all as romfs is always wrong - where are > >>> these dates are stored? Cannot we fix that spot and then fix the tool not > >>> to have this workaround? > >> > >> Yes, the structures defining the romfs header and the romfs code > >> unfortunately disagree. My tool just tries to cope with the broken code. > >> > >> The definition is in include/calculatecrc.h and it written in > >> romfs/tools/create_crc.c. There is also some forth code reading this > >> field: bdate2human > >> > >> I discussed this already on IRC with Thomas and it should be easy > >> fix it. It just means sloffs will never display the correct dates of old > >> romfs files. Which is probably not that important... > > > > I think we should simply replace the "char date[6]" field in struct stH > > with "char date[8]" and remove the padding[2]. Then add a big fat > > comment that the first two bytes of date[] are unused and should be > > ignored ... that way the code should look better and we keep the > > compatibility with old boot_rom.bin files. > > Is it slof-only ROM filesystem type or it is from something like ieee1275? > We could just legalize the existing behaviour if it is not the latter :) This is slof-only and Thomas' idea sounds like the right thing to do. Adrian
diff --git a/clients/net-snk/app/netapps/Makefile b/clients/net-snk/app/netapps/Makefile index 70b990a..1e50226 100644 --- a/clients/net-snk/app/netapps/Makefile +++ b/clients/net-snk/app/netapps/Makefile @@ -16,7 +16,7 @@ ifndef TOP endif include $(TOP)/make.rules -CFLAGS += -I../ -I../../../../lib/ -Wall -W +CFLAGS += -I.. -I../netlib -I../../../../lib/ -Wall -W OBJS = netboot.o ping.o args.o diff --git a/clients/net-snk/app/netapps/netapps.h b/clients/net-snk/app/netapps/netapps.h index 20879c5..d3f7eb2 100644 --- a/clients/net-snk/app/netapps/netapps.h +++ b/clients/net-snk/app/netapps/netapps.h @@ -13,7 +13,7 @@ #ifndef _NETAPPS_H_ #define _NETAPPS_H_ -#include <netlib/tftp.h> +#include <tftp.h> #define F_IPV4 4 #define F_IPV6 6 diff --git a/clients/net-snk/app/netapps/netboot.c b/clients/net-snk/app/netapps/netboot.c index bb1db03..d99aa29 100644 --- a/clients/net-snk/app/netapps/netboot.c +++ b/clients/net-snk/app/netapps/netboot.c @@ -10,21 +10,21 @@ * IBM Corporation - initial implementation *****************************************************************************/ -#include <netlib/tftp.h> -#include <netlib/ethernet.h> -#include <netlib/dhcp.h> -#include <netlib/dhcpv6.h> -#include <netlib/ipv4.h> -#include <netlib/ipv6.h> -#include <netlib/dns.h> +#include <tftp.h> +#include <ethernet.h> +#include <dhcp.h> +#include <dhcpv6.h> +#include <ipv4.h> +#include <ipv6.h> +#include <dns.h> #include <string.h> #include <stdio.h> #include <time.h> #include <stdlib.h> #include <sys/socket.h> -#include <netapps/args.h> #include <libbootmsg/libbootmsg.h> #include <of.h> +#include "args.h" #include "netapps.h" #define IP_INIT_DEFAULT 5 diff --git a/clients/net-snk/app/netapps/ping.c b/clients/net-snk/app/netapps/ping.c index f55e0db..def3179 100644 --- a/clients/net-snk/app/netapps/ping.c +++ b/clients/net-snk/app/netapps/ping.c @@ -10,15 +10,15 @@ * IBM Corporation - initial implementation *****************************************************************************/ -#include <netlib/ipv4.h> -#include <netlib/dhcp.h> -#include <netlib/ethernet.h> +#include <ipv4.h> +#include <dhcp.h> +#include <ethernet.h> #include <sys/socket.h> #include <string.h> #include <stdio.h> #include <stdlib.h> #include <time.h> -#include <netapps/args.h> +#include "args.h" #include "netapps.h" struct ping_args { diff --git a/clients/net-snk/app/netlib/Makefile b/clients/net-snk/app/netlib/Makefile index df09bf8..610e189 100644 --- a/clients/net-snk/app/netlib/Makefile +++ b/clients/net-snk/app/netlib/Makefile @@ -16,7 +16,7 @@ ifndef TOP endif include $(TOP)/make.rules -CFLAGS += -I../ +CFLAGS += -I../netapps ifeq ($(SNK_USE_MTFTP), 1) CFLAGS += -DUSE_MTFTP diff --git a/clients/net-snk/app/netlib/dhcp.c b/clients/net-snk/app/netlib/dhcp.c index 7e2e88c..0cb4fa4 100644 --- a/clients/net-snk/app/netlib/dhcp.c +++ b/clients/net-snk/app/netlib/dhcp.c @@ -48,7 +48,7 @@ #include <ipv4.h> #include <udp.h> #include <dns.h> -#include <netapps/args.h> +#include <args.h> #include <stdio.h> #include <string.h> diff --git a/clients/net-snk/app/netlib/dhcp.h b/clients/net-snk/app/netlib/dhcp.h index 54fb1ee..4432c9b 100644 --- a/clients/net-snk/app/netlib/dhcp.h +++ b/clients/net-snk/app/netlib/dhcp.h @@ -14,12 +14,7 @@ #define _DHCP_H_ #include <stdint.h> - -#ifdef USE_MTFTP -#include <netlib/mtftp.h> -#else -#include <netlib/tftp.h> -#endif +#include "tftp.h" /** \struct btphdr * A header for BootP/DHCP-messages. diff --git a/clients/net-snk/app/netlib/dhcpv6.c b/clients/net-snk/app/netlib/dhcpv6.c index d0a22d5..491d540 100644 --- a/clients/net-snk/app/netlib/dhcpv6.c +++ b/clients/net-snk/app/netlib/dhcpv6.c @@ -16,12 +16,12 @@ #include <stdint.h> #include <sys/socket.h> #include <time.h> -#include <netlib/ethernet.h> -#include <netlib/ipv6.h> -#include <netlib/udp.h> -#include <netlib/dhcpv6.h> -#include <netlib/tftp.h> -#include <netlib/dns.h> +#include "ethernet.h" +#include "ipv6.h" +#include "udp.h" +#include "dhcpv6.h" +#include "tftp.h" +#include "dns.h" static uint8_t tid[3]; static uint32_t dhcpv6_state = -1; diff --git a/clients/net-snk/app/netlib/dhcpv6.h b/clients/net-snk/app/netlib/dhcpv6.h index fb77da6..02747a0 100644 --- a/clients/net-snk/app/netlib/dhcpv6.h +++ b/clients/net-snk/app/netlib/dhcpv6.h @@ -14,7 +14,7 @@ #define _DHCPV6_H_ #include <stdint.h> -#include <netlib/ethernet.h> +#include "ethernet.h" #define DHCPV6_STATELESS 0 #define DHCPV6_STATEFUL 1 diff --git a/clients/net-snk/app/netlib/icmpv6.c b/clients/net-snk/app/netlib/icmpv6.c index 51e4a5f..e897588 100644 --- a/clients/net-snk/app/netlib/icmpv6.c +++ b/clients/net-snk/app/netlib/icmpv6.c @@ -15,11 +15,11 @@ #include <stdio.h> #include <string.h> #include <sys/socket.h> -#include <netlib/ethernet.h> -#include <netlib/ipv6.h> -#include <netlib/icmpv6.h> -#include <netlib/ndp.h> -#include <netlib/dhcpv6.h> +#include "ethernet.h" +#include "ipv6.h" +#include "icmpv6.h" +#include "ndp.h" +#include "dhcpv6.h" static int ra_received = 0; diff --git a/clients/net-snk/app/netlib/icmpv6.h b/clients/net-snk/app/netlib/icmpv6.h index 3279797..41b0c70 100644 --- a/clients/net-snk/app/netlib/icmpv6.h +++ b/clients/net-snk/app/netlib/icmpv6.h @@ -14,8 +14,8 @@ #define _ICMPV6_H_ #include <stdint.h> -#include <netlib/ethernet.h> -#include <netlib/ipv6.h> +#include "ethernet.h" +#include "ipv6.h" #define __ICMPV6_DEBUG__ diff --git a/clients/net-snk/app/netlib/ipv6.c b/clients/net-snk/app/netlib/ipv6.c index 300c913..49de5c7 100644 --- a/clients/net-snk/app/netlib/ipv6.c +++ b/clients/net-snk/app/netlib/ipv6.c @@ -17,11 +17,11 @@ #include <time.h> #include <ctype.h> #include <sys/socket.h> -#include <netlib/ethernet.h> -#include <netlib/ipv6.h> -#include <netlib/icmpv6.h> -#include <netlib/ndp.h> -#include <netlib/udp.h> +#include "ethernet.h" +#include "ipv6.h" +#include "icmpv6.h" +#include "ndp.h" +#include "udp.h" #undef IPV6_DEBUG //#define IPV6_DEBUG diff --git a/clients/net-snk/app/netlib/ipv6.h b/clients/net-snk/app/netlib/ipv6.h index 6565a88..6f783b3 100644 --- a/clients/net-snk/app/netlib/ipv6.h +++ b/clients/net-snk/app/netlib/ipv6.h @@ -14,7 +14,7 @@ #define _IPV6_H_ #include <stdint.h> -#include <netlib/ethernet.h> +#include "ethernet.h" #define __IPV6_DEBUG__ diff --git a/clients/net-snk/app/netlib/ndp.c b/clients/net-snk/app/netlib/ndp.c index 263bee2..f1f51c7 100644 --- a/clients/net-snk/app/netlib/ndp.c +++ b/clients/net-snk/app/netlib/ndp.c @@ -13,9 +13,9 @@ #include <stdlib.h> #include <string.h> #include <stdio.h> -#include <netlib/ipv6.h> -#include <netlib/icmpv6.h> -#include <netlib/ndp.h> +#include "ipv6.h" +#include "icmpv6.h" +#include "ndp.h" /* Neighbor cache */ static struct neighbor *first_neighbor; diff --git a/clients/net-snk/app/netlib/ndp.h b/clients/net-snk/app/netlib/ndp.h index 7274f10..cd18158 100644 --- a/clients/net-snk/app/netlib/ndp.h +++ b/clients/net-snk/app/netlib/ndp.h @@ -13,7 +13,7 @@ #ifndef _NDP_H_ #define _NDP_H_ -#include <netlib/ipv6.h> +#include "ipv6.h" #define __NDP_DEBUG__ diff --git a/clients/net-snk/app/netlib/tftp.h b/clients/net-snk/app/netlib/tftp.h index 1cf1266..6b5996c 100644 --- a/clients/net-snk/app/netlib/tftp.h +++ b/clients/net-snk/app/netlib/tftp.h @@ -15,7 +15,7 @@ #define _TFTP_H_ #include <stdint.h> -#include <netlib/ipv6.h> +#include "ipv6.h" struct tftphdr { int16_t th_opcode;
These prefixes prevent that the files can easily be moved to another folder, so let's use proper "-I" statements in the Makefiles instead. Signed-off-by: Thomas Huth <thuth@redhat.com> --- clients/net-snk/app/netapps/Makefile | 2 +- clients/net-snk/app/netapps/netapps.h | 2 +- clients/net-snk/app/netapps/netboot.c | 16 ++++++++-------- clients/net-snk/app/netapps/ping.c | 8 ++++---- clients/net-snk/app/netlib/Makefile | 2 +- clients/net-snk/app/netlib/dhcp.c | 2 +- clients/net-snk/app/netlib/dhcp.h | 7 +------ clients/net-snk/app/netlib/dhcpv6.c | 12 ++++++------ clients/net-snk/app/netlib/dhcpv6.h | 2 +- clients/net-snk/app/netlib/icmpv6.c | 10 +++++----- clients/net-snk/app/netlib/icmpv6.h | 4 ++-- clients/net-snk/app/netlib/ipv6.c | 10 +++++----- clients/net-snk/app/netlib/ipv6.h | 2 +- clients/net-snk/app/netlib/ndp.c | 6 +++--- clients/net-snk/app/netlib/ndp.h | 2 +- clients/net-snk/app/netlib/tftp.h | 2 +- 16 files changed, 42 insertions(+), 47 deletions(-)