Re: [RFC / PATCH]: Add support for Kindle3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Thu, 7 Jul 2016, Sascha Hauer wrote:
> > +
> > +echo -n "Hit any key to stop autoboot: "
> > +timeout -a $global.autoboot_timeout
> > +if [ $? != 0 ]; then
> > +	echo
> > +	echo
> > +	exit
> > +fi
> > +
> > +boot
> > diff --git a/arch/arm/boards/kindle3/env/bin/set_serials b/arch/arm/boards/kindle3/env/bin/set_serials
> 
> Move this to /env/init/set_serials to let it automatically execute.
> 
> > new file mode 100644
> > index 0000000..e7e0881
> > --- /dev/null
> > +++ b/arch/arm/boards/kindle3/env/bin/set_serials
> > @@ -0,0 +1,18 @@
> > +#!/bin/sh
> > +
> > +# 16-byte alphanumeric containing the serial number
> > +# SN is the first 16 bytes before the bootloader
> > +if test -b /dev/disk0.serial; then
> > +	if memcpy -s /dev/disk0.serial -d tmp_serial16 -b 0 0 16; then
> > +		readf tmp_serial16 global.board.serial16
> > +	fi
> > +fi
> > +[ -f tmp_serial16 ] && rm tmp_serial16
> > +
> > +# 16-byte alphanumeric containing the board revision
> > +if test -b /dev/disk0.imx_header; then
> > +	if memcpy -s /dev/disk0.imx_header -d tmp_revision16 -b 2032 0 16; then
> > +		readf tmp_revision16 global.board.revision16
> > +	fi
> > +fi
> > +[ -f tmp_revision16 ] && rm tmp_revision16
> > diff --git a/arch/arm/boards/kindle3/env/boot/mmc_kernel b/arch/arm/boards/kindle3/env/boot/mmc_kernel
> > new file mode 100644
> > index 0000000..c6145b8
> > --- /dev/null
> > +++ b/arch/arm/boards/kindle3/env/boot/mmc_kernel
> > @@ -0,0 +1,7 @@
> > +#!/bin/sh
> > +# Boot the Amazon factory-shipped kernel uimage stored on
> > +# the eMMC at MOVINAND_OFFSET_KERNEL=266240.
> > +
> > +global linux.bootargs.dyn.root="root=/dev/mmcblk0p1 ro"
> > +
> > +bootm -c -a 0x80008000 /dev/disk0.kernel
> > diff --git a/arch/arm/boards/kindle3/env/config b/arch/arm/boards/kindle3/env/config
> > new file mode 100644
> > index 0000000..9b95330
> > --- /dev/null
> > +++ b/arch/arm/boards/kindle3/env/config
> > @@ -0,0 +1,15 @@
> > +#!/bin/sh
> > +
> > +# timeout in seconds before the default boot entry is started
> > +global.autoboot_timeout=3
> > +
> > +# list of boot entries. These are executed in order until one
> > +# succeeds. An entry can be:
> > +# - a filename in /env/boot/
> > +# - a full path to a directory. All files in this directory are
> > +#   treated as boot files and executed in alphabetical order
> > +global.boot.default=mmc_kernel
> > +
> > +global.linux.bootargs.base="mem=256M ip=none lpj=2555904"
> > +global.linux.bootargs.console="console=ttymxc0,115200"
> 
> Create files under /env/nv named after the variables with the content of
> the variables:
> 
> /env/nv/boot.default should contain "mmc_kernel"
> /env/nv/linux.bootargs.base should contain "mem=256M ip=none lpj=2555904"
> 
> and so on.
Thanks for your hints how to use defaultenv-2, this was an easy way 
how to eleminate the redundant passages in my previous env/bin/ subdir.
Cheers, Alexander

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux