Commit Graph

1860 Commits

Author SHA1 Message Date
christos 1eeb780228 double quote police 2015-05-24 17:11:18 +00:00
christos a3d0d7425d fix mkubootimage 2015-05-24 17:08:21 +00:00
jmcneill e37dd27486 add JETSONTK1 to armv7.img 2015-05-22 01:18:22 +00:00
christos ae5191b56d Add small. 2015-04-28 15:14:07 +00:00
hubertf 4eeec9e6c7 More cleanup:
Instead of first overwriting the *_evbarm functions with own code,
and then calling them from the regular functions, directly put the
code into the regular functions.

No more functions from evbarm.conf are used now.
Some variables are still used!
2015-04-19 18:53:33 +00:00
hubertf 5537be8f18 Cleanup: make_filesystems is not used any longer, purge remains 2015-04-19 18:28:31 +00:00
hubertf 7141992348 Add some documentation:
Tell what this does, and what it expects from conf files
2015-04-19 17:56:57 +00:00
hubertf 607c1b1921 Properly spell X' name. From X(7):
The  X.Org  Foundation  requests  that the following names be used when
       referring to this software:

                                          X
                                   X Window System
                                    X Version 11
                             X Window System, Version 11
                                         X11
2015-04-18 22:06:48 +00:00
jmcneill 703f075e77 Rename beagleboard.img to armv7.img. The new image includes the same
kernels as beagleboard.img plus support for Raspberry Pi 2, ODROID-C1,
Cubieboard2, Cubietruck, Hummingbird A31, and Banana Pi.
2015-04-09 10:55:23 +00:00
jmcneill 89275c06a0 show resize_ffs progress bar when resizing root partition 2015-04-06 22:44:46 +00:00
jmcneill 5d40b917cc initialize resize before pulling in board config 2015-04-06 22:20:52 +00:00
jmcneill d32faae6e2 Add support for auto-growing the root partition. Enable it for rpi.img. 2015-04-06 20:19:28 +00:00
jmcneill 8c877c0d3d resizing of ffsv2 still doesn't work well, so revert previous, and instead
explicitly set fsize=2048/bsize=16384, which gives a pretty decent boost
to resize_ffs performance on its own
2015-04-06 17:59:36 +00:00
jmcneill 422b7a467a Use FFSv2 instead of FFSv1 for the root file-system. This should fix the
"resize_ffs takes forever" issues with evbarm images -- growing a v2
file-system is much faster than v1.
2015-04-05 17:05:45 +00:00
skrll 28e709c9a3 Add RPI2 to kernels build for both earmv[67].
Use the earmv6 built kernels to create an image that can be used on both
RPI and RPI2
2015-03-06 11:11:55 +00:00
jmcneill af4a1cc43f actually write cpufreq changes to ${mnt}/etc/rc.local instead of /tmp/a 2015-02-12 10:59:44 +00:00
jmcneill bc8895a810 By default, RPI firmware sets the max CPU frequency to 600MHz. This can be
overridden by setting arm_freq in config.txt, but the default freq at boot
is still 600MHz.

Add logic to rc.local to compare the current vs. max CPU frequency; if they
differ, set the target frequency to the maximum.
2015-02-06 15:15:01 +00:00
skrll 6931a97454 Fix previous so that the new generated rc.conf is picked up and that
any new new mount points (e.g. /proc and /kern) are generated.

While here increate the fs size so that postfix can actually build
/etc/mail/aliases.db
2015-01-29 14:54:06 +00:00
jmcneill 63e2bac990 add /var/shm tmpfs to fstab 2015-01-28 12:08:00 +00:00
skrll 1714369b9e PR/49596: mkimage: incorrect permissions on evbarm images
Use NetBSD.dist in our mtree specification to populate the top level
directories, etc.

For each generated file hand craft an mtree entry.

Remove specialdirs as NetBSD.dist creates /proc and /kern.
2015-01-23 15:17:58 +00:00
skrll 25fa99ca2c Use [dx]sets_p as flag for debug/X sets inclusion. xsets is the list of
sets.
2015-01-18 17:37:54 +00:00
martin 42a1d150e6 Move bogusly merged files over to new location. 2014-12-28 11:51:10 +00:00
christos c98d156d18 fix image building:
- round up the total size of the disk image
	- fix fdisk offset for netbsd ffs images
2014-12-14 00:28:46 +00:00
jmcneill b74092acc2 disable wapbl for evbarm images until stability issues are sorted out 2014-11-25 13:42:31 +00:00
htodd 685040dc40 Remove unused variable. 2014-11-15 19:15:51 +00:00
christos c94539ae6b handle the "special" wc NULL case. 2014-11-15 17:49:19 +00:00
uebayasi cd6a87a95d Fix build of crunched "route". 2014-11-07 02:57:19 +00:00
jmcneill d7994b45da escape $ in $board so this will boot on beaglebone too 2014-09-29 17:54:13 +00:00
jmcneill 88d1b35fc5 turn on ntpd 2014-09-09 13:02:25 +00:00
christos 386021af1d Use .PATH because the newmake does not apply pattern rules to sources in
other directories. Leave the comment and the old code for now so people
are aware that this might not work.
2014-08-25 14:11:51 +00:00
matt beb9c6d1b5 Preliminary files for AARCH64 (64-bit ARM) support.
Enough for a distribution build.
2014-08-10 05:47:35 +00:00
dholland eed67d2502 Don't descend into sysinst. 2014-07-26 19:35:10 +00:00
dholland 50dbef1a09 Move sysinst sources to usr.sbin.
This commit only physically moves the sources - there are no other
changes, to maximize the probability that this will be treated as a
rename if we ever do manage to migrate away from CVS.

Moving sysinst has been discussed on and off for years and has two
goals: making it easier to work on sysinst, and also making sysinst
available on running systems for use installing chroots and VM images
and other such things. None of the latter is possible yet, but as they
say, one thing at a time.

Doing this now was approved in an impromptu fashion by mrg, riz,
riastradh, me, and groo.
2014-07-26 19:30:39 +00:00
dholland 0736ba101a Revert version 1.111 of sysinst/disks.c, which caused sysinst to
create lfs fstab entries with fsck disabled, and instead patch
fsck_lfs to exit successfully without doing anything when given the -p
(bootup preen) option. If you really want to do fsck_lfs -p, you can
do fsck_lfs -f -p to make it go.

This has been sitting in my todo queue since February 2010 and was
ok'd by the committer at the time. The original commit was based on
this post:
   http://mail-index.netbsd.org/tech-kern/2010/02/09/msg007306.html

and I remain unconvinced that it's the right thing, but we can at
least do it properly and not ship a sysinst with -7 that creates
permanently wrong fstab files.

Note that this may cause problems for anyone who's taken -p out of the
bootup fsck flags; but doing that is wrong, so don't.
2014-07-12 16:11:27 +00:00
tsutsui b13a31e41c Apply patch in PR port-alpha/48697 (with some tweaks).
Tru64 UNIX's disklabel is the same format as BSD disklabel,
and it seems Tru64 stores incorrect geometry values in
d_nsectors (sectors/track) and d_secpercyl (sectors/cylinder).
d_secperunit seems always reliable so use it to get
dlsec (sectors/track) and dlcylsize (sectors/cylinder) values.

Should be pulled up to netbsd-6 branches.
2014-06-02 15:03:47 +00:00
martin 41671a8417 Enable swap during sysinst as early as possible 2014-05-28 11:16:03 +00:00
christos b862878222 merge more, and add an i386 image 2014-04-04 16:45:51 +00:00
christos 9926e61998 now that fdisk has optional arguments, don't pass -1 2014-04-03 22:51:38 +00:00
ozaki-r 66441ce925 Include evbarm.conf as same as other conf files
evbarm.conf ensures ${mnt}/boot exists so that it avoids the error:
  /home/builds/ab/HEAD/src/distrib/utils/embedded/mkimage: cannot create \
  /tmp/mkimage.24444a/mnt/boot/cmdline.txt: directory nonexistent
2014-04-03 01:36:20 +00:00
christos 652c754390 remove swap; these days x86 machines don't need it. 2014-03-31 18:18:45 +00:00
christos 1ccc28a220 provide a -r rootdev option to handle the wd/sd/ld lossage. 2014-03-31 18:18:29 +00:00
christos 08207c1137 these changes produce a bootable system under qemu, but its root is trashed. 2014-03-31 17:05:03 +00:00
christos b87f017469 Add preliminary support for creating x86 usb sticks with mkimage.
This is untested, and just a checkpoint of the work. Image looks
ok, but I have not tried if it boots.
2014-03-31 16:20:48 +00:00
martin aad6ef8bb5 Bring back the playstation2 port - now that a toolchain for it is
available again.
2014-03-31 11:25:47 +00:00
skrll 6d3ceb1d61 Rename NetBSD/hp700 to NetBSD/hppa.
Unfortunately our VCS isn't very helpful here.
2014-02-24 07:23:38 +00:00
tsutsui 2bfe408bb8 Improve luna68k md part of sysinst.
- setup a boot UFS partition and install native bootloader
- add messages how to setup NVRAM variables for firmware to load bootloader
- enable swap on <= 32MB machines
2014-02-19 12:14:40 +00:00
tsutsui bde3bdd586 Use msg_display(3) rather than printf(3) to print dobootblk messages.
The latter won't show any characters on the sysinst screen
and other ports have used the former.
2014-02-15 19:45:43 +00:00
christos 2b043c75b6 eliminate use of bsd.sys.mk from Makefiles 2014-01-16 01:15:32 +00:00
christos 73e8f5b689 refer to our own h_errno so we don't fetch the libc one 2013-12-21 20:10:02 +00:00
martin 5a653d813b Add a tmpfs for /var/shm on machines with more than 16MB ram to the created
/etc/fstab.
2013-12-07 20:40:42 +00:00
martin 1b1205ff08 Remove duplicated line for /etc/fstab in file list 2013-12-07 19:42:36 +00:00
skrll a47f2be0b8 Put console=fb back as autodetect is bunged up. 2013-11-28 13:39:18 +00:00
skrll bc409d7b58 Fix /dev population of the evbarm images by using MAKEDEV -s and appending
to the mtree spec file passed to makefs.
2013-11-22 11:13:54 +00:00
christos f55ff5e8dd vax specific gcc 4.8.1 hacks 2013-11-09 21:39:27 +00:00
christos d0cb43a4be remove unused variable 2013-11-07 17:18:22 +00:00
christos debabdd480 fix unitialized variable access 2013-11-04 20:07:49 +00:00
drochner 958a129dbd -recognize CF cards by the magic value in inquiry data
-kill CFG_ATAPI_MASK, didn't see anything in the specs supporting
 that it exists
2013-10-30 15:37:49 +00:00
mrg 82ccf86971 remove unused variables 2013-10-30 08:39:01 +00:00
tsutsui 65aea71825 Fix another botch of my dumb patch in PR/45990; add missing braces.
The offset of MBR partition 0 was unintentionally set to 2048 even on
small (<=128GB) disks.  Probably we should rethink the threshold,
but anyway sysinst(8) should follow fdisk(8) default.
http://nxr.NetBSD.org/xref/src/sbin/fdisk/fdisk.c?r=1.145#1199
http://cvsweb.NetBSD.org/bsdweb.cgi/src/sbin/fdisk/fdisk.c#rev1.129

The problem is pointed out and analyzed by Simon Nicolussi in PR/48304.

Should be pulled up to all netbsd-6* branches.
2013-10-13 15:32:14 +00:00
ast d134b5afd8 After discussions with cristos regarding the previous commit, he
convinced me it was sufficient to define GZIP_CMD only in
distrib/utils/embedded/mkimage and not again in the config files
beagleboard.conf, rpi.conf, and rpi_inst.conf similar to how the
other variables $src, $release, $mnt, ... are only defined there.
2013-09-16 15:23:57 +00:00
ast 555103854f Fix build release of evbarm which had been failing in mkimage
beagleboard_smp with the elusive message:

    "gzip: can't stat: gzip: No such file or directory"

This was due to GZIP=gzip being defined in mkimage; we now use:

    GZIP_CMD=${TOOL_GZIP:-gzip} # ${GZIP} is special to gzip(1)

as distrib/sets/sets.subr already does in these files as well:

    distrib/utils/embedded/mkimage
    distrib/utils/embedded/conf/beagleboard.conf
    distrib/utils/embedded/conf/rpi.conf
    distrib/utils/embedded/conf/rpi_inst.conf
2013-09-14 12:51:27 +00:00
christos 27af00aa70 avoid copying most of libc (except gethostent_r, which unfortunately
adds a resolver dependency) by callling the internal nsswitch functions.
2013-08-27 09:53:33 +00:00
christos 5f8c91aab5 provide the symbols sethostent.c in libc is missing. 2013-08-25 08:46:34 +00:00
jmcneill 9ca21b5a2d 4th time's a charm (I hope). Make sure that we pick up the kernel path passed to
mkimage command line, and not the default.
2013-08-21 22:52:28 +00:00
christos f5cfca3b2e modernize, comment out dead code, amend gethostbyaddr prototype. 2013-08-20 15:44:17 +00:00
jmcneill fbfe999cbc Instead of trying to pass two kernels to beagleboard.conf, pass one and
derive the path to the second from the first.
2013-08-19 04:27:22 +00:00
jmcneill 0b185da1b6 Try to pick up the right location for BEAGLEBONE and BEAGLEBOARD kernels. 2013-08-17 13:08:16 +00:00
jmcneill 4aa709989e support beaglebone and beagleboard with the same image 2013-08-16 00:03:01 +00:00
jmcneill dff3087daa use console auto detection, ok nick 2013-08-01 10:45:21 +00:00
joerg ad436ff631 Fix stack overflow. 2013-07-10 08:00:29 +00:00
matt 21ab2522a4 Keep both c: and d: paritions so this can work with systems that have
RAW_PART as 2 or 3.  Addresses PR/47688.
2013-07-05 15:45:17 +00:00
matt cf364a0187 Just split it into two strings and eliminate the newline.
This goes into .ident so the newline doesn't matter.
2013-07-03 14:29:28 +00:00
matt 741c872fa1 Use ANSI C string concatenation 2013-06-28 15:44:27 +00:00
christos 59f914cb33 SSD cards is stupid. 2013-06-27 14:51:30 +00:00
christos 63f6ce0ea2 explain -m better 2013-06-27 03:03:16 +00:00
christos ccedefbe54 tidy up, fix usage 2013-06-27 03:00:53 +00:00
jakllsch a78ff5d27c Use TOOL_GZIP in mkimage, and pass the TOOL_GZIP into it. 2013-06-16 13:47:42 +00:00
christos 483cb9d94d If minwrites is set:
- set noatime, nodevmtime for root
	- use tmpfs for frequently written files
	- use unix sockets instead of fifos for postfix
From:
http://rich-tbp.blogspot.com/2013/03/netbsd-on-rpi-minimizing-disk-writes.html
2013-05-20 19:28:44 +00:00
christos 1ecbd28829 - explanations for single letter flags
- flag to add debug sets
- flag to minimize writes to sd's
2013-05-20 19:27:17 +00:00
tsutsui 186ae29489 Add SET_X11_NOSERVERS for default installation sets.
Althrough landisk doesn't have any screen console (except possible udl(4)
and ukbd(4)), it's a good environment to build packages binaries for sh3el,
including dreamcast.
2013-05-14 13:41:48 +00:00
tsutsui 18d49399c6 Remove pasted but obsolete comments. 2013-05-14 13:15:55 +00:00
tsutsui 8d0fe2ad86 Use the default MD_SETS_SELECTED for ports which have Xservers. 2013-05-14 13:14:27 +00:00
tsutsui 10c998805e Use the default MD_SETS_SELECTED in util.c which includes an Xserver set.
luna68k has working Xserver so no need to specify md MD_SETS_SELECTED
with SET_X11_NOSERVERS.
2013-05-14 13:08:57 +00:00
isaki 89a2e05aa5 Enable rc_configured=YES in sysinst.
The problem that sed was not contained in ramdisk was already gone.
analized by tsutsui@.
XXX Only hp300 and mvme68k seem to have the same problem.
2013-04-21 06:24:42 +00:00
joerg ed6b016ecc More locale hacks. 2013-04-19 18:45:03 +00:00
joerg ddb0cef57c Override localeconv_l as well, when providing an alternative
implementation of localeconv.
2013-04-18 16:25:55 +00:00
htodd 297d30db54 Double extra to fix image size to fix build. 2013-04-03 19:37:43 +00:00
jmcneill b40b80aea7 For ffs, set bytes per inode to 4K. Otherwise we get a density based on
the contents of the image, which aren't very useful after the file-system
has been resized -- for rpi.img, this was 22K per inode!
2013-03-28 00:20:02 +00:00
garbled 143c554557 Add def for KERNEL_9
Get rid of unneeded disklabel -D in md.c
Fix pr/47684 by getting rid of a stupid NULL.
2013-03-26 20:56:54 +00:00
joerg 18115f664e Cleanup prelim_menu definition. 2013-03-24 20:57:19 +00:00
christos a34568e5de Nothing uses the old small dhclient, and the new version is gigantic since it
brings in libisc.
2013-03-24 20:26:29 +00:00
jmcneill 8dfeb61e2b turn on devpubd 2013-03-24 14:11:59 +00:00
tsutsui 1623b8ef7d Remove non-en translations. en is enough for poor Tier II ports. 2013-03-23 18:15:06 +00:00
tsutsui f8c98e11e4 Remove rarely maintained and required non-en translations. 2013-03-23 17:29:38 +00:00
gson 6b07865853 Sync non-English messages with the changes of msg.mi.en 1.179 to the
best of my ability.
2013-03-23 15:53:48 +00:00
gson ef78fd8e39 Fix some nits in the English messages for the recently added debug
sets: rename the "Source sets" group to "Source and debug sets" to
better reflect its current content, describe the indivdual sets as
containing as "debug symbols" instead of "debug sets", and capitalize
them to be consistent with the messages for other sets.
2013-03-23 15:36:43 +00:00
he bc3f14a392 Add the ability to install the KUROBOX_PRO kernel.
Adds the ability to handle 9 different kernel sets (was 8).
2013-03-23 11:50:02 +00:00
garbled 1630987ad9 Fix an empty shell function here, per Greg Troxel. Apparently empty shell
functions are not 100% portable.
2013-03-20 14:47:20 +00:00
garbled 4daade7385 Add a new installer image for Raspberry PI to evbarm
Includes the following major changes:

1) Add new configmenu item to sysinst to allow creation of users at
post-install time.
2) Add an sshramdisk type to evbarm, which is a ramdisk with sshd
enabled, allowing users to install on a headless PI by sshing to the
device with the account "sysinst" password "netbsd" to begin the
installation. (Note, neither the account, nor the ssh setup are copied to
the finalized installation image)
3) Change mkimage to build a boot-only image, without the root filesystems.

Much of the sshramdisk code could be reused on other ports easily.
2013-03-19 22:16:52 +00:00
christos b5b92792fe fix debugging sets 2013-03-16 22:16:02 +00:00
christos 55f00bfae2 add debugging sets 2013-03-16 17:10:16 +00:00
htodd 259801b095 Disklabel need to use sectors, not bytes. Thanks to agc. 2013-03-01 14:28:22 +00:00
hans 93170f635e Use HOST_SH to run scripts. Makes mkimage work on SunOS. 2013-02-21 15:13:10 +00:00
riz 3d6cc52bac Use "gzip -dc" instead of "zcat" - some versions of zcat don't grok
gzip.
2013-02-20 18:33:37 +00:00
jmcneill 6d1c375231 gzcat -> zcat 2013-02-17 20:49:16 +00:00
christos 1b766d2e25 don't use [ -f $i ] && cat $i, since we are using -e 2013-02-15 00:13:06 +00:00
jmcneill fcc410b7f2 add extra space to root partition 2013-02-12 12:45:12 +00:00
jmcneill fbdc5d584c create /proc and /kern 2013-02-12 12:04:39 +00:00
jmcneill bdad5df232 set -e 2013-02-11 18:11:20 +00:00
jmcneill 946e7a0ac0 set rc_configured=YES and a hostname 2013-02-10 23:37:32 +00:00
christos 84914efcd2 start with the original rc.conf 2013-02-10 23:28:19 +00:00
jmcneill 688db5d3b9 dont use echo -n 2013-02-10 21:51:53 +00:00
jmcneill f27066f7f8 set src= before pulling in host config 2013-02-10 21:51:05 +00:00
jmcneill 8d6503c8a0 no sh -x 2013-02-10 16:56:38 +00:00
jmcneill 0c9570f8f3 fix msdos mbr partition size calculation 2013-02-10 16:56:01 +00:00
christos 3a09eb2df7 don't dup -F 2013-02-10 16:13:23 +00:00
christos 5f6d18eead no objmachine by default. 2013-02-10 16:13:00 +00:00
christos c4b361419a add -F to fdisk 2013-02-10 16:12:37 +00:00
christos 5e2ed7b35e remove trailing whitespace from EOF 2013-02-10 16:06:24 +00:00
jmcneill c399bff929 make sure kernel is installed as netbsd.ub 2013-02-10 15:56:57 +00:00
christos a744bfd880 mass -N db to makefs too 2013-02-10 15:51:59 +00:00
christos c7678cc71d specify a database for mtree. 2013-02-10 15:45:33 +00:00
jmcneill d46a4c5ba4 dont call mtree directly 2013-02-10 15:35:34 +00:00
christos da71c141ee really calling disklabel with the arguments of fdisk does not work. 2013-02-10 03:09:07 +00:00
christos c4c65e1ca7 - remove dup trap
- compare size to 0 for autosizing
- remove .gz file before compressing.
2013-02-10 02:09:47 +00:00
christos 2ef0e4eae7 add compression support. 2013-02-10 01:28:42 +00:00
christos fec034cae5 handle renaming and uncompressing the kernel 2013-02-09 20:47:46 +00:00
christos 2b70ceaf90 add tool hooks. 2013-02-09 18:50:11 +00:00
jmcneill 473f858720 fix usage again -- -D specifies destdir not releasedir
include conf/${h}.conf not conf/rpi.conf
fix ./mkimage: line 110: "7" - 1 : syntax error: operand expected (error token is ""7" - 1 ")
2013-02-09 11:20:56 +00:00
jmcneill eb893c8eed keep beagleboard conf in sync with rpi 2013-02-09 11:19:55 +00:00
jmcneill 35ad314c0b fix usage 2013-02-09 11:15:14 +00:00
jmcneill 5dd616cd7a add missing } 2013-02-09 11:07:26 +00:00
christos abb21374ec change to take the full kernel path 2013-02-08 19:16:53 +00:00
christos 9173721edf fix options 2013-02-08 19:14:14 +00:00
christos bb4ac1abd6 switch to makefs 2013-02-03 09:16:24 +00:00
skrll 247d96dca1 Add the tests sets by default. Tweak the usage output. 2013-01-30 07:40:34 +00:00
skrll b93243363a Move mdnsd to beagleboard only. RPI doesn't like it at the moment. 2013-01-28 09:06:19 +00:00
skrll 959d9b34bf cmdline needs to be a line! hi jak. 2013-01-23 22:20:06 +00:00
skrll 9a42078a69 Size for 512 byte sectors and base ffs partition size on totalsize minus
others.
2013-01-23 21:59:37 +00:00
jakllsch 05b3b9d385 Specify the root device in cmdline.txt, also, it's 'Pi', not 'PI'. 2013-01-21 17:14:23 +00:00
skrll bc399b5b4e kernel.img is for rpi only 2013-01-21 16:59:23 +00:00
skrll a4ac7e4aff More usage updates 2013-01-21 16:49:49 +00:00
skrll 33441e3917 Update usage output a little 2013-01-21 16:47:23 +00:00
christos b0de292a79 - Add support for xsets
- Factor out common evbarm code
2013-01-16 23:27:34 +00:00
christos ca6f14109b tidy up some more by factoring out the sizing code. 2013-01-16 15:58:19 +00:00
christos 095a11f03d Make autosizing really work:
- Use newfs to compute the actual filesystem required size.
    - Fix the computation of set sizes to account for blocks and fragments.
This results into a 95% full filesystem for my test (Total 566MB, 24MB free)
from which 8MB is my requested overhead. Not perfect, but good enough.
2013-01-15 21:04:41 +00:00
christos 7a6821a937 now that we compute sizes correctly, reduce the extra to how much free space
we want.
2013-01-15 20:55:00 +00:00
christos a58843234c make autosizing work (kind of) 2013-01-15 03:56:20 +00:00
christos db11691a33 first step at autosizing, still does not work. 2013-01-15 03:26:27 +00:00
jmcneill 72bcdf0815 set kerneldir= to the path used by build.sh 2013-01-15 02:51:10 +00:00