Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error: multiple definition of `disctype'; #16

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docker
21 changes: 21 additions & 0 deletions Docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM alpine:3.17 AS build-env

#RUN apk add --update autoconf automake libtool git make gcc zlib g++
RUN apk add --update make gcc cmake g++ linux-headers

COPY . src/

RUN cd src \
&& mkdir BUILD \
&& cd BUILD \
&& cmake .. \
&& make \
&& make install

FROM alpine:3.17

COPY --from=build-env /usr/local/bin /usr/local/bin

WORKDIR /

ENTRYPOINT ["/usr/local/bin/friidump"]
6 changes: 6 additions & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ Other drives might work, most likely those based on the Hitachi MN103
microcontroller. If you find any of them, please report so that they can be
added to the compatibility list.

===============================================================================
Docker
===============================================================================

$ docker build -f Docker/Dockerfile -t friidump .
$ docker run --rm --name friidump --privileged -v /dev/sr0:/dev/cdrom -v ${PWD}:/data aphex3k/friidump:latest -d /dev/cdrom -a

===============================================================================
Installation
Expand Down
3 changes: 2 additions & 1 deletion libfriidump/unscrambler.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* As Nintendo GameCube/Wii discs use the standars DVD-ROM scrambling algorithm, but with different, unknown, seeds, the actual seeds have to be brute-forced.
* The functions in this file take care of the brute-forcing and of the actual unscrambling of the read sectors.
*
* The code in this file has been derived from unscrambler 0.4, Copyright (C) 2006 Victor Mu�oz ([email protected]), GPL v2+,
* The code in this file has been derived from unscrambler 0.4, Copyright (C) 2006 Victor Mu�oz ([email protected]), GPL v2+,
* http://www.ingenieria-inversa.cl/?lp_lang_pref=en .
*/

Expand All @@ -48,6 +48,7 @@
/*! \brief Number of bytes of a sector on which the EDC is calculated */
#define EDC_LENGTH (RAW_SECTOR_SIZE - 4) /* The EDC value is contained in the bottom 4 bytes of a frame */

u_int8_t disctype;

/*! \brief A structure that represents a seed
*/
Expand Down
2 changes: 0 additions & 2 deletions libfriidump/unscrambler.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ typedef struct unscrambler_s unscrambler;
the progress function the same format we use elsewhere */
typedef void (*unscrambler_progress_func) (bool start, u_int32_t current_sector, u_int32_t total_sectors, void *progress_data);

u_int8_t disctype;

FRIIDUMPLIB_EXPORT unscrambler *unscrambler_new (void);
FRIIDUMPLIB_EXPORT void *unscrambler_destroy (unscrambler *u);
FRIIDUMPLIB_EXPORT bool unscrambler_unscramble_16sectors (unscrambler *u, u_int32_t sector_no, u_int8_t *inbuf, u_int8_t *outbuf);
Expand Down